aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/00-INDEX2
-rw-r--r--Documentation/DocBook/deviceiobook.tmpl3
-rw-r--r--Documentation/HOWTO4
-rw-r--r--Documentation/ManagementStyle2
-rw-r--r--Documentation/SubmittingPatches4
-rw-r--r--Documentation/crypto/async-tx-api.txt219
-rw-r--r--Documentation/devices.txt2
-rw-r--r--Documentation/feature-removal-schedule.txt16
-rw-r--r--Documentation/filesystems/00-INDEX2
-rw-r--r--Documentation/filesystems/9p.txt24
-rw-r--r--Documentation/filesystems/ocfs2.txt13
-rw-r--r--Documentation/i2c/busses/i2c-piix42
-rw-r--r--Documentation/input/iforce-protocol.txt508
-rw-r--r--Documentation/kernel-parameters.txt22
-rw-r--r--Documentation/ko_KR/HOWTO623
-rw-r--r--Documentation/lguest/lguest.c2
-rw-r--r--Documentation/lockstat.txt120
-rw-r--r--Documentation/networking/00-INDEX3
-rw-r--r--Documentation/networking/multiqueue.txt10
-rw-r--r--Documentation/networking/sk98lin.txt568
-rw-r--r--Documentation/sysrq.txt2
-rw-r--r--Documentation/thinkpad-acpi.txt96
-rw-r--r--Documentation/video4linux/cx2341x/fw-encoder-api.txt4
-rw-r--r--MAINTAINERS57
-rw-r--r--Makefile4
-rw-r--r--arch/arm/Kconfig7
-rw-r--r--arch/arm/kernel/bios32.c4
-rw-r--r--arch/arm/mach-ep93xx/core.c2
-rw-r--r--arch/arm/mach-imx/generic.c7
-rw-r--r--arch/arm/mach-omap1/board-h3.c12
-rw-r--r--arch/arm/mach-omap1/leds-osk.c6
-rw-r--r--arch/arm/mach-omap1/pm.c11
-rw-r--r--arch/arm/mach-omap2/clock.c13
-rw-r--r--arch/arm/mach-omap2/serial.c2
-rw-r--r--arch/arm/mach-pxa/irq.c2
-rw-r--r--arch/arm/mach-realview/realview_eb.c2
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c18
-rw-r--r--arch/arm/mm/cache-l2x0.c12
-rw-r--r--arch/arm/plat-omap/common.c2
-rw-r--r--arch/arm/plat-omap/dmtimer.c5
-rw-r--r--arch/arm/plat-omap/timer32k.c10
-rw-r--r--arch/arm/vfp/vfpmodule.c1
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c285
-rw-r--r--arch/blackfin/mach-common/entry.S23
-rw-r--r--arch/blackfin/mach-common/pm.c6
-rw-r--r--arch/h8300/Kconfig.debug2
-rw-r--r--arch/i386/boot/boot.h24
-rw-r--r--arch/i386/boot/cpucheck.c3
-rw-r--r--arch/i386/boot/edd.c6
-rw-r--r--arch/i386/boot/header.S2
-rw-r--r--arch/i386/boot/memory.c39
-rw-r--r--arch/i386/boot/pm.c6
-rw-r--r--arch/i386/boot/tty.c14
-rw-r--r--arch/i386/boot/video-vesa.c34
-rw-r--r--arch/i386/boot/video-vga.c17
-rw-r--r--arch/i386/boot/video.c14
-rw-r--r--arch/i386/kernel/acpi/wakeup.S41
-rw-r--r--arch/i386/kernel/alternative.c6
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.c60
-rw-r--r--arch/i386/kernel/cpu/intel_cacheinfo.c4
-rw-r--r--arch/i386/kernel/cpu/perfctr-watchdog.c28
-rw-r--r--arch/i386/kernel/io_apic.c8
-rw-r--r--arch/i386/kernel/nmi.c2
-rw-r--r--arch/i386/kernel/ptrace.c1
-rw-r--r--arch/i386/kernel/traps.c33
-rw-r--r--arch/i386/kernel/tsc.c1
-rw-r--r--arch/i386/mach-generic/Makefile2
-rw-r--r--arch/i386/mach-voyager/Makefile2
-rw-r--r--arch/i386/mm/highmem.c7
-rw-r--r--arch/i386/mm/hugetlbpage.c2
-rw-r--r--arch/i386/pci/irq.c1
-rw-r--r--arch/i386/pci/pcbios.c2
-rw-r--r--arch/i386/xen/enlighten.c4
-rw-r--r--arch/i386/xen/mmu.c5
-rw-r--r--arch/ia64/hp/sim/hpsim_console.c16
-rw-r--r--arch/ia64/hp/sim/hpsim_setup.c9
-rw-r--r--arch/ia64/hp/sim/simeth.c12
-rw-r--r--arch/ia64/hp/sim/simscsi.c3
-rw-r--r--arch/ia64/kernel/irq_ia64.c28
-rw-r--r--arch/ia64/kernel/ptrace.c1
-rw-r--r--arch/ia64/kernel/setup.c13
-rw-r--r--arch/ia64/kernel/smpboot.c6
-rw-r--r--arch/ia64/mm/contig.c3
-rw-r--r--arch/ia64/mm/discontig.c3
-rw-r--r--arch/ia64/mm/hugetlbpage.c6
-rw-r--r--arch/ia64/sn/kernel/huberror.c14
-rw-r--r--arch/ia64/sn/kernel/irq.c15
-rw-r--r--arch/ia64/sn/kernel/sn2/sn2_smp.c26
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c3
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c1
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c2
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c1
-rw-r--r--arch/m32r/Kconfig20
-rw-r--r--arch/m32r/Makefile3
-rw-r--r--arch/m32r/configs/m32104ut_defconfig (renamed from arch/m32r/m32104ut/defconfig.m32104ut)363
-rw-r--r--arch/m32r/configs/m32700ut.smp_defconfig (renamed from arch/m32r/m32700ut/defconfig.m32700ut.smp)349
-rw-r--r--arch/m32r/configs/m32700ut.up_defconfig (renamed from arch/m32r/m32700ut/defconfig.m32700ut.up)349
-rw-r--r--arch/m32r/configs/mappi.nommu_defconfig (renamed from arch/m32r/mappi/defconfig.nommu)294
-rw-r--r--arch/m32r/configs/mappi.smp_defconfig (renamed from arch/m32r/mappi/defconfig.smp)311
-rw-r--r--arch/m32r/configs/mappi.up_defconfig (renamed from arch/m32r/mappi/defconfig.up)311
-rw-r--r--arch/m32r/configs/mappi2.opsp_defconfig (renamed from arch/m32r/mappi2/defconfig.opsp)333
-rw-r--r--arch/m32r/configs/mappi2.vdec2_defconfig (renamed from arch/m32r/mappi2/defconfig.vdec2)333
-rw-r--r--arch/m32r/configs/mappi3.smp_defconfig (renamed from arch/m32r/mappi3/defconfig.smp)310
-rw-r--r--arch/m32r/configs/oaks32r_defconfig (renamed from arch/m32r/oaks32r/defconfig.nommu)290
-rw-r--r--arch/m32r/configs/opsput_defconfig (renamed from arch/m32r/opsput/defconfig.opsput)321
-rw-r--r--arch/m32r/configs/usrv_defconfig774
-rw-r--r--arch/m32r/defconfig349
-rw-r--r--arch/m32r/kernel/Makefile8
-rw-r--r--arch/m32r/kernel/entry.S569
-rw-r--r--arch/m32r/kernel/syscall_table.S286
-rw-r--r--arch/m32r/platforms/Makefile9
-rw-r--r--arch/m32r/platforms/m32104ut/Makefile1
-rw-r--r--arch/m32r/platforms/m32104ut/io.c (renamed from arch/m32r/kernel/io_m32104ut.c)2
-rw-r--r--arch/m32r/platforms/m32104ut/setup.c (renamed from arch/m32r/kernel/setup_m32104ut.c)2
-rw-r--r--arch/m32r/platforms/m32700ut/Makefile1
-rw-r--r--arch/m32r/platforms/m32700ut/dot.gdbinit_200MHz_16MB (renamed from arch/m32r/m32700ut/dot.gdbinit_200MHz_16MB)0
-rw-r--r--arch/m32r/platforms/m32700ut/dot.gdbinit_300MHz_32MB (renamed from arch/m32r/m32700ut/dot.gdbinit_300MHz_32MB)0
-rw-r--r--arch/m32r/platforms/m32700ut/dot.gdbinit_400MHz_32MB (renamed from arch/m32r/m32700ut/dot.gdbinit_400MHz_32MB)0
-rw-r--r--arch/m32r/platforms/m32700ut/io.c (renamed from arch/m32r/kernel/io_m32700ut.c)2
-rw-r--r--arch/m32r/platforms/m32700ut/setup.c (renamed from arch/m32r/kernel/setup_m32700ut.c)2
-rw-r--r--arch/m32r/platforms/mappi/Makefile1
-rw-r--r--arch/m32r/platforms/mappi/dot.gdbinit (renamed from arch/m32r/mappi/dot.gdbinit)0
-rw-r--r--arch/m32r/platforms/mappi/dot.gdbinit.nommu (renamed from arch/m32r/mappi/dot.gdbinit.nommu)0
-rw-r--r--arch/m32r/platforms/mappi/dot.gdbinit.smp (renamed from arch/m32r/mappi/dot.gdbinit.smp)0
-rw-r--r--arch/m32r/platforms/mappi/io.c (renamed from arch/m32r/kernel/io_mappi.c)2
-rw-r--r--arch/m32r/platforms/mappi/setup.c (renamed from arch/m32r/kernel/setup_mappi.c)2
-rw-r--r--arch/m32r/platforms/mappi2/Makefile1
-rw-r--r--arch/m32r/platforms/mappi2/dot.gdbinit.vdec2 (renamed from arch/m32r/mappi2/dot.gdbinit.vdec2)0
-rw-r--r--arch/m32r/platforms/mappi2/io.c (renamed from arch/m32r/kernel/io_mappi2.c)2
-rw-r--r--arch/m32r/platforms/mappi2/setup.c (renamed from arch/m32r/kernel/setup_mappi2.c)2
-rw-r--r--arch/m32r/platforms/mappi3/Makefile1
-rw-r--r--arch/m32r/platforms/mappi3/dot.gdbinit (renamed from arch/m32r/mappi3/dot.gdbinit)0
-rw-r--r--arch/m32r/platforms/mappi3/io.c (renamed from arch/m32r/kernel/io_mappi3.c)2
-rw-r--r--arch/m32r/platforms/mappi3/setup.c (renamed from arch/m32r/kernel/setup_mappi3.c)2
-rw-r--r--arch/m32r/platforms/oaks32r/Makefile1
-rw-r--r--arch/m32r/platforms/oaks32r/dot.gdbinit.nommu (renamed from arch/m32r/oaks32r/dot.gdbinit.nommu)0
-rw-r--r--arch/m32r/platforms/oaks32r/io.c (renamed from arch/m32r/kernel/io_oaks32r.c)2
-rw-r--r--arch/m32r/platforms/oaks32r/setup.c (renamed from arch/m32r/kernel/setup_oaks32r.c)2
-rw-r--r--arch/m32r/platforms/opsput/Makefile1
-rw-r--r--arch/m32r/platforms/opsput/dot.gdbinit (renamed from arch/m32r/opsput/dot.gdbinit)0
-rw-r--r--arch/m32r/platforms/opsput/io.c (renamed from arch/m32r/kernel/io_opsput.c)2
-rw-r--r--arch/m32r/platforms/opsput/setup.c (renamed from arch/m32r/kernel/setup_opsput.c)2
-rw-r--r--arch/m32r/platforms/usrv/Makefile1
-rw-r--r--arch/m32r/platforms/usrv/io.c (renamed from arch/m32r/kernel/io_usrv.c)4
-rw-r--r--arch/m32r/platforms/usrv/setup.c (renamed from arch/m32r/kernel/setup_usrv.c)5
-rw-r--r--arch/m68k/kernel/entry.S10
-rw-r--r--arch/m68k/kernel/ptrace.c1
-rw-r--r--arch/m68knommu/kernel/process.c1
-rw-r--r--arch/m68knommu/kernel/sys_m68k.c1
-rw-r--r--arch/m68knommu/kernel/syscalltable.S10
-rw-r--r--arch/mips/Kconfig54
-rw-r--r--arch/mips/au1000/Kconfig1
-rw-r--r--arch/mips/au1000/common/gpio.c12
-rw-r--r--arch/mips/au1000/common/pci.c1
-rw-r--r--arch/mips/au1000/mtx-1/board_setup.c4
-rw-r--r--arch/mips/au1000/pb1000/board_setup.c6
-rw-r--r--arch/mips/au1000/pb1100/board_setup.c4
-rw-r--r--arch/mips/au1000/pb1500/board_setup.c6
-rw-r--r--arch/mips/configs/bigsur_defconfig4
-rw-r--r--arch/mips/configs/capcella_defconfig417
-rw-r--r--arch/mips/configs/cobalt_defconfig341
-rw-r--r--arch/mips/configs/e55_defconfig319
-rw-r--r--arch/mips/configs/ip22_defconfig373
-rw-r--r--arch/mips/configs/ip27_defconfig394
-rw-r--r--arch/mips/configs/jmr3927_defconfig396
-rw-r--r--arch/mips/configs/malta_defconfig426
-rw-r--r--arch/mips/configs/mpc30x_defconfig572
-rw-r--r--arch/mips/configs/rbhma4200_defconfig332
-rw-r--r--arch/mips/configs/rbhma4500_defconfig239
-rw-r--r--arch/mips/configs/sb1250-swarm_defconfig4
-rw-r--r--arch/mips/configs/tb0219_defconfig504
-rw-r--r--arch/mips/configs/tb0226_defconfig548
-rw-r--r--arch/mips/configs/tb0287_defconfig592
-rw-r--r--arch/mips/configs/workpad_defconfig507
-rw-r--r--arch/mips/dec/setup.c2
-rw-r--r--arch/mips/defconfig373
-rw-r--r--arch/mips/jmr3927/rbhma3100/irq.c48
-rw-r--r--arch/mips/jmr3927/rbhma3100/setup.c13
-rw-r--r--arch/mips/kernel/Makefile1
-rw-r--r--arch/mips/kernel/asm-offsets.c4
-rw-r--r--arch/mips/kernel/cpu-bugs64.c4
-rw-r--r--arch/mips/kernel/cpu-probe.c9
-rw-r--r--arch/mips/kernel/i8259.c6
-rw-r--r--arch/mips/kernel/irixsig.c2
-rw-r--r--arch/mips/kernel/irq-msc01.c10
-rw-r--r--arch/mips/kernel/irq.c10
-rw-r--r--arch/mips/kernel/irq_txx9.c192
-rw-r--r--arch/mips/kernel/machine_kexec.c5
-rw-r--r--arch/mips/kernel/mips-mt.c7
-rw-r--r--arch/mips/kernel/rtlx.c4
-rw-r--r--arch/mips/kernel/scall64-n32.S2
-rw-r--r--arch/mips/kernel/scall64-o32.S2
-rw-r--r--arch/mips/kernel/smp-mt.c6
-rw-r--r--arch/mips/kernel/smtc.c7
-rw-r--r--arch/mips/kernel/time.c1
-rw-r--r--arch/mips/kernel/traps.c31
-rw-r--r--arch/mips/kernel/vmlinux.lds.S9
-rw-r--r--arch/mips/lib/Makefile2
-rw-r--r--arch/mips/lib/cmpdi2.c27
-rw-r--r--arch/mips/mips-boards/malta/malta_int.c2
-rw-r--r--arch/mips/mips-boards/malta/malta_smtc.c16
-rw-r--r--arch/mips/mips-boards/sim/sim_int.c88
-rw-r--r--arch/mips/mipssim/sim_smp.c6
-rw-r--r--arch/mips/mm/dma-default.c2
-rw-r--r--arch/mips/mm/init.c14
-rw-r--r--arch/mips/mm/pg-r4k.c2
-rw-r--r--arch/mips/mm/tlbex.c30
-rw-r--r--arch/mips/pci/ops-mace.c21
-rw-r--r--arch/mips/pci/pci.c10
-rw-r--r--arch/mips/philips/pnx8550/common/Kconfig1
-rw-r--r--arch/mips/pmc-sierra/yosemite/smp.c6
-rw-r--r--arch/mips/qemu/q-smp.c6
-rw-r--r--arch/mips/sgi-ip22/ip22-mc.c2
-rw-r--r--arch/mips/sgi-ip22/ip22-platform.c4
-rw-r--r--arch/mips/sgi-ip22/ip22-setup.c1
-rw-r--r--arch/mips/sgi-ip22/ip22-time.c4
-rw-r--r--arch/mips/sgi-ip27/ip27-irq.c8
-rw-r--r--arch/mips/sgi-ip27/ip27-smp.c4
-rw-r--r--arch/mips/sgi-ip32/ip32-platform.c4
-rw-r--r--arch/mips/sibyte/Kconfig1
-rw-r--r--arch/mips/sibyte/bcm1480/irq.c12
-rw-r--r--arch/mips/sibyte/bcm1480/setup.c2
-rw-r--r--arch/mips/sibyte/cfe/console.c2
-rw-r--r--arch/mips/sibyte/cfe/smp.c6
-rw-r--r--arch/mips/sibyte/sb1250/irq.c4
-rw-r--r--arch/mips/sni/pcimt_scache.c37
-rw-r--r--arch/mips/sni/reset.c4
-rw-r--r--arch/mips/sni/setup.c2
-rw-r--r--arch/mips/tx4927/common/Makefile2
-rw-r--r--arch/mips/tx4927/common/tx4927_irq.c395
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/Makefile2
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c171
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c11
-rw-r--r--arch/mips/tx4938/common/Makefile1
-rw-r--r--arch/mips/tx4938/common/irq.c279
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/Makefile2
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/irq.c2
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/setup.c13
-rw-r--r--arch/parisc/kernel/sys_parisc32.c141
-rw-r--r--arch/parisc/kernel/syscall_table.S4
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S2
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts1
-rw-r--r--arch/powerpc/configs/cell_defconfig220
-rw-r--r--arch/powerpc/configs/celleb_defconfig196
-rw-r--r--arch/powerpc/configs/chrp32_defconfig220
-rw-r--r--arch/powerpc/configs/ebony_defconfig190
-rw-r--r--arch/powerpc/configs/g5_defconfig208
-rw-r--r--arch/powerpc/configs/holly_defconfig203
-rw-r--r--arch/powerpc/configs/iseries_defconfig210
-rw-r--r--arch/powerpc/configs/linkstation_defconfig219
-rw-r--r--arch/powerpc/configs/lite5200_defconfig191
-rw-r--r--arch/powerpc/configs/maple_defconfig189
-rw-r--r--arch/powerpc/configs/mpc7448_hpc2_defconfig202
-rw-r--r--arch/powerpc/configs/mpc8272_ads_defconfig193
-rw-r--r--arch/powerpc/configs/mpc8313_rdb_defconfig224
-rw-r--r--arch/powerpc/configs/mpc832x_mds_defconfig209
-rw-r--r--arch/powerpc/configs/mpc832x_rdb_defconfig211
-rw-r--r--arch/powerpc/configs/mpc834x_itx_defconfig206
-rw-r--r--arch/powerpc/configs/mpc834x_itxgp_defconfig203
-rw-r--r--arch/powerpc/configs/mpc834x_mds_defconfig205
-rw-r--r--arch/powerpc/configs/mpc836x_mds_defconfig209
-rw-r--r--arch/powerpc/configs/mpc8540_ads_defconfig183
-rw-r--r--arch/powerpc/configs/mpc8544_ds_defconfig459
-rw-r--r--arch/powerpc/configs/mpc8560_ads_defconfig196
-rw-r--r--arch/powerpc/configs/mpc8568mds_defconfig43
-rw-r--r--arch/powerpc/configs/mpc85xx_cds_defconfig198
-rw-r--r--arch/powerpc/configs/mpc8641_hpcn_defconfig880
-rw-r--r--arch/powerpc/configs/mpc866_ads_defconfig174
-rw-r--r--arch/powerpc/configs/mpc885_ads_defconfig174
-rw-r--r--arch/powerpc/configs/pasemi_defconfig225
-rw-r--r--arch/powerpc/configs/pmac32_defconfig237
-rw-r--r--arch/powerpc/configs/ppc64_defconfig220
-rw-r--r--arch/powerpc/configs/prpmc2800_defconfig213
-rw-r--r--arch/powerpc/configs/pseries_defconfig205
-rw-r--r--arch/powerpc/kernel/ibmebus.c30
-rw-r--r--arch/powerpc/kernel/legacy_serial.c2
-rw-r--r--arch/powerpc/kernel/process.c13
-rw-r--r--arch/powerpc/kernel/time.c8
-rw-r--r--arch/powerpc/kernel/vdso.c12
-rw-r--r--arch/powerpc/mm/slb.c36
-rw-r--r--arch/powerpc/platforms/83xx/usb.c4
-rw-r--r--arch/powerpc/platforms/85xx/mpc8544_ds.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c2
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c2
-rw-r--r--arch/powerpc/platforms/Kconfig1
-rw-r--r--arch/powerpc/platforms/cell/cbe_regs.h8
-rw-r--r--arch/powerpc/platforms/cell/cbe_thermal.c6
-rw-r--r--arch/powerpc/platforms/cell/pervasive.c26
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c24
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c8
-rw-r--r--arch/powerpc/platforms/cell/spufs/backing_ops.c3
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c4
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c6
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c4
-rw-r--r--arch/powerpc/platforms/pasemi/iommu.c6
-rw-r--r--arch/powerpc/platforms/ps3/platform.h1
-rw-r--r--arch/powerpc/platforms/ps3/repository.c29
-rw-r--r--arch/powerpc/platforms/ps3/setup.c3
-rw-r--r--arch/powerpc/platforms/ps3/spu.c2
-rw-r--r--arch/powerpc/platforms/pseries/xics.c2
-rw-r--r--arch/powerpc/sysdev/axonram.c46
-rw-r--r--arch/powerpc/sysdev/commproc.c2
-rw-r--r--arch/powerpc/sysdev/cpm2_common.c2
-rw-r--r--arch/ppc/8xx_io/commproc.c2
-rw-r--r--arch/ppc/kernel/head_8xx.S2
-rw-r--r--arch/sh/Makefile17
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh4-202.c5
-rw-r--r--arch/sparc/kernel/ebus.c2
-rw-r--r--arch/sparc/lib/Makefile3
-rw-r--r--arch/sparc/lib/cmpdi2.c27
-rw-r--r--arch/sparc/lib/libgcc.h18
-rw-r--r--arch/sparc/prom/console.c3
-rw-r--r--arch/sparc64/defconfig16
-rw-r--r--arch/sparc64/kernel/binfmt_aout32.c4
-rw-r--r--arch/sparc64/kernel/ebus.c5
-rw-r--r--arch/sparc64/kernel/head.S35
-rw-r--r--arch/sparc64/kernel/irq.c27
-rw-r--r--arch/sparc64/kernel/mdesc.c6
-rw-r--r--arch/sparc64/kernel/pci.c14
-rw-r--r--arch/sparc64/kernel/pci_common.c4
-rw-r--r--arch/sparc64/kernel/pci_sun4v.c18
-rw-r--r--arch/sparc64/kernel/prom.c9
-rw-r--r--arch/sparc64/kernel/smp.c2
-rw-r--r--arch/sparc64/kernel/trampoline.S33
-rw-r--r--arch/sparc64/kernel/vio.c29
-rw-r--r--arch/sparc64/lib/NGcopy_from_user.S8
-rw-r--r--arch/sparc64/lib/NGcopy_to_user.S8
-rw-r--r--arch/sparc64/lib/NGmemcpy.S371
-rw-r--r--arch/sparc64/mm/hugetlbpage.c2
-rw-r--r--arch/sparc64/prom/misc.c16
-rw-r--r--arch/um/include/kern_util.h2
-rw-r--r--arch/um/kernel/dyn.lds.S12
-rw-r--r--arch/um/kernel/irq.c7
-rw-r--r--arch/um/kernel/uml.lds.S11
-rw-r--r--arch/um/os-Linux/file.c3
-rw-r--r--arch/um/os-Linux/signal.c4
-rw-r--r--arch/um/os-Linux/sys-x86_64/registers.c15
-rw-r--r--arch/um/sys-x86_64/ptrace.c6
-rw-r--r--arch/x86_64/Kconfig8
-rw-r--r--arch/x86_64/defconfig1
-rw-r--r--arch/x86_64/ia32/ia32entry.S18
-rw-r--r--arch/x86_64/kernel/acpi/wakeup.S47
-rw-r--r--arch/x86_64/kernel/io_apic.c8
-rw-r--r--arch/x86_64/kernel/process.c1
-rw-r--r--arch/x86_64/kernel/ptrace.c4
-rw-r--r--arch/x86_64/kernel/smp.c2
-rw-r--r--arch/x86_64/mm/fault.c7
-rw-r--r--arch/x86_64/vdso/vclock_gettime.c5
-rw-r--r--arch/x86_64/vdso/voffset.h2
-rw-r--r--arch/xtensa/Makefile7
-rw-r--r--arch/xtensa/kernel/Makefile2
-rw-r--r--arch/xtensa/kernel/asm-offsets.c13
-rw-r--r--arch/xtensa/kernel/entry.S115
-rw-r--r--arch/xtensa/kernel/init_task.c38
-rw-r--r--arch/xtensa/kernel/io.c75
-rw-r--r--arch/xtensa/kernel/module.c195
-rw-r--r--arch/xtensa/kernel/pci.c69
-rw-r--r--arch/xtensa/kernel/process.c15
-rw-r--r--arch/xtensa/kernel/semaphore.c2
-rw-r--r--arch/xtensa/kernel/syscall.c5
-rw-r--r--arch/xtensa/kernel/time.c46
-rw-r--r--arch/xtensa/kernel/traps.c4
-rw-r--r--arch/xtensa/mm/Makefile6
-rw-r--r--arch/xtensa/mm/cache.c256
-rw-r--r--arch/xtensa/mm/fault.c6
-rw-r--r--arch/xtensa/mm/init.c252
-rw-r--r--arch/xtensa/mm/misc.S306
-rw-r--r--arch/xtensa/platform-iss/console.c1
-rw-r--r--block/ll_rw_blk.c23
-rw-r--r--crypto/async_tx/async_tx.c12
-rw-r--r--crypto/blkcipher.c11
-rw-r--r--drivers/acpi/Kconfig18
-rw-r--r--drivers/acpi/ac.c5
-rw-r--r--drivers/acpi/asus_acpi.c2
-rw-r--r--drivers/acpi/battery.c52
-rw-r--r--drivers/acpi/bus.c10
-rw-r--r--drivers/acpi/button.c2
-rw-r--r--drivers/acpi/ec.c50
-rw-r--r--drivers/acpi/event.c22
-rw-r--r--drivers/acpi/hardware/hwsleep.c19
-rw-r--r--drivers/acpi/namespace/nsxfeval.c2
-rw-r--r--drivers/acpi/processor_core.c36
-rw-r--r--drivers/acpi/processor_idle.c51
-rw-r--r--drivers/acpi/sbs.c3
-rw-r--r--drivers/acpi/scan.c5
-rw-r--r--drivers/acpi/sleep/Makefile4
-rw-r--r--drivers/acpi/sleep/main.c63
-rw-r--r--drivers/acpi/sleep/poweroff.c75
-rw-r--r--drivers/acpi/sleep/proc.c10
-rw-r--r--drivers/acpi/tables/tbutils.c71
-rw-r--r--drivers/acpi/thermal.c67
-rw-r--r--drivers/acpi/utilities/utglobal.c1
-rw-r--r--drivers/acpi/video.c112
-rw-r--r--drivers/ata/ahci.c10
-rw-r--r--drivers/ata/ata_generic.c2
-rw-r--r--drivers/ata/ata_piix.c84
-rw-r--r--drivers/ata/libata-core.c28
-rw-r--r--drivers/ata/libata-sff.c5
-rw-r--r--drivers/ata/pata_ali.c9
-rw-r--r--drivers/ata/pata_amd.c2
-rw-r--r--drivers/ata/pata_atiixp.c2
-rw-r--r--drivers/ata/pata_cs5520.c2
-rw-r--r--drivers/ata/pata_cs5530.c2
-rw-r--r--drivers/ata/pata_isapnp.c2
-rw-r--r--drivers/ata/pata_it821x.c8
-rw-r--r--drivers/ata/pata_ixp4xx_cf.c3
-rw-r--r--drivers/ata/pata_marvell.c6
-rw-r--r--drivers/ata/pata_mpc52xx.c2
-rw-r--r--drivers/ata/pata_pcmcia.c2
-rw-r--r--drivers/ata/pata_pdc2027x.c20
-rw-r--r--drivers/ata/pata_platform.c2
-rw-r--r--drivers/ata/pata_sc1200.c2
-rw-r--r--drivers/ata/pata_scc.c2
-rw-r--r--drivers/ata/pata_serverworks.c2
-rw-r--r--drivers/ata/pata_sil680.c2
-rw-r--r--drivers/ata/pata_sis.c4
-rw-r--r--drivers/ata/pata_sl82c105.c2
-rw-r--r--drivers/ata/pata_via.c19
-rw-r--r--drivers/ata/pdc_adma.c2
-rw-r--r--drivers/ata/sata_inic162x.c2
-rw-r--r--drivers/ata/sata_mv.c37
-rw-r--r--drivers/ata/sata_nv.c2
-rw-r--r--drivers/ata/sata_promise.c6
-rw-r--r--drivers/ata/sata_qstor.c2
-rw-r--r--drivers/ata/sata_sil.c2
-rw-r--r--drivers/ata/sata_sil24.c18
-rw-r--r--drivers/ata/sata_sis.c2
-rw-r--r--drivers/ata/sata_svw.c2
-rw-r--r--drivers/ata/sata_sx4.c2
-rw-r--r--drivers/ata/sata_uli.c2
-rw-r--r--drivers/ata/sata_via.c4
-rw-r--r--drivers/ata/sata_vsc.c2
-rw-r--r--drivers/base/core.c40
-rw-r--r--drivers/block/DAC960.c18
-rw-r--r--drivers/block/DAC960.h7
-rw-r--r--drivers/block/sunvdc.c2
-rw-r--r--drivers/bluetooth/hci_usb.c5
-rw-r--r--drivers/cdrom/cdrom.c4
-rw-r--r--drivers/char/Makefile2
-rw-r--r--drivers/char/agp/agp.h3
-rw-r--r--drivers/char/agp/amd-k7-agp.c2
-rw-r--r--drivers/char/agp/ati-agp.c3
-rw-r--r--drivers/char/agp/efficeon-agp.c2
-rw-r--r--drivers/char/agp/hp-agp.c1
-rw-r--r--drivers/char/agp/i460-agp.c4
-rw-r--r--drivers/char/agp/intel-agp.c21
-rw-r--r--drivers/char/agp/nvidia-agp.c3
-rw-r--r--drivers/char/agp/via-agp.c5
-rw-r--r--drivers/char/drm/drm_bufs.c13
-rw-r--r--drivers/char/drm/i915_drv.h6
-rw-r--r--drivers/char/drm/i915_irq.c12
-rw-r--r--drivers/char/drm/via_dmablit.c2
-rw-r--r--drivers/char/hpet.c12
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c3
-rw-r--r--drivers/char/lcd.c1
-rw-r--r--drivers/char/mspec.c65
-rw-r--r--drivers/char/random.c10
-rw-r--r--drivers/char/sonypi.c2
-rw-r--r--drivers/char/tty_io.c6
-rw-r--r--drivers/char/tty_ioctl.c14
-rw-r--r--drivers/char/vt_ioctl.c19
-rw-r--r--drivers/dma/ioatdma.c18
-rw-r--r--drivers/edac/e752x_edac.c2
-rw-r--r--drivers/edac/edac_core.h2
-rw-r--r--drivers/firewire/Kconfig3
-rw-r--r--drivers/firewire/fw-card.c6
-rw-r--r--drivers/firewire/fw-ohci.c6
-rw-r--r--drivers/firewire/fw-sbp2.c49
-rw-r--r--drivers/hwmon/lm78.c2
-rw-r--r--drivers/hwmon/w83781d.c2
-rw-r--r--drivers/i2c/algos/i2c-algo-bit.c52
-rw-r--r--drivers/i2c/busses/Kconfig1
-rw-r--r--drivers/i2c/busses/i2c-gpio.c2
-rw-r--r--drivers/i2c/busses/i2c-piix4.c6
-rw-r--r--drivers/i2c/busses/i2c-pxa.c2
-rw-r--r--drivers/ide/Kconfig4
-rw-r--r--drivers/ide/ide-disk.c1
-rw-r--r--drivers/ide/ide-iops.c3
-rw-r--r--drivers/ide/pci/alim15x3.c7
-rw-r--r--drivers/ide/pci/hpt366.c138
-rw-r--r--drivers/ide/pci/pdc202xx_new.c9
-rw-r--r--drivers/ide/pci/via82cxxx.c16
-rw-r--r--drivers/ide/ppc/mpc8xx.c1
-rw-r--r--drivers/ide/ppc/pmac.c3
-rw-r--r--drivers/ide/setup-pci.c41
-rw-r--r--drivers/ieee1394/ieee1394_core.c2
-rw-r--r--drivers/ieee1394/ohci1394.c4
-rw-r--r--drivers/ieee1394/sbp2.c14
-rw-r--r--drivers/infiniband/hw/cxgb3/cxio_hal.c2
-rw-r--r--drivers/infiniband/hw/ehca/ehca_hca.c10
-rw-r--r--drivers/infiniband/hw/ehca/ehca_irq.c48
-rw-r--r--drivers/infiniband/hw/ehca/ehca_qp.c10
-rw-r--r--drivers/infiniband/hw/ehca/ipz_pt_fn.c2
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c62
-rw-r--r--drivers/input/joystick/Kconfig2
-rw-r--r--drivers/input/joystick/iforce/iforce-packets.c8
-rw-r--r--drivers/input/keyboard/gpio_keys.c1
-rw-r--r--drivers/input/mouse/appletouch.c6
-rw-r--r--drivers/input/mouse/touchkit_ps2.h3
-rw-r--r--drivers/input/serio/gscps2.c6
-rw-r--r--drivers/input/serio/i8042-x86ia64io.h10
-rw-r--r--drivers/input/serio/i8042.c6
-rw-r--r--drivers/input/touchscreen/usbtouchscreen.c2
-rw-r--r--drivers/isdn/i4l/isdn_bsdcomp.c5
-rw-r--r--drivers/isdn/i4l/isdn_common.c7
-rw-r--r--drivers/kvm/Kconfig3
-rw-r--r--drivers/kvm/kvm.h10
-rw-r--r--drivers/kvm/mmu.c5
-rw-r--r--drivers/lguest/Kconfig2
-rw-r--r--drivers/lguest/interrupts_and_traps.c7
-rw-r--r--drivers/lguest/lguest.c7
-rw-r--r--drivers/lguest/lguest_asm.S6
-rw-r--r--drivers/macintosh/adb.c4
-rw-r--r--drivers/macintosh/via-pmu.c34
-rw-r--r--drivers/md/Kconfig2
-rw-r--r--drivers/md/dm-bio-list.h3
-rw-r--r--drivers/md/dm-mpath-rdac.c2
-rw-r--r--drivers/md/raid5.c34
-rw-r--r--drivers/media/dvb/b2c2/flexcop-i2c.c7
-rw-r--r--drivers/media/dvb/dvb-core/dvb_net.c5
-rw-r--r--drivers/media/video/cx88/cx88-mpeg.c2
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c1
-rw-r--r--drivers/media/video/ivtv/ivtv-fileops.c12
-rw-r--r--drivers/media/video/ivtv/ivtv-ioctl.c17
-rw-r--r--drivers/media/video/pwc/pwc-if.c52
-rw-r--r--drivers/media/video/pwc/pwc.h1
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c12
-rw-r--r--drivers/media/video/saa7191.c4
-rw-r--r--drivers/media/video/usbvision/usbvision-cards.c1
-rw-r--r--drivers/media/video/usbvision/usbvision-video.c5
-rw-r--r--drivers/misc/Kconfig20
-rw-r--r--drivers/misc/asus-laptop.c5
-rw-r--r--drivers/misc/msi-laptop.c2
-rw-r--r--drivers/misc/sony-laptop.c28
-rw-r--r--drivers/misc/thinkpad_acpi.c166
-rw-r--r--drivers/misc/thinkpad_acpi.h1
-rw-r--r--drivers/mmc/core/bus.c4
-rw-r--r--drivers/mmc/core/host.c4
-rw-r--r--drivers/mmc/host/at91_mci.c6
-rw-r--r--drivers/mmc/host/sdhci.c53
-rw-r--r--drivers/mmc/host/sdhci.h1
-rw-r--r--drivers/mtd/mtdsuper.c2
-rw-r--r--drivers/net/Kconfig89
-rw-r--r--drivers/net/Makefile1
-rw-r--r--drivers/net/atl1/atl1_main.c19
-rw-r--r--drivers/net/bnx2.c17
-rw-r--r--drivers/net/bsd_comp.c6
-rw-r--r--drivers/net/cxgb3/adapter.h2
-rw-r--r--drivers/net/cxgb3/common.h3
-rw-r--r--drivers/net/cxgb3/cxgb3_main.c252
-rw-r--r--drivers/net/cxgb3/cxgb3_offload.c16
-rw-r--r--drivers/net/cxgb3/cxgb3_offload.h2
-rw-r--r--drivers/net/cxgb3/sge.c23
-rw-r--r--drivers/net/cxgb3/t3_hw.c46
-rw-r--r--drivers/net/cxgb3/t3cdev.h3
-rw-r--r--drivers/net/dm9000.c25
-rw-r--r--drivers/net/e1000/e1000_ethtool.c1
-rw-r--r--drivers/net/e1000/e1000_hw.c1
-rw-r--r--drivers/net/e1000/e1000_hw.h1
-rw-r--r--drivers/net/e1000/e1000_main.c2
-rw-r--r--drivers/net/ehea/ehea.h5
-rw-r--r--drivers/net/ehea/ehea_main.c24
-rw-r--r--drivers/net/ehea/ehea_qmr.c6
-rw-r--r--drivers/net/eql.c2
-rw-r--r--drivers/net/forcedeth.c2
-rw-r--r--drivers/net/ioc3-eth.c80
-rw-r--r--drivers/net/irda/kingsun-sir.c4
-rw-r--r--drivers/net/meth.c2
-rw-r--r--drivers/net/mv643xx_eth.c7
-rw-r--r--drivers/net/mv643xx_eth.h4
-rw-r--r--drivers/net/myri10ge/myri10ge.c37
-rw-r--r--drivers/net/netxen/netxen_nic_hdr.h6
-rw-r--r--drivers/net/netxen/netxen_nic_hw.c8
-rw-r--r--drivers/net/netxen/netxen_nic_main.c19
-rw-r--r--drivers/net/phy/phy.c5
-rw-r--r--drivers/net/phy/phy_device.c6
-rw-r--r--drivers/net/ppp_generic.c58
-rw-r--r--drivers/net/ppp_mppe.c14
-rw-r--r--drivers/net/pppoe.c71
-rw-r--r--drivers/net/pppol2tp.c118
-rw-r--r--drivers/net/ps3_gelic_net.c1
-rwxr-xr-xdrivers/net/qla3xxx.c7
-rw-r--r--drivers/net/r8169.c30
-rw-r--r--drivers/net/sgiseeq.c4
-rw-r--r--drivers/net/sk98lin/Makefile87
-rw-r--r--drivers/net/sk98lin/h/lm80.h179
-rw-r--r--drivers/net/sk98lin/h/skaddr.h285
-rw-r--r--drivers/net/sk98lin/h/skcsum.h213
-rw-r--r--drivers/net/sk98lin/h/skdebug.h74
-rw-r--r--drivers/net/sk98lin/h/skdrv1st.h188
-rw-r--r--drivers/net/sk98lin/h/skdrv2nd.h447
-rw-r--r--drivers/net/sk98lin/h/skerror.h55
-rw-r--r--drivers/net/sk98lin/h/skgedrv.h51
-rw-r--r--drivers/net/sk98lin/h/skgehw.h2126
-rw-r--r--drivers/net/sk98lin/h/skgehwt.h48
-rw-r--r--drivers/net/sk98lin/h/skgei2c.h210
-rw-r--r--drivers/net/sk98lin/h/skgeinit.h797
-rw-r--r--drivers/net/sk98lin/h/skgepnm2.h334
-rw-r--r--drivers/net/sk98lin/h/skgepnmi.h962
-rw-r--r--drivers/net/sk98lin/h/skgesirq.h110
-rw-r--r--drivers/net/sk98lin/h/ski2c.h174
-rw-r--r--drivers/net/sk98lin/h/skqueue.h94
-rw-r--r--drivers/net/sk98lin/h/skrlmt.h438
-rw-r--r--drivers/net/sk98lin/h/sktimer.h63
-rw-r--r--drivers/net/sk98lin/h/sktypes.h69
-rw-r--r--drivers/net/sk98lin/h/skversion.h38
-rw-r--r--drivers/net/sk98lin/h/skvpd.h248
-rw-r--r--drivers/net/sk98lin/h/xmac_ii.h1579
-rw-r--r--drivers/net/sk98lin/skaddr.c1788
-rw-r--r--drivers/net/sk98lin/skdim.c742
-rw-r--r--drivers/net/sk98lin/skethtool.c627
-rw-r--r--drivers/net/sk98lin/skge.c5219
-rw-r--r--drivers/net/sk98lin/skgehwt.c171
-rw-r--r--drivers/net/sk98lin/skgeinit.c2005
-rw-r--r--drivers/net/sk98lin/skgemib.c1075
-rw-r--r--drivers/net/sk98lin/skgepnmi.c8210
-rw-r--r--drivers/net/sk98lin/skgesirq.c2229
-rw-r--r--drivers/net/sk98lin/ski2c.c1296
-rw-r--r--drivers/net/sk98lin/sklm80.c141
-rw-r--r--drivers/net/sk98lin/skqueue.c179
-rw-r--r--drivers/net/sk98lin/skrlmt.c3257
-rw-r--r--drivers/net/sk98lin/sktimer.c250
-rw-r--r--drivers/net/sk98lin/skvpd.c1091
-rw-r--r--drivers/net/sk98lin/skxmac2.c4160
-rw-r--r--drivers/net/sky2.c434
-rw-r--r--drivers/net/sky2.h42
-rw-r--r--drivers/net/slip.c2
-rw-r--r--drivers/net/spider_net.c12
-rw-r--r--drivers/net/tg3.c13
-rw-r--r--drivers/net/ucc_geth.c2
-rw-r--r--drivers/net/usb/dm9601.c2
-rw-r--r--drivers/net/wireless/Makefile2
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_main.c28
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_main.h2
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c2
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_wx.c2
-rw-r--r--drivers/pci/hotplug/acpiphp_ibm.c7
-rw-r--r--drivers/pci/hotplug/cpqphp_ctrl.c4
-rw-r--r--drivers/pci/pci.h8
-rw-r--r--drivers/pci/probe.c20
-rw-r--r--drivers/pci/quirks.c30
-rw-r--r--drivers/pnp/card.c16
-rw-r--r--drivers/pnp/core.c7
-rw-r--r--drivers/pnp/driver.c6
-rw-r--r--drivers/pnp/interface.c9
-rw-r--r--drivers/pnp/isapnp/core.c24
-rw-r--r--drivers/pnp/isapnp/proc.c45
-rw-r--r--drivers/pnp/manager.c27
-rw-r--r--drivers/pnp/pnpacpi/core.c4
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c23
-rw-r--r--drivers/pnp/pnpbios/core.c44
-rw-r--r--drivers/pnp/pnpbios/proc.c2
-rw-r--r--drivers/pnp/pnpbios/rsparser.c9
-rw-r--r--drivers/pnp/quirks.c103
-rw-r--r--drivers/pnp/resource.c26
-rw-r--r--drivers/power/power_supply_sysfs.c1
-rw-r--r--drivers/rtc/rtc-ds1553.c2
-rw-r--r--drivers/rtc/rtc-ds1742.c2
-rw-r--r--drivers/rtc/rtc-rs5c348.c2
-rw-r--r--drivers/rtc/rtc-v3020.c9
-rw-r--r--drivers/s390/net/qeth.h4
-rw-r--r--drivers/s390/net/qeth_main.c158
-rw-r--r--drivers/s390/net/qeth_mpc.h1
-rw-r--r--drivers/s390/net/qeth_sys.c8
-rw-r--r--drivers/s390/scsi/zfcp_aux.c4
-rw-r--r--drivers/s390/scsi/zfcp_qdio.c10
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c4
-rw-r--r--drivers/scsi/aic94xx/aic94xx_task.c4
-rw-r--r--drivers/scsi/esp_scsi.c3
-rw-r--r--drivers/scsi/libiscsi.c65
-rw-r--r--drivers/scsi/megaraid.c8
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.c21
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h1
-rw-r--r--drivers/scsi/qla2xxx/qla_gs.c28
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c51
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c1
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_version.h2
-rw-r--r--drivers/scsi/scsi_transport_spi.c28
-rw-r--r--drivers/serial/8250_pci.c2
-rw-r--r--drivers/serial/Kconfig8
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_cpm1.h2
-rw-r--r--drivers/serial/sb1250-duart.c6
-rw-r--r--drivers/serial/serial_cs.c1
-rw-r--r--drivers/serial/sunsab.c109
-rw-r--r--drivers/serial/sunsu.c5
-rw-r--r--drivers/serial/sunzilog.c14
-rw-r--r--drivers/spi/atmel_spi.c2
-rw-r--r--drivers/spi/spi_bfin5xx.c3
-rw-r--r--drivers/spi/spi_imx.c2
-rw-r--r--drivers/spi/spi_mpc83xx.c8
-rw-r--r--drivers/spi/spi_s3c24xx.c1
-rw-r--r--drivers/spi/spi_s3c24xx_gpio.c2
-rw-r--r--drivers/spi/spi_txx9.c2
-rw-r--r--drivers/spi/xilinx_spi.c2
-rw-r--r--drivers/usb/Kconfig1
-rw-r--r--drivers/usb/atm/cxacru.c3
-rw-r--r--drivers/usb/atm/ueagle-atm.c5
-rw-r--r--drivers/usb/class/cdc-acm.c12
-rw-r--r--drivers/usb/core/driver.c11
-rw-r--r--drivers/usb/core/hub.c3
-rw-r--r--drivers/usb/core/message.c28
-rw-r--r--drivers/usb/core/quirks.c43
-rw-r--r--drivers/usb/gadget/dummy_hcd.c2
-rw-r--r--drivers/usb/gadget/file_storage.c10
-rw-r--r--drivers/usb/gadget/fsl_usb2_udc.c77
-rw-r--r--drivers/usb/gadget/pxa2xx_udc.c4
-rw-r--r--drivers/usb/gadget/serial.c25
-rw-r--r--drivers/usb/host/Kconfig2
-rw-r--r--drivers/usb/host/ehci-au1xxx.c5
-rw-r--r--drivers/usb/host/ehci-ppc-soc.c22
-rw-r--r--drivers/usb/host/ohci-dbg.c2
-rw-r--r--drivers/usb/host/r8a66597-hcd.c2
-rw-r--r--drivers/usb/host/u132-hcd.c3
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.c1
-rw-r--r--drivers/usb/serial/airprime.c1
-rw-r--r--drivers/usb/serial/belkin_sa.c4
-rw-r--r--drivers/usb/serial/bus.c2
-rw-r--r--drivers/usb/serial/ftdi_sio.c3
-rw-r--r--drivers/usb/serial/ftdi_sio.h11
-rw-r--r--drivers/usb/serial/garmin_gps.c93
-rw-r--r--drivers/usb/serial/ipaq.c1
-rw-r--r--drivers/usb/serial/option.c13
-rw-r--r--drivers/usb/serial/oti6858.c17
-rw-r--r--drivers/usb/serial/safe_serial.c6
-rw-r--r--drivers/usb/serial/visor.c2
-rw-r--r--drivers/usb/serial/visor.h3
-rw-r--r--drivers/usb/storage/scsiglue.c13
-rw-r--r--drivers/usb/storage/unusual_devs.h32
-rw-r--r--drivers/usb/storage/usb.c60
-rw-r--r--drivers/usb/storage/usb.h1
-rw-r--r--drivers/video/aty/ati_ids.h12
-rw-r--r--drivers/video/aty/radeon_base.c6
-rw-r--r--drivers/video/bw2.c22
-rw-r--r--drivers/video/cg3.c17
-rw-r--r--drivers/video/console/Kconfig4
-rw-r--r--drivers/video/console/sticore.c14
-rw-r--r--drivers/video/intelfb/intelfbhw.c8
-rw-r--r--drivers/w1/w1.c1
-rw-r--r--fs/9p/fid.c17
-rw-r--r--fs/9p/fid.h1
-rw-r--r--fs/Kconfig3
-rw-r--r--fs/afs/mntpt.c2
-rw-r--r--fs/aio.c2
-rw-r--r--fs/binfmt_flat.c6
-rw-r--r--fs/compat_ioctl.c24
-rw-r--r--fs/ecryptfs/inode.c4
-rw-r--r--fs/ecryptfs/mmap.c3
-rw-r--r--fs/exec.c3
-rw-r--r--fs/ext3/namei.c73
-rw-r--r--fs/ext3/super.c11
-rw-r--r--fs/ext4/namei.c73
-rw-r--r--fs/ext4/super.c11
-rw-r--r--fs/hugetlbfs/inode.c15
-rw-r--r--fs/jffs2/fs.c2
-rw-r--r--fs/lockd/svclock.c31
-rw-r--r--fs/locks.c2
-rw-r--r--fs/nfs/client.c29
-rw-r--r--fs/nfs/dir.c2
-rw-r--r--fs/nfs/file.c2
-rw-r--r--fs/nfs/getroot.c3
-rw-r--r--fs/nfs/namespace.c2
-rw-r--r--fs/nfs/nfs4proc.c4
-rw-r--r--fs/nfs/super.c132
-rw-r--r--fs/nfs/write.c44
-rw-r--r--fs/nfsd/nfsfh.c20
-rw-r--r--fs/nfsd/vfs.c3
-rw-r--r--fs/ocfs2/alloc.c1
-rw-r--r--fs/ocfs2/aops.c37
-rw-r--r--fs/ocfs2/file.c5
-rw-r--r--fs/ocfs2/localalloc.c8
-rw-r--r--fs/ocfs2/localalloc.h2
-rw-r--r--fs/ocfs2/suballoc.c29
-rw-r--r--fs/ocfs2/suballoc.h11
-rw-r--r--fs/ocfs2/super.c69
-rw-r--r--fs/ocfs2/vote.c4
-rw-r--r--fs/proc/array.c44
-rw-r--r--fs/proc/inode.c3
-rw-r--r--fs/reiserfs/super.c13
-rw-r--r--fs/select.c2
-rw-r--r--fs/signalfd.c190
-rw-r--r--fs/splice.c46
-rw-r--r--fs/sysfs/bin.c7
-rw-r--r--fs/sysfs/dir.c21
-rw-r--r--fs/udf/balloc.c10
-rw-r--r--fs/udf/super.c26
-rw-r--r--fs/ufs/super.c4
-rw-r--r--fs/xfs/linux-2.6/kmem.h2
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c9
-rw-r--r--fs/xfs/linux-2.6/xfs_globals.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c4
-rw-r--r--fs/xfs/quota/xfs_qm.c3
-rw-r--r--fs/xfs/support/debug.h10
-rw-r--r--fs/xfs/xfs_da_btree.c1
-rw-r--r--fs/xfs/xfs_filestream.c10
-rw-r--r--fs/xfs/xfs_log.c12
-rw-r--r--fs/xfs/xfs_log_recover.c12
-rw-r--r--fs/xfs/xfs_mru_cache.c72
-rw-r--r--fs/xfs/xfs_mru_cache.h6
-rw-r--r--fs/xfs/xfs_vnodeops.c20
-rw-r--r--include/acpi/acpi_bus.h10
-rw-r--r--include/acpi/acpi_drivers.h4
-rw-r--r--include/acpi/acpixf.h2
-rw-r--r--include/acpi/acstruct.h2
-rw-r--r--include/acpi/processor.h2
-rw-r--r--include/asm-arm/arch-at91/irqs.h3
-rw-r--r--include/asm-arm/arch-omap/irda.h1
-rw-r--r--include/asm-arm/cacheflush.h7
-rw-r--r--include/asm-arm/plat-s3c/map.h12
-rw-r--r--include/asm-blackfin/mach-bf533/bfin_serial_5xx.h11
-rw-r--r--include/asm-blackfin/mach-bf537/bfin_serial_5xx.h23
-rw-r--r--include/asm-blackfin/mach-bf537/portmux.h35
-rw-r--r--include/asm-blackfin/mach-bf561/bfin_serial_5xx.h11
-rw-r--r--include/asm-blackfin/mach-bf561/cdefBF561.h4
-rw-r--r--include/asm-blackfin/portmux.h55
-rw-r--r--include/asm-blackfin/string.h129
-rw-r--r--include/asm-blackfin/unistd.h56
-rw-r--r--include/asm-generic/termios.h2
-rw-r--r--include/asm-h8300/flat.h3
-rw-r--r--include/asm-i386/io.h3
-rw-r--r--include/asm-i386/io_apic.h1
-rw-r--r--include/asm-i386/system.h5
-rw-r--r--include/asm-ia64/hpsim.h16
-rw-r--r--include/asm-ia64/sn/arch.h1
-rw-r--r--include/asm-ia64/sn/intr.h1
-rw-r--r--include/asm-ia64/sn/sn_feature_sets.h1
-rw-r--r--include/asm-m32r/assembler.h16
-rw-r--r--include/asm-m32r/flat.h3
-rw-r--r--include/asm-m32r/m32r.h20
-rw-r--r--include/asm-m68k/unistd.h12
-rw-r--r--include/asm-m68knommu/flat.h3
-rw-r--r--include/asm-m68knommu/pgtable.h2
-rw-r--r--include/asm-m68knommu/unistd.h12
-rw-r--r--include/asm-mips/bcache.h1
-rw-r--r--include/asm-mips/cmpxchg.h107
-rw-r--r--include/asm-mips/compiler.h4
-rw-r--r--include/asm-mips/edac.h17
-rw-r--r--include/asm-mips/fcntl.h1
-rw-r--r--include/asm-mips/gt64240.h1235
-rw-r--r--include/asm-mips/hazards.h1
-rw-r--r--include/asm-mips/ioctls.h4
-rw-r--r--include/asm-mips/irq.h32
-rw-r--r--include/asm-mips/jmr3927/jmr3927.h3
-rw-r--r--include/asm-mips/jmr3927/tx3927.h36
-rw-r--r--include/asm-mips/local.h69
-rw-r--r--include/asm-mips/mach-generic/ide.h83
-rw-r--r--include/asm-mips/mach-ocelot/mach-gt64120.h30
-rw-r--r--include/asm-mips/marvell.h59
-rw-r--r--include/asm-mips/page.h2
-rw-r--r--include/asm-mips/pgtable-32.h16
-rw-r--r--include/asm-mips/pgtable.h12
-rw-r--r--include/asm-mips/sibyte/bcm1480_regs.h5
-rw-r--r--include/asm-mips/smtc.h10
-rw-r--r--include/asm-mips/stacktrace.h6
-rw-r--r--include/asm-mips/system.h261
-rw-r--r--include/asm-mips/termbits.h7
-rw-r--r--include/asm-mips/termios.h6
-rw-r--r--include/asm-mips/tx4927/toshiba_rbtx4927.h2
-rw-r--r--include/asm-mips/tx4927/tx4927.h49
-rw-r--r--include/asm-mips/tx4927/tx4927_pci.h23
-rw-r--r--include/asm-mips/tx4938/rbtx4938.h25
-rw-r--r--include/asm-mips/tx4938/tx4938.h41
-rw-r--r--include/asm-mips/txx9irq.h30
-rw-r--r--include/asm-parisc/io.h10
-rw-r--r--include/asm-parisc/vga.h6
-rw-r--r--include/asm-powerpc/spu.h2
-rw-r--r--include/asm-powerpc/time.h5
-rw-r--r--include/asm-sh/flat.h3
-rw-r--r--include/asm-sparc/tlbflush.h6
-rw-r--r--include/asm-sparc64/device.h2
-rw-r--r--include/asm-sparc64/irq.h25
-rw-r--r--include/asm-sparc64/oplib.h4
-rw-r--r--include/asm-um/common.lds.S124
-rw-r--r--include/asm-um/elf-x86_64.h40
-rw-r--r--include/asm-v850/flat.h4
-rw-r--r--include/asm-x86_64/io_apic.h6
-rw-r--r--include/asm-x86_64/pgalloc.h73
-rw-r--r--include/asm-x86_64/pgtable.h1
-rw-r--r--include/asm-x86_64/processor.h2
-rw-r--r--include/asm-xtensa/bugs.h6
-rw-r--r--include/asm-xtensa/cache.h9
-rw-r--r--include/asm-xtensa/cacheflush.h81
-rw-r--r--include/asm-xtensa/elf.h50
-rw-r--r--include/asm-xtensa/io.h1
-rw-r--r--include/asm-xtensa/ioctls.h4
-rw-r--r--include/asm-xtensa/page.h106
-rw-r--r--include/asm-xtensa/pgalloc.h107
-rw-r--r--include/asm-xtensa/pgtable.h235
-rw-r--r--include/asm-xtensa/processor.h2
-rw-r--r--include/asm-xtensa/syscall.h24
-rw-r--r--include/asm-xtensa/termbits.h5
-rw-r--r--include/asm-xtensa/termios.h6
-rw-r--r--include/asm-xtensa/timex.h4
-rw-r--r--include/asm-xtensa/tlb.h30
-rw-r--r--include/asm-xtensa/types.h9
-rw-r--r--include/asm-xtensa/unistd.h128
-rw-r--r--include/linux/Kbuild1
-rw-r--r--include/linux/aer.h25
-rw-r--r--include/linux/ata.h13
-rw-r--r--include/linux/audit.h4
-rw-r--r--include/linux/cpu.h6
-rw-r--r--include/linux/cpufreq.h19
-rw-r--r--include/linux/hugetlb.h10
-rw-r--r--include/linux/ide.h13
-rw-r--r--include/linux/if_pppol2tp.h4
-rw-r--r--include/linux/init_task.h2
-rw-r--r--include/linux/input.h8
-rw-r--r--include/linux/isa.h11
-rw-r--r--include/linux/kernel.h1
-rw-r--r--include/linux/keyboard.h4
-rw-r--r--include/linux/leds.h1
-rw-r--r--include/linux/libata.h1
-rw-r--r--include/linux/mempolicy.h4
-rw-r--r--include/linux/netfilter.h5
-rw-r--r--include/linux/nfs_fs.h1
-rw-r--r--include/linux/pci.h4
-rw-r--r--include/linux/pci_ids.h10
-rw-r--r--include/linux/pmu.h2
-rw-r--r--include/linux/poll.h2
-rw-r--r--include/linux/rtnetlink.h2
-rw-r--r--include/linux/sched.h17
-rw-r--r--include/linux/signalfd.h40
-rw-r--r--include/linux/skbuff.h40
-rw-r--r--include/linux/slub_def.h8
-rw-r--r--include/linux/user_namespace.h2
-rw-r--r--include/linux/writeback.h2
-rw-r--r--include/media/v4l2-dev.h5
-rw-r--r--include/net/rose.h2
-rw-r--r--include/net/sctp/sctp.h1
-rw-r--r--include/net/sctp/sm.h6
-rw-r--r--include/net/sctp/structs.h15
-rw-r--r--include/net/sctp/ulpqueue.h1
-rw-r--r--include/net/tcp.h6
-rw-r--r--include/scsi/libiscsi.h7
-rw-r--r--init/Kconfig1
-rw-r--r--init/do_mounts_initrd.c4
-rw-r--r--init/main.c20
-rw-r--r--kernel/cpu.c4
-rw-r--r--kernel/exit.c11
-rw-r--r--kernel/fork.c2
-rw-r--r--kernel/futex.c26
-rw-r--r--kernel/futex_compat.c30
-rw-r--r--kernel/irq/manage.c11
-rw-r--r--kernel/kmod.c2
-rw-r--r--kernel/module.c3
-rw-r--r--kernel/power/Kconfig41
-rw-r--r--kernel/ptrace.c1
-rw-r--r--kernel/sched.c112
-rw-r--r--kernel/sched_debug.c4
-rw-r--r--kernel/sched_fair.c216
-rw-r--r--kernel/sched_rt.c11
-rw-r--r--kernel/signal.c49
-rw-r--r--kernel/sys.c5
-rw-r--r--kernel/sysctl.c41
-rw-r--r--kernel/time/ntp.c2
-rw-r--r--kernel/time/tick-broadcast.c17
-rw-r--r--kernel/time/tick-sched.c12
-rw-r--r--kernel/time/timekeeping.c10
-rw-r--r--kernel/time/timer_stats.c5
-rw-r--r--kernel/user.c45
-rw-r--r--kernel/user_namespace.c3
-rw-r--r--kernel/utsname.c2
-rw-r--r--kernel/workqueue.c2
-rw-r--r--lib/Kconfig.debug4
-rw-r--r--lib/Makefile4
-rw-r--r--lib/iomap.c15
-rw-r--r--mm/Kconfig1
-rw-r--r--mm/filemap.c1
-rw-r--r--mm/fremap.c2
-rw-r--r--mm/hugetlb.c6
-rw-r--r--mm/memory.c23
-rw-r--r--mm/mempolicy.c84
-rw-r--r--mm/migrate.c11
-rw-r--r--mm/page-writeback.c4
-rw-r--r--mm/page_alloc.c2
-rw-r--r--mm/slub.c46
-rw-r--r--net/8021q/vlan.c2
-rw-r--r--net/8021q/vlan_dev.c12
-rw-r--r--net/9p/conv.c1
-rw-r--r--net/9p/mux.c9
-rw-r--r--net/bluetooth/hci_core.c8
-rw-r--r--net/bluetooth/hci_sock.c28
-rw-r--r--net/bridge/br_device.c4
-rw-r--r--net/bridge/br_fdb.c5
-rw-r--r--net/bridge/br_forward.c21
-rw-r--r--net/bridge/br_if.c16
-rw-r--r--net/bridge/br_input.c51
-rw-r--r--net/bridge/br_netfilter.c14
-rw-r--r--net/bridge/br_private.h8
-rw-r--r--net/bridge/netfilter/ebtables.c1
-rw-r--r--net/core/datagram.c3
-rw-r--r--net/core/dev_mcast.c14
-rw-r--r--net/core/neighbour.c3
-rw-r--r--net/core/pktgen.c18
-rw-r--r--net/core/sock.c106
-rw-r--r--net/decnet/dn_dev.c2
-rw-r--r--net/ieee80211/ieee80211_rx.c6
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_assoc.c2
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_wx.c56
-rw-r--r--net/ipv4/ah4.c2
-rw-r--r--net/ipv4/devinet.c2
-rw-r--r--net/ipv4/inet_diag.c4
-rw-r--r--net/ipv4/ip_sockglue.c4
-rw-r--r--net/ipv4/ipvs/ip_vs_ctl.c1
-rw-r--r--net/ipv4/netfilter/arp_tables.c1
-rw-r--r--net/ipv4/netfilter/ip_tables.c1
-rw-r--r--net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c11
-rw-r--r--net/ipv4/tcp_input.c27
-rw-r--r--net/ipv4/tcp_ipv4.c19
-rw-r--r--net/ipv4/udp.c6
-rw-r--r--net/ipv6/addrconf.c2
-rw-r--r--net/ipv6/ip6_output.c5
-rw-r--r--net/ipv6/ipv6_sockglue.c4
-rw-r--r--net/ipv6/ndisc.c11
-rw-r--r--net/ipv6/netfilter/ip6_tables.c1
-rw-r--r--net/ipv6/raw.c3
-rw-r--r--net/ipv6/tcp_ipv6.c18
-rw-r--r--net/ipv6/udp.c6
-rw-r--r--net/mac80211/ieee80211.c2
-rw-r--r--net/mac80211/rc80211_simple.c2
-rw-r--r--net/mac80211/wme.c2
-rw-r--r--net/netfilter/nf_sockopt.c36
-rw-r--r--net/netfilter/nfnetlink_log.c13
-rw-r--r--net/netfilter/xt_tcpudp.c2
-rw-r--r--net/rose/rose_loopback.c4
-rw-r--r--net/rose/rose_route.c15
-rw-r--r--net/sched/act_api.c8
-rw-r--r--net/sched/act_police.c4
-rw-r--r--net/sched/cls_u32.c2
-rw-r--r--net/sched/sch_cbq.c2
-rw-r--r--net/sched/sch_prio.c2
-rw-r--r--net/sched/sch_sfq.c53
-rw-r--r--net/sctp/associola.c21
-rw-r--r--net/sctp/bind_addr.c70
-rw-r--r--net/sctp/endpointola.c27
-rw-r--r--net/sctp/input.c8
-rw-r--r--net/sctp/inqueue.c8
-rw-r--r--net/sctp/ipv6.c46
-rw-r--r--net/sctp/outqueue.c7
-rw-r--r--net/sctp/protocol.c79
-rw-r--r--net/sctp/sm_make_chunk.c176
-rw-r--r--net/sctp/sm_sideeffect.c8
-rw-r--r--net/sctp/sm_statefuns.c294
-rw-r--r--net/sctp/sm_statetable.c16
-rw-r--r--net/sctp/socket.c137
-rw-r--r--net/sctp/ulpqueue.c75
-rw-r--r--net/socket.c3
-rw-r--r--net/sunrpc/svcsock.c5
-rw-r--r--net/wireless/core.c2
-rw-r--r--net/wireless/sysfs.c2
-rw-r--r--scripts/kconfig/conf.c21
-rw-r--r--security/selinux/hooks.c5
-rw-r--r--sound/core/memalloc.c68
1054 files changed, 60736 insertions, 21076 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 8b05636334..43e89b1537 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -134,8 +134,6 @@ dvb/
134 - info on Linux Digital Video Broadcast (DVB) subsystem. 134 - info on Linux Digital Video Broadcast (DVB) subsystem.
135early-userspace/ 135early-userspace/
136 - info about initramfs, klibc, and userspace early during boot. 136 - info about initramfs, klibc, and userspace early during boot.
137ecryptfs.txt
138 - docs on eCryptfs: stacked cryptographic filesystem for Linux.
139eisa.txt 137eisa.txt
140 - info on EISA bus support. 138 - info on EISA bus support.
141exception.txt 139exception.txt
diff --git a/Documentation/DocBook/deviceiobook.tmpl b/Documentation/DocBook/deviceiobook.tmpl
index 90ed23df1f..c917de681c 100644
--- a/Documentation/DocBook/deviceiobook.tmpl
+++ b/Documentation/DocBook/deviceiobook.tmpl
@@ -316,7 +316,8 @@ CPU B: spin_unlock_irqrestore(&dev_lock, flags)
316 316
317 <chapter id="pubfunctions"> 317 <chapter id="pubfunctions">
318 <title>Public Functions Provided</title> 318 <title>Public Functions Provided</title>
319!Einclude/asm-i386/io.h 319!Iinclude/asm-i386/io.h
320!Elib/iomap.c
320 </chapter> 321 </chapter>
321 322
322</book> 323</book>
diff --git a/Documentation/HOWTO b/Documentation/HOWTO
index f8cc3f8ed1..c64e969dc3 100644
--- a/Documentation/HOWTO
+++ b/Documentation/HOWTO
@@ -208,7 +208,7 @@ tools. One such tool that is particularly recommended is the Linux
208Cross-Reference project, which is able to present source code in a 208Cross-Reference project, which is able to present source code in a
209self-referential, indexed webpage format. An excellent up-to-date 209self-referential, indexed webpage format. An excellent up-to-date
210repository of the kernel code may be found at: 210repository of the kernel code may be found at:
211 http://sosdg.org/~coywolf/lxr/ 211 http://users.sosdg.org/~qiyong/lxr/
212 212
213 213
214The development process 214The development process
@@ -384,7 +384,7 @@ One of the best ways to put into practice your hacking skills is by fixing
384bugs reported by other people. Not only you will help to make the kernel 384bugs reported by other people. Not only you will help to make the kernel
385more stable, you'll learn to fix real world problems and you will improve 385more stable, you'll learn to fix real world problems and you will improve
386your skills, and other developers will be aware of your presence. Fixing 386your skills, and other developers will be aware of your presence. Fixing
387bugs is one of the best ways to earn merit amongst the developers, because 387bugs is one of the best ways to get merits among other developers, because
388not many people like wasting time fixing other people's bugs. 388not many people like wasting time fixing other people's bugs.
389 389
390To work in the already reported bug reports, go to http://bugzilla.kernel.org. 390To work in the already reported bug reports, go to http://bugzilla.kernel.org.
diff --git a/Documentation/ManagementStyle b/Documentation/ManagementStyle
index cbbebfb51f..49a8efa5af 100644
--- a/Documentation/ManagementStyle
+++ b/Documentation/ManagementStyle
@@ -166,7 +166,7 @@ To solve this problem, you really only have two options:
166The option of being unfailingly polite really doesn't exist. Nobody will 166The option of being unfailingly polite really doesn't exist. Nobody will
167trust somebody who is so clearly hiding his true character. 167trust somebody who is so clearly hiding his true character.
168 168
169(*) Paul Simon sang "Fifty Ways to Lose Your Lover", because quite 169(*) Paul Simon sang "Fifty Ways to Leave Your Lover", because quite
170frankly, "A Million Ways to Tell a Developer He Is a D*ckhead" doesn't 170frankly, "A Million Ways to Tell a Developer He Is a D*ckhead" doesn't
171scan nearly as well. But I'm sure he thought about it. 171scan nearly as well. But I'm sure he thought about it.
172 172
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index d6b45a9b29..a30dd4480a 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -126,7 +126,7 @@ the reviewers time and will get your patch rejected, probably
126without even being read. 126without even being read.
127 127
128At a minimum you should check your patches with the patch style 128At a minimum you should check your patches with the patch style
129checker prior to submission (scripts/patchcheck.pl). You should 129checker prior to submission (scripts/checkpatch.pl). You should
130be able to justify all violations that remain in your patch. 130be able to justify all violations that remain in your patch.
131 131
132 132
@@ -560,7 +560,7 @@ NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people!
560 <http://marc.theaimsgroup.com/?l=linux-kernel&m=112112749912944&w=2> 560 <http://marc.theaimsgroup.com/?l=linux-kernel&m=112112749912944&w=2>
561 561
562Kernel Documentation/CodingStyle: 562Kernel Documentation/CodingStyle:
563 <http://sosdg.org/~coywolf/lxr/source/Documentation/CodingStyle> 563 <http://users.sosdg.org/~qiyong/lxr/source/Documentation/CodingStyle>
564 564
565Linus Torvalds's mail on the canonical patch format: 565Linus Torvalds's mail on the canonical patch format:
566 <http://lkml.org/lkml/2005/4/7/183> 566 <http://lkml.org/lkml/2005/4/7/183>
diff --git a/Documentation/crypto/async-tx-api.txt b/Documentation/crypto/async-tx-api.txt
new file mode 100644
index 0000000000..c1e9545c59
--- /dev/null
+++ b/Documentation/crypto/async-tx-api.txt
@@ -0,0 +1,219 @@
1 Asynchronous Transfers/Transforms API
2
31 INTRODUCTION
4
52 GENEALOGY
6
73 USAGE
83.1 General format of the API
93.2 Supported operations
103.3 Descriptor management
113.4 When does the operation execute?
123.5 When does the operation complete?
133.6 Constraints
143.7 Example
15
164 DRIVER DEVELOPER NOTES
174.1 Conformance points
184.2 "My application needs finer control of hardware channels"
19
205 SOURCE
21
22---
23
241 INTRODUCTION
25
26The async_tx API provides methods for describing a chain of asynchronous
27bulk memory transfers/transforms with support for inter-transactional
28dependencies. It is implemented as a dmaengine client that smooths over
29the details of different hardware offload engine implementations. Code
30that is written to the API can optimize for asynchronous operation and
31the API will fit the chain of operations to the available offload
32resources.
33
342 GENEALOGY
35
36The API was initially designed to offload the memory copy and
37xor-parity-calculations of the md-raid5 driver using the offload engines
38present in the Intel(R) Xscale series of I/O processors. It also built
39on the 'dmaengine' layer developed for offloading memory copies in the
40network stack using Intel(R) I/OAT engines. The following design
41features surfaced as a result:
421/ implicit synchronous path: users of the API do not need to know if
43 the platform they are running on has offload capabilities. The
44 operation will be offloaded when an engine is available and carried out
45 in software otherwise.
462/ cross channel dependency chains: the API allows a chain of dependent
47 operations to be submitted, like xor->copy->xor in the raid5 case. The
48 API automatically handles cases where the transition from one operation
49 to another implies a hardware channel switch.
503/ dmaengine extensions to support multiple clients and operation types
51 beyond 'memcpy'
52
533 USAGE
54
553.1 General format of the API:
56struct dma_async_tx_descriptor *
57async_<operation>(<op specific parameters>,
58 enum async_tx_flags flags,
59 struct dma_async_tx_descriptor *dependency,
60 dma_async_tx_callback callback_routine,
61 void *callback_parameter);
62
633.2 Supported operations:
64memcpy - memory copy between a source and a destination buffer
65memset - fill a destination buffer with a byte value
66xor - xor a series of source buffers and write the result to a
67 destination buffer
68xor_zero_sum - xor a series of source buffers and set a flag if the
69 result is zero. The implementation attempts to prevent
70 writes to memory
71
723.3 Descriptor management:
73The return value is non-NULL and points to a 'descriptor' when the operation
74has been queued to execute asynchronously. Descriptors are recycled
75resources, under control of the offload engine driver, to be reused as
76operations complete. When an application needs to submit a chain of
77operations it must guarantee that the descriptor is not automatically recycled
78before the dependency is submitted. This requires that all descriptors be
79acknowledged by the application before the offload engine driver is allowed to
80recycle (or free) the descriptor. A descriptor can be acked by one of the
81following methods:
821/ setting the ASYNC_TX_ACK flag if no child operations are to be submitted
832/ setting the ASYNC_TX_DEP_ACK flag to acknowledge the parent
84 descriptor of a new operation.
853/ calling async_tx_ack() on the descriptor.
86
873.4 When does the operation execute?
88Operations do not immediately issue after return from the
89async_<operation> call. Offload engine drivers batch operations to
90improve performance by reducing the number of mmio cycles needed to
91manage the channel. Once a driver-specific threshold is met the driver
92automatically issues pending operations. An application can force this
93event by calling async_tx_issue_pending_all(). This operates on all
94channels since the application has no knowledge of channel to operation
95mapping.
96
973.5 When does the operation complete?
98There are two methods for an application to learn about the completion
99of an operation.
1001/ Call dma_wait_for_async_tx(). This call causes the CPU to spin while
101 it polls for the completion of the operation. It handles dependency
102 chains and issuing pending operations.
1032/ Specify a completion callback. The callback routine runs in tasklet
104 context if the offload engine driver supports interrupts, or it is
105 called in application context if the operation is carried out
106 synchronously in software. The callback can be set in the call to
107 async_<operation>, or when the application needs to submit a chain of
108 unknown length it can use the async_trigger_callback() routine to set a
109 completion interrupt/callback at the end of the chain.
110
1113.6 Constraints:
1121/ Calls to async_<operation> are not permitted in IRQ context. Other
113 contexts are permitted provided constraint #2 is not violated.
1142/ Completion callback routines cannot submit new operations. This
115 results in recursion in the synchronous case and spin_locks being
116 acquired twice in the asynchronous case.
117
1183.7 Example:
119Perform a xor->copy->xor operation where each operation depends on the
120result from the previous operation:
121
122void complete_xor_copy_xor(void *param)
123{
124 printk("complete\n");
125}
126
127int run_xor_copy_xor(struct page **xor_srcs,
128 int xor_src_cnt,
129 struct page *xor_dest,
130 size_t xor_len,
131 struct page *copy_src,
132 struct page *copy_dest,
133 size_t copy_len)
134{
135 struct dma_async_tx_descriptor *tx;
136
137 tx = async_xor(xor_dest, xor_srcs, 0, xor_src_cnt, xor_len,
138 ASYNC_TX_XOR_DROP_DST, NULL, NULL, NULL);
139 tx = async_memcpy(copy_dest, copy_src, 0, 0, copy_len,
140 ASYNC_TX_DEP_ACK, tx, NULL, NULL);
141 tx = async_xor(xor_dest, xor_srcs, 0, xor_src_cnt, xor_len,
142 ASYNC_TX_XOR_DROP_DST | ASYNC_TX_DEP_ACK | ASYNC_TX_ACK,
143 tx, complete_xor_copy_xor, NULL);
144
145 async_tx_issue_pending_all();
146}
147
148See include/linux/async_tx.h for more information on the flags. See the
149ops_run_* and ops_complete_* routines in drivers/md/raid5.c for more
150implementation examples.
151
1524 DRIVER DEVELOPMENT NOTES
1534.1 Conformance points:
154There are a few conformance points required in dmaengine drivers to
155accommodate assumptions made by applications using the async_tx API:
1561/ Completion callbacks are expected to happen in tasklet context
1572/ dma_async_tx_descriptor fields are never manipulated in IRQ context
1583/ Use async_tx_run_dependencies() in the descriptor clean up path to
159 handle submission of dependent operations
160
1614.2 "My application needs finer control of hardware channels"
162This requirement seems to arise from cases where a DMA engine driver is
163trying to support device-to-memory DMA. The dmaengine and async_tx
164implementations were designed for offloading memory-to-memory
165operations; however, there are some capabilities of the dmaengine layer
166that can be used for platform-specific channel management.
167Platform-specific constraints can be handled by registering the
168application as a 'dma_client' and implementing a 'dma_event_callback' to
169apply a filter to the available channels in the system. Before showing
170how to implement a custom dma_event callback some background of
171dmaengine's client support is required.
172
173The following routines in dmaengine support multiple clients requesting
174use of a channel:
175- dma_async_client_register(struct dma_client *client)
176- dma_async_client_chan_request(struct dma_client *client)
177
178dma_async_client_register takes a pointer to an initialized dma_client
179structure. It expects that the 'event_callback' and 'cap_mask' fields
180are already initialized.
181
182dma_async_client_chan_request triggers dmaengine to notify the client of
183all channels that satisfy the capability mask. It is up to the client's
184event_callback routine to track how many channels the client needs and
185how many it is currently using. The dma_event_callback routine returns a
186dma_state_client code to let dmaengine know the status of the
187allocation.
188
189Below is the example of how to extend this functionality for
190platform-specific filtering of the available channels beyond the
191standard capability mask:
192
193static enum dma_state_client
194my_dma_client_callback(struct dma_client *client,
195 struct dma_chan *chan, enum dma_state state)
196{
197 struct dma_device *dma_dev;
198 struct my_platform_specific_dma *plat_dma_dev;
199
200 dma_dev = chan->device;
201 plat_dma_dev = container_of(dma_dev,
202 struct my_platform_specific_dma,
203 dma_dev);
204
205 if (!plat_dma_dev->platform_specific_capability)
206 return DMA_DUP;
207
208 . . .
209}
210
2115 SOURCE
212include/linux/dmaengine.h: core header file for DMA drivers and clients
213drivers/dma/dmaengine.c: offload engine channel management routines
214drivers/dma/: location for offload engine drivers
215include/linux/async_tx.h: core header file for the async_tx api
216crypto/async_tx/async_tx.c: async_tx interface to dmaengine and common code
217crypto/async_tx/async_memcpy.c: copy offload
218crypto/async_tx/async_memset.c: memory fill offload
219crypto/async_tx/async_xor.c: xor and xor zero sum offload
diff --git a/Documentation/devices.txt b/Documentation/devices.txt
index 8de132a02b..6c46730c63 100644
--- a/Documentation/devices.txt
+++ b/Documentation/devices.txt
@@ -94,6 +94,8 @@ Your cooperation is appreciated.
94 9 = /dev/urandom Faster, less secure random number gen. 94 9 = /dev/urandom Faster, less secure random number gen.
95 10 = /dev/aio Asynchronous I/O notification interface 95 10 = /dev/aio Asynchronous I/O notification interface
96 11 = /dev/kmsg Writes to this come out as printk's 96 11 = /dev/kmsg Writes to this come out as printk's
97 12 = /dev/oldmem Used by crashdump kernels to access
98 the memory of the kernel that crashed.
97 99
98 1 block RAM disk 100 1 block RAM disk
99 0 = /dev/ram0 First RAM disk 101 0 = /dev/ram0 First RAM disk
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index a43d2878a4..00928d2ecf 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -197,6 +197,14 @@ Who: Len Brown <len.brown@intel.com>
197 197
198--------------------------- 198---------------------------
199 199
200What: /proc/acpi/event
201When: February 2008
202Why: /proc/acpi/event has been replaced by events via the input layer
203 and netlink since 2.6.23.
204Who: Len Brown <len.brown@intel.com>
205
206---------------------------
207
200What: Compaq touchscreen device emulation 208What: Compaq touchscreen device emulation
201When: Oct 2007 209When: Oct 2007
202Files: drivers/input/tsdev.c 210Files: drivers/input/tsdev.c
@@ -290,3 +298,11 @@ Why: All mthca hardware also supports MSI-X, which provides
290Who: Roland Dreier <rolandd@cisco.com> 298Who: Roland Dreier <rolandd@cisco.com>
291 299
292--------------------------- 300---------------------------
301
302What: sk98lin network driver
303When: Feburary 2008
304Why: In kernel tree version of driver is unmaintained. Sk98lin driver
305 replaced by the skge driver.
306Who: Stephen Hemminger <shemminger@linux-foundation.org>
307
308---------------------------
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX
index 571785887a..59db1bca70 100644
--- a/Documentation/filesystems/00-INDEX
+++ b/Documentation/filesystems/00-INDEX
@@ -32,6 +32,8 @@ directory-locking
32 - info about the locking scheme used for directory operations. 32 - info about the locking scheme used for directory operations.
33dlmfs.txt 33dlmfs.txt
34 - info on the userspace interface to the OCFS2 DLM. 34 - info on the userspace interface to the OCFS2 DLM.
35ecryptfs.txt
36 - docs on eCryptfs: stacked cryptographic filesystem for Linux.
35ext2.txt 37ext2.txt
36 - info, mount options and specifications for the Ext2 filesystem. 38 - info, mount options and specifications for the Ext2 filesystem.
37ext3.txt 39ext3.txt
diff --git a/Documentation/filesystems/9p.txt b/Documentation/filesystems/9p.txt
index bbd8b28c13..cda6905cbe 100644
--- a/Documentation/filesystems/9p.txt
+++ b/Documentation/filesystems/9p.txt
@@ -6,12 +6,26 @@ ABOUT
6 6
7v9fs is a Unix implementation of the Plan 9 9p remote filesystem protocol. 7v9fs is a Unix implementation of the Plan 9 9p remote filesystem protocol.
8 8
9This software was originally developed by Ron Minnich <rminnich@lanl.gov> 9This software was originally developed by Ron Minnich <rminnich@sandia.gov>
10and Maya Gokhale <maya@lanl.gov>. Additional development by Greg Watson 10and Maya Gokhale. Additional development by Greg Watson
11<gwatson@lanl.gov> and most recently Eric Van Hensbergen 11<gwatson@lanl.gov> and most recently Eric Van Hensbergen
12<ericvh@gmail.com>, Latchesar Ionkov <lucho@ionkov.net> and Russ Cox 12<ericvh@gmail.com>, Latchesar Ionkov <lucho@ionkov.net> and Russ Cox
13<rsc@swtch.com>. 13<rsc@swtch.com>.
14 14
15The best detailed explanation of the Linux implementation and applications of
16the 9p client is available in the form of a USENIX paper:
17 http://www.usenix.org/events/usenix05/tech/freenix/hensbergen.html
18
19Other applications are described in the following papers:
20 * XCPU & Clustering
21 http://www.xcpu.org/xcpu-talk.pdf
22 * KVMFS: control file system for KVM
23 http://www.xcpu.org/kvmfs.pdf
24 * CellFS: A New ProgrammingModel for the Cell BE
25 http://www.xcpu.org/cellfs-talk.pdf
26 * PROSE I/O: Using 9p to enable Application Partitions
27 http://plan9.escet.urjc.es/iwp9/cready/PROSE_iwp9_2006.pdf
28
15USAGE 29USAGE
16===== 30=====
17 31
@@ -90,9 +104,9 @@ subset of the namespace by extending the path: '#U*'/tmp would just export
90and export. 104and export.
91 105
92A Linux version of the 9p server is now maintained under the npfs project 106A Linux version of the 9p server is now maintained under the npfs project
93on sourceforge (http://sourceforge.net/projects/npfs). There is also a 107on sourceforge (http://sourceforge.net/projects/npfs). The currently
94more stable single-threaded version of the server (named spfs) available from 108maintained version is the single-threaded version of the server (named spfs)
95the same CVS repository. 109available from the same CVS repository.
96 110
97There are user and developer mailing lists available through the v9fs project 111There are user and developer mailing lists available through the v9fs project
98on sourceforge (http://sourceforge.net/projects/v9fs). 112on sourceforge (http://sourceforge.net/projects/v9fs).
diff --git a/Documentation/filesystems/ocfs2.txt b/Documentation/filesystems/ocfs2.txt
index 8ccf0c1b58..ed55238023 100644
--- a/Documentation/filesystems/ocfs2.txt
+++ b/Documentation/filesystems/ocfs2.txt
@@ -28,11 +28,7 @@ Manish Singh <manish.singh@oracle.com>
28Caveats 28Caveats
29======= 29=======
30Features which OCFS2 does not support yet: 30Features which OCFS2 does not support yet:
31 - sparse files
32 - extended attributes 31 - extended attributes
33 - shared writable mmap
34 - loopback is supported, but data written will not
35 be cluster coherent.
36 - quotas 32 - quotas
37 - cluster aware flock 33 - cluster aware flock
38 - cluster aware lockf 34 - cluster aware lockf
@@ -57,3 +53,12 @@ nointr Do not allow signals to interrupt cluster
57atime_quantum=60(*) OCFS2 will not update atime unless this number 53atime_quantum=60(*) OCFS2 will not update atime unless this number
58 of seconds has passed since the last update. 54 of seconds has passed since the last update.
59 Set to zero to always update atime. 55 Set to zero to always update atime.
56data=ordered (*) All data are forced directly out to the main file
57 system prior to its metadata being committed to the
58 journal.
59data=writeback Data ordering is not preserved, data may be written
60 into the main file system after its metadata has been
61 committed to the journal.
62preferred_slot=0(*) During mount, try to use this filesystem slot first. If
63 it is in use by another node, the first empty one found
64 will be chosen. Invalid values will be ignored.
diff --git a/Documentation/i2c/busses/i2c-piix4 b/Documentation/i2c/busses/i2c-piix4
index fa0c786a8b..cf6b6cb02a 100644
--- a/Documentation/i2c/busses/i2c-piix4
+++ b/Documentation/i2c/busses/i2c-piix4
@@ -6,7 +6,7 @@ Supported adapters:
6 Datasheet: Publicly available at the Intel website 6 Datasheet: Publicly available at the Intel website
7 * ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges 7 * ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges
8 Datasheet: Only available via NDA from ServerWorks 8 Datasheet: Only available via NDA from ServerWorks
9 * ATI IXP200, IXP300, IXP400, SB600 and SB700 southbridges 9 * ATI IXP200, IXP300, IXP400, SB600, SB700 and SB800 southbridges
10 Datasheet: Not publicly available 10 Datasheet: Not publicly available
11 * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge 11 * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge
12 Datasheet: Publicly available at the SMSC website http://www.smsc.com 12 Datasheet: Publicly available at the SMSC website http://www.smsc.com
diff --git a/Documentation/input/iforce-protocol.txt b/Documentation/input/iforce-protocol.txt
index 95df4ca70e..8777d2d321 100644
--- a/Documentation/input/iforce-protocol.txt
+++ b/Documentation/input/iforce-protocol.txt
@@ -1,254 +1,254 @@
1** Introduction 1** Introduction
2This document describes what I managed to discover about the protocol used to 2This document describes what I managed to discover about the protocol used to
3specify force effects to I-Force 2.0 devices. None of this information comes 3specify force effects to I-Force 2.0 devices. None of this information comes
4from Immerse. That's why you should not trust what is written in this 4from Immerse. That's why you should not trust what is written in this
5document. This document is intended to help understanding the protocol. 5document. This document is intended to help understanding the protocol.
6This is not a reference. Comments and corrections are welcome. To contact me, 6This is not a reference. Comments and corrections are welcome. To contact me,
7send an email to: deneux@ifrance.com 7send an email to: deneux@ifrance.com
8 8
9** WARNING ** 9** WARNING **
10I may not be held responsible for any dammage or harm caused if you try to 10I may not be held responsible for any dammage or harm caused if you try to
11send data to your I-Force device based on what you read in this document. 11send data to your I-Force device based on what you read in this document.
12 12
13** Preliminary Notes: 13** Preliminary Notes:
14All values are hexadecimal with big-endian encoding (msb on the left). Beware, 14All values are hexadecimal with big-endian encoding (msb on the left). Beware,
15values inside packets are encoded using little-endian. Bytes whose roles are 15values inside packets are encoded using little-endian. Bytes whose roles are
16unknown are marked ??? Information that needs deeper inspection is marked (?) 16unknown are marked ??? Information that needs deeper inspection is marked (?)
17 17
18** General form of a packet ** 18** General form of a packet **
19This is how packets look when the device uses the rs232 to communicate. 19This is how packets look when the device uses the rs232 to communicate.
202B OP LEN DATA CS 202B OP LEN DATA CS
21CS is the checksum. It is equal to the exclusive or of all bytes. 21CS is the checksum. It is equal to the exclusive or of all bytes.
22 22
23When using USB: 23When using USB:
24OP DATA 24OP DATA
25The 2B, LEN and CS fields have disappeared, probably because USB handles frames and 25The 2B, LEN and CS fields have disappeared, probably because USB handles frames and
26data corruption is handled or unsignificant. 26data corruption is handled or unsignificant.
27 27
28First, I describe effects that are sent by the device to the computer 28First, I describe effects that are sent by the device to the computer
29 29
30** Device input state 30** Device input state
31This packet is used to indicate the state of each button and the value of each 31This packet is used to indicate the state of each button and the value of each
32axis 32axis
33OP= 01 for a joystick, 03 for a wheel 33OP= 01 for a joystick, 03 for a wheel
34LEN= Varies from device to device 34LEN= Varies from device to device
3500 X-Axis lsb 3500 X-Axis lsb
3601 X-Axis msb 3601 X-Axis msb
3702 Y-Axis lsb, or gas pedal for a wheel 3702 Y-Axis lsb, or gas pedal for a wheel
3803 Y-Axis msb, or brake pedal for a wheel 3803 Y-Axis msb, or brake pedal for a wheel
3904 Throttle 3904 Throttle
4005 Buttons 4005 Buttons
4106 Lower 4 bits: Buttons 4106 Lower 4 bits: Buttons
42 Upper 4 bits: Hat 42 Upper 4 bits: Hat
4307 Rudder 4307 Rudder
44 44
45** Device effects states 45** Device effects states
46OP= 02 46OP= 02
47LEN= Varies 47LEN= Varies
4800 ? Bit 1 (Value 2) is the value of the deadman switch 4800 ? Bit 1 (Value 2) is the value of the deadman switch
4901 Bit 8 is set if the effect is playing. Bits 0 to 7 are the effect id. 4901 Bit 8 is set if the effect is playing. Bits 0 to 7 are the effect id.
5002 ?? 5002 ??
5103 Address of parameter block changed (lsb) 5103 Address of parameter block changed (lsb)
5204 Address of parameter block changed (msb) 5204 Address of parameter block changed (msb)
5305 Address of second parameter block changed (lsb) 5305 Address of second parameter block changed (lsb)
54... depending on the number of parameter blocks updated 54... depending on the number of parameter blocks updated
55 55
56** Force effect ** 56** Force effect **
57OP= 01 57OP= 01
58LEN= 0e 58LEN= 0e
5900 Channel (when playing several effects at the same time, each must be assigned a channel) 5900 Channel (when playing several effects at the same time, each must be assigned a channel)
6001 Wave form 6001 Wave form
61 Val 00 Constant 61 Val 00 Constant
62 Val 20 Square 62 Val 20 Square
63 Val 21 Triangle 63 Val 21 Triangle
64 Val 22 Sine 64 Val 22 Sine
65 Val 23 Sawtooth up 65 Val 23 Sawtooth up
66 Val 24 Sawtooth down 66 Val 24 Sawtooth down
67 Val 40 Spring (Force = f(pos)) 67 Val 40 Spring (Force = f(pos))
68 Val 41 Friction (Force = f(velocity)) and Inertia (Force = f(acceleration)) 68 Val 41 Friction (Force = f(velocity)) and Inertia (Force = f(acceleration))
69 69
70 70
7102 Axes affected and trigger 7102 Axes affected and trigger
72 Bits 4-7: Val 2 = effect along one axis. Byte 05 indicates direction 72 Bits 4-7: Val 2 = effect along one axis. Byte 05 indicates direction
73 Val 4 = X axis only. Byte 05 must contain 5a 73 Val 4 = X axis only. Byte 05 must contain 5a
74 Val 8 = Y axis only. Byte 05 must contain b4 74 Val 8 = Y axis only. Byte 05 must contain b4
75 Val c = X and Y axes. Bytes 05 must contain 60 75 Val c = X and Y axes. Bytes 05 must contain 60
76 Bits 0-3: Val 0 = No trigger 76 Bits 0-3: Val 0 = No trigger
77 Val x+1 = Button x triggers the effect 77 Val x+1 = Button x triggers the effect
78 When the whole byte is 0, cancel the previously set trigger 78 When the whole byte is 0, cancel the previously set trigger
79 79
8003-04 Duration of effect (little endian encoding, in ms) 8003-04 Duration of effect (little endian encoding, in ms)
81 81
8205 Direction of effect, if applicable. Else, see 02 for value to assign. 8205 Direction of effect, if applicable. Else, see 02 for value to assign.
83 83
8406-07 Minimum time between triggering. 8406-07 Minimum time between triggering.
85 85
8608-09 Address of periodicity or magnitude parameters 8608-09 Address of periodicity or magnitude parameters
870a-0b Address of attack and fade parameters, or ffff if none. 870a-0b Address of attack and fade parameters, or ffff if none.
88*or* 88*or*
8908-09 Address of interactive parameters for X-axis, or ffff if not applicable 8908-09 Address of interactive parameters for X-axis, or ffff if not applicable
900a-0b Address of interactive parameters for Y-axis, or ffff if not applicable 900a-0b Address of interactive parameters for Y-axis, or ffff if not applicable
91 91
920c-0d Delay before execution of effect (little endian encoding, in ms) 920c-0d Delay before execution of effect (little endian encoding, in ms)
93 93
94 94
95** Time based parameters ** 95** Time based parameters **
96 96
97*** Attack and fade *** 97*** Attack and fade ***
98OP= 02 98OP= 02
99LEN= 08 99LEN= 08
10000-01 Address where to store the parameteres 10000-01 Address where to store the parameteres
10102-03 Duration of attack (little endian encoding, in ms) 10102-03 Duration of attack (little endian encoding, in ms)
10204 Level at end of attack. Signed byte. 10204 Level at end of attack. Signed byte.
10305-06 Duration of fade. 10305-06 Duration of fade.
10407 Level at end of fade. 10407 Level at end of fade.
105 105
106*** Magnitude *** 106*** Magnitude ***
107OP= 03 107OP= 03
108LEN= 03 108LEN= 03
10900-01 Address 10900-01 Address
11002 Level. Signed byte. 11002 Level. Signed byte.
111 111
112*** Periodicity *** 112*** Periodicity ***
113OP= 04 113OP= 04
114LEN= 07 114LEN= 07
11500-01 Address 11500-01 Address
11602 Magnitude. Signed byte. 11602 Magnitude. Signed byte.
11703 Offset. Signed byte. 11703 Offset. Signed byte.
11804 Phase. Val 00 = 0 deg, Val 40 = 90 degs. 11804 Phase. Val 00 = 0 deg, Val 40 = 90 degs.
11905-06 Period (little endian encoding, in ms) 11905-06 Period (little endian encoding, in ms)
120 120
121** Interactive parameters ** 121** Interactive parameters **
122OP= 05 122OP= 05
123LEN= 0a 123LEN= 0a
12400-01 Address 12400-01 Address
12502 Positive Coeff 12502 Positive Coeff
12603 Negative Coeff 12603 Negative Coeff
12704+05 Offset (center) 12704+05 Offset (center)
12806+07 Dead band (Val 01F4 = 5000 (decimal)) 12806+07 Dead band (Val 01F4 = 5000 (decimal))
12908 Positive saturation (Val 0a = 1000 (decimal) Val 64 = 10000 (decimal)) 12908 Positive saturation (Val 0a = 1000 (decimal) Val 64 = 10000 (decimal))
13009 Negative saturation 13009 Negative saturation
131 131
132The encoding is a bit funny here: For coeffs, these are signed values. The 132The encoding is a bit funny here: For coeffs, these are signed values. The
133maximum value is 64 (100 decimal), the min is 9c. 133maximum value is 64 (100 decimal), the min is 9c.
134For the offset, the minimum value is FE0C, the maximum value is 01F4. 134For the offset, the minimum value is FE0C, the maximum value is 01F4.
135For the deadband, the minimum value is 0, the max is 03E8. 135For the deadband, the minimum value is 0, the max is 03E8.
136 136
137** Controls ** 137** Controls **
138OP= 41 138OP= 41
139LEN= 03 139LEN= 03
14000 Channel 14000 Channel
14101 Start/Stop 14101 Start/Stop
142 Val 00: Stop 142 Val 00: Stop
143 Val 01: Start and play once. 143 Val 01: Start and play once.
144 Val 41: Start and play n times (See byte 02 below) 144 Val 41: Start and play n times (See byte 02 below)
14502 Number of iterations n. 14502 Number of iterations n.
146 146
147** Init ** 147** Init **
148 148
149*** Querying features *** 149*** Querying features ***
150OP= ff 150OP= ff
151Query command. Length varies according to the query type. 151Query command. Length varies according to the query type.
152The general format of this packet is: 152The general format of this packet is:
153ff 01 QUERY [INDEX] CHECKSUM 153ff 01 QUERY [INDEX] CHECKSUM
154reponses are of the same form: 154reponses are of the same form:
155FF LEN QUERY VALUE_QUERIED CHECKSUM2 155FF LEN QUERY VALUE_QUERIED CHECKSUM2
156where LEN = 1 + length(VALUE_QUERIED) 156where LEN = 1 + length(VALUE_QUERIED)
157 157
158**** Query ram size **** 158**** Query ram size ****
159QUERY = 42 ('B'uffer size) 159QUERY = 42 ('B'uffer size)
160The device should reply with the same packet plus two additionnal bytes 160The device should reply with the same packet plus two additionnal bytes
161containing the size of the memory: 161containing the size of the memory:
162ff 03 42 03 e8 CS would mean that the device has 1000 bytes of ram available. 162ff 03 42 03 e8 CS would mean that the device has 1000 bytes of ram available.
163 163
164**** Query number of effects **** 164**** Query number of effects ****
165QUERY = 4e ('N'umber of effects) 165QUERY = 4e ('N'umber of effects)
166The device should respond by sending the number of effects that can be played 166The device should respond by sending the number of effects that can be played
167at the same time (one byte) 167at the same time (one byte)
168ff 02 4e 14 CS would stand for 20 effects. 168ff 02 4e 14 CS would stand for 20 effects.
169 169
170**** Vendor's id **** 170**** Vendor's id ****
171QUERY = 4d ('M'anufacturer) 171QUERY = 4d ('M'anufacturer)
172Query the vendors'id (2 bytes) 172Query the vendors'id (2 bytes)
173 173
174**** Product id ***** 174**** Product id *****
175QUERY = 50 ('P'roduct) 175QUERY = 50 ('P'roduct)
176Query the product id (2 bytes) 176Query the product id (2 bytes)
177 177
178**** Open device **** 178**** Open device ****
179QUERY = 4f ('O'pen) 179QUERY = 4f ('O'pen)
180No data returned. 180No data returned.
181 181
182**** Close device ***** 182**** Close device *****
183QUERY = 43 ('C')lose 183QUERY = 43 ('C')lose
184No data returned. 184No data returned.
185 185
186**** Query effect **** 186**** Query effect ****
187QUERY = 45 ('E') 187QUERY = 45 ('E')
188Send effect type. 188Send effect type.
189Returns nonzero if supported (2 bytes) 189Returns nonzero if supported (2 bytes)
190 190
191**** Firmware Version **** 191**** Firmware Version ****
192QUERY = 56 ('V'ersion) 192QUERY = 56 ('V'ersion)
193Sends back 3 bytes - major, minor, subminor 193Sends back 3 bytes - major, minor, subminor
194 194
195*** Initialisation of the device *** 195*** Initialisation of the device ***
196 196
197**** Set Control **** 197**** Set Control ****
198!!! Device dependent, can be different on different models !!! 198!!! Device dependent, can be different on different models !!!
199OP= 40 <idx> <val> [<val>] 199OP= 40 <idx> <val> [<val>]
200LEN= 2 or 3 200LEN= 2 or 3
20100 Idx 20100 Idx
202 Idx 00 Set dead zone (0..2048) 202 Idx 00 Set dead zone (0..2048)
203 Idx 01 Ignore Deadman sensor (0..1) 203 Idx 01 Ignore Deadman sensor (0..1)
204 Idx 02 Enable comm watchdog (0..1) 204 Idx 02 Enable comm watchdog (0..1)
205 Idx 03 Set the strength of the spring (0..100) 205 Idx 03 Set the strength of the spring (0..100)
206 Idx 04 Enable or disable the spring (0/1) 206 Idx 04 Enable or disable the spring (0/1)
207 Idx 05 Set axis saturation threshold (0..2048) 207 Idx 05 Set axis saturation threshold (0..2048)
208 208
209**** Set Effect State **** 209**** Set Effect State ****
210OP= 42 <val> 210OP= 42 <val>
211LEN= 1 211LEN= 1
21200 State 21200 State
213 Bit 3 Pause force feedback 213 Bit 3 Pause force feedback
214 Bit 2 Enable force feedback 214 Bit 2 Enable force feedback
215 Bit 0 Stop all effects 215 Bit 0 Stop all effects
216 216
217**** Set overall gain **** 217**** Set overall gain ****
218OP= 43 <val> 218OP= 43 <val>
219LEN= 1 219LEN= 1
22000 Gain 22000 Gain
221 Val 00 = 0% 221 Val 00 = 0%
222 Val 40 = 50% 222 Val 40 = 50%
223 Val 80 = 100% 223 Val 80 = 100%
224 224
225** Parameter memory ** 225** Parameter memory **
226 226
227Each device has a certain amount of memory to store parameters of effects. 227Each device has a certain amount of memory to store parameters of effects.
228The amount of RAM may vary, I encountered values from 200 to 1000 bytes. Below 228The amount of RAM may vary, I encountered values from 200 to 1000 bytes. Below
229is the amount of memory apparently needed for every set of parameters: 229is the amount of memory apparently needed for every set of parameters:
230 - period : 0c 230 - period : 0c
231 - magnitude : 02 231 - magnitude : 02
232 - attack and fade : 0e 232 - attack and fade : 0e
233 - interactive : 08 233 - interactive : 08
234 234
235** Appendix: How to study the protocol ? ** 235** Appendix: How to study the protocol ? **
236 236
2371. Generate effects using the force editor provided with the DirectX SDK, or use Immersion Studio (freely available at their web site in the developer section: www.immersion.com) 2371. Generate effects using the force editor provided with the DirectX SDK, or use Immersion Studio (freely available at their web site in the developer section: www.immersion.com)
2382. Start a soft spying RS232 or USB (depending on where you connected your joystick/wheel). I used ComPortSpy from fCoder (alpha version!) 2382. Start a soft spying RS232 or USB (depending on where you connected your joystick/wheel). I used ComPortSpy from fCoder (alpha version!)
2393. Play the effect, and watch what happens on the spy screen. 2393. Play the effect, and watch what happens on the spy screen.
240 240
241A few words about ComPortSpy: 241A few words about ComPortSpy:
242At first glance, this soft seems, hum, well... buggy. In fact, data appear with a few seconds latency. Personnaly, I restart it every time I play an effect. 242At first glance, this soft seems, hum, well... buggy. In fact, data appear with a few seconds latency. Personnaly, I restart it every time I play an effect.
243Remember it's free (as in free beer) and alpha! 243Remember it's free (as in free beer) and alpha!
244 244
245** URLS ** 245** URLS **
246Check www.immerse.com for Immersion Studio, and www.fcoder.com for ComPortSpy. 246Check www.immerse.com for Immersion Studio, and www.fcoder.com for ComPortSpy.
247 247
248** Author of this document ** 248** Author of this document **
249Johann Deneux <deneux@ifrance.com> 249Johann Deneux <deneux@ifrance.com>
250Home page at http://www.esil.univ-mrs.fr/~jdeneux/projects/ff/ 250Home page at http://www.esil.univ-mrs.fr/~jdeneux/projects/ff/
251 251
252Additions by Vojtech Pavlik. 252Additions by Vojtech Pavlik.
253 253
254I-Force is trademark of Immersion Corp. 254I-Force is trademark of Immersion Corp.
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 975f029be2..4d175c7512 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -468,9 +468,6 @@ and is between 256 and 4096 characters. It is defined in the file
468 Format: 468 Format:
469 <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>] 469 <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>]
470 470
471 cpia_pp= [HW,PPT]
472 Format: { parport<nr> | auto | none }
473
474 crashkernel=nn[KMG]@ss[KMG] 471 crashkernel=nn[KMG]@ss[KMG]
475 [KNL] Reserve a chunk of physical memory to 472 [KNL] Reserve a chunk of physical memory to
476 hold a kernel to switch to with kexec on panic. 473 hold a kernel to switch to with kexec on panic.
@@ -952,14 +949,10 @@ and is between 256 and 4096 characters. It is defined in the file
952 Format: <1-256> 949 Format: <1-256>
953 950
954 maxcpus= [SMP] Maximum number of processors that an SMP kernel 951 maxcpus= [SMP] Maximum number of processors that an SMP kernel
955 should make use of. 952 should make use of. maxcpus=n : n >= 0 limits the
956 Using "nosmp" or "maxcpus=0" will disable SMP 953 kernel to using 'n' processors. n=0 is a special case,
957 entirely (the MPS table probe still happens, though). 954 it is equivalent to "nosmp", which also disables
958 A command-line option of "maxcpus=<NUM>", where <NUM> 955 the IO APIC.
959 is an integer greater than 0, limits the maximum number
960 of CPUs activated in SMP mode to <NUM>.
961 Using "maxcpus=1" on an SMP kernel is the trivial
962 case of an SMP kernel with only one CPU.
963 956
964 max_addr=[KMG] [KNL,BOOT,ia64] All physical memory greater than or 957 max_addr=[KMG] [KNL,BOOT,ia64] All physical memory greater than or
965 equal to this physical address is ignored. 958 equal to this physical address is ignored.
@@ -1184,7 +1177,8 @@ and is between 256 and 4096 characters. It is defined in the file
1184 1177
1185 nosep [BUGS=X86-32] Disables x86 SYSENTER/SYSEXIT support. 1178 nosep [BUGS=X86-32] Disables x86 SYSENTER/SYSEXIT support.
1186 1179
1187 nosmp [SMP] Tells an SMP kernel to act as a UP kernel. 1180 nosmp [SMP] Tells an SMP kernel to act as a UP kernel,
1181 and disable the IO APIC. legacy for "maxcpus=0".
1188 1182
1189 nosoftlockup [KNL] Disable the soft-lockup detector. 1183 nosoftlockup [KNL] Disable the soft-lockup detector.
1190 1184
@@ -1826,6 +1820,10 @@ and is between 256 and 4096 characters. It is defined in the file
1826 -1: disable all active trip points in all thermal zones 1820 -1: disable all active trip points in all thermal zones
1827 <degrees C>: override all lowest active trip points 1821 <degrees C>: override all lowest active trip points
1828 1822
1823 thermal.crt= [HW,ACPI]
1824 -1: disable all critical trip points in all thermal zones
1825 <degrees C>: lower all critical trip points
1826
1829 thermal.nocrt= [HW,ACPI] 1827 thermal.nocrt= [HW,ACPI]
1830 Set to disable actions on ACPI thermal zone 1828 Set to disable actions on ACPI thermal zone
1831 critical and hot trip points. 1829 critical and hot trip points.
diff --git a/Documentation/ko_KR/HOWTO b/Documentation/ko_KR/HOWTO
new file mode 100644
index 0000000000..b51d7ca842
--- /dev/null
+++ b/Documentation/ko_KR/HOWTO
@@ -0,0 +1,623 @@
1NOTE:
2This is a version of Documentation/HOWTO translated into korean
3This document is maintained by minchan Kim < minchan.kim@gmail.com>
4If you find any difference between this document and the original file or
5a problem with the translation, please contact the maintainer of this file.
6
7Please also note that the purpose of this file is to be easier to
8read for non English (read: korean) speakers and is not intended as
9a fork. So if you have any comments or updates for this file please
10try to update the original English file first.
11
12==================================
13이 문서는
14Documentation/HOWTO
15의 한글 번역입니다.
16
17역자: 김민찬 <minchan.kim@gmail.com >
18감수: 이제이미 <jamee.lee@samsung.com>
19==================================
20
21어떻게 리눅스 커널 개발을 하는가
22---------------------------------
23
24이 문서는 커널 개발에 있어 가장 중요한 문서이다. 이 문서는
25리눅스 커널 개발자가 되는 법과 리눅스 커널 개발 커뮤니티와 일하는
26법을 담고있다. 커널 프로그래밍의기술적인 측면과 관련된 내용들은
27포함하지 않으려고 하였지만 올바으로 여러분을 안내하는 데 도움이
28될 것이다.
29
30이 문서에서 오래된 것을 발견하면 문서의 아래쪽에 나열된 메인트너에게
31패치를 보내달라.
32
33
34소개
35----
36
37자, 여러분은 리눅스 커널 개발자가 되는 법을 배우고 싶은가? 아니면
38상사로부터"이 장치를 위한 리눅스 드라이버를 작성하시오"라는 말을
39들었는가? 이 문서는 여러분이 겪게 될 과정과 커뮤니티와 일하는 법을
40조언하여 여러분의 목적을 달성하기 위해 필요한 것 모두를 알려주는
41것이다.
42
43커널은 대부분은 C로 작성되었어고 몇몇 아키텍쳐의 의존적인 부분은
44어셈블리로 작성되었다. 커널 개발을 위해 C를 잘 이해하고 있어야 한다.
45여러분이 특정 아키텍쳐의 low-level 개발을 할 것이 아니라면
46어셈블리(특정 아키텍쳐)는 잘 알아야 할 필요는 없다.
47다음의 참고서적들은 기본에 충실한 C 교육이나 수년간의 경험에 견주지는
48못하지만 적어도 참고 용도로는 좋을 것이다
49 - "The C Programming Language" by Kernighan and Ritchie [Prentice Hall]
50 - "Practical C Programming" by Steve Oualline [O'Reilly]
51 - "C: A Reference Manual" by Harbison and Steele [Prentice Hall]
52
53커널은 GNU C와 GNU 툴체인을 사용하여 작성되었다. 이 툴들은 ISO C89 표준을
54따르는 반면 표준에 있지 않은 많은 확장기능도 가지고 있다. 커널은 표준 C
55라이브러리와는 관계없이 freestanding C 환경이어서 C 표준의 일부는
56지원되지 않는다. 임의의 long long 나누기나 floating point는 지원되지 않는다.
57때론 이런 이유로 커널이 그런 확장 기능을 가진 툴체인을 가지고 만들어졌다는
58것이 이해하기 어려울 수도 있고 게다가 불행하게도 그런 것을 정확하게 설명하는
59어떤 참고문서도 있지 않다. 정보를 얻기 위해서는 gcc info (`info gcc`)페이지를
60살펴보라.
61
62여러분은 기존의 개발 커뮤니티와 일하는 법을 배우려고 하고 있다는 것을
63기억하라. 코딩, 스타일, 절차에 관한 훌륭한 표준을 가진 사람들이 모인
64다양한 그룹이 있다. 이 표준들은 오랜동안 크고 지역적으로 분산된 팀들에
65의해 가장 좋은 방법으로 일하기위하여 찾은 것을 기초로 만들어져왔다.
66그 표준들은 문서화가 잘 되어 있기 때문에 가능한한 미리 많은 표준들에
67관하여 배우려고 시도하라. 다른 사람들은 여러분이나 여러분의 회사가
68일하는 방식에 적응하는 것을 원하지는 않는다.
69
70
71법적 문제
72---------
73
74리눅스 커널 소스 코드는 GPL로 배포(release)되었다. 소스트리의 메인
75디렉토리에 있는 라이센스에 관하여 상세하게 쓰여 있는 COPYING이라는
76파일을 봐라.여러분이 라이센스에 관한 더 깊은 문제를 가지고 있다면
77리눅스 커널 메일링 리스트에 묻지말고 변호사와 연락하라. 메일링
78리스트들에 있는 사람들은 변호사가 아니기 때문에 법적 문제에 관하여
79그들의 말에 의지해서는 안된다.
80
81GPL에 관한 잦은 질문들과 답변들은 다음을 참조하라.
82 http://www.gnu.org/licenses/gpl-faq.html
83
84
85문서
86----
87
88리눅스 커널 소스 트리는 커널 커뮤니티와 일하는 법을 배우기 위한 많은
89귀중한 문서들을 가지고 있다. 새로운 기능들이 커널에 들어가게 될 때,
90그 기능을 어떻게 사용하는지에 관한 설명을 위하여 새로운 문서 파일을
91추가하는 것을 권장한다. 커널이 유저스페이스로 노출하는 인터페이스를
92변경하게 되면 변경을 설명하는 메뉴얼 페이지들에 대한 패치나 정보를
93mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다.
94
95다음은 커널 소스 트리에 있는 읽어야 할 파일들의 리스트이다.
96 README
97 이 파일은 리눅스 커널에 관하여 간단한 배경 설명과 커널을 설정하고
98 빌드하기 위해 필요한 것을 설명한다. 커널에 입문하는 사람들은 여기서
99 시작해야 한다.
100
101 Documentation/Changes
102 이 파일은 커널을 성공적으로 빌드하고 실행시키기 위해 필요한 다양한
103 소프트웨어 패키지들의 최소 버젼을 나열한다.
104
105 Documentation/CodingStyle
106 이 문서는 리눅스 커널 코딩 스타일과 그렇게 한 몇몇 이유를 설명한다.
107 모든 새로운 코드는 이 문서에 가이드라인들을 따라야 한다. 대부분의
108 메인트너들은 이 규칙을 따르는 패치들만을 받아들일 것이고 많은 사람들이
109 그 패치가 올바른 스타일일 경우만 코드를 검토할 것이다.
110
111 Documentation/SubmittingPatches
112 Documentation/SubmittingDrivers
113 이 파일들은 성공적으로 패치를 만들고 보내는 법을 다음의 내용들로
114 굉장히 상세히 설명하고 있다(그러나 다음으로 한정되진 않는다).
115 - Email 내용들
116 - Email 양식
117 - 그것을 누구에게 보낼지
118 이러한 규칙들을 따르는 것이 성공을 보장하진 않는다(왜냐하면 모든
119 패치들은 내용과 스타일에 관하여 면밀히 검토되기 때문이다).
120 그러나 규칙을 따르지 않는다면 거의 성공하지도 못할 것이다.
121
122 올바른 패치들을 만드는 법에 관한 훌륭한 다른 문서들이 있다.
123 "The Perfect Patch"
124 http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
125 "Linux kernel patch submission format"
126 http://linux.yyz.us/patch-format.html
127
128 Documentation/stable_api_nonsense.txt
129 이 문서는 의도적으로 커널이 변하지 않는 API를 갖지 않도록 결정한
130 이유를 설명하며 다음과 같은 것들을 포함한다.
131 - 서브시스템 shim-layer(호환성을 위해?)
132 - 운영 체제들 간의 드라이버 이식성
133 - 커널 소스 트리내에 빠른 변화를 늦추는 것(또는 빠른 변화를 막는 것)
134 이 문서는 리눅스 개발 철학을 이해하는데 필수적이며 다른 운영체제에서
135 리눅스로 옮겨오는 사람들에게는 매우 중요하다.
136
137
138 Documentation/SecurityBugs
139 여러분들이 리눅스 커널의 보안 문제를 발견했다고 생각한다면 이 문서에
140 나온 단계에 따라서 커널 개발자들에게 알리고 그 문제를 해결할 수 있도록
141 도와 달라.
142
143 Documentation/ManagementStyle
144 이 문서는 리눅스 커널 메인트너들이 어떻게 그들의 방법론의 정신을
145 어떻게 공유하고 운영하는지를 설명한다. 이것은 커널 개발에 입문하는
146 모든 사람들(또는 커널 개발에 작은 호기심이라도 있는 사람들)이
147 읽어야 할 중요한 문서이다. 왜냐하면 이 문서는 커널 메인트너들의
148 독특한 행동에 관하여 흔히 있는 오해들과 혼란들을 해소하고 있기
149 때문이다.
150
151 Documentation/stable_kernel_rules.txt
152 이 문서는 안정적인 커널 배포가 이루어지는 규칙을 설명하고 있으며
153 여러분들이 이러한 배포들 중 하나에 변경을 하길 원한다면
154 무엇을 해야 하는지를 설명한다.
155
156 Documentation/kernel-docs.txt
157 커널 개발에 관계된 외부 문서의 리스트이다. 커널 내의 포함된 문서들
158 중에 여러분이 찾고 싶은 문서를 발견하지 못할 경우 이 리스트를
159 살펴보라.
160
161 Documentation/applying-patches.txt
162 패치가 무엇이며 그것을 커널의 다른 개발 브랜치들에 어떻게
163 적용하는지에 관하여 자세히 설명 하고 있는 좋은 입문서이다.
164
165커널은 소스 코드 그 자체에서 자동적으로 만들어질 수 있는 많은 문서들을
166가지고 있다. 이것은 커널 내의 API에 대한 모든 설명, 그리고 락킹을
167올바르게 처리하는 법에 관한 규칙을 포함하고 있다. 이 문서는
168Documentation/DocBook/ 디렉토리 내에서 만들어지며 PDF, Postscript, HTML,
169그리고 man 페이지들로 다음과 같이 실행하여 만들어 진다.
170 make pdfdocs
171 make psdocs
172 make htmldocs
173 make mandocs
174각각의 명령을 메인 커널 소스 디렉토리로부터 실행한다.
175
176
177커널 개발자가 되는 것
178---------------------
179
180여러분이 리눅스 커널 개발에 관하여 아무것도 모른다면 Linux KernelNewbies
181프로젝트를 봐야 한다.
182 http://kernelnewbies.org
183그곳은 거의 모든 종류의 기본적인 커널 개발 질문들(질문하기 전에 먼저
184아카이브를 찾아봐라. 과거에 이미 답변되었을 수도 있다)을 할수있는 도움이
185될만한 메일링 리스트가 있다. 또한 실시간으로 질문 할수 있는 IRC 채널도
186가지고 있으며 리눅스 커널 개발을 배우는 데 유용한 문서들을 보유하고 있다.
187
188웹사이트는 코드구성, 서브시스템들, 그리고 현재 프로젝트들
189(트리 내, 외부에 존재하는)에 관한 기본적인 정보들을 가지고 있다. 또한
190그곳은 커널 컴파일이나 패치를 하는 법과 같은 기본적인 것들을 설명한다.
191
192여러분이 어디서 시작해야 할진 모르지만 커널 개발 커뮤니티에 참여할 수
193있는 일들을 찾길 원한다면 리눅스 커널 Janitor 프로젝트를 살펴봐라.
194 http://janitor.kernelnewbies.org/
195그곳은 시작하기에 아주 딱 좋은 곳이다. 그곳은 리눅스 커널 소스 트리내에
196간단히 정리되고 수정될 수 있는 문제들에 관하여 설명한다. 여러분은 이
197프로젝트를 대표하는 개발자들과 일하면서 자신의 패치를 리눅스 커널 트리에
198반영하기 위한 기본적인 것들을 배우게 될것이며 여러분이 아직 아이디어를
199가지고 있지 않다면 다음에 무엇을 해야할지에 관한 방향을 배울 수 있을
200것이다.
201
202여러분들이 이미 커널 트리에 반영하길 원하는 코드 묶음을 가지고 있지만
203올바른 포맷으로 포장하는데 도움이 필요하다면 그러한 문제를 돕기 위해
204만들어진 kernel-mentors 프로젝트가 있다. 그곳은 메일링 리스트이며
205다음에서 참조할 수 있다.
206 http://selenic.com/mailman/listinfo/kernel-mentors
207
208리눅스 커널 코드에 실제 변경을 하기 전에 반드시 그 코드가 어떻게
209동작하는지 이해하고 있어야 한다. 코드를 분석하기 위하여 특정한 툴의
210도움을 빌려서라도 코드를 직접 읽는 것보다 좋은 것은 없다(대부분의
211자잘한 부분들은 잘 코멘트되어 있다). 그런 툴들 중에 특히 추천할만한
212것은 Linux Cross-Reference project이며 그것은 자기 참조 방식이며
213소스코드를 인덱스된 웹 페이지들의 형태로 보여준다. 최신의 멋진 커널
214코드 저장소는 다음을 통하여 참조할 수 있다.
215 http://sosdg.org/~coywolf/lxr/
216
217
218개발 프로세스
219-------------
220
221리눅스 커널 개발 프로세스는 현재 몇몇 다른 메인 커널 "브랜치들"과
222서브시스템에 특화된 커널 브랜치들로 구성된다. 몇몇 다른 메인
223브랜치들은 다음과 같다.
224 - main 2.6.x 커널 트리
225 - 2.6.x.y - 안정된 커널 트리
226 - 2.6.x -git 커널 패치들
227 - 2.6.x -mm 커널 패치들
228 - 서브시스템을 위한 커널 트리들과 패치들
229
2302.6.x 커널 트리
231---------------
232
2332.6.x 커널들은 Linux Torvalds가 관리하며 kernel.org의 pub/linux/kernel/v2.6/
234디렉토리에서 참조될 수 있다.개발 프로세스는 다음과 같다.
235 - 새로운 커널이 배포되자마자 2주의 시간이 주어진다. 이 기간동은
236 메인트너들은 큰 diff들을 Linus에게 제출할 수 있다. 대개 이 패치들은
237 몇 주 동안 -mm 커널내에 이미 있었던 것들이다. 큰 변경들을 제출하는 데
238 선호되는 방법은 git(커널의 소스 관리 툴, 더 많은 정보들은 http://git.or.cz/
239 에서 참조할 수 있다)를 사용하는 것이지만 순수한 패치파일의 형식으로 보내도
240 것도 무관하다.
241 - 2주 후에 -rc1 커널이 배포되며 지금부터는 전체 커널의 안정성에 영향을
242 미칠수 있는 새로운 기능들을 포함하지 않는 패치들만을 추가될 수 있다.
243 완전히 새로운 드라이버(혹은 파일시스템)는 -rc1 이후에만 받아들여진다는
244 것을 기억해라. 왜냐하면 변경이 자체내에서만 발생하고 추가된 코드가
245 드라이버 외부의 다른 부분에는 영향을 주지 않으므로 그런 변경은
246 퇴보(regression)를 일으킬 만한 위험을 가지고 있지 않기 때문이다. -rc1이
247 배포된 이후에 git를 사용하여 패치들을 Linus에게 보낼수 있지만 패치들은
248 공식적인 메일링 리스트로 보내서 검토를 받을 필요가 있다.
249 - 새로운 -rc는 Linus는 현재 git tree가 테스트 하기에 충분히 안정된 상태에
250 있다고 판단될 때마다 배포된다. 목표는 새로운 -rc 커널을 매주 배포하는
251 것이다.
252 - 이러한 프로세스는 커널이 "준비"되었다고 여겨질때까지 계속된다.
253 프로세스는 대체로 6주간 지속된다.
254 - 각 -rc 배포에 있는 알려진 퇴보의 목록들은 다음 URI에 남겨진다.
255 http://kernelnewbies.org/known_regressions
256
257커널 배포에 있어서 언급할만한 가치가 있는 리눅스 커널 메일링 리스트의
258Andrew Morton의 글이 있다.
259 "커널이 언제 배포될지는 아무로 모른다. 왜냐하면 배포는 알려진
260 버그의 상황에 따라 배포되는 것이지 미리정해 놓은 시간에 따라
261 배포되는 것은 아니기 때문이다."
262
2632.6.x.y - 안정 커널 트리
264------------------------
265
2664 자리 숫자로 이루어진 버젼의 커널들은 -stable 커널들이다. 그것들은 2.6.x
267커널에서 발견된 큰 퇴보들이나 보안 문제들 중 비교적 작고 중요한 수정들을
268포함한다.
269
270이것은 가장 최근의 안정적인 커널을 원하는 사용자에게 추천되는 브랜치이며,
271개발/실험적 버젼을 테스트하는 것을 돕는데는 별로 관심이 없다.
272
273어떤 2.6.x.y 커널도 사용가능하지 않다면 그때는 가장 높은 숫자의 2.6.x
274커널이 현재의 안정 커널이다.
275
2762.6.x.y는 "stable" 팀<stable@kernel.org>에 의해 관리되며 거의 매번 격주로
277배포된다.
278
279커널 트리 문서들 내에 Documentation/stable_kernel_rules.txt 파일은 어떤
280종류의 변경들이 -stable 트리로 들어왔는지와 배포 프로세스가 어떻게
281진행되는지를 설명한다.
282
283
2842.6.x -git 패치들
285------------------
286git 저장소(그러므로 -git이라는 이름이 붙음)에는 날마다 관리되는 Linus의
287커널 트리의 snapshot 들이 있다. 이 패치들은 일반적으로 날마다 배포되며
288Linus의 트리의 현재 상태를 나타낸다. 이 패치들은 정상적인지 조금도
289살펴보지 않고 자동적으로 생성된 것이므로 -rc 커널들 보다도 더 실험적이다.
290
2912.6.x -mm 커널 패치들
292---------------------
293Andrew Morton에 의해 배포된 실험적인 커널 패치들이다. Andrew는 모든 다른
294서브시스템 커널 트리와 패치들을 가져와서 리눅스 커널 메일링 리스트로
295온 많은 패치들과 한데 묶는다. 이 트리는 새로운 기능들과 패치들을 위한
296장소를 제공하는 역할을 한다. 하나의 패치가 -mm에 한동안 있으면서 그 가치가
297증명되게 되면 Andrew나 서브시스템 메인트너는 그것을 메인라인에 포함시키기
298위하여 Linus에게 보낸다.
299
300커널 트리에 포함하고 싶은 모든 새로운 패치들은 Linus에게 보내지기 전에
301-mm 트리에서 테스트를 하는 것을 적극 추천한다.
302
303이 커널들은 안정되게 사용할 시스템에서에 실행하는 것은 적합하지 않으며
304다른 브랜치들의 어떤 것들보다 위험하다.
305
306여러분이 커널 개발 프로세스를 돕길 원한다면 이 커널 배포들을 사용하고
307테스트한 후 어떤 문제를 발견하거나 또는 모든 것이 잘 동작한다면 리눅스
308커널 메일링 리스트로 피드백을 해달라.
309
310이 커널들은 일반적으로 모든 다른 실험적인 패치들과 배포될 당시의
311사용가능한 메인라인 -git 커널들의 몇몇 변경을 포함한다.
312
313-mm 커널들은 정해진 일정대로 배포되지 않는다. 하지만 대개 몇몇 -mm 커널들은
314각 -rc 커널(1부터 3이 흔함) 사이에서 배포된다.
315
316서브시스템 커널 트리들과 패치들
317-------------------------------
318많은 다른 커널 서브시스템 개발자들은 커널의 다른 부분들에서 무슨 일이
319일어나고 있는지를 볼수 있도록 그들의 개발 트리를 공개한다. 이 트리들은
320위에서 설명하였던 것 처럼 -mm 커널 배포들로 합쳐진다.
321
322다음은 활용가능한 커널 트리들을 나열한다.
323 git trees:
324 - Kbuild development tree, Sam Ravnborg < sam@ravnborg.org>
325 git.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git
326
327 - ACPI development tree, Len Brown <len.brown@intel.com >
328 git.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git
329
330 - Block development tree, Jens Axboe <axboe@suse.de>
331 git.kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git
332
333 - DRM development tree, Dave Airlie <airlied@linux.ie>
334 git.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6.git
335
336 - ia64 development tree, Tony Luck < tony.luck@intel.com>
337 git.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6.git
338
339 - infiniband, Roland Dreier <rolandd@cisco.com >
340 git.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git
341
342 - libata, Jeff Garzik <jgarzik@pobox.com>
343 git.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
344
345 - network drivers, Jeff Garzik <jgarzik@pobox.com>
346 git.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
347
348 - pcmcia, Dominik Brodowski < linux@dominikbrodowski.net>
349 git.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git
350
351 - SCSI, James Bottomley < James.Bottomley@SteelEye.com>
352 git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
353
354 quilt trees:
355 - USB, PCI, Driver Core, and I2C, Greg Kroah-Hartman < gregkh@suse.de>
356 kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
357 - x86-64, partly i386, Andi Kleen < ak@suse.de>
358 ftp.firstfloor.org:/pub/ak/x86_64/quilt/
359
360 다른 커널 트리들은 http://kernel.org/git와 MAINTAINERS 파일에서 참조할 수
361 있다.
362
363버그 보고
364---------
365bugzilla.kernel.org는 리눅스 커널 개발자들이 커널의 버그를 추적하는 곳이다.
366사용자들은 발견한 모든 버그들을 보고하기 위하여 이 툴을 사용할 것을 권장한다.
367kernel bugzilla를 사용하는 자세한 방법은 다음을 참조하라.
368 http://test.kernel.org/bugzilla/faq.html
369
370메인 커널 소스 디렉토리에 있는 REPORTING-BUGS 파일은 커널 버그일 것 같은
371것을 보고하는는 법에 관한 좋은 템플릿이고 문제를 추적하기 위해서 커널
372개발자들이 필요로 하는 정보가 무엇들인지를 상세히 설명하고 있다.
373
374
375버그 리포트들의 관리
376--------------------
377
378여러분의 해킹 기술을 연습하는 가장 좋은 방법 중의 하는 다른 사람들이
379보고한 버그들을 수정하는 것이다. 여러분은 커널을 더욱 안정화시키는데
380도움을 줄 뿐만이 아니라 실제있는 문제들을 수정하는 법을 배우게 되고
381그와 함께 여러분들의 기술은 향상될 것이며 다른 개발자들이 여러분의
382존재에 대해 알게 될 것이다. 버그를 수정하는 것은 개발자들 사이에서
383점수를 얻을 수 있는 가장 좋은 방법중의 하나이다. 왜냐하면 많은 사람들은
384다른 사람들의 버그들을 수정하기 위하여 시간을 낭비하지 않기 때문이다.
385
386이미 보고된 버그 리포트들을 가지고 작업하기 위해서 http://bugzilla.kernelorg를
387참조하라. 여러분이 앞으로 생겨날 버그 리포트들의 조언자가 되길 원한다면
388bugme-new 메일링 리스트나(새로운 버그 리포트들만이 이곳에서 메일로 전해진다)
389bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메일로 전해진다)
390에 등록하면 된다.
391
392 http://lists.osdl.org/mailman/listinfo/bugme-new
393 http://lists.osdl.org/mailman/listinfo/bugme-janitors
394
395
396
397메일링 리스트들
398---------------
399
400위의 몇몇 문서들이 설명하였지만 핵심 커널 개발자들의 대다수는
401리눅스 커널 메일링 리스트에 참여하고 있다. 리스트에 등록하고 해지하는
402방법에 관한 자세한 사항은 다음에서 참조할 수 있다.
403 http://vger.kernel.org/vger-lists.html#linux-kernel
404웹상의 많은 다른 곳에도 메일링 리스트의 아카이브들이 있다.
405이러한 아카이브들을 찾으려면 검색 엔진을 사용하라. 예를 들어:
406 http://dir.gmane.org/gmane.linux.kernel
407여러분이 새로운 문제에 관해 리스트에 올리기 전에 말하고 싶은 주제에 대한
408것을 아카이브에서 먼저 찾기를 강력히 권장한다. 이미 상세하게 토론된 많은
409것들이 메일링 리스트의 아카이브에 기록되어 있다.
410
411각각의 커널 서브시스템들의 대부분은 자신들의 개발에 관한 노력들로 이루어진
412분리된 메일링 리스트를 따로 가지고 있다. 다른 그룹들이 무슨 리스트를 가지고
413있는지는 MAINTAINERS 파일을 참조하라.
414
415많은 리스트들은 kernel.org에서 호스트되고 있다. 그 정보들은 다음에서 참조될 수 있다.
416 http://vger.kernel.org/vger-lists.html
417
418리스트들을 사용할 때는 올바른 예절을 따를 것을 유념해라.
419대단하진 않지만 다음 URL은 리스트(혹은 모든 리스트)와 대화하는 몇몇 간단한
420가이드라인을 가지고 있다.
421 http://www.albion.com/netiquette/
422
423여러 사람들이 여러분의 메일에 응답한다면 CC: 즉 수신 리스트는 꽤 커지게
424될 것이다. 아무 이유없이 CC에서 어떤 사람도 제거하거나 리스트 주소로만
425회신하지 마라. 메일을 보낸 사람으로서 하나를 받고 리스트로부터 또
426하나를 받아 두번 받는 것에 익숙하여 있으니 mail-header를 조작하려고 하지
427말아라. 사람들은 그런 것을 좋아하지 않을 것이다.
428
429여러분의 회신의 문맥을 원래대로 유지해야 한다. 여러분들의 회신의 윗부분에
430"John 커널해커는 작성했다...."를 유지하며 여러분들의 의견을 그 메일의 윗부분에
431작성하지 말고 각 인용한 단락들 사이에 넣어라.
432
433여러분들이 패치들을 메일에 넣는다면 그것들은 Documentation/SubmittingPatches에
434나와있는데로 명백히(plain) 읽을 수 있는 텍스트여야 한다. 커널 개발자들은
435첨부파일이나 압축된 패치들을 원하지 않는다. 그들은 여러분들의 패치의
436각 라인 단위로 코멘트를 하길 원하며 압축하거나 첨부하지 않고 보내는 것이
437그렇게 할 수 있는 유일한 방법이다. 여러분들이 사용하는 메일 프로그램이
438스페이스나 탭 문자들을 조작하지 않는지 확인하라. 가장 좋은 첫 테스트는
439메일을 자신에게 보내보고 스스로 그 패치를 적용해보라. 그것이 동작하지
440않는다면 여러분의 메일 프로그램을 고치던가 제대로 동작하는 프로그램으로
441바꾸어라.
442
443무엇보다도 메일링 리스트의 다른 구독자들에게 보여주려 한다는 것을 기억하라.
444
445
446커뮤니티와 일하는 법
447--------------------
448
449커널 커뮤니티의 목적은 가능한한 가장 좋은 커널을 제공하는 것이다. 여러분이
450받아들여질 패치를 제출하게 되면 그 패치의 기술적인 이점으로 검토될 것이다.
451그럼 여러분들은 무엇을 기대하고 있어야 하는가?
452 - 비판
453 - 의견
454 - 변경을 위한 요구
455 - 당위성을 위한 요구
456 - 고요
457
458기억하라. 이것들은 여러분의 패치가 커널로 들어가기 위한 과정이다. 여러분의
459패치들은 비판과 다른 의견을 받을 수 있고 그것들을 기술적인 레벨로 평가하고
460재작업하거나 또는 왜 수정하면 안되는지에 관하여 명료하고 간결한 이유를
461말할 수 있어야 한다. 여러분이 제출한 것에 어떤 응답도 있지 않다면 몇 일을
462기다려보고 다시 시도해라. 때론 너무 많은 메일들 속에 묻혀버리기도 한다.
463
464여러분은 무엇을 해서는 안되는가?
465 - 여러분의 패치가 아무 질문 없이 받아들여지기를 기대하는 것
466 - 방어적이 되는 것
467 - 의견을 무시하는 것
468 - 요청된 변경을 하지 않고 패치를 다시 제출하는 것
469
470가능한한 가장 좋은 기술적인 해답을 찾고 있는 커뮤니티에서는 항상
471어떤 패치가 얼마나 좋은지에 관하여 다른 의견들이 있을 수 있다. 여러분은
472협조적이어야 하고 기꺼이 여러분의 생각을 커널 내에 맞추어야 한다. 아니면
473적어도 여러분의 것이 가치있다는 것을 중명하여야 한다. 잘못된 것도 여러분이
474올바른 방향의 해결책으로 이끌어갈 의지가 있다면 받아들여질 것이라는 점을
475기억하라.
476
477여러분의 첫 패치에 여러분이 수정해야하는 십여개 정도의 회신이 오는
478경우도 흔하다. 이것은 여러분의 패치가 받아들여지지 않을 것이라는 것을
479의미하는 것이 아니고 개인적으로 여러분에게 감정이 있어서 그러는 것도
480아니다. 간단히 여러분의 패치에 제기된 문제들을 수정하고 그것을 다시
481보내라.
482
483
484커널 커뮤니티와 기업 조직간의 차이점
485-----------------------------------------------------------------
486커널 커뮤니티는 가장 전통적인 회사의 개발 환경과는 다르다. 여기에 여러분들의
487문제를 피하기 위한 목록이 있다.
488 여러분들이 제안한 변경들에 관하여 말할 때 좋은 것들 :
489 - " 이것은 여러 문제들을 해겹합니다."
490 - "이것은 2000 라인의 코드를 제거합니다."
491 - "이것은 내가 말하려는 것에 관해 설명하는 패치입니다."
492 - "나는 5개의 다른 아키텍쳐에서 그것을 테스트했슴으로..."
493 - "여기에 일련의 작은 패치들이 있습음로..."
494 - "이것은 일반적인 머신에서 성능을 향상시키므로..."
495
496 여러분들이 말할 때 피해야 할 좋지 않은 것들 :
497 - "우리를 그것을 AIT/ptx/Solaris에서 이러한 방법으로 했다. 그러므로 그것은 좋은 것임에 틀립없다..."
498 - "나는 20년동안 이것을 해왔다. 그러므로..."
499 - "이것은 돈을 벌기위해 나의 회사가 필요로 하는 것이다."
500 - "이것은 우리의 엔터프라이즈 상품 라인을 위한 것이다."
501 - "여기에 나의 생각을 말하고 있는 1000 페이지 설계 문서가 있다."
502 - "나는 6달동안 이것을 했으니..."
503 - "여기세 5000라인 짜리 패치가 있으니..."
504 - "나는 현재 뒤죽박죽인 것을 재작성했다. 그리고 여기에..."
505 - "나는 마감시한을 가지고 있으므로 이 패치는 지금 적용될 필요가 있다."
506
507커널 커뮤니티가 전통적인 소프트웨어 엔지니어링 개발 환경들과
508또 다른 점은 얼굴을 보지 않고 일한다는 점이다. 이메일과 irc를 대화의
509주요수단으로 사용하는 것의 한가지 장점은 성별이나 인종의 차별이
510없다는 것이다. 리눅스 커널의 작업 환경에서는 단지 이메일 주소만
511알수 있기 때문에 여성과 소수 민족들도 모두 받아들여진다. 국제적으로
512일하게 되는 측면은 사람의 이름에 근거하여 성별을 추측할 수 없게
513하기때문에 차별을 없애는 데 도움을 준다. Andrea라는 이름을 가진 남자와
514Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅스 커널에서
515작업하며 생각을 표현해왔던 대부분의 여성들은 긍정적인 경험을 가지고
516있다.
517
518언어 장벽은 영어에 익숙하지 않은 몇몇 사람들에게 문제가 될 수도 있다.
519 언어의 훌륭한 구사는 메일링 리스트에서 올바르게 자신의 생각을
520표현하기 위하여 필요하다. 그래서 여러분은 이메일을 보내기 전에
521영어를 올바르게 사용하고 있는지를 체크하는 것이 바람직하다.
522
523
524여러분의 변경을 나누어라
525------------------------
526
527리눅스 커널 커뮤니티는 한꺼번에 굉장히 큰 코드의 묶음을 쉽게
528받아들이지 않는다. 변경은 적절하게 소개되고, 검토되고, 각각의
529부분으로 작게 나누어져야 한다. 이것은 회사에서 하는 것과는 정확히
530반대되는 것이다. 여러분들의 제안은 개발 초기에 일찍이 소개되야 한다.
531그래서 여러분들은 자신이 하고 있는 것에 관하여 피드백을 받을 수 있게
532된다. 커뮤니티가 여러분들이 커뮤니티와 함께 일하고 있다는 것을
533느끼도록 만들고 커뮤니티가 여러분의 기능을 위한 쓰레기 장으로서
534사용되지 않고 있다는 것을 느끼게 하자. 그러나 메일링 리스트에 한번에
53550개의 이메일을 보내지는 말아라. 여러분들의 일련의 패치들은 항상
536더 작아야 한다.
537
538패치를 나누는 이유는 다음과 같다.
539
5401) 작은 패치들은 여러분의 패치들이 적용될 수 있는 확률을 높여준다.
541 왜냐하면 다른 사람들은 정확성을 검증하기 위하여 많은 시간과 노력을
542 들이기를 원하지 않는다. 5줄의 패치는 메인트너가 거의 몇 초간 힐끗
543 보면 적용될 수 있다. 그러나 500 줄의 패치는 정확성을 검토하기 위하여
544 몇시간이 걸릴 수도 있다(걸리는 시간은 패치의 크기 혹은 다른 것에
545 비례하여 기하급수적으로 늘어난다).
546
547 패치를 작게 만드는 것은 무엇인가 잘못되었을 때 디버그하는 것을
548 쉽게 만든다. 즉, 그렇게 만드는 것은 매우 큰 패치를 적용한 후에
549 조사하는 것 보다 작은 패치를 적용한 후에 (그리고 몇몇의 것이
550 깨졌을 때) 하나씩 패치들을 제거해가며 디버그 하기 쉽도록 만들어 준다.
551
5522) 작은 패치들을 보내는 것뿐만 아니라 패치들을 제출하기전에 재작성하고
553 간단하게(혹은 간단한게 재배치하여) 하는 것도 중요하다.
554
555여기에 커널 개발자 Al Viro의 이야기가 있다.
556 "학생의 수학 숙제를 채점하는 선생님을 생각해보라. 선생님은 학생들이
557 답을 얻을때까지 겪은 시행착오를 보길 원하지 않는다. 선생님들은
558 간결하고 가장 뛰어난 답을 보길 원한다. 훌륭한 학생은 이것을 알고
559 마지막으로 답을 얻기 전 중간 과정들을 제출하진 않는다.
560
561 커널 개발도 마찬가지이다. 메인트너들과 검토하는 사람들은 문제를
562 풀어나가는 과정속에 숨겨진 과정을 보길 원하진 않는다. 그들은
563 간결하고 멋진 답을 보길 원한다."
564
565커뮤니티와 함께 일하며 뛰어난 답을 찾고 여러분들의 완성되지 않은 일들
566사이에 균형을 유지해야 하는 어려움이 있을 수 있다. 그러므로 프로세스의
567초반에 여러분의 일을 향상시키기위한 피드백을 얻는 것 뿐만 아니라
568여러분들의 변경들을 작은 묶음으로 유지해서 심지어는 여러분의 작업의
569모든 부분이 지금은 포함될 준비가 되어있지 않지만 작은 부분은 이미
570받아들여질 수 있도록 유지하는 것이 바람직하다.
571
572또한 완성되지 않았고 "나중에 수정될 것이다." 와 같은 것들은 포함하는
573패치들은 받아들여지지 않을 것이라는 점을 유념하라.
574
575변경을 정당화해라
576-----------------
577
578여러분들의 나누어진 패치들을 리눅스 커뮤니티가 왜 반영해야 하는지를
579알도록 하는 것은 매우 중요하다. 새로운 기능들이 필요하고 유용하다는
580것은 반드시 그에 맞는 이유가 있어야 한다.
581
582
583변경을 문서화해라
584-----------------
585
586여러분이 패치를 보내려 할때는 여러분이 무엇을 말하려고 하는지를 충분히
587생각하여 이메일을 작성해야 한다. 이 정보는 패치를 위한 ChangeLog가 될
588것이다. 그리고 항상 그 내용을 보길 원하는 모든 사람들을 위해 보존될
589것이다. 패치는 완벽하게 다음과 같은 내용들을 포함하여 설명해야 한다.
590 - 변경이 왜 필요한지
591 - 패치에 관한 전체 설계 어프로치
592 - 구현 상세들
593 - 테스트 결과들
594
595이것이 무엇인지 더 자세한 것을 알고 싶다면 다음 문서의 ChageLog 항을 봐라.
596 "The Perfect Patch"
597 http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
598
599
600
601
602이 모든 것을 하는 것은 매우 어려운 일이다. 완벽히 소화하는 데는 적어도 몇년이
603걸릴 수도 있다. 많은 인내와 결의가 필요한 계속되는 개선의 과정이다. 그러나
604가능한한 포기하지 말라. 많은 사람들은 이전부터 해왔던 것이고 그 사람들도
605정확하게 여러분들이 지금 서 있는 그 곳부터 시작했었다.
606
607
608
609
610----------
611"개발 프로세스"(http://linux.tar.gz/articles/2.6-development_process) 섹션을
612작성하는데 있어 참고할 문서를 사용하도록 허락해준 Paolo Ciarrocchi에게
613감사한다. 여러분들이 말해야 할 것과 말해서는 안되는 것의 목록 중 일부를 제공해준
614Randy Dunlap과 Gerrit Huizenga에게 감사한다. 또한 검토와 의견 그리고
615공헌을 아끼지 않은 Pat Mochel, Hanna Linder, Randy Dunlap, Kay Sievers,
616Vojtech Pavlik, Jan Kara, Josh Boyer, Kees Cook, Andrew Morton, Andi Kleen,
617Vadim Lobanov, Jesper Juhl, Adrian Bunk, Keri Harris, Frans Pop,
618David A. Wheeler, Junio Hamano, Michael Kerrisk, and Alex Shepard에게도 감사를 전한다.
619그들의 도움이 없었다면 이 문서는 존재하지 않았을 것이다.
620
621
622
623메인트너: Greg Kroah-Hartman <greg@kroah.com>
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index f7918401a0..73c5f1f3d5 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -882,7 +882,7 @@ static u32 handle_block_output(int fd, const struct iovec *iov,
882 * of the block file (possibly extending it). */ 882 * of the block file (possibly extending it). */
883 if (off + len > device_len) { 883 if (off + len > device_len) {
884 /* Trim it back to the correct length */ 884 /* Trim it back to the correct length */
885 ftruncate(dev->fd, device_len); 885 ftruncate64(dev->fd, device_len);
886 /* Die, bad Guest, die. */ 886 /* Die, bad Guest, die. */
887 errx(1, "Write past end %llu+%u", off, len); 887 errx(1, "Write past end %llu+%u", off, len);
888 } 888 }
diff --git a/Documentation/lockstat.txt b/Documentation/lockstat.txt
new file mode 100644
index 0000000000..4ba4664ce5
--- /dev/null
+++ b/Documentation/lockstat.txt
@@ -0,0 +1,120 @@
1
2LOCK STATISTICS
3
4- WHAT
5
6As the name suggests, it provides statistics on locks.
7
8- WHY
9
10Because things like lock contention can severely impact performance.
11
12- HOW
13
14Lockdep already has hooks in the lock functions and maps lock instances to
15lock classes. We build on that. The graph below shows the relation between
16the lock functions and the various hooks therein.
17
18 __acquire
19 |
20 lock _____
21 | \
22 | __contended
23 | |
24 | <wait>
25 | _______/
26 |/
27 |
28 __acquired
29 |
30 .
31 <hold>
32 .
33 |
34 __release
35 |
36 unlock
37
38lock, unlock - the regular lock functions
39__* - the hooks
40<> - states
41
42With these hooks we provide the following statistics:
43
44 con-bounces - number of lock contention that involved x-cpu data
45 contentions - number of lock acquisitions that had to wait
46 wait time min - shortest (non-0) time we ever had to wait for a lock
47 max - longest time we ever had to wait for a lock
48 total - total time we spend waiting on this lock
49 acq-bounces - number of lock acquisitions that involved x-cpu data
50 acquisitions - number of times we took the lock
51 hold time min - shortest (non-0) time we ever held the lock
52 max - longest time we ever held the lock
53 total - total time this lock was held
54
55From these number various other statistics can be derived, such as:
56
57 hold time average = hold time total / acquisitions
58
59These numbers are gathered per lock class, per read/write state (when
60applicable).
61
62It also tracks 4 contention points per class. A contention point is a call site
63that had to wait on lock acquisition.
64
65 - USAGE
66
67Look at the current lock statistics:
68
69( line numbers not part of actual output, done for clarity in the explanation
70 below )
71
72# less /proc/lock_stat
73
7401 lock_stat version 0.2
7502 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
7603 class name con-bounces contentions waittime-min waittime-max waittime-total acq-bounces acquisitions holdtime-min holdtime-max holdtime-total
7704 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
7805
7906 &inode->i_data.tree_lock-W: 15 21657 0.18 1093295.30 11547131054.85 58 10415 0.16 87.51 6387.60
8007 &inode->i_data.tree_lock-R: 0 0 0.00 0.00 0.00 23302 231198 0.25 8.45 98023.38
8108 --------------------------
8209 &inode->i_data.tree_lock 0 [<ffffffff8027c08f>] add_to_page_cache+0x5f/0x190
8310
8411 ...............................................................................................................................................................................................
8512
8613 dcache_lock: 1037 1161 0.38 45.32 774.51 6611 243371 0.15 306.48 77387.24
8714 -----------
8815 dcache_lock 180 [<ffffffff802c0d7e>] sys_getcwd+0x11e/0x230
8916 dcache_lock 165 [<ffffffff802c002a>] d_alloc+0x15a/0x210
9017 dcache_lock 33 [<ffffffff8035818d>] _atomic_dec_and_lock+0x4d/0x70
9118 dcache_lock 1 [<ffffffff802beef8>] shrink_dcache_parent+0x18/0x130
92
93This excerpt shows the first two lock class statistics. Line 01 shows the
94output version - each time the format changes this will be updated. Line 02-04
95show the header with column descriptions. Lines 05-10 and 13-18 show the actual
96statistics. These statistics come in two parts; the actual stats separated by a
97short separator (line 08, 14) from the contention points.
98
99The first lock (05-10) is a read/write lock, and shows two lines above the
100short separator. The contention points don't match the column descriptors,
101they have two: contentions and [<IP>] symbol.
102
103
104View the top contending locks:
105
106# grep : /proc/lock_stat | head
107 &inode->i_data.tree_lock-W: 15 21657 0.18 1093295.30 11547131054.85 58 10415 0.16 87.51 6387.60
108 &inode->i_data.tree_lock-R: 0 0 0.00 0.00 0.00 23302 231198 0.25 8.45 98023.38
109 dcache_lock: 1037 1161 0.38 45.32 774.51 6611 243371 0.15 306.48 77387.24
110 &inode->i_mutex: 161 286 18446744073709 62882.54 1244614.55 3653 20598 18446744073709 62318.60 1693822.74
111 &zone->lru_lock: 94 94 0.53 7.33 92.10 4366 32690 0.29 59.81 16350.06
112 &inode->i_data.i_mmap_lock: 79 79 0.40 3.77 53.03 11779 87755 0.28 116.93 29898.44
113 &q->__queue_lock: 48 50 0.52 31.62 86.31 774 13131 0.17 113.08 12277.52
114 &rq->rq_lock_key: 43 47 0.74 68.50 170.63 3706 33929 0.22 107.99 17460.62
115 &rq->rq_lock_key#2: 39 46 0.75 6.68 49.03 2979 32292 0.17 125.17 17137.63
116 tasklist_lock-W: 15 15 1.45 10.87 32.70 1201 7390 0.58 62.55 13648.47
117
118Clear the statistics:
119
120# echo 0 > /proc/lock_stat
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX
index d63f480afb..153d84d281 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -96,6 +96,9 @@ routing.txt
96 - the new routing mechanism 96 - the new routing mechanism
97shaper.txt 97shaper.txt
98 - info on the module that can shape/limit transmitted traffic. 98 - info on the module that can shape/limit transmitted traffic.
99sk98lin.txt
100 - Marvell Yukon Chipset / SysKonnect SK-98xx compliant Gigabit
101 Ethernet Adapter family driver info
99skfp.txt 102skfp.txt
100 - SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info. 103 - SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info.
101smc9.txt 104smc9.txt
diff --git a/Documentation/networking/multiqueue.txt b/Documentation/networking/multiqueue.txt
index 00b60cce22..ea5a42e8f7 100644
--- a/Documentation/networking/multiqueue.txt
+++ b/Documentation/networking/multiqueue.txt
@@ -58,9 +58,13 @@ software, so it's a straight round-robin qdisc. It uses the same syntax and
58classification priomap that sch_prio uses, so it should be intuitive to 58classification priomap that sch_prio uses, so it should be intuitive to
59configure for people who've used sch_prio. 59configure for people who've used sch_prio.
60 60
61The PRIO qdisc naturally plugs into a multiqueue device. If PRIO has been 61In order to utilitize the multiqueue features of the qdiscs, the network
62built with NET_SCH_PRIO_MQ, then upon load, it will make sure the number of 62device layer needs to enable multiple queue support. This can be done by
63bands requested is equal to the number of queues on the hardware. If they 63selecting NETDEVICES_MULTIQUEUE under Drivers.
64
65The PRIO qdisc naturally plugs into a multiqueue device. If
66NETDEVICES_MULTIQUEUE is selected, then on qdisc load, the number of
67bands requested is compared to the number of queues on the hardware. If they
64are equal, it sets a one-to-one mapping up between the queues and bands. If 68are equal, it sets a one-to-one mapping up between the queues and bands. If
65they're not equal, it will not load the qdisc. This is the same behavior 69they're not equal, it will not load the qdisc. This is the same behavior
66for RR. Once the association is made, any skb that is classified will have 70for RR. Once the association is made, any skb that is classified will have
diff --git a/Documentation/networking/sk98lin.txt b/Documentation/networking/sk98lin.txt
new file mode 100644
index 0000000000..8590a954df
--- /dev/null
+++ b/Documentation/networking/sk98lin.txt
@@ -0,0 +1,568 @@
1(C)Copyright 1999-2004 Marvell(R).
2All rights reserved
3===========================================================================
4
5sk98lin.txt created 13-Feb-2004
6
7Readme File for sk98lin v6.23
8Marvell Yukon/SysKonnect SK-98xx Gigabit Ethernet Adapter family driver for LINUX
9
10This file contains
11 1 Overview
12 2 Required Files
13 3 Installation
14 3.1 Driver Installation
15 3.2 Inclusion of adapter at system start
16 4 Driver Parameters
17 4.1 Per-Port Parameters
18 4.2 Adapter Parameters
19 5 Large Frame Support
20 6 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad)
21 7 Troubleshooting
22
23===========================================================================
24
25
261 Overview
27===========
28
29The sk98lin driver supports the Marvell Yukon and SysKonnect
30SK-98xx/SK-95xx compliant Gigabit Ethernet Adapter on Linux. It has
31been tested with Linux on Intel/x86 machines.
32***
33
34
352 Required Files
36=================
37
38The linux kernel source.
39No additional files required.
40***
41
42
433 Installation
44===============
45
46It is recommended to download the latest version of the driver from the
47SysKonnect web site www.syskonnect.com. If you have downloaded the latest
48driver, the Linux kernel has to be patched before the driver can be
49installed. For details on how to patch a Linux kernel, refer to the
50patch.txt file.
51
523.1 Driver Installation
53------------------------
54
55The following steps describe the actions that are required to install
56the driver and to start it manually. These steps should be carried
57out for the initial driver setup. Once confirmed to be ok, they can
58be included in the system start.
59
60NOTE 1: To perform the following tasks you need 'root' access.
61
62NOTE 2: In case of problems, please read the section "Troubleshooting"
63 below.
64
65The driver can either be integrated into the kernel or it can be compiled
66as a module. Select the appropriate option during the kernel
67configuration.
68
69Compile/use the driver as a module
70----------------------------------
71To compile the driver, go to the directory /usr/src/linux and
72execute the command "make menuconfig" or "make xconfig" and proceed as
73follows:
74
75To integrate the driver permanently into the kernel, proceed as follows:
76
771. Select the menu "Network device support" and then "Ethernet(1000Mbit)"
782. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support"
79 with (*)
803. Build a new kernel when the configuration of the above options is
81 finished.
824. Install the new kernel.
835. Reboot your system.
84
85To use the driver as a module, proceed as follows:
86
871. Enable 'loadable module support' in the kernel.
882. For automatic driver start, enable the 'Kernel module loader'.
893. Select the menu "Network device support" and then "Ethernet(1000Mbit)"
904. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support"
91 with (M)
925. Execute the command "make modules".
936. Execute the command "make modules_install".
94 The appropriate modules will be installed.
957. Reboot your system.
96
97
98Load the module manually
99------------------------
100To load the module manually, proceed as follows:
101
1021. Enter "modprobe sk98lin".
1032. If a Marvell Yukon or SysKonnect SK-98xx adapter is installed in
104 your computer and you have a /proc file system, execute the command:
105 "ls /proc/net/sk98lin/"
106 This should produce an output containing a line with the following
107 format:
108 eth0 eth1 ...
109 which indicates that your adapter has been found and initialized.
110
111 NOTE 1: If you have more than one Marvell Yukon or SysKonnect SK-98xx
112 adapter installed, the adapters will be listed as 'eth0',
113 'eth1', 'eth2', etc.
114 For each adapter, repeat steps 3 and 4 below.
115
116 NOTE 2: If you have other Ethernet adapters installed, your Marvell
117 Yukon or SysKonnect SK-98xx adapter will be mapped to the
118 next available number, e.g. 'eth1'. The mapping is executed
119 automatically.
120 The module installation message (displayed either in a system
121 log file or on the console) prints a line for each adapter
122 found containing the corresponding 'ethX'.
123
1243. Select an IP address and assign it to the respective adapter by
125 entering:
126 ifconfig eth0 <ip-address>
127 With this command, the adapter is connected to the Ethernet.
128
129 SK-98xx Gigabit Ethernet Server Adapters: The yellow LED on the adapter
130 is now active, the link status LED of the primary port is active and
131 the link status LED of the secondary port (on dual port adapters) is
132 blinking (if the ports are connected to a switch or hub).
133 SK-98xx V2.0 Gigabit Ethernet Adapters: The link status LED is active.
134 In addition, you will receive a status message on the console stating
135 "ethX: network connection up using port Y" and showing the selected
136 connection parameters (x stands for the ethernet device number
137 (0,1,2, etc), y stands for the port name (A or B)).
138
139 NOTE: If you are in doubt about IP addresses, ask your network
140 administrator for assistance.
141
1424. Your adapter should now be fully operational.
143 Use 'ping <otherstation>' to verify the connection to other computers
144 on your network.
1455. To check the adapter configuration view /proc/net/sk98lin/[devicename].
146 For example by executing:
147 "cat /proc/net/sk98lin/eth0"
148
149Unload the module
150-----------------
151To stop and unload the driver modules, proceed as follows:
152
1531. Execute the command "ifconfig eth0 down".
1542. Execute the command "rmmod sk98lin".
155
1563.2 Inclusion of adapter at system start
157-----------------------------------------
158
159Since a large number of different Linux distributions are
160available, we are unable to describe a general installation procedure
161for the driver module.
162Because the driver is now integrated in the kernel, installation should
163be easy, using the standard mechanism of your distribution.
164Refer to the distribution's manual for installation of ethernet adapters.
165
166***
167
1684 Driver Parameters
169====================
170
171Parameters can be set at the command line after the module has been
172loaded with the command 'modprobe'.
173In some distributions, the configuration tools are able to pass parameters
174to the driver module.
175
176If you use the kernel module loader, you can set driver parameters
177in the file /etc/modprobe.conf (or /etc/modules.conf in 2.4 or earlier).
178To set the driver parameters in this file, proceed as follows:
179
1801. Insert a line of the form :
181 options sk98lin ...
182 For "...", the same syntax is required as described for the command
183 line parameters of modprobe below.
1842. To activate the new parameters, either reboot your computer
185 or
186 unload and reload the driver.
187 The syntax of the driver parameters is:
188
189 modprobe sk98lin parameter=value1[,value2[,value3...]]
190
191 where value1 refers to the first adapter, value2 to the second etc.
192
193NOTE: All parameters are case sensitive. Write them exactly as shown
194 below.
195
196Example:
197Suppose you have two adapters. You want to set auto-negotiation
198on the first adapter to ON and on the second adapter to OFF.
199You also want to set DuplexCapabilities on the first adapter
200to FULL, and on the second adapter to HALF.
201Then, you must enter:
202
203 modprobe sk98lin AutoNeg_A=On,Off DupCap_A=Full,Half
204
205NOTE: The number of adapters that can be configured this way is
206 limited in the driver (file skge.c, constant SK_MAX_CARD_PARAM).
207 The current limit is 16. If you happen to install
208 more adapters, adjust this and recompile.
209
210
2114.1 Per-Port Parameters
212------------------------
213
214These settings are available for each port on the adapter.
215In the following description, '?' stands for the port for
216which you set the parameter (A or B).
217
218Speed
219-----
220Parameter: Speed_?
221Values: 10, 100, 1000, Auto
222Default: Auto
223
224This parameter is used to set the speed capabilities. It is only valid
225for the SK-98xx V2.0 copper adapters.
226Usually, the speed is negotiated between the two ports during link
227establishment. If this fails, a port can be forced to a specific setting
228with this parameter.
229
230Auto-Negotiation
231----------------
232Parameter: AutoNeg_?
233Values: On, Off, Sense
234Default: On
235
236The "Sense"-mode automatically detects whether the link partner supports
237auto-negotiation or not.
238
239Duplex Capabilities
240-------------------
241Parameter: DupCap_?
242Values: Half, Full, Both
243Default: Both
244
245This parameters is only relevant if auto-negotiation for this port is
246not set to "Sense". If auto-negotiation is set to "On", all three values
247are possible. If it is set to "Off", only "Full" and "Half" are allowed.
248This parameter is useful if your link partner does not support all
249possible combinations.
250
251Flow Control
252------------
253Parameter: FlowCtrl_?
254Values: Sym, SymOrRem, LocSend, None
255Default: SymOrRem
256
257This parameter can be used to set the flow control capabilities the
258port reports during auto-negotiation. It can be set for each port
259individually.
260Possible modes:
261 -- Sym = Symmetric: both link partners are allowed to send
262 PAUSE frames
263 -- SymOrRem = SymmetricOrRemote: both or only remote partner
264 are allowed to send PAUSE frames
265 -- LocSend = LocalSend: only local link partner is allowed
266 to send PAUSE frames
267 -- None = no link partner is allowed to send PAUSE frames
268
269NOTE: This parameter is ignored if auto-negotiation is set to "Off".
270
271Role in Master-Slave-Negotiation (1000Base-T only)
272--------------------------------------------------
273Parameter: Role_?
274Values: Auto, Master, Slave
275Default: Auto
276
277This parameter is only valid for the SK-9821 and SK-9822 adapters.
278For two 1000Base-T ports to communicate, one must take the role of the
279master (providing timing information), while the other must be the
280slave. Usually, this is negotiated between the two ports during link
281establishment. If this fails, a port can be forced to a specific setting
282with this parameter.
283
284
2854.2 Adapter Parameters
286-----------------------
287
288Connection Type (SK-98xx V2.0 copper adapters only)
289---------------
290Parameter: ConType
291Values: Auto, 100FD, 100HD, 10FD, 10HD
292Default: Auto
293
294The parameter 'ConType' is a combination of all five per-port parameters
295within one single parameter. This simplifies the configuration of both ports
296of an adapter card! The different values of this variable reflect the most
297meaningful combinations of port parameters.
298
299The following table shows the values of 'ConType' and the corresponding
300combinations of the per-port parameters:
301
302 ConType | DupCap AutoNeg FlowCtrl Role Speed
303 ----------+------------------------------------------------------
304 Auto | Both On SymOrRem Auto Auto
305 100FD | Full Off None Auto (ignored) 100
306 100HD | Half Off None Auto (ignored) 100
307 10FD | Full Off None Auto (ignored) 10
308 10HD | Half Off None Auto (ignored) 10
309
310Stating any other port parameter together with this 'ConType' variable
311will result in a merged configuration of those settings. This due to
312the fact, that the per-port parameters (e.g. Speed_? ) have a higher
313priority than the combined variable 'ConType'.
314
315NOTE: This parameter is always used on both ports of the adapter card.
316
317Interrupt Moderation
318--------------------
319Parameter: Moderation
320Values: None, Static, Dynamic
321Default: None
322
323Interrupt moderation is employed to limit the maximum number of interrupts
324the driver has to serve. That is, one or more interrupts (which indicate any
325transmit or receive packet to be processed) are queued until the driver
326processes them. When queued interrupts are to be served, is determined by the
327'IntsPerSec' parameter, which is explained later below.
328
329Possible modes:
330
331 -- None - No interrupt moderation is applied on the adapter card.
332 Therefore, each transmit or receive interrupt is served immediately
333 as soon as it appears on the interrupt line of the adapter card.
334
335 -- Static - Interrupt moderation is applied on the adapter card.
336 All transmit and receive interrupts are queued until a complete
337 moderation interval ends. If such a moderation interval ends, all
338 queued interrupts are processed in one big bunch without any delay.
339 The term 'static' reflects the fact, that interrupt moderation is
340 always enabled, regardless how much network load is currently
341 passing via a particular interface. In addition, the duration of
342 the moderation interval has a fixed length that never changes while
343 the driver is operational.
344
345 -- Dynamic - Interrupt moderation might be applied on the adapter card,
346 depending on the load of the system. If the driver detects that the
347 system load is too high, the driver tries to shield the system against
348 too much network load by enabling interrupt moderation. If - at a later
349 time - the CPU utilization decreases again (or if the network load is
350 negligible) the interrupt moderation will automatically be disabled.
351
352Interrupt moderation should be used when the driver has to handle one or more
353interfaces with a high network load, which - as a consequence - leads also to a
354high CPU utilization. When moderation is applied in such high network load
355situations, CPU load might be reduced by 20-30%.
356
357NOTE: The drawback of using interrupt moderation is an increase of the round-
358trip-time (RTT), due to the queueing and serving of interrupts at dedicated
359moderation times.
360
361Interrupts per second
362---------------------
363Parameter: IntsPerSec
364Values: 30...40000 (interrupts per second)
365Default: 2000
366
367This parameter is only used if either static or dynamic interrupt moderation
368is used on a network adapter card. Using this parameter if no moderation is
369applied will lead to no action performed.
370
371This parameter determines the length of any interrupt moderation interval.
372Assuming that static interrupt moderation is to be used, an 'IntsPerSec'
373parameter value of 2000 will lead to an interrupt moderation interval of
374500 microseconds.
375
376NOTE: The duration of the moderation interval is to be chosen with care.
377At first glance, selecting a very long duration (e.g. only 100 interrupts per
378second) seems to be meaningful, but the increase of packet-processing delay
379is tremendous. On the other hand, selecting a very short moderation time might
380compensate the use of any moderation being applied.
381
382
383Preferred Port
384--------------
385Parameter: PrefPort
386Values: A, B
387Default: A
388
389This is used to force the preferred port to A or B (on dual-port network
390adapters). The preferred port is the one that is used if both are detected
391as fully functional.
392
393RLMT Mode (Redundant Link Management Technology)
394------------------------------------------------
395Parameter: RlmtMode
396Values: CheckLinkState,CheckLocalPort, CheckSeg, DualNet
397Default: CheckLinkState
398
399RLMT monitors the status of the port. If the link of the active port
400fails, RLMT switches immediately to the standby link. The virtual link is
401maintained as long as at least one 'physical' link is up.
402
403Possible modes:
404
405 -- CheckLinkState - Check link state only: RLMT uses the link state
406 reported by the adapter hardware for each individual port to
407 determine whether a port can be used for all network traffic or
408 not.
409
410 -- CheckLocalPort - In this mode, RLMT monitors the network path
411 between the two ports of an adapter by regularly exchanging packets
412 between them. This mode requires a network configuration in which
413 the two ports are able to "see" each other (i.e. there must not be
414 any router between the ports).
415
416 -- CheckSeg - Check local port and segmentation: This mode supports the
417 same functions as the CheckLocalPort mode and additionally checks
418 network segmentation between the ports. Therefore, this mode is only
419 to be used if Gigabit Ethernet switches are installed on the network
420 that have been configured to use the Spanning Tree protocol.
421
422 -- DualNet - In this mode, ports A and B are used as separate devices.
423 If you have a dual port adapter, port A will be configured as eth0
424 and port B as eth1. Both ports can be used independently with
425 distinct IP addresses. The preferred port setting is not used.
426 RLMT is turned off.
427
428NOTE: RLMT modes CLP and CLPSS are designed to operate in configurations
429 where a network path between the ports on one adapter exists.
430 Moreover, they are not designed to work where adapters are connected
431 back-to-back.
432***
433
434
4355 Large Frame Support
436======================
437
438The driver supports large frames (also called jumbo frames). Using large
439frames can result in an improved throughput if transferring large amounts
440of data.
441To enable large frames, set the MTU (maximum transfer unit) of the
442interface to the desired value (up to 9000), execute the following
443command:
444 ifconfig eth0 mtu 9000
445This will only work if you have two adapters connected back-to-back
446or if you use a switch that supports large frames. When using a switch,
447it should be configured to allow large frames and auto-negotiation should
448be set to OFF. The setting must be configured on all adapters that can be
449reached by the large frames. If one adapter is not set to receive large
450frames, it will simply drop them.
451
452You can switch back to the standard ethernet frame size by executing the
453following command:
454 ifconfig eth0 mtu 1500
455
456To permanently configure this setting, add a script with the 'ifconfig'
457line to the system startup sequence (named something like "S99sk98lin"
458in /etc/rc.d/rc2.d).
459***
460
461
4626 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad)
463==================================================================
464
465The Marvell Yukon/SysKonnect Linux drivers are able to support VLAN and
466Link Aggregation according to IEEE standards 802.1, 802.1q, and 802.3ad.
467These features are only available after installation of open source
468modules available on the Internet:
469For VLAN go to: http://www.candelatech.com/~greear/vlan.html
470For Link Aggregation go to: http://www.st.rim.or.jp/~yumo
471
472NOTE: SysKonnect GmbH does not offer any support for these open source
473 modules and does not take the responsibility for any kind of
474 failures or problems arising in connection with these modules.
475
476NOTE: Configuring Link Aggregation on a SysKonnect dual link adapter may
477 cause problems when unloading the driver.
478
479
4807 Troubleshooting
481==================
482
483If any problems occur during the installation process, check the
484following list:
485
486
487Problem: The SK-98xx adapter cannot be found by the driver.
488Solution: In /proc/pci search for the following entry:
489 'Ethernet controller: SysKonnect SK-98xx ...'
490 If this entry exists, the SK-98xx or SK-98xx V2.0 adapter has
491 been found by the system and should be operational.
492 If this entry does not exist or if the file '/proc/pci' is not
493 found, there may be a hardware problem or the PCI support may
494 not be enabled in your kernel.
495 The adapter can be checked using the diagnostics program which
496 is available on the SysKonnect web site:
497 www.syskonnect.com
498
499 Some COMPAQ machines have problems dealing with PCI under Linux.
500 This problem is described in the 'PCI howto' document
501 (included in some distributions or available from the
502 web, e.g. at 'www.linux.org').
503
504
505Problem: Programs such as 'ifconfig' or 'route' cannot be found or the
506 error message 'Operation not permitted' is displayed.
507Reason: You are not logged in as user 'root'.
508Solution: Logout and login as 'root' or change to 'root' via 'su'.
509
510
511Problem: Upon use of the command 'ping <address>' the message
512 "ping: sendto: Network is unreachable" is displayed.
513Reason: Your route is not set correctly.
514Solution: If you are using RedHat, you probably forgot to set up the
515 route in the 'network configuration'.
516 Check the existing routes with the 'route' command and check
517 if an entry for 'eth0' exists, and if so, if it is set correctly.
518
519
520Problem: The driver can be started, the adapter is connected to the
521 network, but you cannot receive or transmit any packets;
522 e.g. 'ping' does not work.
523Reason: There is an incorrect route in your routing table.
524Solution: Check the routing table with the command 'route' and read the
525 manual help pages dealing with routes (enter 'man route').
526
527NOTE: Although the 2.2.x kernel versions generate the routing entry
528 automatically, problems of this kind may occur here as well. We've
529 come across a situation in which the driver started correctly at
530 system start, but after the driver has been removed and reloaded,
531 the route of the adapter's network pointed to the 'dummy0'device
532 and had to be corrected manually.
533
534
535Problem: Your computer should act as a router between multiple
536 IP subnetworks (using multiple adapters), but computers in
537 other subnetworks cannot be reached.
538Reason: Either the router's kernel is not configured for IP forwarding
539 or the routing table and gateway configuration of at least one
540 computer is not working.
541
542Problem: Upon driver start, the following error message is displayed:
543 "eth0: -- ERROR --
544 Class: internal Software error
545 Nr: 0xcc
546 Msg: SkGeInitPort() cannot init running ports"
547Reason: You are using a driver compiled for single processor machines
548 on a multiprocessor machine with SMP (Symmetric MultiProcessor)
549 kernel.
550Solution: Configure your kernel appropriately and recompile the kernel or
551 the modules.
552
553
554
555If your problem is not listed here, please contact SysKonnect's technical
556support for help (linux@syskonnect.de).
557When contacting our technical support, please ensure that the following
558information is available:
559- System Manufacturer and HW Informations (CPU, Memory... )
560- PCI-Boards in your system
561- Distribution
562- Kernel version
563- Driver version
564***
565
566
567
568***End of Readme File***
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt
index ef19142896..10c8f6922e 100644
--- a/Documentation/sysrq.txt
+++ b/Documentation/sysrq.txt
@@ -43,7 +43,7 @@ On x86 - You press the key combo 'ALT-SysRq-<command key>'. Note - Some
43 keyboards may not have a key labeled 'SysRq'. The 'SysRq' key is 43 keyboards may not have a key labeled 'SysRq'. The 'SysRq' key is
44 also known as the 'Print Screen' key. Also some keyboards cannot 44 also known as the 'Print Screen' key. Also some keyboards cannot
45 handle so many keys being pressed at the same time, so you might 45 handle so many keys being pressed at the same time, so you might
46 have better luck with "press Alt", "press SysRq", "release Alt", 46 have better luck with "press Alt", "press SysRq", "release SysRq",
47 "press <command key>", release everything. 47 "press <command key>", release everything.
48 48
49On SPARC - You press 'ALT-STOP-<command key>', I believe. 49On SPARC - You press 'ALT-STOP-<command key>', I believe.
diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt
index eb2f5986e1..60953d6c91 100644
--- a/Documentation/thinkpad-acpi.txt
+++ b/Documentation/thinkpad-acpi.txt
@@ -1,7 +1,7 @@
1 ThinkPad ACPI Extras Driver 1 ThinkPad ACPI Extras Driver
2 2
3 Version 0.15 3 Version 0.16
4 July 1st, 2007 4 August 2nd, 2007
5 5
6 Borislav Deianov <borislav@users.sf.net> 6 Borislav Deianov <borislav@users.sf.net>
7 Henrique de Moraes Holschuh <hmh@hmh.eng.br> 7 Henrique de Moraes Holschuh <hmh@hmh.eng.br>
@@ -161,20 +161,22 @@ system. Enabling the hotkey functionality of thinkpad-acpi signals the
161firmware that such a driver is present, and modifies how the ThinkPad 161firmware that such a driver is present, and modifies how the ThinkPad
162firmware will behave in many situations. 162firmware will behave in many situations.
163 163
164The driver enables the hot key feature automatically when loaded. The
165feature can later be disabled and enabled back at runtime. The driver
166will also restore the hot key feature to its previous state and mask
167when it is unloaded.
168
164When the hotkey feature is enabled and the hot key mask is set (see 169When the hotkey feature is enabled and the hot key mask is set (see
165below), the various hot keys either generate ACPI events in the 170below), the driver will report HKEY events in the following format:
166following format:
167 171
168 ibm/hotkey HKEY 00000080 0000xxxx 172 ibm/hotkey HKEY 00000080 0000xxxx
169 173
170or events over the input layer. The input layer support accepts the 174Some of these events refer to hot key presses, but not all.
171standard IOCTLs to remap the keycodes assigned to each hotkey.
172 175
173When the input device is open, the driver will suppress any ACPI hot key 176The driver will generate events over the input layer for hot keys and
174events that get translated into a meaningful input layer event, in order 177radio switches, and over the ACPI netlink layer for other events. The
175to avoid sending duplicate events to userspace. Hot keys that are 178input layer support accepts the standard IOCTLs to remap the keycodes
176mapped to KEY_RESERVED in the keymap are not translated, and will always 179assigned to each hot key.
177generate an ACPI ibm/hotkey HKEY event, and no input layer events.
178 180
179The hot key bit mask allows some control over which hot keys generate 181The hot key bit mask allows some control over which hot keys generate
180events. If a key is "masked" (bit set to 0 in the mask), the firmware 182events. If a key is "masked" (bit set to 0 in the mask), the firmware
@@ -256,6 +258,20 @@ sysfs notes:
256 disabled" postition, and 1 if the switch is in the 258 disabled" postition, and 1 if the switch is in the
257 "radios enabled" position. 259 "radios enabled" position.
258 260
261 hotkey_report_mode:
262 Returns the state of the procfs ACPI event report mode
263 filter for hot keys. If it is set to 1 (the default),
264 all hot key presses are reported both through the input
265 layer and also as ACPI events through procfs (but not
266 through netlink). If it is set to 2, hot key presses
267 are reported only through the input layer.
268
269 This attribute is read-only in kernels 2.6.23 or later,
270 and read-write on earlier kernels.
271
272 May return -EPERM (write access locked out by module
273 parameter) or -EACCES (read-only).
274
259input layer notes: 275input layer notes:
260 276
261A Hot key is mapped to a single input layer EV_KEY event, possibly 277A Hot key is mapped to a single input layer EV_KEY event, possibly
@@ -393,21 +409,63 @@ unknown by the driver if the ThinkPad firmware triggered these events on
393hot key press or release, but the firmware will do it for either one, not 409hot key press or release, but the firmware will do it for either one, not
394both. 410both.
395 411
396If a key is mapped to KEY_RESERVED, it generates no input events at all, 412If a key is mapped to KEY_RESERVED, it generates no input events at all.
397and it may generate a legacy thinkpad-acpi ACPI hotkey event.
398
399If a key is mapped to KEY_UNKNOWN, it generates an input event that 413If a key is mapped to KEY_UNKNOWN, it generates an input event that
400includes an scan code, and it may also generate a legacy thinkpad-acpi 414includes an scan code. If a key is mapped to anything else, it will
401ACPI hotkey event. 415generate input device EV_KEY events.
402
403If a key is mapped to anything else, it will only generate legacy
404thinkpad-acpi ACPI hotkey events if nobody has opened the input device.
405 416
406Non hot-key ACPI HKEY event map: 417Non hot-key ACPI HKEY event map:
4070x5001 Lid closed 4180x5001 Lid closed
4080x5002 Lid opened 4190x5002 Lid opened
4090x7000 Radio Switch may have changed state 4200x7000 Radio Switch may have changed state
410 421
422The above events are not propagated by the driver, except for legacy
423compatibility purposes when hotkey_report_mode is set to 1.
424
425Compatibility notes:
426
427ibm-acpi and thinkpad-acpi 0.15 (mainline kernels before 2.6.23) never
428supported the input layer, and sent events over the procfs ACPI event
429interface.
430
431To avoid sending duplicate events over the input layer and the ACPI
432event interface, thinkpad-acpi 0.16 implements a module parameter
433(hotkey_report_mode), and also a sysfs device attribute with the same
434name.
435
436Make no mistake here: userspace is expected to switch to using the input
437layer interface of thinkpad-acpi, together with the ACPI netlink event
438interface in kernels 2.6.23 and later, or with the ACPI procfs event
439interface in kernels 2.6.22 and earlier.
440
441If no hotkey_report_mode module parameter is specified (or it is set to
442zero), the driver defaults to mode 1 (see below), and on kernels 2.6.22
443and earlier, also allows one to change the hotkey_report_mode through
444sysfs. In kernels 2.6.23 and later, where the netlink ACPI event
445interface is available, hotkey_report_mode cannot be changed through
446sysfs (it is read-only).
447
448If the hotkey_report_mode module parameter is set to 1 or 2, it cannot
449be changed later through sysfs (any writes will return -EPERM to signal
450that hotkey_report_mode was locked. On 2.6.23 and later, where
451hotkey_report_mode cannot be changed at all, writes will return -EACES).
452
453hotkey_report_mode set to 1 makes the driver export through the procfs
454ACPI event interface all hot key presses (which are *also* sent to the
455input layer). This is a legacy compatibility behaviour, and it is also
456the default mode of operation for the driver.
457
458hotkey_report_mode set to 2 makes the driver filter out the hot key
459presses from the procfs ACPI event interface, so these events will only
460be sent through the input layer. Userspace that has been updated to use
461the thinkpad-acpi input layer interface should set hotkey_report_mode to
4622.
463
464Hot key press events are never sent to the ACPI netlink event interface.
465Really up-to-date userspace under kernel 2.6.23 and later is to use the
466netlink interface and the input layer interface, and don't bother at all
467with hotkey_report_mode.
468
411 469
412Bluetooth 470Bluetooth
413--------- 471---------
diff --git a/Documentation/video4linux/cx2341x/fw-encoder-api.txt b/Documentation/video4linux/cx2341x/fw-encoder-api.txt
index 5dd3109a8b..5a27af2ee1 100644
--- a/Documentation/video4linux/cx2341x/fw-encoder-api.txt
+++ b/Documentation/video4linux/cx2341x/fw-encoder-api.txt
@@ -407,8 +407,10 @@ Description
407 u32 length; // Length of this frame 407 u32 length; // Length of this frame
408 u32 offset_low; // Offset in the file of the 408 u32 offset_low; // Offset in the file of the
409 u32 offset_high; // start of this frame 409 u32 offset_high; // start of this frame
410 u32 mask1; // Bits 0-1 are the type mask: 410 u32 mask1; // Bits 0-2 are the type mask:
411 // 1=I, 2=P, 4=B 411 // 1=I, 2=P, 4=B
412 // 0=End of Program Index, other fields
413 // are invalid.
412 u32 pts; // The PTS of the frame 414 u32 pts; // The PTS of the frame
413 u32 mask2; // Bit 0 is bit 32 of the pts. 415 u32 mask2; // Bit 0 is bit 32 of the pts.
414 }; 416 };
diff --git a/MAINTAINERS b/MAINTAINERS
index abe5fa7f9c..9a91d9e3f1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -44,9 +44,10 @@ trivial patch so apply some common sense.
44 or does something very odd once a month document it. 44 or does something very odd once a month document it.
45 45
46 PLEASE remember that submissions must be made under the terms 46 PLEASE remember that submissions must be made under the terms
47 of the OSDL certificate of contribution 47 of the OSDL certificate of contribution and should include a
48 (http://www.osdl.org/newsroom/press_releases/2004/2004_05_24_dco.html) 48 Signed-off-by: line. The current version of this "Developer's
49 and should include a Signed-off-by: line. 49 Certificate of Origin" (DCO) is listed in the file
50 Documentation/SubmittingPatches.
50 51
516. Make sure you have the right to send any changes you make. If you 526. Make sure you have the right to send any changes you make. If you
52 do changes at work you may find your employer owns the patch 53 do changes at work you may find your employer owns the patch
@@ -167,11 +168,11 @@ S: Maintained
167P: Eric Van Hensbergen 168P: Eric Van Hensbergen
168M: ericvh@gmail.com 169M: ericvh@gmail.com
169P: Ron Minnich 170P: Ron Minnich
170M: rminnich@lanl.gov 171M: rminnich@sandia.gov
171P: Latchesar Ionkov 172P: Latchesar Ionkov
172M: lucho@ionkov.net 173M: lucho@ionkov.net
173L: v9fs-developer@lists.sourceforge.net 174L: v9fs-developer@lists.sourceforge.net
174W: http://v9fs.sf.net 175W: http://swik.net/v9fs
175T: git kernel.org:/pub/scm/linux/kernel/ericvh/v9fs.git 176T: git kernel.org:/pub/scm/linux/kernel/ericvh/v9fs.git
176S: Maintained 177S: Maintained
177 178
@@ -2057,12 +2058,18 @@ L: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
2057W: http://ipw2200.sourceforge.net 2058W: http://ipw2200.sourceforge.net
2058S: Supported 2059S: Supported
2059 2060
2060IOC3 DRIVER 2061IOC3 ETHERNET DRIVER
2061P: Ralf Baechle 2062P: Ralf Baechle
2062M: ralf@linux-mips.org 2063M: ralf@linux-mips.org
2063L: linux-mips@linux-mips.org 2064L: linux-mips@linux-mips.org
2064S: Maintained 2065S: Maintained
2065 2066
2067IOC3 SERIAL DRIVER
2068P: Pat Gefre
2069M: pfg@sgi.com
2070L: linux-kernel@linux-mips.org
2071S: Maintained
2072
2066IP MASQUERADING: 2073IP MASQUERADING:
2067P: Juanjo Ciarlante 2074P: Juanjo Ciarlante
2068M: jjciarla@raiz.uncu.edu.ar 2075M: jjciarla@raiz.uncu.edu.ar
@@ -2594,6 +2601,19 @@ M: shemminger@linux-foundation.org
2594L: netem@lists.linux-foundation.org 2601L: netem@lists.linux-foundation.org
2595S: Maintained 2602S: Maintained
2596 2603
2604NETERION (S2IO) Xframe 10GbE DRIVER
2605P: Ramkrishna Vepa
2606M: ram.vepa@neterion.com
2607P: Rastapur Santosh
2608M: santosh.rastapur@neterion.com
2609P: Sivakumar Subramani
2610M: sivakumar.subramani@neterion.com
2611P: Sreenivasa Honnur
2612M: sreenivasa.honnur@neterion.com
2613L: netdev@vger.kernel.org
2614W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous
2615S: Supported
2616
2597NETFILTER/IPTABLES/IPCHAINS 2617NETFILTER/IPTABLES/IPCHAINS
2598P: Rusty Russell 2618P: Rusty Russell
2599P: Marc Boucher 2619P: Marc Boucher
@@ -2602,8 +2622,8 @@ P: Harald Welte
2602P: Jozsef Kadlecsik 2622P: Jozsef Kadlecsik
2603P: Patrick McHardy 2623P: Patrick McHardy
2604M: kaber@trash.net 2624M: kaber@trash.net
2605L: netfilter-devel@lists.netfilter.org 2625L: netfilter-devel@vger.kernel.org
2606L: netfilter@lists.netfilter.org (subscribers-only) 2626L: netfilter@vger.kernel.org
2607L: coreteam@netfilter.org 2627L: coreteam@netfilter.org
2608W: http://www.netfilter.org/ 2628W: http://www.netfilter.org/
2609W: http://www.iptables.org/ 2629W: http://www.iptables.org/
@@ -2656,11 +2676,17 @@ M: jmorris@namei.org
2656P: Hideaki YOSHIFUJI 2676P: Hideaki YOSHIFUJI
2657M: yoshfuji@linux-ipv6.org 2677M: yoshfuji@linux-ipv6.org
2658P: Patrick McHardy 2678P: Patrick McHardy
2659M: kaber@coreworks.de 2679M: kaber@trash.net
2660L: netdev@vger.kernel.org 2680L: netdev@vger.kernel.org
2661T: git kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git 2681T: git kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git
2662S: Maintained 2682S: Maintained
2663 2683
2684NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK)
2685P: Paul Moore
2686M: paul.moore@hp.com
2687L: netdev@vger.kernel.org
2688S: Maintained
2689
2664NETWORKING [WIRELESS] 2690NETWORKING [WIRELESS]
2665P: John W. Linville 2691P: John W. Linville
2666M: linville@tuxdriver.com 2692M: linville@tuxdriver.com
@@ -2728,19 +2754,6 @@ M: adaplas@gmail.com
2728L: linux-fbdev-devel@lists.sourceforge.net (subscribers-only) 2754L: linux-fbdev-devel@lists.sourceforge.net (subscribers-only)
2729S: Maintained 2755S: Maintained
2730 2756
2731NETERION (S2IO) Xframe 10GbE DRIVER
2732P: Ramkrishna Vepa
2733M: ram.vepa@neterion.com
2734P: Rastapur Santosh
2735M: santosh.rastapur@neterion.com
2736P: Sivakumar Subramani
2737M: sivakumar.subramani@neterion.com
2738P: Sreenivasa Honnur
2739M: sreenivasa.honnur@neterion.com
2740L: netdev@vger.kernel.org
2741W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous
2742S: Supported
2743
2744OPENCORES I2C BUS DRIVER 2757OPENCORES I2C BUS DRIVER
2745P: Peter Korsgaard 2758P: Peter Korsgaard
2746M: jacmet@sunsite.dk 2759M: jacmet@sunsite.dk
diff --git a/Makefile b/Makefile
index f3229a4945..4635a64da3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 23 3SUBLEVEL = 23
4EXTRAVERSION =-rc3 4EXTRAVERSION =
5NAME = Holy Dancing Manatees, Batman! 5NAME = Arr Matey! A Hairy Bilge Rat!
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
8# To see a list of typical targets execute "make help" 8# To see a list of typical targets execute "make help"
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d6145298a3..691aae309c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -721,7 +721,8 @@ config LEDS
721 721
722config LEDS_TIMER 722config LEDS_TIMER
723 bool "Timer LED" if (!ARCH_CDB89712 && !ARCH_OMAP) || \ 723 bool "Timer LED" if (!ARCH_CDB89712 && !ARCH_OMAP) || \
724 MACH_OMAP_H2 || MACH_OMAP_PERSEUS2 724 OMAP_OSK_MISTRAL || MACH_OMAP_H2 \
725 || MACH_OMAP_PERSEUS2
725 depends on LEDS 726 depends on LEDS
726 depends on !GENERIC_CLOCKEVENTS 727 depends on !GENERIC_CLOCKEVENTS
727 default y if ARCH_EBSA110 728 default y if ARCH_EBSA110
@@ -738,7 +739,9 @@ config LEDS_TIMER
738 739
739config LEDS_CPU 740config LEDS_CPU
740 bool "CPU usage LED" if (!ARCH_CDB89712 && !ARCH_EBSA110 && \ 741 bool "CPU usage LED" if (!ARCH_CDB89712 && !ARCH_EBSA110 && \
741 !ARCH_OMAP) || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2 742 !ARCH_OMAP) \
743 || OMAP_OSK_MISTRAL || MACH_OMAP_H2 \
744 || MACH_OMAP_PERSEUS2
742 depends on LEDS 745 depends on LEDS
743 help 746 help
744 If you say Y here, the red LED will be used to give a good real 747 If you say Y here, the red LED will be used to give a good real
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 240c448ec3..a2dd930d11 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -338,7 +338,7 @@ pbus_assign_bus_resources(struct pci_bus *bus, struct pci_sys_data *root)
338 * pcibios_fixup_bus - Called after each bus is probed, 338 * pcibios_fixup_bus - Called after each bus is probed,
339 * but before its children are examined. 339 * but before its children are examined.
340 */ 340 */
341void __devinit pcibios_fixup_bus(struct pci_bus *bus) 341void pcibios_fixup_bus(struct pci_bus *bus)
342{ 342{
343 struct pci_sys_data *root = bus->sysdata; 343 struct pci_sys_data *root = bus->sysdata;
344 struct pci_dev *dev; 344 struct pci_dev *dev;
@@ -419,7 +419,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
419/* 419/*
420 * Convert from Linux-centric to bus-centric addresses for bridge devices. 420 * Convert from Linux-centric to bus-centric addresses for bridge devices.
421 */ 421 */
422void __devinit 422void
423pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, 423pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
424 struct resource *res) 424 struct resource *res)
425{ 425{
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 851cc7158c..70b2c78011 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -336,7 +336,7 @@ static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type)
336 if (line >= 0 && line < 16) { 336 if (line >= 0 && line < 16) {
337 gpio_line_config(line, GPIO_IN); 337 gpio_line_config(line, GPIO_IN);
338 } else { 338 } else {
339 gpio_line_config(EP93XX_GPIO_LINE_F(line), GPIO_IN); 339 gpio_line_config(EP93XX_GPIO_LINE_F(line-16), GPIO_IN);
340 } 340 }
341 341
342 port = line >> 3; 342 port = line >> 3;
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c
index a58b678006..4cfc9d3af2 100644
--- a/arch/arm/mach-imx/generic.c
+++ b/arch/arm/mach-imx/generic.c
@@ -101,10 +101,11 @@ EXPORT_SYMBOL(imx_gpio_mode);
101 101
102int imx_gpio_request(unsigned gpio, const char *label) 102int imx_gpio_request(unsigned gpio, const char *label)
103{ 103{
104 if(gpio >= (GPIO_PORT_MAX + 1) * 32) 104 if(gpio >= (GPIO_PORT_MAX + 1) * 32) {
105 printk(KERN_ERR "imx_gpio: Attempt to request nonexistent GPIO %d for \"%s\"\n", 105 printk(KERN_ERR "imx_gpio: Attempt to request nonexistent GPIO %d for \"%s\"\n",
106 gpio, label ? label : "?"); 106 gpio, label ? label : "?");
107 return -EINVAL; 107 return -EINVAL;
108 }
108 109
109 if(test_and_set_bit(gpio, imx_gpio_alloc_map)) { 110 if(test_and_set_bit(gpio, imx_gpio_alloc_map)) {
110 printk(KERN_ERR "imx_gpio: GPIO %d already used. Allocation for \"%s\" failed\n", 111 printk(KERN_ERR "imx_gpio: GPIO %d already used. Allocation for \"%s\" failed\n",
@@ -129,7 +130,7 @@ EXPORT_SYMBOL(imx_gpio_free);
129 130
130int imx_gpio_direction_input(unsigned gpio) 131int imx_gpio_direction_input(unsigned gpio)
131{ 132{
132 imx_gpio_mode(gpio| GPIO_IN); 133 imx_gpio_mode(gpio | GPIO_IN | GPIO_GIUS | GPIO_DR);
133 return 0; 134 return 0;
134} 135}
135 136
@@ -138,7 +139,7 @@ EXPORT_SYMBOL(imx_gpio_direction_input);
138int imx_gpio_direction_output(unsigned gpio, int value) 139int imx_gpio_direction_output(unsigned gpio, int value)
139{ 140{
140 imx_gpio_set_value(gpio, value); 141 imx_gpio_set_value(gpio, value);
141 imx_gpio_mode(gpio| GPIO_OUT); 142 imx_gpio_mode(gpio | GPIO_OUT | GPIO_GIUS | GPIO_DR);
142 return 0; 143 return 0;
143} 144}
144 145
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 7b260b7c53..79d4ef4c54 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -294,9 +294,11 @@ static int h3_select_irda(struct device *dev, int state)
294 return err; 294 return err;
295} 295}
296 296
297static void set_trans_mode(void *data) 297static void set_trans_mode(struct work_struct *work)
298{ 298{
299 int *mode = data; 299 struct omap_irda_config *irda_config =
300 container_of(work, struct omap_irda_config, gpio_expa.work);
301 int mode = irda_config->mode;
300 unsigned char expa; 302 unsigned char expa;
301 int err = 0; 303 int err = 0;
302 304
@@ -306,7 +308,7 @@ static void set_trans_mode(void *data)
306 308
307 expa &= ~0x03; 309 expa &= ~0x03;
308 310
309 if (*mode & IR_SIRMODE) { 311 if (mode & IR_SIRMODE) {
310 expa |= 0x01; 312 expa |= 0x01;
311 } else { /* MIR/FIR */ 313 } else { /* MIR/FIR */
312 expa |= 0x03; 314 expa |= 0x03;
@@ -321,9 +323,9 @@ static int h3_transceiver_mode(struct device *dev, int mode)
321{ 323{
322 struct omap_irda_config *irda_config = dev->platform_data; 324 struct omap_irda_config *irda_config = dev->platform_data;
323 325
326 irda_config->mode = mode;
324 cancel_delayed_work(&irda_config->gpio_expa); 327 cancel_delayed_work(&irda_config->gpio_expa);
325 PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode); 328 PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode);
326#error this is not permitted - mode is an argument variable
327 schedule_delayed_work(&irda_config->gpio_expa, 0); 329 schedule_delayed_work(&irda_config->gpio_expa, 0);
328 330
329 return 0; 331 return 0;
diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c
index 0cbf1b0071..86de303eca 100644
--- a/arch/arm/mach-omap1/leds-osk.c
+++ b/arch/arm/mach-omap1/leds-osk.c
@@ -133,13 +133,13 @@ void osk_leds_event(led_event_t evt)
133 mistral_setled(); 133 mistral_setled();
134 break; 134 break;
135 135
136 case led_idle_start: 136 case led_idle_start: /* idle == off */
137 hw_led_state |= IDLE_LED; 137 hw_led_state &= ~IDLE_LED;
138 mistral_setled(); 138 mistral_setled();
139 break; 139 break;
140 140
141 case led_idle_end: 141 case led_idle_end:
142 hw_led_state &= ~IDLE_LED; 142 hw_led_state |= IDLE_LED;
143 mistral_setled(); 143 mistral_setled();
144 break; 144 break;
145 145
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index 5bb348e2e3..2e68be6072 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -57,7 +57,6 @@
57#include <asm/arch/tc.h> 57#include <asm/arch/tc.h>
58#include <asm/arch/pm.h> 58#include <asm/arch/pm.h>
59#include <asm/arch/mux.h> 59#include <asm/arch/mux.h>
60#include <asm/arch/tps65010.h>
61#include <asm/arch/dma.h> 60#include <asm/arch/dma.h>
62#include <asm/arch/dsp_common.h> 61#include <asm/arch/dsp_common.h>
63#include <asm/arch/dmtimer.h> 62#include <asm/arch/dmtimer.h>
@@ -250,11 +249,6 @@ void omap_pm_suspend(void)
250 249
251 omap_serial_wake_trigger(1); 250 omap_serial_wake_trigger(1);
252 251
253 if (machine_is_omap_osk()) {
254 /* Stop LED1 (D9) blink */
255 tps65010_set_led(LED1, OFF);
256 }
257
258 if (!cpu_is_omap15xx()) 252 if (!cpu_is_omap15xx())
259 omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG); 253 omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG);
260 254
@@ -447,11 +441,6 @@ void omap_pm_suspend(void)
447 omap_serial_wake_trigger(0); 441 omap_serial_wake_trigger(0);
448 442
449 printk("PM: OMAP%x is re-starting from deep sleep...\n", system_rev); 443 printk("PM: OMAP%x is re-starting from deep sleep...\n", system_rev);
450
451 if (machine_is_omap_osk()) {
452 /* Let LED1 (D9) blink again */
453 tps65010_set_led(LED1, BLINK);
454 }
455} 444}
456 445
457#if defined(DEBUG) && defined(CONFIG_PROC_FS) 446#if defined(DEBUG) && defined(CONFIG_PROC_FS)
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 588adb5ab4..d9af4367f8 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -1160,8 +1160,8 @@ int __init omap2_clk_init(void)
1160 clk_enable(&sync_32k_ick); 1160 clk_enable(&sync_32k_ick);
1161 clk_enable(&omapctrl_ick); 1161 clk_enable(&omapctrl_ick);
1162 1162
1163 /* Force the APLLs active during bootup to avoid disabling and 1163 /* Force the APLLs always active. The clocks are idled
1164 * enabling them unnecessarily. */ 1164 * automatically by hardware. */
1165 clk_enable(&apll96_ck); 1165 clk_enable(&apll96_ck);
1166 clk_enable(&apll54_ck); 1166 clk_enable(&apll54_ck);
1167 1167
@@ -1174,12 +1174,3 @@ int __init omap2_clk_init(void)
1174 1174
1175 return 0; 1175 return 0;
1176} 1176}
1177
1178static int __init omap2_disable_aplls(void)
1179{
1180 clk_disable(&apll96_ck);
1181 clk_disable(&apll54_ck);
1182
1183 return 0;
1184}
1185late_initcall(omap2_disable_aplls);
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index aaa5589e81..e9c367fc9f 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -84,7 +84,7 @@ static inline void __init omap_serial_reset(struct plat_serial8250_port *p)
84 serial_write_reg(p, UART_OMAP_MDR1, 0x07); 84 serial_write_reg(p, UART_OMAP_MDR1, 0x07);
85 serial_write_reg(p, UART_OMAP_SCR, 0x08); 85 serial_write_reg(p, UART_OMAP_SCR, 0x08);
86 serial_write_reg(p, UART_OMAP_MDR1, 0x00); 86 serial_write_reg(p, UART_OMAP_MDR1, 0x00);
87 serial_write_reg(p, UART_OMAP_SYSC, 0x01); 87 serial_write_reg(p, UART_OMAP_SYSC, (0x02 << 3) | (1 << 2) | (1 << 0));
88} 88}
89 89
90void __init omap_serial_init() 90void __init omap_serial_init()
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 4b867b0789..ae2ae08032 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -365,7 +365,7 @@ void __init pxa_init_irq_gpio(int gpio_nr)
365 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 365 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
366 } 366 }
367 367
368 for (irq = IRQ_GPIO(2); irq <= IRQ_GPIO(gpio_nr); irq++) { 368 for (irq = IRQ_GPIO(2); irq < IRQ_GPIO(gpio_nr); irq++) {
369 set_irq_chip(irq, &pxa_muxed_gpio_chip); 369 set_irq_chip(irq, &pxa_muxed_gpio_chip);
370 set_irq_handler(irq, handle_edge_irq); 370 set_irq_handler(irq, handle_edge_irq);
371 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 371 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 3dba666151..ecec2f85c4 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -165,7 +165,7 @@ static void __init gic_init_irq(void)
165#endif 165#endif
166 gic_dist_init(0, __io_address(REALVIEW_GIC_DIST_BASE), 29); 166 gic_dist_init(0, __io_address(REALVIEW_GIC_DIST_BASE), 29);
167 gic_cpu_init(0, __io_address(REALVIEW_GIC_CPU_BASE)); 167 gic_cpu_init(0, __io_address(REALVIEW_GIC_CPU_BASE));
168#ifdef CONFIG_REALVIEW_MPCORE 168#if defined(CONFIG_REALVIEW_MPCORE) && !defined(CONFIG_REALVIEW_MPCORE_REVB)
169 gic_dist_init(1, __io_address(REALVIEW_GIC1_DIST_BASE), 64); 169 gic_dist_init(1, __io_address(REALVIEW_GIC1_DIST_BASE), 64);
170 gic_cpu_init(1, __io_address(REALVIEW_GIC1_CPU_BASE)); 170 gic_cpu_init(1, __io_address(REALVIEW_GIC1_CPU_BASE));
171 gic_cascade_irq(1, IRQ_EB_IRQ1); 171 gic_cascade_irq(1, IRQ_EB_IRQ1);
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c
index 0ba7e9060c..c326983f4a 100644
--- a/arch/arm/mach-s3c2440/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -276,7 +276,21 @@ static unsigned char pm_osiris_ctrl0;
276 276
277static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state) 277static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state)
278{ 278{
279 unsigned int tmp;
280
279 pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0); 281 pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0);
282 tmp = pm_osiris_ctrl0 & ~OSIRIS_CTRL0_NANDSEL;
283
284 /* ensure correct NAND slot is selected on resume */
285 if ((pm_osiris_ctrl0 & OSIRIS_CTRL0_BOOT_INT) == 0)
286 tmp |= 2;
287
288 __raw_writeb(tmp, OSIRIS_VA_CTRL0);
289
290 /* ensure that an nRESET is not generated on resume. */
291 s3c2410_gpio_setpin(S3C2410_GPA21, 1);
292 s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_OUT);
293
280 return 0; 294 return 0;
281} 295}
282 296
@@ -285,6 +299,10 @@ static int osiris_pm_resume(struct sys_device *sd)
285 if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8) 299 if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8)
286 __raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1); 300 __raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1);
287 301
302 __raw_writeb(pm_osiris_ctrl0, OSIRIS_VA_CTRL0);
303
304 s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_nRSTOUT);
305
288 return 0; 306 return 0;
289} 307}
290 308
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index b4e9b734e0..76b800a951 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -57,7 +57,17 @@ static void l2x0_inv_range(unsigned long start, unsigned long end)
57{ 57{
58 unsigned long addr; 58 unsigned long addr;
59 59
60 start &= ~(CACHE_LINE_SIZE - 1); 60 if (start & (CACHE_LINE_SIZE - 1)) {
61 start &= ~(CACHE_LINE_SIZE - 1);
62 sync_writel(start, L2X0_CLEAN_INV_LINE_PA, 1);
63 start += CACHE_LINE_SIZE;
64 }
65
66 if (end & (CACHE_LINE_SIZE - 1)) {
67 end &= ~(CACHE_LINE_SIZE - 1);
68 sync_writel(end, L2X0_CLEAN_INV_LINE_PA, 1);
69 }
70
61 for (addr = start; addr < end; addr += CACHE_LINE_SIZE) 71 for (addr = start; addr < end; addr += CACHE_LINE_SIZE)
62 sync_writel(addr, L2X0_INV_LINE_PA, 1); 72 sync_writel(addr, L2X0_INV_LINE_PA, 1);
63 cache_sync(); 73 cache_sync();
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 7987aa6e95..4f0f9c4e93 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -172,7 +172,7 @@ console_initcall(omap_add_serial_console);
172#if defined(CONFIG_ARCH_OMAP16XX) 172#if defined(CONFIG_ARCH_OMAP16XX)
173#define TIMER_32K_SYNCHRONIZED 0xfffbc410 173#define TIMER_32K_SYNCHRONIZED 0xfffbc410
174#elif defined(CONFIG_ARCH_OMAP24XX) 174#elif defined(CONFIG_ARCH_OMAP24XX)
175#define TIMER_32K_SYNCHRONIZED 0x48004010 175#define TIMER_32K_SYNCHRONIZED (OMAP24XX_32KSYNCT_BASE + 0x10)
176#endif 176#endif
177 177
178#ifdef TIMER_32K_SYNCHRONIZED 178#ifdef TIMER_32K_SYNCHRONIZED
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 36073dfaa4..3856f5aedf 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -271,11 +271,6 @@ int omap_dm_timer_get_irq(struct omap_dm_timer *timer)
271 271
272#if defined(CONFIG_ARCH_OMAP1) 272#if defined(CONFIG_ARCH_OMAP1)
273 273
274struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
275{
276 BUG();
277}
278
279/** 274/**
280 * omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR 275 * omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR
281 * @inputmask: current value of idlect mask 276 * @inputmask: current value of idlect mask
diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c
index b0af014b0e..ea76f1979a 100644
--- a/arch/arm/plat-omap/timer32k.c
+++ b/arch/arm/plat-omap/timer32k.c
@@ -71,7 +71,7 @@ struct sys_timer omap_timer;
71#if defined(CONFIG_ARCH_OMAP16XX) 71#if defined(CONFIG_ARCH_OMAP16XX)
72#define TIMER_32K_SYNCHRONIZED 0xfffbc410 72#define TIMER_32K_SYNCHRONIZED 0xfffbc410
73#elif defined(CONFIG_ARCH_OMAP24XX) 73#elif defined(CONFIG_ARCH_OMAP24XX)
74#define TIMER_32K_SYNCHRONIZED 0x48004010 74#define TIMER_32K_SYNCHRONIZED (OMAP24XX_32KSYNCT_BASE + 0x10)
75#else 75#else
76#error OMAP 32KHz timer does not currently work on 15XX! 76#error OMAP 32KHz timer does not currently work on 15XX!
77#endif 77#endif
@@ -147,14 +147,15 @@ static inline void omap_32k_timer_ack_irq(void)
147static void omap_32k_timer_set_mode(enum clock_event_mode mode, 147static void omap_32k_timer_set_mode(enum clock_event_mode mode,
148 struct clock_event_device *evt) 148 struct clock_event_device *evt)
149{ 149{
150 omap_32k_timer_stop();
151
150 switch (mode) { 152 switch (mode) {
151 case CLOCK_EVT_MODE_ONESHOT:
152 case CLOCK_EVT_MODE_PERIODIC: 153 case CLOCK_EVT_MODE_PERIODIC:
153 omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD); 154 omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD);
154 break; 155 break;
156 case CLOCK_EVT_MODE_ONESHOT:
155 case CLOCK_EVT_MODE_UNUSED: 157 case CLOCK_EVT_MODE_UNUSED:
156 case CLOCK_EVT_MODE_SHUTDOWN: 158 case CLOCK_EVT_MODE_SHUTDOWN:
157 omap_32k_timer_stop();
158 break; 159 break;
159 case CLOCK_EVT_MODE_RESUME: 160 case CLOCK_EVT_MODE_RESUME:
160 break; 161 break;
@@ -194,8 +195,6 @@ omap_32k_ticks_to_nsecs(unsigned long ticks_32k)
194 return (unsigned long long) ticks_32k * 1000 * 5*5*5*5*5*5 >> 9; 195 return (unsigned long long) ticks_32k * 1000 * 5*5*5*5*5*5 >> 9;
195} 196}
196 197
197static unsigned long omap_32k_last_tick = 0;
198
199/* 198/*
200 * Returns current time from boot in nsecs. It's OK for this to wrap 199 * Returns current time from boot in nsecs. It's OK for this to wrap
201 * around for now, as it's just a relative time stamp. 200 * around for now, as it's just a relative time stamp.
@@ -225,7 +224,6 @@ static __init void omap_init_32k_timer(void)
225{ 224{
226 if (cpu_class_is_omap1()) 225 if (cpu_class_is_omap1())
227 setup_irq(INT_OS_TIMER, &omap_32k_timer_irq); 226 setup_irq(INT_OS_TIMER, &omap_32k_timer_irq);
228 omap_32k_last_tick = omap_32k_sync_timer_read();
229 227
230#ifdef CONFIG_ARCH_OMAP2 228#ifdef CONFIG_ARCH_OMAP2
231 /* REVISIT: Check 24xx TIOCP_CFG settings after idle works */ 229 /* REVISIT: Check 24xx TIOCP_CFG settings after idle works */
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 04ddab2bd8..eea3f50743 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -323,6 +323,7 @@ static int __init vfp_init(void)
323 * we just need to read the VFPSID register. 323 * we just need to read the VFPSID register.
324 */ 324 */
325 vfp_vector = vfp_testing_entry; 325 vfp_vector = vfp_testing_entry;
326 barrier();
326 vfpsid = fmrx(FPSID); 327 vfpsid = fmrx(FPSID);
327 barrier(); 328 barrier();
328 vfp_vector = vfp_null_entry; 329 vfp_vector = vfp_null_entry;
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index bafcfa5214..5d488ef965 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -84,6 +84,7 @@
84#include <linux/err.h> 84#include <linux/err.h>
85#include <asm/blackfin.h> 85#include <asm/blackfin.h>
86#include <asm/gpio.h> 86#include <asm/gpio.h>
87#include <asm/portmux.h>
87#include <linux/irq.h> 88#include <linux/irq.h>
88 89
89#ifdef BF533_FAMILY 90#ifdef BF533_FAMILY
@@ -115,7 +116,11 @@ static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
115}; 116};
116#endif 117#endif
117 118
118static unsigned short reserved_map[gpio_bank(MAX_BLACKFIN_GPIOS)]; 119static unsigned short reserved_gpio_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
120static unsigned short reserved_peri_map[gpio_bank(MAX_BLACKFIN_GPIOS + 16)];
121char *str_ident = NULL;
122
123#define RESOURCE_LABEL_SIZE 16
119 124
120#ifdef CONFIG_PM 125#ifdef CONFIG_PM
121static unsigned short wakeup_map[gpio_bank(MAX_BLACKFIN_GPIOS)]; 126static unsigned short wakeup_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
@@ -143,22 +148,100 @@ inline int check_gpio(unsigned short gpio)
143 return 0; 148 return 0;
144} 149}
145 150
151static void set_label(unsigned short ident, const char *label)
152{
153
154 if (label && str_ident) {
155 strncpy(str_ident + ident * RESOURCE_LABEL_SIZE, label,
156 RESOURCE_LABEL_SIZE);
157 str_ident[ident * RESOURCE_LABEL_SIZE +
158 RESOURCE_LABEL_SIZE - 1] = 0;
159 }
160}
161
162static char *get_label(unsigned short ident)
163{
164 if (!str_ident)
165 return "UNKNOWN";
166
167 return (str_ident[ident * RESOURCE_LABEL_SIZE] ?
168 (str_ident + ident * RESOURCE_LABEL_SIZE) : "UNKNOWN");
169}
170
171static int cmp_label(unsigned short ident, const char *label)
172{
173 if (label && str_ident)
174 return strncmp(str_ident + ident * RESOURCE_LABEL_SIZE,
175 label, strlen(label));
176 else
177 return -EINVAL;
178}
179
146#ifdef BF537_FAMILY 180#ifdef BF537_FAMILY
147static void port_setup(unsigned short gpio, unsigned short usage) 181static void port_setup(unsigned short gpio, unsigned short usage)
148{ 182{
149 if (usage == GPIO_USAGE) { 183 if (!check_gpio(gpio)) {
150 if (*port_fer[gpio_bank(gpio)] & gpio_bit(gpio)) 184 if (usage == GPIO_USAGE) {
151 printk(KERN_WARNING "bfin-gpio: Possible Conflict with Peripheral " 185 *port_fer[gpio_bank(gpio)] &= ~gpio_bit(gpio);
152 "usage and GPIO %d detected!\n", gpio); 186 } else
153 *port_fer[gpio_bank(gpio)] &= ~gpio_bit(gpio); 187 *port_fer[gpio_bank(gpio)] |= gpio_bit(gpio);
154 } else 188 SSYNC();
155 *port_fer[gpio_bank(gpio)] |= gpio_bit(gpio); 189 }
156 SSYNC();
157} 190}
158#else 191#else
159# define port_setup(...) do { } while (0) 192# define port_setup(...) do { } while (0)
160#endif 193#endif
161 194
195#ifdef BF537_FAMILY
196
197#define PMUX_LUT_RES 0
198#define PMUX_LUT_OFFSET 1
199#define PMUX_LUT_ENTRIES 41
200#define PMUX_LUT_SIZE 2
201
202static unsigned short port_mux_lut[PMUX_LUT_ENTRIES][PMUX_LUT_SIZE] = {
203 {P_PPI0_D13, 11}, {P_PPI0_D14, 11}, {P_PPI0_D15, 11},
204 {P_SPORT1_TFS, 11}, {P_SPORT1_TSCLK, 11}, {P_SPORT1_DTPRI, 11},
205 {P_PPI0_D10, 10}, {P_PPI0_D11, 10}, {P_PPI0_D12, 10},
206 {P_SPORT1_RSCLK, 10}, {P_SPORT1_RFS, 10}, {P_SPORT1_DRPRI, 10},
207 {P_PPI0_D8, 9}, {P_PPI0_D9, 9}, {P_SPORT1_DRSEC, 9},
208 {P_SPORT1_DTSEC, 9}, {P_TMR2, 8}, {P_PPI0_FS3, 8}, {P_TMR3, 7},
209 {P_SPI0_SSEL4, 7}, {P_TMR4, 6}, {P_SPI0_SSEL5, 6}, {P_TMR5, 5},
210 {P_SPI0_SSEL6, 5}, {P_UART1_RX, 4}, {P_UART1_TX, 4}, {P_TMR6, 4},
211 {P_TMR7, 4}, {P_UART0_RX, 3}, {P_UART0_TX, 3}, {P_DMAR0, 3},
212 {P_DMAR1, 3}, {P_SPORT0_DTSEC, 1}, {P_SPORT0_DRSEC, 1},
213 {P_CAN0_RX, 1}, {P_CAN0_TX, 1}, {P_SPI0_SSEL7, 1},
214 {P_SPORT0_TFS, 0}, {P_SPORT0_DTPRI, 0}, {P_SPI0_SSEL2, 0},
215 {P_SPI0_SSEL3, 0}
216};
217
218static void portmux_setup(unsigned short per, unsigned short function)
219{
220 u16 y, muxreg, offset;
221
222 for (y = 0; y < PMUX_LUT_ENTRIES; y++) {
223 if (port_mux_lut[y][PMUX_LUT_RES] == per) {
224
225 /* SET PORTMUX REG */
226
227 offset = port_mux_lut[y][PMUX_LUT_OFFSET];
228 muxreg = bfin_read_PORT_MUX();
229
230 if (offset != 1) {
231 muxreg &= ~(1 << offset);
232 } else {
233 muxreg &= ~(3 << 1);
234 }
235
236 muxreg |= (function << offset);
237 bfin_write_PORT_MUX(muxreg);
238 }
239 }
240}
241
242#else
243# define portmux_setup(...) do { } while (0)
244#endif
162 245
163static void default_gpio(unsigned short gpio) 246static void default_gpio(unsigned short gpio)
164{ 247{
@@ -179,22 +262,15 @@ static void default_gpio(unsigned short gpio)
179 262
180static int __init bfin_gpio_init(void) 263static int __init bfin_gpio_init(void)
181{ 264{
182 int i;
183
184 printk(KERN_INFO "Blackfin GPIO Controller\n");
185 265
186 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) 266 str_ident = kzalloc(RESOURCE_LABEL_SIZE * 256, GFP_KERNEL);
187 reserved_map[gpio_bank(i)] = 0; 267 if (!str_ident)
268 return -ENOMEM;
188 269
189#if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) 270 printk(KERN_INFO "Blackfin GPIO Controller\n");
190# if defined(CONFIG_BFIN_MAC_RMII)
191 reserved_map[gpio_bank(PORT_H)] = 0xC373;
192# else
193 reserved_map[gpio_bank(PORT_H)] = 0xFFFF;
194# endif
195#endif
196 271
197 return 0; 272 return 0;
273
198} 274}
199 275
200arch_initcall(bfin_gpio_init); 276arch_initcall(bfin_gpio_init);
@@ -223,7 +299,7 @@ arch_initcall(bfin_gpio_init);
223void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \ 299void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \
224{ \ 300{ \
225 unsigned long flags; \ 301 unsigned long flags; \
226 BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); \ 302 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
227 local_irq_save(flags); \ 303 local_irq_save(flags); \
228 if (arg) \ 304 if (arg) \
229 gpio_bankb[gpio_bank(gpio)]->name |= gpio_bit(gpio); \ 305 gpio_bankb[gpio_bank(gpio)]->name |= gpio_bit(gpio); \
@@ -243,7 +319,7 @@ SET_GPIO(both)
243#define SET_GPIO_SC(name) \ 319#define SET_GPIO_SC(name) \
244void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \ 320void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \
245{ \ 321{ \
246 BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); \ 322 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
247 if (arg) \ 323 if (arg) \
248 gpio_bankb[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \ 324 gpio_bankb[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \
249 else \ 325 else \
@@ -258,7 +334,7 @@ SET_GPIO_SC(maskb)
258void set_gpio_data(unsigned short gpio, unsigned short arg) 334void set_gpio_data(unsigned short gpio, unsigned short arg)
259{ 335{
260 unsigned long flags; 336 unsigned long flags;
261 BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); 337 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
262 local_irq_save(flags); 338 local_irq_save(flags);
263 if (arg) 339 if (arg)
264 gpio_bankb[gpio_bank(gpio)]->data_set = gpio_bit(gpio); 340 gpio_bankb[gpio_bank(gpio)]->data_set = gpio_bit(gpio);
@@ -277,7 +353,7 @@ SET_GPIO_SC(data)
277void set_gpio_toggle(unsigned short gpio) 353void set_gpio_toggle(unsigned short gpio)
278{ 354{
279 unsigned long flags; 355 unsigned long flags;
280 BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); 356 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
281 local_irq_save(flags); 357 local_irq_save(flags);
282 gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio); 358 gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio);
283 bfin_read_CHIPID(); 359 bfin_read_CHIPID();
@@ -286,7 +362,7 @@ void set_gpio_toggle(unsigned short gpio)
286#else 362#else
287void set_gpio_toggle(unsigned short gpio) 363void set_gpio_toggle(unsigned short gpio)
288{ 364{
289 BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); 365 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
290 gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio); 366 gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio);
291} 367}
292#endif 368#endif
@@ -350,7 +426,7 @@ unsigned short get_gpio_data(unsigned short gpio)
350{ 426{
351 unsigned long flags; 427 unsigned long flags;
352 unsigned short ret; 428 unsigned short ret;
353 BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); 429 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
354 local_irq_save(flags); 430 local_irq_save(flags);
355 ret = 0x01 & (gpio_bankb[gpio_bank(gpio)]->data >> gpio_sub_n(gpio)); 431 ret = 0x01 & (gpio_bankb[gpio_bank(gpio)]->data >> gpio_sub_n(gpio));
356 bfin_read_CHIPID(); 432 bfin_read_CHIPID();
@@ -494,13 +570,14 @@ u32 gpio_pm_setup(void)
494 gpio_bank_saved[bank].dir = gpio_bankb[bank]->dir; 570 gpio_bank_saved[bank].dir = gpio_bankb[bank]->dir;
495 gpio_bank_saved[bank].edge = gpio_bankb[bank]->edge; 571 gpio_bank_saved[bank].edge = gpio_bankb[bank]->edge;
496 gpio_bank_saved[bank].both = gpio_bankb[bank]->both; 572 gpio_bank_saved[bank].both = gpio_bankb[bank]->both;
497 gpio_bank_saved[bank].reserved = reserved_map[bank]; 573 gpio_bank_saved[bank].reserved =
574 reserved_gpio_map[bank];
498 575
499 gpio = i; 576 gpio = i;
500 577
501 while (mask) { 578 while (mask) {
502 if (mask & 1) { 579 if (mask & 1) {
503 reserved_map[gpio_bank(gpio)] |= 580 reserved_gpio_map[gpio_bank(gpio)] |=
504 gpio_bit(gpio); 581 gpio_bit(gpio);
505 bfin_gpio_wakeup_type(gpio, 582 bfin_gpio_wakeup_type(gpio,
506 wakeup_flags_map[gpio]); 583 wakeup_flags_map[gpio]);
@@ -540,7 +617,8 @@ void gpio_pm_restore(void)
540 gpio_bankb[bank]->edge = gpio_bank_saved[bank].edge; 617 gpio_bankb[bank]->edge = gpio_bank_saved[bank].edge;
541 gpio_bankb[bank]->both = gpio_bank_saved[bank].both; 618 gpio_bankb[bank]->both = gpio_bank_saved[bank].both;
542 619
543 reserved_map[bank] = gpio_bank_saved[bank].reserved; 620 reserved_gpio_map[bank] =
621 gpio_bank_saved[bank].reserved;
544 622
545 } 623 }
546 624
@@ -550,6 +628,141 @@ void gpio_pm_restore(void)
550 628
551#endif 629#endif
552 630
631
632
633
634int peripheral_request(unsigned short per, const char *label)
635{
636 unsigned long flags;
637 unsigned short ident = P_IDENT(per);
638
639 /*
640 * Don't cares are pins with only one dedicated function
641 */
642
643 if (per & P_DONTCARE)
644 return 0;
645
646 if (!(per & P_DEFINED))
647 return -ENODEV;
648
649 local_irq_save(flags);
650
651 if (!check_gpio(ident)) {
652
653 if (unlikely(reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) {
654 printk(KERN_ERR
655 "%s: Peripheral %d is already reserved as GPIO by %s !\n",
656 __FUNCTION__, ident, get_label(ident));
657 dump_stack();
658 local_irq_restore(flags);
659 return -EBUSY;
660 }
661
662 }
663
664 if (unlikely(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident))) {
665
666 /*
667 * Pin functions like AMC address strobes my
668 * be requested and used by several drivers
669 */
670
671 if (!(per & P_MAYSHARE)) {
672
673 /*
674 * Allow that the identical pin function can
675 * be requested from the same driver twice
676 */
677
678 if (cmp_label(ident, label) == 0)
679 goto anyway;
680
681 printk(KERN_ERR
682 "%s: Peripheral %d function %d is already"
683 "reserved by %s !\n",
684 __FUNCTION__, ident, P_FUNCT2MUX(per),
685 get_label(ident));
686 dump_stack();
687 local_irq_restore(flags);
688 return -EBUSY;
689 }
690
691 }
692
693anyway:
694
695
696 portmux_setup(per, P_FUNCT2MUX(per));
697
698 port_setup(ident, PERIPHERAL_USAGE);
699
700 reserved_peri_map[gpio_bank(ident)] |= gpio_bit(ident);
701 local_irq_restore(flags);
702 set_label(ident, label);
703
704 return 0;
705}
706EXPORT_SYMBOL(peripheral_request);
707
708int peripheral_request_list(unsigned short per[], const char *label)
709{
710 u16 cnt;
711 int ret;
712
713 for (cnt = 0; per[cnt] != 0; cnt++) {
714 ret = peripheral_request(per[cnt], label);
715 if (ret < 0)
716 return ret;
717 }
718
719 return 0;
720}
721EXPORT_SYMBOL(peripheral_request_list);
722
723void peripheral_free(unsigned short per)
724{
725 unsigned long flags;
726 unsigned short ident = P_IDENT(per);
727
728 if (per & P_DONTCARE)
729 return;
730
731 if (!(per & P_DEFINED))
732 return;
733
734 if (check_gpio(ident) < 0)
735 return;
736
737 local_irq_save(flags);
738
739 if (unlikely(!(reserved_peri_map[gpio_bank(ident)]
740 & gpio_bit(ident)))) {
741 local_irq_restore(flags);
742 return;
743 }
744
745 if (!(per & P_MAYSHARE)) {
746 port_setup(ident, GPIO_USAGE);
747 }
748
749 reserved_peri_map[gpio_bank(ident)] &= ~gpio_bit(ident);
750
751 local_irq_restore(flags);
752}
753EXPORT_SYMBOL(peripheral_free);
754
755void peripheral_free_list(unsigned short per[])
756{
757 u16 cnt;
758
759 for (cnt = 0; per[cnt] != 0; cnt++) {
760 peripheral_free(per[cnt]);
761 }
762
763}
764EXPORT_SYMBOL(peripheral_free_list);
765
553/*********************************************************** 766/***********************************************************
554* 767*
555* FUNCTIONS: Blackfin GPIO Driver 768* FUNCTIONS: Blackfin GPIO Driver
@@ -574,13 +787,13 @@ int gpio_request(unsigned short gpio, const char *label)
574 787
575 local_irq_save(flags); 788 local_irq_save(flags);
576 789
577 if (unlikely(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))) { 790 if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
578 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved!\n", gpio); 791 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved!\n", gpio);
579 dump_stack(); 792 dump_stack();
580 local_irq_restore(flags); 793 local_irq_restore(flags);
581 return -EBUSY; 794 return -EBUSY;
582 } 795 }
583 reserved_map[gpio_bank(gpio)] |= gpio_bit(gpio); 796 reserved_gpio_map[gpio_bank(gpio)] |= gpio_bit(gpio);
584 797
585 local_irq_restore(flags); 798 local_irq_restore(flags);
586 799
@@ -599,7 +812,7 @@ void gpio_free(unsigned short gpio)
599 812
600 local_irq_save(flags); 813 local_irq_save(flags);
601 814
602 if (unlikely(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)))) { 815 if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
603 printk(KERN_ERR "bfin-gpio: GPIO %d wasn't reserved!\n", gpio); 816 printk(KERN_ERR "bfin-gpio: GPIO %d wasn't reserved!\n", gpio);
604 dump_stack(); 817 dump_stack();
605 local_irq_restore(flags); 818 local_irq_restore(flags);
@@ -608,7 +821,7 @@ void gpio_free(unsigned short gpio)
608 821
609 default_gpio(gpio); 822 default_gpio(gpio);
610 823
611 reserved_map[gpio_bank(gpio)] &= ~gpio_bit(gpio); 824 reserved_gpio_map[gpio_bank(gpio)] &= ~gpio_bit(gpio);
612 825
613 local_irq_restore(flags); 826 local_irq_restore(flags);
614} 827}
@@ -618,7 +831,7 @@ void gpio_direction_input(unsigned short gpio)
618{ 831{
619 unsigned long flags; 832 unsigned long flags;
620 833
621 BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); 834 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
622 835
623 local_irq_save(flags); 836 local_irq_save(flags);
624 gpio_bankb[gpio_bank(gpio)]->dir &= ~gpio_bit(gpio); 837 gpio_bankb[gpio_bank(gpio)]->dir &= ~gpio_bit(gpio);
@@ -631,7 +844,7 @@ void gpio_direction_output(unsigned short gpio)
631{ 844{
632 unsigned long flags; 845 unsigned long flags;
633 846
634 BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); 847 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
635 848
636 local_irq_save(flags); 849 local_irq_save(flags);
637 gpio_bankb[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio); 850 gpio_bankb[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio);
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index d61bba98fb..9604588083 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -815,7 +815,7 @@ _extable:
815 815
816ALIGN 816ALIGN
817ENTRY(_sys_call_table) 817ENTRY(_sys_call_table)
818 .long _sys_ni_syscall /* 0 - old "setup()" system call*/ 818 .long _sys_restart_syscall /* 0 */
819 .long _sys_exit 819 .long _sys_exit
820 .long _sys_fork 820 .long _sys_fork
821 .long _sys_read 821 .long _sys_read
@@ -978,13 +978,13 @@ ENTRY(_sys_call_table)
978 .long _sys_sched_get_priority_min /* 160 */ 978 .long _sys_sched_get_priority_min /* 160 */
979 .long _sys_sched_rr_get_interval 979 .long _sys_sched_rr_get_interval
980 .long _sys_nanosleep 980 .long _sys_nanosleep
981 .long _sys_ni_syscall /* sys_mremap */ 981 .long _sys_mremap
982 .long _sys_setresuid /* setresuid16 */ 982 .long _sys_setresuid /* setresuid16 */
983 .long _sys_getresuid /* getresuid16 */ /* 165 */ 983 .long _sys_getresuid /* getresuid16 */ /* 165 */
984 .long _sys_ni_syscall /* for vm86 */ 984 .long _sys_ni_syscall /* for vm86 */
985 .long _sys_ni_syscall /* old "query_module" */ 985 .long _sys_ni_syscall /* old "query_module" */
986 .long _sys_ni_syscall /* sys_poll */ 986 .long _sys_ni_syscall /* sys_poll */
987 .long _sys_ni_syscall /* sys_nfsservctl */ 987 .long _sys_nfsservctl
988 .long _sys_setresgid /* setresgid16 */ /* 170 */ 988 .long _sys_setresgid /* setresgid16 */ /* 170 */
989 .long _sys_getresgid /* getresgid16 */ 989 .long _sys_getresgid /* getresgid16 */
990 .long _sys_prctl 990 .long _sys_prctl
@@ -1040,7 +1040,7 @@ ENTRY(_sys_call_table)
1040 .long _sys_ni_syscall /* reserved for TUX */ 1040 .long _sys_ni_syscall /* reserved for TUX */
1041 .long _sys_ni_syscall 1041 .long _sys_ni_syscall
1042 .long _sys_gettid 1042 .long _sys_gettid
1043 .long _sys_ni_syscall /* 225 */ /* sys_readahead */ 1043 .long _sys_readahead /* 225 */
1044 .long _sys_setxattr 1044 .long _sys_setxattr
1045 .long _sys_lsetxattr 1045 .long _sys_lsetxattr
1046 .long _sys_fsetxattr 1046 .long _sys_fsetxattr
@@ -1157,6 +1157,21 @@ ENTRY(_sys_call_table)
1157 .long _sys_shmctl 1157 .long _sys_shmctl
1158 .long _sys_shmdt /* 340 */ 1158 .long _sys_shmdt /* 340 */
1159 .long _sys_shmget 1159 .long _sys_shmget
1160 .long _sys_splice
1161 .long _sys_sync_file_range
1162 .long _sys_tee
1163 .long _sys_vmsplice /* 345 */
1164 .long _sys_epoll_pwait
1165 .long _sys_utimensat
1166 .long _sys_signalfd
1167 .long _sys_timerfd
1168 .long _sys_eventfd /* 350 */
1169 .long _sys_pread64
1170 .long _sys_pwrite64
1171 .long _sys_fadvise64
1172 .long _sys_set_robust_list
1173 .long _sys_get_robust_list /* 355 */
1174 .long _sys_fallocate
1160 .rept NR_syscalls-(.-_sys_call_table)/4 1175 .rept NR_syscalls-(.-_sys_call_table)/4
1161 .long _sys_ni_syscall 1176 .long _sys_ni_syscall
1162 .endr 1177 .endr
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c
index 1772d8d2c1..b103027222 100644
--- a/arch/blackfin/mach-common/pm.c
+++ b/arch/blackfin/mach-common/pm.c
@@ -158,10 +158,16 @@ static int bfin_pm_finish(suspend_state_t state)
158 return 0; 158 return 0;
159} 159}
160 160
161static int bfin_pm_valid(suspend_state_t state)
162{
163 return (state == PM_SUSPEND_STANDBY);
164}
165
161struct pm_ops bfin_pm_ops = { 166struct pm_ops bfin_pm_ops = {
162 .prepare = bfin_pm_prepare, 167 .prepare = bfin_pm_prepare,
163 .enter = bfin_pm_enter, 168 .enter = bfin_pm_enter,
164 .finish = bfin_pm_finish, 169 .finish = bfin_pm_finish,
170 .valid = bfin_pm_valid,
165}; 171};
166 172
167static int __init bfin_pm_init(void) 173static int __init bfin_pm_init(void)
diff --git a/arch/h8300/Kconfig.debug b/arch/h8300/Kconfig.debug
index 554efe604a..996d97e953 100644
--- a/arch/h8300/Kconfig.debug
+++ b/arch/h8300/Kconfig.debug
@@ -59,7 +59,7 @@ config BLKDEV_RESERVE
59 help 59 help
60 Reserved BLKDEV area. 60 Reserved BLKDEV area.
61 61
62config CONFIG_BLKDEV_RESERVE_ADDRESS 62config BLKDEV_RESERVE_ADDRESS
63 hex 'start address' 63 hex 'start address'
64 depends on BLKDEV_RESERVE 64 depends on BLKDEV_RESERVE
65 help 65 help
diff --git a/arch/i386/boot/boot.h b/arch/i386/boot/boot.h
index dec70c9b60..20bab9431a 100644
--- a/arch/i386/boot/boot.h
+++ b/arch/i386/boot/boot.h
@@ -87,7 +87,7 @@ static inline void set_fs(u16 seg)
87static inline u16 fs(void) 87static inline u16 fs(void)
88{ 88{
89 u16 seg; 89 u16 seg;
90 asm("movw %%fs,%0" : "=rm" (seg)); 90 asm volatile("movw %%fs,%0" : "=rm" (seg));
91 return seg; 91 return seg;
92} 92}
93 93
@@ -98,7 +98,7 @@ static inline void set_gs(u16 seg)
98static inline u16 gs(void) 98static inline u16 gs(void)
99{ 99{
100 u16 seg; 100 u16 seg;
101 asm("movw %%gs,%0" : "=rm" (seg)); 101 asm volatile("movw %%gs,%0" : "=rm" (seg));
102 return seg; 102 return seg;
103} 103}
104 104
@@ -107,19 +107,19 @@ typedef unsigned int addr_t;
107static inline u8 rdfs8(addr_t addr) 107static inline u8 rdfs8(addr_t addr)
108{ 108{
109 u8 v; 109 u8 v;
110 asm("movb %%fs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr)); 110 asm volatile("movb %%fs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr));
111 return v; 111 return v;
112} 112}
113static inline u16 rdfs16(addr_t addr) 113static inline u16 rdfs16(addr_t addr)
114{ 114{
115 u16 v; 115 u16 v;
116 asm("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr)); 116 asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
117 return v; 117 return v;
118} 118}
119static inline u32 rdfs32(addr_t addr) 119static inline u32 rdfs32(addr_t addr)
120{ 120{
121 u32 v; 121 u32 v;
122 asm("movl %%fs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr)); 122 asm volatile("movl %%fs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
123 return v; 123 return v;
124} 124}
125 125
@@ -139,19 +139,19 @@ static inline void wrfs32(u32 v, addr_t addr)
139static inline u8 rdgs8(addr_t addr) 139static inline u8 rdgs8(addr_t addr)
140{ 140{
141 u8 v; 141 u8 v;
142 asm("movb %%gs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr)); 142 asm volatile("movb %%gs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr));
143 return v; 143 return v;
144} 144}
145static inline u16 rdgs16(addr_t addr) 145static inline u16 rdgs16(addr_t addr)
146{ 146{
147 u16 v; 147 u16 v;
148 asm("movw %%gs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr)); 148 asm volatile("movw %%gs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
149 return v; 149 return v;
150} 150}
151static inline u32 rdgs32(addr_t addr) 151static inline u32 rdgs32(addr_t addr)
152{ 152{
153 u32 v; 153 u32 v;
154 asm("movl %%gs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr)); 154 asm volatile("movl %%gs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
155 return v; 155 return v;
156} 156}
157 157
@@ -180,15 +180,15 @@ static inline int memcmp(const void *s1, const void *s2, size_t len)
180static inline int memcmp_fs(const void *s1, addr_t s2, size_t len) 180static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
181{ 181{
182 u8 diff; 182 u8 diff;
183 asm("fs; repe; cmpsb; setnz %0" 183 asm volatile("fs; repe; cmpsb; setnz %0"
184 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); 184 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
185 return diff; 185 return diff;
186} 186}
187static inline int memcmp_gs(const void *s1, addr_t s2, size_t len) 187static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
188{ 188{
189 u8 diff; 189 u8 diff;
190 asm("gs; repe; cmpsb; setnz %0" 190 asm volatile("gs; repe; cmpsb; setnz %0"
191 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); 191 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
192 return diff; 192 return diff;
193} 193}
194 194
diff --git a/arch/i386/boot/cpucheck.c b/arch/i386/boot/cpucheck.c
index 991e8ceae1..e655a89c55 100644
--- a/arch/i386/boot/cpucheck.c
+++ b/arch/i386/boot/cpucheck.c
@@ -96,7 +96,8 @@ static int has_fpu(void)
96 asm volatile("movl %0,%%cr0" : : "r" (cr0)); 96 asm volatile("movl %0,%%cr0" : : "r" (cr0));
97 } 97 }
98 98
99 asm("fninit ; fnstsw %0 ; fnstcw %1" : "+m" (fsw), "+m" (fcw)); 99 asm volatile("fninit ; fnstsw %0 ; fnstcw %1"
100 : "+m" (fsw), "+m" (fcw));
100 101
101 return fsw == 0 && (fcw & 0x103f) == 0x003f; 102 return fsw == 0 && (fcw & 0x103f) == 0x003f;
102} 103}
diff --git a/arch/i386/boot/edd.c b/arch/i386/boot/edd.c
index 82b5c846a1..bd138e442e 100644
--- a/arch/i386/boot/edd.c
+++ b/arch/i386/boot/edd.c
@@ -30,9 +30,9 @@ static int read_mbr(u8 devno, void *buf)
30 cx = 0x0001; /* Sector 0-0-1 */ 30 cx = 0x0001; /* Sector 0-0-1 */
31 dx = devno; 31 dx = devno;
32 bx = (size_t)buf; 32 bx = (size_t)buf;
33 asm("pushfl; stc; int $0x13; setc %%al; popfl" 33 asm volatile("pushfl; stc; int $0x13; setc %%al; popfl"
34 : "+a" (ax), "+c" (cx), "+d" (dx), "+b" (bx) 34 : "+a" (ax), "+c" (cx), "+d" (dx), "+b" (bx)
35 : : "esi", "edi", "memory"); 35 : : "esi", "edi", "memory");
36 36
37 return -(u8)ax; /* 0 or -1 */ 37 return -(u8)ax; /* 0 or -1 */
38} 38}
diff --git a/arch/i386/boot/header.S b/arch/i386/boot/header.S
index 7f4a2c53bd..f3140e596d 100644
--- a/arch/i386/boot/header.S
+++ b/arch/i386/boot/header.S
@@ -275,7 +275,7 @@ die:
275 hlt 275 hlt
276 jmp die 276 jmp die
277 277
278 .size die, .-due 278 .size die, .-die
279 279
280 .section ".initdata", "a" 280 .section ".initdata", "a"
281setup_corrupt: 281setup_corrupt:
diff --git a/arch/i386/boot/memory.c b/arch/i386/boot/memory.c
index 1a2e62db8b..378353956b 100644
--- a/arch/i386/boot/memory.c
+++ b/arch/i386/boot/memory.c
@@ -20,6 +20,7 @@
20 20
21static int detect_memory_e820(void) 21static int detect_memory_e820(void)
22{ 22{
23 int count = 0;
23 u32 next = 0; 24 u32 next = 0;
24 u32 size, id; 25 u32 size, id;
25 u8 err; 26 u8 err;
@@ -27,20 +28,33 @@ static int detect_memory_e820(void)
27 28
28 do { 29 do {
29 size = sizeof(struct e820entry); 30 size = sizeof(struct e820entry);
30 id = SMAP; 31
32 /* Important: %edx is clobbered by some BIOSes,
33 so it must be either used for the error output
34 or explicitly marked clobbered. */
31 asm("int $0x15; setc %0" 35 asm("int $0x15; setc %0"
32 : "=am" (err), "+b" (next), "+d" (id), "+c" (size), 36 : "=d" (err), "+b" (next), "=a" (id), "+c" (size),
33 "=m" (*desc) 37 "=m" (*desc)
34 : "D" (desc), "a" (0xe820)); 38 : "D" (desc), "d" (SMAP), "a" (0xe820));
39
40 /* Some BIOSes stop returning SMAP in the middle of
41 the search loop. We don't know exactly how the BIOS
42 screwed up the map at that point, we might have a
43 partial map, the full map, or complete garbage, so
44 just return failure. */
45 if (id != SMAP) {
46 count = 0;
47 break;
48 }
35 49
36 if (err || id != SMAP) 50 if (err)
37 break; 51 break;
38 52
39 boot_params.e820_entries++; 53 count++;
40 desc++; 54 desc++;
41 } while (next && boot_params.e820_entries < E820MAX); 55 } while (next && count < E820MAX);
42 56
43 return boot_params.e820_entries; 57 return boot_params.e820_entries = count;
44} 58}
45 59
46static int detect_memory_e801(void) 60static int detect_memory_e801(void)
@@ -89,11 +103,16 @@ static int detect_memory_88(void)
89 103
90int detect_memory(void) 104int detect_memory(void)
91{ 105{
106 int err = -1;
107
92 if (detect_memory_e820() > 0) 108 if (detect_memory_e820() > 0)
93 return 0; 109 err = 0;
94 110
95 if (!detect_memory_e801()) 111 if (!detect_memory_e801())
96 return 0; 112 err = 0;
113
114 if (!detect_memory_88())
115 err = 0;
97 116
98 return detect_memory_88(); 117 return err;
99} 118}
diff --git a/arch/i386/boot/pm.c b/arch/i386/boot/pm.c
index 6be9ca811d..09fb342cc6 100644
--- a/arch/i386/boot/pm.c
+++ b/arch/i386/boot/pm.c
@@ -122,7 +122,11 @@ static void setup_gdt(void)
122 /* DS: data, read/write, 4 GB, base 0 */ 122 /* DS: data, read/write, 4 GB, base 0 */
123 [GDT_ENTRY_BOOT_DS] = GDT_ENTRY(0xc093, 0, 0xfffff), 123 [GDT_ENTRY_BOOT_DS] = GDT_ENTRY(0xc093, 0, 0xfffff),
124 }; 124 };
125 struct gdt_ptr gdt; 125 /* Xen HVM incorrectly stores a pointer to the gdt_ptr, instead
126 of the gdt_ptr contents. Thus, make it static so it will
127 stay in memory, at least long enough that we switch to the
128 proper kernel GDT. */
129 static struct gdt_ptr gdt;
126 130
127 gdt.len = sizeof(boot_gdt)-1; 131 gdt.len = sizeof(boot_gdt)-1;
128 gdt.ptr = (u32)&boot_gdt + (ds() << 4); 132 gdt.ptr = (u32)&boot_gdt + (ds() << 4);
diff --git a/arch/i386/boot/tty.c b/arch/i386/boot/tty.c
index 9c668aad35..f3f14bd263 100644
--- a/arch/i386/boot/tty.c
+++ b/arch/i386/boot/tty.c
@@ -54,9 +54,9 @@ static u8 gettime(void)
54 u16 ax = 0x0200; 54 u16 ax = 0x0200;
55 u16 cx, dx; 55 u16 cx, dx;
56 56
57 asm("int $0x1a" 57 asm volatile("int $0x1a"
58 : "+a" (ax), "=c" (cx), "=d" (dx) 58 : "+a" (ax), "=c" (cx), "=d" (dx)
59 : : "ebx", "esi", "edi"); 59 : : "ebx", "esi", "edi");
60 60
61 return dx >> 8; 61 return dx >> 8;
62} 62}
@@ -67,7 +67,7 @@ static u8 gettime(void)
67int getchar(void) 67int getchar(void)
68{ 68{
69 u16 ax = 0; 69 u16 ax = 0;
70 asm("int $0x16" : "+a" (ax)); 70 asm volatile("int $0x16" : "+a" (ax));
71 71
72 return ax & 0xff; 72 return ax & 0xff;
73} 73}
@@ -75,9 +75,9 @@ int getchar(void)
75static int kbd_pending(void) 75static int kbd_pending(void)
76{ 76{
77 u8 pending; 77 u8 pending;
78 asm("int $0x16; setnz %0" 78 asm volatile("int $0x16; setnz %0"
79 : "=rm" (pending) 79 : "=rm" (pending)
80 : "a" (0x0100)); 80 : "a" (0x0100));
81 return pending; 81 return pending;
82} 82}
83 83
diff --git a/arch/i386/boot/video-vesa.c b/arch/i386/boot/video-vesa.c
index f1bc71e948..1921907107 100644
--- a/arch/i386/boot/video-vesa.c
+++ b/arch/i386/boot/video-vesa.c
@@ -29,7 +29,7 @@ static void vesa_store_mode_params_graphics(void);
29static int vesa_probe(void) 29static int vesa_probe(void)
30{ 30{
31#if defined(CONFIG_VIDEO_VESA) || defined(CONFIG_FIRMWARE_EDID) 31#if defined(CONFIG_VIDEO_VESA) || defined(CONFIG_FIRMWARE_EDID)
32 u16 ax; 32 u16 ax, cx, di;
33 u16 mode; 33 u16 mode;
34 addr_t mode_ptr; 34 addr_t mode_ptr;
35 struct mode_info *mi; 35 struct mode_info *mi;
@@ -39,9 +39,11 @@ static int vesa_probe(void)
39 39
40 vginfo.signature = VBE2_MAGIC; 40 vginfo.signature = VBE2_MAGIC;
41 41
42 /* Optimistically assume a VESA BIOS is register-clean... */
43 ax = 0x4f00; 42 ax = 0x4f00;
44 asm("int $0x10" : "+a" (ax), "=m" (vginfo) : "D" (&vginfo)); 43 di = (size_t)&vginfo;
44 asm(INT10
45 : "+a" (ax), "+D" (di), "=m" (vginfo)
46 : : "ebx", "ecx", "edx", "esi");
45 47
46 if (ax != 0x004f || 48 if (ax != 0x004f ||
47 vginfo.signature != VESA_MAGIC || 49 vginfo.signature != VESA_MAGIC ||
@@ -64,9 +66,11 @@ static int vesa_probe(void)
64 memset(&vminfo, 0, sizeof vminfo); /* Just in case... */ 66 memset(&vminfo, 0, sizeof vminfo); /* Just in case... */
65 67
66 ax = 0x4f01; 68 ax = 0x4f01;
67 asm("int $0x10" 69 cx = mode;
68 : "+a" (ax), "=m" (vminfo) 70 di = (size_t)&vminfo;
69 : "c" (mode), "D" (&vminfo)); 71 asm(INT10
72 : "+a" (ax), "+c" (cx), "+D" (di), "=m" (vminfo)
73 : : "ebx", "edx", "esi");
70 74
71 if (ax != 0x004f) 75 if (ax != 0x004f)
72 continue; 76 continue;
@@ -102,16 +106,18 @@ static int vesa_probe(void)
102 106
103static int vesa_set_mode(struct mode_info *mode) 107static int vesa_set_mode(struct mode_info *mode)
104{ 108{
105 u16 ax; 109 u16 ax, bx, cx, di;
106 int is_graphic; 110 int is_graphic;
107 u16 vesa_mode = mode->mode - VIDEO_FIRST_VESA; 111 u16 vesa_mode = mode->mode - VIDEO_FIRST_VESA;
108 112
109 memset(&vminfo, 0, sizeof vminfo); /* Just in case... */ 113 memset(&vminfo, 0, sizeof vminfo); /* Just in case... */
110 114
111 ax = 0x4f01; 115 ax = 0x4f01;
112 asm("int $0x10" 116 cx = vesa_mode;
113 : "+a" (ax), "=m" (vminfo) 117 di = (size_t)&vminfo;
114 : "c" (vesa_mode), "D" (&vminfo)); 118 asm(INT10
119 : "+a" (ax), "+c" (cx), "+D" (di), "=m" (vminfo)
120 : : "ebx", "edx", "esi");
115 121
116 if (ax != 0x004f) 122 if (ax != 0x004f)
117 return -1; 123 return -1;
@@ -129,9 +135,11 @@ static int vesa_set_mode(struct mode_info *mode)
129 135
130 136
131 ax = 0x4f02; 137 ax = 0x4f02;
132 asm volatile("int $0x10" 138 bx = vesa_mode;
133 : "+a" (ax) 139 di = 0;
134 : "b" (vesa_mode), "D" (0)); 140 asm volatile(INT10
141 : "+a" (ax), "+b" (bx), "+D" (di)
142 : : "ecx", "edx", "esi");
135 143
136 if (ax != 0x004f) 144 if (ax != 0x004f)
137 return -1; 145 return -1;
diff --git a/arch/i386/boot/video-vga.c b/arch/i386/boot/video-vga.c
index 700d09a9c9..aef02f9ec0 100644
--- a/arch/i386/boot/video-vga.c
+++ b/arch/i386/boot/video-vga.c
@@ -47,16 +47,16 @@ static u8 vga_set_basic_mode(void)
47 47
48#ifdef CONFIG_VIDEO_400_HACK 48#ifdef CONFIG_VIDEO_400_HACK
49 if (adapter >= ADAPTER_VGA) { 49 if (adapter >= ADAPTER_VGA) {
50 asm(INT10 50 asm volatile(INT10
51 : : "a" (0x1202), "b" (0x0030) 51 : : "a" (0x1202), "b" (0x0030)
52 : "ecx", "edx", "esi", "edi"); 52 : "ecx", "edx", "esi", "edi");
53 } 53 }
54#endif 54#endif
55 55
56 ax = 0x0f00; 56 ax = 0x0f00;
57 asm(INT10 57 asm volatile(INT10
58 : "+a" (ax) 58 : "+a" (ax)
59 : : "ebx", "ecx", "edx", "esi", "edi"); 59 : : "ebx", "ecx", "edx", "esi", "edi");
60 60
61 mode = (u8)ax; 61 mode = (u8)ax;
62 62
@@ -73,9 +73,10 @@ static u8 vga_set_basic_mode(void)
73 mode = 3; 73 mode = 3;
74 74
75 /* Set the mode */ 75 /* Set the mode */
76 ax = mode;
76 asm volatile(INT10 77 asm volatile(INT10
77 : : "a" (mode) 78 : "+a" (ax)
78 : "ebx", "ecx", "edx", "esi", "edi"); 79 : : "ebx", "ecx", "edx", "esi", "edi");
79 do_restore = 1; 80 do_restore = 1;
80 return mode; 81 return mode;
81} 82}
diff --git a/arch/i386/boot/video.c b/arch/i386/boot/video.c
index 693f20d310..e4ba897bf9 100644
--- a/arch/i386/boot/video.c
+++ b/arch/i386/boot/video.c
@@ -147,7 +147,7 @@ int mode_defined(u16 mode)
147} 147}
148 148
149/* Set mode (without recalc) */ 149/* Set mode (without recalc) */
150static int raw_set_mode(u16 mode) 150static int raw_set_mode(u16 mode, u16 *real_mode)
151{ 151{
152 int nmode, i; 152 int nmode, i;
153 struct card_info *card; 153 struct card_info *card;
@@ -165,8 +165,10 @@ static int raw_set_mode(u16 mode)
165 165
166 if ((mode == nmode && visible) || 166 if ((mode == nmode && visible) ||
167 mode == mi->mode || 167 mode == mi->mode ||
168 mode == (mi->y << 8)+mi->x) 168 mode == (mi->y << 8)+mi->x) {
169 *real_mode = mi->mode;
169 return card->set_mode(mi); 170 return card->set_mode(mi);
171 }
170 172
171 if (visible) 173 if (visible)
172 nmode++; 174 nmode++;
@@ -178,7 +180,7 @@ static int raw_set_mode(u16 mode)
178 if (mode >= card->xmode_first && 180 if (mode >= card->xmode_first &&
179 mode < card->xmode_first+card->xmode_n) { 181 mode < card->xmode_first+card->xmode_n) {
180 struct mode_info mix; 182 struct mode_info mix;
181 mix.mode = mode; 183 *real_mode = mix.mode = mode;
182 mix.x = mix.y = 0; 184 mix.x = mix.y = 0;
183 return card->set_mode(&mix); 185 return card->set_mode(&mix);
184 } 186 }
@@ -223,6 +225,7 @@ static void vga_recalc_vertical(void)
223static int set_mode(u16 mode) 225static int set_mode(u16 mode)
224{ 226{
225 int rv; 227 int rv;
228 u16 real_mode;
226 229
227 /* Very special mode numbers... */ 230 /* Very special mode numbers... */
228 if (mode == VIDEO_CURRENT_MODE) 231 if (mode == VIDEO_CURRENT_MODE)
@@ -232,13 +235,16 @@ static int set_mode(u16 mode)
232 else if (mode == EXTENDED_VGA) 235 else if (mode == EXTENDED_VGA)
233 mode = VIDEO_8POINT; 236 mode = VIDEO_8POINT;
234 237
235 rv = raw_set_mode(mode); 238 rv = raw_set_mode(mode, &real_mode);
236 if (rv) 239 if (rv)
237 return rv; 240 return rv;
238 241
239 if (mode & VIDEO_RECALC) 242 if (mode & VIDEO_RECALC)
240 vga_recalc_vertical(); 243 vga_recalc_vertical();
241 244
245 /* Save the canonical mode number for the kernel, not
246 an alias, size specification or menu position */
247 boot_params.hdr.vid_mode = real_mode;
242 return 0; 248 return 0;
243} 249}
244 250
diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S
index ed0a0f2c15..f22ba8534d 100644
--- a/arch/i386/kernel/acpi/wakeup.S
+++ b/arch/i386/kernel/acpi/wakeup.S
@@ -151,51 +151,30 @@ bogus_real_magic:
151#define VIDEO_FIRST_V7 0x0900 151#define VIDEO_FIRST_V7 0x0900
152 152
153# Setting of user mode (AX=mode ID) => CF=success 153# Setting of user mode (AX=mode ID) => CF=success
154
155# For now, we only handle VESA modes (0x0200..0x03ff). To handle other
156# modes, we should probably compile in the video code from the boot
157# directory.
154mode_set: 158mode_set:
155 movw %ax, %bx 159 movw %ax, %bx
156#if 0 160 subb $VIDEO_FIRST_VESA>>8, %bh
157 cmpb $0xff, %ah 161 cmpb $2, %bh
158 jz setalias 162 jb check_vesa
159
160 testb $VIDEO_RECALC>>8, %ah
161 jnz _setrec
162
163 cmpb $VIDEO_FIRST_RESOLUTION>>8, %ah
164 jnc setres
165
166 cmpb $VIDEO_FIRST_SPECIAL>>8, %ah
167 jz setspc
168
169 cmpb $VIDEO_FIRST_V7>>8, %ah
170 jz setv7
171#endif
172
173 cmpb $VIDEO_FIRST_VESA>>8, %ah
174 jnc check_vesa
175#if 0
176 orb %ah, %ah
177 jz setmenu
178#endif
179
180 decb %ah
181# jz setbios Add bios modes later
182 163
183setbad: clc 164setbad:
165 clc
184 ret 166 ret
185 167
186check_vesa: 168check_vesa:
187 subb $VIDEO_FIRST_VESA>>8, %bh
188 orw $0x4000, %bx # Use linear frame buffer 169 orw $0x4000, %bx # Use linear frame buffer
189 movw $0x4f02, %ax # VESA BIOS mode set call 170 movw $0x4f02, %ax # VESA BIOS mode set call
190 int $0x10 171 int $0x10
191 cmpw $0x004f, %ax # AL=4f if implemented 172 cmpw $0x004f, %ax # AL=4f if implemented
192 jnz _setbad # AH=0 if OK 173 jnz setbad # AH=0 if OK
193 174
194 stc 175 stc
195 ret 176 ret
196 177
197_setbad: jmp setbad
198
199 .code32 178 .code32
200 ALIGN 179 ALIGN
201 180
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c
index 9f4ac8b02d..bd72d94e71 100644
--- a/arch/i386/kernel/alternative.c
+++ b/arch/i386/kernel/alternative.c
@@ -445,8 +445,6 @@ void __kprobes text_poke(void *addr, unsigned char *opcode, int len)
445{ 445{
446 memcpy(addr, opcode, len); 446 memcpy(addr, opcode, len);
447 sync_core(); 447 sync_core();
448 /* Not strictly needed, but can speed CPU recovery up. Ignore cross cacheline 448 /* Could also do a CLFLUSH here to speed up CPU recovery; but
449 case. */ 449 that causes hangs on some VIA CPUs. */
450 if (cpu_has_clflush)
451 asm("clflush (%0) " :: "r" (addr) : "memory");
452} 450}
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index ef8f0bc3fc..f0cce3c2dc 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -76,6 +76,7 @@ static unsigned int longhaul_index;
76/* Module parameters */ 76/* Module parameters */
77static int scale_voltage; 77static int scale_voltage;
78static int disable_acpi_c3; 78static int disable_acpi_c3;
79static int revid_errata;
79 80
80#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg) 81#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg)
81 82
@@ -168,7 +169,10 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index,
168 169
169 rdmsrl(MSR_VIA_LONGHAUL, longhaul.val); 170 rdmsrl(MSR_VIA_LONGHAUL, longhaul.val);
170 /* Setup new frequency */ 171 /* Setup new frequency */
171 longhaul.bits.RevisionKey = longhaul.bits.RevisionID; 172 if (!revid_errata)
173 longhaul.bits.RevisionKey = longhaul.bits.RevisionID;
174 else
175 longhaul.bits.RevisionKey = 0;
172 longhaul.bits.SoftBusRatio = clock_ratio_index & 0xf; 176 longhaul.bits.SoftBusRatio = clock_ratio_index & 0xf;
173 longhaul.bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4; 177 longhaul.bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4;
174 /* Setup new voltage */ 178 /* Setup new voltage */
@@ -272,7 +276,7 @@ static void longhaul_setstate(unsigned int table_index)
272 276
273 dprintk ("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n", 277 dprintk ("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n",
274 fsb, mult/10, mult%10, print_speed(speed/1000)); 278 fsb, mult/10, mult%10, print_speed(speed/1000));
275 279retry_loop:
276 preempt_disable(); 280 preempt_disable();
277 local_irq_save(flags); 281 local_irq_save(flags);
278 282
@@ -344,6 +348,47 @@ static void longhaul_setstate(unsigned int table_index)
344 preempt_enable(); 348 preempt_enable();
345 349
346 freqs.new = calc_speed(longhaul_get_cpu_mult()); 350 freqs.new = calc_speed(longhaul_get_cpu_mult());
351 /* Check if requested frequency is set. */
352 if (unlikely(freqs.new != speed)) {
353 printk(KERN_INFO PFX "Failed to set requested frequency!\n");
354 /* Revision ID = 1 but processor is expecting revision key
355 * equal to 0. Jumpers at the bottom of processor will change
356 * multiplier and FSB, but will not change bits in Longhaul
357 * MSR nor enable voltage scaling. */
358 if (!revid_errata) {
359 printk(KERN_INFO PFX "Enabling \"Ignore Revision ID\" "
360 "option.\n");
361 revid_errata = 1;
362 msleep(200);
363 goto retry_loop;
364 }
365 /* Why ACPI C3 sometimes doesn't work is a mystery for me.
366 * But it does happen. Processor is entering ACPI C3 state,
367 * but it doesn't change frequency. I tried poking various
368 * bits in northbridge registers, but without success. */
369 if (longhaul_flags & USE_ACPI_C3) {
370 printk(KERN_INFO PFX "Disabling ACPI C3 support.\n");
371 longhaul_flags &= ~USE_ACPI_C3;
372 if (revid_errata) {
373 printk(KERN_INFO PFX "Disabling \"Ignore "
374 "Revision ID\" option.\n");
375 revid_errata = 0;
376 }
377 msleep(200);
378 goto retry_loop;
379 }
380 /* This shouldn't happen. Longhaul ver. 2 was reported not
381 * working on processors without voltage scaling, but with
382 * RevID = 1. RevID errata will make things right. Just
383 * to be 100% sure. */
384 if (longhaul_version == TYPE_LONGHAUL_V2) {
385 printk(KERN_INFO PFX "Switching to Longhaul ver. 1\n");
386 longhaul_version = TYPE_LONGHAUL_V1;
387 msleep(200);
388 goto retry_loop;
389 }
390 }
391 /* Report true CPU frequency */
347 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 392 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
348 393
349 if (!bm_timeout) 394 if (!bm_timeout)
@@ -956,11 +1001,20 @@ static void __exit longhaul_exit(void)
956 kfree(longhaul_table); 1001 kfree(longhaul_table);
957} 1002}
958 1003
1004/* Even if BIOS is exporting ACPI C3 state, and it is used
1005 * with success when CPU is idle, this state doesn't
1006 * trigger frequency transition in some cases. */
959module_param (disable_acpi_c3, int, 0644); 1007module_param (disable_acpi_c3, int, 0644);
960MODULE_PARM_DESC(disable_acpi_c3, "Don't use ACPI C3 support"); 1008MODULE_PARM_DESC(disable_acpi_c3, "Don't use ACPI C3 support");
961 1009/* Change CPU voltage with frequency. Very usefull to save
1010 * power, but most VIA C3 processors aren't supporting it. */
962module_param (scale_voltage, int, 0644); 1011module_param (scale_voltage, int, 0644);
963MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor"); 1012MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor");
1013/* Force revision key to 0 for processors which doesn't
1014 * support voltage scaling, but are introducing itself as
1015 * such. */
1016module_param(revid_errata, int, 0644);
1017MODULE_PARM_DESC(revid_errata, "Ignore CPU Revision ID");
964 1018
965MODULE_AUTHOR ("Dave Jones <davej@codemonkey.org.uk>"); 1019MODULE_AUTHOR ("Dave Jones <davej@codemonkey.org.uk>");
966MODULE_DESCRIPTION ("Longhaul driver for VIA Cyrix processors."); 1020MODULE_DESCRIPTION ("Longhaul driver for VIA Cyrix processors.");
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c
index d5a456d27d..db6c25aa57 100644
--- a/arch/i386/kernel/cpu/intel_cacheinfo.c
+++ b/arch/i386/kernel/cpu/intel_cacheinfo.c
@@ -515,7 +515,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
515 515
516 cpuid4_info[cpu] = kzalloc( 516 cpuid4_info[cpu] = kzalloc(
517 sizeof(struct _cpuid4_info) * num_cache_leaves, GFP_KERNEL); 517 sizeof(struct _cpuid4_info) * num_cache_leaves, GFP_KERNEL);
518 if (unlikely(cpuid4_info[cpu] == NULL)) 518 if (cpuid4_info[cpu] == NULL)
519 return -ENOMEM; 519 return -ENOMEM;
520 520
521 oldmask = current->cpus_allowed; 521 oldmask = current->cpus_allowed;
@@ -748,6 +748,8 @@ static void __cpuinit cache_remove_dev(struct sys_device * sys_dev)
748 unsigned int cpu = sys_dev->id; 748 unsigned int cpu = sys_dev->id;
749 unsigned long i; 749 unsigned long i;
750 750
751 if (cpuid4_info[cpu] == NULL)
752 return;
751 for (i = 0; i < num_cache_leaves; i++) { 753 for (i = 0; i < num_cache_leaves; i++) {
752 cache_remove_shared_cpu_map(cpu, i); 754 cache_remove_shared_cpu_map(cpu, i);
753 kobject_unregister(&(INDEX_KOBJECT_PTR(cpu,i)->kobj)); 755 kobject_unregister(&(INDEX_KOBJECT_PTR(cpu,i)->kobj));
diff --git a/arch/i386/kernel/cpu/perfctr-watchdog.c b/arch/i386/kernel/cpu/perfctr-watchdog.c
index 4be488e73b..93fecd4b03 100644
--- a/arch/i386/kernel/cpu/perfctr-watchdog.c
+++ b/arch/i386/kernel/cpu/perfctr-watchdog.c
@@ -263,8 +263,8 @@ static int setup_k7_watchdog(unsigned nmi_hz)
263 unsigned int evntsel; 263 unsigned int evntsel;
264 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); 264 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk);
265 265
266 perfctr_msr = MSR_K7_PERFCTR0; 266 perfctr_msr = wd_ops->perfctr;
267 evntsel_msr = MSR_K7_EVNTSEL0; 267 evntsel_msr = wd_ops->evntsel;
268 268
269 wrmsrl(perfctr_msr, 0UL); 269 wrmsrl(perfctr_msr, 0UL);
270 270
@@ -343,8 +343,8 @@ static int setup_p6_watchdog(unsigned nmi_hz)
343 unsigned int evntsel; 343 unsigned int evntsel;
344 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); 344 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk);
345 345
346 perfctr_msr = MSR_P6_PERFCTR0; 346 perfctr_msr = wd_ops->perfctr;
347 evntsel_msr = MSR_P6_EVNTSEL0; 347 evntsel_msr = wd_ops->evntsel;
348 348
349 /* KVM doesn't implement this MSR */ 349 /* KVM doesn't implement this MSR */
350 if (wrmsr_safe(perfctr_msr, 0, 0) < 0) 350 if (wrmsr_safe(perfctr_msr, 0, 0) < 0)
@@ -569,8 +569,8 @@ static int setup_intel_arch_watchdog(unsigned nmi_hz)
569 (ebx & ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT)) 569 (ebx & ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT))
570 return 0; 570 return 0;
571 571
572 perfctr_msr = MSR_ARCH_PERFMON_PERFCTR1; 572 perfctr_msr = wd_ops->perfctr;
573 evntsel_msr = MSR_ARCH_PERFMON_EVENTSEL1; 573 evntsel_msr = wd_ops->evntsel;
574 574
575 wrmsrl(perfctr_msr, 0UL); 575 wrmsrl(perfctr_msr, 0UL);
576 576
@@ -605,6 +605,16 @@ static struct wd_ops intel_arch_wd_ops = {
605 .evntsel = MSR_ARCH_PERFMON_EVENTSEL1, 605 .evntsel = MSR_ARCH_PERFMON_EVENTSEL1,
606}; 606};
607 607
608static struct wd_ops coreduo_wd_ops = {
609 .reserve = single_msr_reserve,
610 .unreserve = single_msr_unreserve,
611 .setup = setup_intel_arch_watchdog,
612 .rearm = p6_rearm,
613 .stop = single_msr_stop_watchdog,
614 .perfctr = MSR_ARCH_PERFMON_PERFCTR0,
615 .evntsel = MSR_ARCH_PERFMON_EVENTSEL0,
616};
617
608static void probe_nmi_watchdog(void) 618static void probe_nmi_watchdog(void)
609{ 619{
610 switch (boot_cpu_data.x86_vendor) { 620 switch (boot_cpu_data.x86_vendor) {
@@ -615,6 +625,12 @@ static void probe_nmi_watchdog(void)
615 wd_ops = &k7_wd_ops; 625 wd_ops = &k7_wd_ops;
616 break; 626 break;
617 case X86_VENDOR_INTEL: 627 case X86_VENDOR_INTEL:
628 /* Work around Core Duo (Yonah) errata AE49 where perfctr1
629 doesn't have a working enable bit. */
630 if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 14) {
631 wd_ops = &coreduo_wd_ops;
632 break;
633 }
618 if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) { 634 if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) {
619 wd_ops = &intel_arch_wd_ops; 635 wd_ops = &intel_arch_wd_ops;
620 break; 636 break;
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 4b8a8da4b2..e2f4a1c685 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -754,14 +754,6 @@ static int pirq_entries [MAX_PIRQS];
754static int pirqs_enabled; 754static int pirqs_enabled;
755int skip_ioapic_setup; 755int skip_ioapic_setup;
756 756
757static int __init ioapic_setup(char *str)
758{
759 skip_ioapic_setup = 1;
760 return 1;
761}
762
763__setup("noapic", ioapic_setup);
764
765static int __init ioapic_pirq_setup(char *str) 757static int __init ioapic_pirq_setup(char *str)
766{ 758{
767 int i, max; 759 int i, max;
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index 8c1c965eb2..c7227e2180 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -115,12 +115,12 @@ static int __init check_nmi_watchdog(void)
115 atomic_dec(&nmi_active); 115 atomic_dec(&nmi_active);
116 } 116 }
117 } 117 }
118 endflag = 1;
118 if (!atomic_read(&nmi_active)) { 119 if (!atomic_read(&nmi_active)) {
119 kfree(prev_nmi_count); 120 kfree(prev_nmi_count);
120 atomic_set(&nmi_active, -1); 121 atomic_set(&nmi_active, -1);
121 return -1; 122 return -1;
122 } 123 }
123 endflag = 1;
124 printk("OK.\n"); 124 printk("OK.\n");
125 125
126 /* now that we know it works we can reduce NMI frequency to 126 /* now that we know it works we can reduce NMI frequency to
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c
index 0c8f00e69c..7c1b92522e 100644
--- a/arch/i386/kernel/ptrace.c
+++ b/arch/i386/kernel/ptrace.c
@@ -274,7 +274,6 @@ static void clear_singlestep(struct task_struct *child)
274void ptrace_disable(struct task_struct *child) 274void ptrace_disable(struct task_struct *child)
275{ 275{
276 clear_singlestep(child); 276 clear_singlestep(child);
277 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
278 clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); 277 clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
279} 278}
280 279
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index cfffe3dd9e..47b0bef335 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -100,36 +100,45 @@ asmlinkage void machine_check(void);
100int kstack_depth_to_print = 24; 100int kstack_depth_to_print = 24;
101static unsigned int code_bytes = 64; 101static unsigned int code_bytes = 64;
102 102
103static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) 103static inline int valid_stack_ptr(struct thread_info *tinfo, void *p, unsigned size)
104{ 104{
105 return p > (void *)tinfo && 105 return p > (void *)tinfo &&
106 p < (void *)tinfo + THREAD_SIZE - 3; 106 p <= (void *)tinfo + THREAD_SIZE - size;
107} 107}
108 108
109/* The form of the top of the frame on the stack */
110struct stack_frame {
111 struct stack_frame *next_frame;
112 unsigned long return_address;
113};
114
109static inline unsigned long print_context_stack(struct thread_info *tinfo, 115static inline unsigned long print_context_stack(struct thread_info *tinfo,
110 unsigned long *stack, unsigned long ebp, 116 unsigned long *stack, unsigned long ebp,
111 struct stacktrace_ops *ops, void *data) 117 struct stacktrace_ops *ops, void *data)
112{ 118{
113 unsigned long addr;
114
115#ifdef CONFIG_FRAME_POINTER 119#ifdef CONFIG_FRAME_POINTER
116 while (valid_stack_ptr(tinfo, (void *)ebp)) { 120 struct stack_frame *frame = (struct stack_frame *)ebp;
117 unsigned long new_ebp; 121 while (valid_stack_ptr(tinfo, frame, sizeof(*frame))) {
118 addr = *(unsigned long *)(ebp + 4); 122 struct stack_frame *next;
123 unsigned long addr;
124
125 addr = frame->return_address;
119 ops->address(data, addr); 126 ops->address(data, addr);
120 /* 127 /*
121 * break out of recursive entries (such as 128 * break out of recursive entries (such as
122 * end_of_stack_stop_unwind_function). Also, 129 * end_of_stack_stop_unwind_function). Also,
123 * we can never allow a frame pointer to 130 * we can never allow a frame pointer to
124 * move downwards! 131 * move downwards!
125 */ 132 */
126 new_ebp = *(unsigned long *)ebp; 133 next = frame->next_frame;
127 if (new_ebp <= ebp) 134 if (next <= frame)
128 break; 135 break;
129 ebp = new_ebp; 136 frame = next;
130 } 137 }
131#else 138#else
132 while (valid_stack_ptr(tinfo, stack)) { 139 while (valid_stack_ptr(tinfo, stack, sizeof(*stack))) {
140 unsigned long addr;
141
133 addr = *stack++; 142 addr = *stack++;
134 if (__kernel_text_address(addr)) 143 if (__kernel_text_address(addr))
135 ops->address(data, addr); 144 ops->address(data, addr);
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index debd7dbb41..a39280b4dd 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -292,7 +292,6 @@ static struct clocksource clocksource_tsc = {
292 292
293void mark_tsc_unstable(char *reason) 293void mark_tsc_unstable(char *reason)
294{ 294{
295 sched_clock_unstable_event();
296 if (!tsc_unstable) { 295 if (!tsc_unstable) {
297 tsc_unstable = 1; 296 tsc_unstable = 1;
298 tsc_enabled = 0; 297 tsc_enabled = 0;
diff --git a/arch/i386/mach-generic/Makefile b/arch/i386/mach-generic/Makefile
index 77fbc9f64f..6914485c0d 100644
--- a/arch/i386/mach-generic/Makefile
+++ b/arch/i386/mach-generic/Makefile
@@ -2,6 +2,6 @@
2# Makefile for the generic architecture 2# Makefile for the generic architecture
3# 3#
4 4
5EXTRA_CFLAGS += -I../kernel 5EXTRA_CFLAGS := -Iarch/i386/kernel
6 6
7obj-y := probe.o summit.o bigsmp.o es7000.o default.o ../mach-es7000/ 7obj-y := probe.o summit.o bigsmp.o es7000.o default.o ../mach-es7000/
diff --git a/arch/i386/mach-voyager/Makefile b/arch/i386/mach-voyager/Makefile
index f24d296513..33b74cf0dd 100644
--- a/arch/i386/mach-voyager/Makefile
+++ b/arch/i386/mach-voyager/Makefile
@@ -2,7 +2,7 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5EXTRA_CFLAGS += -I../kernel 5EXTRA_CFLAGS := -Iarch/i386/kernel
6obj-y := setup.o voyager_basic.o voyager_thread.o 6obj-y := setup.o voyager_basic.o voyager_thread.o
7 7
8obj-$(CONFIG_SMP) += voyager_smp.o voyager_cat.o 8obj-$(CONFIG_SMP) += voyager_smp.o voyager_cat.o
diff --git a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c
index ad8d86cc68..1c3bf95f73 100644
--- a/arch/i386/mm/highmem.c
+++ b/arch/i386/mm/highmem.c
@@ -34,17 +34,16 @@ void *kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot)
34 /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ 34 /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
35 pagefault_disable(); 35 pagefault_disable();
36 36
37 idx = type + KM_TYPE_NR*smp_processor_id();
38 BUG_ON(!pte_none(*(kmap_pte-idx)));
39
40 if (!PageHighMem(page)) 37 if (!PageHighMem(page))
41 return page_address(page); 38 return page_address(page);
42 39
40 idx = type + KM_TYPE_NR*smp_processor_id();
43 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 41 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
42 BUG_ON(!pte_none(*(kmap_pte-idx)));
44 set_pte(kmap_pte-idx, mk_pte(page, prot)); 43 set_pte(kmap_pte-idx, mk_pte(page, prot));
45 arch_flush_lazy_mmu_mode(); 44 arch_flush_lazy_mmu_mode();
46 45
47 return (void*) vaddr; 46 return (void *)vaddr;
48} 47}
49 48
50void *kmap_atomic(struct page *page, enum km_type type) 49void *kmap_atomic(struct page *page, enum km_type type)
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c
index efdf95ac80..6c06d9c048 100644
--- a/arch/i386/mm/hugetlbpage.c
+++ b/arch/i386/mm/hugetlbpage.c
@@ -367,7 +367,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
367 return -ENOMEM; 367 return -ENOMEM;
368 368
369 if (flags & MAP_FIXED) { 369 if (flags & MAP_FIXED) {
370 if (prepare_hugepage_range(addr, len, pgoff)) 370 if (prepare_hugepage_range(addr, len))
371 return -EINVAL; 371 return -EINVAL;
372 return addr; 372 return addr;
373 } 373 }
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
index 665db063a4..8434f2323b 100644
--- a/arch/i386/pci/irq.c
+++ b/arch/i386/pci/irq.c
@@ -550,6 +550,7 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route
550 case PCI_DEVICE_ID_INTEL_ICH9_3: 550 case PCI_DEVICE_ID_INTEL_ICH9_3:
551 case PCI_DEVICE_ID_INTEL_ICH9_4: 551 case PCI_DEVICE_ID_INTEL_ICH9_4:
552 case PCI_DEVICE_ID_INTEL_ICH9_5: 552 case PCI_DEVICE_ID_INTEL_ICH9_5:
553 case PCI_DEVICE_ID_INTEL_TOLAPAI_0:
553 r->name = "PIIX/ICH"; 554 r->name = "PIIX/ICH";
554 r->get = pirq_piix_get; 555 r->get = pirq_piix_get;
555 r->set = pirq_piix_set; 556 r->set = pirq_piix_set;
diff --git a/arch/i386/pci/pcbios.c b/arch/i386/pci/pcbios.c
index 5f5193401b..10ac8c316c 100644
--- a/arch/i386/pci/pcbios.c
+++ b/arch/i386/pci/pcbios.c
@@ -412,7 +412,7 @@ struct irq_routing_options {
412 u16 segment; 412 u16 segment;
413} __attribute__((packed)); 413} __attribute__((packed));
414 414
415struct irq_routing_table * __devinit pcibios_get_irq_routing_table(void) 415struct irq_routing_table * pcibios_get_irq_routing_table(void)
416{ 416{
417 struct irq_routing_options opt; 417 struct irq_routing_options opt;
418 struct irq_routing_table *rt = NULL; 418 struct irq_routing_table *rt = NULL;
diff --git a/arch/i386/xen/enlighten.c b/arch/i386/xen/enlighten.c
index f0c37511d8..f01bfcd4bd 100644
--- a/arch/i386/xen/enlighten.c
+++ b/arch/i386/xen/enlighten.c
@@ -623,8 +623,8 @@ static unsigned long xen_read_cr2_direct(void)
623 623
624static void xen_write_cr4(unsigned long cr4) 624static void xen_write_cr4(unsigned long cr4)
625{ 625{
626 /* never allow TSC to be disabled */ 626 /* Just ignore cr4 changes; Xen doesn't allow us to do
627 native_write_cr4(cr4 & ~X86_CR4_TSD); 627 anything anyway. */
628} 628}
629 629
630static unsigned long xen_read_cr3(void) 630static unsigned long xen_read_cr3(void)
diff --git a/arch/i386/xen/mmu.c b/arch/i386/xen/mmu.c
index 4ae038aa6c..874db0cd1d 100644
--- a/arch/i386/xen/mmu.c
+++ b/arch/i386/xen/mmu.c
@@ -559,6 +559,9 @@ void xen_exit_mmap(struct mm_struct *mm)
559 put_cpu(); 559 put_cpu();
560 560
561 spin_lock(&mm->page_table_lock); 561 spin_lock(&mm->page_table_lock);
562 xen_pgd_unpin(mm->pgd); 562
563 /* pgd may not be pinned in the error exit path of execve */
564 if (PagePinned(virt_to_page(mm->pgd)))
565 xen_pgd_unpin(mm->pgd);
563 spin_unlock(&mm->page_table_lock); 566 spin_unlock(&mm->page_table_lock);
564} 567}
diff --git a/arch/ia64/hp/sim/hpsim_console.c b/arch/ia64/hp/sim/hpsim_console.c
index 6e149c8ab8..01663bc42b 100644
--- a/arch/ia64/hp/sim/hpsim_console.c
+++ b/arch/ia64/hp/sim/hpsim_console.c
@@ -21,6 +21,7 @@
21#include <asm/machvec.h> 21#include <asm/machvec.h>
22#include <asm/pgtable.h> 22#include <asm/pgtable.h>
23#include <asm/sal.h> 23#include <asm/sal.h>
24#include <asm/hpsim.h>
24 25
25#include "hpsim_ssc.h" 26#include "hpsim_ssc.h"
26 27
@@ -28,7 +29,7 @@ static int simcons_init (struct console *, char *);
28static void simcons_write (struct console *, const char *, unsigned); 29static void simcons_write (struct console *, const char *, unsigned);
29static struct tty_driver *simcons_console_device (struct console *, int *); 30static struct tty_driver *simcons_console_device (struct console *, int *);
30 31
31struct console hpsim_cons = { 32static struct console hpsim_cons = {
32 .name = "simcons", 33 .name = "simcons",
33 .write = simcons_write, 34 .write = simcons_write,
34 .device = simcons_console_device, 35 .device = simcons_console_device,
@@ -58,7 +59,18 @@ simcons_write (struct console *cons, const char *buf, unsigned count)
58 59
59static struct tty_driver *simcons_console_device (struct console *c, int *index) 60static struct tty_driver *simcons_console_device (struct console *c, int *index)
60{ 61{
61 extern struct tty_driver *hp_simserial_driver;
62 *index = c->index; 62 *index = c->index;
63 return hp_simserial_driver; 63 return hp_simserial_driver;
64} 64}
65
66int simcons_register(void)
67{
68 if (!ia64_platform_is("hpsim"))
69 return 1;
70
71 if (hpsim_cons.flags & CON_ENABLED)
72 return 1;
73
74 register_console(&hpsim_cons);
75 return 0;
76}
diff --git a/arch/ia64/hp/sim/hpsim_setup.c b/arch/ia64/hp/sim/hpsim_setup.c
index f2297192a5..f629e903eb 100644
--- a/arch/ia64/hp/sim/hpsim_setup.c
+++ b/arch/ia64/hp/sim/hpsim_setup.c
@@ -21,6 +21,7 @@
21#include <asm/machvec.h> 21#include <asm/machvec.h>
22#include <asm/pgtable.h> 22#include <asm/pgtable.h>
23#include <asm/sal.h> 23#include <asm/sal.h>
24#include <asm/hpsim.h>
24 25
25#include "hpsim_ssc.h" 26#include "hpsim_ssc.h"
26 27
@@ -41,11 +42,5 @@ hpsim_setup (char **cmdline_p)
41{ 42{
42 ROOT_DEV = Root_SDA1; /* default to first SCSI drive */ 43 ROOT_DEV = Root_SDA1; /* default to first SCSI drive */
43 44
44#ifdef CONFIG_HP_SIMSERIAL_CONSOLE 45 simcons_register();
45 {
46 extern struct console hpsim_cons;
47 if (ia64_platform_is("hpsim"))
48 register_console(&hpsim_cons);
49 }
50#endif
51} 46}
diff --git a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c
index f26077a773..4017696ada 100644
--- a/arch/ia64/hp/sim/simeth.c
+++ b/arch/ia64/hp/sim/simeth.c
@@ -22,6 +22,9 @@
22#include <linux/bitops.h> 22#include <linux/bitops.h>
23#include <asm/system.h> 23#include <asm/system.h>
24#include <asm/irq.h> 24#include <asm/irq.h>
25#include <asm/hpsim.h>
26
27#include "hpsim_ssc.h"
25 28
26#define SIMETH_RECV_MAX 10 29#define SIMETH_RECV_MAX 10
27 30
@@ -35,12 +38,6 @@
35#define SIMETH_FRAME_SIZE ETH_FRAME_LEN 38#define SIMETH_FRAME_SIZE ETH_FRAME_LEN
36 39
37 40
38#define SSC_NETDEV_PROBE 100
39#define SSC_NETDEV_SEND 101
40#define SSC_NETDEV_RECV 102
41#define SSC_NETDEV_ATTACH 103
42#define SSC_NETDEV_DETACH 104
43
44#define NETWORK_INTR 8 41#define NETWORK_INTR 8
45 42
46struct simeth_local { 43struct simeth_local {
@@ -124,9 +121,6 @@ simeth_probe (void)
124 return r; 121 return r;
125} 122}
126 123
127extern long ia64_ssc (long, long, long, long, int);
128extern void ia64_ssc_connect_irq (long intr, long irq);
129
130static inline int 124static inline int
131netdev_probe(char *name, unsigned char *ether) 125netdev_probe(char *name, unsigned char *ether)
132{ 126{
diff --git a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c
index e62694f8ef..4552a1cf5b 100644
--- a/arch/ia64/hp/sim/simscsi.c
+++ b/arch/ia64/hp/sim/simscsi.c
@@ -14,6 +14,7 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/timer.h> 15#include <linux/timer.h>
16#include <asm/irq.h> 16#include <asm/irq.h>
17#include "hpsim_ssc.h"
17 18
18#include <scsi/scsi.h> 19#include <scsi/scsi.h>
19#include <scsi/scsi_cmnd.h> 20#include <scsi/scsi_cmnd.h>
@@ -59,8 +60,6 @@ struct disk_stat {
59 unsigned count; 60 unsigned count;
60}; 61};
61 62
62extern long ia64_ssc (long arg0, long arg1, long arg2, long arg3, int nr);
63
64static int desc[16] = { 63static int desc[16] = {
65 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 64 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
66}; 65};
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index c47c8acc96..00a4599e5f 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -82,7 +82,7 @@ struct irq_cfg irq_cfg[NR_IRQS] __read_mostly = {
82}; 82};
83 83
84DEFINE_PER_CPU(int[IA64_NUM_VECTORS], vector_irq) = { 84DEFINE_PER_CPU(int[IA64_NUM_VECTORS], vector_irq) = {
85 [0 ... IA64_NUM_VECTORS - 1] = IA64_SPURIOUS_INT_VECTOR 85 [0 ... IA64_NUM_VECTORS - 1] = -1
86}; 86};
87 87
88static cpumask_t vector_table[IA64_NUM_VECTORS] = { 88static cpumask_t vector_table[IA64_NUM_VECTORS] = {
@@ -179,7 +179,7 @@ static void __clear_irq_vector(int irq)
179 domain = cfg->domain; 179 domain = cfg->domain;
180 cpus_and(mask, cfg->domain, cpu_online_map); 180 cpus_and(mask, cfg->domain, cpu_online_map);
181 for_each_cpu_mask(cpu, mask) 181 for_each_cpu_mask(cpu, mask)
182 per_cpu(vector_irq, cpu)[vector] = IA64_SPURIOUS_INT_VECTOR; 182 per_cpu(vector_irq, cpu)[vector] = -1;
183 cfg->vector = IRQ_VECTOR_UNASSIGNED; 183 cfg->vector = IRQ_VECTOR_UNASSIGNED;
184 cfg->domain = CPU_MASK_NONE; 184 cfg->domain = CPU_MASK_NONE;
185 irq_status[irq] = IRQ_UNUSED; 185 irq_status[irq] = IRQ_UNUSED;
@@ -249,7 +249,7 @@ void __setup_vector_irq(int cpu)
249 249
250 /* Clear vector_irq */ 250 /* Clear vector_irq */
251 for (vector = 0; vector < IA64_NUM_VECTORS; ++vector) 251 for (vector = 0; vector < IA64_NUM_VECTORS; ++vector)
252 per_cpu(vector_irq, cpu)[vector] = IA64_SPURIOUS_INT_VECTOR; 252 per_cpu(vector_irq, cpu)[vector] = -1;
253 /* Mark the inuse vectors */ 253 /* Mark the inuse vectors */
254 for (irq = 0; irq < NR_IRQS; ++irq) { 254 for (irq = 0; irq < NR_IRQS; ++irq) {
255 if (!cpu_isset(cpu, irq_cfg[irq].domain)) 255 if (!cpu_isset(cpu, irq_cfg[irq].domain))
@@ -432,10 +432,18 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
432 } else if (unlikely(IS_RESCHEDULE(vector))) 432 } else if (unlikely(IS_RESCHEDULE(vector)))
433 kstat_this_cpu.irqs[vector]++; 433 kstat_this_cpu.irqs[vector]++;
434 else { 434 else {
435 int irq = local_vector_to_irq(vector);
436
435 ia64_setreg(_IA64_REG_CR_TPR, vector); 437 ia64_setreg(_IA64_REG_CR_TPR, vector);
436 ia64_srlz_d(); 438 ia64_srlz_d();
437 439
438 generic_handle_irq(local_vector_to_irq(vector)); 440 if (unlikely(irq < 0)) {
441 printk(KERN_ERR "%s: Unexpected interrupt "
442 "vector %d on CPU %d is not mapped "
443 "to any IRQ!\n", __FUNCTION__, vector,
444 smp_processor_id());
445 } else
446 generic_handle_irq(irq);
439 447
440 /* 448 /*
441 * Disable interrupts and send EOI: 449 * Disable interrupts and send EOI:
@@ -483,6 +491,7 @@ void ia64_process_pending_intr(void)
483 kstat_this_cpu.irqs[vector]++; 491 kstat_this_cpu.irqs[vector]++;
484 else { 492 else {
485 struct pt_regs *old_regs = set_irq_regs(NULL); 493 struct pt_regs *old_regs = set_irq_regs(NULL);
494 int irq = local_vector_to_irq(vector);
486 495
487 ia64_setreg(_IA64_REG_CR_TPR, vector); 496 ia64_setreg(_IA64_REG_CR_TPR, vector);
488 ia64_srlz_d(); 497 ia64_srlz_d();
@@ -493,8 +502,15 @@ void ia64_process_pending_intr(void)
493 * it will work. I hope it works!. 502 * it will work. I hope it works!.
494 * Probably could shared code. 503 * Probably could shared code.
495 */ 504 */
496 vectors_in_migration[local_vector_to_irq(vector)]=0; 505 if (unlikely(irq < 0)) {
497 generic_handle_irq(local_vector_to_irq(vector)); 506 printk(KERN_ERR "%s: Unexpected interrupt "
507 "vector %d on CPU %d not being mapped "
508 "to any IRQ!!\n", __FUNCTION__, vector,
509 smp_processor_id());
510 } else {
511 vectors_in_migration[irq]=0;
512 generic_handle_irq(irq);
513 }
498 set_irq_regs(old_regs); 514 set_irq_regs(old_regs);
499 515
500 /* 516 /*
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index 122444a978..2e96f17b2f 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -1577,7 +1577,6 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
1577 1577
1578 case PTRACE_DETACH: 1578 case PTRACE_DETACH:
1579 /* detach a process that was attached. */ 1579 /* detach a process that was attached. */
1580 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
1581 ret = ptrace_detach(child, data); 1580 ret = ptrace_detach(child, data);
1582 goto out_tsk; 1581 goto out_tsk;
1583 1582
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 407efea04b..9e392a30d1 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -60,6 +60,7 @@
60#include <asm/smp.h> 60#include <asm/smp.h>
61#include <asm/system.h> 61#include <asm/system.h>
62#include <asm/unistd.h> 62#include <asm/unistd.h>
63#include <asm/hpsim.h>
63 64
64#if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE) 65#if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
65# error "struct cpuinfo_ia64 too big!" 66# error "struct cpuinfo_ia64 too big!"
@@ -389,13 +390,8 @@ early_console_setup (char *cmdline)
389 if (!efi_setup_pcdp_console(cmdline)) 390 if (!efi_setup_pcdp_console(cmdline))
390 earlycons++; 391 earlycons++;
391#endif 392#endif
392#ifdef CONFIG_HP_SIMSERIAL_CONSOLE 393 if (!simcons_register())
393 {
394 extern struct console hpsim_cons;
395 register_console(&hpsim_cons);
396 earlycons++; 394 earlycons++;
397 }
398#endif
399 395
400 return (earlycons) ? 0 : -1; 396 return (earlycons) ? 0 : -1;
401} 397}
@@ -960,6 +956,11 @@ cpu_init (void)
960 956
961 /* clear TPR & XTP to enable all interrupt classes: */ 957 /* clear TPR & XTP to enable all interrupt classes: */
962 ia64_setreg(_IA64_REG_CR_TPR, 0); 958 ia64_setreg(_IA64_REG_CR_TPR, 0);
959
960 /* Clear any pending interrupts left by SAL/EFI */
961 while (ia64_get_ivr() != IA64_SPURIOUS_INT_VECTOR)
962 ia64_eoi();
963
963#ifdef CONFIG_SMP 964#ifdef CONFIG_SMP
964 normal_xtp(); 965 normal_xtp();
965#endif 966#endif
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 62209dcf06..308772f7cd 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -58,6 +58,7 @@
58#include <asm/system.h> 58#include <asm/system.h>
59#include <asm/tlbflush.h> 59#include <asm/tlbflush.h>
60#include <asm/unistd.h> 60#include <asm/unistd.h>
61#include <asm/sn/arch.h>
61 62
62#define SMP_DEBUG 0 63#define SMP_DEBUG 0
63 64
@@ -730,6 +731,11 @@ int __cpu_disable(void)
730 return (-EBUSY); 731 return (-EBUSY);
731 } 732 }
732 733
734 if (ia64_platform_is("sn2")) {
735 if (!sn_cpu_disable_allowed(cpu))
736 return -EBUSY;
737 }
738
733 cpu_clear(cpu, cpu_online_map); 739 cpu_clear(cpu, cpu_online_map);
734 740
735 if (migrate_platform_irqs(cpu)) { 741 if (migrate_platform_irqs(cpu)) {
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index 7ac8592a35..d3c538be46 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -17,6 +17,7 @@
17#include <linux/bootmem.h> 17#include <linux/bootmem.h>
18#include <linux/efi.h> 18#include <linux/efi.h>
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <linux/nmi.h>
20#include <linux/swap.h> 21#include <linux/swap.h>
21 22
22#include <asm/meminit.h> 23#include <asm/meminit.h>
@@ -56,6 +57,8 @@ void show_mem(void)
56 present = pgdat->node_present_pages; 57 present = pgdat->node_present_pages;
57 for(i = 0; i < pgdat->node_spanned_pages; i++) { 58 for(i = 0; i < pgdat->node_spanned_pages; i++) {
58 struct page *page; 59 struct page *page;
60 if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
61 touch_nmi_watchdog();
59 if (pfn_valid(pgdat->node_start_pfn + i)) 62 if (pfn_valid(pgdat->node_start_pfn + i))
60 page = pfn_to_page(pgdat->node_start_pfn + i); 63 page = pfn_to_page(pgdat->node_start_pfn + i);
61 else { 64 else {
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 0dbf0e81f8..0d34585058 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -16,6 +16,7 @@
16 16
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/nmi.h>
19#include <linux/swap.h> 20#include <linux/swap.h>
20#include <linux/bootmem.h> 21#include <linux/bootmem.h>
21#include <linux/acpi.h> 22#include <linux/acpi.h>
@@ -533,6 +534,8 @@ void show_mem(void)
533 present = pgdat->node_present_pages; 534 present = pgdat->node_present_pages;
534 for(i = 0; i < pgdat->node_spanned_pages; i++) { 535 for(i = 0; i < pgdat->node_spanned_pages; i++) {
535 struct page *page; 536 struct page *page;
537 if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
538 touch_nmi_watchdog();
536 if (pfn_valid(pgdat->node_start_pfn + i)) 539 if (pfn_valid(pgdat->node_start_pfn + i))
537 page = pfn_to_page(pgdat->node_start_pfn + i); 540 page = pfn_to_page(pgdat->node_start_pfn + i);
538 else { 541 else {
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index d22861c5b0..a9ff685aea 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -75,10 +75,8 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
75 * Don't actually need to do any preparation, but need to make sure 75 * Don't actually need to do any preparation, but need to make sure
76 * the address is in the right region. 76 * the address is in the right region.
77 */ 77 */
78int prepare_hugepage_range(unsigned long addr, unsigned long len, pgoff_t pgoff) 78int prepare_hugepage_range(unsigned long addr, unsigned long len)
79{ 79{
80 if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT))
81 return -EINVAL;
82 if (len & ~HPAGE_MASK) 80 if (len & ~HPAGE_MASK)
83 return -EINVAL; 81 return -EINVAL;
84 if (addr & ~HPAGE_MASK) 82 if (addr & ~HPAGE_MASK)
@@ -151,7 +149,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u
151 149
152 /* Handle MAP_FIXED */ 150 /* Handle MAP_FIXED */
153 if (flags & MAP_FIXED) { 151 if (flags & MAP_FIXED) {
154 if (prepare_hugepage_range(addr, len, pgoff)) 152 if (prepare_hugepage_range(addr, len))
155 return -EINVAL; 153 return -EINVAL;
156 return addr; 154 return addr;
157 } 155 }
diff --git a/arch/ia64/sn/kernel/huberror.c b/arch/ia64/sn/kernel/huberror.c
index 2c3f9dfca7..b663168da5 100644
--- a/arch/ia64/sn/kernel/huberror.c
+++ b/arch/ia64/sn/kernel/huberror.c
@@ -185,11 +185,14 @@ void hubiio_crb_error_handler(struct hubdev_info *hubdev_info)
185 */ 185 */
186void hub_error_init(struct hubdev_info *hubdev_info) 186void hub_error_init(struct hubdev_info *hubdev_info)
187{ 187{
188
188 if (request_irq(SGI_II_ERROR, hub_eint_handler, IRQF_SHARED, 189 if (request_irq(SGI_II_ERROR, hub_eint_handler, IRQF_SHARED,
189 "SN_hub_error", (void *)hubdev_info)) 190 "SN_hub_error", (void *)hubdev_info)) {
190 printk("hub_error_init: Failed to request_irq for 0x%p\n", 191 printk("hub_error_init: Failed to request_irq for 0x%p\n",
191 hubdev_info); 192 hubdev_info);
192 return; 193 return;
194 }
195 sn_set_err_irq_affinity(SGI_II_ERROR);
193} 196}
194 197
195 198
@@ -202,11 +205,14 @@ void hub_error_init(struct hubdev_info *hubdev_info)
202 */ 205 */
203void ice_error_init(struct hubdev_info *hubdev_info) 206void ice_error_init(struct hubdev_info *hubdev_info)
204{ 207{
208
205 if (request_irq 209 if (request_irq
206 (SGI_TIO_ERROR, (void *)hub_eint_handler, IRQF_SHARED, "SN_TIO_error", 210 (SGI_TIO_ERROR, (void *)hub_eint_handler, IRQF_SHARED, "SN_TIO_error",
207 (void *)hubdev_info)) 211 (void *)hubdev_info)) {
208 printk("ice_error_init: request_irq() error hubdev_info 0x%p\n", 212 printk("ice_error_init: request_irq() error hubdev_info 0x%p\n",
209 hubdev_info); 213 hubdev_info);
210 return; 214 return;
215 }
216 sn_set_err_irq_affinity(SGI_TIO_ERROR);
211} 217}
212 218
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c
index 3600473894..0f9b12683b 100644
--- a/arch/ia64/sn/kernel/irq.c
+++ b/arch/ia64/sn/kernel/irq.c
@@ -19,6 +19,7 @@
19#include <asm/sn/pcidev.h> 19#include <asm/sn/pcidev.h>
20#include <asm/sn/shub_mmr.h> 20#include <asm/sn/shub_mmr.h>
21#include <asm/sn/sn_sal.h> 21#include <asm/sn/sn_sal.h>
22#include <asm/sn/sn_feature_sets.h>
22 23
23static void force_interrupt(int irq); 24static void force_interrupt(int irq);
24static void register_intr_pda(struct sn_irq_info *sn_irq_info); 25static void register_intr_pda(struct sn_irq_info *sn_irq_info);
@@ -233,6 +234,20 @@ static void sn_set_affinity_irq(unsigned int irq, cpumask_t mask)
233 (void)sn_retarget_vector(sn_irq_info, nasid, slice); 234 (void)sn_retarget_vector(sn_irq_info, nasid, slice);
234} 235}
235 236
237#ifdef CONFIG_SMP
238void sn_set_err_irq_affinity(unsigned int irq)
239{
240 /*
241 * On systems which support CPU disabling (SHub2), all error interrupts
242 * are targetted at the boot CPU.
243 */
244 if (is_shub2() && sn_prom_feature_available(PRF_CPU_DISABLE_SUPPORT))
245 set_irq_affinity_info(irq, cpu_physical_id(0), 0);
246}
247#else
248void sn_set_err_irq_affinity(unsigned int irq) { }
249#endif
250
236static void 251static void
237sn_mask_irq(unsigned int irq) 252sn_mask_irq(unsigned int irq)
238{ 253{
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c
index 033c8a9f00..f3c69329e1 100644
--- a/arch/ia64/sn/kernel/sn2/sn2_smp.c
+++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c
@@ -40,6 +40,7 @@
40#include <asm/sn/shub_mmr.h> 40#include <asm/sn/shub_mmr.h>
41#include <asm/sn/nodepda.h> 41#include <asm/sn/nodepda.h>
42#include <asm/sn/rw_mmr.h> 42#include <asm/sn/rw_mmr.h>
43#include <asm/sn/sn_feature_sets.h>
43 44
44DEFINE_PER_CPU(struct ptc_stats, ptcstats); 45DEFINE_PER_CPU(struct ptc_stats, ptcstats);
45DECLARE_PER_CPU(struct ptc_stats, ptcstats); 46DECLARE_PER_CPU(struct ptc_stats, ptcstats);
@@ -429,6 +430,31 @@ void sn2_send_IPI(int cpuid, int vector, int delivery_mode, int redirect)
429 sn_send_IPI_phys(nasid, physid, vector, delivery_mode); 430 sn_send_IPI_phys(nasid, physid, vector, delivery_mode);
430} 431}
431 432
433#ifdef CONFIG_HOTPLUG_CPU
434/**
435 * sn_cpu_disable_allowed - Determine if a CPU can be disabled.
436 * @cpu - CPU that is requested to be disabled.
437 *
438 * CPU disable is only allowed on SHub2 systems running with a PROM
439 * that supports CPU disable. It is not permitted to disable the boot processor.
440 */
441bool sn_cpu_disable_allowed(int cpu)
442{
443 if (is_shub2() && sn_prom_feature_available(PRF_CPU_DISABLE_SUPPORT)) {
444 if (cpu != 0)
445 return true;
446 else
447 printk(KERN_WARNING
448 "Disabling the boot processor is not allowed.\n");
449
450 } else
451 printk(KERN_WARNING
452 "CPU disable is not supported on this system.\n");
453
454 return false;
455}
456#endif /* CONFIG_HOTPLUG_CPU */
457
432#ifdef CONFIG_PROC_FS 458#ifdef CONFIG_PROC_FS
433 459
434#define PTC_BASENAME "sgi_sn/ptc_statistics" 460#define PTC_BASENAME "sgi_sn/ptc_statistics"
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index df8d5bed61..1a8e49607f 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -66,7 +66,8 @@ static int sn_hwperf_enum_objects(int *nobj, struct sn_hwperf_object_info **ret)
66 } 66 }
67 67
68 sz = sn_hwperf_obj_cnt * sizeof(struct sn_hwperf_object_info); 68 sz = sn_hwperf_obj_cnt * sizeof(struct sn_hwperf_object_info);
69 if ((objbuf = (struct sn_hwperf_object_info *) vmalloc(sz)) == NULL) { 69 objbuf = vmalloc(sz);
70 if (objbuf == NULL) {
70 printk("sn_hwperf_enum_objects: vmalloc(%d) failed\n", (int)sz); 71 printk("sn_hwperf_enum_objects: vmalloc(%d) failed\n", (int)sz);
71 e = -ENOMEM; 72 e = -ENOMEM;
72 goto out; 73 goto out;
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 42485ad50c..ab3eaf85fe 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -145,6 +145,7 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
145 printk(KERN_WARNING 145 printk(KERN_WARNING
146 "pcibr cannot allocate interrupt for error handler\n"); 146 "pcibr cannot allocate interrupt for error handler\n");
147 } 147 }
148 sn_set_err_irq_affinity(SGI_PCIASIC_ERROR);
148 149
149 /* 150 /*
150 * Update the Bridge with the "kernel" pagesize 151 * Update the Bridge with the "kernel" pagesize
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index d798dd4d0d..ef048a6747 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -654,6 +654,8 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
654 __FUNCTION__, SGI_TIOCA_ERROR, 654 __FUNCTION__, SGI_TIOCA_ERROR,
655 (int)tioca_common->ca_common.bs_persist_busnum); 655 (int)tioca_common->ca_common.bs_persist_busnum);
656 656
657 sn_set_err_irq_affinity(SGI_TIOCA_ERROR);
658
657 /* Setup locality information */ 659 /* Setup locality information */
658 controller->node = tioca_kern->ca_closest_node; 660 controller->node = tioca_kern->ca_closest_node;
659 return tioca_common; 661 return tioca_common;
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index 84b72b27e2..cee9379d44 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -1034,6 +1034,7 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
1034 tioce_common->ce_pcibus.bs_persist_segment, 1034 tioce_common->ce_pcibus.bs_persist_segment,
1035 tioce_common->ce_pcibus.bs_persist_busnum); 1035 tioce_common->ce_pcibus.bs_persist_busnum);
1036 1036
1037 sn_set_err_irq_affinity(SGI_PCIASIC_ERROR);
1037 return tioce_common; 1038 return tioce_common;
1038} 1039}
1039 1040
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index 8ccf3e47bf..bd5fe76401 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -57,9 +57,13 @@ config PLAT_MAPPI
57 57
58config PLAT_USRV 58config PLAT_USRV
59 bool "uServer" 59 bool "uServer"
60 select PLAT_HAS_INT1ICU
60 61
61config PLAT_M32700UT 62config PLAT_M32700UT
62 bool "M32700UT" 63 bool "M32700UT"
64 select PLAT_HAS_INT0ICU
65 select PLAT_HAS_INT1ICU
66 select PLAT_HAS_INT2ICU
63 help 67 help
64 The M3T-M32700UT is an evaluation board based on uT-Engine 68 The M3T-M32700UT is an evaluation board based on uT-Engine
65 specification. This board has an M32700 (Chaos) evaluation chip. 69 specification. This board has an M32700 (Chaos) evaluation chip.
@@ -68,6 +72,9 @@ config PLAT_M32700UT
68 72
69config PLAT_OPSPUT 73config PLAT_OPSPUT
70 bool "OPSPUT" 74 bool "OPSPUT"
75 select PLAT_HAS_INT0ICU
76 select PLAT_HAS_INT1ICU
77 select PLAT_HAS_INT2ICU
71 help 78 help
72 The OPSPUT is an evaluation board based on uT-Engine 79 The OPSPUT is an evaluation board based on uT-Engine
73 specification. This board has a OPSP-REP chip. 80 specification. This board has a OPSP-REP chip.
@@ -89,6 +96,7 @@ config PLAT_MAPPI3
89 96
90config PLAT_M32104UT 97config PLAT_M32104UT
91 bool "M32104UT" 98 bool "M32104UT"
99 select PLAT_HAS_INT1ICU
92 help 100 help
93 The M3T-M32104UT is an reference board based on uT-Engine 101 The M3T-M32104UT is an reference board based on uT-Engine
94 specification. This board has a M32104 chip. 102 specification. This board has a M32104 chip.
@@ -149,6 +157,18 @@ config ISA_DUAL_ISSUE
149 depends on CHIP_M32700 || CHIP_OPSP 157 depends on CHIP_M32700 || CHIP_OPSP
150 default y 158 default y
151 159
160config PLAT_HAS_INT0ICU
161 bool
162 default n
163
164config PLAT_HAS_INT1ICU
165 bool
166 default n
167
168config PLAT_HAS_INT2ICU
169 bool
170 default n
171
152config BUS_CLOCK 172config BUS_CLOCK
153 int "Bus Clock [Hz] (integer)" 173 int "Bus Clock [Hz] (integer)"
154 default "70000000" if PLAT_MAPPI 174 default "70000000" if PLAT_MAPPI
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile
index cdf63b210c..60e12f3126 100644
--- a/arch/m32r/Makefile
+++ b/arch/m32r/Makefile
@@ -36,7 +36,8 @@ LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
36libs-y += arch/m32r/lib/ $(LIBGCC) 36libs-y += arch/m32r/lib/ $(LIBGCC)
37core-y += arch/m32r/kernel/ \ 37core-y += arch/m32r/kernel/ \
38 arch/m32r/mm/ \ 38 arch/m32r/mm/ \
39 arch/m32r/boot/ 39 arch/m32r/boot/ \
40 arch/m32r/platforms/
40 41
41drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/ 42drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/
42 43
diff --git a/arch/m32r/m32104ut/defconfig.m32104ut b/arch/m32r/configs/m32104ut_defconfig
index 1f88f493a9..9b5af6cd2e 100644
--- a/arch/m32r/m32104ut/defconfig.m32104ut
+++ b/arch/m32r/configs/m32104ut_defconfig
@@ -1,12 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.23-rc1
4# Wed Dec 13 17:22:20 2006 4# Wed Aug 1 17:22:35 2007
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
8CONFIG_GENERIC_HARDIRQS=y 9CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 14
12# 15#
@@ -23,17 +26,18 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
23CONFIG_LOCALVERSION="" 26CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y 27CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SYSVIPC=y 28CONFIG_SYSVIPC=y
26# CONFIG_IPC_NS is not set 29CONFIG_SYSVIPC_SYSCTL=y
27# CONFIG_POSIX_MQUEUE is not set 30# CONFIG_POSIX_MQUEUE is not set
28# CONFIG_BSD_PROCESS_ACCT is not set 31# CONFIG_BSD_PROCESS_ACCT is not set
29# CONFIG_TASKSTATS is not set 32# CONFIG_TASKSTATS is not set
30# CONFIG_UTS_NS is not set 33# CONFIG_USER_NS is not set
31# CONFIG_AUDIT is not set 34# CONFIG_AUDIT is not set
32CONFIG_IKCONFIG=y 35CONFIG_IKCONFIG=y
33CONFIG_IKCONFIG_PROC=y 36CONFIG_IKCONFIG_PROC=y
37CONFIG_LOG_BUF_SHIFT=14
34CONFIG_SYSFS_DEPRECATED=y 38CONFIG_SYSFS_DEPRECATED=y
35# CONFIG_RELAY is not set 39# CONFIG_RELAY is not set
36CONFIG_INITRAMFS_SOURCE="" 40# CONFIG_BLK_DEV_INITRD is not set
37CONFIG_CC_OPTIMIZE_FOR_SIZE=y 41CONFIG_CC_OPTIMIZE_FOR_SIZE=y
38CONFIG_SYSCTL=y 42CONFIG_SYSCTL=y
39# CONFIG_EMBEDDED is not set 43# CONFIG_EMBEDDED is not set
@@ -46,29 +50,29 @@ CONFIG_BUG=y
46CONFIG_ELF_CORE=y 50CONFIG_ELF_CORE=y
47CONFIG_BASE_FULL=y 51CONFIG_BASE_FULL=y
48CONFIG_FUTEX=y 52CONFIG_FUTEX=y
53CONFIG_ANON_INODES=y
49CONFIG_EPOLL=y 54CONFIG_EPOLL=y
50CONFIG_SLAB=y 55CONFIG_SIGNALFD=y
56CONFIG_TIMERFD=y
57CONFIG_EVENTFD=y
51CONFIG_VM_EVENT_COUNTERS=y 58CONFIG_VM_EVENT_COUNTERS=y
59CONFIG_SLAB=y
60# CONFIG_SLUB is not set
61# CONFIG_SLOB is not set
52CONFIG_RT_MUTEXES=y 62CONFIG_RT_MUTEXES=y
53CONFIG_TINY_SHMEM=y 63CONFIG_TINY_SHMEM=y
54CONFIG_BASE_SMALL=0 64CONFIG_BASE_SMALL=0
55# CONFIG_SLOB is not set
56
57#
58# Loadable module support
59#
60CONFIG_MODULES=y 65CONFIG_MODULES=y
61CONFIG_MODULE_UNLOAD=y 66CONFIG_MODULE_UNLOAD=y
62CONFIG_MODULE_FORCE_UNLOAD=y 67CONFIG_MODULE_FORCE_UNLOAD=y
63# CONFIG_MODVERSIONS is not set 68# CONFIG_MODVERSIONS is not set
64# CONFIG_MODULE_SRCVERSION_ALL is not set 69# CONFIG_MODULE_SRCVERSION_ALL is not set
65CONFIG_KMOD=y 70CONFIG_KMOD=y
66
67#
68# Block layer
69#
70CONFIG_BLOCK=y 71CONFIG_BLOCK=y
72# CONFIG_LBD is not set
71# CONFIG_BLK_DEV_IO_TRACE is not set 73# CONFIG_BLK_DEV_IO_TRACE is not set
74# CONFIG_LSF is not set
75# CONFIG_BLK_DEV_BSG is not set
72 76
73# 77#
74# IO Schedulers 78# IO Schedulers
@@ -117,13 +121,18 @@ CONFIG_NEED_MULTIPLE_NODES=y
117# CONFIG_SPARSEMEM_STATIC is not set 121# CONFIG_SPARSEMEM_STATIC is not set
118CONFIG_SPLIT_PTLOCK_CPUS=4 122CONFIG_SPLIT_PTLOCK_CPUS=4
119# CONFIG_RESOURCES_64BIT is not set 123# CONFIG_RESOURCES_64BIT is not set
124CONFIG_ZONE_DMA_FLAG=1
125CONFIG_VIRT_TO_BUS=y
120CONFIG_IRAM_START=0x00700000 126CONFIG_IRAM_START=0x00700000
121CONFIG_IRAM_SIZE=0x00010000 127CONFIG_IRAM_SIZE=0x00010000
122CONFIG_RWSEM_GENERIC_SPINLOCK=y 128CONFIG_RWSEM_GENERIC_SPINLOCK=y
123# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 129# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
130# CONFIG_ARCH_HAS_ILOG2_U32 is not set
131# CONFIG_ARCH_HAS_ILOG2_U64 is not set
124CONFIG_GENERIC_FIND_NEXT_BIT=y 132CONFIG_GENERIC_FIND_NEXT_BIT=y
125CONFIG_GENERIC_HWEIGHT=y 133CONFIG_GENERIC_HWEIGHT=y
126CONFIG_GENERIC_CALIBRATE_DELAY=y 134CONFIG_GENERIC_CALIBRATE_DELAY=y
135CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
127CONFIG_PREEMPT=y 136CONFIG_PREEMPT=y
128# CONFIG_SMP is not set 137# CONFIG_SMP is not set
129CONFIG_NODES_SHIFT=1 138CONFIG_NODES_SHIFT=1
@@ -131,6 +140,7 @@ CONFIG_NODES_SHIFT=1
131# 140#
132# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 141# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
133# 142#
143# CONFIG_ARCH_SUPPORTS_MSI is not set
134CONFIG_ISA=y 144CONFIG_ISA=y
135 145
136# 146#
@@ -139,10 +149,6 @@ CONFIG_ISA=y
139# CONFIG_PCCARD is not set 149# CONFIG_PCCARD is not set
140 150
141# 151#
142# PCI Hotplug Support
143#
144
145#
146# Executable file formats 152# Executable file formats
147# 153#
148# CONFIG_BINFMT_FLAT is not set 154# CONFIG_BINFMT_FLAT is not set
@@ -156,13 +162,13 @@ CONFIG_NET=y
156# 162#
157# Networking options 163# Networking options
158# 164#
159# CONFIG_NETDEBUG is not set
160CONFIG_PACKET=y 165CONFIG_PACKET=y
161# CONFIG_PACKET_MMAP is not set 166# CONFIG_PACKET_MMAP is not set
162CONFIG_UNIX=y 167CONFIG_UNIX=y
163CONFIG_XFRM=y 168CONFIG_XFRM=y
164# CONFIG_XFRM_USER is not set 169# CONFIG_XFRM_USER is not set
165# CONFIG_XFRM_SUB_POLICY is not set 170# CONFIG_XFRM_SUB_POLICY is not set
171# CONFIG_XFRM_MIGRATE is not set
166# CONFIG_NET_KEY is not set 172# CONFIG_NET_KEY is not set
167CONFIG_INET=y 173CONFIG_INET=y
168# CONFIG_IP_MULTICAST is not set 174# CONFIG_IP_MULTICAST is not set
@@ -187,10 +193,6 @@ CONFIG_INET_TCP_DIAG=y
187CONFIG_TCP_CONG_CUBIC=y 193CONFIG_TCP_CONG_CUBIC=y
188CONFIG_DEFAULT_TCP_CONG="cubic" 194CONFIG_DEFAULT_TCP_CONG="cubic"
189# CONFIG_TCP_MD5SIG is not set 195# CONFIG_TCP_MD5SIG is not set
190
191#
192# IP: Virtual Server Configuration
193#
194# CONFIG_IP_VS is not set 196# CONFIG_IP_VS is not set
195# CONFIG_IPV6 is not set 197# CONFIG_IPV6 is not set
196# CONFIG_INET6_XFRM_TUNNEL is not set 198# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -206,12 +208,15 @@ CONFIG_NETFILTER_NETLINK=m
206CONFIG_NETFILTER_NETLINK_QUEUE=m 208CONFIG_NETFILTER_NETLINK_QUEUE=m
207CONFIG_NETFILTER_NETLINK_LOG=m 209CONFIG_NETFILTER_NETLINK_LOG=m
208# CONFIG_NF_CONNTRACK_ENABLED is not set 210# CONFIG_NF_CONNTRACK_ENABLED is not set
211# CONFIG_NF_CONNTRACK is not set
209CONFIG_NETFILTER_XTABLES=m 212CONFIG_NETFILTER_XTABLES=m
210CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 213CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
211# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 214# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
212CONFIG_NETFILTER_XT_TARGET_MARK=m 215CONFIG_NETFILTER_XT_TARGET_MARK=m
213CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 216CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
214# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set 217# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
218# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
219# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
215CONFIG_NETFILTER_XT_MATCH_COMMENT=m 220CONFIG_NETFILTER_XT_MATCH_COMMENT=m
216CONFIG_NETFILTER_XT_MATCH_DCCP=m 221CONFIG_NETFILTER_XT_MATCH_DCCP=m
217# CONFIG_NETFILTER_XT_MATCH_DSCP is not set 222# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
@@ -229,6 +234,7 @@ CONFIG_NETFILTER_XT_MATCH_SCTP=m
229# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set 234# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
230CONFIG_NETFILTER_XT_MATCH_STRING=m 235CONFIG_NETFILTER_XT_MATCH_STRING=m
231CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 236CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
237# CONFIG_NETFILTER_XT_MATCH_U32 is not set
232# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set 238# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
233 239
234# 240#
@@ -248,7 +254,6 @@ CONFIG_IP_NF_FILTER=m
248CONFIG_IP_NF_TARGET_REJECT=m 254CONFIG_IP_NF_TARGET_REJECT=m
249CONFIG_IP_NF_TARGET_LOG=m 255CONFIG_IP_NF_TARGET_LOG=m
250CONFIG_IP_NF_TARGET_ULOG=m 256CONFIG_IP_NF_TARGET_ULOG=m
251CONFIG_IP_NF_TARGET_TCPMSS=m
252CONFIG_IP_NF_MANGLE=m 257CONFIG_IP_NF_MANGLE=m
253CONFIG_IP_NF_TARGET_TOS=m 258CONFIG_IP_NF_TARGET_TOS=m
254CONFIG_IP_NF_TARGET_ECN=m 259CONFIG_IP_NF_TARGET_ECN=m
@@ -257,20 +262,8 @@ CONFIG_IP_NF_RAW=m
257CONFIG_IP_NF_ARPTABLES=m 262CONFIG_IP_NF_ARPTABLES=m
258CONFIG_IP_NF_ARPFILTER=m 263CONFIG_IP_NF_ARPFILTER=m
259CONFIG_IP_NF_ARP_MANGLE=m 264CONFIG_IP_NF_ARP_MANGLE=m
260
261#
262# DCCP Configuration (EXPERIMENTAL)
263#
264# CONFIG_IP_DCCP is not set 265# CONFIG_IP_DCCP is not set
265
266#
267# SCTP Configuration (EXPERIMENTAL)
268#
269# CONFIG_IP_SCTP is not set 266# CONFIG_IP_SCTP is not set
270
271#
272# TIPC Configuration (EXPERIMENTAL)
273#
274# CONFIG_TIPC is not set 267# CONFIG_TIPC is not set
275# CONFIG_ATM is not set 268# CONFIG_ATM is not set
276# CONFIG_BRIDGE is not set 269# CONFIG_BRIDGE is not set
@@ -297,7 +290,17 @@ CONFIG_NET_CLS_ROUTE=y
297# CONFIG_HAMRADIO is not set 290# CONFIG_HAMRADIO is not set
298# CONFIG_IRDA is not set 291# CONFIG_IRDA is not set
299# CONFIG_BT is not set 292# CONFIG_BT is not set
293# CONFIG_AF_RXRPC is not set
294
295#
296# Wireless
297#
298# CONFIG_CFG80211 is not set
299# CONFIG_WIRELESS_EXT is not set
300# CONFIG_MAC80211 is not set
300# CONFIG_IEEE80211 is not set 301# CONFIG_IEEE80211 is not set
302# CONFIG_RFKILL is not set
303# CONFIG_NET_9P is not set
301 304
302# 305#
303# Device Drivers 306# Device Drivers
@@ -310,28 +313,12 @@ CONFIG_STANDALONE=y
310CONFIG_PREVENT_FIRMWARE_BUILD=y 313CONFIG_PREVENT_FIRMWARE_BUILD=y
311# CONFIG_FW_LOADER is not set 314# CONFIG_FW_LOADER is not set
312# CONFIG_SYS_HYPERVISOR is not set 315# CONFIG_SYS_HYPERVISOR is not set
313
314#
315# Connector - unified userspace <-> kernelspace linker
316#
317# CONFIG_CONNECTOR is not set 316# CONFIG_CONNECTOR is not set
318
319#
320# Memory Technology Devices (MTD)
321#
322# CONFIG_MTD is not set 317# CONFIG_MTD is not set
323
324#
325# Parallel port support
326#
327CONFIG_PARPORT=m 318CONFIG_PARPORT=m
328# CONFIG_PARPORT_GSC is not set 319# CONFIG_PARPORT_GSC is not set
329# CONFIG_PARPORT_AX88796 is not set 320# CONFIG_PARPORT_AX88796 is not set
330CONFIG_PARPORT_1284=y 321CONFIG_PARPORT_1284=y
331
332#
333# Plug and Play support
334#
335CONFIG_PNP=y 322CONFIG_PNP=y
336# CONFIG_PNP_DEBUG is not set 323# CONFIG_PNP_DEBUG is not set
337 324
@@ -339,29 +326,19 @@ CONFIG_PNP=y
339# Protocols 326# Protocols
340# 327#
341CONFIG_ISAPNP=y 328CONFIG_ISAPNP=y
342 329# CONFIG_PNPACPI is not set
343# 330CONFIG_BLK_DEV=y
344# Block devices
345#
346# CONFIG_BLK_DEV_COW_COMMON is not set 331# CONFIG_BLK_DEV_COW_COMMON is not set
347CONFIG_BLK_DEV_LOOP=y 332CONFIG_BLK_DEV_LOOP=y
348# CONFIG_BLK_DEV_CRYPTOLOOP is not set 333# CONFIG_BLK_DEV_CRYPTOLOOP is not set
349CONFIG_BLK_DEV_NBD=m 334CONFIG_BLK_DEV_NBD=m
350# CONFIG_BLK_DEV_RAM is not set 335# CONFIG_BLK_DEV_RAM is not set
351# CONFIG_BLK_DEV_INITRD is not set
352CONFIG_CDROM_PKTCDVD=m 336CONFIG_CDROM_PKTCDVD=m
353CONFIG_CDROM_PKTCDVD_BUFFERS=8 337CONFIG_CDROM_PKTCDVD_BUFFERS=8
354CONFIG_CDROM_PKTCDVD_WCACHE=y 338CONFIG_CDROM_PKTCDVD_WCACHE=y
355# CONFIG_ATA_OVER_ETH is not set 339# CONFIG_ATA_OVER_ETH is not set
356 340CONFIG_MISC_DEVICES=y
357# 341# CONFIG_EEPROM_93CX6 is not set
358# Misc devices
359#
360# CONFIG_TIFM_CORE is not set
361
362#
363# ATA/ATAPI/MFM/RLL support
364#
365CONFIG_IDE=y 342CONFIG_IDE=y
366CONFIG_BLK_DEV_IDE=y 343CONFIG_BLK_DEV_IDE=y
367 344
@@ -376,16 +353,17 @@ CONFIG_BLK_DEV_IDECD=y
376# CONFIG_BLK_DEV_IDEFLOPPY is not set 353# CONFIG_BLK_DEV_IDEFLOPPY is not set
377# CONFIG_BLK_DEV_IDESCSI is not set 354# CONFIG_BLK_DEV_IDESCSI is not set
378# CONFIG_IDE_TASK_IOCTL is not set 355# CONFIG_IDE_TASK_IOCTL is not set
356CONFIG_IDE_PROC_FS=y
379 357
380# 358#
381# IDE chipset support/bugfixes 359# IDE chipset support/bugfixes
382# 360#
383CONFIG_IDE_GENERIC=y 361CONFIG_IDE_GENERIC=y
384# CONFIG_BLK_DEV_IDEPNP is not set 362# CONFIG_BLK_DEV_IDEPNP is not set
363# CONFIG_IDEPCI_PCIBUS_ORDER is not set
385# CONFIG_IDE_ARM is not set 364# CONFIG_IDE_ARM is not set
386# CONFIG_IDE_CHIPSETS is not set 365# CONFIG_IDE_CHIPSETS is not set
387# CONFIG_BLK_DEV_IDEDMA is not set 366# CONFIG_BLK_DEV_IDEDMA is not set
388# CONFIG_IDEDMA_AUTO is not set
389# CONFIG_BLK_DEV_HD is not set 367# CONFIG_BLK_DEV_HD is not set
390 368
391# 369#
@@ -393,6 +371,8 @@ CONFIG_IDE_GENERIC=y
393# 371#
394# CONFIG_RAID_ATTRS is not set 372# CONFIG_RAID_ATTRS is not set
395CONFIG_SCSI=y 373CONFIG_SCSI=y
374# CONFIG_SCSI_DMA is not set
375# CONFIG_SCSI_TGT is not set
396# CONFIG_SCSI_NETLINK is not set 376# CONFIG_SCSI_NETLINK is not set
397CONFIG_SCSI_PROC_FS=y 377CONFIG_SCSI_PROC_FS=y
398 378
@@ -413,6 +393,8 @@ CONFIG_CHR_DEV_SG=m
413CONFIG_SCSI_MULTI_LUN=y 393CONFIG_SCSI_MULTI_LUN=y
414CONFIG_SCSI_CONSTANTS=y 394CONFIG_SCSI_CONSTANTS=y
415# CONFIG_SCSI_LOGGING is not set 395# CONFIG_SCSI_LOGGING is not set
396# CONFIG_SCSI_SCAN_ASYNC is not set
397CONFIG_SCSI_WAIT_SCAN=m
416 398
417# 399#
418# SCSI Transports 400# SCSI Transports
@@ -420,12 +402,8 @@ CONFIG_SCSI_CONSTANTS=y
420CONFIG_SCSI_SPI_ATTRS=y 402CONFIG_SCSI_SPI_ATTRS=y
421# CONFIG_SCSI_FC_ATTRS is not set 403# CONFIG_SCSI_FC_ATTRS is not set
422# CONFIG_SCSI_ISCSI_ATTRS is not set 404# CONFIG_SCSI_ISCSI_ATTRS is not set
423# CONFIG_SCSI_SAS_ATTRS is not set
424# CONFIG_SCSI_SAS_LIBSAS is not set 405# CONFIG_SCSI_SAS_LIBSAS is not set
425 406CONFIG_SCSI_LOWLEVEL=y
426#
427# SCSI low-level drivers
428#
429# CONFIG_ISCSI_TCP is not set 407# CONFIG_ISCSI_TCP is not set
430# CONFIG_SCSI_AHA152X is not set 408# CONFIG_SCSI_AHA152X is not set
431# CONFIG_SCSI_AIC7XXX_OLD is not set 409# CONFIG_SCSI_AIC7XXX_OLD is not set
@@ -441,19 +419,6 @@ CONFIG_SCSI_SPI_ATTRS=y
441# CONFIG_SCSI_SYM53C416 is not set 419# CONFIG_SCSI_SYM53C416 is not set
442# CONFIG_SCSI_T128 is not set 420# CONFIG_SCSI_T128 is not set
443# CONFIG_SCSI_DEBUG is not set 421# CONFIG_SCSI_DEBUG is not set
444
445#
446# Serial ATA (prod) and Parallel ATA (experimental) drivers
447#
448
449#
450# Old CD-ROM drivers (not SCSI, not IDE)
451#
452# CONFIG_CD_NO_IDESCSI is not set
453
454#
455# Multi-device support (RAID and LVM)
456#
457CONFIG_MD=y 422CONFIG_MD=y
458CONFIG_BLK_DEV_MD=y 423CONFIG_BLK_DEV_MD=y
459# CONFIG_MD_LINEAR is not set 424# CONFIG_MD_LINEAR is not set
@@ -470,43 +435,17 @@ CONFIG_DM_SNAPSHOT=m
470# CONFIG_DM_MIRROR is not set 435# CONFIG_DM_MIRROR is not set
471# CONFIG_DM_ZERO is not set 436# CONFIG_DM_ZERO is not set
472# CONFIG_DM_MULTIPATH is not set 437# CONFIG_DM_MULTIPATH is not set
473 438# CONFIG_DM_DELAY is not set
474#
475# Fusion MPT device support
476#
477# CONFIG_FUSION is not set
478
479#
480# IEEE 1394 (FireWire) support
481#
482
483#
484# I2O device support
485#
486
487#
488# Network device support
489#
490CONFIG_NETDEVICES=y 439CONFIG_NETDEVICES=y
440# CONFIG_NETDEVICES_MULTIQUEUE is not set
491CONFIG_DUMMY=m 441CONFIG_DUMMY=m
492# CONFIG_BONDING is not set 442# CONFIG_BONDING is not set
443# CONFIG_MACVLAN is not set
493# CONFIG_EQUALIZER is not set 444# CONFIG_EQUALIZER is not set
494# CONFIG_TUN is not set 445# CONFIG_TUN is not set
495# CONFIG_NET_SB1000 is not set 446# CONFIG_NET_SB1000 is not set
496
497#
498# ARCnet devices
499#
500# CONFIG_ARCNET is not set 447# CONFIG_ARCNET is not set
501
502#
503# PHY device support
504#
505# CONFIG_PHYLIB is not set 448# CONFIG_PHYLIB is not set
506
507#
508# Ethernet (10 or 100Mbit)
509#
510CONFIG_NET_ETHERNET=y 449CONFIG_NET_ETHERNET=y
511CONFIG_MII=y 450CONFIG_MII=y
512CONFIG_NET_VENDOR_3COM=y 451CONFIG_NET_VENDOR_3COM=y
@@ -536,28 +475,15 @@ CONFIG_NET_PCI=y
536# CONFIG_APRICOT is not set 475# CONFIG_APRICOT is not set
537# CONFIG_CS89x0 is not set 476# CONFIG_CS89x0 is not set
538# CONFIG_NET_POCKET is not set 477# CONFIG_NET_POCKET is not set
539 478CONFIG_NETDEV_1000=y
540# 479CONFIG_NETDEV_10000=y
541# Ethernet (1000 Mbit)
542#
543
544#
545# Ethernet (10000 Mbit)
546#
547
548#
549# Token Ring devices
550#
551# CONFIG_TR is not set 480# CONFIG_TR is not set
552 481
553# 482#
554# Wireless LAN (non-hamradio) 483# Wireless LAN
555#
556# CONFIG_NET_RADIO is not set
557
558#
559# Wan interfaces
560# 484#
485# CONFIG_WLAN_PRE80211 is not set
486# CONFIG_WLAN_80211 is not set
561# CONFIG_WAN is not set 487# CONFIG_WAN is not set
562# CONFIG_PLIP is not set 488# CONFIG_PLIP is not set
563# CONFIG_PPP is not set 489# CONFIG_PPP is not set
@@ -566,15 +492,7 @@ CONFIG_NET_PCI=y
566# CONFIG_NETCONSOLE is not set 492# CONFIG_NETCONSOLE is not set
567# CONFIG_NETPOLL is not set 493# CONFIG_NETPOLL is not set
568# CONFIG_NET_POLL_CONTROLLER is not set 494# CONFIG_NET_POLL_CONTROLLER is not set
569
570#
571# ISDN subsystem
572#
573# CONFIG_ISDN is not set 495# CONFIG_ISDN is not set
574
575#
576# Telephony Support
577#
578# CONFIG_PHONE is not set 496# CONFIG_PHONE is not set
579 497
580# 498#
@@ -582,6 +500,7 @@ CONFIG_NET_PCI=y
582# 500#
583CONFIG_INPUT=y 501CONFIG_INPUT=y
584# CONFIG_INPUT_FF_MEMLESS is not set 502# CONFIG_INPUT_FF_MEMLESS is not set
503# CONFIG_INPUT_POLLDEV is not set
585 504
586# 505#
587# Userland interfaces 506# Userland interfaces
@@ -607,12 +526,19 @@ CONFIG_KEYBOARD_ATKBD=y
607# CONFIG_KEYBOARD_STOWAWAY is not set 526# CONFIG_KEYBOARD_STOWAWAY is not set
608CONFIG_INPUT_MOUSE=y 527CONFIG_INPUT_MOUSE=y
609CONFIG_MOUSE_PS2=y 528CONFIG_MOUSE_PS2=y
529CONFIG_MOUSE_PS2_ALPS=y
530CONFIG_MOUSE_PS2_LOGIPS2PP=y
531CONFIG_MOUSE_PS2_SYNAPTICS=y
532CONFIG_MOUSE_PS2_LIFEBOOK=y
533CONFIG_MOUSE_PS2_TRACKPOINT=y
534# CONFIG_MOUSE_PS2_TOUCHKIT is not set
610# CONFIG_MOUSE_SERIAL is not set 535# CONFIG_MOUSE_SERIAL is not set
611# CONFIG_MOUSE_INPORT is not set 536# CONFIG_MOUSE_INPORT is not set
612# CONFIG_MOUSE_LOGIBM is not set 537# CONFIG_MOUSE_LOGIBM is not set
613# CONFIG_MOUSE_PC110PAD is not set 538# CONFIG_MOUSE_PC110PAD is not set
614# CONFIG_MOUSE_VSXXXAA is not set 539# CONFIG_MOUSE_VSXXXAA is not set
615# CONFIG_INPUT_JOYSTICK is not set 540# CONFIG_INPUT_JOYSTICK is not set
541# CONFIG_INPUT_TABLET is not set
616# CONFIG_INPUT_TOUCHSCREEN is not set 542# CONFIG_INPUT_TOUCHSCREEN is not set
617# CONFIG_INPUT_MISC is not set 543# CONFIG_INPUT_MISC is not set
618 544
@@ -657,35 +583,17 @@ CONFIG_LEGACY_PTY_COUNT=256
657# CONFIG_PRINTER is not set 583# CONFIG_PRINTER is not set
658# CONFIG_PPDEV is not set 584# CONFIG_PPDEV is not set
659# CONFIG_TIPAR is not set 585# CONFIG_TIPAR is not set
660
661#
662# IPMI
663#
664# CONFIG_IPMI_HANDLER is not set 586# CONFIG_IPMI_HANDLER is not set
665
666#
667# Watchdog Cards
668#
669# CONFIG_WATCHDOG is not set 587# CONFIG_WATCHDOG is not set
670# CONFIG_HW_RANDOM is not set 588# CONFIG_HW_RANDOM is not set
671# CONFIG_RTC is not set 589# CONFIG_RTC is not set
672# CONFIG_DTLK is not set 590# CONFIG_DTLK is not set
673# CONFIG_R3964 is not set 591# CONFIG_R3964 is not set
674
675#
676# Ftape, the floppy tape device driver
677#
678# CONFIG_RAW_DRIVER is not set 592# CONFIG_RAW_DRIVER is not set
679
680#
681# TPM devices
682#
683# CONFIG_TCG_TPM is not set 593# CONFIG_TCG_TPM is not set
684 594CONFIG_DEVPORT=y
685#
686# I2C support
687#
688CONFIG_I2C=m 595CONFIG_I2C=m
596CONFIG_I2C_BOARDINFO=y
689CONFIG_I2C_CHARDEV=m 597CONFIG_I2C_CHARDEV=m
690 598
691# 599#
@@ -702,6 +610,8 @@ CONFIG_I2C_ELEKTOR=m
702# CONFIG_I2C_OCORES is not set 610# CONFIG_I2C_OCORES is not set
703# CONFIG_I2C_PARPORT is not set 611# CONFIG_I2C_PARPORT is not set
704# CONFIG_I2C_PARPORT_LIGHT is not set 612# CONFIG_I2C_PARPORT_LIGHT is not set
613# CONFIG_I2C_SIMTEC is not set
614# CONFIG_I2C_TAOS_EVM is not set
705# CONFIG_I2C_STUB is not set 615# CONFIG_I2C_STUB is not set
706# CONFIG_I2C_PCA_ISA is not set 616# CONFIG_I2C_PCA_ISA is not set
707 617
@@ -710,11 +620,13 @@ CONFIG_I2C_ELEKTOR=m
710# 620#
711# CONFIG_SENSORS_DS1337 is not set 621# CONFIG_SENSORS_DS1337 is not set
712# CONFIG_SENSORS_DS1374 is not set 622# CONFIG_SENSORS_DS1374 is not set
623# CONFIG_DS1682 is not set
713# CONFIG_SENSORS_EEPROM is not set 624# CONFIG_SENSORS_EEPROM is not set
714# CONFIG_SENSORS_PCF8574 is not set 625# CONFIG_SENSORS_PCF8574 is not set
715# CONFIG_SENSORS_PCA9539 is not set 626# CONFIG_SENSORS_PCA9539 is not set
716# CONFIG_SENSORS_PCF8591 is not set 627# CONFIG_SENSORS_PCF8591 is not set
717# CONFIG_SENSORS_MAX6875 is not set 628# CONFIG_SENSORS_MAX6875 is not set
629# CONFIG_SENSORS_TSL2550 is not set
718# CONFIG_I2C_DEBUG_CORE is not set 630# CONFIG_I2C_DEBUG_CORE is not set
719# CONFIG_I2C_DEBUG_ALGO is not set 631# CONFIG_I2C_DEBUG_ALGO is not set
720# CONFIG_I2C_DEBUG_BUS is not set 632# CONFIG_I2C_DEBUG_BUS is not set
@@ -725,21 +637,17 @@ CONFIG_I2C_ELEKTOR=m
725# 637#
726# CONFIG_SPI is not set 638# CONFIG_SPI is not set
727# CONFIG_SPI_MASTER is not set 639# CONFIG_SPI_MASTER is not set
728
729#
730# Dallas's 1-wire bus
731#
732# CONFIG_W1 is not set 640# CONFIG_W1 is not set
733 641# CONFIG_POWER_SUPPLY is not set
734#
735# Hardware Monitoring support
736#
737CONFIG_HWMON=y 642CONFIG_HWMON=y
738CONFIG_HWMON_VID=m 643CONFIG_HWMON_VID=m
739# CONFIG_SENSORS_ABITUGURU is not set 644# CONFIG_SENSORS_ABITUGURU is not set
645# CONFIG_SENSORS_ABITUGURU3 is not set
646# CONFIG_SENSORS_AD7418 is not set
740CONFIG_SENSORS_ADM1021=m 647CONFIG_SENSORS_ADM1021=m
741CONFIG_SENSORS_ADM1025=m 648CONFIG_SENSORS_ADM1025=m
742# CONFIG_SENSORS_ADM1026 is not set 649# CONFIG_SENSORS_ADM1026 is not set
650# CONFIG_SENSORS_ADM1029 is not set
743CONFIG_SENSORS_ADM1031=m 651CONFIG_SENSORS_ADM1031=m
744# CONFIG_SENSORS_ADM9240 is not set 652# CONFIG_SENSORS_ADM9240 is not set
745CONFIG_SENSORS_ASB100=m 653CONFIG_SENSORS_ASB100=m
@@ -761,8 +669,12 @@ CONFIG_SENSORS_LM85=m
761# CONFIG_SENSORS_LM87 is not set 669# CONFIG_SENSORS_LM87 is not set
762CONFIG_SENSORS_LM90=m 670CONFIG_SENSORS_LM90=m
763# CONFIG_SENSORS_LM92 is not set 671# CONFIG_SENSORS_LM92 is not set
672# CONFIG_SENSORS_LM93 is not set
764CONFIG_SENSORS_MAX1619=m 673CONFIG_SENSORS_MAX1619=m
674# CONFIG_SENSORS_MAX6650 is not set
765# CONFIG_SENSORS_PC87360 is not set 675# CONFIG_SENSORS_PC87360 is not set
676# CONFIG_SENSORS_PC87427 is not set
677# CONFIG_SENSORS_DME1737 is not set
766CONFIG_SENSORS_SMSC47M1=m 678CONFIG_SENSORS_SMSC47M1=m
767# CONFIG_SENSORS_SMSC47M192 is not set 679# CONFIG_SENSORS_SMSC47M192 is not set
768# CONFIG_SENSORS_SMSC47B397 is not set 680# CONFIG_SENSORS_SMSC47B397 is not set
@@ -770,29 +682,27 @@ CONFIG_SENSORS_SMSC47M1=m
770CONFIG_SENSORS_W83781D=m 682CONFIG_SENSORS_W83781D=m
771# CONFIG_SENSORS_W83791D is not set 683# CONFIG_SENSORS_W83791D is not set
772# CONFIG_SENSORS_W83792D is not set 684# CONFIG_SENSORS_W83792D is not set
685# CONFIG_SENSORS_W83793 is not set
773CONFIG_SENSORS_W83L785TS=m 686CONFIG_SENSORS_W83L785TS=m
774CONFIG_SENSORS_W83627HF=m 687CONFIG_SENSORS_W83627HF=m
775# CONFIG_SENSORS_W83627EHF is not set 688# CONFIG_SENSORS_W83627EHF is not set
776# CONFIG_HWMON_DEBUG_CHIP is not set 689# CONFIG_HWMON_DEBUG_CHIP is not set
777 690
778# 691#
692# Multifunction device drivers
693#
694# CONFIG_MFD_SM501 is not set
695
696#
779# Multimedia devices 697# Multimedia devices
780# 698#
781CONFIG_VIDEO_DEV=m 699CONFIG_VIDEO_DEV=m
782CONFIG_VIDEO_V4L1=y 700CONFIG_VIDEO_V4L1=y
783CONFIG_VIDEO_V4L1_COMPAT=y 701CONFIG_VIDEO_V4L1_COMPAT=y
784CONFIG_VIDEO_V4L2=y 702CONFIG_VIDEO_V4L2=y
785 703CONFIG_VIDEO_CAPTURE_DRIVERS=y
786#
787# Video Capture Adapters
788#
789
790#
791# Video Capture Adapters
792#
793# CONFIG_VIDEO_ADV_DEBUG is not set 704# CONFIG_VIDEO_ADV_DEBUG is not set
794CONFIG_VIDEO_HELPER_CHIPS_AUTO=y 705CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
795# CONFIG_VIDEO_VIVI is not set
796# CONFIG_VIDEO_PMS is not set 706# CONFIG_VIDEO_PMS is not set
797CONFIG_VIDEO_BWQCAM=m 707CONFIG_VIDEO_BWQCAM=m
798CONFIG_VIDEO_CQCAM=m 708CONFIG_VIDEO_CQCAM=m
@@ -801,11 +711,9 @@ CONFIG_VIDEO_CQCAM=m
801# CONFIG_VIDEO_SAA5246A is not set 711# CONFIG_VIDEO_SAA5246A is not set
802# CONFIG_VIDEO_SAA5249 is not set 712# CONFIG_VIDEO_SAA5249 is not set
803# CONFIG_TUNER_3036 is not set 713# CONFIG_TUNER_3036 is not set
714# CONFIG_TUNER_TEA5761 is not set
804# CONFIG_VIDEO_M32R_AR is not set 715# CONFIG_VIDEO_M32R_AR is not set
805 716CONFIG_RADIO_ADAPTERS=y
806#
807# Radio Adapters
808#
809# CONFIG_RADIO_CADET is not set 717# CONFIG_RADIO_CADET is not set
810# CONFIG_RADIO_RTRACK is not set 718# CONFIG_RADIO_RTRACK is not set
811# CONFIG_RADIO_RTRACK2 is not set 719# CONFIG_RADIO_RTRACK2 is not set
@@ -817,16 +725,20 @@ CONFIG_VIDEO_CQCAM=m
817# CONFIG_RADIO_TRUST is not set 725# CONFIG_RADIO_TRUST is not set
818# CONFIG_RADIO_TYPHOON is not set 726# CONFIG_RADIO_TYPHOON is not set
819# CONFIG_RADIO_ZOLTRIX is not set 727# CONFIG_RADIO_ZOLTRIX is not set
728# CONFIG_DVB_CORE is not set
729CONFIG_DAB=y
820 730
821# 731#
822# Digital Video Broadcasting Devices 732# Graphics support
823# 733#
824# CONFIG_DVB is not set 734# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
825 735
826# 736#
827# Graphics support 737# Display device support
828# 738#
829CONFIG_FIRMWARE_EDID=y 739# CONFIG_DISPLAY_SUPPORT is not set
740# CONFIG_VGASTATE is not set
741CONFIG_VIDEO_OUTPUT_CONTROL=m
830# CONFIG_FB is not set 742# CONFIG_FB is not set
831 743
832# 744#
@@ -836,16 +748,15 @@ CONFIG_VGA_CONSOLE=y
836# CONFIG_VGACON_SOFT_SCROLLBACK is not set 748# CONFIG_VGACON_SOFT_SCROLLBACK is not set
837# CONFIG_MDA_CONSOLE is not set 749# CONFIG_MDA_CONSOLE is not set
838CONFIG_DUMMY_CONSOLE=y 750CONFIG_DUMMY_CONSOLE=y
839# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
840 751
841# 752#
842# Sound 753# Sound
843# 754#
844# CONFIG_SOUND is not set 755# CONFIG_SOUND is not set
845 756CONFIG_HID_SUPPORT=y
846# 757CONFIG_HID=y
847# USB support 758CONFIG_HID_DEBUG=y
848# 759CONFIG_USB_SUPPORT=y
849# CONFIG_USB_ARCH_HAS_HCD is not set 760# CONFIG_USB_ARCH_HAS_HCD is not set
850# CONFIG_USB_ARCH_HAS_OHCI is not set 761# CONFIG_USB_ARCH_HAS_OHCI is not set
851# CONFIG_USB_ARCH_HAS_EHCI is not set 762# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -858,50 +769,19 @@ CONFIG_DUMMY_CONSOLE=y
858# USB Gadget Support 769# USB Gadget Support
859# 770#
860# CONFIG_USB_GADGET is not set 771# CONFIG_USB_GADGET is not set
861
862#
863# MMC/SD Card support
864#
865# CONFIG_MMC is not set 772# CONFIG_MMC is not set
866
867#
868# LED devices
869#
870# CONFIG_NEW_LEDS is not set 773# CONFIG_NEW_LEDS is not set
871 774
872# 775#
873# LED drivers
874#
875
876#
877# LED Triggers
878#
879
880#
881# InfiniBand support
882#
883
884#
885# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
886#
887
888#
889# Real Time Clock 776# Real Time Clock
890# 777#
891# CONFIG_RTC_CLASS is not set 778# CONFIG_RTC_CLASS is not set
779# CONFIG_AUXDISPLAY is not set
892 780
893# 781#
894# DMA Engine support 782# Userspace I/O
895#
896# CONFIG_DMA_ENGINE is not set
897
898#
899# DMA Clients
900#
901
902#
903# DMA Devices
904# 783#
784# CONFIG_UIO is not set
905 785
906# 786#
907# File systems 787# File systems
@@ -1000,6 +880,7 @@ CONFIG_LOCKD_V4=y
1000CONFIG_EXPORTFS=m 880CONFIG_EXPORTFS=m
1001CONFIG_NFS_COMMON=y 881CONFIG_NFS_COMMON=y
1002CONFIG_SUNRPC=y 882CONFIG_SUNRPC=y
883# CONFIG_SUNRPC_BIND34 is not set
1003# CONFIG_RPCSEC_GSS_KRB5 is not set 884# CONFIG_RPCSEC_GSS_KRB5 is not set
1004# CONFIG_RPCSEC_GSS_SPKM3 is not set 885# CONFIG_RPCSEC_GSS_SPKM3 is not set
1005# CONFIG_SMB_FS is not set 886# CONFIG_SMB_FS is not set
@@ -1007,7 +888,6 @@ CONFIG_SUNRPC=y
1007# CONFIG_NCP_FS is not set 888# CONFIG_NCP_FS is not set
1008# CONFIG_CODA_FS is not set 889# CONFIG_CODA_FS is not set
1009# CONFIG_AFS_FS is not set 890# CONFIG_AFS_FS is not set
1010# CONFIG_9P_FS is not set
1011 891
1012# 892#
1013# Partition Types 893# Partition Types
@@ -1060,6 +940,11 @@ CONFIG_NLS_ISO8859_1=y
1060# CONFIG_NLS_UTF8 is not set 940# CONFIG_NLS_UTF8 is not set
1061 941
1062# 942#
943# Distributed Lock Manager
944#
945# CONFIG_DLM is not set
946
947#
1063# Profiling support 948# Profiling support
1064# 949#
1065CONFIG_PROFILING=y 950CONFIG_PROFILING=y
@@ -1072,29 +957,24 @@ CONFIG_OPROFILE=m
1072CONFIG_ENABLE_MUST_CHECK=y 957CONFIG_ENABLE_MUST_CHECK=y
1073# CONFIG_MAGIC_SYSRQ is not set 958# CONFIG_MAGIC_SYSRQ is not set
1074# CONFIG_UNUSED_SYMBOLS is not set 959# CONFIG_UNUSED_SYMBOLS is not set
960# CONFIG_DEBUG_FS is not set
961# CONFIG_HEADERS_CHECK is not set
1075# CONFIG_DEBUG_KERNEL is not set 962# CONFIG_DEBUG_KERNEL is not set
1076CONFIG_LOG_BUF_SHIFT=14
1077CONFIG_DEBUG_BUGVERBOSE=y 963CONFIG_DEBUG_BUGVERBOSE=y
1078# CONFIG_DEBUG_FS is not set
1079# CONFIG_FRAME_POINTER is not set 964# CONFIG_FRAME_POINTER is not set
1080# CONFIG_UNWIND_INFO is not set
1081# CONFIG_HEADERS_CHECK is not set
1082 965
1083# 966#
1084# Security options 967# Security options
1085# 968#
1086# CONFIG_KEYS is not set 969# CONFIG_KEYS is not set
1087# CONFIG_SECURITY is not set 970# CONFIG_SECURITY is not set
1088
1089#
1090# Cryptographic options
1091#
1092CONFIG_CRYPTO=y 971CONFIG_CRYPTO=y
1093CONFIG_CRYPTO_ALGAPI=y 972CONFIG_CRYPTO_ALGAPI=y
1094CONFIG_CRYPTO_BLKCIPHER=m 973CONFIG_CRYPTO_BLKCIPHER=m
1095CONFIG_CRYPTO_HASH=y 974CONFIG_CRYPTO_HASH=y
1096CONFIG_CRYPTO_MANAGER=y 975CONFIG_CRYPTO_MANAGER=y
1097CONFIG_CRYPTO_HMAC=y 976CONFIG_CRYPTO_HMAC=y
977# CONFIG_CRYPTO_XCBC is not set
1098CONFIG_CRYPTO_NULL=m 978CONFIG_CRYPTO_NULL=m
1099CONFIG_CRYPTO_MD4=m 979CONFIG_CRYPTO_MD4=m
1100CONFIG_CRYPTO_MD5=m 980CONFIG_CRYPTO_MD5=m
@@ -1103,9 +983,14 @@ CONFIG_CRYPTO_SHA256=m
1103CONFIG_CRYPTO_SHA512=m 983CONFIG_CRYPTO_SHA512=m
1104CONFIG_CRYPTO_WP512=m 984CONFIG_CRYPTO_WP512=m
1105# CONFIG_CRYPTO_TGR192 is not set 985# CONFIG_CRYPTO_TGR192 is not set
986# CONFIG_CRYPTO_GF128MUL is not set
1106CONFIG_CRYPTO_ECB=m 987CONFIG_CRYPTO_ECB=m
1107CONFIG_CRYPTO_CBC=m 988CONFIG_CRYPTO_CBC=m
989CONFIG_CRYPTO_PCBC=m
990# CONFIG_CRYPTO_LRW is not set
991# CONFIG_CRYPTO_CRYPTD is not set
1108CONFIG_CRYPTO_DES=m 992CONFIG_CRYPTO_DES=m
993# CONFIG_CRYPTO_FCRYPT is not set
1109CONFIG_CRYPTO_BLOWFISH=m 994CONFIG_CRYPTO_BLOWFISH=m
1110CONFIG_CRYPTO_TWOFISH=m 995CONFIG_CRYPTO_TWOFISH=m
1111CONFIG_CRYPTO_TWOFISH_COMMON=m 996CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1120,21 +1005,23 @@ CONFIG_CRYPTO_AES=m
1120# CONFIG_CRYPTO_DEFLATE is not set 1005# CONFIG_CRYPTO_DEFLATE is not set
1121# CONFIG_CRYPTO_MICHAEL_MIC is not set 1006# CONFIG_CRYPTO_MICHAEL_MIC is not set
1122CONFIG_CRYPTO_CRC32C=m 1007CONFIG_CRYPTO_CRC32C=m
1008# CONFIG_CRYPTO_CAMELLIA is not set
1123# CONFIG_CRYPTO_TEST is not set 1009# CONFIG_CRYPTO_TEST is not set
1124 1010CONFIG_CRYPTO_HW=y
1125#
1126# Hardware crypto devices
1127#
1128 1011
1129# 1012#
1130# Library routines 1013# Library routines
1131# 1014#
1015CONFIG_BITREVERSE=y
1132CONFIG_CRC_CCITT=m 1016CONFIG_CRC_CCITT=m
1133CONFIG_CRC16=m 1017CONFIG_CRC16=m
1018# CONFIG_CRC_ITU_T is not set
1134CONFIG_CRC32=y 1019CONFIG_CRC32=y
1020# CONFIG_CRC7 is not set
1135CONFIG_LIBCRC32C=m 1021CONFIG_LIBCRC32C=m
1136CONFIG_TEXTSEARCH=y 1022CONFIG_TEXTSEARCH=y
1137CONFIG_TEXTSEARCH_KMP=m 1023CONFIG_TEXTSEARCH_KMP=m
1138CONFIG_TEXTSEARCH_BM=m 1024CONFIG_TEXTSEARCH_BM=m
1139CONFIG_TEXTSEARCH_FSM=m 1025CONFIG_TEXTSEARCH_FSM=m
1140CONFIG_PLIST=y 1026CONFIG_PLIST=y
1027CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/m32700ut/defconfig.m32700ut.smp b/arch/m32r/configs/m32700ut.smp_defconfig
index 13579917af..af3b981791 100644
--- a/arch/m32r/m32700ut/defconfig.m32700ut.smp
+++ b/arch/m32r/configs/m32700ut.smp_defconfig
@@ -1,12 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.23-rc1
4# Tue Dec 12 17:52:38 2006 4# Wed Aug 1 17:22:35 2007
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
8CONFIG_GENERIC_HARDIRQS=y 9CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 14
12# 15#
@@ -23,19 +26,20 @@ CONFIG_LOCALVERSION=""
23CONFIG_LOCALVERSION_AUTO=y 26CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 27CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 28CONFIG_SYSVIPC=y
26# CONFIG_IPC_NS is not set 29CONFIG_SYSVIPC_SYSCTL=y
27# CONFIG_POSIX_MQUEUE is not set 30# CONFIG_POSIX_MQUEUE is not set
28CONFIG_BSD_PROCESS_ACCT=y 31CONFIG_BSD_PROCESS_ACCT=y
29# CONFIG_BSD_PROCESS_ACCT_V3 is not set 32# CONFIG_BSD_PROCESS_ACCT_V3 is not set
30# CONFIG_TASKSTATS is not set 33# CONFIG_TASKSTATS is not set
31# CONFIG_UTS_NS is not set 34# CONFIG_USER_NS is not set
32# CONFIG_AUDIT is not set 35# CONFIG_AUDIT is not set
33CONFIG_IKCONFIG=y 36CONFIG_IKCONFIG=y
34CONFIG_IKCONFIG_PROC=y 37CONFIG_IKCONFIG_PROC=y
38CONFIG_LOG_BUF_SHIFT=15
35# CONFIG_CPUSETS is not set 39# CONFIG_CPUSETS is not set
36CONFIG_SYSFS_DEPRECATED=y 40CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set 41# CONFIG_RELAY is not set
38CONFIG_INITRAMFS_SOURCE="" 42# CONFIG_BLK_DEV_INITRD is not set
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SYSCTL=y 44CONFIG_SYSCTL=y
41CONFIG_EMBEDDED=y 45CONFIG_EMBEDDED=y
@@ -47,17 +51,18 @@ CONFIG_BUG=y
47CONFIG_ELF_CORE=y 51CONFIG_ELF_CORE=y
48CONFIG_BASE_FULL=y 52CONFIG_BASE_FULL=y
49# CONFIG_FUTEX is not set 53# CONFIG_FUTEX is not set
54CONFIG_ANON_INODES=y
50# CONFIG_EPOLL is not set 55# CONFIG_EPOLL is not set
56CONFIG_SIGNALFD=y
57CONFIG_TIMERFD=y
58CONFIG_EVENTFD=y
51CONFIG_SHMEM=y 59CONFIG_SHMEM=y
52CONFIG_SLAB=y
53CONFIG_VM_EVENT_COUNTERS=y 60CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_SLAB=y
62# CONFIG_SLUB is not set
63# CONFIG_SLOB is not set
54# CONFIG_TINY_SHMEM is not set 64# CONFIG_TINY_SHMEM is not set
55CONFIG_BASE_SMALL=0 65CONFIG_BASE_SMALL=0
56# CONFIG_SLOB is not set
57
58#
59# Loadable module support
60#
61CONFIG_MODULES=y 66CONFIG_MODULES=y
62CONFIG_MODULE_UNLOAD=y 67CONFIG_MODULE_UNLOAD=y
63# CONFIG_MODULE_FORCE_UNLOAD is not set 68# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -65,12 +70,11 @@ CONFIG_MODULE_UNLOAD=y
65# CONFIG_MODULE_SRCVERSION_ALL is not set 70# CONFIG_MODULE_SRCVERSION_ALL is not set
66CONFIG_KMOD=y 71CONFIG_KMOD=y
67CONFIG_STOP_MACHINE=y 72CONFIG_STOP_MACHINE=y
68
69#
70# Block layer
71#
72CONFIG_BLOCK=y 73CONFIG_BLOCK=y
74# CONFIG_LBD is not set
73# CONFIG_BLK_DEV_IO_TRACE is not set 75# CONFIG_BLK_DEV_IO_TRACE is not set
76# CONFIG_LSF is not set
77# CONFIG_BLK_DEV_BSG is not set
74 78
75# 79#
76# IO Schedulers 80# IO Schedulers
@@ -123,13 +127,19 @@ CONFIG_NEED_MULTIPLE_NODES=y
123# CONFIG_SPARSEMEM_STATIC is not set 127# CONFIG_SPARSEMEM_STATIC is not set
124CONFIG_SPLIT_PTLOCK_CPUS=4 128CONFIG_SPLIT_PTLOCK_CPUS=4
125# CONFIG_RESOURCES_64BIT is not set 129# CONFIG_RESOURCES_64BIT is not set
130CONFIG_ZONE_DMA_FLAG=1
131CONFIG_BOUNCE=y
132CONFIG_VIRT_TO_BUS=y
126CONFIG_IRAM_START=0x00f00000 133CONFIG_IRAM_START=0x00f00000
127CONFIG_IRAM_SIZE=0x00080000 134CONFIG_IRAM_SIZE=0x00080000
128CONFIG_RWSEM_GENERIC_SPINLOCK=y 135CONFIG_RWSEM_GENERIC_SPINLOCK=y
129# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 136# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
137# CONFIG_ARCH_HAS_ILOG2_U32 is not set
138# CONFIG_ARCH_HAS_ILOG2_U64 is not set
130CONFIG_GENERIC_FIND_NEXT_BIT=y 139CONFIG_GENERIC_FIND_NEXT_BIT=y
131CONFIG_GENERIC_HWEIGHT=y 140CONFIG_GENERIC_HWEIGHT=y
132CONFIG_GENERIC_CALIBRATE_DELAY=y 141CONFIG_GENERIC_CALIBRATE_DELAY=y
142CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
133CONFIG_PREEMPT=y 143CONFIG_PREEMPT=y
134CONFIG_SMP=y 144CONFIG_SMP=y
135# CONFIG_CHIP_M32700_TS1 is not set 145# CONFIG_CHIP_M32700_TS1 is not set
@@ -139,6 +149,7 @@ CONFIG_NODES_SHIFT=1
139# 149#
140# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 150# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
141# 151#
152# CONFIG_ARCH_SUPPORTS_MSI is not set
142# CONFIG_ISA is not set 153# CONFIG_ISA is not set
143 154
144# 155#
@@ -147,10 +158,6 @@ CONFIG_NODES_SHIFT=1
147# CONFIG_PCCARD is not set 158# CONFIG_PCCARD is not set
148 159
149# 160#
150# PCI Hotplug Support
151#
152
153#
154# Executable file formats 161# Executable file formats
155# 162#
156CONFIG_BINFMT_ELF=y 163CONFIG_BINFMT_ELF=y
@@ -164,13 +171,13 @@ CONFIG_NET=y
164# 171#
165# Networking options 172# Networking options
166# 173#
167# CONFIG_NETDEBUG is not set
168CONFIG_PACKET=y 174CONFIG_PACKET=y
169# CONFIG_PACKET_MMAP is not set 175# CONFIG_PACKET_MMAP is not set
170CONFIG_UNIX=y 176CONFIG_UNIX=y
171CONFIG_XFRM=y 177CONFIG_XFRM=y
172# CONFIG_XFRM_USER is not set 178# CONFIG_XFRM_USER is not set
173# CONFIG_XFRM_SUB_POLICY is not set 179# CONFIG_XFRM_SUB_POLICY is not set
180# CONFIG_XFRM_MIGRATE is not set
174# CONFIG_NET_KEY is not set 181# CONFIG_NET_KEY is not set
175CONFIG_INET=y 182CONFIG_INET=y
176# CONFIG_IP_MULTICAST is not set 183# CONFIG_IP_MULTICAST is not set
@@ -203,20 +210,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
203# CONFIG_INET6_TUNNEL is not set 210# CONFIG_INET6_TUNNEL is not set
204# CONFIG_NETWORK_SECMARK is not set 211# CONFIG_NETWORK_SECMARK is not set
205# CONFIG_NETFILTER is not set 212# CONFIG_NETFILTER is not set
206
207#
208# DCCP Configuration (EXPERIMENTAL)
209#
210# CONFIG_IP_DCCP is not set 213# CONFIG_IP_DCCP is not set
211
212#
213# SCTP Configuration (EXPERIMENTAL)
214#
215# CONFIG_IP_SCTP is not set 214# CONFIG_IP_SCTP is not set
216
217#
218# TIPC Configuration (EXPERIMENTAL)
219#
220# CONFIG_TIPC is not set 215# CONFIG_TIPC is not set
221# CONFIG_ATM is not set 216# CONFIG_ATM is not set
222# CONFIG_BRIDGE is not set 217# CONFIG_BRIDGE is not set
@@ -242,7 +237,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
242# CONFIG_HAMRADIO is not set 237# CONFIG_HAMRADIO is not set
243# CONFIG_IRDA is not set 238# CONFIG_IRDA is not set
244# CONFIG_BT is not set 239# CONFIG_BT is not set
240# CONFIG_AF_RXRPC is not set
241
242#
243# Wireless
244#
245# CONFIG_CFG80211 is not set
246# CONFIG_WIRELESS_EXT is not set
247# CONFIG_MAC80211 is not set
245# CONFIG_IEEE80211 is not set 248# CONFIG_IEEE80211 is not set
249# CONFIG_RFKILL is not set
250# CONFIG_NET_9P is not set
246 251
247# 252#
248# Device Drivers 253# Device Drivers
@@ -255,15 +260,7 @@ CONFIG_STANDALONE=y
255CONFIG_PREVENT_FIRMWARE_BUILD=y 260CONFIG_PREVENT_FIRMWARE_BUILD=y
256CONFIG_FW_LOADER=y 261CONFIG_FW_LOADER=y
257# CONFIG_SYS_HYPERVISOR is not set 262# CONFIG_SYS_HYPERVISOR is not set
258
259#
260# Connector - unified userspace <-> kernelspace linker
261#
262# CONFIG_CONNECTOR is not set 263# CONFIG_CONNECTOR is not set
263
264#
265# Memory Technology Devices (MTD)
266#
267CONFIG_MTD=y 264CONFIG_MTD=y
268# CONFIG_MTD_DEBUG is not set 265# CONFIG_MTD_DEBUG is not set
269# CONFIG_MTD_CONCAT is not set 266# CONFIG_MTD_CONCAT is not set
@@ -278,6 +275,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
278# User Modules And Translation Layers 275# User Modules And Translation Layers
279# 276#
280# CONFIG_MTD_CHAR is not set 277# CONFIG_MTD_CHAR is not set
278CONFIG_MTD_BLKDEVS=y
281CONFIG_MTD_BLOCK=y 279CONFIG_MTD_BLOCK=y
282# CONFIG_FTL is not set 280# CONFIG_FTL is not set
283# CONFIG_NFTL is not set 281# CONFIG_NFTL is not set
@@ -314,7 +312,6 @@ CONFIG_MTD_CFI_UTIL=m
314# CONFIG_MTD_RAM is not set 312# CONFIG_MTD_RAM is not set
315# CONFIG_MTD_ROM is not set 313# CONFIG_MTD_ROM is not set
316# CONFIG_MTD_ABSENT is not set 314# CONFIG_MTD_ABSENT is not set
317# CONFIG_MTD_OBSOLETE_CHIPS is not set
318 315
319# 316#
320# Mapping drivers for chip access 317# Mapping drivers for chip access
@@ -337,29 +334,15 @@ CONFIG_MTD_CFI_UTIL=m
337# CONFIG_MTD_DOC2000 is not set 334# CONFIG_MTD_DOC2000 is not set
338# CONFIG_MTD_DOC2001 is not set 335# CONFIG_MTD_DOC2001 is not set
339# CONFIG_MTD_DOC2001PLUS is not set 336# CONFIG_MTD_DOC2001PLUS is not set
340
341#
342# NAND Flash Device Drivers
343#
344# CONFIG_MTD_NAND is not set 337# CONFIG_MTD_NAND is not set
345
346#
347# OneNAND Flash Device Drivers
348#
349# CONFIG_MTD_ONENAND is not set 338# CONFIG_MTD_ONENAND is not set
350 339
351# 340#
352# Parallel port support 341# UBI - Unsorted block images
353# 342#
343# CONFIG_MTD_UBI is not set
354# CONFIG_PARPORT is not set 344# CONFIG_PARPORT is not set
355 345CONFIG_BLK_DEV=y
356#
357# Plug and Play support
358#
359
360#
361# Block devices
362#
363# CONFIG_BLK_DEV_COW_COMMON is not set 346# CONFIG_BLK_DEV_COW_COMMON is not set
364CONFIG_BLK_DEV_LOOP=y 347CONFIG_BLK_DEV_LOOP=y
365# CONFIG_BLK_DEV_CRYPTOLOOP is not set 348# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -368,18 +351,10 @@ CONFIG_BLK_DEV_RAM=y
368CONFIG_BLK_DEV_RAM_COUNT=16 351CONFIG_BLK_DEV_RAM_COUNT=16
369CONFIG_BLK_DEV_RAM_SIZE=4096 352CONFIG_BLK_DEV_RAM_SIZE=4096
370CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 353CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
371# CONFIG_BLK_DEV_INITRD is not set
372# CONFIG_CDROM_PKTCDVD is not set 354# CONFIG_CDROM_PKTCDVD is not set
373CONFIG_ATA_OVER_ETH=m 355CONFIG_ATA_OVER_ETH=m
374 356CONFIG_MISC_DEVICES=y
375# 357# CONFIG_EEPROM_93CX6 is not set
376# Misc devices
377#
378# CONFIG_TIFM_CORE is not set
379
380#
381# ATA/ATAPI/MFM/RLL support
382#
383CONFIG_IDE=y 358CONFIG_IDE=y
384CONFIG_IDE_MAX_HWIFS=4 359CONFIG_IDE_MAX_HWIFS=4
385CONFIG_BLK_DEV_IDE=y 360CONFIG_BLK_DEV_IDE=y
@@ -395,14 +370,15 @@ CONFIG_BLK_DEV_IDECD=m
395# CONFIG_BLK_DEV_IDEFLOPPY is not set 370# CONFIG_BLK_DEV_IDEFLOPPY is not set
396# CONFIG_BLK_DEV_IDESCSI is not set 371# CONFIG_BLK_DEV_IDESCSI is not set
397# CONFIG_IDE_TASK_IOCTL is not set 372# CONFIG_IDE_TASK_IOCTL is not set
373CONFIG_IDE_PROC_FS=y
398 374
399# 375#
400# IDE chipset support/bugfixes 376# IDE chipset support/bugfixes
401# 377#
402CONFIG_IDE_GENERIC=y 378CONFIG_IDE_GENERIC=y
379# CONFIG_IDEPCI_PCIBUS_ORDER is not set
403# CONFIG_IDE_ARM is not set 380# CONFIG_IDE_ARM is not set
404# CONFIG_BLK_DEV_IDEDMA is not set 381# CONFIG_BLK_DEV_IDEDMA is not set
405# CONFIG_IDEDMA_AUTO is not set
406# CONFIG_BLK_DEV_HD is not set 382# CONFIG_BLK_DEV_HD is not set
407 383
408# 384#
@@ -410,6 +386,8 @@ CONFIG_IDE_GENERIC=y
410# 386#
411# CONFIG_RAID_ATTRS is not set 387# CONFIG_RAID_ATTRS is not set
412CONFIG_SCSI=m 388CONFIG_SCSI=m
389# CONFIG_SCSI_DMA is not set
390# CONFIG_SCSI_TGT is not set
413# CONFIG_SCSI_NETLINK is not set 391# CONFIG_SCSI_NETLINK is not set
414CONFIG_SCSI_PROC_FS=y 392CONFIG_SCSI_PROC_FS=y
415 393
@@ -430,6 +408,8 @@ CONFIG_CHR_DEV_SG=m
430CONFIG_SCSI_MULTI_LUN=y 408CONFIG_SCSI_MULTI_LUN=y
431# CONFIG_SCSI_CONSTANTS is not set 409# CONFIG_SCSI_CONSTANTS is not set
432# CONFIG_SCSI_LOGGING is not set 410# CONFIG_SCSI_LOGGING is not set
411# CONFIG_SCSI_SCAN_ASYNC is not set
412CONFIG_SCSI_WAIT_SCAN=m
433 413
434# 414#
435# SCSI Transports 415# SCSI Transports
@@ -437,79 +417,31 @@ CONFIG_SCSI_MULTI_LUN=y
437# CONFIG_SCSI_SPI_ATTRS is not set 417# CONFIG_SCSI_SPI_ATTRS is not set
438# CONFIG_SCSI_FC_ATTRS is not set 418# CONFIG_SCSI_FC_ATTRS is not set
439# CONFIG_SCSI_ISCSI_ATTRS is not set 419# CONFIG_SCSI_ISCSI_ATTRS is not set
440# CONFIG_SCSI_SAS_ATTRS is not set
441# CONFIG_SCSI_SAS_LIBSAS is not set 420# CONFIG_SCSI_SAS_LIBSAS is not set
442 421CONFIG_SCSI_LOWLEVEL=y
443#
444# SCSI low-level drivers
445#
446# CONFIG_ISCSI_TCP is not set 422# CONFIG_ISCSI_TCP is not set
447# CONFIG_SCSI_DEBUG is not set 423# CONFIG_SCSI_DEBUG is not set
448
449#
450# Serial ATA (prod) and Parallel ATA (experimental) drivers
451#
452
453#
454# Multi-device support (RAID and LVM)
455#
456# CONFIG_MD is not set 424# CONFIG_MD is not set
457
458#
459# Fusion MPT device support
460#
461# CONFIG_FUSION is not set
462
463#
464# IEEE 1394 (FireWire) support
465#
466
467#
468# I2O device support
469#
470
471#
472# Network device support
473#
474CONFIG_NETDEVICES=y 425CONFIG_NETDEVICES=y
426# CONFIG_NETDEVICES_MULTIQUEUE is not set
475# CONFIG_DUMMY is not set 427# CONFIG_DUMMY is not set
476# CONFIG_BONDING is not set 428# CONFIG_BONDING is not set
429# CONFIG_MACVLAN is not set
477# CONFIG_EQUALIZER is not set 430# CONFIG_EQUALIZER is not set
478# CONFIG_TUN is not set 431# CONFIG_TUN is not set
479
480#
481# PHY device support
482#
483# CONFIG_PHYLIB is not set 432# CONFIG_PHYLIB is not set
484
485#
486# Ethernet (10 or 100Mbit)
487#
488CONFIG_NET_ETHERNET=y 433CONFIG_NET_ETHERNET=y
489CONFIG_MII=y 434CONFIG_MII=y
490CONFIG_SMC91X=y 435CONFIG_SMC91X=y
491# CONFIG_NE2000 is not set 436# CONFIG_NE2000 is not set
437CONFIG_NETDEV_1000=y
438CONFIG_NETDEV_10000=y
492 439
493# 440#
494# Ethernet (1000 Mbit) 441# Wireless LAN
495#
496
497#
498# Ethernet (10000 Mbit)
499#
500
501#
502# Token Ring devices
503#
504
505#
506# Wireless LAN (non-hamradio)
507#
508# CONFIG_NET_RADIO is not set
509
510#
511# Wan interfaces
512# 442#
443# CONFIG_WLAN_PRE80211 is not set
444# CONFIG_WLAN_80211 is not set
513# CONFIG_WAN is not set 445# CONFIG_WAN is not set
514# CONFIG_PPP is not set 446# CONFIG_PPP is not set
515# CONFIG_SLIP is not set 447# CONFIG_SLIP is not set
@@ -517,15 +449,7 @@ CONFIG_SMC91X=y
517# CONFIG_NETCONSOLE is not set 449# CONFIG_NETCONSOLE is not set
518# CONFIG_NETPOLL is not set 450# CONFIG_NETPOLL is not set
519# CONFIG_NET_POLL_CONTROLLER is not set 451# CONFIG_NET_POLL_CONTROLLER is not set
520
521#
522# ISDN subsystem
523#
524# CONFIG_ISDN is not set 452# CONFIG_ISDN is not set
525
526#
527# Telephony Support
528#
529# CONFIG_PHONE is not set 453# CONFIG_PHONE is not set
530 454
531# 455#
@@ -533,6 +457,7 @@ CONFIG_SMC91X=y
533# 457#
534CONFIG_INPUT=y 458CONFIG_INPUT=y
535# CONFIG_INPUT_FF_MEMLESS is not set 459# CONFIG_INPUT_FF_MEMLESS is not set
460# CONFIG_INPUT_POLLDEV is not set
536 461
537# 462#
538# Userland interfaces 463# Userland interfaces
@@ -549,6 +474,7 @@ CONFIG_INPUT=y
549# CONFIG_INPUT_KEYBOARD is not set 474# CONFIG_INPUT_KEYBOARD is not set
550# CONFIG_INPUT_MOUSE is not set 475# CONFIG_INPUT_MOUSE is not set
551# CONFIG_INPUT_JOYSTICK is not set 476# CONFIG_INPUT_JOYSTICK is not set
477# CONFIG_INPUT_TABLET is not set
552# CONFIG_INPUT_TOUCHSCREEN is not set 478# CONFIG_INPUT_TOUCHSCREEN is not set
553# CONFIG_INPUT_MISC is not set 479# CONFIG_INPUT_MISC is not set
554 480
@@ -587,35 +513,14 @@ CONFIG_SERIAL_M32R_PLDSIO=y
587CONFIG_UNIX98_PTYS=y 513CONFIG_UNIX98_PTYS=y
588CONFIG_LEGACY_PTYS=y 514CONFIG_LEGACY_PTYS=y
589CONFIG_LEGACY_PTY_COUNT=256 515CONFIG_LEGACY_PTY_COUNT=256
590
591#
592# IPMI
593#
594# CONFIG_IPMI_HANDLER is not set 516# CONFIG_IPMI_HANDLER is not set
595
596#
597# Watchdog Cards
598#
599# CONFIG_WATCHDOG is not set 517# CONFIG_WATCHDOG is not set
600CONFIG_HW_RANDOM=y 518CONFIG_HW_RANDOM=y
601# CONFIG_RTC is not set 519# CONFIG_RTC is not set
602CONFIG_DS1302=y 520CONFIG_DS1302=y
603# CONFIG_DTLK is not set
604# CONFIG_R3964 is not set 521# CONFIG_R3964 is not set
605
606#
607# Ftape, the floppy tape device driver
608#
609# CONFIG_RAW_DRIVER is not set 522# CONFIG_RAW_DRIVER is not set
610
611#
612# TPM devices
613#
614# CONFIG_TCG_TPM is not set 523# CONFIG_TCG_TPM is not set
615
616#
617# I2C support
618#
619# CONFIG_I2C is not set 524# CONFIG_I2C is not set
620 525
621# 526#
@@ -623,65 +528,76 @@ CONFIG_DS1302=y
623# 528#
624# CONFIG_SPI is not set 529# CONFIG_SPI is not set
625# CONFIG_SPI_MASTER is not set 530# CONFIG_SPI_MASTER is not set
626
627#
628# Dallas's 1-wire bus
629#
630# CONFIG_W1 is not set 531# CONFIG_W1 is not set
631 532# CONFIG_POWER_SUPPLY is not set
632#
633# Hardware Monitoring support
634#
635CONFIG_HWMON=y 533CONFIG_HWMON=y
636# CONFIG_HWMON_VID is not set 534# CONFIG_HWMON_VID is not set
637# CONFIG_SENSORS_ABITUGURU is not set 535# CONFIG_SENSORS_ABITUGURU is not set
536# CONFIG_SENSORS_ABITUGURU3 is not set
638# CONFIG_SENSORS_F71805F is not set 537# CONFIG_SENSORS_F71805F is not set
538# CONFIG_SENSORS_IT87 is not set
539# CONFIG_SENSORS_PC87360 is not set
540# CONFIG_SENSORS_PC87427 is not set
541# CONFIG_SENSORS_SMSC47M1 is not set
542# CONFIG_SENSORS_SMSC47B397 is not set
639# CONFIG_SENSORS_VT1211 is not set 543# CONFIG_SENSORS_VT1211 is not set
544# CONFIG_SENSORS_W83627HF is not set
545# CONFIG_SENSORS_W83627EHF is not set
640# CONFIG_HWMON_DEBUG_CHIP is not set 546# CONFIG_HWMON_DEBUG_CHIP is not set
641 547
642# 548#
549# Multifunction device drivers
550#
551# CONFIG_MFD_SM501 is not set
552
553#
643# Multimedia devices 554# Multimedia devices
644# 555#
645CONFIG_VIDEO_DEV=m 556CONFIG_VIDEO_DEV=m
646CONFIG_VIDEO_V4L1=y 557CONFIG_VIDEO_V4L1=y
647CONFIG_VIDEO_V4L1_COMPAT=y 558CONFIG_VIDEO_V4L1_COMPAT=y
648CONFIG_VIDEO_V4L2=y 559CONFIG_VIDEO_V4L2=y
649 560CONFIG_VIDEO_CAPTURE_DRIVERS=y
650#
651# Video Capture Adapters
652#
653
654#
655# Video Capture Adapters
656#
657# CONFIG_VIDEO_ADV_DEBUG is not set 561# CONFIG_VIDEO_ADV_DEBUG is not set
658CONFIG_VIDEO_HELPER_CHIPS_AUTO=y 562CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
659# CONFIG_VIDEO_VIVI is not set
660# CONFIG_VIDEO_CPIA is not set 563# CONFIG_VIDEO_CPIA is not set
661CONFIG_VIDEO_M32R_AR=m 564CONFIG_VIDEO_M32R_AR=m
662CONFIG_VIDEO_M32R_AR_M64278=m 565CONFIG_VIDEO_M32R_AR_M64278=m
566CONFIG_RADIO_ADAPTERS=y
567# CONFIG_DVB_CORE is not set
568CONFIG_DAB=y
663 569
664# 570#
665# Radio Adapters 571# Graphics support
666#
667
668#
669# Digital Video Broadcasting Devices
670# 572#
671# CONFIG_DVB is not set 573# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
672 574
673# 575#
674# Graphics support 576# Display device support
675# 577#
676CONFIG_FIRMWARE_EDID=y 578# CONFIG_DISPLAY_SUPPORT is not set
579# CONFIG_VGASTATE is not set
580CONFIG_VIDEO_OUTPUT_CONTROL=m
677CONFIG_FB=y 581CONFIG_FB=y
582CONFIG_FIRMWARE_EDID=y
583# CONFIG_FB_DDC is not set
678CONFIG_FB_CFB_FILLRECT=y 584CONFIG_FB_CFB_FILLRECT=y
679CONFIG_FB_CFB_COPYAREA=y 585CONFIG_FB_CFB_COPYAREA=y
680CONFIG_FB_CFB_IMAGEBLIT=y 586CONFIG_FB_CFB_IMAGEBLIT=y
587# CONFIG_FB_SYS_FILLRECT is not set
588# CONFIG_FB_SYS_COPYAREA is not set
589# CONFIG_FB_SYS_IMAGEBLIT is not set
590# CONFIG_FB_SYS_FOPS is not set
591CONFIG_FB_DEFERRED_IO=y
592# CONFIG_FB_SVGALIB is not set
681# CONFIG_FB_MACMODES is not set 593# CONFIG_FB_MACMODES is not set
682# CONFIG_FB_BACKLIGHT is not set 594# CONFIG_FB_BACKLIGHT is not set
683# CONFIG_FB_MODE_HELPERS is not set 595# CONFIG_FB_MODE_HELPERS is not set
684# CONFIG_FB_TILEBLITTING is not set 596# CONFIG_FB_TILEBLITTING is not set
597
598#
599# Frame buffer hardware drivers
600#
685CONFIG_FB_S1D13XXX=y 601CONFIG_FB_S1D13XXX=y
686# CONFIG_FB_VIRTUAL is not set 602# CONFIG_FB_VIRTUAL is not set
687 603
@@ -691,29 +607,25 @@ CONFIG_FB_S1D13XXX=y
691# CONFIG_VGA_CONSOLE is not set 607# CONFIG_VGA_CONSOLE is not set
692CONFIG_DUMMY_CONSOLE=y 608CONFIG_DUMMY_CONSOLE=y
693CONFIG_FRAMEBUFFER_CONSOLE=y 609CONFIG_FRAMEBUFFER_CONSOLE=y
610# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
694# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 611# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
695# CONFIG_FONTS is not set 612# CONFIG_FONTS is not set
696CONFIG_FONT_8x8=y 613CONFIG_FONT_8x8=y
697CONFIG_FONT_8x16=y 614CONFIG_FONT_8x16=y
698
699#
700# Logo configuration
701#
702CONFIG_LOGO=y 615CONFIG_LOGO=y
703CONFIG_LOGO_LINUX_MONO=y 616CONFIG_LOGO_LINUX_MONO=y
704CONFIG_LOGO_LINUX_VGA16=y 617CONFIG_LOGO_LINUX_VGA16=y
705CONFIG_LOGO_LINUX_CLUT224=y 618CONFIG_LOGO_LINUX_CLUT224=y
706CONFIG_LOGO_M32R_CLUT224=y 619CONFIG_LOGO_M32R_CLUT224=y
707# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
708 620
709# 621#
710# Sound 622# Sound
711# 623#
712# CONFIG_SOUND is not set 624# CONFIG_SOUND is not set
713 625CONFIG_HID_SUPPORT=y
714# 626CONFIG_HID=y
715# USB support 627# CONFIG_HID_DEBUG is not set
716# 628CONFIG_USB_SUPPORT=y
717# CONFIG_USB_ARCH_HAS_HCD is not set 629# CONFIG_USB_ARCH_HAS_HCD is not set
718# CONFIG_USB_ARCH_HAS_OHCI is not set 630# CONFIG_USB_ARCH_HAS_OHCI is not set
719# CONFIG_USB_ARCH_HAS_EHCI is not set 631# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -726,35 +638,20 @@ CONFIG_LOGO_M32R_CLUT224=y
726# USB Gadget Support 638# USB Gadget Support
727# 639#
728# CONFIG_USB_GADGET is not set 640# CONFIG_USB_GADGET is not set
729
730#
731# MMC/SD Card support
732#
733CONFIG_MMC=y 641CONFIG_MMC=y
734CONFIG_MMC_DEBUG=y 642CONFIG_MMC_DEBUG=y
735CONFIG_MMC_BLOCK=y 643# CONFIG_MMC_UNSAFE_RESUME is not set
736# CONFIG_MMC_TIFM_SD is not set
737
738#
739# LED devices
740#
741# CONFIG_NEW_LEDS is not set
742
743#
744# LED drivers
745#
746 644
747# 645#
748# LED Triggers 646# MMC/SD Card Drivers
749#
750
751#
752# InfiniBand support
753# 647#
648CONFIG_MMC_BLOCK=y
649CONFIG_MMC_BLOCK_BOUNCE=y
754 650
755# 651#
756# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 652# MMC/SD Host Controller Drivers
757# 653#
654# CONFIG_NEW_LEDS is not set
758 655
759# 656#
760# Real Time Clock 657# Real Time Clock
@@ -762,17 +659,9 @@ CONFIG_MMC_BLOCK=y
762# CONFIG_RTC_CLASS is not set 659# CONFIG_RTC_CLASS is not set
763 660
764# 661#
765# DMA Engine support 662# Userspace I/O
766#
767# CONFIG_DMA_ENGINE is not set
768
769#
770# DMA Clients
771#
772
773#
774# DMA Devices
775# 663#
664# CONFIG_UIO is not set
776 665
777# 666#
778# File systems 667# File systems
@@ -849,7 +738,6 @@ CONFIG_RAMFS=y
849# CONFIG_BEFS_FS is not set 738# CONFIG_BEFS_FS is not set
850# CONFIG_BFS_FS is not set 739# CONFIG_BFS_FS is not set
851# CONFIG_EFS_FS is not set 740# CONFIG_EFS_FS is not set
852# CONFIG_JFFS_FS is not set
853# CONFIG_JFFS2_FS is not set 741# CONFIG_JFFS2_FS is not set
854# CONFIG_CRAMFS is not set 742# CONFIG_CRAMFS is not set
855# CONFIG_VXFS_FS is not set 743# CONFIG_VXFS_FS is not set
@@ -872,6 +760,7 @@ CONFIG_LOCKD=y
872CONFIG_LOCKD_V4=y 760CONFIG_LOCKD_V4=y
873CONFIG_NFS_COMMON=y 761CONFIG_NFS_COMMON=y
874CONFIG_SUNRPC=y 762CONFIG_SUNRPC=y
763# CONFIG_SUNRPC_BIND34 is not set
875# CONFIG_RPCSEC_GSS_KRB5 is not set 764# CONFIG_RPCSEC_GSS_KRB5 is not set
876# CONFIG_RPCSEC_GSS_SPKM3 is not set 765# CONFIG_RPCSEC_GSS_SPKM3 is not set
877# CONFIG_SMB_FS is not set 766# CONFIG_SMB_FS is not set
@@ -879,7 +768,6 @@ CONFIG_SUNRPC=y
879# CONFIG_NCP_FS is not set 768# CONFIG_NCP_FS is not set
880# CONFIG_CODA_FS is not set 769# CONFIG_CODA_FS is not set
881# CONFIG_AFS_FS is not set 770# CONFIG_AFS_FS is not set
882# CONFIG_9P_FS is not set
883 771
884# 772#
885# Partition Types 773# Partition Types
@@ -932,6 +820,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
932# CONFIG_NLS_UTF8 is not set 820# CONFIG_NLS_UTF8 is not set
933 821
934# 822#
823# Distributed Lock Manager
824#
825# CONFIG_DLM is not set
826
827#
935# Profiling support 828# Profiling support
936# 829#
937CONFIG_PROFILING=y 830CONFIG_PROFILING=y
@@ -944,29 +837,27 @@ CONFIG_OPROFILE=y
944CONFIG_ENABLE_MUST_CHECK=y 837CONFIG_ENABLE_MUST_CHECK=y
945# CONFIG_MAGIC_SYSRQ is not set 838# CONFIG_MAGIC_SYSRQ is not set
946# CONFIG_UNUSED_SYMBOLS is not set 839# CONFIG_UNUSED_SYMBOLS is not set
840# CONFIG_DEBUG_FS is not set
841# CONFIG_HEADERS_CHECK is not set
947# CONFIG_DEBUG_KERNEL is not set 842# CONFIG_DEBUG_KERNEL is not set
948CONFIG_LOG_BUF_SHIFT=15
949# CONFIG_DEBUG_BUGVERBOSE is not set 843# CONFIG_DEBUG_BUGVERBOSE is not set
950# CONFIG_DEBUG_FS is not set
951# CONFIG_FRAME_POINTER is not set 844# CONFIG_FRAME_POINTER is not set
952# CONFIG_UNWIND_INFO is not set
953# CONFIG_HEADERS_CHECK is not set
954 845
955# 846#
956# Security options 847# Security options
957# 848#
958# CONFIG_KEYS is not set 849# CONFIG_KEYS is not set
959# CONFIG_SECURITY is not set 850# CONFIG_SECURITY is not set
960
961#
962# Cryptographic options
963#
964# CONFIG_CRYPTO is not set 851# CONFIG_CRYPTO is not set
965 852
966# 853#
967# Library routines 854# Library routines
968# 855#
856CONFIG_BITREVERSE=y
969# CONFIG_CRC_CCITT is not set 857# CONFIG_CRC_CCITT is not set
970# CONFIG_CRC16 is not set 858# CONFIG_CRC16 is not set
859# CONFIG_CRC_ITU_T is not set
971CONFIG_CRC32=y 860CONFIG_CRC32=y
861# CONFIG_CRC7 is not set
972# CONFIG_LIBCRC32C is not set 862# CONFIG_LIBCRC32C is not set
863CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/m32700ut/defconfig.m32700ut.up b/arch/m32r/configs/m32700ut.up_defconfig
index 190f961d33..a31823ffe2 100644
--- a/arch/m32r/m32700ut/defconfig.m32700ut.up
+++ b/arch/m32r/configs/m32700ut.up_defconfig
@@ -1,12 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.23-rc1
4# Tue Dec 12 12:07:08 2006 4# Wed Aug 1 17:22:35 2007
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
8CONFIG_GENERIC_HARDIRQS=y 9CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 14
12# 15#
@@ -24,18 +27,19 @@ CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y 27CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SWAP=y 28CONFIG_SWAP=y
26CONFIG_SYSVIPC=y 29CONFIG_SYSVIPC=y
27# CONFIG_IPC_NS is not set 30CONFIG_SYSVIPC_SYSCTL=y
28# CONFIG_POSIX_MQUEUE is not set 31# CONFIG_POSIX_MQUEUE is not set
29CONFIG_BSD_PROCESS_ACCT=y 32CONFIG_BSD_PROCESS_ACCT=y
30# CONFIG_BSD_PROCESS_ACCT_V3 is not set 33# CONFIG_BSD_PROCESS_ACCT_V3 is not set
31# CONFIG_TASKSTATS is not set 34# CONFIG_TASKSTATS is not set
32# CONFIG_UTS_NS is not set 35# CONFIG_USER_NS is not set
33# CONFIG_AUDIT is not set 36# CONFIG_AUDIT is not set
34CONFIG_IKCONFIG=y 37CONFIG_IKCONFIG=y
35CONFIG_IKCONFIG_PROC=y 38CONFIG_IKCONFIG_PROC=y
39CONFIG_LOG_BUF_SHIFT=14
36CONFIG_SYSFS_DEPRECATED=y 40CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set 41# CONFIG_RELAY is not set
38CONFIG_INITRAMFS_SOURCE="" 42# CONFIG_BLK_DEV_INITRD is not set
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SYSCTL=y 44CONFIG_SYSCTL=y
41CONFIG_EMBEDDED=y 45CONFIG_EMBEDDED=y
@@ -47,29 +51,29 @@ CONFIG_BUG=y
47CONFIG_ELF_CORE=y 51CONFIG_ELF_CORE=y
48CONFIG_BASE_FULL=y 52CONFIG_BASE_FULL=y
49# CONFIG_FUTEX is not set 53# CONFIG_FUTEX is not set
54CONFIG_ANON_INODES=y
50# CONFIG_EPOLL is not set 55# CONFIG_EPOLL is not set
56CONFIG_SIGNALFD=y
57CONFIG_TIMERFD=y
58CONFIG_EVENTFD=y
51CONFIG_SHMEM=y 59CONFIG_SHMEM=y
52CONFIG_SLAB=y
53CONFIG_VM_EVENT_COUNTERS=y 60CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_SLAB=y
62# CONFIG_SLUB is not set
63# CONFIG_SLOB is not set
54# CONFIG_TINY_SHMEM is not set 64# CONFIG_TINY_SHMEM is not set
55CONFIG_BASE_SMALL=0 65CONFIG_BASE_SMALL=0
56# CONFIG_SLOB is not set
57
58#
59# Loadable module support
60#
61CONFIG_MODULES=y 66CONFIG_MODULES=y
62CONFIG_MODULE_UNLOAD=y 67CONFIG_MODULE_UNLOAD=y
63# CONFIG_MODULE_FORCE_UNLOAD is not set 68# CONFIG_MODULE_FORCE_UNLOAD is not set
64# CONFIG_MODVERSIONS is not set 69# CONFIG_MODVERSIONS is not set
65# CONFIG_MODULE_SRCVERSION_ALL is not set 70# CONFIG_MODULE_SRCVERSION_ALL is not set
66CONFIG_KMOD=y 71CONFIG_KMOD=y
67
68#
69# Block layer
70#
71CONFIG_BLOCK=y 72CONFIG_BLOCK=y
73# CONFIG_LBD is not set
72# CONFIG_BLK_DEV_IO_TRACE is not set 74# CONFIG_BLK_DEV_IO_TRACE is not set
75# CONFIG_LSF is not set
76# CONFIG_BLK_DEV_BSG is not set
73 77
74# 78#
75# IO Schedulers 79# IO Schedulers
@@ -122,13 +126,19 @@ CONFIG_NEED_MULTIPLE_NODES=y
122# CONFIG_SPARSEMEM_STATIC is not set 126# CONFIG_SPARSEMEM_STATIC is not set
123CONFIG_SPLIT_PTLOCK_CPUS=4 127CONFIG_SPLIT_PTLOCK_CPUS=4
124# CONFIG_RESOURCES_64BIT is not set 128# CONFIG_RESOURCES_64BIT is not set
129CONFIG_ZONE_DMA_FLAG=1
130CONFIG_BOUNCE=y
131CONFIG_VIRT_TO_BUS=y
125CONFIG_IRAM_START=0x00f00000 132CONFIG_IRAM_START=0x00f00000
126CONFIG_IRAM_SIZE=0x00080000 133CONFIG_IRAM_SIZE=0x00080000
127CONFIG_RWSEM_GENERIC_SPINLOCK=y 134CONFIG_RWSEM_GENERIC_SPINLOCK=y
128# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 135# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
136# CONFIG_ARCH_HAS_ILOG2_U32 is not set
137# CONFIG_ARCH_HAS_ILOG2_U64 is not set
129CONFIG_GENERIC_FIND_NEXT_BIT=y 138CONFIG_GENERIC_FIND_NEXT_BIT=y
130CONFIG_GENERIC_HWEIGHT=y 139CONFIG_GENERIC_HWEIGHT=y
131CONFIG_GENERIC_CALIBRATE_DELAY=y 140CONFIG_GENERIC_CALIBRATE_DELAY=y
141CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
132CONFIG_PREEMPT=y 142CONFIG_PREEMPT=y
133# CONFIG_SMP is not set 143# CONFIG_SMP is not set
134CONFIG_NODES_SHIFT=1 144CONFIG_NODES_SHIFT=1
@@ -136,6 +146,7 @@ CONFIG_NODES_SHIFT=1
136# 146#
137# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 147# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
138# 148#
149# CONFIG_ARCH_SUPPORTS_MSI is not set
139# CONFIG_ISA is not set 150# CONFIG_ISA is not set
140 151
141# 152#
@@ -144,10 +155,6 @@ CONFIG_NODES_SHIFT=1
144# CONFIG_PCCARD is not set 155# CONFIG_PCCARD is not set
145 156
146# 157#
147# PCI Hotplug Support
148#
149
150#
151# Executable file formats 158# Executable file formats
152# 159#
153CONFIG_BINFMT_ELF=y 160CONFIG_BINFMT_ELF=y
@@ -161,13 +168,13 @@ CONFIG_NET=y
161# 168#
162# Networking options 169# Networking options
163# 170#
164# CONFIG_NETDEBUG is not set
165CONFIG_PACKET=y 171CONFIG_PACKET=y
166# CONFIG_PACKET_MMAP is not set 172# CONFIG_PACKET_MMAP is not set
167CONFIG_UNIX=y 173CONFIG_UNIX=y
168CONFIG_XFRM=y 174CONFIG_XFRM=y
169# CONFIG_XFRM_USER is not set 175# CONFIG_XFRM_USER is not set
170# CONFIG_XFRM_SUB_POLICY is not set 176# CONFIG_XFRM_SUB_POLICY is not set
177# CONFIG_XFRM_MIGRATE is not set
171# CONFIG_NET_KEY is not set 178# CONFIG_NET_KEY is not set
172CONFIG_INET=y 179CONFIG_INET=y
173# CONFIG_IP_MULTICAST is not set 180# CONFIG_IP_MULTICAST is not set
@@ -200,20 +207,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
200# CONFIG_INET6_TUNNEL is not set 207# CONFIG_INET6_TUNNEL is not set
201# CONFIG_NETWORK_SECMARK is not set 208# CONFIG_NETWORK_SECMARK is not set
202# CONFIG_NETFILTER is not set 209# CONFIG_NETFILTER is not set
203
204#
205# DCCP Configuration (EXPERIMENTAL)
206#
207# CONFIG_IP_DCCP is not set 210# CONFIG_IP_DCCP is not set
208
209#
210# SCTP Configuration (EXPERIMENTAL)
211#
212# CONFIG_IP_SCTP is not set 211# CONFIG_IP_SCTP is not set
213
214#
215# TIPC Configuration (EXPERIMENTAL)
216#
217# CONFIG_TIPC is not set 212# CONFIG_TIPC is not set
218# CONFIG_ATM is not set 213# CONFIG_ATM is not set
219# CONFIG_BRIDGE is not set 214# CONFIG_BRIDGE is not set
@@ -239,7 +234,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
239# CONFIG_HAMRADIO is not set 234# CONFIG_HAMRADIO is not set
240# CONFIG_IRDA is not set 235# CONFIG_IRDA is not set
241# CONFIG_BT is not set 236# CONFIG_BT is not set
237# CONFIG_AF_RXRPC is not set
238
239#
240# Wireless
241#
242# CONFIG_CFG80211 is not set
243# CONFIG_WIRELESS_EXT is not set
244# CONFIG_MAC80211 is not set
242# CONFIG_IEEE80211 is not set 245# CONFIG_IEEE80211 is not set
246# CONFIG_RFKILL is not set
247# CONFIG_NET_9P is not set
243 248
244# 249#
245# Device Drivers 250# Device Drivers
@@ -252,15 +257,7 @@ CONFIG_STANDALONE=y
252CONFIG_PREVENT_FIRMWARE_BUILD=y 257CONFIG_PREVENT_FIRMWARE_BUILD=y
253CONFIG_FW_LOADER=y 258CONFIG_FW_LOADER=y
254# CONFIG_SYS_HYPERVISOR is not set 259# CONFIG_SYS_HYPERVISOR is not set
255
256#
257# Connector - unified userspace <-> kernelspace linker
258#
259# CONFIG_CONNECTOR is not set 260# CONFIG_CONNECTOR is not set
260
261#
262# Memory Technology Devices (MTD)
263#
264CONFIG_MTD=y 261CONFIG_MTD=y
265# CONFIG_MTD_DEBUG is not set 262# CONFIG_MTD_DEBUG is not set
266# CONFIG_MTD_CONCAT is not set 263# CONFIG_MTD_CONCAT is not set
@@ -275,6 +272,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
275# User Modules And Translation Layers 272# User Modules And Translation Layers
276# 273#
277# CONFIG_MTD_CHAR is not set 274# CONFIG_MTD_CHAR is not set
275CONFIG_MTD_BLKDEVS=y
278CONFIG_MTD_BLOCK=y 276CONFIG_MTD_BLOCK=y
279# CONFIG_FTL is not set 277# CONFIG_FTL is not set
280# CONFIG_NFTL is not set 278# CONFIG_NFTL is not set
@@ -311,7 +309,6 @@ CONFIG_MTD_CFI_UTIL=m
311# CONFIG_MTD_RAM is not set 309# CONFIG_MTD_RAM is not set
312# CONFIG_MTD_ROM is not set 310# CONFIG_MTD_ROM is not set
313# CONFIG_MTD_ABSENT is not set 311# CONFIG_MTD_ABSENT is not set
314# CONFIG_MTD_OBSOLETE_CHIPS is not set
315 312
316# 313#
317# Mapping drivers for chip access 314# Mapping drivers for chip access
@@ -334,29 +331,15 @@ CONFIG_MTD_CFI_UTIL=m
334# CONFIG_MTD_DOC2000 is not set 331# CONFIG_MTD_DOC2000 is not set
335# CONFIG_MTD_DOC2001 is not set 332# CONFIG_MTD_DOC2001 is not set
336# CONFIG_MTD_DOC2001PLUS is not set 333# CONFIG_MTD_DOC2001PLUS is not set
337
338#
339# NAND Flash Device Drivers
340#
341# CONFIG_MTD_NAND is not set 334# CONFIG_MTD_NAND is not set
342
343#
344# OneNAND Flash Device Drivers
345#
346# CONFIG_MTD_ONENAND is not set 335# CONFIG_MTD_ONENAND is not set
347 336
348# 337#
349# Parallel port support 338# UBI - Unsorted block images
350# 339#
340# CONFIG_MTD_UBI is not set
351# CONFIG_PARPORT is not set 341# CONFIG_PARPORT is not set
352 342CONFIG_BLK_DEV=y
353#
354# Plug and Play support
355#
356
357#
358# Block devices
359#
360# CONFIG_BLK_DEV_COW_COMMON is not set 343# CONFIG_BLK_DEV_COW_COMMON is not set
361CONFIG_BLK_DEV_LOOP=y 344CONFIG_BLK_DEV_LOOP=y
362# CONFIG_BLK_DEV_CRYPTOLOOP is not set 345# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -365,18 +348,10 @@ CONFIG_BLK_DEV_RAM=y
365CONFIG_BLK_DEV_RAM_COUNT=16 348CONFIG_BLK_DEV_RAM_COUNT=16
366CONFIG_BLK_DEV_RAM_SIZE=4096 349CONFIG_BLK_DEV_RAM_SIZE=4096
367CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 350CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
368# CONFIG_BLK_DEV_INITRD is not set
369# CONFIG_CDROM_PKTCDVD is not set 351# CONFIG_CDROM_PKTCDVD is not set
370CONFIG_ATA_OVER_ETH=m 352CONFIG_ATA_OVER_ETH=m
371 353CONFIG_MISC_DEVICES=y
372# 354# CONFIG_EEPROM_93CX6 is not set
373# Misc devices
374#
375# CONFIG_TIFM_CORE is not set
376
377#
378# ATA/ATAPI/MFM/RLL support
379#
380CONFIG_IDE=y 355CONFIG_IDE=y
381CONFIG_IDE_MAX_HWIFS=4 356CONFIG_IDE_MAX_HWIFS=4
382CONFIG_BLK_DEV_IDE=y 357CONFIG_BLK_DEV_IDE=y
@@ -392,14 +367,15 @@ CONFIG_BLK_DEV_IDECD=m
392# CONFIG_BLK_DEV_IDEFLOPPY is not set 367# CONFIG_BLK_DEV_IDEFLOPPY is not set
393# CONFIG_BLK_DEV_IDESCSI is not set 368# CONFIG_BLK_DEV_IDESCSI is not set
394# CONFIG_IDE_TASK_IOCTL is not set 369# CONFIG_IDE_TASK_IOCTL is not set
370CONFIG_IDE_PROC_FS=y
395 371
396# 372#
397# IDE chipset support/bugfixes 373# IDE chipset support/bugfixes
398# 374#
399CONFIG_IDE_GENERIC=y 375CONFIG_IDE_GENERIC=y
376# CONFIG_IDEPCI_PCIBUS_ORDER is not set
400# CONFIG_IDE_ARM is not set 377# CONFIG_IDE_ARM is not set
401# CONFIG_BLK_DEV_IDEDMA is not set 378# CONFIG_BLK_DEV_IDEDMA is not set
402# CONFIG_IDEDMA_AUTO is not set
403# CONFIG_BLK_DEV_HD is not set 379# CONFIG_BLK_DEV_HD is not set
404 380
405# 381#
@@ -407,6 +383,8 @@ CONFIG_IDE_GENERIC=y
407# 383#
408# CONFIG_RAID_ATTRS is not set 384# CONFIG_RAID_ATTRS is not set
409CONFIG_SCSI=m 385CONFIG_SCSI=m
386# CONFIG_SCSI_DMA is not set
387# CONFIG_SCSI_TGT is not set
410# CONFIG_SCSI_NETLINK is not set 388# CONFIG_SCSI_NETLINK is not set
411CONFIG_SCSI_PROC_FS=y 389CONFIG_SCSI_PROC_FS=y
412 390
@@ -427,6 +405,8 @@ CONFIG_CHR_DEV_SG=m
427CONFIG_SCSI_MULTI_LUN=y 405CONFIG_SCSI_MULTI_LUN=y
428# CONFIG_SCSI_CONSTANTS is not set 406# CONFIG_SCSI_CONSTANTS is not set
429# CONFIG_SCSI_LOGGING is not set 407# CONFIG_SCSI_LOGGING is not set
408# CONFIG_SCSI_SCAN_ASYNC is not set
409CONFIG_SCSI_WAIT_SCAN=m
430 410
431# 411#
432# SCSI Transports 412# SCSI Transports
@@ -434,79 +414,31 @@ CONFIG_SCSI_MULTI_LUN=y
434# CONFIG_SCSI_SPI_ATTRS is not set 414# CONFIG_SCSI_SPI_ATTRS is not set
435# CONFIG_SCSI_FC_ATTRS is not set 415# CONFIG_SCSI_FC_ATTRS is not set
436# CONFIG_SCSI_ISCSI_ATTRS is not set 416# CONFIG_SCSI_ISCSI_ATTRS is not set
437# CONFIG_SCSI_SAS_ATTRS is not set
438# CONFIG_SCSI_SAS_LIBSAS is not set 417# CONFIG_SCSI_SAS_LIBSAS is not set
439 418CONFIG_SCSI_LOWLEVEL=y
440#
441# SCSI low-level drivers
442#
443# CONFIG_ISCSI_TCP is not set 419# CONFIG_ISCSI_TCP is not set
444# CONFIG_SCSI_DEBUG is not set 420# CONFIG_SCSI_DEBUG is not set
445
446#
447# Serial ATA (prod) and Parallel ATA (experimental) drivers
448#
449
450#
451# Multi-device support (RAID and LVM)
452#
453# CONFIG_MD is not set 421# CONFIG_MD is not set
454
455#
456# Fusion MPT device support
457#
458# CONFIG_FUSION is not set
459
460#
461# IEEE 1394 (FireWire) support
462#
463
464#
465# I2O device support
466#
467
468#
469# Network device support
470#
471CONFIG_NETDEVICES=y 422CONFIG_NETDEVICES=y
423# CONFIG_NETDEVICES_MULTIQUEUE is not set
472# CONFIG_DUMMY is not set 424# CONFIG_DUMMY is not set
473# CONFIG_BONDING is not set 425# CONFIG_BONDING is not set
426# CONFIG_MACVLAN is not set
474# CONFIG_EQUALIZER is not set 427# CONFIG_EQUALIZER is not set
475# CONFIG_TUN is not set 428# CONFIG_TUN is not set
476
477#
478# PHY device support
479#
480# CONFIG_PHYLIB is not set 429# CONFIG_PHYLIB is not set
481
482#
483# Ethernet (10 or 100Mbit)
484#
485CONFIG_NET_ETHERNET=y 430CONFIG_NET_ETHERNET=y
486CONFIG_MII=y 431CONFIG_MII=y
487CONFIG_SMC91X=y 432CONFIG_SMC91X=y
488# CONFIG_NE2000 is not set 433# CONFIG_NE2000 is not set
434CONFIG_NETDEV_1000=y
435CONFIG_NETDEV_10000=y
489 436
490# 437#
491# Ethernet (1000 Mbit) 438# Wireless LAN
492#
493
494#
495# Ethernet (10000 Mbit)
496#
497
498#
499# Token Ring devices
500#
501
502#
503# Wireless LAN (non-hamradio)
504#
505# CONFIG_NET_RADIO is not set
506
507#
508# Wan interfaces
509# 439#
440# CONFIG_WLAN_PRE80211 is not set
441# CONFIG_WLAN_80211 is not set
510# CONFIG_WAN is not set 442# CONFIG_WAN is not set
511# CONFIG_PPP is not set 443# CONFIG_PPP is not set
512# CONFIG_SLIP is not set 444# CONFIG_SLIP is not set
@@ -514,15 +446,7 @@ CONFIG_SMC91X=y
514# CONFIG_NETCONSOLE is not set 446# CONFIG_NETCONSOLE is not set
515# CONFIG_NETPOLL is not set 447# CONFIG_NETPOLL is not set
516# CONFIG_NET_POLL_CONTROLLER is not set 448# CONFIG_NET_POLL_CONTROLLER is not set
517
518#
519# ISDN subsystem
520#
521# CONFIG_ISDN is not set 449# CONFIG_ISDN is not set
522
523#
524# Telephony Support
525#
526# CONFIG_PHONE is not set 450# CONFIG_PHONE is not set
527 451
528# 452#
@@ -530,6 +454,7 @@ CONFIG_SMC91X=y
530# 454#
531CONFIG_INPUT=y 455CONFIG_INPUT=y
532# CONFIG_INPUT_FF_MEMLESS is not set 456# CONFIG_INPUT_FF_MEMLESS is not set
457# CONFIG_INPUT_POLLDEV is not set
533 458
534# 459#
535# Userland interfaces 460# Userland interfaces
@@ -546,6 +471,7 @@ CONFIG_INPUT=y
546# CONFIG_INPUT_KEYBOARD is not set 471# CONFIG_INPUT_KEYBOARD is not set
547# CONFIG_INPUT_MOUSE is not set 472# CONFIG_INPUT_MOUSE is not set
548# CONFIG_INPUT_JOYSTICK is not set 473# CONFIG_INPUT_JOYSTICK is not set
474# CONFIG_INPUT_TABLET is not set
549# CONFIG_INPUT_TOUCHSCREEN is not set 475# CONFIG_INPUT_TOUCHSCREEN is not set
550# CONFIG_INPUT_MISC is not set 476# CONFIG_INPUT_MISC is not set
551 477
@@ -584,35 +510,14 @@ CONFIG_SERIAL_M32R_PLDSIO=y
584CONFIG_UNIX98_PTYS=y 510CONFIG_UNIX98_PTYS=y
585CONFIG_LEGACY_PTYS=y 511CONFIG_LEGACY_PTYS=y
586CONFIG_LEGACY_PTY_COUNT=256 512CONFIG_LEGACY_PTY_COUNT=256
587
588#
589# IPMI
590#
591# CONFIG_IPMI_HANDLER is not set 513# CONFIG_IPMI_HANDLER is not set
592
593#
594# Watchdog Cards
595#
596# CONFIG_WATCHDOG is not set 514# CONFIG_WATCHDOG is not set
597CONFIG_HW_RANDOM=y 515CONFIG_HW_RANDOM=y
598# CONFIG_RTC is not set 516# CONFIG_RTC is not set
599CONFIG_DS1302=y 517CONFIG_DS1302=y
600# CONFIG_DTLK is not set
601# CONFIG_R3964 is not set 518# CONFIG_R3964 is not set
602
603#
604# Ftape, the floppy tape device driver
605#
606# CONFIG_RAW_DRIVER is not set 519# CONFIG_RAW_DRIVER is not set
607
608#
609# TPM devices
610#
611# CONFIG_TCG_TPM is not set 520# CONFIG_TCG_TPM is not set
612
613#
614# I2C support
615#
616# CONFIG_I2C is not set 521# CONFIG_I2C is not set
617 522
618# 523#
@@ -620,65 +525,76 @@ CONFIG_DS1302=y
620# 525#
621# CONFIG_SPI is not set 526# CONFIG_SPI is not set
622# CONFIG_SPI_MASTER is not set 527# CONFIG_SPI_MASTER is not set
623
624#
625# Dallas's 1-wire bus
626#
627# CONFIG_W1 is not set 528# CONFIG_W1 is not set
628 529# CONFIG_POWER_SUPPLY is not set
629#
630# Hardware Monitoring support
631#
632CONFIG_HWMON=y 530CONFIG_HWMON=y
633# CONFIG_HWMON_VID is not set 531# CONFIG_HWMON_VID is not set
634# CONFIG_SENSORS_ABITUGURU is not set 532# CONFIG_SENSORS_ABITUGURU is not set
533# CONFIG_SENSORS_ABITUGURU3 is not set
635# CONFIG_SENSORS_F71805F is not set 534# CONFIG_SENSORS_F71805F is not set
535# CONFIG_SENSORS_IT87 is not set
536# CONFIG_SENSORS_PC87360 is not set
537# CONFIG_SENSORS_PC87427 is not set
538# CONFIG_SENSORS_SMSC47M1 is not set
539# CONFIG_SENSORS_SMSC47B397 is not set
636# CONFIG_SENSORS_VT1211 is not set 540# CONFIG_SENSORS_VT1211 is not set
541# CONFIG_SENSORS_W83627HF is not set
542# CONFIG_SENSORS_W83627EHF is not set
637# CONFIG_HWMON_DEBUG_CHIP is not set 543# CONFIG_HWMON_DEBUG_CHIP is not set
638 544
639# 545#
546# Multifunction device drivers
547#
548# CONFIG_MFD_SM501 is not set
549
550#
640# Multimedia devices 551# Multimedia devices
641# 552#
642CONFIG_VIDEO_DEV=m 553CONFIG_VIDEO_DEV=m
643CONFIG_VIDEO_V4L1=y 554CONFIG_VIDEO_V4L1=y
644CONFIG_VIDEO_V4L1_COMPAT=y 555CONFIG_VIDEO_V4L1_COMPAT=y
645CONFIG_VIDEO_V4L2=y 556CONFIG_VIDEO_V4L2=y
646 557CONFIG_VIDEO_CAPTURE_DRIVERS=y
647#
648# Video Capture Adapters
649#
650
651#
652# Video Capture Adapters
653#
654# CONFIG_VIDEO_ADV_DEBUG is not set 558# CONFIG_VIDEO_ADV_DEBUG is not set
655CONFIG_VIDEO_HELPER_CHIPS_AUTO=y 559CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
656# CONFIG_VIDEO_VIVI is not set
657# CONFIG_VIDEO_CPIA is not set 560# CONFIG_VIDEO_CPIA is not set
658CONFIG_VIDEO_M32R_AR=m 561CONFIG_VIDEO_M32R_AR=m
659CONFIG_VIDEO_M32R_AR_M64278=m 562CONFIG_VIDEO_M32R_AR_M64278=m
563CONFIG_RADIO_ADAPTERS=y
564# CONFIG_DVB_CORE is not set
565CONFIG_DAB=y
660 566
661# 567#
662# Radio Adapters 568# Graphics support
663#
664
665#
666# Digital Video Broadcasting Devices
667# 569#
668# CONFIG_DVB is not set 570# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
669 571
670# 572#
671# Graphics support 573# Display device support
672# 574#
673CONFIG_FIRMWARE_EDID=y 575# CONFIG_DISPLAY_SUPPORT is not set
576# CONFIG_VGASTATE is not set
577CONFIG_VIDEO_OUTPUT_CONTROL=m
674CONFIG_FB=y 578CONFIG_FB=y
579CONFIG_FIRMWARE_EDID=y
580# CONFIG_FB_DDC is not set
675CONFIG_FB_CFB_FILLRECT=y 581CONFIG_FB_CFB_FILLRECT=y
676CONFIG_FB_CFB_COPYAREA=y 582CONFIG_FB_CFB_COPYAREA=y
677CONFIG_FB_CFB_IMAGEBLIT=y 583CONFIG_FB_CFB_IMAGEBLIT=y
584# CONFIG_FB_SYS_FILLRECT is not set
585# CONFIG_FB_SYS_COPYAREA is not set
586# CONFIG_FB_SYS_IMAGEBLIT is not set
587# CONFIG_FB_SYS_FOPS is not set
588CONFIG_FB_DEFERRED_IO=y
589# CONFIG_FB_SVGALIB is not set
678# CONFIG_FB_MACMODES is not set 590# CONFIG_FB_MACMODES is not set
679# CONFIG_FB_BACKLIGHT is not set 591# CONFIG_FB_BACKLIGHT is not set
680# CONFIG_FB_MODE_HELPERS is not set 592# CONFIG_FB_MODE_HELPERS is not set
681# CONFIG_FB_TILEBLITTING is not set 593# CONFIG_FB_TILEBLITTING is not set
594
595#
596# Frame buffer hardware drivers
597#
682CONFIG_FB_S1D13XXX=y 598CONFIG_FB_S1D13XXX=y
683# CONFIG_FB_VIRTUAL is not set 599# CONFIG_FB_VIRTUAL is not set
684 600
@@ -688,29 +604,25 @@ CONFIG_FB_S1D13XXX=y
688# CONFIG_VGA_CONSOLE is not set 604# CONFIG_VGA_CONSOLE is not set
689CONFIG_DUMMY_CONSOLE=y 605CONFIG_DUMMY_CONSOLE=y
690CONFIG_FRAMEBUFFER_CONSOLE=y 606CONFIG_FRAMEBUFFER_CONSOLE=y
607# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
691# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 608# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
692# CONFIG_FONTS is not set 609# CONFIG_FONTS is not set
693CONFIG_FONT_8x8=y 610CONFIG_FONT_8x8=y
694CONFIG_FONT_8x16=y 611CONFIG_FONT_8x16=y
695
696#
697# Logo configuration
698#
699CONFIG_LOGO=y 612CONFIG_LOGO=y
700CONFIG_LOGO_LINUX_MONO=y 613CONFIG_LOGO_LINUX_MONO=y
701CONFIG_LOGO_LINUX_VGA16=y 614CONFIG_LOGO_LINUX_VGA16=y
702CONFIG_LOGO_LINUX_CLUT224=y 615CONFIG_LOGO_LINUX_CLUT224=y
703CONFIG_LOGO_M32R_CLUT224=y 616CONFIG_LOGO_M32R_CLUT224=y
704# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
705 617
706# 618#
707# Sound 619# Sound
708# 620#
709# CONFIG_SOUND is not set 621# CONFIG_SOUND is not set
710 622CONFIG_HID_SUPPORT=y
711# 623CONFIG_HID=y
712# USB support 624# CONFIG_HID_DEBUG is not set
713# 625CONFIG_USB_SUPPORT=y
714# CONFIG_USB_ARCH_HAS_HCD is not set 626# CONFIG_USB_ARCH_HAS_HCD is not set
715# CONFIG_USB_ARCH_HAS_OHCI is not set 627# CONFIG_USB_ARCH_HAS_OHCI is not set
716# CONFIG_USB_ARCH_HAS_EHCI is not set 628# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -723,35 +635,20 @@ CONFIG_LOGO_M32R_CLUT224=y
723# USB Gadget Support 635# USB Gadget Support
724# 636#
725# CONFIG_USB_GADGET is not set 637# CONFIG_USB_GADGET is not set
726
727#
728# MMC/SD Card support
729#
730CONFIG_MMC=y 638CONFIG_MMC=y
731CONFIG_MMC_DEBUG=y 639CONFIG_MMC_DEBUG=y
732CONFIG_MMC_BLOCK=y 640# CONFIG_MMC_UNSAFE_RESUME is not set
733# CONFIG_MMC_TIFM_SD is not set
734
735#
736# LED devices
737#
738# CONFIG_NEW_LEDS is not set
739
740#
741# LED drivers
742#
743 641
744# 642#
745# LED Triggers 643# MMC/SD Card Drivers
746#
747
748#
749# InfiniBand support
750# 644#
645CONFIG_MMC_BLOCK=y
646CONFIG_MMC_BLOCK_BOUNCE=y
751 647
752# 648#
753# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 649# MMC/SD Host Controller Drivers
754# 650#
651# CONFIG_NEW_LEDS is not set
755 652
756# 653#
757# Real Time Clock 654# Real Time Clock
@@ -759,17 +656,9 @@ CONFIG_MMC_BLOCK=y
759# CONFIG_RTC_CLASS is not set 656# CONFIG_RTC_CLASS is not set
760 657
761# 658#
762# DMA Engine support 659# Userspace I/O
763#
764# CONFIG_DMA_ENGINE is not set
765
766#
767# DMA Clients
768#
769
770#
771# DMA Devices
772# 660#
661# CONFIG_UIO is not set
773 662
774# 663#
775# File systems 664# File systems
@@ -846,7 +735,6 @@ CONFIG_RAMFS=y
846# CONFIG_BEFS_FS is not set 735# CONFIG_BEFS_FS is not set
847# CONFIG_BFS_FS is not set 736# CONFIG_BFS_FS is not set
848# CONFIG_EFS_FS is not set 737# CONFIG_EFS_FS is not set
849# CONFIG_JFFS_FS is not set
850# CONFIG_JFFS2_FS is not set 738# CONFIG_JFFS2_FS is not set
851# CONFIG_CRAMFS is not set 739# CONFIG_CRAMFS is not set
852# CONFIG_VXFS_FS is not set 740# CONFIG_VXFS_FS is not set
@@ -869,6 +757,7 @@ CONFIG_LOCKD=y
869CONFIG_LOCKD_V4=y 757CONFIG_LOCKD_V4=y
870CONFIG_NFS_COMMON=y 758CONFIG_NFS_COMMON=y
871CONFIG_SUNRPC=y 759CONFIG_SUNRPC=y
760# CONFIG_SUNRPC_BIND34 is not set
872# CONFIG_RPCSEC_GSS_KRB5 is not set 761# CONFIG_RPCSEC_GSS_KRB5 is not set
873# CONFIG_RPCSEC_GSS_SPKM3 is not set 762# CONFIG_RPCSEC_GSS_SPKM3 is not set
874# CONFIG_SMB_FS is not set 763# CONFIG_SMB_FS is not set
@@ -876,7 +765,6 @@ CONFIG_SUNRPC=y
876# CONFIG_NCP_FS is not set 765# CONFIG_NCP_FS is not set
877# CONFIG_CODA_FS is not set 766# CONFIG_CODA_FS is not set
878# CONFIG_AFS_FS is not set 767# CONFIG_AFS_FS is not set
879# CONFIG_9P_FS is not set
880 768
881# 769#
882# Partition Types 770# Partition Types
@@ -929,6 +817,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
929# CONFIG_NLS_UTF8 is not set 817# CONFIG_NLS_UTF8 is not set
930 818
931# 819#
820# Distributed Lock Manager
821#
822# CONFIG_DLM is not set
823
824#
932# Profiling support 825# Profiling support
933# 826#
934CONFIG_PROFILING=y 827CONFIG_PROFILING=y
@@ -941,29 +834,27 @@ CONFIG_OPROFILE=y
941CONFIG_ENABLE_MUST_CHECK=y 834CONFIG_ENABLE_MUST_CHECK=y
942# CONFIG_MAGIC_SYSRQ is not set 835# CONFIG_MAGIC_SYSRQ is not set
943# CONFIG_UNUSED_SYMBOLS is not set 836# CONFIG_UNUSED_SYMBOLS is not set
837# CONFIG_DEBUG_FS is not set
838# CONFIG_HEADERS_CHECK is not set
944# CONFIG_DEBUG_KERNEL is not set 839# CONFIG_DEBUG_KERNEL is not set
945CONFIG_LOG_BUF_SHIFT=14
946# CONFIG_DEBUG_BUGVERBOSE is not set 840# CONFIG_DEBUG_BUGVERBOSE is not set
947# CONFIG_DEBUG_FS is not set
948# CONFIG_FRAME_POINTER is not set 841# CONFIG_FRAME_POINTER is not set
949# CONFIG_UNWIND_INFO is not set
950# CONFIG_HEADERS_CHECK is not set
951 842
952# 843#
953# Security options 844# Security options
954# 845#
955# CONFIG_KEYS is not set 846# CONFIG_KEYS is not set
956# CONFIG_SECURITY is not set 847# CONFIG_SECURITY is not set
957
958#
959# Cryptographic options
960#
961# CONFIG_CRYPTO is not set 848# CONFIG_CRYPTO is not set
962 849
963# 850#
964# Library routines 851# Library routines
965# 852#
853CONFIG_BITREVERSE=y
966# CONFIG_CRC_CCITT is not set 854# CONFIG_CRC_CCITT is not set
967# CONFIG_CRC16 is not set 855# CONFIG_CRC16 is not set
856# CONFIG_CRC_ITU_T is not set
968CONFIG_CRC32=y 857CONFIG_CRC32=y
858# CONFIG_CRC7 is not set
969# CONFIG_LIBCRC32C is not set 859# CONFIG_LIBCRC32C is not set
860CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/mappi/defconfig.nommu b/arch/m32r/configs/mappi.nommu_defconfig
index fbf6c384c9..e3379de1f0 100644
--- a/arch/m32r/mappi/defconfig.nommu
+++ b/arch/m32r/configs/mappi.nommu_defconfig
@@ -1,12 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.23-rc1
4# Wed Dec 13 17:57:45 2006 4# Wed Aug 1 17:22:36 2007
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
8CONFIG_GENERIC_HARDIRQS=y 9CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 14
12# 15#
@@ -27,13 +30,14 @@ CONFIG_LOCALVERSION_AUTO=y
27CONFIG_BSD_PROCESS_ACCT=y 30CONFIG_BSD_PROCESS_ACCT=y
28# CONFIG_BSD_PROCESS_ACCT_V3 is not set 31# CONFIG_BSD_PROCESS_ACCT_V3 is not set
29# CONFIG_TASKSTATS is not set 32# CONFIG_TASKSTATS is not set
30# CONFIG_UTS_NS is not set 33# CONFIG_USER_NS is not set
31# CONFIG_AUDIT is not set 34# CONFIG_AUDIT is not set
32CONFIG_IKCONFIG=y 35CONFIG_IKCONFIG=y
33# CONFIG_IKCONFIG_PROC is not set 36# CONFIG_IKCONFIG_PROC is not set
37CONFIG_LOG_BUF_SHIFT=14
34CONFIG_SYSFS_DEPRECATED=y 38CONFIG_SYSFS_DEPRECATED=y
35# CONFIG_RELAY is not set 39# CONFIG_RELAY is not set
36CONFIG_INITRAMFS_SOURCE="" 40# CONFIG_BLK_DEV_INITRD is not set
37# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 41# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
38CONFIG_SYSCTL=y 42CONFIG_SYSCTL=y
39CONFIG_EMBEDDED=y 43CONFIG_EMBEDDED=y
@@ -45,28 +49,28 @@ CONFIG_BUG=y
45CONFIG_ELF_CORE=y 49CONFIG_ELF_CORE=y
46CONFIG_BASE_FULL=y 50CONFIG_BASE_FULL=y
47# CONFIG_FUTEX is not set 51# CONFIG_FUTEX is not set
52CONFIG_ANON_INODES=y
48# CONFIG_EPOLL is not set 53# CONFIG_EPOLL is not set
49CONFIG_SLAB=y 54CONFIG_SIGNALFD=y
55CONFIG_TIMERFD=y
56CONFIG_EVENTFD=y
50CONFIG_VM_EVENT_COUNTERS=y 57CONFIG_VM_EVENT_COUNTERS=y
58CONFIG_SLAB=y
59# CONFIG_SLUB is not set
60# CONFIG_SLOB is not set
51CONFIG_TINY_SHMEM=y 61CONFIG_TINY_SHMEM=y
52CONFIG_BASE_SMALL=0 62CONFIG_BASE_SMALL=0
53# CONFIG_SLOB is not set
54
55#
56# Loadable module support
57#
58CONFIG_MODULES=y 63CONFIG_MODULES=y
59CONFIG_MODULE_UNLOAD=y 64CONFIG_MODULE_UNLOAD=y
60# CONFIG_MODULE_FORCE_UNLOAD is not set 65# CONFIG_MODULE_FORCE_UNLOAD is not set
61# CONFIG_MODVERSIONS is not set 66# CONFIG_MODVERSIONS is not set
62# CONFIG_MODULE_SRCVERSION_ALL is not set 67# CONFIG_MODULE_SRCVERSION_ALL is not set
63CONFIG_KMOD=y 68CONFIG_KMOD=y
64
65#
66# Block layer
67#
68CONFIG_BLOCK=y 69CONFIG_BLOCK=y
70# CONFIG_LBD is not set
69# CONFIG_BLK_DEV_IO_TRACE is not set 71# CONFIG_BLK_DEV_IO_TRACE is not set
72# CONFIG_LSF is not set
73# CONFIG_BLK_DEV_BSG is not set
70 74
71# 75#
72# IO Schedulers 76# IO Schedulers
@@ -119,13 +123,18 @@ CONFIG_NEED_MULTIPLE_NODES=y
119# CONFIG_SPARSEMEM_STATIC is not set 123# CONFIG_SPARSEMEM_STATIC is not set
120CONFIG_SPLIT_PTLOCK_CPUS=4 124CONFIG_SPLIT_PTLOCK_CPUS=4
121# CONFIG_RESOURCES_64BIT is not set 125# CONFIG_RESOURCES_64BIT is not set
126CONFIG_ZONE_DMA_FLAG=1
127CONFIG_VIRT_TO_BUS=y
122CONFIG_IRAM_START=0x00f00000 128CONFIG_IRAM_START=0x00f00000
123CONFIG_IRAM_SIZE=0x00080000 129CONFIG_IRAM_SIZE=0x00080000
124CONFIG_RWSEM_GENERIC_SPINLOCK=y 130CONFIG_RWSEM_GENERIC_SPINLOCK=y
125# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 131# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
132# CONFIG_ARCH_HAS_ILOG2_U32 is not set
133# CONFIG_ARCH_HAS_ILOG2_U64 is not set
126CONFIG_GENERIC_FIND_NEXT_BIT=y 134CONFIG_GENERIC_FIND_NEXT_BIT=y
127CONFIG_GENERIC_HWEIGHT=y 135CONFIG_GENERIC_HWEIGHT=y
128CONFIG_GENERIC_CALIBRATE_DELAY=y 136CONFIG_GENERIC_CALIBRATE_DELAY=y
137CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
129CONFIG_PREEMPT=y 138CONFIG_PREEMPT=y
130# CONFIG_SMP is not set 139# CONFIG_SMP is not set
131CONFIG_NODES_SHIFT=1 140CONFIG_NODES_SHIFT=1
@@ -133,6 +142,7 @@ CONFIG_NODES_SHIFT=1
133# 142#
134# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 143# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
135# 144#
145# CONFIG_ARCH_SUPPORTS_MSI is not set
136# CONFIG_ISA is not set 146# CONFIG_ISA is not set
137 147
138# 148#
@@ -151,10 +161,6 @@ CONFIG_M32R_PCC=y
151CONFIG_PCCARD_NONSTATIC=y 161CONFIG_PCCARD_NONSTATIC=y
152 162
153# 163#
154# PCI Hotplug Support
155#
156
157#
158# Executable file formats 164# Executable file formats
159# 165#
160CONFIG_BINFMT_FLAT=y 166CONFIG_BINFMT_FLAT=y
@@ -170,13 +176,13 @@ CONFIG_NET=y
170# 176#
171# Networking options 177# Networking options
172# 178#
173# CONFIG_NETDEBUG is not set
174CONFIG_PACKET=y 179CONFIG_PACKET=y
175# CONFIG_PACKET_MMAP is not set 180# CONFIG_PACKET_MMAP is not set
176CONFIG_UNIX=y 181CONFIG_UNIX=y
177CONFIG_XFRM=y 182CONFIG_XFRM=y
178# CONFIG_XFRM_USER is not set 183# CONFIG_XFRM_USER is not set
179# CONFIG_XFRM_SUB_POLICY is not set 184# CONFIG_XFRM_SUB_POLICY is not set
185# CONFIG_XFRM_MIGRATE is not set
180# CONFIG_NET_KEY is not set 186# CONFIG_NET_KEY is not set
181CONFIG_INET=y 187CONFIG_INET=y
182# CONFIG_IP_MULTICAST is not set 188# CONFIG_IP_MULTICAST is not set
@@ -209,20 +215,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
209# CONFIG_INET6_TUNNEL is not set 215# CONFIG_INET6_TUNNEL is not set
210# CONFIG_NETWORK_SECMARK is not set 216# CONFIG_NETWORK_SECMARK is not set
211# CONFIG_NETFILTER is not set 217# CONFIG_NETFILTER is not set
212
213#
214# DCCP Configuration (EXPERIMENTAL)
215#
216# CONFIG_IP_DCCP is not set 218# CONFIG_IP_DCCP is not set
217
218#
219# SCTP Configuration (EXPERIMENTAL)
220#
221# CONFIG_IP_SCTP is not set 219# CONFIG_IP_SCTP is not set
222
223#
224# TIPC Configuration (EXPERIMENTAL)
225#
226# CONFIG_TIPC is not set 220# CONFIG_TIPC is not set
227# CONFIG_ATM is not set 221# CONFIG_ATM is not set
228# CONFIG_BRIDGE is not set 222# CONFIG_BRIDGE is not set
@@ -248,7 +242,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
248# CONFIG_HAMRADIO is not set 242# CONFIG_HAMRADIO is not set
249# CONFIG_IRDA is not set 243# CONFIG_IRDA is not set
250# CONFIG_BT is not set 244# CONFIG_BT is not set
245# CONFIG_AF_RXRPC is not set
246
247#
248# Wireless
249#
250# CONFIG_CFG80211 is not set
251# CONFIG_WIRELESS_EXT is not set
252# CONFIG_MAC80211 is not set
251# CONFIG_IEEE80211 is not set 253# CONFIG_IEEE80211 is not set
254# CONFIG_RFKILL is not set
255# CONFIG_NET_9P is not set
252 256
253# 257#
254# Device Drivers 258# Device Drivers
@@ -261,29 +265,10 @@ CONFIG_STANDALONE=y
261CONFIG_PREVENT_FIRMWARE_BUILD=y 265CONFIG_PREVENT_FIRMWARE_BUILD=y
262CONFIG_FW_LOADER=y 266CONFIG_FW_LOADER=y
263# CONFIG_SYS_HYPERVISOR is not set 267# CONFIG_SYS_HYPERVISOR is not set
264
265#
266# Connector - unified userspace <-> kernelspace linker
267#
268# CONFIG_CONNECTOR is not set 268# CONFIG_CONNECTOR is not set
269
270#
271# Memory Technology Devices (MTD)
272#
273# CONFIG_MTD is not set 269# CONFIG_MTD is not set
274
275#
276# Parallel port support
277#
278# CONFIG_PARPORT is not set 270# CONFIG_PARPORT is not set
279 271CONFIG_BLK_DEV=y
280#
281# Plug and Play support
282#
283
284#
285# Block devices
286#
287# CONFIG_BLK_DEV_COW_COMMON is not set 272# CONFIG_BLK_DEV_COW_COMMON is not set
288CONFIG_BLK_DEV_LOOP=y 273CONFIG_BLK_DEV_LOOP=y
289# CONFIG_BLK_DEV_CRYPTOLOOP is not set 274# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -292,18 +277,10 @@ CONFIG_BLK_DEV_RAM=y
292CONFIG_BLK_DEV_RAM_COUNT=16 277CONFIG_BLK_DEV_RAM_COUNT=16
293CONFIG_BLK_DEV_RAM_SIZE=4096 278CONFIG_BLK_DEV_RAM_SIZE=4096
294CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 279CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
295# CONFIG_BLK_DEV_INITRD is not set
296# CONFIG_CDROM_PKTCDVD is not set 280# CONFIG_CDROM_PKTCDVD is not set
297# CONFIG_ATA_OVER_ETH is not set 281# CONFIG_ATA_OVER_ETH is not set
298 282CONFIG_MISC_DEVICES=y
299# 283# CONFIG_EEPROM_93CX6 is not set
300# Misc devices
301#
302# CONFIG_TIFM_CORE is not set
303
304#
305# ATA/ATAPI/MFM/RLL support
306#
307# CONFIG_IDE is not set 284# CONFIG_IDE is not set
308 285
309# 286#
@@ -311,74 +288,26 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
311# 288#
312# CONFIG_RAID_ATTRS is not set 289# CONFIG_RAID_ATTRS is not set
313# CONFIG_SCSI is not set 290# CONFIG_SCSI is not set
291# CONFIG_SCSI_DMA is not set
314# CONFIG_SCSI_NETLINK is not set 292# CONFIG_SCSI_NETLINK is not set
315
316#
317# Serial ATA (prod) and Parallel ATA (experimental) drivers
318#
319
320#
321# Multi-device support (RAID and LVM)
322#
323# CONFIG_MD is not set 293# CONFIG_MD is not set
324
325#
326# Fusion MPT device support
327#
328# CONFIG_FUSION is not set
329
330#
331# IEEE 1394 (FireWire) support
332#
333
334#
335# I2O device support
336#
337
338#
339# Network device support
340#
341CONFIG_NETDEVICES=y 294CONFIG_NETDEVICES=y
295# CONFIG_NETDEVICES_MULTIQUEUE is not set
342# CONFIG_DUMMY is not set 296# CONFIG_DUMMY is not set
343# CONFIG_BONDING is not set 297# CONFIG_BONDING is not set
298# CONFIG_MACVLAN is not set
344# CONFIG_EQUALIZER is not set 299# CONFIG_EQUALIZER is not set
345# CONFIG_TUN is not set 300# CONFIG_TUN is not set
346
347#
348# PHY device support
349#
350
351#
352# Ethernet (10 or 100Mbit)
353#
354# CONFIG_NET_ETHERNET is not set 301# CONFIG_NET_ETHERNET is not set
355CONFIG_NE2000=y 302CONFIG_NETDEV_1000=y
356 303CONFIG_NETDEV_10000=y
357#
358# Ethernet (1000 Mbit)
359#
360
361#
362# Ethernet (10000 Mbit)
363#
364
365#
366# Token Ring devices
367#
368
369#
370# Wireless LAN (non-hamradio)
371#
372# CONFIG_NET_RADIO is not set
373 304
374# 305#
375# PCMCIA network device support 306# Wireless LAN
376# 307#
308# CONFIG_WLAN_PRE80211 is not set
309# CONFIG_WLAN_80211 is not set
377# CONFIG_NET_PCMCIA is not set 310# CONFIG_NET_PCMCIA is not set
378
379#
380# Wan interfaces
381#
382# CONFIG_WAN is not set 311# CONFIG_WAN is not set
383# CONFIG_PPP is not set 312# CONFIG_PPP is not set
384# CONFIG_SLIP is not set 313# CONFIG_SLIP is not set
@@ -386,15 +315,7 @@ CONFIG_NE2000=y
386# CONFIG_NETCONSOLE is not set 315# CONFIG_NETCONSOLE is not set
387# CONFIG_NETPOLL is not set 316# CONFIG_NETPOLL is not set
388# CONFIG_NET_POLL_CONTROLLER is not set 317# CONFIG_NET_POLL_CONTROLLER is not set
389
390#
391# ISDN subsystem
392#
393# CONFIG_ISDN is not set 318# CONFIG_ISDN is not set
394
395#
396# Telephony Support
397#
398# CONFIG_PHONE is not set 319# CONFIG_PHONE is not set
399 320
400# 321#
@@ -402,6 +323,7 @@ CONFIG_NE2000=y
402# 323#
403CONFIG_INPUT=y 324CONFIG_INPUT=y
404# CONFIG_INPUT_FF_MEMLESS is not set 325# CONFIG_INPUT_FF_MEMLESS is not set
326# CONFIG_INPUT_POLLDEV is not set
405 327
406# 328#
407# Userland interfaces 329# Userland interfaces
@@ -418,6 +340,7 @@ CONFIG_INPUT=y
418# CONFIG_INPUT_KEYBOARD is not set 340# CONFIG_INPUT_KEYBOARD is not set
419# CONFIG_INPUT_MOUSE is not set 341# CONFIG_INPUT_MOUSE is not set
420# CONFIG_INPUT_JOYSTICK is not set 342# CONFIG_INPUT_JOYSTICK is not set
343# CONFIG_INPUT_TABLET is not set
421# CONFIG_INPUT_TOUCHSCREEN is not set 344# CONFIG_INPUT_TOUCHSCREEN is not set
422# CONFIG_INPUT_MISC is not set 345# CONFIG_INPUT_MISC is not set
423 346
@@ -452,41 +375,20 @@ CONFIG_SERIAL_M32R_SIO_CONSOLE=y
452CONFIG_UNIX98_PTYS=y 375CONFIG_UNIX98_PTYS=y
453CONFIG_LEGACY_PTYS=y 376CONFIG_LEGACY_PTYS=y
454CONFIG_LEGACY_PTY_COUNT=256 377CONFIG_LEGACY_PTY_COUNT=256
455
456#
457# IPMI
458#
459# CONFIG_IPMI_HANDLER is not set 378# CONFIG_IPMI_HANDLER is not set
460
461#
462# Watchdog Cards
463#
464# CONFIG_WATCHDOG is not set 379# CONFIG_WATCHDOG is not set
465CONFIG_HW_RANDOM=y 380CONFIG_HW_RANDOM=y
466# CONFIG_RTC is not set 381# CONFIG_RTC is not set
467# CONFIG_DTLK is not set
468# CONFIG_R3964 is not set 382# CONFIG_R3964 is not set
469 383
470# 384#
471# Ftape, the floppy tape device driver
472#
473
474#
475# PCMCIA character devices 385# PCMCIA character devices
476# 386#
477# CONFIG_SYNCLINK_CS is not set 387# CONFIG_SYNCLINK_CS is not set
478# CONFIG_CARDMAN_4000 is not set 388# CONFIG_CARDMAN_4000 is not set
479# CONFIG_CARDMAN_4040 is not set 389# CONFIG_CARDMAN_4040 is not set
480# CONFIG_RAW_DRIVER is not set 390# CONFIG_RAW_DRIVER is not set
481
482#
483# TPM devices
484#
485# CONFIG_TCG_TPM is not set 391# CONFIG_TCG_TPM is not set
486
487#
488# I2C support
489#
490# CONFIG_I2C is not set 392# CONFIG_I2C is not set
491 393
492# 394#
@@ -494,47 +396,56 @@ CONFIG_HW_RANDOM=y
494# 396#
495# CONFIG_SPI is not set 397# CONFIG_SPI is not set
496# CONFIG_SPI_MASTER is not set 398# CONFIG_SPI_MASTER is not set
497
498#
499# Dallas's 1-wire bus
500#
501# CONFIG_W1 is not set 399# CONFIG_W1 is not set
502 400# CONFIG_POWER_SUPPLY is not set
503#
504# Hardware Monitoring support
505#
506CONFIG_HWMON=y 401CONFIG_HWMON=y
507# CONFIG_HWMON_VID is not set 402# CONFIG_HWMON_VID is not set
508# CONFIG_SENSORS_ABITUGURU is not set 403# CONFIG_SENSORS_ABITUGURU is not set
404# CONFIG_SENSORS_ABITUGURU3 is not set
509# CONFIG_SENSORS_F71805F is not set 405# CONFIG_SENSORS_F71805F is not set
406# CONFIG_SENSORS_IT87 is not set
407# CONFIG_SENSORS_PC87360 is not set
408# CONFIG_SENSORS_PC87427 is not set
409# CONFIG_SENSORS_SMSC47M1 is not set
410# CONFIG_SENSORS_SMSC47B397 is not set
510# CONFIG_SENSORS_VT1211 is not set 411# CONFIG_SENSORS_VT1211 is not set
412# CONFIG_SENSORS_W83627HF is not set
413# CONFIG_SENSORS_W83627EHF is not set
511# CONFIG_HWMON_DEBUG_CHIP is not set 414# CONFIG_HWMON_DEBUG_CHIP is not set
512 415
513# 416#
514# Multimedia devices 417# Multifunction device drivers
515# 418#
516# CONFIG_VIDEO_DEV is not set 419# CONFIG_MFD_SM501 is not set
517 420
518# 421#
519# Digital Video Broadcasting Devices 422# Multimedia devices
520# 423#
521# CONFIG_DVB is not set 424# CONFIG_VIDEO_DEV is not set
425# CONFIG_DVB_CORE is not set
426CONFIG_DAB=y
522 427
523# 428#
524# Graphics support 429# Graphics support
525# 430#
526CONFIG_FIRMWARE_EDID=y
527# CONFIG_FB is not set
528# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 431# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
529 432
530# 433#
531# Sound 434# Display device support
532# 435#
533# CONFIG_SOUND is not set 436# CONFIG_DISPLAY_SUPPORT is not set
437# CONFIG_VGASTATE is not set
438CONFIG_VIDEO_OUTPUT_CONTROL=m
439# CONFIG_FB is not set
534 440
535# 441#
536# USB support 442# Sound
537# 443#
444# CONFIG_SOUND is not set
445CONFIG_HID_SUPPORT=y
446CONFIG_HID=y
447# CONFIG_HID_DEBUG is not set
448CONFIG_USB_SUPPORT=y
538# CONFIG_USB_ARCH_HAS_HCD is not set 449# CONFIG_USB_ARCH_HAS_HCD is not set
539# CONFIG_USB_ARCH_HAS_OHCI is not set 450# CONFIG_USB_ARCH_HAS_OHCI is not set
540# CONFIG_USB_ARCH_HAS_EHCI is not set 451# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -547,50 +458,18 @@ CONFIG_FIRMWARE_EDID=y
547# USB Gadget Support 458# USB Gadget Support
548# 459#
549# CONFIG_USB_GADGET is not set 460# CONFIG_USB_GADGET is not set
550
551#
552# MMC/SD Card support
553#
554# CONFIG_MMC is not set 461# CONFIG_MMC is not set
555
556#
557# LED devices
558#
559# CONFIG_NEW_LEDS is not set 462# CONFIG_NEW_LEDS is not set
560 463
561# 464#
562# LED drivers
563#
564
565#
566# LED Triggers
567#
568
569#
570# InfiniBand support
571#
572
573#
574# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
575#
576
577#
578# Real Time Clock 465# Real Time Clock
579# 466#
580# CONFIG_RTC_CLASS is not set 467# CONFIG_RTC_CLASS is not set
581 468
582# 469#
583# DMA Engine support 470# Userspace I/O
584#
585# CONFIG_DMA_ENGINE is not set
586
587#
588# DMA Clients
589#
590
591#
592# DMA Devices
593# 471#
472# CONFIG_UIO is not set
594 473
595# 474#
596# File systems 475# File systems
@@ -676,6 +555,7 @@ CONFIG_LOCKD=y
676CONFIG_LOCKD_V4=y 555CONFIG_LOCKD_V4=y
677CONFIG_NFS_COMMON=y 556CONFIG_NFS_COMMON=y
678CONFIG_SUNRPC=y 557CONFIG_SUNRPC=y
558# CONFIG_SUNRPC_BIND34 is not set
679# CONFIG_RPCSEC_GSS_KRB5 is not set 559# CONFIG_RPCSEC_GSS_KRB5 is not set
680# CONFIG_RPCSEC_GSS_SPKM3 is not set 560# CONFIG_RPCSEC_GSS_SPKM3 is not set
681# CONFIG_SMB_FS is not set 561# CONFIG_SMB_FS is not set
@@ -683,7 +563,6 @@ CONFIG_SUNRPC=y
683# CONFIG_NCP_FS is not set 563# CONFIG_NCP_FS is not set
684# CONFIG_CODA_FS is not set 564# CONFIG_CODA_FS is not set
685# CONFIG_AFS_FS is not set 565# CONFIG_AFS_FS is not set
686# CONFIG_9P_FS is not set
687 566
688# 567#
689# Partition Types 568# Partition Types
@@ -736,6 +615,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
736# CONFIG_NLS_UTF8 is not set 615# CONFIG_NLS_UTF8 is not set
737 616
738# 617#
618# Distributed Lock Manager
619#
620# CONFIG_DLM is not set
621
622#
739# Profiling support 623# Profiling support
740# 624#
741# CONFIG_PROFILING is not set 625# CONFIG_PROFILING is not set
@@ -747,29 +631,27 @@ CONFIG_NLS_DEFAULT="iso8859-1"
747CONFIG_ENABLE_MUST_CHECK=y 631CONFIG_ENABLE_MUST_CHECK=y
748# CONFIG_MAGIC_SYSRQ is not set 632# CONFIG_MAGIC_SYSRQ is not set
749# CONFIG_UNUSED_SYMBOLS is not set 633# CONFIG_UNUSED_SYMBOLS is not set
634# CONFIG_DEBUG_FS is not set
635# CONFIG_HEADERS_CHECK is not set
750# CONFIG_DEBUG_KERNEL is not set 636# CONFIG_DEBUG_KERNEL is not set
751CONFIG_LOG_BUF_SHIFT=14
752# CONFIG_DEBUG_BUGVERBOSE is not set 637# CONFIG_DEBUG_BUGVERBOSE is not set
753# CONFIG_DEBUG_FS is not set
754# CONFIG_FRAME_POINTER is not set 638# CONFIG_FRAME_POINTER is not set
755# CONFIG_UNWIND_INFO is not set
756# CONFIG_HEADERS_CHECK is not set
757 639
758# 640#
759# Security options 641# Security options
760# 642#
761# CONFIG_KEYS is not set 643# CONFIG_KEYS is not set
762# CONFIG_SECURITY is not set 644# CONFIG_SECURITY is not set
763
764#
765# Cryptographic options
766#
767# CONFIG_CRYPTO is not set 645# CONFIG_CRYPTO is not set
768 646
769# 647#
770# Library routines 648# Library routines
771# 649#
650CONFIG_BITREVERSE=y
772# CONFIG_CRC_CCITT is not set 651# CONFIG_CRC_CCITT is not set
773# CONFIG_CRC16 is not set 652# CONFIG_CRC16 is not set
653# CONFIG_CRC_ITU_T is not set
774CONFIG_CRC32=y 654CONFIG_CRC32=y
655# CONFIG_CRC7 is not set
775# CONFIG_LIBCRC32C is not set 656# CONFIG_LIBCRC32C is not set
657CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/mappi/defconfig.smp b/arch/m32r/configs/mappi.smp_defconfig
index 168669202b..b86fb37fc6 100644
--- a/arch/m32r/mappi/defconfig.smp
+++ b/arch/m32r/configs/mappi.smp_defconfig
@@ -1,12 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.23-rc1
4# Wed Dec 13 17:50:59 2006 4# Wed Aug 1 17:22:35 2007
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
8CONFIG_GENERIC_HARDIRQS=y 9CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 14
12# 15#
@@ -23,17 +26,19 @@ CONFIG_LOCALVERSION=""
23CONFIG_LOCALVERSION_AUTO=y 26CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 27CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 28CONFIG_SYSVIPC=y
26# CONFIG_IPC_NS is not set 29CONFIG_SYSVIPC_SYSCTL=y
27# CONFIG_POSIX_MQUEUE is not set 30# CONFIG_POSIX_MQUEUE is not set
28# CONFIG_BSD_PROCESS_ACCT is not set 31# CONFIG_BSD_PROCESS_ACCT is not set
29# CONFIG_TASKSTATS is not set 32# CONFIG_TASKSTATS is not set
30# CONFIG_UTS_NS is not set 33# CONFIG_USER_NS is not set
31# CONFIG_AUDIT is not set 34# CONFIG_AUDIT is not set
32CONFIG_IKCONFIG=y 35CONFIG_IKCONFIG=y
33CONFIG_IKCONFIG_PROC=y 36CONFIG_IKCONFIG_PROC=y
37CONFIG_LOG_BUF_SHIFT=15
34# CONFIG_CPUSETS is not set 38# CONFIG_CPUSETS is not set
35CONFIG_SYSFS_DEPRECATED=y 39CONFIG_SYSFS_DEPRECATED=y
36# CONFIG_RELAY is not set 40# CONFIG_RELAY is not set
41CONFIG_BLK_DEV_INITRD=y
37CONFIG_INITRAMFS_SOURCE="" 42CONFIG_INITRAMFS_SOURCE=""
38# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
39CONFIG_SYSCTL=y 44CONFIG_SYSCTL=y
@@ -46,17 +51,18 @@ CONFIG_BUG=y
46CONFIG_ELF_CORE=y 51CONFIG_ELF_CORE=y
47CONFIG_BASE_FULL=y 52CONFIG_BASE_FULL=y
48# CONFIG_FUTEX is not set 53# CONFIG_FUTEX is not set
54CONFIG_ANON_INODES=y
49# CONFIG_EPOLL is not set 55# CONFIG_EPOLL is not set
56CONFIG_SIGNALFD=y
57CONFIG_TIMERFD=y
58CONFIG_EVENTFD=y
50CONFIG_SHMEM=y 59CONFIG_SHMEM=y
51CONFIG_SLAB=y
52CONFIG_VM_EVENT_COUNTERS=y 60CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_SLAB=y
62# CONFIG_SLUB is not set
63# CONFIG_SLOB is not set
53# CONFIG_TINY_SHMEM is not set 64# CONFIG_TINY_SHMEM is not set
54CONFIG_BASE_SMALL=0 65CONFIG_BASE_SMALL=0
55# CONFIG_SLOB is not set
56
57#
58# Loadable module support
59#
60CONFIG_MODULES=y 66CONFIG_MODULES=y
61CONFIG_MODULE_UNLOAD=y 67CONFIG_MODULE_UNLOAD=y
62# CONFIG_MODULE_FORCE_UNLOAD is not set 68# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -64,12 +70,11 @@ CONFIG_MODULE_UNLOAD=y
64# CONFIG_MODULE_SRCVERSION_ALL is not set 70# CONFIG_MODULE_SRCVERSION_ALL is not set
65CONFIG_KMOD=y 71CONFIG_KMOD=y
66CONFIG_STOP_MACHINE=y 72CONFIG_STOP_MACHINE=y
67
68#
69# Block layer
70#
71CONFIG_BLOCK=y 73CONFIG_BLOCK=y
74# CONFIG_LBD is not set
72# CONFIG_BLK_DEV_IO_TRACE is not set 75# CONFIG_BLK_DEV_IO_TRACE is not set
76# CONFIG_LSF is not set
77# CONFIG_BLK_DEV_BSG is not set
73 78
74# 79#
75# IO Schedulers 80# IO Schedulers
@@ -122,13 +127,19 @@ CONFIG_NEED_MULTIPLE_NODES=y
122# CONFIG_SPARSEMEM_STATIC is not set 127# CONFIG_SPARSEMEM_STATIC is not set
123CONFIG_SPLIT_PTLOCK_CPUS=4 128CONFIG_SPLIT_PTLOCK_CPUS=4
124# CONFIG_RESOURCES_64BIT is not set 129# CONFIG_RESOURCES_64BIT is not set
130CONFIG_ZONE_DMA_FLAG=1
131CONFIG_BOUNCE=y
132CONFIG_VIRT_TO_BUS=y
125CONFIG_IRAM_START=0x00f00000 133CONFIG_IRAM_START=0x00f00000
126CONFIG_IRAM_SIZE=0x00080000 134CONFIG_IRAM_SIZE=0x00080000
127CONFIG_RWSEM_GENERIC_SPINLOCK=y 135CONFIG_RWSEM_GENERIC_SPINLOCK=y
128# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 136# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
137# CONFIG_ARCH_HAS_ILOG2_U32 is not set
138# CONFIG_ARCH_HAS_ILOG2_U64 is not set
129CONFIG_GENERIC_FIND_NEXT_BIT=y 139CONFIG_GENERIC_FIND_NEXT_BIT=y
130CONFIG_GENERIC_HWEIGHT=y 140CONFIG_GENERIC_HWEIGHT=y
131CONFIG_GENERIC_CALIBRATE_DELAY=y 141CONFIG_GENERIC_CALIBRATE_DELAY=y
142CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
132CONFIG_PREEMPT=y 143CONFIG_PREEMPT=y
133CONFIG_SMP=y 144CONFIG_SMP=y
134CONFIG_CHIP_M32700_TS1=y 145CONFIG_CHIP_M32700_TS1=y
@@ -138,6 +149,7 @@ CONFIG_NODES_SHIFT=1
138# 149#
139# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 150# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
140# 151#
152# CONFIG_ARCH_SUPPORTS_MSI is not set
141# CONFIG_ISA is not set 153# CONFIG_ISA is not set
142 154
143# 155#
@@ -156,10 +168,6 @@ CONFIG_M32R_PCC=y
156CONFIG_PCCARD_NONSTATIC=y 168CONFIG_PCCARD_NONSTATIC=y
157 169
158# 170#
159# PCI Hotplug Support
160#
161
162#
163# Executable file formats 171# Executable file formats
164# 172#
165CONFIG_BINFMT_ELF=y 173CONFIG_BINFMT_ELF=y
@@ -173,12 +181,12 @@ CONFIG_NET=y
173# 181#
174# Networking options 182# Networking options
175# 183#
176# CONFIG_NETDEBUG is not set
177# CONFIG_PACKET is not set 184# CONFIG_PACKET is not set
178CONFIG_UNIX=y 185CONFIG_UNIX=y
179CONFIG_XFRM=y 186CONFIG_XFRM=y
180# CONFIG_XFRM_USER is not set 187# CONFIG_XFRM_USER is not set
181# CONFIG_XFRM_SUB_POLICY is not set 188# CONFIG_XFRM_SUB_POLICY is not set
189# CONFIG_XFRM_MIGRATE is not set
182# CONFIG_NET_KEY is not set 190# CONFIG_NET_KEY is not set
183CONFIG_INET=y 191CONFIG_INET=y
184# CONFIG_IP_MULTICAST is not set 192# CONFIG_IP_MULTICAST is not set
@@ -211,20 +219,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
211# CONFIG_INET6_TUNNEL is not set 219# CONFIG_INET6_TUNNEL is not set
212# CONFIG_NETWORK_SECMARK is not set 220# CONFIG_NETWORK_SECMARK is not set
213# CONFIG_NETFILTER is not set 221# CONFIG_NETFILTER is not set
214
215#
216# DCCP Configuration (EXPERIMENTAL)
217#
218# CONFIG_IP_DCCP is not set 222# CONFIG_IP_DCCP is not set
219
220#
221# SCTP Configuration (EXPERIMENTAL)
222#
223# CONFIG_IP_SCTP is not set 223# CONFIG_IP_SCTP is not set
224
225#
226# TIPC Configuration (EXPERIMENTAL)
227#
228# CONFIG_TIPC is not set 224# CONFIG_TIPC is not set
229# CONFIG_ATM is not set 225# CONFIG_ATM is not set
230# CONFIG_BRIDGE is not set 226# CONFIG_BRIDGE is not set
@@ -250,7 +246,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
250# CONFIG_HAMRADIO is not set 246# CONFIG_HAMRADIO is not set
251# CONFIG_IRDA is not set 247# CONFIG_IRDA is not set
252# CONFIG_BT is not set 248# CONFIG_BT is not set
249# CONFIG_AF_RXRPC is not set
250
251#
252# Wireless
253#
254# CONFIG_CFG80211 is not set
255# CONFIG_WIRELESS_EXT is not set
256# CONFIG_MAC80211 is not set
253# CONFIG_IEEE80211 is not set 257# CONFIG_IEEE80211 is not set
258# CONFIG_RFKILL is not set
259# CONFIG_NET_9P is not set
254 260
255# 261#
256# Device Drivers 262# Device Drivers
@@ -263,15 +269,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
263CONFIG_PREVENT_FIRMWARE_BUILD=y 269CONFIG_PREVENT_FIRMWARE_BUILD=y
264CONFIG_FW_LOADER=y 270CONFIG_FW_LOADER=y
265# CONFIG_SYS_HYPERVISOR is not set 271# CONFIG_SYS_HYPERVISOR is not set
266
267#
268# Connector - unified userspace <-> kernelspace linker
269#
270# CONFIG_CONNECTOR is not set 272# CONFIG_CONNECTOR is not set
271
272#
273# Memory Technology Devices (MTD)
274#
275CONFIG_MTD=y 273CONFIG_MTD=y
276# CONFIG_MTD_DEBUG is not set 274# CONFIG_MTD_DEBUG is not set
277# CONFIG_MTD_CONCAT is not set 275# CONFIG_MTD_CONCAT is not set
@@ -286,6 +284,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
286# User Modules And Translation Layers 284# User Modules And Translation Layers
287# 285#
288CONFIG_MTD_CHAR=y 286CONFIG_MTD_CHAR=y
287CONFIG_MTD_BLKDEVS=y
289CONFIG_MTD_BLOCK=y 288CONFIG_MTD_BLOCK=y
290# CONFIG_FTL is not set 289# CONFIG_FTL is not set
291# CONFIG_NFTL is not set 290# CONFIG_NFTL is not set
@@ -311,7 +310,6 @@ CONFIG_MTD_CFI_I2=y
311# CONFIG_MTD_RAM is not set 310# CONFIG_MTD_RAM is not set
312# CONFIG_MTD_ROM is not set 311# CONFIG_MTD_ROM is not set
313# CONFIG_MTD_ABSENT is not set 312# CONFIG_MTD_ABSENT is not set
314# CONFIG_MTD_OBSOLETE_CHIPS is not set
315 313
316# 314#
317# Mapping drivers for chip access 315# Mapping drivers for chip access
@@ -333,29 +331,15 @@ CONFIG_MTD_CFI_I2=y
333# CONFIG_MTD_DOC2000 is not set 331# CONFIG_MTD_DOC2000 is not set
334# CONFIG_MTD_DOC2001 is not set 332# CONFIG_MTD_DOC2001 is not set
335# CONFIG_MTD_DOC2001PLUS is not set 333# CONFIG_MTD_DOC2001PLUS is not set
336
337#
338# NAND Flash Device Drivers
339#
340# CONFIG_MTD_NAND is not set 334# CONFIG_MTD_NAND is not set
341
342#
343# OneNAND Flash Device Drivers
344#
345# CONFIG_MTD_ONENAND is not set 335# CONFIG_MTD_ONENAND is not set
346 336
347# 337#
348# Parallel port support 338# UBI - Unsorted block images
349# 339#
340# CONFIG_MTD_UBI is not set
350# CONFIG_PARPORT is not set 341# CONFIG_PARPORT is not set
351 342CONFIG_BLK_DEV=y
352#
353# Plug and Play support
354#
355
356#
357# Block devices
358#
359# CONFIG_BLK_DEV_COW_COMMON is not set 343# CONFIG_BLK_DEV_COW_COMMON is not set
360CONFIG_BLK_DEV_LOOP=y 344CONFIG_BLK_DEV_LOOP=y
361# CONFIG_BLK_DEV_CRYPTOLOOP is not set 345# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -364,18 +348,10 @@ CONFIG_BLK_DEV_RAM=y
364CONFIG_BLK_DEV_RAM_COUNT=16 348CONFIG_BLK_DEV_RAM_COUNT=16
365CONFIG_BLK_DEV_RAM_SIZE=4096 349CONFIG_BLK_DEV_RAM_SIZE=4096
366CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 350CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
367CONFIG_BLK_DEV_INITRD=y
368# CONFIG_CDROM_PKTCDVD is not set 351# CONFIG_CDROM_PKTCDVD is not set
369# CONFIG_ATA_OVER_ETH is not set 352# CONFIG_ATA_OVER_ETH is not set
370 353CONFIG_MISC_DEVICES=y
371# 354# CONFIG_EEPROM_93CX6 is not set
372# Misc devices
373#
374# CONFIG_TIFM_CORE is not set
375
376#
377# ATA/ATAPI/MFM/RLL support
378#
379CONFIG_IDE=m 355CONFIG_IDE=m
380CONFIG_IDE_MAX_HWIFS=4 356CONFIG_IDE_MAX_HWIFS=4
381CONFIG_BLK_DEV_IDE=m 357CONFIG_BLK_DEV_IDE=m
@@ -391,14 +367,15 @@ CONFIG_BLK_DEV_IDECD=m
391# CONFIG_BLK_DEV_IDETAPE is not set 367# CONFIG_BLK_DEV_IDETAPE is not set
392# CONFIG_BLK_DEV_IDEFLOPPY is not set 368# CONFIG_BLK_DEV_IDEFLOPPY is not set
393# CONFIG_IDE_TASK_IOCTL is not set 369# CONFIG_IDE_TASK_IOCTL is not set
370CONFIG_IDE_PROC_FS=y
394 371
395# 372#
396# IDE chipset support/bugfixes 373# IDE chipset support/bugfixes
397# 374#
398CONFIG_IDE_GENERIC=m 375CONFIG_IDE_GENERIC=m
376# CONFIG_IDEPCI_PCIBUS_ORDER is not set
399# CONFIG_IDE_ARM is not set 377# CONFIG_IDE_ARM is not set
400# CONFIG_BLK_DEV_IDEDMA is not set 378# CONFIG_BLK_DEV_IDEDMA is not set
401# CONFIG_IDEDMA_AUTO is not set
402# CONFIG_BLK_DEV_HD is not set 379# CONFIG_BLK_DEV_HD is not set
403 380
404# 381#
@@ -406,74 +383,26 @@ CONFIG_IDE_GENERIC=m
406# 383#
407# CONFIG_RAID_ATTRS is not set 384# CONFIG_RAID_ATTRS is not set
408# CONFIG_SCSI is not set 385# CONFIG_SCSI is not set
386# CONFIG_SCSI_DMA is not set
409# CONFIG_SCSI_NETLINK is not set 387# CONFIG_SCSI_NETLINK is not set
410
411#
412# Serial ATA (prod) and Parallel ATA (experimental) drivers
413#
414
415#
416# Multi-device support (RAID and LVM)
417#
418# CONFIG_MD is not set 388# CONFIG_MD is not set
419
420#
421# Fusion MPT device support
422#
423# CONFIG_FUSION is not set
424
425#
426# IEEE 1394 (FireWire) support
427#
428
429#
430# I2O device support
431#
432
433#
434# Network device support
435#
436CONFIG_NETDEVICES=y 389CONFIG_NETDEVICES=y
390# CONFIG_NETDEVICES_MULTIQUEUE is not set
437# CONFIG_DUMMY is not set 391# CONFIG_DUMMY is not set
438# CONFIG_BONDING is not set 392# CONFIG_BONDING is not set
393# CONFIG_MACVLAN is not set
439# CONFIG_EQUALIZER is not set 394# CONFIG_EQUALIZER is not set
440# CONFIG_TUN is not set 395# CONFIG_TUN is not set
441
442#
443# PHY device support
444#
445
446#
447# Ethernet (10 or 100Mbit)
448#
449# CONFIG_NET_ETHERNET is not set 396# CONFIG_NET_ETHERNET is not set
450CONFIG_NE2000=y 397CONFIG_NETDEV_1000=y
451 398CONFIG_NETDEV_10000=y
452#
453# Ethernet (1000 Mbit)
454#
455
456#
457# Ethernet (10000 Mbit)
458#
459 399
460# 400#
461# Token Ring devices 401# Wireless LAN
462#
463
464#
465# Wireless LAN (non-hamradio)
466#
467# CONFIG_NET_RADIO is not set
468
469#
470# PCMCIA network device support
471# 402#
403# CONFIG_WLAN_PRE80211 is not set
404# CONFIG_WLAN_80211 is not set
472# CONFIG_NET_PCMCIA is not set 405# CONFIG_NET_PCMCIA is not set
473
474#
475# Wan interfaces
476#
477# CONFIG_WAN is not set 406# CONFIG_WAN is not set
478# CONFIG_PPP is not set 407# CONFIG_PPP is not set
479# CONFIG_SLIP is not set 408# CONFIG_SLIP is not set
@@ -481,15 +410,7 @@ CONFIG_NE2000=y
481# CONFIG_NETCONSOLE is not set 410# CONFIG_NETCONSOLE is not set
482# CONFIG_NETPOLL is not set 411# CONFIG_NETPOLL is not set
483# CONFIG_NET_POLL_CONTROLLER is not set 412# CONFIG_NET_POLL_CONTROLLER is not set
484
485#
486# ISDN subsystem
487#
488# CONFIG_ISDN is not set 413# CONFIG_ISDN is not set
489
490#
491# Telephony Support
492#
493# CONFIG_PHONE is not set 414# CONFIG_PHONE is not set
494 415
495# 416#
@@ -497,6 +418,7 @@ CONFIG_NE2000=y
497# 418#
498CONFIG_INPUT=y 419CONFIG_INPUT=y
499# CONFIG_INPUT_FF_MEMLESS is not set 420# CONFIG_INPUT_FF_MEMLESS is not set
421# CONFIG_INPUT_POLLDEV is not set
500 422
501# 423#
502# Userland interfaces 424# Userland interfaces
@@ -516,6 +438,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
516# CONFIG_INPUT_KEYBOARD is not set 438# CONFIG_INPUT_KEYBOARD is not set
517# CONFIG_INPUT_MOUSE is not set 439# CONFIG_INPUT_MOUSE is not set
518# CONFIG_INPUT_JOYSTICK is not set 440# CONFIG_INPUT_JOYSTICK is not set
441# CONFIG_INPUT_TABLET is not set
519# CONFIG_INPUT_TOUCHSCREEN is not set 442# CONFIG_INPUT_TOUCHSCREEN is not set
520# CONFIG_INPUT_MISC is not set 443# CONFIG_INPUT_MISC is not set
521 444
@@ -550,41 +473,20 @@ CONFIG_SERIAL_M32R_SIO_CONSOLE=y
550CONFIG_UNIX98_PTYS=y 473CONFIG_UNIX98_PTYS=y
551CONFIG_LEGACY_PTYS=y 474CONFIG_LEGACY_PTYS=y
552CONFIG_LEGACY_PTY_COUNT=256 475CONFIG_LEGACY_PTY_COUNT=256
553
554#
555# IPMI
556#
557# CONFIG_IPMI_HANDLER is not set 476# CONFIG_IPMI_HANDLER is not set
558
559#
560# Watchdog Cards
561#
562# CONFIG_WATCHDOG is not set 477# CONFIG_WATCHDOG is not set
563CONFIG_HW_RANDOM=y 478CONFIG_HW_RANDOM=y
564# CONFIG_RTC is not set 479# CONFIG_RTC is not set
565# CONFIG_DTLK is not set
566# CONFIG_R3964 is not set 480# CONFIG_R3964 is not set
567 481
568# 482#
569# Ftape, the floppy tape device driver
570#
571
572#
573# PCMCIA character devices 483# PCMCIA character devices
574# 484#
575# CONFIG_SYNCLINK_CS is not set 485# CONFIG_SYNCLINK_CS is not set
576# CONFIG_CARDMAN_4000 is not set 486# CONFIG_CARDMAN_4000 is not set
577# CONFIG_CARDMAN_4040 is not set 487# CONFIG_CARDMAN_4040 is not set
578# CONFIG_RAW_DRIVER is not set 488# CONFIG_RAW_DRIVER is not set
579
580#
581# TPM devices
582#
583# CONFIG_TCG_TPM is not set 489# CONFIG_TCG_TPM is not set
584
585#
586# I2C support
587#
588# CONFIG_I2C is not set 490# CONFIG_I2C is not set
589 491
590# 492#
@@ -592,47 +494,56 @@ CONFIG_HW_RANDOM=y
592# 494#
593# CONFIG_SPI is not set 495# CONFIG_SPI is not set
594# CONFIG_SPI_MASTER is not set 496# CONFIG_SPI_MASTER is not set
595
596#
597# Dallas's 1-wire bus
598#
599# CONFIG_W1 is not set 497# CONFIG_W1 is not set
600 498# CONFIG_POWER_SUPPLY is not set
601#
602# Hardware Monitoring support
603#
604CONFIG_HWMON=y 499CONFIG_HWMON=y
605# CONFIG_HWMON_VID is not set 500# CONFIG_HWMON_VID is not set
606# CONFIG_SENSORS_ABITUGURU is not set 501# CONFIG_SENSORS_ABITUGURU is not set
502# CONFIG_SENSORS_ABITUGURU3 is not set
607# CONFIG_SENSORS_F71805F is not set 503# CONFIG_SENSORS_F71805F is not set
504# CONFIG_SENSORS_IT87 is not set
505# CONFIG_SENSORS_PC87360 is not set
506# CONFIG_SENSORS_PC87427 is not set
507# CONFIG_SENSORS_SMSC47M1 is not set
508# CONFIG_SENSORS_SMSC47B397 is not set
608# CONFIG_SENSORS_VT1211 is not set 509# CONFIG_SENSORS_VT1211 is not set
510# CONFIG_SENSORS_W83627HF is not set
511# CONFIG_SENSORS_W83627EHF is not set
609# CONFIG_HWMON_DEBUG_CHIP is not set 512# CONFIG_HWMON_DEBUG_CHIP is not set
610 513
611# 514#
612# Multimedia devices 515# Multifunction device drivers
613# 516#
614# CONFIG_VIDEO_DEV is not set 517# CONFIG_MFD_SM501 is not set
615 518
616# 519#
617# Digital Video Broadcasting Devices 520# Multimedia devices
618# 521#
619# CONFIG_DVB is not set 522# CONFIG_VIDEO_DEV is not set
523# CONFIG_DVB_CORE is not set
524CONFIG_DAB=y
620 525
621# 526#
622# Graphics support 527# Graphics support
623# 528#
624CONFIG_FIRMWARE_EDID=y
625# CONFIG_FB is not set
626# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 529# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
627 530
628# 531#
629# Sound 532# Display device support
630# 533#
631# CONFIG_SOUND is not set 534# CONFIG_DISPLAY_SUPPORT is not set
535# CONFIG_VGASTATE is not set
536CONFIG_VIDEO_OUTPUT_CONTROL=m
537# CONFIG_FB is not set
632 538
633# 539#
634# USB support 540# Sound
635# 541#
542# CONFIG_SOUND is not set
543CONFIG_HID_SUPPORT=y
544CONFIG_HID=y
545# CONFIG_HID_DEBUG is not set
546CONFIG_USB_SUPPORT=y
636# CONFIG_USB_ARCH_HAS_HCD is not set 547# CONFIG_USB_ARCH_HAS_HCD is not set
637# CONFIG_USB_ARCH_HAS_OHCI is not set 548# CONFIG_USB_ARCH_HAS_OHCI is not set
638# CONFIG_USB_ARCH_HAS_EHCI is not set 549# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -645,50 +556,18 @@ CONFIG_FIRMWARE_EDID=y
645# USB Gadget Support 556# USB Gadget Support
646# 557#
647# CONFIG_USB_GADGET is not set 558# CONFIG_USB_GADGET is not set
648
649#
650# MMC/SD Card support
651#
652# CONFIG_MMC is not set 559# CONFIG_MMC is not set
653
654#
655# LED devices
656#
657# CONFIG_NEW_LEDS is not set 560# CONFIG_NEW_LEDS is not set
658 561
659# 562#
660# LED drivers
661#
662
663#
664# LED Triggers
665#
666
667#
668# InfiniBand support
669#
670
671#
672# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
673#
674
675#
676# Real Time Clock 563# Real Time Clock
677# 564#
678# CONFIG_RTC_CLASS is not set 565# CONFIG_RTC_CLASS is not set
679 566
680# 567#
681# DMA Engine support 568# Userspace I/O
682#
683# CONFIG_DMA_ENGINE is not set
684
685#
686# DMA Clients
687#
688
689#
690# DMA Devices
691# 569#
570# CONFIG_UIO is not set
692 571
693# 572#
694# File systems 573# File systems
@@ -761,9 +640,6 @@ CONFIG_RAMFS=y
761# CONFIG_BEFS_FS is not set 640# CONFIG_BEFS_FS is not set
762# CONFIG_BFS_FS is not set 641# CONFIG_BFS_FS is not set
763# CONFIG_EFS_FS is not set 642# CONFIG_EFS_FS is not set
764CONFIG_JFFS_FS=y
765CONFIG_JFFS_FS_VERBOSE=0
766CONFIG_JFFS_PROC_FS=y
767CONFIG_JFFS2_FS=y 643CONFIG_JFFS2_FS=y
768CONFIG_JFFS2_FS_DEBUG=0 644CONFIG_JFFS2_FS_DEBUG=0
769CONFIG_JFFS2_FS_WRITEBUFFER=y 645CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -794,6 +670,7 @@ CONFIG_LOCKD=y
794CONFIG_LOCKD_V4=y 670CONFIG_LOCKD_V4=y
795CONFIG_NFS_COMMON=y 671CONFIG_NFS_COMMON=y
796CONFIG_SUNRPC=y 672CONFIG_SUNRPC=y
673# CONFIG_SUNRPC_BIND34 is not set
797# CONFIG_RPCSEC_GSS_KRB5 is not set 674# CONFIG_RPCSEC_GSS_KRB5 is not set
798# CONFIG_RPCSEC_GSS_SPKM3 is not set 675# CONFIG_RPCSEC_GSS_SPKM3 is not set
799# CONFIG_SMB_FS is not set 676# CONFIG_SMB_FS is not set
@@ -801,7 +678,6 @@ CONFIG_SUNRPC=y
801# CONFIG_NCP_FS is not set 678# CONFIG_NCP_FS is not set
802# CONFIG_CODA_FS is not set 679# CONFIG_CODA_FS is not set
803# CONFIG_AFS_FS is not set 680# CONFIG_AFS_FS is not set
804# CONFIG_9P_FS is not set
805 681
806# 682#
807# Partition Types 683# Partition Types
@@ -854,6 +730,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
854# CONFIG_NLS_UTF8 is not set 730# CONFIG_NLS_UTF8 is not set
855 731
856# 732#
733# Distributed Lock Manager
734#
735# CONFIG_DLM is not set
736
737#
857# Profiling support 738# Profiling support
858# 739#
859# CONFIG_PROFILING is not set 740# CONFIG_PROFILING is not set
@@ -865,31 +746,29 @@ CONFIG_NLS_DEFAULT="iso8859-1"
865CONFIG_ENABLE_MUST_CHECK=y 746CONFIG_ENABLE_MUST_CHECK=y
866# CONFIG_MAGIC_SYSRQ is not set 747# CONFIG_MAGIC_SYSRQ is not set
867# CONFIG_UNUSED_SYMBOLS is not set 748# CONFIG_UNUSED_SYMBOLS is not set
749# CONFIG_DEBUG_FS is not set
750# CONFIG_HEADERS_CHECK is not set
868# CONFIG_DEBUG_KERNEL is not set 751# CONFIG_DEBUG_KERNEL is not set
869CONFIG_LOG_BUF_SHIFT=15
870# CONFIG_DEBUG_BUGVERBOSE is not set 752# CONFIG_DEBUG_BUGVERBOSE is not set
871# CONFIG_DEBUG_FS is not set
872# CONFIG_FRAME_POINTER is not set 753# CONFIG_FRAME_POINTER is not set
873# CONFIG_UNWIND_INFO is not set
874# CONFIG_HEADERS_CHECK is not set
875 754
876# 755#
877# Security options 756# Security options
878# 757#
879# CONFIG_KEYS is not set 758# CONFIG_KEYS is not set
880# CONFIG_SECURITY is not set 759# CONFIG_SECURITY is not set
881
882#
883# Cryptographic options
884#
885# CONFIG_CRYPTO is not set 760# CONFIG_CRYPTO is not set
886 761
887# 762#
888# Library routines 763# Library routines
889# 764#
765CONFIG_BITREVERSE=y
890# CONFIG_CRC_CCITT is not set 766# CONFIG_CRC_CCITT is not set
891# CONFIG_CRC16 is not set 767# CONFIG_CRC16 is not set
768# CONFIG_CRC_ITU_T is not set
892CONFIG_CRC32=y 769CONFIG_CRC32=y
770# CONFIG_CRC7 is not set
893# CONFIG_LIBCRC32C is not set 771# CONFIG_LIBCRC32C is not set
894CONFIG_ZLIB_INFLATE=y 772CONFIG_ZLIB_INFLATE=y
895CONFIG_ZLIB_DEFLATE=y 773CONFIG_ZLIB_DEFLATE=y
774CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/mappi/defconfig.up b/arch/m32r/configs/mappi.up_defconfig
index 5ba00603c1..114a6c9b60 100644
--- a/arch/m32r/mappi/defconfig.up
+++ b/arch/m32r/configs/mappi.up_defconfig
@@ -1,12 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.23-rc1
4# Wed Dec 13 17:51:20 2006 4# Wed Aug 1 17:22:35 2007
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
8CONFIG_GENERIC_HARDIRQS=y 9CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 14
12# 15#
@@ -24,16 +27,18 @@ CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y 27CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SWAP=y 28CONFIG_SWAP=y
26CONFIG_SYSVIPC=y 29CONFIG_SYSVIPC=y
27# CONFIG_IPC_NS is not set 30CONFIG_SYSVIPC_SYSCTL=y
28# CONFIG_POSIX_MQUEUE is not set 31# CONFIG_POSIX_MQUEUE is not set
29# CONFIG_BSD_PROCESS_ACCT is not set 32# CONFIG_BSD_PROCESS_ACCT is not set
30# CONFIG_TASKSTATS is not set 33# CONFIG_TASKSTATS is not set
31# CONFIG_UTS_NS is not set 34# CONFIG_USER_NS is not set
32# CONFIG_AUDIT is not set 35# CONFIG_AUDIT is not set
33CONFIG_IKCONFIG=y 36CONFIG_IKCONFIG=y
34CONFIG_IKCONFIG_PROC=y 37CONFIG_IKCONFIG_PROC=y
38CONFIG_LOG_BUF_SHIFT=14
35CONFIG_SYSFS_DEPRECATED=y 39CONFIG_SYSFS_DEPRECATED=y
36# CONFIG_RELAY is not set 40# CONFIG_RELAY is not set
41CONFIG_BLK_DEV_INITRD=y
37CONFIG_INITRAMFS_SOURCE="" 42CONFIG_INITRAMFS_SOURCE=""
38# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
39CONFIG_SYSCTL=y 44CONFIG_SYSCTL=y
@@ -46,29 +51,29 @@ CONFIG_BUG=y
46CONFIG_ELF_CORE=y 51CONFIG_ELF_CORE=y
47CONFIG_BASE_FULL=y 52CONFIG_BASE_FULL=y
48# CONFIG_FUTEX is not set 53# CONFIG_FUTEX is not set
54CONFIG_ANON_INODES=y
49# CONFIG_EPOLL is not set 55# CONFIG_EPOLL is not set
56CONFIG_SIGNALFD=y
57CONFIG_TIMERFD=y
58CONFIG_EVENTFD=y
50CONFIG_SHMEM=y 59CONFIG_SHMEM=y
51CONFIG_SLAB=y
52CONFIG_VM_EVENT_COUNTERS=y 60CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_SLAB=y
62# CONFIG_SLUB is not set
63# CONFIG_SLOB is not set
53# CONFIG_TINY_SHMEM is not set 64# CONFIG_TINY_SHMEM is not set
54CONFIG_BASE_SMALL=0 65CONFIG_BASE_SMALL=0
55# CONFIG_SLOB is not set
56
57#
58# Loadable module support
59#
60CONFIG_MODULES=y 66CONFIG_MODULES=y
61CONFIG_MODULE_UNLOAD=y 67CONFIG_MODULE_UNLOAD=y
62# CONFIG_MODULE_FORCE_UNLOAD is not set 68# CONFIG_MODULE_FORCE_UNLOAD is not set
63# CONFIG_MODVERSIONS is not set 69# CONFIG_MODVERSIONS is not set
64# CONFIG_MODULE_SRCVERSION_ALL is not set 70# CONFIG_MODULE_SRCVERSION_ALL is not set
65CONFIG_KMOD=y 71CONFIG_KMOD=y
66
67#
68# Block layer
69#
70CONFIG_BLOCK=y 72CONFIG_BLOCK=y
73# CONFIG_LBD is not set
71# CONFIG_BLK_DEV_IO_TRACE is not set 74# CONFIG_BLK_DEV_IO_TRACE is not set
75# CONFIG_LSF is not set
76# CONFIG_BLK_DEV_BSG is not set
72 77
73# 78#
74# IO Schedulers 79# IO Schedulers
@@ -121,13 +126,19 @@ CONFIG_NEED_MULTIPLE_NODES=y
121# CONFIG_SPARSEMEM_STATIC is not set 126# CONFIG_SPARSEMEM_STATIC is not set
122CONFIG_SPLIT_PTLOCK_CPUS=4 127CONFIG_SPLIT_PTLOCK_CPUS=4
123# CONFIG_RESOURCES_64BIT is not set 128# CONFIG_RESOURCES_64BIT is not set
129CONFIG_ZONE_DMA_FLAG=1
130CONFIG_BOUNCE=y
131CONFIG_VIRT_TO_BUS=y
124CONFIG_IRAM_START=0x00f00000 132CONFIG_IRAM_START=0x00f00000
125CONFIG_IRAM_SIZE=0x00080000 133CONFIG_IRAM_SIZE=0x00080000
126CONFIG_RWSEM_GENERIC_SPINLOCK=y 134CONFIG_RWSEM_GENERIC_SPINLOCK=y
127# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 135# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
136# CONFIG_ARCH_HAS_ILOG2_U32 is not set
137# CONFIG_ARCH_HAS_ILOG2_U64 is not set
128CONFIG_GENERIC_FIND_NEXT_BIT=y 138CONFIG_GENERIC_FIND_NEXT_BIT=y
129CONFIG_GENERIC_HWEIGHT=y 139CONFIG_GENERIC_HWEIGHT=y
130CONFIG_GENERIC_CALIBRATE_DELAY=y 140CONFIG_GENERIC_CALIBRATE_DELAY=y
141CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
131CONFIG_PREEMPT=y 142CONFIG_PREEMPT=y
132# CONFIG_SMP is not set 143# CONFIG_SMP is not set
133CONFIG_NODES_SHIFT=1 144CONFIG_NODES_SHIFT=1
@@ -135,6 +146,7 @@ CONFIG_NODES_SHIFT=1
135# 146#
136# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 147# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
137# 148#
149# CONFIG_ARCH_SUPPORTS_MSI is not set
138# CONFIG_ISA is not set 150# CONFIG_ISA is not set
139 151
140# 152#
@@ -153,10 +165,6 @@ CONFIG_M32R_PCC=y
153CONFIG_PCCARD_NONSTATIC=y 165CONFIG_PCCARD_NONSTATIC=y
154 166
155# 167#
156# PCI Hotplug Support
157#
158
159#
160# Executable file formats 168# Executable file formats
161# 169#
162CONFIG_BINFMT_ELF=y 170CONFIG_BINFMT_ELF=y
@@ -170,12 +178,12 @@ CONFIG_NET=y
170# 178#
171# Networking options 179# Networking options
172# 180#
173# CONFIG_NETDEBUG is not set
174# CONFIG_PACKET is not set 181# CONFIG_PACKET is not set
175CONFIG_UNIX=y 182CONFIG_UNIX=y
176CONFIG_XFRM=y 183CONFIG_XFRM=y
177# CONFIG_XFRM_USER is not set 184# CONFIG_XFRM_USER is not set
178# CONFIG_XFRM_SUB_POLICY is not set 185# CONFIG_XFRM_SUB_POLICY is not set
186# CONFIG_XFRM_MIGRATE is not set
179# CONFIG_NET_KEY is not set 187# CONFIG_NET_KEY is not set
180CONFIG_INET=y 188CONFIG_INET=y
181# CONFIG_IP_MULTICAST is not set 189# CONFIG_IP_MULTICAST is not set
@@ -208,20 +216,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
208# CONFIG_INET6_TUNNEL is not set 216# CONFIG_INET6_TUNNEL is not set
209# CONFIG_NETWORK_SECMARK is not set 217# CONFIG_NETWORK_SECMARK is not set
210# CONFIG_NETFILTER is not set 218# CONFIG_NETFILTER is not set
211
212#
213# DCCP Configuration (EXPERIMENTAL)
214#
215# CONFIG_IP_DCCP is not set 219# CONFIG_IP_DCCP is not set
216
217#
218# SCTP Configuration (EXPERIMENTAL)
219#
220# CONFIG_IP_SCTP is not set 220# CONFIG_IP_SCTP is not set
221
222#
223# TIPC Configuration (EXPERIMENTAL)
224#
225# CONFIG_TIPC is not set 221# CONFIG_TIPC is not set
226# CONFIG_ATM is not set 222# CONFIG_ATM is not set
227# CONFIG_BRIDGE is not set 223# CONFIG_BRIDGE is not set
@@ -247,7 +243,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
247# CONFIG_HAMRADIO is not set 243# CONFIG_HAMRADIO is not set
248# CONFIG_IRDA is not set 244# CONFIG_IRDA is not set
249# CONFIG_BT is not set 245# CONFIG_BT is not set
246# CONFIG_AF_RXRPC is not set
247
248#
249# Wireless
250#
251# CONFIG_CFG80211 is not set
252# CONFIG_WIRELESS_EXT is not set
253# CONFIG_MAC80211 is not set
250# CONFIG_IEEE80211 is not set 254# CONFIG_IEEE80211 is not set
255# CONFIG_RFKILL is not set
256# CONFIG_NET_9P is not set
251 257
252# 258#
253# Device Drivers 259# Device Drivers
@@ -260,15 +266,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
260CONFIG_PREVENT_FIRMWARE_BUILD=y 266CONFIG_PREVENT_FIRMWARE_BUILD=y
261CONFIG_FW_LOADER=y 267CONFIG_FW_LOADER=y
262# CONFIG_SYS_HYPERVISOR is not set 268# CONFIG_SYS_HYPERVISOR is not set
263
264#
265# Connector - unified userspace <-> kernelspace linker
266#
267# CONFIG_CONNECTOR is not set 269# CONFIG_CONNECTOR is not set
268
269#
270# Memory Technology Devices (MTD)
271#
272CONFIG_MTD=y 270CONFIG_MTD=y
273# CONFIG_MTD_DEBUG is not set 271# CONFIG_MTD_DEBUG is not set
274# CONFIG_MTD_CONCAT is not set 272# CONFIG_MTD_CONCAT is not set
@@ -283,6 +281,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
283# User Modules And Translation Layers 281# User Modules And Translation Layers
284# 282#
285CONFIG_MTD_CHAR=y 283CONFIG_MTD_CHAR=y
284CONFIG_MTD_BLKDEVS=y
286CONFIG_MTD_BLOCK=y 285CONFIG_MTD_BLOCK=y
287# CONFIG_FTL is not set 286# CONFIG_FTL is not set
288# CONFIG_NFTL is not set 287# CONFIG_NFTL is not set
@@ -308,7 +307,6 @@ CONFIG_MTD_CFI_I2=y
308# CONFIG_MTD_RAM is not set 307# CONFIG_MTD_RAM is not set
309# CONFIG_MTD_ROM is not set 308# CONFIG_MTD_ROM is not set
310# CONFIG_MTD_ABSENT is not set 309# CONFIG_MTD_ABSENT is not set
311# CONFIG_MTD_OBSOLETE_CHIPS is not set
312 310
313# 311#
314# Mapping drivers for chip access 312# Mapping drivers for chip access
@@ -330,29 +328,15 @@ CONFIG_MTD_CFI_I2=y
330# CONFIG_MTD_DOC2000 is not set 328# CONFIG_MTD_DOC2000 is not set
331# CONFIG_MTD_DOC2001 is not set 329# CONFIG_MTD_DOC2001 is not set
332# CONFIG_MTD_DOC2001PLUS is not set 330# CONFIG_MTD_DOC2001PLUS is not set
333
334#
335# NAND Flash Device Drivers
336#
337# CONFIG_MTD_NAND is not set 331# CONFIG_MTD_NAND is not set
338
339#
340# OneNAND Flash Device Drivers
341#
342# CONFIG_MTD_ONENAND is not set 332# CONFIG_MTD_ONENAND is not set
343 333
344# 334#
345# Parallel port support 335# UBI - Unsorted block images
346# 336#
337# CONFIG_MTD_UBI is not set
347# CONFIG_PARPORT is not set 338# CONFIG_PARPORT is not set
348 339CONFIG_BLK_DEV=y
349#
350# Plug and Play support
351#
352
353#
354# Block devices
355#
356# CONFIG_BLK_DEV_COW_COMMON is not set 340# CONFIG_BLK_DEV_COW_COMMON is not set
357CONFIG_BLK_DEV_LOOP=y 341CONFIG_BLK_DEV_LOOP=y
358# CONFIG_BLK_DEV_CRYPTOLOOP is not set 342# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -361,18 +345,10 @@ CONFIG_BLK_DEV_RAM=y
361CONFIG_BLK_DEV_RAM_COUNT=16 345CONFIG_BLK_DEV_RAM_COUNT=16
362CONFIG_BLK_DEV_RAM_SIZE=4096 346CONFIG_BLK_DEV_RAM_SIZE=4096
363CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 347CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
364CONFIG_BLK_DEV_INITRD=y
365# CONFIG_CDROM_PKTCDVD is not set 348# CONFIG_CDROM_PKTCDVD is not set
366# CONFIG_ATA_OVER_ETH is not set 349# CONFIG_ATA_OVER_ETH is not set
367 350CONFIG_MISC_DEVICES=y
368# 351# CONFIG_EEPROM_93CX6 is not set
369# Misc devices
370#
371# CONFIG_TIFM_CORE is not set
372
373#
374# ATA/ATAPI/MFM/RLL support
375#
376CONFIG_IDE=m 352CONFIG_IDE=m
377CONFIG_IDE_MAX_HWIFS=4 353CONFIG_IDE_MAX_HWIFS=4
378CONFIG_BLK_DEV_IDE=m 354CONFIG_BLK_DEV_IDE=m
@@ -388,14 +364,15 @@ CONFIG_BLK_DEV_IDECD=m
388# CONFIG_BLK_DEV_IDETAPE is not set 364# CONFIG_BLK_DEV_IDETAPE is not set
389# CONFIG_BLK_DEV_IDEFLOPPY is not set 365# CONFIG_BLK_DEV_IDEFLOPPY is not set
390# CONFIG_IDE_TASK_IOCTL is not set 366# CONFIG_IDE_TASK_IOCTL is not set
367CONFIG_IDE_PROC_FS=y
391 368
392# 369#
393# IDE chipset support/bugfixes 370# IDE chipset support/bugfixes
394# 371#
395CONFIG_IDE_GENERIC=m 372CONFIG_IDE_GENERIC=m
373# CONFIG_IDEPCI_PCIBUS_ORDER is not set
396# CONFIG_IDE_ARM is not set 374# CONFIG_IDE_ARM is not set
397# CONFIG_BLK_DEV_IDEDMA is not set 375# CONFIG_BLK_DEV_IDEDMA is not set
398# CONFIG_IDEDMA_AUTO is not set
399# CONFIG_BLK_DEV_HD is not set 376# CONFIG_BLK_DEV_HD is not set
400 377
401# 378#
@@ -403,74 +380,26 @@ CONFIG_IDE_GENERIC=m
403# 380#
404# CONFIG_RAID_ATTRS is not set 381# CONFIG_RAID_ATTRS is not set
405# CONFIG_SCSI is not set 382# CONFIG_SCSI is not set
383# CONFIG_SCSI_DMA is not set
406# CONFIG_SCSI_NETLINK is not set 384# CONFIG_SCSI_NETLINK is not set
407
408#
409# Serial ATA (prod) and Parallel ATA (experimental) drivers
410#
411
412#
413# Multi-device support (RAID and LVM)
414#
415# CONFIG_MD is not set 385# CONFIG_MD is not set
416
417#
418# Fusion MPT device support
419#
420# CONFIG_FUSION is not set
421
422#
423# IEEE 1394 (FireWire) support
424#
425
426#
427# I2O device support
428#
429
430#
431# Network device support
432#
433CONFIG_NETDEVICES=y 386CONFIG_NETDEVICES=y
387# CONFIG_NETDEVICES_MULTIQUEUE is not set
434# CONFIG_DUMMY is not set 388# CONFIG_DUMMY is not set
435# CONFIG_BONDING is not set 389# CONFIG_BONDING is not set
390# CONFIG_MACVLAN is not set
436# CONFIG_EQUALIZER is not set 391# CONFIG_EQUALIZER is not set
437# CONFIG_TUN is not set 392# CONFIG_TUN is not set
438
439#
440# PHY device support
441#
442
443#
444# Ethernet (10 or 100Mbit)
445#
446# CONFIG_NET_ETHERNET is not set 393# CONFIG_NET_ETHERNET is not set
447CONFIG_NE2000=y 394CONFIG_NETDEV_1000=y
448 395CONFIG_NETDEV_10000=y
449#
450# Ethernet (1000 Mbit)
451#
452
453#
454# Ethernet (10000 Mbit)
455#
456 396
457# 397#
458# Token Ring devices 398# Wireless LAN
459#
460
461#
462# Wireless LAN (non-hamradio)
463#
464# CONFIG_NET_RADIO is not set
465
466#
467# PCMCIA network device support
468# 399#
400# CONFIG_WLAN_PRE80211 is not set
401# CONFIG_WLAN_80211 is not set
469# CONFIG_NET_PCMCIA is not set 402# CONFIG_NET_PCMCIA is not set
470
471#
472# Wan interfaces
473#
474# CONFIG_WAN is not set 403# CONFIG_WAN is not set
475# CONFIG_PPP is not set 404# CONFIG_PPP is not set
476# CONFIG_SLIP is not set 405# CONFIG_SLIP is not set
@@ -478,15 +407,7 @@ CONFIG_NE2000=y
478# CONFIG_NETCONSOLE is not set 407# CONFIG_NETCONSOLE is not set
479# CONFIG_NETPOLL is not set 408# CONFIG_NETPOLL is not set
480# CONFIG_NET_POLL_CONTROLLER is not set 409# CONFIG_NET_POLL_CONTROLLER is not set
481
482#
483# ISDN subsystem
484#
485# CONFIG_ISDN is not set 410# CONFIG_ISDN is not set
486
487#
488# Telephony Support
489#
490# CONFIG_PHONE is not set 411# CONFIG_PHONE is not set
491 412
492# 413#
@@ -494,6 +415,7 @@ CONFIG_NE2000=y
494# 415#
495CONFIG_INPUT=y 416CONFIG_INPUT=y
496# CONFIG_INPUT_FF_MEMLESS is not set 417# CONFIG_INPUT_FF_MEMLESS is not set
418# CONFIG_INPUT_POLLDEV is not set
497 419
498# 420#
499# Userland interfaces 421# Userland interfaces
@@ -513,6 +435,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
513# CONFIG_INPUT_KEYBOARD is not set 435# CONFIG_INPUT_KEYBOARD is not set
514# CONFIG_INPUT_MOUSE is not set 436# CONFIG_INPUT_MOUSE is not set
515# CONFIG_INPUT_JOYSTICK is not set 437# CONFIG_INPUT_JOYSTICK is not set
438# CONFIG_INPUT_TABLET is not set
516# CONFIG_INPUT_TOUCHSCREEN is not set 439# CONFIG_INPUT_TOUCHSCREEN is not set
517# CONFIG_INPUT_MISC is not set 440# CONFIG_INPUT_MISC is not set
518 441
@@ -547,41 +470,20 @@ CONFIG_SERIAL_M32R_SIO_CONSOLE=y
547CONFIG_UNIX98_PTYS=y 470CONFIG_UNIX98_PTYS=y
548CONFIG_LEGACY_PTYS=y 471CONFIG_LEGACY_PTYS=y
549CONFIG_LEGACY_PTY_COUNT=256 472CONFIG_LEGACY_PTY_COUNT=256
550
551#
552# IPMI
553#
554# CONFIG_IPMI_HANDLER is not set 473# CONFIG_IPMI_HANDLER is not set
555
556#
557# Watchdog Cards
558#
559# CONFIG_WATCHDOG is not set 474# CONFIG_WATCHDOG is not set
560CONFIG_HW_RANDOM=y 475CONFIG_HW_RANDOM=y
561# CONFIG_RTC is not set 476# CONFIG_RTC is not set
562# CONFIG_DTLK is not set
563# CONFIG_R3964 is not set 477# CONFIG_R3964 is not set
564 478
565# 479#
566# Ftape, the floppy tape device driver
567#
568
569#
570# PCMCIA character devices 480# PCMCIA character devices
571# 481#
572# CONFIG_SYNCLINK_CS is not set 482# CONFIG_SYNCLINK_CS is not set
573# CONFIG_CARDMAN_4000 is not set 483# CONFIG_CARDMAN_4000 is not set
574# CONFIG_CARDMAN_4040 is not set 484# CONFIG_CARDMAN_4040 is not set
575# CONFIG_RAW_DRIVER is not set 485# CONFIG_RAW_DRIVER is not set
576
577#
578# TPM devices
579#
580# CONFIG_TCG_TPM is not set 486# CONFIG_TCG_TPM is not set
581
582#
583# I2C support
584#
585# CONFIG_I2C is not set 487# CONFIG_I2C is not set
586 488
587# 489#
@@ -589,47 +491,56 @@ CONFIG_HW_RANDOM=y
589# 491#
590# CONFIG_SPI is not set 492# CONFIG_SPI is not set
591# CONFIG_SPI_MASTER is not set 493# CONFIG_SPI_MASTER is not set
592
593#
594# Dallas's 1-wire bus
595#
596# CONFIG_W1 is not set 494# CONFIG_W1 is not set
597 495# CONFIG_POWER_SUPPLY is not set
598#
599# Hardware Monitoring support
600#
601CONFIG_HWMON=y 496CONFIG_HWMON=y
602# CONFIG_HWMON_VID is not set 497# CONFIG_HWMON_VID is not set
603# CONFIG_SENSORS_ABITUGURU is not set 498# CONFIG_SENSORS_ABITUGURU is not set
499# CONFIG_SENSORS_ABITUGURU3 is not set
604# CONFIG_SENSORS_F71805F is not set 500# CONFIG_SENSORS_F71805F is not set
501# CONFIG_SENSORS_IT87 is not set
502# CONFIG_SENSORS_PC87360 is not set
503# CONFIG_SENSORS_PC87427 is not set
504# CONFIG_SENSORS_SMSC47M1 is not set
505# CONFIG_SENSORS_SMSC47B397 is not set
605# CONFIG_SENSORS_VT1211 is not set 506# CONFIG_SENSORS_VT1211 is not set
507# CONFIG_SENSORS_W83627HF is not set
508# CONFIG_SENSORS_W83627EHF is not set
606# CONFIG_HWMON_DEBUG_CHIP is not set 509# CONFIG_HWMON_DEBUG_CHIP is not set
607 510
608# 511#
609# Multimedia devices 512# Multifunction device drivers
610# 513#
611# CONFIG_VIDEO_DEV is not set 514# CONFIG_MFD_SM501 is not set
612 515
613# 516#
614# Digital Video Broadcasting Devices 517# Multimedia devices
615# 518#
616# CONFIG_DVB is not set 519# CONFIG_VIDEO_DEV is not set
520# CONFIG_DVB_CORE is not set
521CONFIG_DAB=y
617 522
618# 523#
619# Graphics support 524# Graphics support
620# 525#
621CONFIG_FIRMWARE_EDID=y
622# CONFIG_FB is not set
623# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 526# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
624 527
625# 528#
626# Sound 529# Display device support
627# 530#
628# CONFIG_SOUND is not set 531# CONFIG_DISPLAY_SUPPORT is not set
532# CONFIG_VGASTATE is not set
533CONFIG_VIDEO_OUTPUT_CONTROL=m
534# CONFIG_FB is not set
629 535
630# 536#
631# USB support 537# Sound
632# 538#
539# CONFIG_SOUND is not set
540CONFIG_HID_SUPPORT=y
541CONFIG_HID=y
542# CONFIG_HID_DEBUG is not set
543CONFIG_USB_SUPPORT=y
633# CONFIG_USB_ARCH_HAS_HCD is not set 544# CONFIG_USB_ARCH_HAS_HCD is not set
634# CONFIG_USB_ARCH_HAS_OHCI is not set 545# CONFIG_USB_ARCH_HAS_OHCI is not set
635# CONFIG_USB_ARCH_HAS_EHCI is not set 546# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -642,50 +553,18 @@ CONFIG_FIRMWARE_EDID=y
642# USB Gadget Support 553# USB Gadget Support
643# 554#
644# CONFIG_USB_GADGET is not set 555# CONFIG_USB_GADGET is not set
645
646#
647# MMC/SD Card support
648#
649# CONFIG_MMC is not set 556# CONFIG_MMC is not set
650
651#
652# LED devices
653#
654# CONFIG_NEW_LEDS is not set 557# CONFIG_NEW_LEDS is not set
655 558
656# 559#
657# LED drivers
658#
659
660#
661# LED Triggers
662#
663
664#
665# InfiniBand support
666#
667
668#
669# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
670#
671
672#
673# Real Time Clock 560# Real Time Clock
674# 561#
675# CONFIG_RTC_CLASS is not set 562# CONFIG_RTC_CLASS is not set
676 563
677# 564#
678# DMA Engine support 565# Userspace I/O
679#
680# CONFIG_DMA_ENGINE is not set
681
682#
683# DMA Clients
684#
685
686#
687# DMA Devices
688# 566#
567# CONFIG_UIO is not set
689 568
690# 569#
691# File systems 570# File systems
@@ -758,9 +637,6 @@ CONFIG_RAMFS=y
758# CONFIG_BEFS_FS is not set 637# CONFIG_BEFS_FS is not set
759# CONFIG_BFS_FS is not set 638# CONFIG_BFS_FS is not set
760# CONFIG_EFS_FS is not set 639# CONFIG_EFS_FS is not set
761CONFIG_JFFS_FS=y
762CONFIG_JFFS_FS_VERBOSE=0
763CONFIG_JFFS_PROC_FS=y
764CONFIG_JFFS2_FS=y 640CONFIG_JFFS2_FS=y
765CONFIG_JFFS2_FS_DEBUG=0 641CONFIG_JFFS2_FS_DEBUG=0
766CONFIG_JFFS2_FS_WRITEBUFFER=y 642CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -791,6 +667,7 @@ CONFIG_LOCKD=y
791CONFIG_LOCKD_V4=y 667CONFIG_LOCKD_V4=y
792CONFIG_NFS_COMMON=y 668CONFIG_NFS_COMMON=y
793CONFIG_SUNRPC=y 669CONFIG_SUNRPC=y
670# CONFIG_SUNRPC_BIND34 is not set
794# CONFIG_RPCSEC_GSS_KRB5 is not set 671# CONFIG_RPCSEC_GSS_KRB5 is not set
795# CONFIG_RPCSEC_GSS_SPKM3 is not set 672# CONFIG_RPCSEC_GSS_SPKM3 is not set
796# CONFIG_SMB_FS is not set 673# CONFIG_SMB_FS is not set
@@ -798,7 +675,6 @@ CONFIG_SUNRPC=y
798# CONFIG_NCP_FS is not set 675# CONFIG_NCP_FS is not set
799# CONFIG_CODA_FS is not set 676# CONFIG_CODA_FS is not set
800# CONFIG_AFS_FS is not set 677# CONFIG_AFS_FS is not set
801# CONFIG_9P_FS is not set
802 678
803# 679#
804# Partition Types 680# Partition Types
@@ -851,6 +727,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
851# CONFIG_NLS_UTF8 is not set 727# CONFIG_NLS_UTF8 is not set
852 728
853# 729#
730# Distributed Lock Manager
731#
732# CONFIG_DLM is not set
733
734#
854# Profiling support 735# Profiling support
855# 736#
856# CONFIG_PROFILING is not set 737# CONFIG_PROFILING is not set
@@ -862,31 +743,29 @@ CONFIG_NLS_DEFAULT="iso8859-1"
862CONFIG_ENABLE_MUST_CHECK=y 743CONFIG_ENABLE_MUST_CHECK=y
863# CONFIG_MAGIC_SYSRQ is not set 744# CONFIG_MAGIC_SYSRQ is not set
864# CONFIG_UNUSED_SYMBOLS is not set 745# CONFIG_UNUSED_SYMBOLS is not set
746# CONFIG_DEBUG_FS is not set
747# CONFIG_HEADERS_CHECK is not set
865# CONFIG_DEBUG_KERNEL is not set 748# CONFIG_DEBUG_KERNEL is not set
866CONFIG_LOG_BUF_SHIFT=14
867# CONFIG_DEBUG_BUGVERBOSE is not set 749# CONFIG_DEBUG_BUGVERBOSE is not set
868# CONFIG_DEBUG_FS is not set
869# CONFIG_FRAME_POINTER is not set 750# CONFIG_FRAME_POINTER is not set
870# CONFIG_UNWIND_INFO is not set
871# CONFIG_HEADERS_CHECK is not set
872 751
873# 752#
874# Security options 753# Security options
875# 754#
876# CONFIG_KEYS is not set 755# CONFIG_KEYS is not set
877# CONFIG_SECURITY is not set 756# CONFIG_SECURITY is not set
878
879#
880# Cryptographic options
881#
882# CONFIG_CRYPTO is not set 757# CONFIG_CRYPTO is not set
883 758
884# 759#
885# Library routines 760# Library routines
886# 761#
762CONFIG_BITREVERSE=y
887# CONFIG_CRC_CCITT is not set 763# CONFIG_CRC_CCITT is not set
888# CONFIG_CRC16 is not set 764# CONFIG_CRC16 is not set
765# CONFIG_CRC_ITU_T is not set
889CONFIG_CRC32=y 766CONFIG_CRC32=y
767# CONFIG_CRC7 is not set
890# CONFIG_LIBCRC32C is not set 768# CONFIG_LIBCRC32C is not set
891CONFIG_ZLIB_INFLATE=y 769CONFIG_ZLIB_INFLATE=y
892CONFIG_ZLIB_DEFLATE=y 770CONFIG_ZLIB_DEFLATE=y
771CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/mappi2/defconfig.opsp b/arch/m32r/configs/mappi2.opsp_defconfig
index b379ae96e6..54bb6e25d3 100644
--- a/arch/m32r/mappi2/defconfig.opsp
+++ b/arch/m32r/configs/mappi2.opsp_defconfig
@@ -1,12 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.23-rc1
4# Wed Dec 13 19:40:30 2006 4# Wed Aug 1 17:22:36 2007
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
8CONFIG_GENERIC_HARDIRQS=y 9CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 14
12# 15#
@@ -24,18 +27,19 @@ CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y 27CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SWAP=y 28CONFIG_SWAP=y
26CONFIG_SYSVIPC=y 29CONFIG_SYSVIPC=y
27# CONFIG_IPC_NS is not set 30CONFIG_SYSVIPC_SYSCTL=y
28# CONFIG_POSIX_MQUEUE is not set 31# CONFIG_POSIX_MQUEUE is not set
29CONFIG_BSD_PROCESS_ACCT=y 32CONFIG_BSD_PROCESS_ACCT=y
30# CONFIG_BSD_PROCESS_ACCT_V3 is not set 33# CONFIG_BSD_PROCESS_ACCT_V3 is not set
31# CONFIG_TASKSTATS is not set 34# CONFIG_TASKSTATS is not set
32# CONFIG_UTS_NS is not set 35# CONFIG_USER_NS is not set
33# CONFIG_AUDIT is not set 36# CONFIG_AUDIT is not set
34CONFIG_IKCONFIG=y 37CONFIG_IKCONFIG=y
35# CONFIG_IKCONFIG_PROC is not set 38# CONFIG_IKCONFIG_PROC is not set
39CONFIG_LOG_BUF_SHIFT=14
36CONFIG_SYSFS_DEPRECATED=y 40CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set 41# CONFIG_RELAY is not set
38CONFIG_INITRAMFS_SOURCE="" 42# CONFIG_BLK_DEV_INITRD is not set
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SYSCTL=y 44CONFIG_SYSCTL=y
41CONFIG_EMBEDDED=y 45CONFIG_EMBEDDED=y
@@ -47,29 +51,29 @@ CONFIG_BUG=y
47CONFIG_ELF_CORE=y 51CONFIG_ELF_CORE=y
48CONFIG_BASE_FULL=y 52CONFIG_BASE_FULL=y
49# CONFIG_FUTEX is not set 53# CONFIG_FUTEX is not set
54CONFIG_ANON_INODES=y
50# CONFIG_EPOLL is not set 55# CONFIG_EPOLL is not set
56CONFIG_SIGNALFD=y
57CONFIG_TIMERFD=y
58CONFIG_EVENTFD=y
51CONFIG_SHMEM=y 59CONFIG_SHMEM=y
52CONFIG_SLAB=y
53CONFIG_VM_EVENT_COUNTERS=y 60CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_SLAB=y
62# CONFIG_SLUB is not set
63# CONFIG_SLOB is not set
54# CONFIG_TINY_SHMEM is not set 64# CONFIG_TINY_SHMEM is not set
55CONFIG_BASE_SMALL=0 65CONFIG_BASE_SMALL=0
56# CONFIG_SLOB is not set
57
58#
59# Loadable module support
60#
61CONFIG_MODULES=y 66CONFIG_MODULES=y
62CONFIG_MODULE_UNLOAD=y 67CONFIG_MODULE_UNLOAD=y
63# CONFIG_MODULE_FORCE_UNLOAD is not set 68# CONFIG_MODULE_FORCE_UNLOAD is not set
64# CONFIG_MODVERSIONS is not set 69# CONFIG_MODVERSIONS is not set
65# CONFIG_MODULE_SRCVERSION_ALL is not set 70# CONFIG_MODULE_SRCVERSION_ALL is not set
66CONFIG_KMOD=y 71CONFIG_KMOD=y
67
68#
69# Block layer
70#
71CONFIG_BLOCK=y 72CONFIG_BLOCK=y
73# CONFIG_LBD is not set
72# CONFIG_BLK_DEV_IO_TRACE is not set 74# CONFIG_BLK_DEV_IO_TRACE is not set
75# CONFIG_LSF is not set
76# CONFIG_BLK_DEV_BSG is not set
73 77
74# 78#
75# IO Schedulers 79# IO Schedulers
@@ -122,13 +126,19 @@ CONFIG_NEED_MULTIPLE_NODES=y
122# CONFIG_SPARSEMEM_STATIC is not set 126# CONFIG_SPARSEMEM_STATIC is not set
123CONFIG_SPLIT_PTLOCK_CPUS=4 127CONFIG_SPLIT_PTLOCK_CPUS=4
124# CONFIG_RESOURCES_64BIT is not set 128# CONFIG_RESOURCES_64BIT is not set
129CONFIG_ZONE_DMA_FLAG=1
130CONFIG_BOUNCE=y
131CONFIG_VIRT_TO_BUS=y
125CONFIG_IRAM_START=0x00f00000 132CONFIG_IRAM_START=0x00f00000
126CONFIG_IRAM_SIZE=0x00008000 133CONFIG_IRAM_SIZE=0x00008000
127CONFIG_RWSEM_GENERIC_SPINLOCK=y 134CONFIG_RWSEM_GENERIC_SPINLOCK=y
128# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 135# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
136# CONFIG_ARCH_HAS_ILOG2_U32 is not set
137# CONFIG_ARCH_HAS_ILOG2_U64 is not set
129CONFIG_GENERIC_FIND_NEXT_BIT=y 138CONFIG_GENERIC_FIND_NEXT_BIT=y
130CONFIG_GENERIC_HWEIGHT=y 139CONFIG_GENERIC_HWEIGHT=y
131CONFIG_GENERIC_CALIBRATE_DELAY=y 140CONFIG_GENERIC_CALIBRATE_DELAY=y
141CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
132CONFIG_PREEMPT=y 142CONFIG_PREEMPT=y
133# CONFIG_SMP is not set 143# CONFIG_SMP is not set
134CONFIG_NODES_SHIFT=1 144CONFIG_NODES_SHIFT=1
@@ -136,6 +146,7 @@ CONFIG_NODES_SHIFT=1
136# 146#
137# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 147# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
138# 148#
149# CONFIG_ARCH_SUPPORTS_MSI is not set
139# CONFIG_ISA is not set 150# CONFIG_ISA is not set
140 151
141# 152#
@@ -153,10 +164,6 @@ CONFIG_PCMCIA_IOCTL=y
153# CONFIG_M32R_CFC is not set 164# CONFIG_M32R_CFC is not set
154 165
155# 166#
156# PCI Hotplug Support
157#
158
159#
160# Executable file formats 167# Executable file formats
161# 168#
162CONFIG_BINFMT_ELF=y 169CONFIG_BINFMT_ELF=y
@@ -170,13 +177,13 @@ CONFIG_NET=y
170# 177#
171# Networking options 178# Networking options
172# 179#
173# CONFIG_NETDEBUG is not set
174CONFIG_PACKET=y 180CONFIG_PACKET=y
175# CONFIG_PACKET_MMAP is not set 181# CONFIG_PACKET_MMAP is not set
176CONFIG_UNIX=y 182CONFIG_UNIX=y
177CONFIG_XFRM=y 183CONFIG_XFRM=y
178# CONFIG_XFRM_USER is not set 184# CONFIG_XFRM_USER is not set
179# CONFIG_XFRM_SUB_POLICY is not set 185# CONFIG_XFRM_SUB_POLICY is not set
186# CONFIG_XFRM_MIGRATE is not set
180# CONFIG_NET_KEY is not set 187# CONFIG_NET_KEY is not set
181CONFIG_INET=y 188CONFIG_INET=y
182# CONFIG_IP_MULTICAST is not set 189# CONFIG_IP_MULTICAST is not set
@@ -209,20 +216,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
209# CONFIG_INET6_TUNNEL is not set 216# CONFIG_INET6_TUNNEL is not set
210# CONFIG_NETWORK_SECMARK is not set 217# CONFIG_NETWORK_SECMARK is not set
211# CONFIG_NETFILTER is not set 218# CONFIG_NETFILTER is not set
212
213#
214# DCCP Configuration (EXPERIMENTAL)
215#
216# CONFIG_IP_DCCP is not set 219# CONFIG_IP_DCCP is not set
217
218#
219# SCTP Configuration (EXPERIMENTAL)
220#
221# CONFIG_IP_SCTP is not set 220# CONFIG_IP_SCTP is not set
222
223#
224# TIPC Configuration (EXPERIMENTAL)
225#
226# CONFIG_TIPC is not set 221# CONFIG_TIPC is not set
227# CONFIG_ATM is not set 222# CONFIG_ATM is not set
228# CONFIG_BRIDGE is not set 223# CONFIG_BRIDGE is not set
@@ -248,7 +243,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
248# CONFIG_HAMRADIO is not set 243# CONFIG_HAMRADIO is not set
249# CONFIG_IRDA is not set 244# CONFIG_IRDA is not set
250# CONFIG_BT is not set 245# CONFIG_BT is not set
246# CONFIG_AF_RXRPC is not set
247
248#
249# Wireless
250#
251# CONFIG_CFG80211 is not set
252# CONFIG_WIRELESS_EXT is not set
253# CONFIG_MAC80211 is not set
251# CONFIG_IEEE80211 is not set 254# CONFIG_IEEE80211 is not set
255# CONFIG_RFKILL is not set
256# CONFIG_NET_9P is not set
252 257
253# 258#
254# Device Drivers 259# Device Drivers
@@ -261,29 +266,10 @@ CONFIG_STANDALONE=y
261CONFIG_PREVENT_FIRMWARE_BUILD=y 266CONFIG_PREVENT_FIRMWARE_BUILD=y
262CONFIG_FW_LOADER=y 267CONFIG_FW_LOADER=y
263# CONFIG_SYS_HYPERVISOR is not set 268# CONFIG_SYS_HYPERVISOR is not set
264
265#
266# Connector - unified userspace <-> kernelspace linker
267#
268# CONFIG_CONNECTOR is not set 269# CONFIG_CONNECTOR is not set
269
270#
271# Memory Technology Devices (MTD)
272#
273# CONFIG_MTD is not set 270# CONFIG_MTD is not set
274
275#
276# Parallel port support
277#
278# CONFIG_PARPORT is not set 271# CONFIG_PARPORT is not set
279 272CONFIG_BLK_DEV=y
280#
281# Plug and Play support
282#
283
284#
285# Block devices
286#
287# CONFIG_BLK_DEV_COW_COMMON is not set 273# CONFIG_BLK_DEV_COW_COMMON is not set
288CONFIG_BLK_DEV_LOOP=y 274CONFIG_BLK_DEV_LOOP=y
289# CONFIG_BLK_DEV_CRYPTOLOOP is not set 275# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -292,18 +278,10 @@ CONFIG_BLK_DEV_RAM=y
292CONFIG_BLK_DEV_RAM_COUNT=16 278CONFIG_BLK_DEV_RAM_COUNT=16
293CONFIG_BLK_DEV_RAM_SIZE=4096 279CONFIG_BLK_DEV_RAM_SIZE=4096
294CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 280CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
295# CONFIG_BLK_DEV_INITRD is not set
296# CONFIG_CDROM_PKTCDVD is not set 281# CONFIG_CDROM_PKTCDVD is not set
297# CONFIG_ATA_OVER_ETH is not set 282# CONFIG_ATA_OVER_ETH is not set
298 283CONFIG_MISC_DEVICES=y
299# 284# CONFIG_EEPROM_93CX6 is not set
300# Misc devices
301#
302# CONFIG_TIFM_CORE is not set
303
304#
305# ATA/ATAPI/MFM/RLL support
306#
307CONFIG_IDE=y 285CONFIG_IDE=y
308CONFIG_IDE_MAX_HWIFS=4 286CONFIG_IDE_MAX_HWIFS=4
309CONFIG_BLK_DEV_IDE=y 287CONFIG_BLK_DEV_IDE=y
@@ -320,14 +298,15 @@ CONFIG_BLK_DEV_IDECD=m
320# CONFIG_BLK_DEV_IDEFLOPPY is not set 298# CONFIG_BLK_DEV_IDEFLOPPY is not set
321# CONFIG_BLK_DEV_IDESCSI is not set 299# CONFIG_BLK_DEV_IDESCSI is not set
322# CONFIG_IDE_TASK_IOCTL is not set 300# CONFIG_IDE_TASK_IOCTL is not set
301CONFIG_IDE_PROC_FS=y
323 302
324# 303#
325# IDE chipset support/bugfixes 304# IDE chipset support/bugfixes
326# 305#
327CONFIG_IDE_GENERIC=y 306CONFIG_IDE_GENERIC=y
307# CONFIG_IDEPCI_PCIBUS_ORDER is not set
328# CONFIG_IDE_ARM is not set 308# CONFIG_IDE_ARM is not set
329# CONFIG_BLK_DEV_IDEDMA is not set 309# CONFIG_BLK_DEV_IDEDMA is not set
330# CONFIG_IDEDMA_AUTO is not set
331# CONFIG_BLK_DEV_HD is not set 310# CONFIG_BLK_DEV_HD is not set
332 311
333# 312#
@@ -335,6 +314,8 @@ CONFIG_IDE_GENERIC=y
335# 314#
336# CONFIG_RAID_ATTRS is not set 315# CONFIG_RAID_ATTRS is not set
337CONFIG_SCSI=m 316CONFIG_SCSI=m
317# CONFIG_SCSI_DMA is not set
318# CONFIG_SCSI_TGT is not set
338# CONFIG_SCSI_NETLINK is not set 319# CONFIG_SCSI_NETLINK is not set
339CONFIG_SCSI_PROC_FS=y 320CONFIG_SCSI_PROC_FS=y
340 321
@@ -355,6 +336,8 @@ CONFIG_CHR_DEV_SG=m
355CONFIG_SCSI_MULTI_LUN=y 336CONFIG_SCSI_MULTI_LUN=y
356# CONFIG_SCSI_CONSTANTS is not set 337# CONFIG_SCSI_CONSTANTS is not set
357# CONFIG_SCSI_LOGGING is not set 338# CONFIG_SCSI_LOGGING is not set
339# CONFIG_SCSI_SCAN_ASYNC is not set
340CONFIG_SCSI_WAIT_SCAN=m
358 341
359# 342#
360# SCSI Transports 343# SCSI Transports
@@ -362,93 +345,33 @@ CONFIG_SCSI_MULTI_LUN=y
362# CONFIG_SCSI_SPI_ATTRS is not set 345# CONFIG_SCSI_SPI_ATTRS is not set
363# CONFIG_SCSI_FC_ATTRS is not set 346# CONFIG_SCSI_FC_ATTRS is not set
364# CONFIG_SCSI_ISCSI_ATTRS is not set 347# CONFIG_SCSI_ISCSI_ATTRS is not set
365# CONFIG_SCSI_SAS_ATTRS is not set
366# CONFIG_SCSI_SAS_LIBSAS is not set 348# CONFIG_SCSI_SAS_LIBSAS is not set
367 349CONFIG_SCSI_LOWLEVEL=y
368#
369# SCSI low-level drivers
370#
371# CONFIG_ISCSI_TCP is not set 350# CONFIG_ISCSI_TCP is not set
372# CONFIG_SCSI_DEBUG is not set 351# CONFIG_SCSI_DEBUG is not set
373 352# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
374#
375# PCMCIA SCSI adapter support
376#
377# CONFIG_PCMCIA_AHA152X is not set
378# CONFIG_PCMCIA_FDOMAIN is not set
379# CONFIG_PCMCIA_NINJA_SCSI is not set
380# CONFIG_PCMCIA_QLOGIC is not set
381# CONFIG_PCMCIA_SYM53C500 is not set
382
383#
384# Serial ATA (prod) and Parallel ATA (experimental) drivers
385#
386
387#
388# Multi-device support (RAID and LVM)
389#
390# CONFIG_MD is not set 353# CONFIG_MD is not set
391
392#
393# Fusion MPT device support
394#
395# CONFIG_FUSION is not set
396
397#
398# IEEE 1394 (FireWire) support
399#
400
401#
402# I2O device support
403#
404
405#
406# Network device support
407#
408CONFIG_NETDEVICES=y 354CONFIG_NETDEVICES=y
355# CONFIG_NETDEVICES_MULTIQUEUE is not set
409# CONFIG_DUMMY is not set 356# CONFIG_DUMMY is not set
410# CONFIG_BONDING is not set 357# CONFIG_BONDING is not set
358# CONFIG_MACVLAN is not set
411# CONFIG_EQUALIZER is not set 359# CONFIG_EQUALIZER is not set
412# CONFIG_TUN is not set 360# CONFIG_TUN is not set
413
414#
415# PHY device support
416#
417# CONFIG_PHYLIB is not set 361# CONFIG_PHYLIB is not set
418
419#
420# Ethernet (10 or 100Mbit)
421#
422CONFIG_NET_ETHERNET=y 362CONFIG_NET_ETHERNET=y
423CONFIG_MII=y 363CONFIG_MII=y
424CONFIG_SMC91X=y 364CONFIG_SMC91X=y
425# CONFIG_NE2000 is not set 365# CONFIG_NE2000 is not set
366CONFIG_NETDEV_1000=y
367CONFIG_NETDEV_10000=y
426 368
427# 369#
428# Ethernet (1000 Mbit) 370# Wireless LAN
429#
430
431#
432# Ethernet (10000 Mbit)
433#
434
435#
436# Token Ring devices
437#
438
439#
440# Wireless LAN (non-hamradio)
441#
442# CONFIG_NET_RADIO is not set
443
444#
445# PCMCIA network device support
446# 371#
372# CONFIG_WLAN_PRE80211 is not set
373# CONFIG_WLAN_80211 is not set
447# CONFIG_NET_PCMCIA is not set 374# CONFIG_NET_PCMCIA is not set
448
449#
450# Wan interfaces
451#
452# CONFIG_WAN is not set 375# CONFIG_WAN is not set
453# CONFIG_PPP is not set 376# CONFIG_PPP is not set
454# CONFIG_SLIP is not set 377# CONFIG_SLIP is not set
@@ -456,15 +379,7 @@ CONFIG_SMC91X=y
456# CONFIG_NETCONSOLE is not set 379# CONFIG_NETCONSOLE is not set
457# CONFIG_NETPOLL is not set 380# CONFIG_NETPOLL is not set
458# CONFIG_NET_POLL_CONTROLLER is not set 381# CONFIG_NET_POLL_CONTROLLER is not set
459
460#
461# ISDN subsystem
462#
463# CONFIG_ISDN is not set 382# CONFIG_ISDN is not set
464
465#
466# Telephony Support
467#
468# CONFIG_PHONE is not set 383# CONFIG_PHONE is not set
469 384
470# 385#
@@ -472,6 +387,7 @@ CONFIG_SMC91X=y
472# 387#
473CONFIG_INPUT=y 388CONFIG_INPUT=y
474# CONFIG_INPUT_FF_MEMLESS is not set 389# CONFIG_INPUT_FF_MEMLESS is not set
390# CONFIG_INPUT_POLLDEV is not set
475 391
476# 392#
477# Userland interfaces 393# Userland interfaces
@@ -488,6 +404,7 @@ CONFIG_INPUT=y
488# CONFIG_INPUT_KEYBOARD is not set 404# CONFIG_INPUT_KEYBOARD is not set
489# CONFIG_INPUT_MOUSE is not set 405# CONFIG_INPUT_MOUSE is not set
490# CONFIG_INPUT_JOYSTICK is not set 406# CONFIG_INPUT_JOYSTICK is not set
407# CONFIG_INPUT_TABLET is not set
491# CONFIG_INPUT_TOUCHSCREEN is not set 408# CONFIG_INPUT_TOUCHSCREEN is not set
492# CONFIG_INPUT_MISC is not set 409# CONFIG_INPUT_MISC is not set
493 410
@@ -525,41 +442,20 @@ CONFIG_SERIAL_M32R_SIO_CONSOLE=y
525CONFIG_UNIX98_PTYS=y 442CONFIG_UNIX98_PTYS=y
526CONFIG_LEGACY_PTYS=y 443CONFIG_LEGACY_PTYS=y
527CONFIG_LEGACY_PTY_COUNT=256 444CONFIG_LEGACY_PTY_COUNT=256
528
529#
530# IPMI
531#
532# CONFIG_IPMI_HANDLER is not set 445# CONFIG_IPMI_HANDLER is not set
533
534#
535# Watchdog Cards
536#
537# CONFIG_WATCHDOG is not set 446# CONFIG_WATCHDOG is not set
538CONFIG_HW_RANDOM=y 447CONFIG_HW_RANDOM=y
539# CONFIG_RTC is not set 448# CONFIG_RTC is not set
540# CONFIG_DTLK is not set
541# CONFIG_R3964 is not set 449# CONFIG_R3964 is not set
542 450
543# 451#
544# Ftape, the floppy tape device driver
545#
546
547#
548# PCMCIA character devices 452# PCMCIA character devices
549# 453#
550# CONFIG_SYNCLINK_CS is not set 454# CONFIG_SYNCLINK_CS is not set
551# CONFIG_CARDMAN_4000 is not set 455# CONFIG_CARDMAN_4000 is not set
552# CONFIG_CARDMAN_4040 is not set 456# CONFIG_CARDMAN_4040 is not set
553# CONFIG_RAW_DRIVER is not set 457# CONFIG_RAW_DRIVER is not set
554
555#
556# TPM devices
557#
558# CONFIG_TCG_TPM is not set 458# CONFIG_TCG_TPM is not set
559
560#
561# I2C support
562#
563# CONFIG_I2C is not set 459# CONFIG_I2C is not set
564 460
565# 461#
@@ -567,56 +463,55 @@ CONFIG_HW_RANDOM=y
567# 463#
568# CONFIG_SPI is not set 464# CONFIG_SPI is not set
569# CONFIG_SPI_MASTER is not set 465# CONFIG_SPI_MASTER is not set
570
571#
572# Dallas's 1-wire bus
573#
574# CONFIG_W1 is not set 466# CONFIG_W1 is not set
575 467# CONFIG_POWER_SUPPLY is not set
576#
577# Hardware Monitoring support
578#
579CONFIG_HWMON=y 468CONFIG_HWMON=y
580# CONFIG_HWMON_VID is not set 469# CONFIG_HWMON_VID is not set
581# CONFIG_SENSORS_ABITUGURU is not set 470# CONFIG_SENSORS_ABITUGURU is not set
471# CONFIG_SENSORS_ABITUGURU3 is not set
582# CONFIG_SENSORS_F71805F is not set 472# CONFIG_SENSORS_F71805F is not set
473# CONFIG_SENSORS_IT87 is not set
474# CONFIG_SENSORS_PC87360 is not set
475# CONFIG_SENSORS_PC87427 is not set
476# CONFIG_SENSORS_SMSC47M1 is not set
477# CONFIG_SENSORS_SMSC47B397 is not set
583# CONFIG_SENSORS_VT1211 is not set 478# CONFIG_SENSORS_VT1211 is not set
479# CONFIG_SENSORS_W83627HF is not set
480# CONFIG_SENSORS_W83627EHF is not set
584# CONFIG_HWMON_DEBUG_CHIP is not set 481# CONFIG_HWMON_DEBUG_CHIP is not set
585 482
586# 483#
484# Multifunction device drivers
485#
486# CONFIG_MFD_SM501 is not set
487
488#
587# Multimedia devices 489# Multimedia devices
588# 490#
589CONFIG_VIDEO_DEV=y 491CONFIG_VIDEO_DEV=y
590CONFIG_VIDEO_V4L1=y 492CONFIG_VIDEO_V4L1=y
591CONFIG_VIDEO_V4L1_COMPAT=y 493CONFIG_VIDEO_V4L1_COMPAT=y
592CONFIG_VIDEO_V4L2=y 494CONFIG_VIDEO_V4L2=y
593 495CONFIG_VIDEO_CAPTURE_DRIVERS=y
594#
595# Video Capture Adapters
596#
597
598#
599# Video Capture Adapters
600#
601# CONFIG_VIDEO_ADV_DEBUG is not set 496# CONFIG_VIDEO_ADV_DEBUG is not set
602CONFIG_VIDEO_HELPER_CHIPS_AUTO=y 497CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
603# CONFIG_VIDEO_VIVI is not set
604# CONFIG_VIDEO_CPIA is not set 498# CONFIG_VIDEO_CPIA is not set
605# CONFIG_VIDEO_M32R_AR is not set 499# CONFIG_VIDEO_M32R_AR is not set
500CONFIG_RADIO_ADAPTERS=y
501# CONFIG_DVB_CORE is not set
502CONFIG_DAB=y
606 503
607# 504#
608# Radio Adapters 505# Graphics support
609#
610
611#
612# Digital Video Broadcasting Devices
613# 506#
614# CONFIG_DVB is not set 507# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
615 508
616# 509#
617# Graphics support 510# Display device support
618# 511#
619CONFIG_FIRMWARE_EDID=y 512# CONFIG_DISPLAY_SUPPORT is not set
513# CONFIG_VGASTATE is not set
514CONFIG_VIDEO_OUTPUT_CONTROL=m
620# CONFIG_FB is not set 515# CONFIG_FB is not set
621 516
622# 517#
@@ -624,16 +519,15 @@ CONFIG_FIRMWARE_EDID=y
624# 519#
625# CONFIG_VGA_CONSOLE is not set 520# CONFIG_VGA_CONSOLE is not set
626CONFIG_DUMMY_CONSOLE=y 521CONFIG_DUMMY_CONSOLE=y
627# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
628 522
629# 523#
630# Sound 524# Sound
631# 525#
632# CONFIG_SOUND is not set 526# CONFIG_SOUND is not set
633 527CONFIG_HID_SUPPORT=y
634# 528CONFIG_HID=y
635# USB support 529# CONFIG_HID_DEBUG is not set
636# 530CONFIG_USB_SUPPORT=y
637# CONFIG_USB_ARCH_HAS_HCD is not set 531# CONFIG_USB_ARCH_HAS_HCD is not set
638# CONFIG_USB_ARCH_HAS_OHCI is not set 532# CONFIG_USB_ARCH_HAS_OHCI is not set
639# CONFIG_USB_ARCH_HAS_EHCI is not set 533# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -646,50 +540,18 @@ CONFIG_DUMMY_CONSOLE=y
646# USB Gadget Support 540# USB Gadget Support
647# 541#
648# CONFIG_USB_GADGET is not set 542# CONFIG_USB_GADGET is not set
649
650#
651# MMC/SD Card support
652#
653# CONFIG_MMC is not set 543# CONFIG_MMC is not set
654
655#
656# LED devices
657#
658# CONFIG_NEW_LEDS is not set 544# CONFIG_NEW_LEDS is not set
659 545
660# 546#
661# LED drivers
662#
663
664#
665# LED Triggers
666#
667
668#
669# InfiniBand support
670#
671
672#
673# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
674#
675
676#
677# Real Time Clock 547# Real Time Clock
678# 548#
679# CONFIG_RTC_CLASS is not set 549# CONFIG_RTC_CLASS is not set
680 550
681# 551#
682# DMA Engine support 552# Userspace I/O
683#
684# CONFIG_DMA_ENGINE is not set
685
686#
687# DMA Clients
688#
689
690#
691# DMA Devices
692# 553#
554# CONFIG_UIO is not set
693 555
694# 556#
695# File systems 557# File systems
@@ -784,6 +646,7 @@ CONFIG_LOCKD=y
784CONFIG_LOCKD_V4=y 646CONFIG_LOCKD_V4=y
785CONFIG_NFS_COMMON=y 647CONFIG_NFS_COMMON=y
786CONFIG_SUNRPC=y 648CONFIG_SUNRPC=y
649# CONFIG_SUNRPC_BIND34 is not set
787# CONFIG_RPCSEC_GSS_KRB5 is not set 650# CONFIG_RPCSEC_GSS_KRB5 is not set
788# CONFIG_RPCSEC_GSS_SPKM3 is not set 651# CONFIG_RPCSEC_GSS_SPKM3 is not set
789# CONFIG_SMB_FS is not set 652# CONFIG_SMB_FS is not set
@@ -791,7 +654,6 @@ CONFIG_SUNRPC=y
791# CONFIG_NCP_FS is not set 654# CONFIG_NCP_FS is not set
792# CONFIG_CODA_FS is not set 655# CONFIG_CODA_FS is not set
793# CONFIG_AFS_FS is not set 656# CONFIG_AFS_FS is not set
794# CONFIG_9P_FS is not set
795 657
796# 658#
797# Partition Types 659# Partition Types
@@ -844,6 +706,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
844# CONFIG_NLS_UTF8 is not set 706# CONFIG_NLS_UTF8 is not set
845 707
846# 708#
709# Distributed Lock Manager
710#
711# CONFIG_DLM is not set
712
713#
847# Profiling support 714# Profiling support
848# 715#
849# CONFIG_PROFILING is not set 716# CONFIG_PROFILING is not set
@@ -855,29 +722,27 @@ CONFIG_NLS_DEFAULT="iso8859-1"
855CONFIG_ENABLE_MUST_CHECK=y 722CONFIG_ENABLE_MUST_CHECK=y
856# CONFIG_MAGIC_SYSRQ is not set 723# CONFIG_MAGIC_SYSRQ is not set
857# CONFIG_UNUSED_SYMBOLS is not set 724# CONFIG_UNUSED_SYMBOLS is not set
725# CONFIG_DEBUG_FS is not set
726# CONFIG_HEADERS_CHECK is not set
858# CONFIG_DEBUG_KERNEL is not set 727# CONFIG_DEBUG_KERNEL is not set
859CONFIG_LOG_BUF_SHIFT=14
860# CONFIG_DEBUG_BUGVERBOSE is not set 728# CONFIG_DEBUG_BUGVERBOSE is not set
861# CONFIG_DEBUG_FS is not set
862# CONFIG_FRAME_POINTER is not set 729# CONFIG_FRAME_POINTER is not set
863# CONFIG_UNWIND_INFO is not set
864# CONFIG_HEADERS_CHECK is not set
865 730
866# 731#
867# Security options 732# Security options
868# 733#
869# CONFIG_KEYS is not set 734# CONFIG_KEYS is not set
870# CONFIG_SECURITY is not set 735# CONFIG_SECURITY is not set
871
872#
873# Cryptographic options
874#
875# CONFIG_CRYPTO is not set 736# CONFIG_CRYPTO is not set
876 737
877# 738#
878# Library routines 739# Library routines
879# 740#
741CONFIG_BITREVERSE=y
880# CONFIG_CRC_CCITT is not set 742# CONFIG_CRC_CCITT is not set
881# CONFIG_CRC16 is not set 743# CONFIG_CRC16 is not set
744# CONFIG_CRC_ITU_T is not set
882CONFIG_CRC32=y 745CONFIG_CRC32=y
746# CONFIG_CRC7 is not set
883# CONFIG_LIBCRC32C is not set 747# CONFIG_LIBCRC32C is not set
748CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/mappi2/defconfig.vdec2 b/arch/m32r/configs/mappi2.vdec2_defconfig
index fe5b2a63cd..42247ae4fc 100644
--- a/arch/m32r/mappi2/defconfig.vdec2
+++ b/arch/m32r/configs/mappi2.vdec2_defconfig
@@ -1,12 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.23-rc1
4# Wed Dec 13 19:31:44 2006 4# Wed Aug 1 17:22:36 2007
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
8CONFIG_GENERIC_HARDIRQS=y 9CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 14
12# 15#
@@ -24,18 +27,19 @@ CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y 27CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SWAP=y 28CONFIG_SWAP=y
26CONFIG_SYSVIPC=y 29CONFIG_SYSVIPC=y
27# CONFIG_IPC_NS is not set 30CONFIG_SYSVIPC_SYSCTL=y
28# CONFIG_POSIX_MQUEUE is not set 31# CONFIG_POSIX_MQUEUE is not set
29CONFIG_BSD_PROCESS_ACCT=y 32CONFIG_BSD_PROCESS_ACCT=y
30# CONFIG_BSD_PROCESS_ACCT_V3 is not set 33# CONFIG_BSD_PROCESS_ACCT_V3 is not set
31# CONFIG_TASKSTATS is not set 34# CONFIG_TASKSTATS is not set
32# CONFIG_UTS_NS is not set 35# CONFIG_USER_NS is not set
33# CONFIG_AUDIT is not set 36# CONFIG_AUDIT is not set
34CONFIG_IKCONFIG=y 37CONFIG_IKCONFIG=y
35# CONFIG_IKCONFIG_PROC is not set 38# CONFIG_IKCONFIG_PROC is not set
39CONFIG_LOG_BUF_SHIFT=14
36CONFIG_SYSFS_DEPRECATED=y 40CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set 41# CONFIG_RELAY is not set
38CONFIG_INITRAMFS_SOURCE="" 42# CONFIG_BLK_DEV_INITRD is not set
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SYSCTL=y 44CONFIG_SYSCTL=y
41CONFIG_EMBEDDED=y 45CONFIG_EMBEDDED=y
@@ -47,29 +51,29 @@ CONFIG_BUG=y
47CONFIG_ELF_CORE=y 51CONFIG_ELF_CORE=y
48CONFIG_BASE_FULL=y 52CONFIG_BASE_FULL=y
49# CONFIG_FUTEX is not set 53# CONFIG_FUTEX is not set
54CONFIG_ANON_INODES=y
50# CONFIG_EPOLL is not set 55# CONFIG_EPOLL is not set
56CONFIG_SIGNALFD=y
57CONFIG_TIMERFD=y
58CONFIG_EVENTFD=y
51CONFIG_SHMEM=y 59CONFIG_SHMEM=y
52CONFIG_SLAB=y
53CONFIG_VM_EVENT_COUNTERS=y 60CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_SLAB=y
62# CONFIG_SLUB is not set
63# CONFIG_SLOB is not set
54# CONFIG_TINY_SHMEM is not set 64# CONFIG_TINY_SHMEM is not set
55CONFIG_BASE_SMALL=0 65CONFIG_BASE_SMALL=0
56# CONFIG_SLOB is not set
57
58#
59# Loadable module support
60#
61CONFIG_MODULES=y 66CONFIG_MODULES=y
62CONFIG_MODULE_UNLOAD=y 67CONFIG_MODULE_UNLOAD=y
63# CONFIG_MODULE_FORCE_UNLOAD is not set 68# CONFIG_MODULE_FORCE_UNLOAD is not set
64# CONFIG_MODVERSIONS is not set 69# CONFIG_MODVERSIONS is not set
65# CONFIG_MODULE_SRCVERSION_ALL is not set 70# CONFIG_MODULE_SRCVERSION_ALL is not set
66CONFIG_KMOD=y 71CONFIG_KMOD=y
67
68#
69# Block layer
70#
71CONFIG_BLOCK=y 72CONFIG_BLOCK=y
73# CONFIG_LBD is not set
72# CONFIG_BLK_DEV_IO_TRACE is not set 74# CONFIG_BLK_DEV_IO_TRACE is not set
75# CONFIG_LSF is not set
76# CONFIG_BLK_DEV_BSG is not set
73 77
74# 78#
75# IO Schedulers 79# IO Schedulers
@@ -120,13 +124,19 @@ CONFIG_NEED_MULTIPLE_NODES=y
120# CONFIG_SPARSEMEM_STATIC is not set 124# CONFIG_SPARSEMEM_STATIC is not set
121CONFIG_SPLIT_PTLOCK_CPUS=4 125CONFIG_SPLIT_PTLOCK_CPUS=4
122# CONFIG_RESOURCES_64BIT is not set 126# CONFIG_RESOURCES_64BIT is not set
127CONFIG_ZONE_DMA_FLAG=1
128CONFIG_BOUNCE=y
129CONFIG_VIRT_TO_BUS=y
123CONFIG_IRAM_START=0x00f00000 130CONFIG_IRAM_START=0x00f00000
124CONFIG_IRAM_SIZE=0x00008000 131CONFIG_IRAM_SIZE=0x00008000
125CONFIG_RWSEM_GENERIC_SPINLOCK=y 132CONFIG_RWSEM_GENERIC_SPINLOCK=y
126# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 133# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
134# CONFIG_ARCH_HAS_ILOG2_U32 is not set
135# CONFIG_ARCH_HAS_ILOG2_U64 is not set
127CONFIG_GENERIC_FIND_NEXT_BIT=y 136CONFIG_GENERIC_FIND_NEXT_BIT=y
128CONFIG_GENERIC_HWEIGHT=y 137CONFIG_GENERIC_HWEIGHT=y
129CONFIG_GENERIC_CALIBRATE_DELAY=y 138CONFIG_GENERIC_CALIBRATE_DELAY=y
139CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
130CONFIG_PREEMPT=y 140CONFIG_PREEMPT=y
131# CONFIG_SMP is not set 141# CONFIG_SMP is not set
132CONFIG_NODES_SHIFT=1 142CONFIG_NODES_SHIFT=1
@@ -134,6 +144,7 @@ CONFIG_NODES_SHIFT=1
134# 144#
135# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 145# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
136# 146#
147# CONFIG_ARCH_SUPPORTS_MSI is not set
137# CONFIG_ISA is not set 148# CONFIG_ISA is not set
138 149
139# 150#
@@ -151,10 +162,6 @@ CONFIG_PCMCIA_IOCTL=y
151# CONFIG_M32R_CFC is not set 162# CONFIG_M32R_CFC is not set
152 163
153# 164#
154# PCI Hotplug Support
155#
156
157#
158# Executable file formats 165# Executable file formats
159# 166#
160CONFIG_BINFMT_ELF=y 167CONFIG_BINFMT_ELF=y
@@ -168,13 +175,13 @@ CONFIG_NET=y
168# 175#
169# Networking options 176# Networking options
170# 177#
171# CONFIG_NETDEBUG is not set
172CONFIG_PACKET=y 178CONFIG_PACKET=y
173# CONFIG_PACKET_MMAP is not set 179# CONFIG_PACKET_MMAP is not set
174CONFIG_UNIX=y 180CONFIG_UNIX=y
175CONFIG_XFRM=y 181CONFIG_XFRM=y
176# CONFIG_XFRM_USER is not set 182# CONFIG_XFRM_USER is not set
177# CONFIG_XFRM_SUB_POLICY is not set 183# CONFIG_XFRM_SUB_POLICY is not set
184# CONFIG_XFRM_MIGRATE is not set
178# CONFIG_NET_KEY is not set 185# CONFIG_NET_KEY is not set
179CONFIG_INET=y 186CONFIG_INET=y
180# CONFIG_IP_MULTICAST is not set 187# CONFIG_IP_MULTICAST is not set
@@ -207,20 +214,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
207# CONFIG_INET6_TUNNEL is not set 214# CONFIG_INET6_TUNNEL is not set
208# CONFIG_NETWORK_SECMARK is not set 215# CONFIG_NETWORK_SECMARK is not set
209# CONFIG_NETFILTER is not set 216# CONFIG_NETFILTER is not set
210
211#
212# DCCP Configuration (EXPERIMENTAL)
213#
214# CONFIG_IP_DCCP is not set 217# CONFIG_IP_DCCP is not set
215
216#
217# SCTP Configuration (EXPERIMENTAL)
218#
219# CONFIG_IP_SCTP is not set 218# CONFIG_IP_SCTP is not set
220
221#
222# TIPC Configuration (EXPERIMENTAL)
223#
224# CONFIG_TIPC is not set 219# CONFIG_TIPC is not set
225# CONFIG_ATM is not set 220# CONFIG_ATM is not set
226# CONFIG_BRIDGE is not set 221# CONFIG_BRIDGE is not set
@@ -246,7 +241,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
246# CONFIG_HAMRADIO is not set 241# CONFIG_HAMRADIO is not set
247# CONFIG_IRDA is not set 242# CONFIG_IRDA is not set
248# CONFIG_BT is not set 243# CONFIG_BT is not set
244# CONFIG_AF_RXRPC is not set
245
246#
247# Wireless
248#
249# CONFIG_CFG80211 is not set
250# CONFIG_WIRELESS_EXT is not set
251# CONFIG_MAC80211 is not set
249# CONFIG_IEEE80211 is not set 252# CONFIG_IEEE80211 is not set
253# CONFIG_RFKILL is not set
254# CONFIG_NET_9P is not set
250 255
251# 256#
252# Device Drivers 257# Device Drivers
@@ -259,29 +264,10 @@ CONFIG_STANDALONE=y
259CONFIG_PREVENT_FIRMWARE_BUILD=y 264CONFIG_PREVENT_FIRMWARE_BUILD=y
260CONFIG_FW_LOADER=y 265CONFIG_FW_LOADER=y
261# CONFIG_SYS_HYPERVISOR is not set 266# CONFIG_SYS_HYPERVISOR is not set
262
263#
264# Connector - unified userspace <-> kernelspace linker
265#
266# CONFIG_CONNECTOR is not set 267# CONFIG_CONNECTOR is not set
267
268#
269# Memory Technology Devices (MTD)
270#
271# CONFIG_MTD is not set 268# CONFIG_MTD is not set
272
273#
274# Parallel port support
275#
276# CONFIG_PARPORT is not set 269# CONFIG_PARPORT is not set
277 270CONFIG_BLK_DEV=y
278#
279# Plug and Play support
280#
281
282#
283# Block devices
284#
285# CONFIG_BLK_DEV_COW_COMMON is not set 271# CONFIG_BLK_DEV_COW_COMMON is not set
286CONFIG_BLK_DEV_LOOP=y 272CONFIG_BLK_DEV_LOOP=y
287# CONFIG_BLK_DEV_CRYPTOLOOP is not set 273# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -290,18 +276,10 @@ CONFIG_BLK_DEV_RAM=y
290CONFIG_BLK_DEV_RAM_COUNT=16 276CONFIG_BLK_DEV_RAM_COUNT=16
291CONFIG_BLK_DEV_RAM_SIZE=4096 277CONFIG_BLK_DEV_RAM_SIZE=4096
292CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 278CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
293# CONFIG_BLK_DEV_INITRD is not set
294# CONFIG_CDROM_PKTCDVD is not set 279# CONFIG_CDROM_PKTCDVD is not set
295# CONFIG_ATA_OVER_ETH is not set 280# CONFIG_ATA_OVER_ETH is not set
296 281CONFIG_MISC_DEVICES=y
297# 282# CONFIG_EEPROM_93CX6 is not set
298# Misc devices
299#
300# CONFIG_TIFM_CORE is not set
301
302#
303# ATA/ATAPI/MFM/RLL support
304#
305CONFIG_IDE=y 283CONFIG_IDE=y
306CONFIG_IDE_MAX_HWIFS=4 284CONFIG_IDE_MAX_HWIFS=4
307CONFIG_BLK_DEV_IDE=y 285CONFIG_BLK_DEV_IDE=y
@@ -318,14 +296,15 @@ CONFIG_BLK_DEV_IDECD=m
318# CONFIG_BLK_DEV_IDEFLOPPY is not set 296# CONFIG_BLK_DEV_IDEFLOPPY is not set
319# CONFIG_BLK_DEV_IDESCSI is not set 297# CONFIG_BLK_DEV_IDESCSI is not set
320# CONFIG_IDE_TASK_IOCTL is not set 298# CONFIG_IDE_TASK_IOCTL is not set
299CONFIG_IDE_PROC_FS=y
321 300
322# 301#
323# IDE chipset support/bugfixes 302# IDE chipset support/bugfixes
324# 303#
325CONFIG_IDE_GENERIC=y 304CONFIG_IDE_GENERIC=y
305# CONFIG_IDEPCI_PCIBUS_ORDER is not set
326# CONFIG_IDE_ARM is not set 306# CONFIG_IDE_ARM is not set
327# CONFIG_BLK_DEV_IDEDMA is not set 307# CONFIG_BLK_DEV_IDEDMA is not set
328# CONFIG_IDEDMA_AUTO is not set
329# CONFIG_BLK_DEV_HD is not set 308# CONFIG_BLK_DEV_HD is not set
330 309
331# 310#
@@ -333,6 +312,8 @@ CONFIG_IDE_GENERIC=y
333# 312#
334# CONFIG_RAID_ATTRS is not set 313# CONFIG_RAID_ATTRS is not set
335CONFIG_SCSI=m 314CONFIG_SCSI=m
315# CONFIG_SCSI_DMA is not set
316# CONFIG_SCSI_TGT is not set
336# CONFIG_SCSI_NETLINK is not set 317# CONFIG_SCSI_NETLINK is not set
337CONFIG_SCSI_PROC_FS=y 318CONFIG_SCSI_PROC_FS=y
338 319
@@ -353,6 +334,8 @@ CONFIG_CHR_DEV_SG=m
353CONFIG_SCSI_MULTI_LUN=y 334CONFIG_SCSI_MULTI_LUN=y
354# CONFIG_SCSI_CONSTANTS is not set 335# CONFIG_SCSI_CONSTANTS is not set
355# CONFIG_SCSI_LOGGING is not set 336# CONFIG_SCSI_LOGGING is not set
337# CONFIG_SCSI_SCAN_ASYNC is not set
338CONFIG_SCSI_WAIT_SCAN=m
356 339
357# 340#
358# SCSI Transports 341# SCSI Transports
@@ -360,93 +343,33 @@ CONFIG_SCSI_MULTI_LUN=y
360# CONFIG_SCSI_SPI_ATTRS is not set 343# CONFIG_SCSI_SPI_ATTRS is not set
361# CONFIG_SCSI_FC_ATTRS is not set 344# CONFIG_SCSI_FC_ATTRS is not set
362# CONFIG_SCSI_ISCSI_ATTRS is not set 345# CONFIG_SCSI_ISCSI_ATTRS is not set
363# CONFIG_SCSI_SAS_ATTRS is not set
364# CONFIG_SCSI_SAS_LIBSAS is not set 346# CONFIG_SCSI_SAS_LIBSAS is not set
365 347CONFIG_SCSI_LOWLEVEL=y
366#
367# SCSI low-level drivers
368#
369# CONFIG_ISCSI_TCP is not set 348# CONFIG_ISCSI_TCP is not set
370# CONFIG_SCSI_DEBUG is not set 349# CONFIG_SCSI_DEBUG is not set
371 350# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
372#
373# PCMCIA SCSI adapter support
374#
375# CONFIG_PCMCIA_AHA152X is not set
376# CONFIG_PCMCIA_FDOMAIN is not set
377# CONFIG_PCMCIA_NINJA_SCSI is not set
378# CONFIG_PCMCIA_QLOGIC is not set
379# CONFIG_PCMCIA_SYM53C500 is not set
380
381#
382# Serial ATA (prod) and Parallel ATA (experimental) drivers
383#
384
385#
386# Multi-device support (RAID and LVM)
387#
388# CONFIG_MD is not set 351# CONFIG_MD is not set
389
390#
391# Fusion MPT device support
392#
393# CONFIG_FUSION is not set
394
395#
396# IEEE 1394 (FireWire) support
397#
398
399#
400# I2O device support
401#
402
403#
404# Network device support
405#
406CONFIG_NETDEVICES=y 352CONFIG_NETDEVICES=y
353# CONFIG_NETDEVICES_MULTIQUEUE is not set
407# CONFIG_DUMMY is not set 354# CONFIG_DUMMY is not set
408# CONFIG_BONDING is not set 355# CONFIG_BONDING is not set
356# CONFIG_MACVLAN is not set
409# CONFIG_EQUALIZER is not set 357# CONFIG_EQUALIZER is not set
410# CONFIG_TUN is not set 358# CONFIG_TUN is not set
411
412#
413# PHY device support
414#
415# CONFIG_PHYLIB is not set 359# CONFIG_PHYLIB is not set
416
417#
418# Ethernet (10 or 100Mbit)
419#
420CONFIG_NET_ETHERNET=y 360CONFIG_NET_ETHERNET=y
421CONFIG_MII=y 361CONFIG_MII=y
422CONFIG_SMC91X=y 362CONFIG_SMC91X=y
423# CONFIG_NE2000 is not set 363# CONFIG_NE2000 is not set
364CONFIG_NETDEV_1000=y
365CONFIG_NETDEV_10000=y
424 366
425# 367#
426# Ethernet (1000 Mbit) 368# Wireless LAN
427#
428
429#
430# Ethernet (10000 Mbit)
431#
432
433#
434# Token Ring devices
435#
436
437#
438# Wireless LAN (non-hamradio)
439#
440# CONFIG_NET_RADIO is not set
441
442#
443# PCMCIA network device support
444# 369#
370# CONFIG_WLAN_PRE80211 is not set
371# CONFIG_WLAN_80211 is not set
445# CONFIG_NET_PCMCIA is not set 372# CONFIG_NET_PCMCIA is not set
446
447#
448# Wan interfaces
449#
450# CONFIG_WAN is not set 373# CONFIG_WAN is not set
451# CONFIG_PPP is not set 374# CONFIG_PPP is not set
452# CONFIG_SLIP is not set 375# CONFIG_SLIP is not set
@@ -454,15 +377,7 @@ CONFIG_SMC91X=y
454# CONFIG_NETCONSOLE is not set 377# CONFIG_NETCONSOLE is not set
455# CONFIG_NETPOLL is not set 378# CONFIG_NETPOLL is not set
456# CONFIG_NET_POLL_CONTROLLER is not set 379# CONFIG_NET_POLL_CONTROLLER is not set
457
458#
459# ISDN subsystem
460#
461# CONFIG_ISDN is not set 380# CONFIG_ISDN is not set
462
463#
464# Telephony Support
465#
466# CONFIG_PHONE is not set 381# CONFIG_PHONE is not set
467 382
468# 383#
@@ -470,6 +385,7 @@ CONFIG_SMC91X=y
470# 385#
471CONFIG_INPUT=y 386CONFIG_INPUT=y
472# CONFIG_INPUT_FF_MEMLESS is not set 387# CONFIG_INPUT_FF_MEMLESS is not set
388# CONFIG_INPUT_POLLDEV is not set
473 389
474# 390#
475# Userland interfaces 391# Userland interfaces
@@ -486,6 +402,7 @@ CONFIG_INPUT=y
486# CONFIG_INPUT_KEYBOARD is not set 402# CONFIG_INPUT_KEYBOARD is not set
487# CONFIG_INPUT_MOUSE is not set 403# CONFIG_INPUT_MOUSE is not set
488# CONFIG_INPUT_JOYSTICK is not set 404# CONFIG_INPUT_JOYSTICK is not set
405# CONFIG_INPUT_TABLET is not set
489# CONFIG_INPUT_TOUCHSCREEN is not set 406# CONFIG_INPUT_TOUCHSCREEN is not set
490# CONFIG_INPUT_MISC is not set 407# CONFIG_INPUT_MISC is not set
491 408
@@ -523,41 +440,20 @@ CONFIG_SERIAL_M32R_SIO_CONSOLE=y
523CONFIG_UNIX98_PTYS=y 440CONFIG_UNIX98_PTYS=y
524CONFIG_LEGACY_PTYS=y 441CONFIG_LEGACY_PTYS=y
525CONFIG_LEGACY_PTY_COUNT=256 442CONFIG_LEGACY_PTY_COUNT=256
526
527#
528# IPMI
529#
530# CONFIG_IPMI_HANDLER is not set 443# CONFIG_IPMI_HANDLER is not set
531
532#
533# Watchdog Cards
534#
535# CONFIG_WATCHDOG is not set 444# CONFIG_WATCHDOG is not set
536CONFIG_HW_RANDOM=y 445CONFIG_HW_RANDOM=y
537# CONFIG_RTC is not set 446# CONFIG_RTC is not set
538# CONFIG_DTLK is not set
539# CONFIG_R3964 is not set 447# CONFIG_R3964 is not set
540 448
541# 449#
542# Ftape, the floppy tape device driver
543#
544
545#
546# PCMCIA character devices 450# PCMCIA character devices
547# 451#
548# CONFIG_SYNCLINK_CS is not set 452# CONFIG_SYNCLINK_CS is not set
549# CONFIG_CARDMAN_4000 is not set 453# CONFIG_CARDMAN_4000 is not set
550# CONFIG_CARDMAN_4040 is not set 454# CONFIG_CARDMAN_4040 is not set
551# CONFIG_RAW_DRIVER is not set 455# CONFIG_RAW_DRIVER is not set
552
553#
554# TPM devices
555#
556# CONFIG_TCG_TPM is not set 456# CONFIG_TCG_TPM is not set
557
558#
559# I2C support
560#
561# CONFIG_I2C is not set 457# CONFIG_I2C is not set
562 458
563# 459#
@@ -565,56 +461,55 @@ CONFIG_HW_RANDOM=y
565# 461#
566# CONFIG_SPI is not set 462# CONFIG_SPI is not set
567# CONFIG_SPI_MASTER is not set 463# CONFIG_SPI_MASTER is not set
568
569#
570# Dallas's 1-wire bus
571#
572# CONFIG_W1 is not set 464# CONFIG_W1 is not set
573 465# CONFIG_POWER_SUPPLY is not set
574#
575# Hardware Monitoring support
576#
577CONFIG_HWMON=y 466CONFIG_HWMON=y
578# CONFIG_HWMON_VID is not set 467# CONFIG_HWMON_VID is not set
579# CONFIG_SENSORS_ABITUGURU is not set 468# CONFIG_SENSORS_ABITUGURU is not set
469# CONFIG_SENSORS_ABITUGURU3 is not set
580# CONFIG_SENSORS_F71805F is not set 470# CONFIG_SENSORS_F71805F is not set
471# CONFIG_SENSORS_IT87 is not set
472# CONFIG_SENSORS_PC87360 is not set
473# CONFIG_SENSORS_PC87427 is not set
474# CONFIG_SENSORS_SMSC47M1 is not set
475# CONFIG_SENSORS_SMSC47B397 is not set
581# CONFIG_SENSORS_VT1211 is not set 476# CONFIG_SENSORS_VT1211 is not set
477# CONFIG_SENSORS_W83627HF is not set
478# CONFIG_SENSORS_W83627EHF is not set
582# CONFIG_HWMON_DEBUG_CHIP is not set 479# CONFIG_HWMON_DEBUG_CHIP is not set
583 480
584# 481#
482# Multifunction device drivers
483#
484# CONFIG_MFD_SM501 is not set
485
486#
585# Multimedia devices 487# Multimedia devices
586# 488#
587CONFIG_VIDEO_DEV=y 489CONFIG_VIDEO_DEV=y
588CONFIG_VIDEO_V4L1=y 490CONFIG_VIDEO_V4L1=y
589CONFIG_VIDEO_V4L1_COMPAT=y 491CONFIG_VIDEO_V4L1_COMPAT=y
590CONFIG_VIDEO_V4L2=y 492CONFIG_VIDEO_V4L2=y
591 493CONFIG_VIDEO_CAPTURE_DRIVERS=y
592#
593# Video Capture Adapters
594#
595
596#
597# Video Capture Adapters
598#
599# CONFIG_VIDEO_ADV_DEBUG is not set 494# CONFIG_VIDEO_ADV_DEBUG is not set
600CONFIG_VIDEO_HELPER_CHIPS_AUTO=y 495CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
601# CONFIG_VIDEO_VIVI is not set
602# CONFIG_VIDEO_CPIA is not set 496# CONFIG_VIDEO_CPIA is not set
603# CONFIG_VIDEO_M32R_AR is not set 497# CONFIG_VIDEO_M32R_AR is not set
498CONFIG_RADIO_ADAPTERS=y
499# CONFIG_DVB_CORE is not set
500CONFIG_DAB=y
604 501
605# 502#
606# Radio Adapters 503# Graphics support
607#
608
609#
610# Digital Video Broadcasting Devices
611# 504#
612# CONFIG_DVB is not set 505# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
613 506
614# 507#
615# Graphics support 508# Display device support
616# 509#
617CONFIG_FIRMWARE_EDID=y 510# CONFIG_DISPLAY_SUPPORT is not set
511# CONFIG_VGASTATE is not set
512CONFIG_VIDEO_OUTPUT_CONTROL=m
618# CONFIG_FB is not set 513# CONFIG_FB is not set
619 514
620# 515#
@@ -622,16 +517,15 @@ CONFIG_FIRMWARE_EDID=y
622# 517#
623# CONFIG_VGA_CONSOLE is not set 518# CONFIG_VGA_CONSOLE is not set
624CONFIG_DUMMY_CONSOLE=y 519CONFIG_DUMMY_CONSOLE=y
625# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
626 520
627# 521#
628# Sound 522# Sound
629# 523#
630# CONFIG_SOUND is not set 524# CONFIG_SOUND is not set
631 525CONFIG_HID_SUPPORT=y
632# 526CONFIG_HID=y
633# USB support 527# CONFIG_HID_DEBUG is not set
634# 528CONFIG_USB_SUPPORT=y
635# CONFIG_USB_ARCH_HAS_HCD is not set 529# CONFIG_USB_ARCH_HAS_HCD is not set
636# CONFIG_USB_ARCH_HAS_OHCI is not set 530# CONFIG_USB_ARCH_HAS_OHCI is not set
637# CONFIG_USB_ARCH_HAS_EHCI is not set 531# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -644,50 +538,18 @@ CONFIG_DUMMY_CONSOLE=y
644# USB Gadget Support 538# USB Gadget Support
645# 539#
646# CONFIG_USB_GADGET is not set 540# CONFIG_USB_GADGET is not set
647
648#
649# MMC/SD Card support
650#
651# CONFIG_MMC is not set 541# CONFIG_MMC is not set
652
653#
654# LED devices
655#
656# CONFIG_NEW_LEDS is not set 542# CONFIG_NEW_LEDS is not set
657 543
658# 544#
659# LED drivers
660#
661
662#
663# LED Triggers
664#
665
666#
667# InfiniBand support
668#
669
670#
671# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
672#
673
674#
675# Real Time Clock 545# Real Time Clock
676# 546#
677# CONFIG_RTC_CLASS is not set 547# CONFIG_RTC_CLASS is not set
678 548
679# 549#
680# DMA Engine support 550# Userspace I/O
681#
682# CONFIG_DMA_ENGINE is not set
683
684#
685# DMA Clients
686#
687
688#
689# DMA Devices
690# 551#
552# CONFIG_UIO is not set
691 553
692# 554#
693# File systems 555# File systems
@@ -782,6 +644,7 @@ CONFIG_LOCKD=y
782CONFIG_LOCKD_V4=y 644CONFIG_LOCKD_V4=y
783CONFIG_NFS_COMMON=y 645CONFIG_NFS_COMMON=y
784CONFIG_SUNRPC=y 646CONFIG_SUNRPC=y
647# CONFIG_SUNRPC_BIND34 is not set
785# CONFIG_RPCSEC_GSS_KRB5 is not set 648# CONFIG_RPCSEC_GSS_KRB5 is not set
786# CONFIG_RPCSEC_GSS_SPKM3 is not set 649# CONFIG_RPCSEC_GSS_SPKM3 is not set
787# CONFIG_SMB_FS is not set 650# CONFIG_SMB_FS is not set
@@ -789,7 +652,6 @@ CONFIG_SUNRPC=y
789# CONFIG_NCP_FS is not set 652# CONFIG_NCP_FS is not set
790# CONFIG_CODA_FS is not set 653# CONFIG_CODA_FS is not set
791# CONFIG_AFS_FS is not set 654# CONFIG_AFS_FS is not set
792# CONFIG_9P_FS is not set
793 655
794# 656#
795# Partition Types 657# Partition Types
@@ -842,6 +704,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
842# CONFIG_NLS_UTF8 is not set 704# CONFIG_NLS_UTF8 is not set
843 705
844# 706#
707# Distributed Lock Manager
708#
709# CONFIG_DLM is not set
710
711#
845# Profiling support 712# Profiling support
846# 713#
847# CONFIG_PROFILING is not set 714# CONFIG_PROFILING is not set
@@ -853,29 +720,27 @@ CONFIG_NLS_DEFAULT="iso8859-1"
853CONFIG_ENABLE_MUST_CHECK=y 720CONFIG_ENABLE_MUST_CHECK=y
854# CONFIG_MAGIC_SYSRQ is not set 721# CONFIG_MAGIC_SYSRQ is not set
855# CONFIG_UNUSED_SYMBOLS is not set 722# CONFIG_UNUSED_SYMBOLS is not set
723# CONFIG_DEBUG_FS is not set
724# CONFIG_HEADERS_CHECK is not set
856# CONFIG_DEBUG_KERNEL is not set 725# CONFIG_DEBUG_KERNEL is not set
857CONFIG_LOG_BUF_SHIFT=14
858# CONFIG_DEBUG_BUGVERBOSE is not set 726# CONFIG_DEBUG_BUGVERBOSE is not set
859# CONFIG_DEBUG_FS is not set
860# CONFIG_FRAME_POINTER is not set 727# CONFIG_FRAME_POINTER is not set
861# CONFIG_UNWIND_INFO is not set
862# CONFIG_HEADERS_CHECK is not set
863 728
864# 729#
865# Security options 730# Security options
866# 731#
867# CONFIG_KEYS is not set 732# CONFIG_KEYS is not set
868# CONFIG_SECURITY is not set 733# CONFIG_SECURITY is not set
869
870#
871# Cryptographic options
872#
873# CONFIG_CRYPTO is not set 734# CONFIG_CRYPTO is not set
874 735
875# 736#
876# Library routines 737# Library routines
877# 738#
739CONFIG_BITREVERSE=y
878# CONFIG_CRC_CCITT is not set 740# CONFIG_CRC_CCITT is not set
879# CONFIG_CRC16 is not set 741# CONFIG_CRC16 is not set
742# CONFIG_CRC_ITU_T is not set
880CONFIG_CRC32=y 743CONFIG_CRC32=y
744# CONFIG_CRC7 is not set
881# CONFIG_LIBCRC32C is not set 745# CONFIG_LIBCRC32C is not set
746CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/mappi3/defconfig.smp b/arch/m32r/configs/mappi3.smp_defconfig
index 2f352267a6..18c564f4ea 100644
--- a/arch/m32r/mappi3/defconfig.smp
+++ b/arch/m32r/configs/mappi3.smp_defconfig
@@ -1,12 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.23-rc1
4# Mon Dec 11 19:57:33 2006 4# Wed Aug 1 17:22:36 2007
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
8CONFIG_GENERIC_HARDIRQS=y 9CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 14
12# 15#
@@ -23,17 +26,19 @@ CONFIG_LOCALVERSION=""
23CONFIG_LOCALVERSION_AUTO=y 26CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 27CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 28CONFIG_SYSVIPC=y
26# CONFIG_IPC_NS is not set 29CONFIG_SYSVIPC_SYSCTL=y
27# CONFIG_POSIX_MQUEUE is not set 30# CONFIG_POSIX_MQUEUE is not set
28# CONFIG_BSD_PROCESS_ACCT is not set 31# CONFIG_BSD_PROCESS_ACCT is not set
29# CONFIG_TASKSTATS is not set 32# CONFIG_TASKSTATS is not set
30# CONFIG_UTS_NS is not set 33# CONFIG_USER_NS is not set
31# CONFIG_AUDIT is not set 34# CONFIG_AUDIT is not set
32CONFIG_IKCONFIG=y 35CONFIG_IKCONFIG=y
33CONFIG_IKCONFIG_PROC=y 36CONFIG_IKCONFIG_PROC=y
37CONFIG_LOG_BUF_SHIFT=15
34# CONFIG_CPUSETS is not set 38# CONFIG_CPUSETS is not set
35CONFIG_SYSFS_DEPRECATED=y 39CONFIG_SYSFS_DEPRECATED=y
36# CONFIG_RELAY is not set 40# CONFIG_RELAY is not set
41CONFIG_BLK_DEV_INITRD=y
37CONFIG_INITRAMFS_SOURCE="" 42CONFIG_INITRAMFS_SOURCE=""
38# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
39CONFIG_SYSCTL=y 44CONFIG_SYSCTL=y
@@ -46,17 +51,18 @@ CONFIG_BUG=y
46CONFIG_ELF_CORE=y 51CONFIG_ELF_CORE=y
47CONFIG_BASE_FULL=y 52CONFIG_BASE_FULL=y
48# CONFIG_FUTEX is not set 53# CONFIG_FUTEX is not set
54CONFIG_ANON_INODES=y
49# CONFIG_EPOLL is not set 55# CONFIG_EPOLL is not set
56CONFIG_SIGNALFD=y
57CONFIG_TIMERFD=y
58CONFIG_EVENTFD=y
50CONFIG_SHMEM=y 59CONFIG_SHMEM=y
51CONFIG_SLAB=y
52CONFIG_VM_EVENT_COUNTERS=y 60CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_SLAB=y
62# CONFIG_SLUB is not set
63# CONFIG_SLOB is not set
53# CONFIG_TINY_SHMEM is not set 64# CONFIG_TINY_SHMEM is not set
54CONFIG_BASE_SMALL=0 65CONFIG_BASE_SMALL=0
55# CONFIG_SLOB is not set
56
57#
58# Loadable module support
59#
60CONFIG_MODULES=y 66CONFIG_MODULES=y
61CONFIG_MODULE_UNLOAD=y 67CONFIG_MODULE_UNLOAD=y
62# CONFIG_MODULE_FORCE_UNLOAD is not set 68# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -64,12 +70,11 @@ CONFIG_MODULE_UNLOAD=y
64# CONFIG_MODULE_SRCVERSION_ALL is not set 70# CONFIG_MODULE_SRCVERSION_ALL is not set
65CONFIG_KMOD=y 71CONFIG_KMOD=y
66CONFIG_STOP_MACHINE=y 72CONFIG_STOP_MACHINE=y
67
68#
69# Block layer
70#
71CONFIG_BLOCK=y 73CONFIG_BLOCK=y
74# CONFIG_LBD is not set
72# CONFIG_BLK_DEV_IO_TRACE is not set 75# CONFIG_BLK_DEV_IO_TRACE is not set
76# CONFIG_LSF is not set
77# CONFIG_BLK_DEV_BSG is not set
73 78
74# 79#
75# IO Schedulers 80# IO Schedulers
@@ -122,13 +127,19 @@ CONFIG_NEED_MULTIPLE_NODES=y
122# CONFIG_SPARSEMEM_STATIC is not set 127# CONFIG_SPARSEMEM_STATIC is not set
123CONFIG_SPLIT_PTLOCK_CPUS=4 128CONFIG_SPLIT_PTLOCK_CPUS=4
124# CONFIG_RESOURCES_64BIT is not set 129# CONFIG_RESOURCES_64BIT is not set
130CONFIG_ZONE_DMA_FLAG=1
131CONFIG_BOUNCE=y
132CONFIG_VIRT_TO_BUS=y
125CONFIG_IRAM_START=0x00f00000 133CONFIG_IRAM_START=0x00f00000
126CONFIG_IRAM_SIZE=0x00080000 134CONFIG_IRAM_SIZE=0x00080000
127CONFIG_RWSEM_GENERIC_SPINLOCK=y 135CONFIG_RWSEM_GENERIC_SPINLOCK=y
128# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 136# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
137# CONFIG_ARCH_HAS_ILOG2_U32 is not set
138# CONFIG_ARCH_HAS_ILOG2_U64 is not set
129CONFIG_GENERIC_FIND_NEXT_BIT=y 139CONFIG_GENERIC_FIND_NEXT_BIT=y
130CONFIG_GENERIC_HWEIGHT=y 140CONFIG_GENERIC_HWEIGHT=y
131CONFIG_GENERIC_CALIBRATE_DELAY=y 141CONFIG_GENERIC_CALIBRATE_DELAY=y
142CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
132CONFIG_PREEMPT=y 143CONFIG_PREEMPT=y
133CONFIG_SMP=y 144CONFIG_SMP=y
134# CONFIG_CHIP_M32700_TS1 is not set 145# CONFIG_CHIP_M32700_TS1 is not set
@@ -138,6 +149,7 @@ CONFIG_NODES_SHIFT=1
138# 149#
139# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 150# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
140# 151#
152# CONFIG_ARCH_SUPPORTS_MSI is not set
141# CONFIG_ISA is not set 153# CONFIG_ISA is not set
142 154
143# 155#
@@ -156,10 +168,6 @@ CONFIG_PCMCIA_IOCTL=y
156# CONFIG_M32R_CFC is not set 168# CONFIG_M32R_CFC is not set
157 169
158# 170#
159# PCI Hotplug Support
160#
161
162#
163# Executable file formats 171# Executable file formats
164# 172#
165CONFIG_BINFMT_ELF=y 173CONFIG_BINFMT_ELF=y
@@ -173,12 +181,12 @@ CONFIG_NET=y
173# 181#
174# Networking options 182# Networking options
175# 183#
176# CONFIG_NETDEBUG is not set
177# CONFIG_PACKET is not set 184# CONFIG_PACKET is not set
178CONFIG_UNIX=y 185CONFIG_UNIX=y
179CONFIG_XFRM=y 186CONFIG_XFRM=y
180# CONFIG_XFRM_USER is not set 187# CONFIG_XFRM_USER is not set
181# CONFIG_XFRM_SUB_POLICY is not set 188# CONFIG_XFRM_SUB_POLICY is not set
189# CONFIG_XFRM_MIGRATE is not set
182# CONFIG_NET_KEY is not set 190# CONFIG_NET_KEY is not set
183CONFIG_INET=y 191CONFIG_INET=y
184# CONFIG_IP_MULTICAST is not set 192# CONFIG_IP_MULTICAST is not set
@@ -211,20 +219,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
211# CONFIG_INET6_TUNNEL is not set 219# CONFIG_INET6_TUNNEL is not set
212# CONFIG_NETWORK_SECMARK is not set 220# CONFIG_NETWORK_SECMARK is not set
213# CONFIG_NETFILTER is not set 221# CONFIG_NETFILTER is not set
214
215#
216# DCCP Configuration (EXPERIMENTAL)
217#
218# CONFIG_IP_DCCP is not set 222# CONFIG_IP_DCCP is not set
219
220#
221# SCTP Configuration (EXPERIMENTAL)
222#
223# CONFIG_IP_SCTP is not set 223# CONFIG_IP_SCTP is not set
224
225#
226# TIPC Configuration (EXPERIMENTAL)
227#
228# CONFIG_TIPC is not set 224# CONFIG_TIPC is not set
229# CONFIG_ATM is not set 225# CONFIG_ATM is not set
230# CONFIG_BRIDGE is not set 226# CONFIG_BRIDGE is not set
@@ -250,7 +246,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
250# CONFIG_HAMRADIO is not set 246# CONFIG_HAMRADIO is not set
251# CONFIG_IRDA is not set 247# CONFIG_IRDA is not set
252# CONFIG_BT is not set 248# CONFIG_BT is not set
249# CONFIG_AF_RXRPC is not set
250
251#
252# Wireless
253#
254# CONFIG_CFG80211 is not set
255# CONFIG_WIRELESS_EXT is not set
256# CONFIG_MAC80211 is not set
253# CONFIG_IEEE80211 is not set 257# CONFIG_IEEE80211 is not set
258# CONFIG_RFKILL is not set
259# CONFIG_NET_9P is not set
254 260
255# 261#
256# Device Drivers 262# Device Drivers
@@ -263,15 +269,7 @@ CONFIG_STANDALONE=y
263CONFIG_PREVENT_FIRMWARE_BUILD=y 269CONFIG_PREVENT_FIRMWARE_BUILD=y
264CONFIG_FW_LOADER=y 270CONFIG_FW_LOADER=y
265# CONFIG_SYS_HYPERVISOR is not set 271# CONFIG_SYS_HYPERVISOR is not set
266
267#
268# Connector - unified userspace <-> kernelspace linker
269#
270# CONFIG_CONNECTOR is not set 272# CONFIG_CONNECTOR is not set
271
272#
273# Memory Technology Devices (MTD)
274#
275CONFIG_MTD=y 273CONFIG_MTD=y
276# CONFIG_MTD_DEBUG is not set 274# CONFIG_MTD_DEBUG is not set
277# CONFIG_MTD_CONCAT is not set 275# CONFIG_MTD_CONCAT is not set
@@ -286,6 +284,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
286# User Modules And Translation Layers 284# User Modules And Translation Layers
287# 285#
288CONFIG_MTD_CHAR=y 286CONFIG_MTD_CHAR=y
287CONFIG_MTD_BLKDEVS=y
289CONFIG_MTD_BLOCK=y 288CONFIG_MTD_BLOCK=y
290# CONFIG_FTL is not set 289# CONFIG_FTL is not set
291# CONFIG_NFTL is not set 290# CONFIG_NFTL is not set
@@ -311,7 +310,6 @@ CONFIG_MTD_CFI_I2=y
311# CONFIG_MTD_RAM is not set 310# CONFIG_MTD_RAM is not set
312# CONFIG_MTD_ROM is not set 311# CONFIG_MTD_ROM is not set
313# CONFIG_MTD_ABSENT is not set 312# CONFIG_MTD_ABSENT is not set
314# CONFIG_MTD_OBSOLETE_CHIPS is not set
315 313
316# 314#
317# Mapping drivers for chip access 315# Mapping drivers for chip access
@@ -333,29 +331,15 @@ CONFIG_MTD_CFI_I2=y
333# CONFIG_MTD_DOC2000 is not set 331# CONFIG_MTD_DOC2000 is not set
334# CONFIG_MTD_DOC2001 is not set 332# CONFIG_MTD_DOC2001 is not set
335# CONFIG_MTD_DOC2001PLUS is not set 333# CONFIG_MTD_DOC2001PLUS is not set
336
337#
338# NAND Flash Device Drivers
339#
340# CONFIG_MTD_NAND is not set 334# CONFIG_MTD_NAND is not set
341
342#
343# OneNAND Flash Device Drivers
344#
345# CONFIG_MTD_ONENAND is not set 335# CONFIG_MTD_ONENAND is not set
346 336
347# 337#
348# Parallel port support 338# UBI - Unsorted block images
349# 339#
340# CONFIG_MTD_UBI is not set
350# CONFIG_PARPORT is not set 341# CONFIG_PARPORT is not set
351 342CONFIG_BLK_DEV=y
352#
353# Plug and Play support
354#
355
356#
357# Block devices
358#
359# CONFIG_BLK_DEV_COW_COMMON is not set 343# CONFIG_BLK_DEV_COW_COMMON is not set
360CONFIG_BLK_DEV_LOOP=y 344CONFIG_BLK_DEV_LOOP=y
361# CONFIG_BLK_DEV_CRYPTOLOOP is not set 345# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -364,18 +348,10 @@ CONFIG_BLK_DEV_RAM=y
364CONFIG_BLK_DEV_RAM_COUNT=16 348CONFIG_BLK_DEV_RAM_COUNT=16
365CONFIG_BLK_DEV_RAM_SIZE=4096 349CONFIG_BLK_DEV_RAM_SIZE=4096
366CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 350CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
367CONFIG_BLK_DEV_INITRD=y
368# CONFIG_CDROM_PKTCDVD is not set 351# CONFIG_CDROM_PKTCDVD is not set
369# CONFIG_ATA_OVER_ETH is not set 352# CONFIG_ATA_OVER_ETH is not set
370 353CONFIG_MISC_DEVICES=y
371# 354# CONFIG_EEPROM_93CX6 is not set
372# Misc devices
373#
374# CONFIG_TIFM_CORE is not set
375
376#
377# ATA/ATAPI/MFM/RLL support
378#
379CONFIG_IDE=y 355CONFIG_IDE=y
380CONFIG_IDE_MAX_HWIFS=4 356CONFIG_IDE_MAX_HWIFS=4
381CONFIG_BLK_DEV_IDE=y 357CONFIG_BLK_DEV_IDE=y
@@ -391,14 +367,15 @@ CONFIG_BLK_DEV_IDECD=m
391# CONFIG_BLK_DEV_IDETAPE is not set 367# CONFIG_BLK_DEV_IDETAPE is not set
392# CONFIG_BLK_DEV_IDEFLOPPY is not set 368# CONFIG_BLK_DEV_IDEFLOPPY is not set
393# CONFIG_IDE_TASK_IOCTL is not set 369# CONFIG_IDE_TASK_IOCTL is not set
370CONFIG_IDE_PROC_FS=y
394 371
395# 372#
396# IDE chipset support/bugfixes 373# IDE chipset support/bugfixes
397# 374#
398CONFIG_IDE_GENERIC=y 375CONFIG_IDE_GENERIC=y
376# CONFIG_IDEPCI_PCIBUS_ORDER is not set
399# CONFIG_IDE_ARM is not set 377# CONFIG_IDE_ARM is not set
400# CONFIG_BLK_DEV_IDEDMA is not set 378# CONFIG_BLK_DEV_IDEDMA is not set
401# CONFIG_IDEDMA_AUTO is not set
402# CONFIG_BLK_DEV_HD is not set 379# CONFIG_BLK_DEV_HD is not set
403 380
404# 381#
@@ -406,77 +383,30 @@ CONFIG_IDE_GENERIC=y
406# 383#
407# CONFIG_RAID_ATTRS is not set 384# CONFIG_RAID_ATTRS is not set
408# CONFIG_SCSI is not set 385# CONFIG_SCSI is not set
386# CONFIG_SCSI_DMA is not set
409# CONFIG_SCSI_NETLINK is not set 387# CONFIG_SCSI_NETLINK is not set
410
411#
412# Serial ATA (prod) and Parallel ATA (experimental) drivers
413#
414
415#
416# Multi-device support (RAID and LVM)
417#
418# CONFIG_MD is not set 388# CONFIG_MD is not set
419
420#
421# Fusion MPT device support
422#
423# CONFIG_FUSION is not set
424
425#
426# IEEE 1394 (FireWire) support
427#
428
429#
430# I2O device support
431#
432
433#
434# Network device support
435#
436CONFIG_NETDEVICES=y 389CONFIG_NETDEVICES=y
390# CONFIG_NETDEVICES_MULTIQUEUE is not set
437# CONFIG_DUMMY is not set 391# CONFIG_DUMMY is not set
438# CONFIG_BONDING is not set 392# CONFIG_BONDING is not set
393# CONFIG_MACVLAN is not set
439# CONFIG_EQUALIZER is not set 394# CONFIG_EQUALIZER is not set
440# CONFIG_TUN is not set 395# CONFIG_TUN is not set
441
442#
443# PHY device support
444#
445# CONFIG_PHYLIB is not set 396# CONFIG_PHYLIB is not set
446
447#
448# Ethernet (10 or 100Mbit)
449#
450CONFIG_NET_ETHERNET=y 397CONFIG_NET_ETHERNET=y
451CONFIG_MII=y 398CONFIG_MII=y
452CONFIG_SMC91X=y 399CONFIG_SMC91X=y
453# CONFIG_NE2000 is not set 400# CONFIG_NE2000 is not set
401CONFIG_NETDEV_1000=y
402CONFIG_NETDEV_10000=y
454 403
455# 404#
456# Ethernet (1000 Mbit) 405# Wireless LAN
457#
458
459#
460# Ethernet (10000 Mbit)
461#
462
463#
464# Token Ring devices
465#
466
467#
468# Wireless LAN (non-hamradio)
469#
470# CONFIG_NET_RADIO is not set
471
472#
473# PCMCIA network device support
474# 406#
407# CONFIG_WLAN_PRE80211 is not set
408# CONFIG_WLAN_80211 is not set
475# CONFIG_NET_PCMCIA is not set 409# CONFIG_NET_PCMCIA is not set
476
477#
478# Wan interfaces
479#
480# CONFIG_WAN is not set 410# CONFIG_WAN is not set
481# CONFIG_PPP is not set 411# CONFIG_PPP is not set
482# CONFIG_SLIP is not set 412# CONFIG_SLIP is not set
@@ -484,15 +414,7 @@ CONFIG_SMC91X=y
484# CONFIG_NETCONSOLE is not set 414# CONFIG_NETCONSOLE is not set
485# CONFIG_NETPOLL is not set 415# CONFIG_NETPOLL is not set
486# CONFIG_NET_POLL_CONTROLLER is not set 416# CONFIG_NET_POLL_CONTROLLER is not set
487
488#
489# ISDN subsystem
490#
491# CONFIG_ISDN is not set 417# CONFIG_ISDN is not set
492
493#
494# Telephony Support
495#
496# CONFIG_PHONE is not set 418# CONFIG_PHONE is not set
497 419
498# 420#
@@ -500,6 +422,7 @@ CONFIG_SMC91X=y
500# 422#
501CONFIG_INPUT=y 423CONFIG_INPUT=y
502# CONFIG_INPUT_FF_MEMLESS is not set 424# CONFIG_INPUT_FF_MEMLESS is not set
425# CONFIG_INPUT_POLLDEV is not set
503 426
504# 427#
505# Userland interfaces 428# Userland interfaces
@@ -519,6 +442,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
519# CONFIG_INPUT_KEYBOARD is not set 442# CONFIG_INPUT_KEYBOARD is not set
520# CONFIG_INPUT_MOUSE is not set 443# CONFIG_INPUT_MOUSE is not set
521# CONFIG_INPUT_JOYSTICK is not set 444# CONFIG_INPUT_JOYSTICK is not set
445# CONFIG_INPUT_TABLET is not set
522# CONFIG_INPUT_TOUCHSCREEN is not set 446# CONFIG_INPUT_TOUCHSCREEN is not set
523# CONFIG_INPUT_MISC is not set 447# CONFIG_INPUT_MISC is not set
524 448
@@ -553,41 +477,20 @@ CONFIG_SERIAL_M32R_SIO_CONSOLE=y
553CONFIG_UNIX98_PTYS=y 477CONFIG_UNIX98_PTYS=y
554CONFIG_LEGACY_PTYS=y 478CONFIG_LEGACY_PTYS=y
555CONFIG_LEGACY_PTY_COUNT=256 479CONFIG_LEGACY_PTY_COUNT=256
556
557#
558# IPMI
559#
560# CONFIG_IPMI_HANDLER is not set 480# CONFIG_IPMI_HANDLER is not set
561
562#
563# Watchdog Cards
564#
565# CONFIG_WATCHDOG is not set 481# CONFIG_WATCHDOG is not set
566CONFIG_HW_RANDOM=y 482CONFIG_HW_RANDOM=y
567# CONFIG_RTC is not set 483# CONFIG_RTC is not set
568# CONFIG_DTLK is not set
569# CONFIG_R3964 is not set 484# CONFIG_R3964 is not set
570 485
571# 486#
572# Ftape, the floppy tape device driver
573#
574
575#
576# PCMCIA character devices 487# PCMCIA character devices
577# 488#
578# CONFIG_SYNCLINK_CS is not set 489# CONFIG_SYNCLINK_CS is not set
579# CONFIG_CARDMAN_4000 is not set 490# CONFIG_CARDMAN_4000 is not set
580# CONFIG_CARDMAN_4040 is not set 491# CONFIG_CARDMAN_4040 is not set
581# CONFIG_RAW_DRIVER is not set 492# CONFIG_RAW_DRIVER is not set
582
583#
584# TPM devices
585#
586# CONFIG_TCG_TPM is not set 493# CONFIG_TCG_TPM is not set
587
588#
589# I2C support
590#
591# CONFIG_I2C is not set 494# CONFIG_I2C is not set
592 495
593# 496#
@@ -595,47 +498,56 @@ CONFIG_HW_RANDOM=y
595# 498#
596# CONFIG_SPI is not set 499# CONFIG_SPI is not set
597# CONFIG_SPI_MASTER is not set 500# CONFIG_SPI_MASTER is not set
598
599#
600# Dallas's 1-wire bus
601#
602# CONFIG_W1 is not set 501# CONFIG_W1 is not set
603 502# CONFIG_POWER_SUPPLY is not set
604#
605# Hardware Monitoring support
606#
607CONFIG_HWMON=y 503CONFIG_HWMON=y
608# CONFIG_HWMON_VID is not set 504# CONFIG_HWMON_VID is not set
609# CONFIG_SENSORS_ABITUGURU is not set 505# CONFIG_SENSORS_ABITUGURU is not set
506# CONFIG_SENSORS_ABITUGURU3 is not set
610# CONFIG_SENSORS_F71805F is not set 507# CONFIG_SENSORS_F71805F is not set
508# CONFIG_SENSORS_IT87 is not set
509# CONFIG_SENSORS_PC87360 is not set
510# CONFIG_SENSORS_PC87427 is not set
511# CONFIG_SENSORS_SMSC47M1 is not set
512# CONFIG_SENSORS_SMSC47B397 is not set
611# CONFIG_SENSORS_VT1211 is not set 513# CONFIG_SENSORS_VT1211 is not set
514# CONFIG_SENSORS_W83627HF is not set
515# CONFIG_SENSORS_W83627EHF is not set
612# CONFIG_HWMON_DEBUG_CHIP is not set 516# CONFIG_HWMON_DEBUG_CHIP is not set
613 517
614# 518#
615# Multimedia devices 519# Multifunction device drivers
616# 520#
617# CONFIG_VIDEO_DEV is not set 521# CONFIG_MFD_SM501 is not set
618 522
619# 523#
620# Digital Video Broadcasting Devices 524# Multimedia devices
621# 525#
622# CONFIG_DVB is not set 526# CONFIG_VIDEO_DEV is not set
527# CONFIG_DVB_CORE is not set
528CONFIG_DAB=y
623 529
624# 530#
625# Graphics support 531# Graphics support
626# 532#
627CONFIG_FIRMWARE_EDID=y
628# CONFIG_FB is not set
629# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 533# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
630 534
631# 535#
632# Sound 536# Display device support
633# 537#
634# CONFIG_SOUND is not set 538# CONFIG_DISPLAY_SUPPORT is not set
539# CONFIG_VGASTATE is not set
540CONFIG_VIDEO_OUTPUT_CONTROL=m
541# CONFIG_FB is not set
635 542
636# 543#
637# USB support 544# Sound
638# 545#
546# CONFIG_SOUND is not set
547CONFIG_HID_SUPPORT=y
548CONFIG_HID=y
549# CONFIG_HID_DEBUG is not set
550CONFIG_USB_SUPPORT=y
639# CONFIG_USB_ARCH_HAS_HCD is not set 551# CONFIG_USB_ARCH_HAS_HCD is not set
640# CONFIG_USB_ARCH_HAS_OHCI is not set 552# CONFIG_USB_ARCH_HAS_OHCI is not set
641# CONFIG_USB_ARCH_HAS_EHCI is not set 553# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -648,50 +560,18 @@ CONFIG_FIRMWARE_EDID=y
648# USB Gadget Support 560# USB Gadget Support
649# 561#
650# CONFIG_USB_GADGET is not set 562# CONFIG_USB_GADGET is not set
651
652#
653# MMC/SD Card support
654#
655# CONFIG_MMC is not set 563# CONFIG_MMC is not set
656
657#
658# LED devices
659#
660# CONFIG_NEW_LEDS is not set 564# CONFIG_NEW_LEDS is not set
661 565
662# 566#
663# LED drivers
664#
665
666#
667# LED Triggers
668#
669
670#
671# InfiniBand support
672#
673
674#
675# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
676#
677
678#
679# Real Time Clock 567# Real Time Clock
680# 568#
681# CONFIG_RTC_CLASS is not set 569# CONFIG_RTC_CLASS is not set
682 570
683# 571#
684# DMA Engine support 572# Userspace I/O
685#
686# CONFIG_DMA_ENGINE is not set
687
688#
689# DMA Clients
690#
691
692#
693# DMA Devices
694# 573#
574# CONFIG_UIO is not set
695 575
696# 576#
697# File systems 577# File systems
@@ -764,9 +644,6 @@ CONFIG_RAMFS=y
764# CONFIG_BEFS_FS is not set 644# CONFIG_BEFS_FS is not set
765# CONFIG_BFS_FS is not set 645# CONFIG_BFS_FS is not set
766# CONFIG_EFS_FS is not set 646# CONFIG_EFS_FS is not set
767CONFIG_JFFS_FS=y
768CONFIG_JFFS_FS_VERBOSE=0
769CONFIG_JFFS_PROC_FS=y
770CONFIG_JFFS2_FS=y 647CONFIG_JFFS2_FS=y
771CONFIG_JFFS2_FS_DEBUG=0 648CONFIG_JFFS2_FS_DEBUG=0
772CONFIG_JFFS2_FS_WRITEBUFFER=y 649CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -797,6 +674,7 @@ CONFIG_LOCKD=y
797CONFIG_LOCKD_V4=y 674CONFIG_LOCKD_V4=y
798CONFIG_NFS_COMMON=y 675CONFIG_NFS_COMMON=y
799CONFIG_SUNRPC=y 676CONFIG_SUNRPC=y
677# CONFIG_SUNRPC_BIND34 is not set
800# CONFIG_RPCSEC_GSS_KRB5 is not set 678# CONFIG_RPCSEC_GSS_KRB5 is not set
801# CONFIG_RPCSEC_GSS_SPKM3 is not set 679# CONFIG_RPCSEC_GSS_SPKM3 is not set
802# CONFIG_SMB_FS is not set 680# CONFIG_SMB_FS is not set
@@ -804,7 +682,6 @@ CONFIG_SUNRPC=y
804# CONFIG_NCP_FS is not set 682# CONFIG_NCP_FS is not set
805# CONFIG_CODA_FS is not set 683# CONFIG_CODA_FS is not set
806# CONFIG_AFS_FS is not set 684# CONFIG_AFS_FS is not set
807# CONFIG_9P_FS is not set
808 685
809# 686#
810# Partition Types 687# Partition Types
@@ -857,6 +734,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
857# CONFIG_NLS_UTF8 is not set 734# CONFIG_NLS_UTF8 is not set
858 735
859# 736#
737# Distributed Lock Manager
738#
739# CONFIG_DLM is not set
740
741#
860# Profiling support 742# Profiling support
861# 743#
862# CONFIG_PROFILING is not set 744# CONFIG_PROFILING is not set
@@ -868,31 +750,29 @@ CONFIG_NLS_DEFAULT="iso8859-1"
868CONFIG_ENABLE_MUST_CHECK=y 750CONFIG_ENABLE_MUST_CHECK=y
869# CONFIG_MAGIC_SYSRQ is not set 751# CONFIG_MAGIC_SYSRQ is not set
870# CONFIG_UNUSED_SYMBOLS is not set 752# CONFIG_UNUSED_SYMBOLS is not set
753# CONFIG_DEBUG_FS is not set
754# CONFIG_HEADERS_CHECK is not set
871# CONFIG_DEBUG_KERNEL is not set 755# CONFIG_DEBUG_KERNEL is not set
872CONFIG_LOG_BUF_SHIFT=15
873# CONFIG_DEBUG_BUGVERBOSE is not set 756# CONFIG_DEBUG_BUGVERBOSE is not set
874# CONFIG_DEBUG_FS is not set
875# CONFIG_FRAME_POINTER is not set 757# CONFIG_FRAME_POINTER is not set
876# CONFIG_UNWIND_INFO is not set
877# CONFIG_HEADERS_CHECK is not set
878 758
879# 759#
880# Security options 760# Security options
881# 761#
882# CONFIG_KEYS is not set 762# CONFIG_KEYS is not set
883# CONFIG_SECURITY is not set 763# CONFIG_SECURITY is not set
884
885#
886# Cryptographic options
887#
888# CONFIG_CRYPTO is not set 764# CONFIG_CRYPTO is not set
889 765
890# 766#
891# Library routines 767# Library routines
892# 768#
769CONFIG_BITREVERSE=y
893# CONFIG_CRC_CCITT is not set 770# CONFIG_CRC_CCITT is not set
894# CONFIG_CRC16 is not set 771# CONFIG_CRC16 is not set
772# CONFIG_CRC_ITU_T is not set
895CONFIG_CRC32=y 773CONFIG_CRC32=y
774# CONFIG_CRC7 is not set
896# CONFIG_LIBCRC32C is not set 775# CONFIG_LIBCRC32C is not set
897CONFIG_ZLIB_INFLATE=y 776CONFIG_ZLIB_INFLATE=y
898CONFIG_ZLIB_DEFLATE=y 777CONFIG_ZLIB_DEFLATE=y
778CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/oaks32r/defconfig.nommu b/arch/m32r/configs/oaks32r_defconfig
index aaa00828e0..cc0f99a592 100644
--- a/arch/m32r/oaks32r/defconfig.nommu
+++ b/arch/m32r/configs/oaks32r_defconfig
@@ -1,12 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.23-rc1
4# Tue Dec 12 12:09:17 2006 4# Wed Aug 1 17:22:36 2007
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
8CONFIG_GENERIC_HARDIRQS=y 9CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 14
12# 15#
@@ -27,12 +30,13 @@ CONFIG_LOCALVERSION_AUTO=y
27CONFIG_BSD_PROCESS_ACCT=y 30CONFIG_BSD_PROCESS_ACCT=y
28# CONFIG_BSD_PROCESS_ACCT_V3 is not set 31# CONFIG_BSD_PROCESS_ACCT_V3 is not set
29# CONFIG_TASKSTATS is not set 32# CONFIG_TASKSTATS is not set
30# CONFIG_UTS_NS is not set 33# CONFIG_USER_NS is not set
31# CONFIG_AUDIT is not set 34# CONFIG_AUDIT is not set
32# CONFIG_IKCONFIG is not set 35# CONFIG_IKCONFIG is not set
36CONFIG_LOG_BUF_SHIFT=14
33CONFIG_SYSFS_DEPRECATED=y 37CONFIG_SYSFS_DEPRECATED=y
34# CONFIG_RELAY is not set 38# CONFIG_RELAY is not set
35CONFIG_INITRAMFS_SOURCE="" 39# CONFIG_BLK_DEV_INITRD is not set
36# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
37CONFIG_SYSCTL=y 41CONFIG_SYSCTL=y
38CONFIG_EMBEDDED=y 42CONFIG_EMBEDDED=y
@@ -44,28 +48,28 @@ CONFIG_BUG=y
44CONFIG_ELF_CORE=y 48CONFIG_ELF_CORE=y
45CONFIG_BASE_FULL=y 49CONFIG_BASE_FULL=y
46# CONFIG_FUTEX is not set 50# CONFIG_FUTEX is not set
51CONFIG_ANON_INODES=y
47# CONFIG_EPOLL is not set 52# CONFIG_EPOLL is not set
48CONFIG_SLAB=y 53CONFIG_SIGNALFD=y
54CONFIG_TIMERFD=y
55CONFIG_EVENTFD=y
49CONFIG_VM_EVENT_COUNTERS=y 56CONFIG_VM_EVENT_COUNTERS=y
57CONFIG_SLAB=y
58# CONFIG_SLUB is not set
59# CONFIG_SLOB is not set
50CONFIG_TINY_SHMEM=y 60CONFIG_TINY_SHMEM=y
51CONFIG_BASE_SMALL=0 61CONFIG_BASE_SMALL=0
52# CONFIG_SLOB is not set
53
54#
55# Loadable module support
56#
57CONFIG_MODULES=y 62CONFIG_MODULES=y
58CONFIG_MODULE_UNLOAD=y 63CONFIG_MODULE_UNLOAD=y
59# CONFIG_MODULE_FORCE_UNLOAD is not set 64# CONFIG_MODULE_FORCE_UNLOAD is not set
60# CONFIG_MODVERSIONS is not set 65# CONFIG_MODVERSIONS is not set
61# CONFIG_MODULE_SRCVERSION_ALL is not set 66# CONFIG_MODULE_SRCVERSION_ALL is not set
62CONFIG_KMOD=y 67CONFIG_KMOD=y
63
64#
65# Block layer
66#
67CONFIG_BLOCK=y 68CONFIG_BLOCK=y
69# CONFIG_LBD is not set
68# CONFIG_BLK_DEV_IO_TRACE is not set 70# CONFIG_BLK_DEV_IO_TRACE is not set
71# CONFIG_LSF is not set
72# CONFIG_BLK_DEV_BSG is not set
69 73
70# 74#
71# IO Schedulers 75# IO Schedulers
@@ -114,13 +118,18 @@ CONFIG_NEED_MULTIPLE_NODES=y
114# CONFIG_SPARSEMEM_STATIC is not set 118# CONFIG_SPARSEMEM_STATIC is not set
115CONFIG_SPLIT_PTLOCK_CPUS=4 119CONFIG_SPLIT_PTLOCK_CPUS=4
116# CONFIG_RESOURCES_64BIT is not set 120# CONFIG_RESOURCES_64BIT is not set
121CONFIG_ZONE_DMA_FLAG=1
122CONFIG_VIRT_TO_BUS=y
117CONFIG_IRAM_START=0x00f00000 123CONFIG_IRAM_START=0x00f00000
118CONFIG_IRAM_SIZE=0x00010000 124CONFIG_IRAM_SIZE=0x00010000
119CONFIG_RWSEM_GENERIC_SPINLOCK=y 125CONFIG_RWSEM_GENERIC_SPINLOCK=y
120# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 126# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
127# CONFIG_ARCH_HAS_ILOG2_U32 is not set
128# CONFIG_ARCH_HAS_ILOG2_U64 is not set
121CONFIG_GENERIC_FIND_NEXT_BIT=y 129CONFIG_GENERIC_FIND_NEXT_BIT=y
122CONFIG_GENERIC_HWEIGHT=y 130CONFIG_GENERIC_HWEIGHT=y
123CONFIG_GENERIC_CALIBRATE_DELAY=y 131CONFIG_GENERIC_CALIBRATE_DELAY=y
132CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
124CONFIG_PREEMPT=y 133CONFIG_PREEMPT=y
125# CONFIG_SMP is not set 134# CONFIG_SMP is not set
126CONFIG_NODES_SHIFT=1 135CONFIG_NODES_SHIFT=1
@@ -128,6 +137,7 @@ CONFIG_NODES_SHIFT=1
128# 137#
129# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 138# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
130# 139#
140# CONFIG_ARCH_SUPPORTS_MSI is not set
131# CONFIG_ISA is not set 141# CONFIG_ISA is not set
132 142
133# 143#
@@ -136,10 +146,6 @@ CONFIG_NODES_SHIFT=1
136# CONFIG_PCCARD is not set 146# CONFIG_PCCARD is not set
137 147
138# 148#
139# PCI Hotplug Support
140#
141
142#
143# Executable file formats 149# Executable file formats
144# 150#
145CONFIG_BINFMT_FLAT=y 151CONFIG_BINFMT_FLAT=y
@@ -155,13 +161,13 @@ CONFIG_NET=y
155# 161#
156# Networking options 162# Networking options
157# 163#
158# CONFIG_NETDEBUG is not set
159CONFIG_PACKET=y 164CONFIG_PACKET=y
160# CONFIG_PACKET_MMAP is not set 165# CONFIG_PACKET_MMAP is not set
161CONFIG_UNIX=y 166CONFIG_UNIX=y
162CONFIG_XFRM=y 167CONFIG_XFRM=y
163# CONFIG_XFRM_USER is not set 168# CONFIG_XFRM_USER is not set
164# CONFIG_XFRM_SUB_POLICY is not set 169# CONFIG_XFRM_SUB_POLICY is not set
170# CONFIG_XFRM_MIGRATE is not set
165# CONFIG_NET_KEY is not set 171# CONFIG_NET_KEY is not set
166CONFIG_INET=y 172CONFIG_INET=y
167# CONFIG_IP_MULTICAST is not set 173# CONFIG_IP_MULTICAST is not set
@@ -194,20 +200,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
194# CONFIG_INET6_TUNNEL is not set 200# CONFIG_INET6_TUNNEL is not set
195# CONFIG_NETWORK_SECMARK is not set 201# CONFIG_NETWORK_SECMARK is not set
196# CONFIG_NETFILTER is not set 202# CONFIG_NETFILTER is not set
197
198#
199# DCCP Configuration (EXPERIMENTAL)
200#
201# CONFIG_IP_DCCP is not set 203# CONFIG_IP_DCCP is not set
202
203#
204# SCTP Configuration (EXPERIMENTAL)
205#
206# CONFIG_IP_SCTP is not set 204# CONFIG_IP_SCTP is not set
207
208#
209# TIPC Configuration (EXPERIMENTAL)
210#
211# CONFIG_TIPC is not set 205# CONFIG_TIPC is not set
212# CONFIG_ATM is not set 206# CONFIG_ATM is not set
213# CONFIG_BRIDGE is not set 207# CONFIG_BRIDGE is not set
@@ -233,7 +227,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
233# CONFIG_HAMRADIO is not set 227# CONFIG_HAMRADIO is not set
234# CONFIG_IRDA is not set 228# CONFIG_IRDA is not set
235# CONFIG_BT is not set 229# CONFIG_BT is not set
230# CONFIG_AF_RXRPC is not set
231
232#
233# Wireless
234#
235# CONFIG_CFG80211 is not set
236# CONFIG_WIRELESS_EXT is not set
237# CONFIG_MAC80211 is not set
236# CONFIG_IEEE80211 is not set 238# CONFIG_IEEE80211 is not set
239# CONFIG_RFKILL is not set
240# CONFIG_NET_9P is not set
237 241
238# 242#
239# Device Drivers 243# Device Drivers
@@ -246,29 +250,10 @@ CONFIG_STANDALONE=y
246CONFIG_PREVENT_FIRMWARE_BUILD=y 250CONFIG_PREVENT_FIRMWARE_BUILD=y
247# CONFIG_FW_LOADER is not set 251# CONFIG_FW_LOADER is not set
248# CONFIG_SYS_HYPERVISOR is not set 252# CONFIG_SYS_HYPERVISOR is not set
249
250#
251# Connector - unified userspace <-> kernelspace linker
252#
253# CONFIG_CONNECTOR is not set 253# CONFIG_CONNECTOR is not set
254
255#
256# Memory Technology Devices (MTD)
257#
258# CONFIG_MTD is not set 254# CONFIG_MTD is not set
259
260#
261# Parallel port support
262#
263# CONFIG_PARPORT is not set 255# CONFIG_PARPORT is not set
264 256CONFIG_BLK_DEV=y
265#
266# Plug and Play support
267#
268
269#
270# Block devices
271#
272# CONFIG_BLK_DEV_COW_COMMON is not set 257# CONFIG_BLK_DEV_COW_COMMON is not set
273CONFIG_BLK_DEV_LOOP=y 258CONFIG_BLK_DEV_LOOP=y
274# CONFIG_BLK_DEV_CRYPTOLOOP is not set 259# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -277,18 +262,10 @@ CONFIG_BLK_DEV_RAM=y
277CONFIG_BLK_DEV_RAM_COUNT=16 262CONFIG_BLK_DEV_RAM_COUNT=16
278CONFIG_BLK_DEV_RAM_SIZE=4096 263CONFIG_BLK_DEV_RAM_SIZE=4096
279CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 264CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
280# CONFIG_BLK_DEV_INITRD is not set
281# CONFIG_CDROM_PKTCDVD is not set 265# CONFIG_CDROM_PKTCDVD is not set
282# CONFIG_ATA_OVER_ETH is not set 266# CONFIG_ATA_OVER_ETH is not set
283 267CONFIG_MISC_DEVICES=y
284# 268# CONFIG_EEPROM_93CX6 is not set
285# Misc devices
286#
287# CONFIG_TIFM_CORE is not set
288
289#
290# ATA/ATAPI/MFM/RLL support
291#
292# CONFIG_IDE is not set 269# CONFIG_IDE is not set
293 270
294# 271#
@@ -296,69 +273,25 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
296# 273#
297# CONFIG_RAID_ATTRS is not set 274# CONFIG_RAID_ATTRS is not set
298# CONFIG_SCSI is not set 275# CONFIG_SCSI is not set
276# CONFIG_SCSI_DMA is not set
299# CONFIG_SCSI_NETLINK is not set 277# CONFIG_SCSI_NETLINK is not set
300
301#
302# Serial ATA (prod) and Parallel ATA (experimental) drivers
303#
304
305#
306# Multi-device support (RAID and LVM)
307#
308# CONFIG_MD is not set 278# CONFIG_MD is not set
309
310#
311# Fusion MPT device support
312#
313# CONFIG_FUSION is not set
314
315#
316# IEEE 1394 (FireWire) support
317#
318
319#
320# I2O device support
321#
322
323#
324# Network device support
325#
326CONFIG_NETDEVICES=y 279CONFIG_NETDEVICES=y
280# CONFIG_NETDEVICES_MULTIQUEUE is not set
327# CONFIG_DUMMY is not set 281# CONFIG_DUMMY is not set
328# CONFIG_BONDING is not set 282# CONFIG_BONDING is not set
283# CONFIG_MACVLAN is not set
329# CONFIG_EQUALIZER is not set 284# CONFIG_EQUALIZER is not set
330# CONFIG_TUN is not set 285# CONFIG_TUN is not set
331
332#
333# PHY device support
334#
335
336#
337# Ethernet (10 or 100Mbit)
338#
339# CONFIG_NET_ETHERNET is not set 286# CONFIG_NET_ETHERNET is not set
340CONFIG_NE2000=y 287CONFIG_NETDEV_1000=y
341 288CONFIG_NETDEV_10000=y
342#
343# Ethernet (1000 Mbit)
344#
345
346#
347# Ethernet (10000 Mbit)
348#
349 289
350# 290#
351# Token Ring devices 291# Wireless LAN
352#
353
354#
355# Wireless LAN (non-hamradio)
356#
357# CONFIG_NET_RADIO is not set
358
359#
360# Wan interfaces
361# 292#
293# CONFIG_WLAN_PRE80211 is not set
294# CONFIG_WLAN_80211 is not set
362# CONFIG_WAN is not set 295# CONFIG_WAN is not set
363# CONFIG_PPP is not set 296# CONFIG_PPP is not set
364# CONFIG_SLIP is not set 297# CONFIG_SLIP is not set
@@ -366,15 +299,7 @@ CONFIG_NE2000=y
366# CONFIG_NETCONSOLE is not set 299# CONFIG_NETCONSOLE is not set
367# CONFIG_NETPOLL is not set 300# CONFIG_NETPOLL is not set
368# CONFIG_NET_POLL_CONTROLLER is not set 301# CONFIG_NET_POLL_CONTROLLER is not set
369
370#
371# ISDN subsystem
372#
373# CONFIG_ISDN is not set 302# CONFIG_ISDN is not set
374
375#
376# Telephony Support
377#
378# CONFIG_PHONE is not set 303# CONFIG_PHONE is not set
379 304
380# 305#
@@ -382,6 +307,7 @@ CONFIG_NE2000=y
382# 307#
383CONFIG_INPUT=y 308CONFIG_INPUT=y
384# CONFIG_INPUT_FF_MEMLESS is not set 309# CONFIG_INPUT_FF_MEMLESS is not set
310# CONFIG_INPUT_POLLDEV is not set
385 311
386# 312#
387# Userland interfaces 313# Userland interfaces
@@ -398,6 +324,7 @@ CONFIG_INPUT=y
398# CONFIG_INPUT_KEYBOARD is not set 324# CONFIG_INPUT_KEYBOARD is not set
399# CONFIG_INPUT_MOUSE is not set 325# CONFIG_INPUT_MOUSE is not set
400# CONFIG_INPUT_JOYSTICK is not set 326# CONFIG_INPUT_JOYSTICK is not set
327# CONFIG_INPUT_TABLET is not set
401# CONFIG_INPUT_TOUCHSCREEN is not set 328# CONFIG_INPUT_TOUCHSCREEN is not set
402# CONFIG_INPUT_MISC is not set 329# CONFIG_INPUT_MISC is not set
403 330
@@ -432,34 +359,13 @@ CONFIG_SERIAL_M32R_SIO_CONSOLE=y
432CONFIG_UNIX98_PTYS=y 359CONFIG_UNIX98_PTYS=y
433CONFIG_LEGACY_PTYS=y 360CONFIG_LEGACY_PTYS=y
434CONFIG_LEGACY_PTY_COUNT=256 361CONFIG_LEGACY_PTY_COUNT=256
435
436#
437# IPMI
438#
439# CONFIG_IPMI_HANDLER is not set 362# CONFIG_IPMI_HANDLER is not set
440
441#
442# Watchdog Cards
443#
444# CONFIG_WATCHDOG is not set 363# CONFIG_WATCHDOG is not set
445CONFIG_HW_RANDOM=y 364CONFIG_HW_RANDOM=y
446# CONFIG_RTC is not set 365# CONFIG_RTC is not set
447# CONFIG_DTLK is not set
448# CONFIG_R3964 is not set 366# CONFIG_R3964 is not set
449
450#
451# Ftape, the floppy tape device driver
452#
453# CONFIG_RAW_DRIVER is not set 367# CONFIG_RAW_DRIVER is not set
454
455#
456# TPM devices
457#
458# CONFIG_TCG_TPM is not set 368# CONFIG_TCG_TPM is not set
459
460#
461# I2C support
462#
463# CONFIG_I2C is not set 369# CONFIG_I2C is not set
464 370
465# 371#
@@ -467,47 +373,56 @@ CONFIG_HW_RANDOM=y
467# 373#
468# CONFIG_SPI is not set 374# CONFIG_SPI is not set
469# CONFIG_SPI_MASTER is not set 375# CONFIG_SPI_MASTER is not set
470
471#
472# Dallas's 1-wire bus
473#
474# CONFIG_W1 is not set 376# CONFIG_W1 is not set
475 377# CONFIG_POWER_SUPPLY is not set
476#
477# Hardware Monitoring support
478#
479CONFIG_HWMON=y 378CONFIG_HWMON=y
480# CONFIG_HWMON_VID is not set 379# CONFIG_HWMON_VID is not set
481# CONFIG_SENSORS_ABITUGURU is not set 380# CONFIG_SENSORS_ABITUGURU is not set
381# CONFIG_SENSORS_ABITUGURU3 is not set
482# CONFIG_SENSORS_F71805F is not set 382# CONFIG_SENSORS_F71805F is not set
383# CONFIG_SENSORS_IT87 is not set
384# CONFIG_SENSORS_PC87360 is not set
385# CONFIG_SENSORS_PC87427 is not set
386# CONFIG_SENSORS_SMSC47M1 is not set
387# CONFIG_SENSORS_SMSC47B397 is not set
483# CONFIG_SENSORS_VT1211 is not set 388# CONFIG_SENSORS_VT1211 is not set
389# CONFIG_SENSORS_W83627HF is not set
390# CONFIG_SENSORS_W83627EHF is not set
484# CONFIG_HWMON_DEBUG_CHIP is not set 391# CONFIG_HWMON_DEBUG_CHIP is not set
485 392
486# 393#
487# Multimedia devices 394# Multifunction device drivers
488# 395#
489# CONFIG_VIDEO_DEV is not set 396# CONFIG_MFD_SM501 is not set
490 397
491# 398#
492# Digital Video Broadcasting Devices 399# Multimedia devices
493# 400#
494# CONFIG_DVB is not set 401# CONFIG_VIDEO_DEV is not set
402# CONFIG_DVB_CORE is not set
403CONFIG_DAB=y
495 404
496# 405#
497# Graphics support 406# Graphics support
498# 407#
499CONFIG_FIRMWARE_EDID=y
500# CONFIG_FB is not set
501# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 408# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
502 409
503# 410#
504# Sound 411# Display device support
505# 412#
506# CONFIG_SOUND is not set 413# CONFIG_DISPLAY_SUPPORT is not set
414# CONFIG_VGASTATE is not set
415CONFIG_VIDEO_OUTPUT_CONTROL=m
416# CONFIG_FB is not set
507 417
508# 418#
509# USB support 419# Sound
510# 420#
421# CONFIG_SOUND is not set
422CONFIG_HID_SUPPORT=y
423CONFIG_HID=y
424# CONFIG_HID_DEBUG is not set
425CONFIG_USB_SUPPORT=y
511# CONFIG_USB_ARCH_HAS_HCD is not set 426# CONFIG_USB_ARCH_HAS_HCD is not set
512# CONFIG_USB_ARCH_HAS_OHCI is not set 427# CONFIG_USB_ARCH_HAS_OHCI is not set
513# CONFIG_USB_ARCH_HAS_EHCI is not set 428# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -520,50 +435,18 @@ CONFIG_FIRMWARE_EDID=y
520# USB Gadget Support 435# USB Gadget Support
521# 436#
522# CONFIG_USB_GADGET is not set 437# CONFIG_USB_GADGET is not set
523
524#
525# MMC/SD Card support
526#
527# CONFIG_MMC is not set 438# CONFIG_MMC is not set
528
529#
530# LED devices
531#
532# CONFIG_NEW_LEDS is not set 439# CONFIG_NEW_LEDS is not set
533 440
534# 441#
535# LED drivers
536#
537
538#
539# LED Triggers
540#
541
542#
543# InfiniBand support
544#
545
546#
547# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
548#
549
550#
551# Real Time Clock 442# Real Time Clock
552# 443#
553# CONFIG_RTC_CLASS is not set 444# CONFIG_RTC_CLASS is not set
554 445
555# 446#
556# DMA Engine support 447# Userspace I/O
557#
558# CONFIG_DMA_ENGINE is not set
559
560#
561# DMA Clients
562#
563
564#
565# DMA Devices
566# 448#
449# CONFIG_UIO is not set
567 450
568# 451#
569# File systems 452# File systems
@@ -643,6 +526,7 @@ CONFIG_LOCKD=y
643CONFIG_LOCKD_V4=y 526CONFIG_LOCKD_V4=y
644CONFIG_NFS_COMMON=y 527CONFIG_NFS_COMMON=y
645CONFIG_SUNRPC=y 528CONFIG_SUNRPC=y
529# CONFIG_SUNRPC_BIND34 is not set
646# CONFIG_RPCSEC_GSS_KRB5 is not set 530# CONFIG_RPCSEC_GSS_KRB5 is not set
647# CONFIG_RPCSEC_GSS_SPKM3 is not set 531# CONFIG_RPCSEC_GSS_SPKM3 is not set
648# CONFIG_SMB_FS is not set 532# CONFIG_SMB_FS is not set
@@ -650,7 +534,6 @@ CONFIG_SUNRPC=y
650# CONFIG_NCP_FS is not set 534# CONFIG_NCP_FS is not set
651# CONFIG_CODA_FS is not set 535# CONFIG_CODA_FS is not set
652# CONFIG_AFS_FS is not set 536# CONFIG_AFS_FS is not set
653# CONFIG_9P_FS is not set
654 537
655# 538#
656# Partition Types 539# Partition Types
@@ -703,6 +586,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
703# CONFIG_NLS_UTF8 is not set 586# CONFIG_NLS_UTF8 is not set
704 587
705# 588#
589# Distributed Lock Manager
590#
591# CONFIG_DLM is not set
592
593#
706# Profiling support 594# Profiling support
707# 595#
708# CONFIG_PROFILING is not set 596# CONFIG_PROFILING is not set
@@ -714,29 +602,27 @@ CONFIG_NLS_DEFAULT="iso8859-1"
714CONFIG_ENABLE_MUST_CHECK=y 602CONFIG_ENABLE_MUST_CHECK=y
715# CONFIG_MAGIC_SYSRQ is not set 603# CONFIG_MAGIC_SYSRQ is not set
716# CONFIG_UNUSED_SYMBOLS is not set 604# CONFIG_UNUSED_SYMBOLS is not set
605# CONFIG_DEBUG_FS is not set
606# CONFIG_HEADERS_CHECK is not set
717# CONFIG_DEBUG_KERNEL is not set 607# CONFIG_DEBUG_KERNEL is not set
718CONFIG_LOG_BUF_SHIFT=14
719# CONFIG_DEBUG_BUGVERBOSE is not set 608# CONFIG_DEBUG_BUGVERBOSE is not set
720# CONFIG_DEBUG_FS is not set
721# CONFIG_FRAME_POINTER is not set 609# CONFIG_FRAME_POINTER is not set
722# CONFIG_UNWIND_INFO is not set
723# CONFIG_HEADERS_CHECK is not set
724 610
725# 611#
726# Security options 612# Security options
727# 613#
728# CONFIG_KEYS is not set 614# CONFIG_KEYS is not set
729# CONFIG_SECURITY is not set 615# CONFIG_SECURITY is not set
730
731#
732# Cryptographic options
733#
734# CONFIG_CRYPTO is not set 616# CONFIG_CRYPTO is not set
735 617
736# 618#
737# Library routines 619# Library routines
738# 620#
621CONFIG_BITREVERSE=y
739# CONFIG_CRC_CCITT is not set 622# CONFIG_CRC_CCITT is not set
740# CONFIG_CRC16 is not set 623# CONFIG_CRC16 is not set
624# CONFIG_CRC_ITU_T is not set
741CONFIG_CRC32=y 625CONFIG_CRC32=y
626# CONFIG_CRC7 is not set
742# CONFIG_LIBCRC32C is not set 627# CONFIG_LIBCRC32C is not set
628CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/opsput/defconfig.opsput b/arch/m32r/configs/opsput_defconfig
index 461f95e72d..39f5c1a506 100644
--- a/arch/m32r/opsput/defconfig.opsput
+++ b/arch/m32r/configs/opsput_defconfig
@@ -1,12 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.23-rc1
4# Wed Dec 13 18:34:36 2006 4# Wed Aug 1 17:22:37 2007
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
8CONFIG_GENERIC_HARDIRQS=y 9CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 14
12# 15#
@@ -23,18 +26,19 @@ CONFIG_LOCALVERSION=""
23CONFIG_LOCALVERSION_AUTO=y 26CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 27CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 28CONFIG_SYSVIPC=y
26# CONFIG_IPC_NS is not set 29CONFIG_SYSVIPC_SYSCTL=y
27# CONFIG_POSIX_MQUEUE is not set 30# CONFIG_POSIX_MQUEUE is not set
28CONFIG_BSD_PROCESS_ACCT=y 31CONFIG_BSD_PROCESS_ACCT=y
29# CONFIG_BSD_PROCESS_ACCT_V3 is not set 32# CONFIG_BSD_PROCESS_ACCT_V3 is not set
30# CONFIG_TASKSTATS is not set 33# CONFIG_TASKSTATS is not set
31# CONFIG_UTS_NS is not set 34# CONFIG_USER_NS is not set
32# CONFIG_AUDIT is not set 35# CONFIG_AUDIT is not set
33CONFIG_IKCONFIG=y 36CONFIG_IKCONFIG=y
34# CONFIG_IKCONFIG_PROC is not set 37# CONFIG_IKCONFIG_PROC is not set
38CONFIG_LOG_BUF_SHIFT=14
35CONFIG_SYSFS_DEPRECATED=y 39CONFIG_SYSFS_DEPRECATED=y
36# CONFIG_RELAY is not set 40# CONFIG_RELAY is not set
37CONFIG_INITRAMFS_SOURCE="" 41# CONFIG_BLK_DEV_INITRD is not set
38# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 42# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
39CONFIG_SYSCTL=y 43CONFIG_SYSCTL=y
40CONFIG_EMBEDDED=y 44CONFIG_EMBEDDED=y
@@ -46,29 +50,29 @@ CONFIG_BUG=y
46CONFIG_ELF_CORE=y 50CONFIG_ELF_CORE=y
47CONFIG_BASE_FULL=y 51CONFIG_BASE_FULL=y
48# CONFIG_FUTEX is not set 52# CONFIG_FUTEX is not set
53CONFIG_ANON_INODES=y
49# CONFIG_EPOLL is not set 54# CONFIG_EPOLL is not set
55CONFIG_SIGNALFD=y
56CONFIG_TIMERFD=y
57CONFIG_EVENTFD=y
50CONFIG_SHMEM=y 58CONFIG_SHMEM=y
51CONFIG_SLAB=y
52CONFIG_VM_EVENT_COUNTERS=y 59CONFIG_VM_EVENT_COUNTERS=y
60CONFIG_SLAB=y
61# CONFIG_SLUB is not set
62# CONFIG_SLOB is not set
53# CONFIG_TINY_SHMEM is not set 63# CONFIG_TINY_SHMEM is not set
54CONFIG_BASE_SMALL=0 64CONFIG_BASE_SMALL=0
55# CONFIG_SLOB is not set
56
57#
58# Loadable module support
59#
60CONFIG_MODULES=y 65CONFIG_MODULES=y
61CONFIG_MODULE_UNLOAD=y 66CONFIG_MODULE_UNLOAD=y
62# CONFIG_MODULE_FORCE_UNLOAD is not set 67# CONFIG_MODULE_FORCE_UNLOAD is not set
63# CONFIG_MODVERSIONS is not set 68# CONFIG_MODVERSIONS is not set
64# CONFIG_MODULE_SRCVERSION_ALL is not set 69# CONFIG_MODULE_SRCVERSION_ALL is not set
65CONFIG_KMOD=y 70CONFIG_KMOD=y
66
67#
68# Block layer
69#
70CONFIG_BLOCK=y 71CONFIG_BLOCK=y
72# CONFIG_LBD is not set
71# CONFIG_BLK_DEV_IO_TRACE is not set 73# CONFIG_BLK_DEV_IO_TRACE is not set
74# CONFIG_LSF is not set
75# CONFIG_BLK_DEV_BSG is not set
72 76
73# 77#
74# IO Schedulers 78# IO Schedulers
@@ -121,13 +125,19 @@ CONFIG_NEED_MULTIPLE_NODES=y
121# CONFIG_SPARSEMEM_STATIC is not set 125# CONFIG_SPARSEMEM_STATIC is not set
122CONFIG_SPLIT_PTLOCK_CPUS=4 126CONFIG_SPLIT_PTLOCK_CPUS=4
123# CONFIG_RESOURCES_64BIT is not set 127# CONFIG_RESOURCES_64BIT is not set
128CONFIG_ZONE_DMA_FLAG=1
129CONFIG_BOUNCE=y
130CONFIG_VIRT_TO_BUS=y
124CONFIG_IRAM_START=0x00f00000 131CONFIG_IRAM_START=0x00f00000
125CONFIG_IRAM_SIZE=0x00010000 132CONFIG_IRAM_SIZE=0x00010000
126CONFIG_RWSEM_GENERIC_SPINLOCK=y 133CONFIG_RWSEM_GENERIC_SPINLOCK=y
127# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 134# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
135# CONFIG_ARCH_HAS_ILOG2_U32 is not set
136# CONFIG_ARCH_HAS_ILOG2_U64 is not set
128CONFIG_GENERIC_FIND_NEXT_BIT=y 137CONFIG_GENERIC_FIND_NEXT_BIT=y
129CONFIG_GENERIC_HWEIGHT=y 138CONFIG_GENERIC_HWEIGHT=y
130CONFIG_GENERIC_CALIBRATE_DELAY=y 139CONFIG_GENERIC_CALIBRATE_DELAY=y
140CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
131# CONFIG_PREEMPT is not set 141# CONFIG_PREEMPT is not set
132# CONFIG_SMP is not set 142# CONFIG_SMP is not set
133CONFIG_NODES_SHIFT=1 143CONFIG_NODES_SHIFT=1
@@ -135,6 +145,7 @@ CONFIG_NODES_SHIFT=1
135# 145#
136# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 146# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
137# 147#
148# CONFIG_ARCH_SUPPORTS_MSI is not set
138# CONFIG_ISA is not set 149# CONFIG_ISA is not set
139 150
140# 151#
@@ -154,10 +165,6 @@ CONFIG_M32R_CFC_NUM=1
154CONFIG_PCCARD_NONSTATIC=y 165CONFIG_PCCARD_NONSTATIC=y
155 166
156# 167#
157# PCI Hotplug Support
158#
159
160#
161# Executable file formats 168# Executable file formats
162# 169#
163CONFIG_BINFMT_ELF=y 170CONFIG_BINFMT_ELF=y
@@ -171,13 +178,13 @@ CONFIG_NET=y
171# 178#
172# Networking options 179# Networking options
173# 180#
174# CONFIG_NETDEBUG is not set
175CONFIG_PACKET=y 181CONFIG_PACKET=y
176# CONFIG_PACKET_MMAP is not set 182# CONFIG_PACKET_MMAP is not set
177CONFIG_UNIX=y 183CONFIG_UNIX=y
178CONFIG_XFRM=y 184CONFIG_XFRM=y
179# CONFIG_XFRM_USER is not set 185# CONFIG_XFRM_USER is not set
180# CONFIG_XFRM_SUB_POLICY is not set 186# CONFIG_XFRM_SUB_POLICY is not set
187# CONFIG_XFRM_MIGRATE is not set
181# CONFIG_NET_KEY is not set 188# CONFIG_NET_KEY is not set
182CONFIG_INET=y 189CONFIG_INET=y
183# CONFIG_IP_MULTICAST is not set 190# CONFIG_IP_MULTICAST is not set
@@ -210,20 +217,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
210# CONFIG_INET6_TUNNEL is not set 217# CONFIG_INET6_TUNNEL is not set
211# CONFIG_NETWORK_SECMARK is not set 218# CONFIG_NETWORK_SECMARK is not set
212# CONFIG_NETFILTER is not set 219# CONFIG_NETFILTER is not set
213
214#
215# DCCP Configuration (EXPERIMENTAL)
216#
217# CONFIG_IP_DCCP is not set 220# CONFIG_IP_DCCP is not set
218
219#
220# SCTP Configuration (EXPERIMENTAL)
221#
222# CONFIG_IP_SCTP is not set 221# CONFIG_IP_SCTP is not set
223
224#
225# TIPC Configuration (EXPERIMENTAL)
226#
227# CONFIG_TIPC is not set 222# CONFIG_TIPC is not set
228# CONFIG_ATM is not set 223# CONFIG_ATM is not set
229# CONFIG_BRIDGE is not set 224# CONFIG_BRIDGE is not set
@@ -249,7 +244,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
249# CONFIG_HAMRADIO is not set 244# CONFIG_HAMRADIO is not set
250# CONFIG_IRDA is not set 245# CONFIG_IRDA is not set
251# CONFIG_BT is not set 246# CONFIG_BT is not set
247# CONFIG_AF_RXRPC is not set
248
249#
250# Wireless
251#
252# CONFIG_CFG80211 is not set
253# CONFIG_WIRELESS_EXT is not set
254# CONFIG_MAC80211 is not set
252# CONFIG_IEEE80211 is not set 255# CONFIG_IEEE80211 is not set
256# CONFIG_RFKILL is not set
257# CONFIG_NET_9P is not set
253 258
254# 259#
255# Device Drivers 260# Device Drivers
@@ -262,30 +267,12 @@ CONFIG_STANDALONE=y
262CONFIG_PREVENT_FIRMWARE_BUILD=y 267CONFIG_PREVENT_FIRMWARE_BUILD=y
263CONFIG_FW_LOADER=y 268CONFIG_FW_LOADER=y
264# CONFIG_DEBUG_DRIVER is not set 269# CONFIG_DEBUG_DRIVER is not set
270# CONFIG_DEBUG_DEVRES is not set
265# CONFIG_SYS_HYPERVISOR is not set 271# CONFIG_SYS_HYPERVISOR is not set
266
267#
268# Connector - unified userspace <-> kernelspace linker
269#
270# CONFIG_CONNECTOR is not set 272# CONFIG_CONNECTOR is not set
271
272#
273# Memory Technology Devices (MTD)
274#
275# CONFIG_MTD is not set 273# CONFIG_MTD is not set
276
277#
278# Parallel port support
279#
280# CONFIG_PARPORT is not set 274# CONFIG_PARPORT is not set
281 275CONFIG_BLK_DEV=y
282#
283# Plug and Play support
284#
285
286#
287# Block devices
288#
289# CONFIG_BLK_DEV_COW_COMMON is not set 276# CONFIG_BLK_DEV_COW_COMMON is not set
290CONFIG_BLK_DEV_LOOP=y 277CONFIG_BLK_DEV_LOOP=y
291# CONFIG_BLK_DEV_CRYPTOLOOP is not set 278# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -294,18 +281,10 @@ CONFIG_BLK_DEV_RAM=y
294CONFIG_BLK_DEV_RAM_COUNT=16 281CONFIG_BLK_DEV_RAM_COUNT=16
295CONFIG_BLK_DEV_RAM_SIZE=4096 282CONFIG_BLK_DEV_RAM_SIZE=4096
296CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 283CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
297# CONFIG_BLK_DEV_INITRD is not set
298# CONFIG_CDROM_PKTCDVD is not set 284# CONFIG_CDROM_PKTCDVD is not set
299# CONFIG_ATA_OVER_ETH is not set 285# CONFIG_ATA_OVER_ETH is not set
300 286CONFIG_MISC_DEVICES=y
301# 287# CONFIG_EEPROM_93CX6 is not set
302# Misc devices
303#
304# CONFIG_TIFM_CORE is not set
305
306#
307# ATA/ATAPI/MFM/RLL support
308#
309# CONFIG_IDE is not set 288# CONFIG_IDE is not set
310 289
311# 290#
@@ -313,6 +292,8 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
313# 292#
314# CONFIG_RAID_ATTRS is not set 293# CONFIG_RAID_ATTRS is not set
315CONFIG_SCSI=m 294CONFIG_SCSI=m
295# CONFIG_SCSI_DMA is not set
296# CONFIG_SCSI_TGT is not set
316# CONFIG_SCSI_NETLINK is not set 297# CONFIG_SCSI_NETLINK is not set
317CONFIG_SCSI_PROC_FS=y 298CONFIG_SCSI_PROC_FS=y
318 299
@@ -333,6 +314,8 @@ CONFIG_CHR_DEV_SG=m
333CONFIG_SCSI_MULTI_LUN=y 314CONFIG_SCSI_MULTI_LUN=y
334# CONFIG_SCSI_CONSTANTS is not set 315# CONFIG_SCSI_CONSTANTS is not set
335# CONFIG_SCSI_LOGGING is not set 316# CONFIG_SCSI_LOGGING is not set
317# CONFIG_SCSI_SCAN_ASYNC is not set
318CONFIG_SCSI_WAIT_SCAN=m
336 319
337# 320#
338# SCSI Transports 321# SCSI Transports
@@ -340,93 +323,33 @@ CONFIG_SCSI_MULTI_LUN=y
340# CONFIG_SCSI_SPI_ATTRS is not set 323# CONFIG_SCSI_SPI_ATTRS is not set
341# CONFIG_SCSI_FC_ATTRS is not set 324# CONFIG_SCSI_FC_ATTRS is not set
342# CONFIG_SCSI_ISCSI_ATTRS is not set 325# CONFIG_SCSI_ISCSI_ATTRS is not set
343# CONFIG_SCSI_SAS_ATTRS is not set
344# CONFIG_SCSI_SAS_LIBSAS is not set 326# CONFIG_SCSI_SAS_LIBSAS is not set
345 327CONFIG_SCSI_LOWLEVEL=y
346#
347# SCSI low-level drivers
348#
349# CONFIG_ISCSI_TCP is not set 328# CONFIG_ISCSI_TCP is not set
350# CONFIG_SCSI_DEBUG is not set 329# CONFIG_SCSI_DEBUG is not set
351 330# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
352#
353# PCMCIA SCSI adapter support
354#
355# CONFIG_PCMCIA_AHA152X is not set
356# CONFIG_PCMCIA_FDOMAIN is not set
357# CONFIG_PCMCIA_NINJA_SCSI is not set
358# CONFIG_PCMCIA_QLOGIC is not set
359# CONFIG_PCMCIA_SYM53C500 is not set
360
361#
362# Serial ATA (prod) and Parallel ATA (experimental) drivers
363#
364
365#
366# Multi-device support (RAID and LVM)
367#
368# CONFIG_MD is not set 331# CONFIG_MD is not set
369
370#
371# Fusion MPT device support
372#
373# CONFIG_FUSION is not set
374
375#
376# IEEE 1394 (FireWire) support
377#
378
379#
380# I2O device support
381#
382
383#
384# Network device support
385#
386CONFIG_NETDEVICES=y 332CONFIG_NETDEVICES=y
333# CONFIG_NETDEVICES_MULTIQUEUE is not set
387# CONFIG_DUMMY is not set 334# CONFIG_DUMMY is not set
388# CONFIG_BONDING is not set 335# CONFIG_BONDING is not set
336# CONFIG_MACVLAN is not set
389# CONFIG_EQUALIZER is not set 337# CONFIG_EQUALIZER is not set
390# CONFIG_TUN is not set 338# CONFIG_TUN is not set
391
392#
393# PHY device support
394#
395# CONFIG_PHYLIB is not set 339# CONFIG_PHYLIB is not set
396
397#
398# Ethernet (10 or 100Mbit)
399#
400CONFIG_NET_ETHERNET=y 340CONFIG_NET_ETHERNET=y
401CONFIG_MII=y 341CONFIG_MII=y
402CONFIG_SMC91X=y 342CONFIG_SMC91X=y
403# CONFIG_NE2000 is not set 343# CONFIG_NE2000 is not set
344CONFIG_NETDEV_1000=y
345CONFIG_NETDEV_10000=y
404 346
405# 347#
406# Ethernet (1000 Mbit) 348# Wireless LAN
407#
408
409#
410# Ethernet (10000 Mbit)
411#
412
413#
414# Token Ring devices
415#
416
417#
418# Wireless LAN (non-hamradio)
419#
420# CONFIG_NET_RADIO is not set
421
422#
423# PCMCIA network device support
424# 349#
350# CONFIG_WLAN_PRE80211 is not set
351# CONFIG_WLAN_80211 is not set
425# CONFIG_NET_PCMCIA is not set 352# CONFIG_NET_PCMCIA is not set
426
427#
428# Wan interfaces
429#
430# CONFIG_WAN is not set 353# CONFIG_WAN is not set
431# CONFIG_PPP is not set 354# CONFIG_PPP is not set
432# CONFIG_SLIP is not set 355# CONFIG_SLIP is not set
@@ -434,15 +357,7 @@ CONFIG_SMC91X=y
434# CONFIG_NETCONSOLE is not set 357# CONFIG_NETCONSOLE is not set
435# CONFIG_NETPOLL is not set 358# CONFIG_NETPOLL is not set
436# CONFIG_NET_POLL_CONTROLLER is not set 359# CONFIG_NET_POLL_CONTROLLER is not set
437
438#
439# ISDN subsystem
440#
441# CONFIG_ISDN is not set 360# CONFIG_ISDN is not set
442
443#
444# Telephony Support
445#
446# CONFIG_PHONE is not set 361# CONFIG_PHONE is not set
447 362
448# 363#
@@ -450,6 +365,7 @@ CONFIG_SMC91X=y
450# 365#
451CONFIG_INPUT=y 366CONFIG_INPUT=y
452# CONFIG_INPUT_FF_MEMLESS is not set 367# CONFIG_INPUT_FF_MEMLESS is not set
368# CONFIG_INPUT_POLLDEV is not set
453 369
454# 370#
455# Userland interfaces 371# Userland interfaces
@@ -466,6 +382,7 @@ CONFIG_INPUT=y
466# CONFIG_INPUT_KEYBOARD is not set 382# CONFIG_INPUT_KEYBOARD is not set
467# CONFIG_INPUT_MOUSE is not set 383# CONFIG_INPUT_MOUSE is not set
468# CONFIG_INPUT_JOYSTICK is not set 384# CONFIG_INPUT_JOYSTICK is not set
385# CONFIG_INPUT_TABLET is not set
469# CONFIG_INPUT_TOUCHSCREEN is not set 386# CONFIG_INPUT_TOUCHSCREEN is not set
470# CONFIG_INPUT_MISC is not set 387# CONFIG_INPUT_MISC is not set
471 388
@@ -501,42 +418,21 @@ CONFIG_SERIAL_M32R_PLDSIO=y
501CONFIG_UNIX98_PTYS=y 418CONFIG_UNIX98_PTYS=y
502CONFIG_LEGACY_PTYS=y 419CONFIG_LEGACY_PTYS=y
503CONFIG_LEGACY_PTY_COUNT=256 420CONFIG_LEGACY_PTY_COUNT=256
504
505#
506# IPMI
507#
508# CONFIG_IPMI_HANDLER is not set 421# CONFIG_IPMI_HANDLER is not set
509
510#
511# Watchdog Cards
512#
513# CONFIG_WATCHDOG is not set 422# CONFIG_WATCHDOG is not set
514CONFIG_HW_RANDOM=y 423CONFIG_HW_RANDOM=y
515# CONFIG_RTC is not set 424# CONFIG_RTC is not set
516CONFIG_DS1302=y 425CONFIG_DS1302=y
517# CONFIG_DTLK is not set
518# CONFIG_R3964 is not set 426# CONFIG_R3964 is not set
519 427
520# 428#
521# Ftape, the floppy tape device driver
522#
523
524#
525# PCMCIA character devices 429# PCMCIA character devices
526# 430#
527# CONFIG_SYNCLINK_CS is not set 431# CONFIG_SYNCLINK_CS is not set
528# CONFIG_CARDMAN_4000 is not set 432# CONFIG_CARDMAN_4000 is not set
529# CONFIG_CARDMAN_4040 is not set 433# CONFIG_CARDMAN_4040 is not set
530# CONFIG_RAW_DRIVER is not set 434# CONFIG_RAW_DRIVER is not set
531
532#
533# TPM devices
534#
535# CONFIG_TCG_TPM is not set 435# CONFIG_TCG_TPM is not set
536
537#
538# I2C support
539#
540# CONFIG_I2C is not set 436# CONFIG_I2C is not set
541 437
542# 438#
@@ -544,47 +440,56 @@ CONFIG_DS1302=y
544# 440#
545# CONFIG_SPI is not set 441# CONFIG_SPI is not set
546# CONFIG_SPI_MASTER is not set 442# CONFIG_SPI_MASTER is not set
547
548#
549# Dallas's 1-wire bus
550#
551# CONFIG_W1 is not set 443# CONFIG_W1 is not set
552 444# CONFIG_POWER_SUPPLY is not set
553#
554# Hardware Monitoring support
555#
556CONFIG_HWMON=y 445CONFIG_HWMON=y
557# CONFIG_HWMON_VID is not set 446# CONFIG_HWMON_VID is not set
558# CONFIG_SENSORS_ABITUGURU is not set 447# CONFIG_SENSORS_ABITUGURU is not set
448# CONFIG_SENSORS_ABITUGURU3 is not set
559# CONFIG_SENSORS_F71805F is not set 449# CONFIG_SENSORS_F71805F is not set
450# CONFIG_SENSORS_IT87 is not set
451# CONFIG_SENSORS_PC87360 is not set
452# CONFIG_SENSORS_PC87427 is not set
453# CONFIG_SENSORS_SMSC47M1 is not set
454# CONFIG_SENSORS_SMSC47B397 is not set
560# CONFIG_SENSORS_VT1211 is not set 455# CONFIG_SENSORS_VT1211 is not set
456# CONFIG_SENSORS_W83627HF is not set
457# CONFIG_SENSORS_W83627EHF is not set
561# CONFIG_HWMON_DEBUG_CHIP is not set 458# CONFIG_HWMON_DEBUG_CHIP is not set
562 459
563# 460#
564# Multimedia devices 461# Multifunction device drivers
565# 462#
566# CONFIG_VIDEO_DEV is not set 463# CONFIG_MFD_SM501 is not set
567 464
568# 465#
569# Digital Video Broadcasting Devices 466# Multimedia devices
570# 467#
571# CONFIG_DVB is not set 468# CONFIG_VIDEO_DEV is not set
469# CONFIG_DVB_CORE is not set
470CONFIG_DAB=y
572 471
573# 472#
574# Graphics support 473# Graphics support
575# 474#
576CONFIG_FIRMWARE_EDID=y
577# CONFIG_FB is not set
578# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 475# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
579 476
580# 477#
581# Sound 478# Display device support
582# 479#
583# CONFIG_SOUND is not set 480# CONFIG_DISPLAY_SUPPORT is not set
481# CONFIG_VGASTATE is not set
482CONFIG_VIDEO_OUTPUT_CONTROL=m
483# CONFIG_FB is not set
584 484
585# 485#
586# USB support 486# Sound
587# 487#
488# CONFIG_SOUND is not set
489CONFIG_HID_SUPPORT=y
490CONFIG_HID=y
491# CONFIG_HID_DEBUG is not set
492CONFIG_USB_SUPPORT=y
588# CONFIG_USB_ARCH_HAS_HCD is not set 493# CONFIG_USB_ARCH_HAS_HCD is not set
589# CONFIG_USB_ARCH_HAS_OHCI is not set 494# CONFIG_USB_ARCH_HAS_OHCI is not set
590# CONFIG_USB_ARCH_HAS_EHCI is not set 495# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -597,50 +502,18 @@ CONFIG_FIRMWARE_EDID=y
597# USB Gadget Support 502# USB Gadget Support
598# 503#
599# CONFIG_USB_GADGET is not set 504# CONFIG_USB_GADGET is not set
600
601#
602# MMC/SD Card support
603#
604# CONFIG_MMC is not set 505# CONFIG_MMC is not set
605
606#
607# LED devices
608#
609# CONFIG_NEW_LEDS is not set 506# CONFIG_NEW_LEDS is not set
610 507
611# 508#
612# LED drivers
613#
614
615#
616# LED Triggers
617#
618
619#
620# InfiniBand support
621#
622
623#
624# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
625#
626
627#
628# Real Time Clock 509# Real Time Clock
629# 510#
630# CONFIG_RTC_CLASS is not set 511# CONFIG_RTC_CLASS is not set
631 512
632# 513#
633# DMA Engine support 514# Userspace I/O
634#
635# CONFIG_DMA_ENGINE is not set
636
637#
638# DMA Clients
639#
640
641#
642# DMA Devices
643# 515#
516# CONFIG_UIO is not set
644 517
645# 518#
646# File systems 519# File systems
@@ -735,6 +608,7 @@ CONFIG_LOCKD=y
735CONFIG_LOCKD_V4=y 608CONFIG_LOCKD_V4=y
736CONFIG_NFS_COMMON=y 609CONFIG_NFS_COMMON=y
737CONFIG_SUNRPC=y 610CONFIG_SUNRPC=y
611# CONFIG_SUNRPC_BIND34 is not set
738# CONFIG_RPCSEC_GSS_KRB5 is not set 612# CONFIG_RPCSEC_GSS_KRB5 is not set
739# CONFIG_RPCSEC_GSS_SPKM3 is not set 613# CONFIG_RPCSEC_GSS_SPKM3 is not set
740# CONFIG_SMB_FS is not set 614# CONFIG_SMB_FS is not set
@@ -742,7 +616,6 @@ CONFIG_SUNRPC=y
742# CONFIG_NCP_FS is not set 616# CONFIG_NCP_FS is not set
743# CONFIG_CODA_FS is not set 617# CONFIG_CODA_FS is not set
744# CONFIG_AFS_FS is not set 618# CONFIG_AFS_FS is not set
745# CONFIG_9P_FS is not set
746 619
747# 620#
748# Partition Types 621# Partition Types
@@ -795,6 +668,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
795# CONFIG_NLS_UTF8 is not set 668# CONFIG_NLS_UTF8 is not set
796 669
797# 670#
671# Distributed Lock Manager
672#
673# CONFIG_DLM is not set
674
675#
798# Profiling support 676# Profiling support
799# 677#
800# CONFIG_PROFILING is not set 678# CONFIG_PROFILING is not set
@@ -806,27 +684,28 @@ CONFIG_NLS_DEFAULT="iso8859-1"
806CONFIG_ENABLE_MUST_CHECK=y 684CONFIG_ENABLE_MUST_CHECK=y
807# CONFIG_MAGIC_SYSRQ is not set 685# CONFIG_MAGIC_SYSRQ is not set
808# CONFIG_UNUSED_SYMBOLS is not set 686# CONFIG_UNUSED_SYMBOLS is not set
687# CONFIG_DEBUG_FS is not set
688# CONFIG_HEADERS_CHECK is not set
809CONFIG_DEBUG_KERNEL=y 689CONFIG_DEBUG_KERNEL=y
810CONFIG_LOG_BUF_SHIFT=14 690# CONFIG_DEBUG_SHIRQ is not set
811CONFIG_DETECT_SOFTLOCKUP=y 691CONFIG_DETECT_SOFTLOCKUP=y
692CONFIG_SCHED_DEBUG=y
812# CONFIG_SCHEDSTATS is not set 693# CONFIG_SCHEDSTATS is not set
694# CONFIG_TIMER_STATS is not set
813# CONFIG_DEBUG_SLAB is not set 695# CONFIG_DEBUG_SLAB is not set
814# CONFIG_DEBUG_SPINLOCK is not set 696# CONFIG_DEBUG_SPINLOCK is not set
815# CONFIG_DEBUG_MUTEXES is not set 697# CONFIG_DEBUG_MUTEXES is not set
816# CONFIG_DEBUG_RWSEMS is not set
817# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 698# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
818# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 699# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
819# CONFIG_DEBUG_KOBJECT is not set 700# CONFIG_DEBUG_KOBJECT is not set
820# CONFIG_DEBUG_BUGVERBOSE is not set 701# CONFIG_DEBUG_BUGVERBOSE is not set
821CONFIG_DEBUG_INFO=y 702CONFIG_DEBUG_INFO=y
822# CONFIG_DEBUG_FS is not set
823# CONFIG_DEBUG_VM is not set 703# CONFIG_DEBUG_VM is not set
824# CONFIG_DEBUG_LIST is not set 704# CONFIG_DEBUG_LIST is not set
825# CONFIG_FRAME_POINTER is not set 705# CONFIG_FRAME_POINTER is not set
826# CONFIG_UNWIND_INFO is not set
827CONFIG_FORCED_INLINING=y 706CONFIG_FORCED_INLINING=y
828# CONFIG_HEADERS_CHECK is not set
829# CONFIG_RCU_TORTURE_TEST is not set 707# CONFIG_RCU_TORTURE_TEST is not set
708# CONFIG_FAULT_INJECTION is not set
830# CONFIG_DEBUG_STACKOVERFLOW is not set 709# CONFIG_DEBUG_STACKOVERFLOW is not set
831# CONFIG_DEBUG_STACK_USAGE is not set 710# CONFIG_DEBUG_STACK_USAGE is not set
832 711
@@ -835,16 +714,16 @@ CONFIG_FORCED_INLINING=y
835# 714#
836# CONFIG_KEYS is not set 715# CONFIG_KEYS is not set
837# CONFIG_SECURITY is not set 716# CONFIG_SECURITY is not set
838
839#
840# Cryptographic options
841#
842# CONFIG_CRYPTO is not set 717# CONFIG_CRYPTO is not set
843 718
844# 719#
845# Library routines 720# Library routines
846# 721#
722CONFIG_BITREVERSE=y
847# CONFIG_CRC_CCITT is not set 723# CONFIG_CRC_CCITT is not set
848# CONFIG_CRC16 is not set 724# CONFIG_CRC16 is not set
725# CONFIG_CRC_ITU_T is not set
849CONFIG_CRC32=y 726CONFIG_CRC32=y
727# CONFIG_CRC7 is not set
850# CONFIG_LIBCRC32C is not set 728# CONFIG_LIBCRC32C is not set
729CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/configs/usrv_defconfig b/arch/m32r/configs/usrv_defconfig
new file mode 100644
index 0000000000..62e813e30c
--- /dev/null
+++ b/arch/m32r/configs/usrv_defconfig
@@ -0,0 +1,774 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc1
4# Wed Aug 1 17:22:37 2007
5#
6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
9CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
14
15#
16# Code maturity level options
17#
18CONFIG_EXPERIMENTAL=y
19CONFIG_LOCK_KERNEL=y
20CONFIG_INIT_ENV_ARG_LIMIT=32
21
22#
23# General setup
24#
25CONFIG_LOCALVERSION=""
26CONFIG_LOCALVERSION_AUTO=y
27CONFIG_SWAP=y
28CONFIG_SYSVIPC=y
29CONFIG_SYSVIPC_SYSCTL=y
30CONFIG_POSIX_MQUEUE=y
31CONFIG_BSD_PROCESS_ACCT=y
32# CONFIG_BSD_PROCESS_ACCT_V3 is not set
33# CONFIG_TASKSTATS is not set
34# CONFIG_USER_NS is not set
35# CONFIG_AUDIT is not set
36# CONFIG_IKCONFIG is not set
37CONFIG_LOG_BUF_SHIFT=15
38# CONFIG_CPUSETS is not set
39CONFIG_SYSFS_DEPRECATED=y
40# CONFIG_RELAY is not set
41CONFIG_BLK_DEV_INITRD=y
42CONFIG_INITRAMFS_SOURCE=""
43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
44CONFIG_SYSCTL=y
45CONFIG_EMBEDDED=y
46CONFIG_SYSCTL_SYSCALL=y
47CONFIG_KALLSYMS=y
48# CONFIG_KALLSYMS_ALL is not set
49CONFIG_KALLSYMS_EXTRA_PASS=y
50CONFIG_HOTPLUG=y
51CONFIG_PRINTK=y
52CONFIG_BUG=y
53CONFIG_ELF_CORE=y
54CONFIG_BASE_FULL=y
55CONFIG_FUTEX=y
56CONFIG_ANON_INODES=y
57CONFIG_EPOLL=y
58CONFIG_SIGNALFD=y
59CONFIG_TIMERFD=y
60CONFIG_EVENTFD=y
61CONFIG_SHMEM=y
62CONFIG_VM_EVENT_COUNTERS=y
63CONFIG_SLAB=y
64# CONFIG_SLUB is not set
65# CONFIG_SLOB is not set
66CONFIG_RT_MUTEXES=y
67# CONFIG_TINY_SHMEM is not set
68CONFIG_BASE_SMALL=0
69CONFIG_MODULES=y
70CONFIG_MODULE_UNLOAD=y
71# CONFIG_MODULE_FORCE_UNLOAD is not set
72# CONFIG_MODVERSIONS is not set
73# CONFIG_MODULE_SRCVERSION_ALL is not set
74CONFIG_KMOD=y
75CONFIG_STOP_MACHINE=y
76CONFIG_BLOCK=y
77# CONFIG_LBD is not set
78# CONFIG_BLK_DEV_IO_TRACE is not set
79# CONFIG_LSF is not set
80# CONFIG_BLK_DEV_BSG is not set
81
82#
83# IO Schedulers
84#
85CONFIG_IOSCHED_NOOP=y
86# CONFIG_IOSCHED_AS is not set
87# CONFIG_IOSCHED_DEADLINE is not set
88# CONFIG_IOSCHED_CFQ is not set
89# CONFIG_DEFAULT_AS is not set
90# CONFIG_DEFAULT_DEADLINE is not set
91# CONFIG_DEFAULT_CFQ is not set
92CONFIG_DEFAULT_NOOP=y
93CONFIG_DEFAULT_IOSCHED="noop"
94
95#
96# Processor type and features
97#
98# CONFIG_PLAT_MAPPI is not set
99CONFIG_PLAT_USRV=y
100# CONFIG_PLAT_M32700UT is not set
101# CONFIG_PLAT_OPSPUT is not set
102# CONFIG_PLAT_OAKS32R is not set
103# CONFIG_PLAT_MAPPI2 is not set
104# CONFIG_PLAT_MAPPI3 is not set
105# CONFIG_PLAT_M32104UT is not set
106CONFIG_CHIP_M32700=y
107# CONFIG_CHIP_M32102 is not set
108# CONFIG_CHIP_M32104 is not set
109# CONFIG_CHIP_VDEC2 is not set
110# CONFIG_CHIP_OPSP is not set
111CONFIG_MMU=y
112CONFIG_TLB_ENTRIES=32
113CONFIG_ISA_M32R2=y
114CONFIG_ISA_DSP_LEVEL2=y
115CONFIG_ISA_DUAL_ISSUE=y
116CONFIG_BUS_CLOCK=50000000
117CONFIG_TIMER_DIVIDE=128
118# CONFIG_CPU_LITTLE_ENDIAN is not set
119CONFIG_MEMORY_START=0x08000000
120CONFIG_MEMORY_SIZE=0x02000000
121CONFIG_NOHIGHMEM=y
122# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
123CONFIG_SELECT_MEMORY_MODEL=y
124CONFIG_FLATMEM_MANUAL=y
125# CONFIG_DISCONTIGMEM_MANUAL is not set
126# CONFIG_SPARSEMEM_MANUAL is not set
127CONFIG_FLATMEM=y
128CONFIG_FLAT_NODE_MEM_MAP=y
129# CONFIG_SPARSEMEM_STATIC is not set
130CONFIG_SPLIT_PTLOCK_CPUS=4
131# CONFIG_RESOURCES_64BIT is not set
132CONFIG_ZONE_DMA_FLAG=1
133CONFIG_BOUNCE=y
134CONFIG_VIRT_TO_BUS=y
135CONFIG_RWSEM_GENERIC_SPINLOCK=y
136# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
137# CONFIG_ARCH_HAS_ILOG2_U32 is not set
138# CONFIG_ARCH_HAS_ILOG2_U64 is not set
139CONFIG_GENERIC_FIND_NEXT_BIT=y
140CONFIG_GENERIC_HWEIGHT=y
141CONFIG_GENERIC_CALIBRATE_DELAY=y
142CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
143# CONFIG_PREEMPT is not set
144CONFIG_SMP=y
145# CONFIG_CHIP_M32700_TS1 is not set
146CONFIG_NR_CPUS=2
147
148#
149# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
150#
151# CONFIG_ARCH_SUPPORTS_MSI is not set
152# CONFIG_ISA is not set
153
154#
155# PCCARD (PCMCIA/CardBus) support
156#
157CONFIG_PCCARD=y
158# CONFIG_PCMCIA_DEBUG is not set
159CONFIG_PCMCIA=y
160CONFIG_PCMCIA_LOAD_CIS=y
161CONFIG_PCMCIA_IOCTL=y
162
163#
164# PC-card bridges
165#
166# CONFIG_M32R_PCC is not set
167CONFIG_M32R_CFC=y
168CONFIG_M32R_CFC_NUM=2
169CONFIG_PCCARD_NONSTATIC=y
170
171#
172# Executable file formats
173#
174CONFIG_BINFMT_ELF=y
175# CONFIG_BINFMT_MISC is not set
176
177#
178# Networking
179#
180CONFIG_NET=y
181
182#
183# Networking options
184#
185CONFIG_PACKET=y
186# CONFIG_PACKET_MMAP is not set
187CONFIG_UNIX=y
188CONFIG_XFRM=y
189CONFIG_XFRM_USER=y
190# CONFIG_XFRM_SUB_POLICY is not set
191# CONFIG_XFRM_MIGRATE is not set
192# CONFIG_NET_KEY is not set
193CONFIG_INET=y
194CONFIG_IP_MULTICAST=y
195# CONFIG_IP_ADVANCED_ROUTER is not set
196CONFIG_IP_FIB_HASH=y
197CONFIG_IP_PNP=y
198# CONFIG_IP_PNP_DHCP is not set
199# CONFIG_IP_PNP_BOOTP is not set
200# CONFIG_IP_PNP_RARP is not set
201# CONFIG_NET_IPIP is not set
202# CONFIG_NET_IPGRE is not set
203# CONFIG_IP_MROUTE is not set
204# CONFIG_ARPD is not set
205# CONFIG_SYN_COOKIES is not set
206CONFIG_INET_AH=y
207CONFIG_INET_ESP=y
208CONFIG_INET_IPCOMP=y
209CONFIG_INET_XFRM_TUNNEL=y
210CONFIG_INET_TUNNEL=y
211CONFIG_INET_XFRM_MODE_TRANSPORT=y
212CONFIG_INET_XFRM_MODE_TUNNEL=y
213CONFIG_INET_XFRM_MODE_BEET=y
214CONFIG_INET_DIAG=y
215CONFIG_INET_TCP_DIAG=y
216# CONFIG_TCP_CONG_ADVANCED is not set
217CONFIG_TCP_CONG_CUBIC=y
218CONFIG_DEFAULT_TCP_CONG="cubic"
219# CONFIG_TCP_MD5SIG is not set
220# CONFIG_IPV6 is not set
221# CONFIG_INET6_XFRM_TUNNEL is not set
222# CONFIG_INET6_TUNNEL is not set
223# CONFIG_NETWORK_SECMARK is not set
224# CONFIG_NETFILTER is not set
225# CONFIG_IP_DCCP is not set
226# CONFIG_IP_SCTP is not set
227# CONFIG_TIPC is not set
228# CONFIG_ATM is not set
229# CONFIG_BRIDGE is not set
230# CONFIG_VLAN_8021Q is not set
231# CONFIG_DECNET is not set
232# CONFIG_LLC2 is not set
233# CONFIG_IPX is not set
234# CONFIG_ATALK is not set
235# CONFIG_X25 is not set
236# CONFIG_LAPB is not set
237# CONFIG_ECONET is not set
238# CONFIG_WAN_ROUTER is not set
239
240#
241# QoS and/or fair queueing
242#
243# CONFIG_NET_SCHED is not set
244
245#
246# Network testing
247#
248# CONFIG_NET_PKTGEN is not set
249# CONFIG_HAMRADIO is not set
250# CONFIG_IRDA is not set
251# CONFIG_BT is not set
252# CONFIG_AF_RXRPC is not set
253
254#
255# Wireless
256#
257# CONFIG_CFG80211 is not set
258CONFIG_WIRELESS_EXT=y
259# CONFIG_MAC80211 is not set
260CONFIG_IEEE80211=y
261CONFIG_IEEE80211_DEBUG=y
262CONFIG_IEEE80211_CRYPT_WEP=y
263CONFIG_IEEE80211_CRYPT_CCMP=y
264CONFIG_IEEE80211_CRYPT_TKIP=y
265# CONFIG_IEEE80211_SOFTMAC is not set
266# CONFIG_RFKILL is not set
267# CONFIG_NET_9P is not set
268
269#
270# Device Drivers
271#
272
273#
274# Generic Driver Options
275#
276CONFIG_STANDALONE=y
277CONFIG_PREVENT_FIRMWARE_BUILD=y
278CONFIG_FW_LOADER=y
279# CONFIG_DEBUG_DRIVER is not set
280# CONFIG_DEBUG_DEVRES is not set
281# CONFIG_SYS_HYPERVISOR is not set
282# CONFIG_CONNECTOR is not set
283CONFIG_MTD=y
284# CONFIG_MTD_DEBUG is not set
285CONFIG_MTD_CONCAT=y
286CONFIG_MTD_PARTITIONS=y
287# CONFIG_MTD_REDBOOT_PARTS is not set
288# CONFIG_MTD_CMDLINE_PARTS is not set
289
290#
291# User Modules And Translation Layers
292#
293CONFIG_MTD_CHAR=y
294CONFIG_MTD_BLKDEVS=y
295CONFIG_MTD_BLOCK=y
296# CONFIG_FTL is not set
297# CONFIG_NFTL is not set
298# CONFIG_INFTL is not set
299# CONFIG_RFD_FTL is not set
300# CONFIG_SSFDC is not set
301
302#
303# RAM/ROM/Flash chip drivers
304#
305CONFIG_MTD_CFI=y
306# CONFIG_MTD_JEDECPROBE is not set
307CONFIG_MTD_GEN_PROBE=y
308CONFIG_MTD_CFI_ADV_OPTIONS=y
309# CONFIG_MTD_CFI_NOSWAP is not set
310CONFIG_MTD_CFI_BE_BYTE_SWAP=y
311# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
312CONFIG_MTD_CFI_GEOMETRY=y
313# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
314CONFIG_MTD_MAP_BANK_WIDTH_2=y
315# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
316# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
317# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
318# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
319CONFIG_MTD_CFI_I1=y
320# CONFIG_MTD_CFI_I2 is not set
321# CONFIG_MTD_CFI_I4 is not set
322# CONFIG_MTD_CFI_I8 is not set
323# CONFIG_MTD_OTP is not set
324# CONFIG_MTD_CFI_INTELEXT is not set
325CONFIG_MTD_CFI_AMDSTD=y
326# CONFIG_MTD_CFI_STAA is not set
327CONFIG_MTD_CFI_UTIL=y
328CONFIG_MTD_RAM=y
329CONFIG_MTD_ROM=y
330# CONFIG_MTD_ABSENT is not set
331
332#
333# Mapping drivers for chip access
334#
335# CONFIG_MTD_COMPLEX_MAPPINGS is not set
336# CONFIG_MTD_PHYSMAP is not set
337# CONFIG_MTD_PLATRAM is not set
338
339#
340# Self-contained MTD device drivers
341#
342# CONFIG_MTD_SLRAM is not set
343# CONFIG_MTD_PHRAM is not set
344# CONFIG_MTD_MTDRAM is not set
345# CONFIG_MTD_BLOCK2MTD is not set
346
347#
348# Disk-On-Chip Device Drivers
349#
350# CONFIG_MTD_DOC2000 is not set
351# CONFIG_MTD_DOC2001 is not set
352# CONFIG_MTD_DOC2001PLUS is not set
353# CONFIG_MTD_NAND is not set
354# CONFIG_MTD_ONENAND is not set
355
356#
357# UBI - Unsorted block images
358#
359# CONFIG_MTD_UBI is not set
360# CONFIG_PARPORT is not set
361CONFIG_BLK_DEV=y
362# CONFIG_BLK_DEV_COW_COMMON is not set
363CONFIG_BLK_DEV_LOOP=y
364# CONFIG_BLK_DEV_CRYPTOLOOP is not set
365# CONFIG_BLK_DEV_NBD is not set
366CONFIG_BLK_DEV_RAM=y
367CONFIG_BLK_DEV_RAM_COUNT=16
368CONFIG_BLK_DEV_RAM_SIZE=4096
369CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
370# CONFIG_CDROM_PKTCDVD is not set
371# CONFIG_ATA_OVER_ETH is not set
372CONFIG_MISC_DEVICES=y
373# CONFIG_EEPROM_93CX6 is not set
374CONFIG_IDE=y
375CONFIG_IDE_MAX_HWIFS=4
376CONFIG_BLK_DEV_IDE=y
377
378#
379# Please see Documentation/ide.txt for help/info on IDE drives
380#
381# CONFIG_BLK_DEV_IDE_SATA is not set
382CONFIG_BLK_DEV_IDEDISK=y
383# CONFIG_IDEDISK_MULTI_MODE is not set
384CONFIG_BLK_DEV_IDECS=y
385# CONFIG_BLK_DEV_IDECD is not set
386# CONFIG_BLK_DEV_IDETAPE is not set
387# CONFIG_BLK_DEV_IDEFLOPPY is not set
388# CONFIG_IDE_TASK_IOCTL is not set
389CONFIG_IDE_PROC_FS=y
390
391#
392# IDE chipset support/bugfixes
393#
394# CONFIG_IDE_GENERIC is not set
395# CONFIG_IDEPCI_PCIBUS_ORDER is not set
396# CONFIG_IDE_ARM is not set
397# CONFIG_BLK_DEV_IDEDMA is not set
398# CONFIG_BLK_DEV_HD is not set
399
400#
401# SCSI device support
402#
403# CONFIG_RAID_ATTRS is not set
404# CONFIG_SCSI is not set
405# CONFIG_SCSI_DMA is not set
406# CONFIG_SCSI_NETLINK is not set
407# CONFIG_MD is not set
408CONFIG_NETDEVICES=y
409# CONFIG_NETDEVICES_MULTIQUEUE is not set
410# CONFIG_DUMMY is not set
411# CONFIG_BONDING is not set
412# CONFIG_MACVLAN is not set
413# CONFIG_EQUALIZER is not set
414# CONFIG_TUN is not set
415# CONFIG_NET_ETHERNET is not set
416CONFIG_NETDEV_1000=y
417CONFIG_NETDEV_10000=y
418
419#
420# Wireless LAN
421#
422# CONFIG_WLAN_PRE80211 is not set
423# CONFIG_WLAN_80211 is not set
424CONFIG_NET_PCMCIA=y
425# CONFIG_PCMCIA_3C589 is not set
426# CONFIG_PCMCIA_3C574 is not set
427# CONFIG_PCMCIA_FMVJ18X is not set
428CONFIG_PCMCIA_PCNET=y
429# CONFIG_PCMCIA_NMCLAN is not set
430# CONFIG_PCMCIA_SMC91C92 is not set
431# CONFIG_PCMCIA_XIRC2PS is not set
432# CONFIG_PCMCIA_AXNET is not set
433# CONFIG_WAN is not set
434# CONFIG_PPP is not set
435# CONFIG_SLIP is not set
436# CONFIG_SHAPER is not set
437# CONFIG_NETCONSOLE is not set
438# CONFIG_NETPOLL is not set
439# CONFIG_NET_POLL_CONTROLLER is not set
440# CONFIG_ISDN is not set
441# CONFIG_PHONE is not set
442
443#
444# Input device support
445#
446# CONFIG_INPUT is not set
447
448#
449# Hardware I/O ports
450#
451# CONFIG_SERIO is not set
452# CONFIG_GAMEPORT is not set
453
454#
455# Character devices
456#
457# CONFIG_VT is not set
458# CONFIG_SERIAL_NONSTANDARD is not set
459
460#
461# Serial drivers
462#
463CONFIG_SERIAL_8250=y
464CONFIG_SERIAL_8250_CONSOLE=y
465# CONFIG_SERIAL_8250_CS is not set
466CONFIG_SERIAL_8250_NR_UARTS=4
467CONFIG_SERIAL_8250_RUNTIME_UARTS=4
468# CONFIG_SERIAL_8250_EXTENDED is not set
469
470#
471# Non-8250 serial port support
472#
473CONFIG_SERIAL_CORE=y
474CONFIG_SERIAL_CORE_CONSOLE=y
475# CONFIG_SERIAL_M32R_SIO is not set
476CONFIG_UNIX98_PTYS=y
477CONFIG_LEGACY_PTYS=y
478CONFIG_LEGACY_PTY_COUNT=256
479# CONFIG_IPMI_HANDLER is not set
480# CONFIG_WATCHDOG is not set
481CONFIG_HW_RANDOM=m
482# CONFIG_RTC is not set
483# CONFIG_R3964 is not set
484
485#
486# PCMCIA character devices
487#
488# CONFIG_SYNCLINK_CS is not set
489# CONFIG_CARDMAN_4000 is not set
490# CONFIG_CARDMAN_4040 is not set
491# CONFIG_RAW_DRIVER is not set
492# CONFIG_TCG_TPM is not set
493# CONFIG_I2C is not set
494
495#
496# SPI support
497#
498# CONFIG_SPI is not set
499# CONFIG_SPI_MASTER is not set
500# CONFIG_W1 is not set
501# CONFIG_POWER_SUPPLY is not set
502# CONFIG_HWMON is not set
503
504#
505# Multifunction device drivers
506#
507# CONFIG_MFD_SM501 is not set
508
509#
510# Multimedia devices
511#
512# CONFIG_VIDEO_DEV is not set
513# CONFIG_DVB_CORE is not set
514CONFIG_DAB=y
515
516#
517# Graphics support
518#
519# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
520
521#
522# Display device support
523#
524# CONFIG_DISPLAY_SUPPORT is not set
525# CONFIG_VGASTATE is not set
526CONFIG_VIDEO_OUTPUT_CONTROL=m
527# CONFIG_FB is not set
528
529#
530# Sound
531#
532# CONFIG_SOUND is not set
533CONFIG_USB_SUPPORT=y
534# CONFIG_USB_ARCH_HAS_HCD is not set
535# CONFIG_USB_ARCH_HAS_OHCI is not set
536# CONFIG_USB_ARCH_HAS_EHCI is not set
537
538#
539# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
540#
541
542#
543# USB Gadget Support
544#
545# CONFIG_USB_GADGET is not set
546# CONFIG_MMC is not set
547# CONFIG_NEW_LEDS is not set
548
549#
550# Real Time Clock
551#
552# CONFIG_RTC_CLASS is not set
553
554#
555# Userspace I/O
556#
557# CONFIG_UIO is not set
558
559#
560# File systems
561#
562CONFIG_EXT2_FS=y
563# CONFIG_EXT2_FS_XATTR is not set
564# CONFIG_EXT2_FS_XIP is not set
565CONFIG_EXT3_FS=y
566# CONFIG_EXT3_FS_XATTR is not set
567# CONFIG_EXT4DEV_FS is not set
568CONFIG_JBD=y
569# CONFIG_JBD_DEBUG is not set
570# CONFIG_REISERFS_FS is not set
571# CONFIG_JFS_FS is not set
572# CONFIG_FS_POSIX_ACL is not set
573# CONFIG_XFS_FS is not set
574# CONFIG_GFS2_FS is not set
575# CONFIG_OCFS2_FS is not set
576# CONFIG_MINIX_FS is not set
577# CONFIG_ROMFS_FS is not set
578CONFIG_INOTIFY=y
579CONFIG_INOTIFY_USER=y
580# CONFIG_QUOTA is not set
581CONFIG_DNOTIFY=y
582# CONFIG_AUTOFS_FS is not set
583# CONFIG_AUTOFS4_FS is not set
584# CONFIG_FUSE_FS is not set
585
586#
587# CD-ROM/DVD Filesystems
588#
589# CONFIG_ISO9660_FS is not set
590# CONFIG_UDF_FS is not set
591
592#
593# DOS/FAT/NT Filesystems
594#
595# CONFIG_MSDOS_FS is not set
596# CONFIG_VFAT_FS is not set
597# CONFIG_NTFS_FS is not set
598
599#
600# Pseudo filesystems
601#
602CONFIG_PROC_FS=y
603CONFIG_PROC_KCORE=y
604CONFIG_PROC_SYSCTL=y
605CONFIG_SYSFS=y
606CONFIG_TMPFS=y
607# CONFIG_TMPFS_POSIX_ACL is not set
608# CONFIG_HUGETLB_PAGE is not set
609CONFIG_RAMFS=y
610# CONFIG_CONFIGFS_FS is not set
611
612#
613# Miscellaneous filesystems
614#
615# CONFIG_ADFS_FS is not set
616# CONFIG_AFFS_FS is not set
617# CONFIG_HFS_FS is not set
618# CONFIG_HFSPLUS_FS is not set
619# CONFIG_BEFS_FS is not set
620# CONFIG_BFS_FS is not set
621# CONFIG_EFS_FS is not set
622CONFIG_JFFS2_FS=y
623CONFIG_JFFS2_FS_DEBUG=0
624CONFIG_JFFS2_FS_WRITEBUFFER=y
625# CONFIG_JFFS2_SUMMARY is not set
626# CONFIG_JFFS2_FS_XATTR is not set
627# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
628CONFIG_JFFS2_ZLIB=y
629CONFIG_JFFS2_RTIME=y
630# CONFIG_JFFS2_RUBIN is not set
631CONFIG_CRAMFS=y
632# CONFIG_VXFS_FS is not set
633# CONFIG_HPFS_FS is not set
634# CONFIG_QNX4FS_FS is not set
635# CONFIG_SYSV_FS is not set
636# CONFIG_UFS_FS is not set
637
638#
639# Network File Systems
640#
641CONFIG_NFS_FS=y
642CONFIG_NFS_V3=y
643# CONFIG_NFS_V3_ACL is not set
644# CONFIG_NFS_V4 is not set
645# CONFIG_NFS_DIRECTIO is not set
646# CONFIG_NFSD is not set
647CONFIG_ROOT_NFS=y
648CONFIG_LOCKD=y
649CONFIG_LOCKD_V4=y
650CONFIG_NFS_COMMON=y
651CONFIG_SUNRPC=y
652# CONFIG_SUNRPC_BIND34 is not set
653# CONFIG_RPCSEC_GSS_KRB5 is not set
654# CONFIG_RPCSEC_GSS_SPKM3 is not set
655# CONFIG_SMB_FS is not set
656# CONFIG_CIFS is not set
657# CONFIG_NCP_FS is not set
658# CONFIG_CODA_FS is not set
659# CONFIG_AFS_FS is not set
660
661#
662# Partition Types
663#
664# CONFIG_PARTITION_ADVANCED is not set
665CONFIG_MSDOS_PARTITION=y
666
667#
668# Native Language Support
669#
670# CONFIG_NLS is not set
671
672#
673# Distributed Lock Manager
674#
675# CONFIG_DLM is not set
676
677#
678# Profiling support
679#
680# CONFIG_PROFILING is not set
681
682#
683# Kernel hacking
684#
685# CONFIG_PRINTK_TIME is not set
686CONFIG_ENABLE_MUST_CHECK=y
687# CONFIG_MAGIC_SYSRQ is not set
688# CONFIG_UNUSED_SYMBOLS is not set
689# CONFIG_DEBUG_FS is not set
690# CONFIG_HEADERS_CHECK is not set
691CONFIG_DEBUG_KERNEL=y
692# CONFIG_DEBUG_SHIRQ is not set
693CONFIG_DETECT_SOFTLOCKUP=y
694CONFIG_SCHED_DEBUG=y
695# CONFIG_SCHEDSTATS is not set
696# CONFIG_TIMER_STATS is not set
697# CONFIG_DEBUG_SLAB is not set
698# CONFIG_DEBUG_RT_MUTEXES is not set
699# CONFIG_RT_MUTEX_TESTER is not set
700# CONFIG_DEBUG_SPINLOCK is not set
701# CONFIG_DEBUG_MUTEXES is not set
702# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
703# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
704# CONFIG_DEBUG_KOBJECT is not set
705CONFIG_DEBUG_BUGVERBOSE=y
706CONFIG_DEBUG_INFO=y
707# CONFIG_DEBUG_VM is not set
708# CONFIG_DEBUG_LIST is not set
709CONFIG_FRAME_POINTER=y
710CONFIG_FORCED_INLINING=y
711# CONFIG_RCU_TORTURE_TEST is not set
712# CONFIG_FAULT_INJECTION is not set
713# CONFIG_DEBUG_STACKOVERFLOW is not set
714# CONFIG_DEBUG_STACK_USAGE is not set
715
716#
717# Security options
718#
719# CONFIG_KEYS is not set
720# CONFIG_SECURITY is not set
721CONFIG_CRYPTO=y
722CONFIG_CRYPTO_ALGAPI=y
723CONFIG_CRYPTO_BLKCIPHER=y
724CONFIG_CRYPTO_HASH=y
725CONFIG_CRYPTO_MANAGER=y
726CONFIG_CRYPTO_HMAC=y
727# CONFIG_CRYPTO_XCBC is not set
728# CONFIG_CRYPTO_NULL is not set
729# CONFIG_CRYPTO_MD4 is not set
730CONFIG_CRYPTO_MD5=y
731CONFIG_CRYPTO_SHA1=y
732# CONFIG_CRYPTO_SHA256 is not set
733# CONFIG_CRYPTO_SHA512 is not set
734# CONFIG_CRYPTO_WP512 is not set
735# CONFIG_CRYPTO_TGR192 is not set
736# CONFIG_CRYPTO_GF128MUL is not set
737CONFIG_CRYPTO_ECB=y
738CONFIG_CRYPTO_CBC=y
739CONFIG_CRYPTO_PCBC=m
740# CONFIG_CRYPTO_LRW is not set
741# CONFIG_CRYPTO_CRYPTD is not set
742CONFIG_CRYPTO_DES=y
743# CONFIG_CRYPTO_FCRYPT is not set
744# CONFIG_CRYPTO_BLOWFISH is not set
745# CONFIG_CRYPTO_TWOFISH is not set
746# CONFIG_CRYPTO_SERPENT is not set
747CONFIG_CRYPTO_AES=y
748# CONFIG_CRYPTO_CAST5 is not set
749# CONFIG_CRYPTO_CAST6 is not set
750# CONFIG_CRYPTO_TEA is not set
751CONFIG_CRYPTO_ARC4=y
752# CONFIG_CRYPTO_KHAZAD is not set
753# CONFIG_CRYPTO_ANUBIS is not set
754CONFIG_CRYPTO_DEFLATE=y
755CONFIG_CRYPTO_MICHAEL_MIC=y
756# CONFIG_CRYPTO_CRC32C is not set
757# CONFIG_CRYPTO_CAMELLIA is not set
758# CONFIG_CRYPTO_TEST is not set
759CONFIG_CRYPTO_HW=y
760
761#
762# Library routines
763#
764CONFIG_BITREVERSE=y
765# CONFIG_CRC_CCITT is not set
766# CONFIG_CRC16 is not set
767# CONFIG_CRC_ITU_T is not set
768CONFIG_CRC32=y
769# CONFIG_CRC7 is not set
770# CONFIG_LIBCRC32C is not set
771CONFIG_ZLIB_INFLATE=y
772CONFIG_ZLIB_DEFLATE=y
773CONFIG_PLIST=y
774CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/defconfig b/arch/m32r/defconfig
index 13579917af..af3b981791 100644
--- a/arch/m32r/defconfig
+++ b/arch/m32r/defconfig
@@ -1,12 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.23-rc1
4# Tue Dec 12 17:52:38 2006 4# Wed Aug 1 17:22:35 2007
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
8CONFIG_GENERIC_HARDIRQS=y 9CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 14
12# 15#
@@ -23,19 +26,20 @@ CONFIG_LOCALVERSION=""
23CONFIG_LOCALVERSION_AUTO=y 26CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 27CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 28CONFIG_SYSVIPC=y
26# CONFIG_IPC_NS is not set 29CONFIG_SYSVIPC_SYSCTL=y
27# CONFIG_POSIX_MQUEUE is not set 30# CONFIG_POSIX_MQUEUE is not set
28CONFIG_BSD_PROCESS_ACCT=y 31CONFIG_BSD_PROCESS_ACCT=y
29# CONFIG_BSD_PROCESS_ACCT_V3 is not set 32# CONFIG_BSD_PROCESS_ACCT_V3 is not set
30# CONFIG_TASKSTATS is not set 33# CONFIG_TASKSTATS is not set
31# CONFIG_UTS_NS is not set 34# CONFIG_USER_NS is not set
32# CONFIG_AUDIT is not set 35# CONFIG_AUDIT is not set
33CONFIG_IKCONFIG=y 36CONFIG_IKCONFIG=y
34CONFIG_IKCONFIG_PROC=y 37CONFIG_IKCONFIG_PROC=y
38CONFIG_LOG_BUF_SHIFT=15
35# CONFIG_CPUSETS is not set 39# CONFIG_CPUSETS is not set
36CONFIG_SYSFS_DEPRECATED=y 40CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set 41# CONFIG_RELAY is not set
38CONFIG_INITRAMFS_SOURCE="" 42# CONFIG_BLK_DEV_INITRD is not set
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SYSCTL=y 44CONFIG_SYSCTL=y
41CONFIG_EMBEDDED=y 45CONFIG_EMBEDDED=y
@@ -47,17 +51,18 @@ CONFIG_BUG=y
47CONFIG_ELF_CORE=y 51CONFIG_ELF_CORE=y
48CONFIG_BASE_FULL=y 52CONFIG_BASE_FULL=y
49# CONFIG_FUTEX is not set 53# CONFIG_FUTEX is not set
54CONFIG_ANON_INODES=y
50# CONFIG_EPOLL is not set 55# CONFIG_EPOLL is not set
56CONFIG_SIGNALFD=y
57CONFIG_TIMERFD=y
58CONFIG_EVENTFD=y
51CONFIG_SHMEM=y 59CONFIG_SHMEM=y
52CONFIG_SLAB=y
53CONFIG_VM_EVENT_COUNTERS=y 60CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_SLAB=y
62# CONFIG_SLUB is not set
63# CONFIG_SLOB is not set
54# CONFIG_TINY_SHMEM is not set 64# CONFIG_TINY_SHMEM is not set
55CONFIG_BASE_SMALL=0 65CONFIG_BASE_SMALL=0
56# CONFIG_SLOB is not set
57
58#
59# Loadable module support
60#
61CONFIG_MODULES=y 66CONFIG_MODULES=y
62CONFIG_MODULE_UNLOAD=y 67CONFIG_MODULE_UNLOAD=y
63# CONFIG_MODULE_FORCE_UNLOAD is not set 68# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -65,12 +70,11 @@ CONFIG_MODULE_UNLOAD=y
65# CONFIG_MODULE_SRCVERSION_ALL is not set 70# CONFIG_MODULE_SRCVERSION_ALL is not set
66CONFIG_KMOD=y 71CONFIG_KMOD=y
67CONFIG_STOP_MACHINE=y 72CONFIG_STOP_MACHINE=y
68
69#
70# Block layer
71#
72CONFIG_BLOCK=y 73CONFIG_BLOCK=y
74# CONFIG_LBD is not set
73# CONFIG_BLK_DEV_IO_TRACE is not set 75# CONFIG_BLK_DEV_IO_TRACE is not set
76# CONFIG_LSF is not set
77# CONFIG_BLK_DEV_BSG is not set
74 78
75# 79#
76# IO Schedulers 80# IO Schedulers
@@ -123,13 +127,19 @@ CONFIG_NEED_MULTIPLE_NODES=y
123# CONFIG_SPARSEMEM_STATIC is not set 127# CONFIG_SPARSEMEM_STATIC is not set
124CONFIG_SPLIT_PTLOCK_CPUS=4 128CONFIG_SPLIT_PTLOCK_CPUS=4
125# CONFIG_RESOURCES_64BIT is not set 129# CONFIG_RESOURCES_64BIT is not set
130CONFIG_ZONE_DMA_FLAG=1
131CONFIG_BOUNCE=y
132CONFIG_VIRT_TO_BUS=y
126CONFIG_IRAM_START=0x00f00000 133CONFIG_IRAM_START=0x00f00000
127CONFIG_IRAM_SIZE=0x00080000 134CONFIG_IRAM_SIZE=0x00080000
128CONFIG_RWSEM_GENERIC_SPINLOCK=y 135CONFIG_RWSEM_GENERIC_SPINLOCK=y
129# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 136# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
137# CONFIG_ARCH_HAS_ILOG2_U32 is not set
138# CONFIG_ARCH_HAS_ILOG2_U64 is not set
130CONFIG_GENERIC_FIND_NEXT_BIT=y 139CONFIG_GENERIC_FIND_NEXT_BIT=y
131CONFIG_GENERIC_HWEIGHT=y 140CONFIG_GENERIC_HWEIGHT=y
132CONFIG_GENERIC_CALIBRATE_DELAY=y 141CONFIG_GENERIC_CALIBRATE_DELAY=y
142CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
133CONFIG_PREEMPT=y 143CONFIG_PREEMPT=y
134CONFIG_SMP=y 144CONFIG_SMP=y
135# CONFIG_CHIP_M32700_TS1 is not set 145# CONFIG_CHIP_M32700_TS1 is not set
@@ -139,6 +149,7 @@ CONFIG_NODES_SHIFT=1
139# 149#
140# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 150# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
141# 151#
152# CONFIG_ARCH_SUPPORTS_MSI is not set
142# CONFIG_ISA is not set 153# CONFIG_ISA is not set
143 154
144# 155#
@@ -147,10 +158,6 @@ CONFIG_NODES_SHIFT=1
147# CONFIG_PCCARD is not set 158# CONFIG_PCCARD is not set
148 159
149# 160#
150# PCI Hotplug Support
151#
152
153#
154# Executable file formats 161# Executable file formats
155# 162#
156CONFIG_BINFMT_ELF=y 163CONFIG_BINFMT_ELF=y
@@ -164,13 +171,13 @@ CONFIG_NET=y
164# 171#
165# Networking options 172# Networking options
166# 173#
167# CONFIG_NETDEBUG is not set
168CONFIG_PACKET=y 174CONFIG_PACKET=y
169# CONFIG_PACKET_MMAP is not set 175# CONFIG_PACKET_MMAP is not set
170CONFIG_UNIX=y 176CONFIG_UNIX=y
171CONFIG_XFRM=y 177CONFIG_XFRM=y
172# CONFIG_XFRM_USER is not set 178# CONFIG_XFRM_USER is not set
173# CONFIG_XFRM_SUB_POLICY is not set 179# CONFIG_XFRM_SUB_POLICY is not set
180# CONFIG_XFRM_MIGRATE is not set
174# CONFIG_NET_KEY is not set 181# CONFIG_NET_KEY is not set
175CONFIG_INET=y 182CONFIG_INET=y
176# CONFIG_IP_MULTICAST is not set 183# CONFIG_IP_MULTICAST is not set
@@ -203,20 +210,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
203# CONFIG_INET6_TUNNEL is not set 210# CONFIG_INET6_TUNNEL is not set
204# CONFIG_NETWORK_SECMARK is not set 211# CONFIG_NETWORK_SECMARK is not set
205# CONFIG_NETFILTER is not set 212# CONFIG_NETFILTER is not set
206
207#
208# DCCP Configuration (EXPERIMENTAL)
209#
210# CONFIG_IP_DCCP is not set 213# CONFIG_IP_DCCP is not set
211
212#
213# SCTP Configuration (EXPERIMENTAL)
214#
215# CONFIG_IP_SCTP is not set 214# CONFIG_IP_SCTP is not set
216
217#
218# TIPC Configuration (EXPERIMENTAL)
219#
220# CONFIG_TIPC is not set 215# CONFIG_TIPC is not set
221# CONFIG_ATM is not set 216# CONFIG_ATM is not set
222# CONFIG_BRIDGE is not set 217# CONFIG_BRIDGE is not set
@@ -242,7 +237,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
242# CONFIG_HAMRADIO is not set 237# CONFIG_HAMRADIO is not set
243# CONFIG_IRDA is not set 238# CONFIG_IRDA is not set
244# CONFIG_BT is not set 239# CONFIG_BT is not set
240# CONFIG_AF_RXRPC is not set
241
242#
243# Wireless
244#
245# CONFIG_CFG80211 is not set
246# CONFIG_WIRELESS_EXT is not set
247# CONFIG_MAC80211 is not set
245# CONFIG_IEEE80211 is not set 248# CONFIG_IEEE80211 is not set
249# CONFIG_RFKILL is not set
250# CONFIG_NET_9P is not set
246 251
247# 252#
248# Device Drivers 253# Device Drivers
@@ -255,15 +260,7 @@ CONFIG_STANDALONE=y
255CONFIG_PREVENT_FIRMWARE_BUILD=y 260CONFIG_PREVENT_FIRMWARE_BUILD=y
256CONFIG_FW_LOADER=y 261CONFIG_FW_LOADER=y
257# CONFIG_SYS_HYPERVISOR is not set 262# CONFIG_SYS_HYPERVISOR is not set
258
259#
260# Connector - unified userspace <-> kernelspace linker
261#
262# CONFIG_CONNECTOR is not set 263# CONFIG_CONNECTOR is not set
263
264#
265# Memory Technology Devices (MTD)
266#
267CONFIG_MTD=y 264CONFIG_MTD=y
268# CONFIG_MTD_DEBUG is not set 265# CONFIG_MTD_DEBUG is not set
269# CONFIG_MTD_CONCAT is not set 266# CONFIG_MTD_CONCAT is not set
@@ -278,6 +275,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
278# User Modules And Translation Layers 275# User Modules And Translation Layers
279# 276#
280# CONFIG_MTD_CHAR is not set 277# CONFIG_MTD_CHAR is not set
278CONFIG_MTD_BLKDEVS=y
281CONFIG_MTD_BLOCK=y 279CONFIG_MTD_BLOCK=y
282# CONFIG_FTL is not set 280# CONFIG_FTL is not set
283# CONFIG_NFTL is not set 281# CONFIG_NFTL is not set
@@ -314,7 +312,6 @@ CONFIG_MTD_CFI_UTIL=m
314# CONFIG_MTD_RAM is not set 312# CONFIG_MTD_RAM is not set
315# CONFIG_MTD_ROM is not set 313# CONFIG_MTD_ROM is not set
316# CONFIG_MTD_ABSENT is not set 314# CONFIG_MTD_ABSENT is not set
317# CONFIG_MTD_OBSOLETE_CHIPS is not set
318 315
319# 316#
320# Mapping drivers for chip access 317# Mapping drivers for chip access
@@ -337,29 +334,15 @@ CONFIG_MTD_CFI_UTIL=m
337# CONFIG_MTD_DOC2000 is not set 334# CONFIG_MTD_DOC2000 is not set
338# CONFIG_MTD_DOC2001 is not set 335# CONFIG_MTD_DOC2001 is not set
339# CONFIG_MTD_DOC2001PLUS is not set 336# CONFIG_MTD_DOC2001PLUS is not set
340
341#
342# NAND Flash Device Drivers
343#
344# CONFIG_MTD_NAND is not set 337# CONFIG_MTD_NAND is not set
345
346#
347# OneNAND Flash Device Drivers
348#
349# CONFIG_MTD_ONENAND is not set 338# CONFIG_MTD_ONENAND is not set
350 339
351# 340#
352# Parallel port support 341# UBI - Unsorted block images
353# 342#
343# CONFIG_MTD_UBI is not set
354# CONFIG_PARPORT is not set 344# CONFIG_PARPORT is not set
355 345CONFIG_BLK_DEV=y
356#
357# Plug and Play support
358#
359
360#
361# Block devices
362#
363# CONFIG_BLK_DEV_COW_COMMON is not set 346# CONFIG_BLK_DEV_COW_COMMON is not set
364CONFIG_BLK_DEV_LOOP=y 347CONFIG_BLK_DEV_LOOP=y
365# CONFIG_BLK_DEV_CRYPTOLOOP is not set 348# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -368,18 +351,10 @@ CONFIG_BLK_DEV_RAM=y
368CONFIG_BLK_DEV_RAM_COUNT=16 351CONFIG_BLK_DEV_RAM_COUNT=16
369CONFIG_BLK_DEV_RAM_SIZE=4096 352CONFIG_BLK_DEV_RAM_SIZE=4096
370CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 353CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
371# CONFIG_BLK_DEV_INITRD is not set
372# CONFIG_CDROM_PKTCDVD is not set 354# CONFIG_CDROM_PKTCDVD is not set
373CONFIG_ATA_OVER_ETH=m 355CONFIG_ATA_OVER_ETH=m
374 356CONFIG_MISC_DEVICES=y
375# 357# CONFIG_EEPROM_93CX6 is not set
376# Misc devices
377#
378# CONFIG_TIFM_CORE is not set
379
380#
381# ATA/ATAPI/MFM/RLL support
382#
383CONFIG_IDE=y 358CONFIG_IDE=y
384CONFIG_IDE_MAX_HWIFS=4 359CONFIG_IDE_MAX_HWIFS=4
385CONFIG_BLK_DEV_IDE=y 360CONFIG_BLK_DEV_IDE=y
@@ -395,14 +370,15 @@ CONFIG_BLK_DEV_IDECD=m
395# CONFIG_BLK_DEV_IDEFLOPPY is not set 370# CONFIG_BLK_DEV_IDEFLOPPY is not set
396# CONFIG_BLK_DEV_IDESCSI is not set 371# CONFIG_BLK_DEV_IDESCSI is not set
397# CONFIG_IDE_TASK_IOCTL is not set 372# CONFIG_IDE_TASK_IOCTL is not set
373CONFIG_IDE_PROC_FS=y
398 374
399# 375#
400# IDE chipset support/bugfixes 376# IDE chipset support/bugfixes
401# 377#
402CONFIG_IDE_GENERIC=y 378CONFIG_IDE_GENERIC=y
379# CONFIG_IDEPCI_PCIBUS_ORDER is not set
403# CONFIG_IDE_ARM is not set 380# CONFIG_IDE_ARM is not set
404# CONFIG_BLK_DEV_IDEDMA is not set 381# CONFIG_BLK_DEV_IDEDMA is not set
405# CONFIG_IDEDMA_AUTO is not set
406# CONFIG_BLK_DEV_HD is not set 382# CONFIG_BLK_DEV_HD is not set
407 383
408# 384#
@@ -410,6 +386,8 @@ CONFIG_IDE_GENERIC=y
410# 386#
411# CONFIG_RAID_ATTRS is not set 387# CONFIG_RAID_ATTRS is not set
412CONFIG_SCSI=m 388CONFIG_SCSI=m
389# CONFIG_SCSI_DMA is not set
390# CONFIG_SCSI_TGT is not set
413# CONFIG_SCSI_NETLINK is not set 391# CONFIG_SCSI_NETLINK is not set
414CONFIG_SCSI_PROC_FS=y 392CONFIG_SCSI_PROC_FS=y
415 393
@@ -430,6 +408,8 @@ CONFIG_CHR_DEV_SG=m
430CONFIG_SCSI_MULTI_LUN=y 408CONFIG_SCSI_MULTI_LUN=y
431# CONFIG_SCSI_CONSTANTS is not set 409# CONFIG_SCSI_CONSTANTS is not set
432# CONFIG_SCSI_LOGGING is not set 410# CONFIG_SCSI_LOGGING is not set
411# CONFIG_SCSI_SCAN_ASYNC is not set
412CONFIG_SCSI_WAIT_SCAN=m
433 413
434# 414#
435# SCSI Transports 415# SCSI Transports
@@ -437,79 +417,31 @@ CONFIG_SCSI_MULTI_LUN=y
437# CONFIG_SCSI_SPI_ATTRS is not set 417# CONFIG_SCSI_SPI_ATTRS is not set
438# CONFIG_SCSI_FC_ATTRS is not set 418# CONFIG_SCSI_FC_ATTRS is not set
439# CONFIG_SCSI_ISCSI_ATTRS is not set 419# CONFIG_SCSI_ISCSI_ATTRS is not set
440# CONFIG_SCSI_SAS_ATTRS is not set
441# CONFIG_SCSI_SAS_LIBSAS is not set 420# CONFIG_SCSI_SAS_LIBSAS is not set
442 421CONFIG_SCSI_LOWLEVEL=y
443#
444# SCSI low-level drivers
445#
446# CONFIG_ISCSI_TCP is not set 422# CONFIG_ISCSI_TCP is not set
447# CONFIG_SCSI_DEBUG is not set 423# CONFIG_SCSI_DEBUG is not set
448
449#
450# Serial ATA (prod) and Parallel ATA (experimental) drivers
451#
452
453#
454# Multi-device support (RAID and LVM)
455#
456# CONFIG_MD is not set 424# CONFIG_MD is not set
457
458#
459# Fusion MPT device support
460#
461# CONFIG_FUSION is not set
462
463#
464# IEEE 1394 (FireWire) support
465#
466
467#
468# I2O device support
469#
470
471#
472# Network device support
473#
474CONFIG_NETDEVICES=y 425CONFIG_NETDEVICES=y
426# CONFIG_NETDEVICES_MULTIQUEUE is not set
475# CONFIG_DUMMY is not set 427# CONFIG_DUMMY is not set
476# CONFIG_BONDING is not set 428# CONFIG_BONDING is not set
429# CONFIG_MACVLAN is not set
477# CONFIG_EQUALIZER is not set 430# CONFIG_EQUALIZER is not set
478# CONFIG_TUN is not set 431# CONFIG_TUN is not set
479
480#
481# PHY device support
482#
483# CONFIG_PHYLIB is not set 432# CONFIG_PHYLIB is not set
484
485#
486# Ethernet (10 or 100Mbit)
487#
488CONFIG_NET_ETHERNET=y 433CONFIG_NET_ETHERNET=y
489CONFIG_MII=y 434CONFIG_MII=y
490CONFIG_SMC91X=y 435CONFIG_SMC91X=y
491# CONFIG_NE2000 is not set 436# CONFIG_NE2000 is not set
437CONFIG_NETDEV_1000=y
438CONFIG_NETDEV_10000=y
492 439
493# 440#
494# Ethernet (1000 Mbit) 441# Wireless LAN
495#
496
497#
498# Ethernet (10000 Mbit)
499#
500
501#
502# Token Ring devices
503#
504
505#
506# Wireless LAN (non-hamradio)
507#
508# CONFIG_NET_RADIO is not set
509
510#
511# Wan interfaces
512# 442#
443# CONFIG_WLAN_PRE80211 is not set
444# CONFIG_WLAN_80211 is not set
513# CONFIG_WAN is not set 445# CONFIG_WAN is not set
514# CONFIG_PPP is not set 446# CONFIG_PPP is not set
515# CONFIG_SLIP is not set 447# CONFIG_SLIP is not set
@@ -517,15 +449,7 @@ CONFIG_SMC91X=y
517# CONFIG_NETCONSOLE is not set 449# CONFIG_NETCONSOLE is not set
518# CONFIG_NETPOLL is not set 450# CONFIG_NETPOLL is not set
519# CONFIG_NET_POLL_CONTROLLER is not set 451# CONFIG_NET_POLL_CONTROLLER is not set
520
521#
522# ISDN subsystem
523#
524# CONFIG_ISDN is not set 452# CONFIG_ISDN is not set
525
526#
527# Telephony Support
528#
529# CONFIG_PHONE is not set 453# CONFIG_PHONE is not set
530 454
531# 455#
@@ -533,6 +457,7 @@ CONFIG_SMC91X=y
533# 457#
534CONFIG_INPUT=y 458CONFIG_INPUT=y
535# CONFIG_INPUT_FF_MEMLESS is not set 459# CONFIG_INPUT_FF_MEMLESS is not set
460# CONFIG_INPUT_POLLDEV is not set
536 461
537# 462#
538# Userland interfaces 463# Userland interfaces
@@ -549,6 +474,7 @@ CONFIG_INPUT=y
549# CONFIG_INPUT_KEYBOARD is not set 474# CONFIG_INPUT_KEYBOARD is not set
550# CONFIG_INPUT_MOUSE is not set 475# CONFIG_INPUT_MOUSE is not set
551# CONFIG_INPUT_JOYSTICK is not set 476# CONFIG_INPUT_JOYSTICK is not set
477# CONFIG_INPUT_TABLET is not set
552# CONFIG_INPUT_TOUCHSCREEN is not set 478# CONFIG_INPUT_TOUCHSCREEN is not set
553# CONFIG_INPUT_MISC is not set 479# CONFIG_INPUT_MISC is not set
554 480
@@ -587,35 +513,14 @@ CONFIG_SERIAL_M32R_PLDSIO=y
587CONFIG_UNIX98_PTYS=y 513CONFIG_UNIX98_PTYS=y
588CONFIG_LEGACY_PTYS=y 514CONFIG_LEGACY_PTYS=y
589CONFIG_LEGACY_PTY_COUNT=256 515CONFIG_LEGACY_PTY_COUNT=256
590
591#
592# IPMI
593#
594# CONFIG_IPMI_HANDLER is not set 516# CONFIG_IPMI_HANDLER is not set
595
596#
597# Watchdog Cards
598#
599# CONFIG_WATCHDOG is not set 517# CONFIG_WATCHDOG is not set
600CONFIG_HW_RANDOM=y 518CONFIG_HW_RANDOM=y
601# CONFIG_RTC is not set 519# CONFIG_RTC is not set
602CONFIG_DS1302=y 520CONFIG_DS1302=y
603# CONFIG_DTLK is not set
604# CONFIG_R3964 is not set 521# CONFIG_R3964 is not set
605
606#
607# Ftape, the floppy tape device driver
608#
609# CONFIG_RAW_DRIVER is not set 522# CONFIG_RAW_DRIVER is not set
610
611#
612# TPM devices
613#
614# CONFIG_TCG_TPM is not set 523# CONFIG_TCG_TPM is not set
615
616#
617# I2C support
618#
619# CONFIG_I2C is not set 524# CONFIG_I2C is not set
620 525
621# 526#
@@ -623,65 +528,76 @@ CONFIG_DS1302=y
623# 528#
624# CONFIG_SPI is not set 529# CONFIG_SPI is not set
625# CONFIG_SPI_MASTER is not set 530# CONFIG_SPI_MASTER is not set
626
627#
628# Dallas's 1-wire bus
629#
630# CONFIG_W1 is not set 531# CONFIG_W1 is not set
631 532# CONFIG_POWER_SUPPLY is not set
632#
633# Hardware Monitoring support
634#
635CONFIG_HWMON=y 533CONFIG_HWMON=y
636# CONFIG_HWMON_VID is not set 534# CONFIG_HWMON_VID is not set
637# CONFIG_SENSORS_ABITUGURU is not set 535# CONFIG_SENSORS_ABITUGURU is not set
536# CONFIG_SENSORS_ABITUGURU3 is not set
638# CONFIG_SENSORS_F71805F is not set 537# CONFIG_SENSORS_F71805F is not set
538# CONFIG_SENSORS_IT87 is not set
539# CONFIG_SENSORS_PC87360 is not set
540# CONFIG_SENSORS_PC87427 is not set
541# CONFIG_SENSORS_SMSC47M1 is not set
542# CONFIG_SENSORS_SMSC47B397 is not set
639# CONFIG_SENSORS_VT1211 is not set 543# CONFIG_SENSORS_VT1211 is not set
544# CONFIG_SENSORS_W83627HF is not set
545# CONFIG_SENSORS_W83627EHF is not set
640# CONFIG_HWMON_DEBUG_CHIP is not set 546# CONFIG_HWMON_DEBUG_CHIP is not set
641 547
642# 548#
549# Multifunction device drivers
550#
551# CONFIG_MFD_SM501 is not set
552
553#
643# Multimedia devices 554# Multimedia devices
644# 555#
645CONFIG_VIDEO_DEV=m 556CONFIG_VIDEO_DEV=m
646CONFIG_VIDEO_V4L1=y 557CONFIG_VIDEO_V4L1=y
647CONFIG_VIDEO_V4L1_COMPAT=y 558CONFIG_VIDEO_V4L1_COMPAT=y
648CONFIG_VIDEO_V4L2=y 559CONFIG_VIDEO_V4L2=y
649 560CONFIG_VIDEO_CAPTURE_DRIVERS=y
650#
651# Video Capture Adapters
652#
653
654#
655# Video Capture Adapters
656#
657# CONFIG_VIDEO_ADV_DEBUG is not set 561# CONFIG_VIDEO_ADV_DEBUG is not set
658CONFIG_VIDEO_HELPER_CHIPS_AUTO=y 562CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
659# CONFIG_VIDEO_VIVI is not set
660# CONFIG_VIDEO_CPIA is not set 563# CONFIG_VIDEO_CPIA is not set
661CONFIG_VIDEO_M32R_AR=m 564CONFIG_VIDEO_M32R_AR=m
662CONFIG_VIDEO_M32R_AR_M64278=m 565CONFIG_VIDEO_M32R_AR_M64278=m
566CONFIG_RADIO_ADAPTERS=y
567# CONFIG_DVB_CORE is not set
568CONFIG_DAB=y
663 569
664# 570#
665# Radio Adapters 571# Graphics support
666#
667
668#
669# Digital Video Broadcasting Devices
670# 572#
671# CONFIG_DVB is not set 573# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
672 574
673# 575#
674# Graphics support 576# Display device support
675# 577#
676CONFIG_FIRMWARE_EDID=y 578# CONFIG_DISPLAY_SUPPORT is not set
579# CONFIG_VGASTATE is not set
580CONFIG_VIDEO_OUTPUT_CONTROL=m
677CONFIG_FB=y 581CONFIG_FB=y
582CONFIG_FIRMWARE_EDID=y
583# CONFIG_FB_DDC is not set
678CONFIG_FB_CFB_FILLRECT=y 584CONFIG_FB_CFB_FILLRECT=y
679CONFIG_FB_CFB_COPYAREA=y 585CONFIG_FB_CFB_COPYAREA=y
680CONFIG_FB_CFB_IMAGEBLIT=y 586CONFIG_FB_CFB_IMAGEBLIT=y
587# CONFIG_FB_SYS_FILLRECT is not set
588# CONFIG_FB_SYS_COPYAREA is not set
589# CONFIG_FB_SYS_IMAGEBLIT is not set
590# CONFIG_FB_SYS_FOPS is not set
591CONFIG_FB_DEFERRED_IO=y
592# CONFIG_FB_SVGALIB is not set
681# CONFIG_FB_MACMODES is not set 593# CONFIG_FB_MACMODES is not set
682# CONFIG_FB_BACKLIGHT is not set 594# CONFIG_FB_BACKLIGHT is not set
683# CONFIG_FB_MODE_HELPERS is not set 595# CONFIG_FB_MODE_HELPERS is not set
684# CONFIG_FB_TILEBLITTING is not set 596# CONFIG_FB_TILEBLITTING is not set
597
598#
599# Frame buffer hardware drivers
600#
685CONFIG_FB_S1D13XXX=y 601CONFIG_FB_S1D13XXX=y
686# CONFIG_FB_VIRTUAL is not set 602# CONFIG_FB_VIRTUAL is not set
687 603
@@ -691,29 +607,25 @@ CONFIG_FB_S1D13XXX=y
691# CONFIG_VGA_CONSOLE is not set 607# CONFIG_VGA_CONSOLE is not set
692CONFIG_DUMMY_CONSOLE=y 608CONFIG_DUMMY_CONSOLE=y
693CONFIG_FRAMEBUFFER_CONSOLE=y 609CONFIG_FRAMEBUFFER_CONSOLE=y
610# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
694# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 611# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
695# CONFIG_FONTS is not set 612# CONFIG_FONTS is not set
696CONFIG_FONT_8x8=y 613CONFIG_FONT_8x8=y
697CONFIG_FONT_8x16=y 614CONFIG_FONT_8x16=y
698
699#
700# Logo configuration
701#
702CONFIG_LOGO=y 615CONFIG_LOGO=y
703CONFIG_LOGO_LINUX_MONO=y 616CONFIG_LOGO_LINUX_MONO=y
704CONFIG_LOGO_LINUX_VGA16=y 617CONFIG_LOGO_LINUX_VGA16=y
705CONFIG_LOGO_LINUX_CLUT224=y 618CONFIG_LOGO_LINUX_CLUT224=y
706CONFIG_LOGO_M32R_CLUT224=y 619CONFIG_LOGO_M32R_CLUT224=y
707# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
708 620
709# 621#
710# Sound 622# Sound
711# 623#
712# CONFIG_SOUND is not set 624# CONFIG_SOUND is not set
713 625CONFIG_HID_SUPPORT=y
714# 626CONFIG_HID=y
715# USB support 627# CONFIG_HID_DEBUG is not set
716# 628CONFIG_USB_SUPPORT=y
717# CONFIG_USB_ARCH_HAS_HCD is not set 629# CONFIG_USB_ARCH_HAS_HCD is not set
718# CONFIG_USB_ARCH_HAS_OHCI is not set 630# CONFIG_USB_ARCH_HAS_OHCI is not set
719# CONFIG_USB_ARCH_HAS_EHCI is not set 631# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -726,35 +638,20 @@ CONFIG_LOGO_M32R_CLUT224=y
726# USB Gadget Support 638# USB Gadget Support
727# 639#
728# CONFIG_USB_GADGET is not set 640# CONFIG_USB_GADGET is not set
729
730#
731# MMC/SD Card support
732#
733CONFIG_MMC=y 641CONFIG_MMC=y
734CONFIG_MMC_DEBUG=y 642CONFIG_MMC_DEBUG=y
735CONFIG_MMC_BLOCK=y 643# CONFIG_MMC_UNSAFE_RESUME is not set
736# CONFIG_MMC_TIFM_SD is not set
737
738#
739# LED devices
740#
741# CONFIG_NEW_LEDS is not set
742
743#
744# LED drivers
745#
746 644
747# 645#
748# LED Triggers 646# MMC/SD Card Drivers
749#
750
751#
752# InfiniBand support
753# 647#
648CONFIG_MMC_BLOCK=y
649CONFIG_MMC_BLOCK_BOUNCE=y
754 650
755# 651#
756# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 652# MMC/SD Host Controller Drivers
757# 653#
654# CONFIG_NEW_LEDS is not set
758 655
759# 656#
760# Real Time Clock 657# Real Time Clock
@@ -762,17 +659,9 @@ CONFIG_MMC_BLOCK=y
762# CONFIG_RTC_CLASS is not set 659# CONFIG_RTC_CLASS is not set
763 660
764# 661#
765# DMA Engine support 662# Userspace I/O
766#
767# CONFIG_DMA_ENGINE is not set
768
769#
770# DMA Clients
771#
772
773#
774# DMA Devices
775# 663#
664# CONFIG_UIO is not set
776 665
777# 666#
778# File systems 667# File systems
@@ -849,7 +738,6 @@ CONFIG_RAMFS=y
849# CONFIG_BEFS_FS is not set 738# CONFIG_BEFS_FS is not set
850# CONFIG_BFS_FS is not set 739# CONFIG_BFS_FS is not set
851# CONFIG_EFS_FS is not set 740# CONFIG_EFS_FS is not set
852# CONFIG_JFFS_FS is not set
853# CONFIG_JFFS2_FS is not set 741# CONFIG_JFFS2_FS is not set
854# CONFIG_CRAMFS is not set 742# CONFIG_CRAMFS is not set
855# CONFIG_VXFS_FS is not set 743# CONFIG_VXFS_FS is not set
@@ -872,6 +760,7 @@ CONFIG_LOCKD=y
872CONFIG_LOCKD_V4=y 760CONFIG_LOCKD_V4=y
873CONFIG_NFS_COMMON=y 761CONFIG_NFS_COMMON=y
874CONFIG_SUNRPC=y 762CONFIG_SUNRPC=y
763# CONFIG_SUNRPC_BIND34 is not set
875# CONFIG_RPCSEC_GSS_KRB5 is not set 764# CONFIG_RPCSEC_GSS_KRB5 is not set
876# CONFIG_RPCSEC_GSS_SPKM3 is not set 765# CONFIG_RPCSEC_GSS_SPKM3 is not set
877# CONFIG_SMB_FS is not set 766# CONFIG_SMB_FS is not set
@@ -879,7 +768,6 @@ CONFIG_SUNRPC=y
879# CONFIG_NCP_FS is not set 768# CONFIG_NCP_FS is not set
880# CONFIG_CODA_FS is not set 769# CONFIG_CODA_FS is not set
881# CONFIG_AFS_FS is not set 770# CONFIG_AFS_FS is not set
882# CONFIG_9P_FS is not set
883 771
884# 772#
885# Partition Types 773# Partition Types
@@ -932,6 +820,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
932# CONFIG_NLS_UTF8 is not set 820# CONFIG_NLS_UTF8 is not set
933 821
934# 822#
823# Distributed Lock Manager
824#
825# CONFIG_DLM is not set
826
827#
935# Profiling support 828# Profiling support
936# 829#
937CONFIG_PROFILING=y 830CONFIG_PROFILING=y
@@ -944,29 +837,27 @@ CONFIG_OPROFILE=y
944CONFIG_ENABLE_MUST_CHECK=y 837CONFIG_ENABLE_MUST_CHECK=y
945# CONFIG_MAGIC_SYSRQ is not set 838# CONFIG_MAGIC_SYSRQ is not set
946# CONFIG_UNUSED_SYMBOLS is not set 839# CONFIG_UNUSED_SYMBOLS is not set
840# CONFIG_DEBUG_FS is not set
841# CONFIG_HEADERS_CHECK is not set
947# CONFIG_DEBUG_KERNEL is not set 842# CONFIG_DEBUG_KERNEL is not set
948CONFIG_LOG_BUF_SHIFT=15
949# CONFIG_DEBUG_BUGVERBOSE is not set 843# CONFIG_DEBUG_BUGVERBOSE is not set
950# CONFIG_DEBUG_FS is not set
951# CONFIG_FRAME_POINTER is not set 844# CONFIG_FRAME_POINTER is not set
952# CONFIG_UNWIND_INFO is not set
953# CONFIG_HEADERS_CHECK is not set
954 845
955# 846#
956# Security options 847# Security options
957# 848#
958# CONFIG_KEYS is not set 849# CONFIG_KEYS is not set
959# CONFIG_SECURITY is not set 850# CONFIG_SECURITY is not set
960
961#
962# Cryptographic options
963#
964# CONFIG_CRYPTO is not set 851# CONFIG_CRYPTO is not set
965 852
966# 853#
967# Library routines 854# Library routines
968# 855#
856CONFIG_BITREVERSE=y
969# CONFIG_CRC_CCITT is not set 857# CONFIG_CRC_CCITT is not set
970# CONFIG_CRC16 is not set 858# CONFIG_CRC16 is not set
859# CONFIG_CRC_ITU_T is not set
971CONFIG_CRC32=y 860CONFIG_CRC32=y
861# CONFIG_CRC7 is not set
972# CONFIG_LIBCRC32C is not set 862# CONFIG_LIBCRC32C is not set
863CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/kernel/Makefile b/arch/m32r/kernel/Makefile
index 5a2fa88690..e97e26e87c 100644
--- a/arch/m32r/kernel/Makefile
+++ b/arch/m32r/kernel/Makefile
@@ -8,14 +8,6 @@ obj-y := process.o entry.o traps.o align.o irq.o setup.o time.o \
8 m32r_ksyms.o sys_m32r.o semaphore.o signal.o ptrace.o 8 m32r_ksyms.o sys_m32r.o semaphore.o signal.o ptrace.o
9 9
10obj-$(CONFIG_SMP) += smp.o smpboot.o 10obj-$(CONFIG_SMP) += smp.o smpboot.o
11obj-$(CONFIG_PLAT_MAPPI) += setup_mappi.o io_mappi.o
12obj-$(CONFIG_PLAT_MAPPI2) += setup_mappi2.o io_mappi2.o
13obj-$(CONFIG_PLAT_MAPPI3) += setup_mappi3.o io_mappi3.o
14obj-$(CONFIG_PLAT_USRV) += setup_usrv.o io_usrv.o
15obj-$(CONFIG_PLAT_M32700UT) += setup_m32700ut.o io_m32700ut.o
16obj-$(CONFIG_PLAT_OPSPUT) += setup_opsput.o io_opsput.o
17obj-$(CONFIG_MODULES) += module.o 11obj-$(CONFIG_MODULES) += module.o
18obj-$(CONFIG_PLAT_OAKS32R) += setup_oaks32r.o io_oaks32r.o
19obj-$(CONFIG_PLAT_M32104UT) += setup_m32104ut.o io_m32104ut.o
20 12
21EXTRA_AFLAGS := -traditional 13EXTRA_AFLAGS := -traditional
diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S
index a2c472c054..d4eaa2fd18 100644
--- a/arch/m32r/kernel/entry.S
+++ b/arch/m32r/kernel/entry.S
@@ -109,15 +109,10 @@
109#define SP(reg) @(0x68,reg) 109#define SP(reg) @(0x68,reg)
110#define ORIG_R0(reg) @(0x6C,reg) 110#define ORIG_R0(reg) @(0x6C,reg)
111 111
112CF_MASK = 0x00000001 112#define nr_syscalls ((syscall_table_size)/4)
113TF_MASK = 0x00000100
114IF_MASK = 0x00000200
115DF_MASK = 0x00000400
116NT_MASK = 0x00004000
117VM_MASK = 0x00020000
118 113
119#ifdef CONFIG_PREEMPT 114#ifdef CONFIG_PREEMPT
120#define preempt_stop(x) CLI(x) 115#define preempt_stop(x) DISABLE_INTERRUPTS(x)
121#else 116#else
122#define preempt_stop(x) 117#define preempt_stop(x)
123#define resume_kernel restore_all 118#define resume_kernel restore_all
@@ -149,7 +144,7 @@ ret_from_intr:
149#endif 144#endif
150 beqz r4, resume_kernel 145 beqz r4, resume_kernel
151ENTRY(resume_userspace) 146ENTRY(resume_userspace)
152 CLI(r4) ; make sure we don't miss an interrupt 147 DISABLE_INTERRUPTS(r4) ; make sure we don't miss an interrupt
153 ; setting need_resched or sigpending 148 ; setting need_resched or sigpending
154 ; between sampling and the iret 149 ; between sampling and the iret
155 GET_THREAD_INFO(r8) 150 GET_THREAD_INFO(r8)
@@ -173,11 +168,11 @@ need_resched:
173 beqz r4, restore_all 168 beqz r4, restore_all
174 LDIMM (r4, PREEMPT_ACTIVE) 169 LDIMM (r4, PREEMPT_ACTIVE)
175 st r4, @(TI_PRE_COUNT, r8) 170 st r4, @(TI_PRE_COUNT, r8)
176 STI(r4) 171 ENABLE_INTERRUPTS(r4)
177 bl schedule 172 bl schedule
178 ldi r4, #0 173 ldi r4, #0
179 st r4, @(TI_PRE_COUNT, r8) 174 st r4, @(TI_PRE_COUNT, r8)
180 CLI(r4) 175 DISABLE_INTERRUPTS(r4)
181 bra need_resched 176 bra need_resched
182#endif 177#endif
183 178
@@ -185,7 +180,7 @@ need_resched:
185ENTRY(system_call) 180ENTRY(system_call)
186 SWITCH_TO_KERNEL_STACK 181 SWITCH_TO_KERNEL_STACK
187 SAVE_ALL 182 SAVE_ALL
188 STI(r4) ; Enable interrupt 183 ENABLE_INTERRUPTS(r4) ; Enable interrupt
189 st sp, PTREGS(sp) ; implicit pt_regs parameter 184 st sp, PTREGS(sp) ; implicit pt_regs parameter
190 cmpui r7, #NR_syscalls 185 cmpui r7, #NR_syscalls
191 bnc syscall_badsys 186 bnc syscall_badsys
@@ -203,7 +198,7 @@ syscall_call:
203 jl r7 ; execute system call 198 jl r7 ; execute system call
204 st r0, R0(sp) ; save the return value 199 st r0, R0(sp) ; save the return value
205syscall_exit: 200syscall_exit:
206 CLI(r4) ; make sure we don't miss an interrupt 201 DISABLE_INTERRUPTS(r4) ; make sure we don't miss an interrupt
207 ; setting need_resched or sigpending 202 ; setting need_resched or sigpending
208 ; between sampling and the iret 203 ; between sampling and the iret
209 ld r9, @(TI_FLAGS, r8) 204 ld r9, @(TI_FLAGS, r8)
@@ -220,7 +215,7 @@ work_pending:
220 beqz r4, work_notifysig 215 beqz r4, work_notifysig
221work_resched: 216work_resched:
222 bl schedule 217 bl schedule
223 CLI(r4) ; make sure we don't miss an interrupt 218 DISABLE_INTERRUPTS(r4) ; make sure we don't miss an interrupt
224 ; setting need_resched or sigpending 219 ; setting need_resched or sigpending
225 ; between sampling and the iret 220 ; between sampling and the iret
226 ld r9, @(TI_FLAGS, r8) 221 ld r9, @(TI_FLAGS, r8)
@@ -262,7 +257,7 @@ syscall_exit_work:
262 ld r9, @(TI_FLAGS, r8) 257 ld r9, @(TI_FLAGS, r8)
263 and3 r4, r9, #_TIF_SYSCALL_TRACE 258 and3 r4, r9, #_TIF_SYSCALL_TRACE
264 beqz r4, work_pending 259 beqz r4, work_pending
265 STI(r4) ; could let do_syscall_trace() call 260 ENABLE_INTERRUPTS(r4) ; could let do_syscall_trace() call
266 ; schedule() instead 261 ; schedule() instead
267 bl do_syscall_trace 262 bl do_syscall_trace
268 bra resume_userspace 263 bra resume_userspace
@@ -290,16 +285,12 @@ syscall_badsys:
290 */ 285 */
291ENTRY(ei_handler) 286ENTRY(ei_handler)
292#if defined(CONFIG_CHIP_M32700) 287#if defined(CONFIG_CHIP_M32700)
293 SWITCH_TO_KERNEL_STACK
294 ; WORKAROUND: force to clear SM bit and use the kernel stack (SPI). 288 ; WORKAROUND: force to clear SM bit and use the kernel stack (SPI).
289 SWITCH_TO_KERNEL_STACK
295#endif 290#endif
296 SAVE_ALL 291 SAVE_ALL
297 mv r1, sp ; arg1(regs) 292 mv r1, sp ; arg1(regs)
298#if defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_XNUX2) \ 293 ; get ICU status
299 || defined(CONFIG_CHIP_M32700) || defined(CONFIG_CHIP_M32102) \
300 || defined(CONFIG_CHIP_OPSP) || defined(CONFIG_CHIP_M32104)
301
302; GET_ICU_STATUS;
303 seth r0, #shigh(M32R_ICU_ISTS_ADDR) 294 seth r0, #shigh(M32R_ICU_ISTS_ADDR)
304 ld r0, @(low(M32R_ICU_ISTS_ADDR),r0) 295 ld r0, @(low(M32R_ICU_ISTS_ADDR),r0)
305 push r0 296 push r0
@@ -314,10 +305,15 @@ ENTRY(ei_handler)
314 ;; IRQ exist check 305 ;; IRQ exist check
315#if defined(CONFIG_CHIP_M32700) 306#if defined(CONFIG_CHIP_M32700)
316 /* WORKAROUND: IMASK bug M32700-TS1, TS2 chip. */ 307 /* WORKAROUND: IMASK bug M32700-TS1, TS2 chip. */
317 beqz r0, 3f ; if (!irq_num) goto exit 308 bnez r0, 0f
318#else 309 ld24 r14, #0x00070000
310 seth r0, #shigh(M32R_ICU_IMASK_ADDR)
311 st r14, @(low(M32R_ICU_IMASK_ADDR),r0)
312 bra 1f
313 .fillinsn
3140:
315#endif /* CONFIG_CHIP_M32700 */
319 beqz r0, 1f ; if (!irq_num) goto exit 316 beqz r0, 1f ; if (!irq_num) goto exit
320#endif /* WORKAROUND */
321 ;; IPI check 317 ;; IPI check
322 cmpi r0, #(M32R_IRQ_IPI0<<2) ; ISN < IPI0 check 318 cmpi r0, #(M32R_IRQ_IPI0<<2) ; ISN < IPI0 check
323 bc 2f 319 bc 2f
@@ -332,220 +328,56 @@ ENTRY(ei_handler)
332 .fillinsn 328 .fillinsn
3331: 3291:
334 addi sp, #4 330 addi sp, #4
335 bra ret_to_intr 331 bra restore_all
336#if defined(CONFIG_CHIP_M32700)
337 /* WORKAROUND: IMASK bug M32700-TS1, TS2 chip. */
338 .fillinsn
3393:
340 ld24 r14, #0x00070000
341 seth r0, #shigh(M32R_ICU_IMASK_ADDR)
342 st r14, @(low(M32R_ICU_IMASK_ADDR), r0)
343 addi sp, #4
344 bra ret_to_intr
345#endif /* WORKAROUND */
346 ;; do_IRQ
347 .fillinsn 332 .fillinsn
3482: 3332:
349 srli r0, #2 334 srli r0, #2
350#if defined(CONFIG_PLAT_USRV) 335#else /* not CONFIG_SMP */
351 add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
352 bnez r2, 9f
353 ; read ICU status register of PLD
354 seth r0, #high(PLD_ICUISTS)
355 or3 r0, r0, #low(PLD_ICUISTS)
356 lduh r0, @r0
357 slli r0, #21
358 srli r0, #27 ; ISN
359 addi r0, #(M32700UT_PLD_IRQ_BASE)
360 .fillinsn
3619:
362#elif defined(CONFIG_PLAT_M32700UT)
363 add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
364 bnez r2, check_int0
365 ; read ICU status register of PLD
366 seth r0, #high(PLD_ICUISTS)
367 or3 r0, r0, #low(PLD_ICUISTS)
368 lduh r0, @r0
369 slli r0, #21
370 srli r0, #27 ; ISN
371 addi r0, #(M32700UT_PLD_IRQ_BASE)
372 bra check_end
373 .fillinsn
374check_int0:
375 add3 r2, r0, #-(M32R_IRQ_INT0) ; INT0# interrupt
376 bnez r2, check_int2
377 ; read ICU status of LAN-board
378 seth r0, #high(M32700UT_LAN_ICUISTS)
379 or3 r0, r0, #low(M32700UT_LAN_ICUISTS)
380 lduh r0, @r0
381 slli r0, #21
382 srli r0, #27 ; ISN
383 add3 r0, r0, #(M32700UT_LAN_PLD_IRQ_BASE)
384 bra check_end
385 .fillinsn
386check_int2:
387 add3 r2, r0, #-(M32R_IRQ_INT2) ; INT2# interrupt
388 bnez r2, check_end
389 ; read ICU status of LCD-board
390 seth r0, #high(M32700UT_LCD_ICUISTS)
391 or3 r0, r0, #low(M32700UT_LCD_ICUISTS)
392 lduh r0, @r0
393 slli r0, #21
394 srli r0, #27 ; ISN
395 add3 r0, r0, #(M32700UT_LCD_PLD_IRQ_BASE)
396 bra check_end
397 .fillinsn
398check_end:
399#elif defined(CONFIG_PLAT_OPSPUT)
400 add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
401 bnez r2, check_int0
402 ; read ICU status register of PLD
403 seth r0, #high(PLD_ICUISTS)
404 or3 r0, r0, #low(PLD_ICUISTS)
405 lduh r0, @r0
406 slli r0, #21
407 srli r0, #27 ; ISN
408 addi r0, #(OPSPUT_PLD_IRQ_BASE)
409 bra check_end
410 .fillinsn
411check_int0:
412 add3 r2, r0, #-(M32R_IRQ_INT0) ; INT0# interrupt
413 bnez r2, check_int2
414 ; read ICU status of LAN-board
415 seth r0, #high(OPSPUT_LAN_ICUISTS)
416 or3 r0, r0, #low(OPSPUT_LAN_ICUISTS)
417 lduh r0, @r0
418 slli r0, #21
419 srli r0, #27 ; ISN
420 add3 r0, r0, #(OPSPUT_LAN_PLD_IRQ_BASE)
421 bra check_end
422 .fillinsn
423check_int2:
424 add3 r2, r0, #-(M32R_IRQ_INT2) ; INT2# interrupt
425 bnez r2, check_end
426 ; read ICU status of LCD-board
427 seth r0, #high(OPSPUT_LCD_ICUISTS)
428 or3 r0, r0, #low(OPSPUT_LCD_ICUISTS)
429 lduh r0, @r0
430 slli r0, #21
431 srli r0, #27 ; ISN
432 add3 r0, r0, #(OPSPUT_LCD_PLD_IRQ_BASE)
433 bra check_end
434 .fillinsn
435check_end:
436#endif /* CONFIG_PLAT_OPSPUT */
437 bl do_IRQ ; r0(irq), r1(regs)
438#else /* not CONFIG_SMP */
439 srli r0, #22 ; r0(irq) 336 srli r0, #22 ; r0(irq)
440#if defined(CONFIG_PLAT_USRV) 337#endif /* not CONFIG_SMP */
338
339#if defined(CONFIG_PLAT_HAS_INT1ICU)
441 add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt 340 add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
442 bnez r2, 1f 341 bnez r2, 3f
443 ; read ICU status register of PLD 342 seth r0, #shigh(M32R_INT1ICU_ISTS)
444 seth r0, #high(PLD_ICUISTS) 343 lduh r0, @(low(M32R_INT1ICU_ISTS),r0) ; bit10-6 : ISN
445 or3 r0, r0, #low(PLD_ICUISTS)
446 lduh r0, @r0
447 slli r0, #21 344 slli r0, #21
448 srli r0, #27 ; ISN 345 srli r0, #27 ; ISN
449 addi r0, #(M32700UT_PLD_IRQ_BASE) 346 addi r0, #(M32R_INT1ICU_IRQ_BASE)
450 .fillinsn
4511:
452#elif defined(CONFIG_PLAT_M32700UT)
453 add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
454 bnez r2, check_int0
455 ; read ICU status register of PLD
456 seth r0, #high(PLD_ICUISTS)
457 or3 r0, r0, #low(PLD_ICUISTS)
458 lduh r0, @r0
459 slli r0, #21
460 srli r0, #27 ; ISN
461 addi r0, #(M32700UT_PLD_IRQ_BASE)
462 bra check_end
463 .fillinsn
464check_int0:
465 add3 r2, r0, #-(M32R_IRQ_INT0) ; INT0# interrupt
466 bnez r2, check_int2
467 ; read ICU status of LAN-board
468 seth r0, #high(M32700UT_LAN_ICUISTS)
469 or3 r0, r0, #low(M32700UT_LAN_ICUISTS)
470 lduh r0, @r0
471 slli r0, #21
472 srli r0, #27 ; ISN
473 add3 r0, r0, #(M32700UT_LAN_PLD_IRQ_BASE)
474 bra check_end
475 .fillinsn
476check_int2:
477 add3 r2, r0, #-(M32R_IRQ_INT2) ; INT2# interrupt
478 bnez r2, check_end
479 ; read ICU status of LCD-board
480 seth r0, #high(M32700UT_LCD_ICUISTS)
481 or3 r0, r0, #low(M32700UT_LCD_ICUISTS)
482 lduh r0, @r0
483 slli r0, #21
484 srli r0, #27 ; ISN
485 add3 r0, r0, #(M32700UT_LCD_PLD_IRQ_BASE)
486 bra check_end
487 .fillinsn
488check_end:
489#elif defined(CONFIG_PLAT_OPSPUT)
490 add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
491 bnez r2, check_int0
492 ; read ICU status register of PLD
493 seth r0, #high(PLD_ICUISTS)
494 or3 r0, r0, #low(PLD_ICUISTS)
495 lduh r0, @r0
496 slli r0, #21
497 srli r0, #27 ; ISN
498 addi r0, #(OPSPUT_PLD_IRQ_BASE)
499 bra check_end
500 .fillinsn
501check_int0:
502 add3 r2, r0, #-(M32R_IRQ_INT0) ; INT0# interrupt
503 bnez r2, check_int2
504 ; read ICU status of LAN-board
505 seth r0, #high(OPSPUT_LAN_ICUISTS)
506 or3 r0, r0, #low(OPSPUT_LAN_ICUISTS)
507 lduh r0, @r0
508 slli r0, #21
509 srli r0, #27 ; ISN
510 add3 r0, r0, #(OPSPUT_LAN_PLD_IRQ_BASE)
511 bra check_end 347 bra check_end
512 .fillinsn 348 .fillinsn
513check_int2: 3493:
514 add3 r2, r0, #-(M32R_IRQ_INT2) ; INT2# interrupt 350#endif /* CONFIG_PLAT_HAS_INT1ICU */
515 bnez r2, check_end 351#if defined(CONFIG_PLAT_HAS_INT0ICU)
516 ; read ICU status of LCD-board 352 add3 r2, r0, #-(M32R_IRQ_INT0) ; INT0# interrupt
517 seth r0, #high(OPSPUT_LCD_ICUISTS) 353 bnez r2, 4f
518 or3 r0, r0, #low(OPSPUT_LCD_ICUISTS) 354 seth r0, #shigh(M32R_INT0ICU_ISTS)
519 lduh r0, @r0 355 lduh r0, @(low(M32R_INT0ICU_ISTS),r0) ; bit10-6 : ISN
520 slli r0, #21 356 slli r0, #21
521 srli r0, #27 ; ISN 357 srli r0, #27 ; ISN
522 add3 r0, r0, #(OPSPUT_LCD_PLD_IRQ_BASE) 358 add3 r0, r0, #(M32R_INT0ICU_IRQ_BASE)
523 bra check_end 359 bra check_end
524 .fillinsn 360 .fillinsn
525check_end: 3614:
526#elif defined(CONFIG_PLAT_M32104UT) 362#endif /* CONFIG_PLAT_HAS_INT0ICU */
527 add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt 363#if defined(CONFIG_PLAT_HAS_INT2ICU)
528 bnez r2, check_end 364 add3 r2, r0, #-(M32R_IRQ_INT2) ; INT2# interrupt
529 ; read ICU status register of PLD 365 bnez r2, 5f
530 seth r0, #high(PLD_ICUISTS) 366 seth r0, #shigh(M32R_INT2ICU_ISTS)
531 or3 r0, r0, #low(PLD_ICUISTS) 367 lduh r0, @(low(M32R_INT2ICU_ISTS),r0) ; bit10-6 : ISN
532 lduh r0, @r0
533 slli r0, #21 368 slli r0, #21
534 srli r0, #27 ; ISN 369 srli r0, #27 ; ISN
535 addi r0, #(M32104UT_PLD_IRQ_BASE) 370 add3 r0, r0, #(M32R_INT2ICU_IRQ_BASE)
536 bra check_end 371 ; bra check_end
537 .fillinsn 372 .fillinsn
3735:
374#endif /* CONFIG_PLAT_HAS_INT2ICU */
375
538check_end: 376check_end:
539#endif /* CONFIG_PLAT_M32104UT */
540 bl do_IRQ 377 bl do_IRQ
541#endif /* CONFIG_SMP */
542 pop r14 378 pop r14
543 seth r0, #shigh(M32R_ICU_IMASK_ADDR) 379 seth r0, #shigh(M32R_ICU_IMASK_ADDR)
544 st r14, @(low(M32R_ICU_IMASK_ADDR),r0) 380 st r14, @(low(M32R_ICU_IMASK_ADDR),r0)
545#else
546#error no chip configuration
547#endif
548ret_to_intr:
549 bra ret_from_intr 381 bra ret_from_intr
550 382
551/* 383/*
@@ -631,7 +463,7 @@ inst:
631 463
632 464
633ENTRY(alignment_check) 465ENTRY(alignment_check)
634/* void alignment_check(int error_code) */ 466 /* void alignment_check(int error_code) */
635 SWITCH_TO_KERNEL_STACK 467 SWITCH_TO_KERNEL_STACK
636 SAVE_ALL 468 SAVE_ALL
637 ldi r1, #0x30 ; error_code 469 ldi r1, #0x30 ; error_code
@@ -641,7 +473,7 @@ error_code:
641 bra ret_from_exception 473 bra ret_from_exception
642 474
643ENTRY(rie_handler) 475ENTRY(rie_handler)
644/* void rie_handler(int error_code) */ 476 /* void rie_handler(int error_code) */
645 SWITCH_TO_KERNEL_STACK 477 SWITCH_TO_KERNEL_STACK
646 SAVE_ALL 478 SAVE_ALL
647 ldi r1, #0x20 ; error_code 479 ldi r1, #0x20 ; error_code
@@ -650,7 +482,7 @@ ENTRY(rie_handler)
650 bra error_code 482 bra error_code
651 483
652ENTRY(pie_handler) 484ENTRY(pie_handler)
653/* void pie_handler(int error_code) */ 485 /* void pie_handler(int error_code) */
654 SWITCH_TO_KERNEL_STACK 486 SWITCH_TO_KERNEL_STACK
655 SAVE_ALL 487 SAVE_ALL
656 ldi r1, #0 ; error_code ; FIXME 488 ldi r1, #0 ; error_code ; FIXME
@@ -659,8 +491,8 @@ ENTRY(pie_handler)
659 bra error_code 491 bra error_code
660 492
661ENTRY(debug_trap) 493ENTRY(debug_trap)
662 .global withdraw_debug_trap
663 /* void debug_trap(void) */ 494 /* void debug_trap(void) */
495 .global withdraw_debug_trap
664 SWITCH_TO_KERNEL_STACK 496 SWITCH_TO_KERNEL_STACK
665 SAVE_ALL 497 SAVE_ALL
666 mv r0, sp ; pt_regs 498 mv r0, sp ; pt_regs
@@ -679,11 +511,9 @@ ENTRY(ill_trap)
679 bl do_ill_trap 511 bl do_ill_trap
680 bra error_code 512 bra error_code
681 513
682
683/* Cache flushing handler */
684ENTRY(cache_flushing_handler) 514ENTRY(cache_flushing_handler)
685 .global _flush_cache_all
686 /* void _flush_cache_all(void); */ 515 /* void _flush_cache_all(void); */
516 .global _flush_cache_all
687 SWITCH_TO_KERNEL_STACK 517 SWITCH_TO_KERNEL_STACK
688 push r0 518 push r0
689 push r1 519 push r1
@@ -706,292 +536,7 @@ ENTRY(cache_flushing_handler)
706 pop r0 536 pop r0
707 rte 537 rte
708 538
709.data 539 .section .rodata,"a"
710ENTRY(sys_call_table) 540#include "syscall_table.S"
711 .long sys_restart_syscall /* 0 - old "setup()" system call*/
712 .long sys_exit
713 .long sys_fork
714 .long sys_read
715 .long sys_write
716 .long sys_open /* 5 */
717 .long sys_close
718 .long sys_waitpid
719 .long sys_creat
720 .long sys_link
721 .long sys_unlink /* 10 */
722 .long sys_execve
723 .long sys_chdir
724 .long sys_time
725 .long sys_mknod
726 .long sys_chmod /* 15 */
727 .long sys_ni_syscall /* lchown16 syscall holder */
728 .long sys_ni_syscall /* old break syscall holder */
729 .long sys_ni_syscall /* old stat syscall holder */
730 .long sys_lseek
731 .long sys_getpid /* 20 */
732 .long sys_mount
733 .long sys_oldumount
734 .long sys_ni_syscall /* setuid16 syscall holder */
735 .long sys_ni_syscall /* getuid16 syscall holder */
736 .long sys_stime /* 25 */
737 .long sys_ptrace
738 .long sys_alarm
739 .long sys_ni_syscall /* old fstat syscall holder */
740 .long sys_pause
741 .long sys_utime /* 30 */
742 .long sys_ni_syscall /* old stty syscall holder */
743 .long sys_cachectl /* for M32R */ /* old gtty syscall holder */
744 .long sys_access
745 .long sys_ni_syscall /* nice syscall holder */
746 .long sys_ni_syscall /* 35 - old ftime syscall holder */
747 .long sys_sync
748 .long sys_kill
749 .long sys_rename
750 .long sys_mkdir
751 .long sys_rmdir /* 40 */
752 .long sys_dup
753 .long sys_pipe
754 .long sys_times
755 .long sys_ni_syscall /* old prof syscall holder */
756 .long sys_brk /* 45 */
757 .long sys_ni_syscall /* setgid16 syscall holder */
758 .long sys_getgid /* will be unused */
759 .long sys_ni_syscall /* signal syscall holder */
760 .long sys_ni_syscall /* geteuid16 syscall holder */
761 .long sys_ni_syscall /* 50 - getegid16 syscall holder */
762 .long sys_acct
763 .long sys_umount /* recycled never used phys() */
764 .long sys_ni_syscall /* old lock syscall holder */
765 .long sys_ioctl
766 .long sys_fcntl /* 55 - will be unused */
767 .long sys_ni_syscall /* mpx syscall holder */
768 .long sys_setpgid
769 .long sys_ni_syscall /* old ulimit syscall holder */
770 .long sys_ni_syscall /* sys_olduname */
771 .long sys_umask /* 60 */
772 .long sys_chroot
773 .long sys_ustat
774 .long sys_dup2
775 .long sys_getppid
776 .long sys_getpgrp /* 65 */
777 .long sys_setsid
778 .long sys_ni_syscall /* sigaction syscall holder */
779 .long sys_ni_syscall /* sgetmask syscall holder */
780 .long sys_ni_syscall /* ssetmask syscall holder */
781 .long sys_ni_syscall /* 70 - setreuid16 syscall holder */
782 .long sys_ni_syscall /* setregid16 syscall holder */
783 .long sys_ni_syscall /* sigsuspend syscall holder */
784 .long sys_ni_syscall /* sigpending syscall holder */
785 .long sys_sethostname
786 .long sys_setrlimit /* 75 */
787 .long sys_getrlimit/*will be unused*/
788 .long sys_getrusage
789 .long sys_gettimeofday
790 .long sys_settimeofday
791 .long sys_ni_syscall /* 80 - getgroups16 syscall holder */
792 .long sys_ni_syscall /* setgroups16 syscall holder */
793 .long sys_ni_syscall /* sys_oldselect */
794 .long sys_symlink
795 .long sys_ni_syscall /* old lstat syscall holder */
796 .long sys_readlink /* 85 */
797 .long sys_uselib
798 .long sys_swapon
799 .long sys_reboot
800 .long sys_ni_syscall /* readdir syscall holder */
801 .long sys_ni_syscall /* 90 - old_mmap syscall holder */
802 .long sys_munmap
803 .long sys_truncate
804 .long sys_ftruncate
805 .long sys_fchmod
806 .long sys_ni_syscall /* 95 - fchwon16 syscall holder */
807 .long sys_getpriority
808 .long sys_setpriority
809 .long sys_ni_syscall /* old profil syscall holder */
810 .long sys_statfs
811 .long sys_fstatfs /* 100 */
812 .long sys_ni_syscall /* ioperm syscall holder */
813 .long sys_socketcall
814 .long sys_syslog
815 .long sys_setitimer
816 .long sys_getitimer /* 105 */
817 .long sys_newstat
818 .long sys_newlstat
819 .long sys_newfstat
820 .long sys_ni_syscall /* old uname syscall holder */
821 .long sys_ni_syscall /* 110 - iopl syscall holder */
822 .long sys_vhangup
823 .long sys_ni_syscall /* idle syscall holder */
824 .long sys_ni_syscall /* vm86old syscall holder */
825 .long sys_wait4
826 .long sys_swapoff /* 115 */
827 .long sys_sysinfo
828 .long sys_ipc
829 .long sys_fsync
830 .long sys_ni_syscall /* sigreturn syscall holder */
831 .long sys_clone /* 120 */
832 .long sys_setdomainname
833 .long sys_newuname
834 .long sys_ni_syscall /* modify_ldt syscall holder */
835 .long sys_adjtimex
836 .long sys_mprotect /* 125 */
837 .long sys_ni_syscall /* sigprocmask syscall holder */
838 .long sys_ni_syscall /* create_module syscall holder */
839 .long sys_init_module
840 .long sys_delete_module
841 .long sys_ni_syscall /* 130 - get_kernel_syms */
842 .long sys_quotactl
843 .long sys_getpgid
844 .long sys_fchdir
845 .long sys_bdflush
846 .long sys_sysfs /* 135 */
847 .long sys_personality
848 .long sys_ni_syscall /* afs_syscall syscall holder */
849 .long sys_ni_syscall /* setfsuid16 syscall holder */
850 .long sys_ni_syscall /* setfsgid16 syscall holder */
851 .long sys_llseek /* 140 */
852 .long sys_getdents
853 .long sys_select
854 .long sys_flock
855 .long sys_msync
856 .long sys_readv /* 145 */
857 .long sys_writev
858 .long sys_getsid
859 .long sys_fdatasync
860 .long sys_sysctl
861 .long sys_mlock /* 150 */
862 .long sys_munlock
863 .long sys_mlockall
864 .long sys_munlockall
865 .long sys_sched_setparam
866 .long sys_sched_getparam /* 155 */
867 .long sys_sched_setscheduler
868 .long sys_sched_getscheduler
869 .long sys_sched_yield
870 .long sys_sched_get_priority_max
871 .long sys_sched_get_priority_min /* 160 */
872 .long sys_sched_rr_get_interval
873 .long sys_nanosleep
874 .long sys_mremap
875 .long sys_ni_syscall /* setresuid16 syscall holder */
876 .long sys_ni_syscall /* 165 - getresuid16 syscall holder */
877 .long sys_tas /* vm86 syscall holder */
878 .long sys_ni_syscall /* query_module syscall holder */
879 .long sys_poll
880 .long sys_nfsservctl
881 .long sys_setresgid /* 170 */
882 .long sys_getresgid
883 .long sys_prctl
884 .long sys_rt_sigreturn
885 .long sys_rt_sigaction
886 .long sys_rt_sigprocmask /* 175 */
887 .long sys_rt_sigpending
888 .long sys_rt_sigtimedwait
889 .long sys_rt_sigqueueinfo
890 .long sys_rt_sigsuspend
891 .long sys_pread64 /* 180 */
892 .long sys_pwrite64
893 .long sys_ni_syscall /* chown16 syscall holder */
894 .long sys_getcwd
895 .long sys_capget
896 .long sys_capset /* 185 */
897 .long sys_sigaltstack
898 .long sys_sendfile
899 .long sys_ni_syscall /* streams1 */
900 .long sys_ni_syscall /* streams2 */
901 .long sys_vfork /* 190 */
902 .long sys_getrlimit
903 .long sys_mmap2
904 .long sys_truncate64
905 .long sys_ftruncate64
906 .long sys_stat64 /* 195 */
907 .long sys_lstat64
908 .long sys_fstat64
909 .long sys_lchown
910 .long sys_getuid
911 .long sys_getgid /* 200 */
912 .long sys_geteuid
913 .long sys_getegid
914 .long sys_setreuid
915 .long sys_setregid
916 .long sys_getgroups /* 205 */
917 .long sys_setgroups
918 .long sys_fchown
919 .long sys_setresuid
920 .long sys_getresuid
921 .long sys_setresgid /* 210 */
922 .long sys_getresgid
923 .long sys_chown
924 .long sys_setuid
925 .long sys_setgid
926 .long sys_setfsuid /* 215 */
927 .long sys_setfsgid
928 .long sys_pivot_root
929 .long sys_mincore
930 .long sys_madvise
931 .long sys_getdents64 /* 220 */
932 .long sys_fcntl64
933 .long sys_ni_syscall /* reserved for TUX */
934 .long sys_ni_syscall /* Reserved for Security */
935 .long sys_gettid
936 .long sys_readahead /* 225 */
937 .long sys_setxattr
938 .long sys_lsetxattr
939 .long sys_fsetxattr
940 .long sys_getxattr
941 .long sys_lgetxattr /* 230 */
942 .long sys_fgetxattr
943 .long sys_listxattr
944 .long sys_llistxattr
945 .long sys_flistxattr
946 .long sys_removexattr /* 235 */
947 .long sys_lremovexattr
948 .long sys_fremovexattr
949 .long sys_tkill
950 .long sys_sendfile64
951 .long sys_futex /* 240 */
952 .long sys_sched_setaffinity
953 .long sys_sched_getaffinity
954 .long sys_ni_syscall /* reserved for "set_thread_area" system call */
955 .long sys_ni_syscall /* reserved for "get_thread_area" system call */
956 .long sys_io_setup /* 245 */
957 .long sys_io_destroy
958 .long sys_io_getevents
959 .long sys_io_submit
960 .long sys_io_cancel
961 .long sys_fadvise64 /* 250 */
962 .long sys_ni_syscall
963 .long sys_exit_group
964 .long sys_lookup_dcookie
965 .long sys_epoll_create
966 .long sys_epoll_ctl /* 255 */
967 .long sys_epoll_wait
968 .long sys_remap_file_pages
969 .long sys_set_tid_address
970 .long sys_timer_create
971 .long sys_timer_settime /* 260 */
972 .long sys_timer_gettime
973 .long sys_timer_getoverrun
974 .long sys_timer_delete
975 .long sys_clock_settime
976 .long sys_clock_gettime /* 265 */
977 .long sys_clock_getres
978 .long sys_clock_nanosleep
979 .long sys_statfs64
980 .long sys_fstatfs64
981 .long sys_tgkill /* 270 */
982 .long sys_utimes
983 .long sys_fadvise64_64
984 .long sys_ni_syscall /* Reserved for sys_vserver */
985 .long sys_ni_syscall /* Reserved for sys_mbind */
986 .long sys_ni_syscall /* Reserved for sys_get_mempolicy */
987 .long sys_ni_syscall /* Reserved for sys_set_mempolicy */
988 .long sys_mq_open
989 .long sys_mq_unlink
990 .long sys_mq_timedsend
991 .long sys_mq_timedreceive /* 280 */
992 .long sys_mq_notify
993 .long sys_mq_getsetattr
994 .long sys_ni_syscall /* reserved for kexec */
995 .long sys_waitid
996 541
997syscall_table_size=(.-sys_call_table) 542syscall_table_size=(.-sys_call_table)
diff --git a/arch/m32r/kernel/syscall_table.S b/arch/m32r/kernel/syscall_table.S
new file mode 100644
index 0000000000..751ac2a3d1
--- /dev/null
+++ b/arch/m32r/kernel/syscall_table.S
@@ -0,0 +1,286 @@
1ENTRY(sys_call_table)
2 .long sys_restart_syscall /* 0 - old "setup()" system call*/
3 .long sys_exit
4 .long sys_fork
5 .long sys_read
6 .long sys_write
7 .long sys_open /* 5 */
8 .long sys_close
9 .long sys_waitpid
10 .long sys_creat
11 .long sys_link
12 .long sys_unlink /* 10 */
13 .long sys_execve
14 .long sys_chdir
15 .long sys_time
16 .long sys_mknod
17 .long sys_chmod /* 15 */
18 .long sys_ni_syscall /* lchown16 syscall holder */
19 .long sys_ni_syscall /* old break syscall holder */
20 .long sys_ni_syscall /* old stat syscall holder */
21 .long sys_lseek
22 .long sys_getpid /* 20 */
23 .long sys_mount
24 .long sys_oldumount
25 .long sys_ni_syscall /* setuid16 syscall holder */
26 .long sys_ni_syscall /* getuid16 syscall holder */
27 .long sys_stime /* 25 */
28 .long sys_ptrace
29 .long sys_alarm
30 .long sys_ni_syscall /* old fstat syscall holder */
31 .long sys_pause
32 .long sys_utime /* 30 */
33 .long sys_ni_syscall /* old stty syscall holder */
34 .long sys_cachectl /* for M32R */ /* old gtty syscall holder */
35 .long sys_access
36 .long sys_ni_syscall /* nice syscall holder */
37 .long sys_ni_syscall /* 35 - old ftime syscall holder */
38 .long sys_sync
39 .long sys_kill
40 .long sys_rename
41 .long sys_mkdir
42 .long sys_rmdir /* 40 */
43 .long sys_dup
44 .long sys_pipe
45 .long sys_times
46 .long sys_ni_syscall /* old prof syscall holder */
47 .long sys_brk /* 45 */
48 .long sys_ni_syscall /* setgid16 syscall holder */
49 .long sys_getgid /* will be unused */
50 .long sys_ni_syscall /* signal syscall holder */
51 .long sys_ni_syscall /* geteuid16 syscall holder */
52 .long sys_ni_syscall /* 50 - getegid16 syscall holder */
53 .long sys_acct
54 .long sys_umount /* recycled never used phys() */
55 .long sys_ni_syscall /* old lock syscall holder */
56 .long sys_ioctl
57 .long sys_fcntl /* 55 - will be unused */
58 .long sys_ni_syscall /* mpx syscall holder */
59 .long sys_setpgid
60 .long sys_ni_syscall /* old ulimit syscall holder */
61 .long sys_ni_syscall /* sys_olduname */
62 .long sys_umask /* 60 */
63 .long sys_chroot
64 .long sys_ustat
65 .long sys_dup2
66 .long sys_getppid
67 .long sys_getpgrp /* 65 */
68 .long sys_setsid
69 .long sys_ni_syscall /* sigaction syscall holder */
70 .long sys_ni_syscall /* sgetmask syscall holder */
71 .long sys_ni_syscall /* ssetmask syscall holder */
72 .long sys_ni_syscall /* 70 - setreuid16 syscall holder */
73 .long sys_ni_syscall /* setregid16 syscall holder */
74 .long sys_ni_syscall /* sigsuspend syscall holder */
75 .long sys_ni_syscall /* sigpending syscall holder */
76 .long sys_sethostname
77 .long sys_setrlimit /* 75 */
78 .long sys_getrlimit/*will be unused*/
79 .long sys_getrusage
80 .long sys_gettimeofday
81 .long sys_settimeofday
82 .long sys_ni_syscall /* 80 - getgroups16 syscall holder */
83 .long sys_ni_syscall /* setgroups16 syscall holder */
84 .long sys_ni_syscall /* sys_oldselect */
85 .long sys_symlink
86 .long sys_ni_syscall /* old lstat syscall holder */
87 .long sys_readlink /* 85 */
88 .long sys_uselib
89 .long sys_swapon
90 .long sys_reboot
91 .long sys_ni_syscall /* readdir syscall holder */
92 .long sys_ni_syscall /* 90 - old_mmap syscall holder */
93 .long sys_munmap
94 .long sys_truncate
95 .long sys_ftruncate
96 .long sys_fchmod
97 .long sys_ni_syscall /* 95 - fchwon16 syscall holder */
98 .long sys_getpriority
99 .long sys_setpriority
100 .long sys_ni_syscall /* old profil syscall holder */
101 .long sys_statfs
102 .long sys_fstatfs /* 100 */
103 .long sys_ni_syscall /* ioperm syscall holder */
104 .long sys_socketcall
105 .long sys_syslog
106 .long sys_setitimer
107 .long sys_getitimer /* 105 */
108 .long sys_newstat
109 .long sys_newlstat
110 .long sys_newfstat
111 .long sys_ni_syscall /* old uname syscall holder */
112 .long sys_ni_syscall /* 110 - iopl syscall holder */
113 .long sys_vhangup
114 .long sys_ni_syscall /* idle syscall holder */
115 .long sys_ni_syscall /* vm86old syscall holder */
116 .long sys_wait4
117 .long sys_swapoff /* 115 */
118 .long sys_sysinfo
119 .long sys_ipc
120 .long sys_fsync
121 .long sys_ni_syscall /* sigreturn syscall holder */
122 .long sys_clone /* 120 */
123 .long sys_setdomainname
124 .long sys_newuname
125 .long sys_ni_syscall /* modify_ldt syscall holder */
126 .long sys_adjtimex
127 .long sys_mprotect /* 125 */
128 .long sys_ni_syscall /* sigprocmask syscall holder */
129 .long sys_ni_syscall /* create_module syscall holder */
130 .long sys_init_module
131 .long sys_delete_module
132 .long sys_ni_syscall /* 130 - get_kernel_syms */
133 .long sys_quotactl
134 .long sys_getpgid
135 .long sys_fchdir
136 .long sys_bdflush
137 .long sys_sysfs /* 135 */
138 .long sys_personality
139 .long sys_ni_syscall /* afs_syscall syscall holder */
140 .long sys_ni_syscall /* setfsuid16 syscall holder */
141 .long sys_ni_syscall /* setfsgid16 syscall holder */
142 .long sys_llseek /* 140 */
143 .long sys_getdents
144 .long sys_select
145 .long sys_flock
146 .long sys_msync
147 .long sys_readv /* 145 */
148 .long sys_writev
149 .long sys_getsid
150 .long sys_fdatasync
151 .long sys_sysctl
152 .long sys_mlock /* 150 */
153 .long sys_munlock
154 .long sys_mlockall
155 .long sys_munlockall
156 .long sys_sched_setparam
157 .long sys_sched_getparam /* 155 */
158 .long sys_sched_setscheduler
159 .long sys_sched_getscheduler
160 .long sys_sched_yield
161 .long sys_sched_get_priority_max
162 .long sys_sched_get_priority_min /* 160 */
163 .long sys_sched_rr_get_interval
164 .long sys_nanosleep
165 .long sys_mremap
166 .long sys_ni_syscall /* setresuid16 syscall holder */
167 .long sys_ni_syscall /* 165 - getresuid16 syscall holder */
168 .long sys_tas /* vm86 syscall holder */
169 .long sys_ni_syscall /* query_module syscall holder */
170 .long sys_poll
171 .long sys_nfsservctl
172 .long sys_setresgid /* 170 */
173 .long sys_getresgid
174 .long sys_prctl
175 .long sys_rt_sigreturn
176 .long sys_rt_sigaction
177 .long sys_rt_sigprocmask /* 175 */
178 .long sys_rt_sigpending
179 .long sys_rt_sigtimedwait
180 .long sys_rt_sigqueueinfo
181 .long sys_rt_sigsuspend
182 .long sys_pread64 /* 180 */
183 .long sys_pwrite64
184 .long sys_ni_syscall /* chown16 syscall holder */
185 .long sys_getcwd
186 .long sys_capget
187 .long sys_capset /* 185 */
188 .long sys_sigaltstack
189 .long sys_sendfile
190 .long sys_ni_syscall /* streams1 */
191 .long sys_ni_syscall /* streams2 */
192 .long sys_vfork /* 190 */
193 .long sys_getrlimit
194 .long sys_mmap2
195 .long sys_truncate64
196 .long sys_ftruncate64
197 .long sys_stat64 /* 195 */
198 .long sys_lstat64
199 .long sys_fstat64
200 .long sys_lchown
201 .long sys_getuid
202 .long sys_getgid /* 200 */
203 .long sys_geteuid
204 .long sys_getegid
205 .long sys_setreuid
206 .long sys_setregid
207 .long sys_getgroups /* 205 */
208 .long sys_setgroups
209 .long sys_fchown
210 .long sys_setresuid
211 .long sys_getresuid
212 .long sys_setresgid /* 210 */
213 .long sys_getresgid
214 .long sys_chown
215 .long sys_setuid
216 .long sys_setgid
217 .long sys_setfsuid /* 215 */
218 .long sys_setfsgid
219 .long sys_pivot_root
220 .long sys_mincore
221 .long sys_madvise
222 .long sys_getdents64 /* 220 */
223 .long sys_fcntl64
224 .long sys_ni_syscall /* reserved for TUX */
225 .long sys_ni_syscall /* Reserved for Security */
226 .long sys_gettid
227 .long sys_readahead /* 225 */
228 .long sys_setxattr
229 .long sys_lsetxattr
230 .long sys_fsetxattr
231 .long sys_getxattr
232 .long sys_lgetxattr /* 230 */
233 .long sys_fgetxattr
234 .long sys_listxattr
235 .long sys_llistxattr
236 .long sys_flistxattr
237 .long sys_removexattr /* 235 */
238 .long sys_lremovexattr
239 .long sys_fremovexattr
240 .long sys_tkill
241 .long sys_sendfile64
242 .long sys_futex /* 240 */
243 .long sys_sched_setaffinity
244 .long sys_sched_getaffinity
245 .long sys_ni_syscall /* reserved for "set_thread_area" system call */
246 .long sys_ni_syscall /* reserved for "get_thread_area" system call */
247 .long sys_io_setup /* 245 */
248 .long sys_io_destroy
249 .long sys_io_getevents
250 .long sys_io_submit
251 .long sys_io_cancel
252 .long sys_fadvise64 /* 250 */
253 .long sys_ni_syscall
254 .long sys_exit_group
255 .long sys_lookup_dcookie
256 .long sys_epoll_create
257 .long sys_epoll_ctl /* 255 */
258 .long sys_epoll_wait
259 .long sys_remap_file_pages
260 .long sys_set_tid_address
261 .long sys_timer_create
262 .long sys_timer_settime /* 260 */
263 .long sys_timer_gettime
264 .long sys_timer_getoverrun
265 .long sys_timer_delete
266 .long sys_clock_settime
267 .long sys_clock_gettime /* 265 */
268 .long sys_clock_getres
269 .long sys_clock_nanosleep
270 .long sys_statfs64
271 .long sys_fstatfs64
272 .long sys_tgkill /* 270 */
273 .long sys_utimes
274 .long sys_fadvise64_64
275 .long sys_ni_syscall /* Reserved for sys_vserver */
276 .long sys_ni_syscall /* Reserved for sys_mbind */
277 .long sys_ni_syscall /* Reserved for sys_get_mempolicy */
278 .long sys_ni_syscall /* Reserved for sys_set_mempolicy */
279 .long sys_mq_open
280 .long sys_mq_unlink
281 .long sys_mq_timedsend
282 .long sys_mq_timedreceive /* 280 */
283 .long sys_mq_notify
284 .long sys_mq_getsetattr
285 .long sys_ni_syscall /* reserved for kexec */
286 .long sys_waitid
diff --git a/arch/m32r/platforms/Makefile b/arch/m32r/platforms/Makefile
new file mode 100644
index 0000000000..da03e1a8fe
--- /dev/null
+++ b/arch/m32r/platforms/Makefile
@@ -0,0 +1,9 @@
1# arch/m32r/platforms/Makefile
2obj-$(CONFIG_PLAT_M32104UT) += m32104ut/
3obj-$(CONFIG_PLAT_M32700UT) += m32700ut/
4obj-$(CONFIG_PLAT_MAPPI) += mappi/
5obj-$(CONFIG_PLAT_MAPPI2) += mappi2/
6obj-$(CONFIG_PLAT_MAPPI3) += mappi3/
7obj-$(CONFIG_PLAT_OAKS32R) += oaks32r/
8obj-$(CONFIG_PLAT_OPSPUT) += opsput/
9obj-$(CONFIG_PLAT_USRV) += usrv/
diff --git a/arch/m32r/platforms/m32104ut/Makefile b/arch/m32r/platforms/m32104ut/Makefile
new file mode 100644
index 0000000000..0de59084f2
--- /dev/null
+++ b/arch/m32r/platforms/m32104ut/Makefile
@@ -0,0 +1 @@
obj-y := setup.o io.o
diff --git a/arch/m32r/kernel/io_m32104ut.c b/arch/m32r/platforms/m32104ut/io.c
index 2189eca30b..e5d8be6fbb 100644
--- a/arch/m32r/kernel/io_m32104ut.c
+++ b/arch/m32r/platforms/m32104ut/io.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/io_m32104ut.c 2 * linux/arch/m32r/platforms/m32104ut/io.c
3 * 3 *
4 * Typical I/O routines for M32104UT board. 4 * Typical I/O routines for M32104UT board.
5 * 5 *
diff --git a/arch/m32r/kernel/setup_m32104ut.c b/arch/m32r/platforms/m32104ut/setup.c
index 1692b321f4..98138b4e92 100644
--- a/arch/m32r/kernel/setup_m32104ut.c
+++ b/arch/m32r/platforms/m32104ut/setup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/setup_m32104ut.c 2 * linux/arch/m32r/platforms/m32104ut/setup.c
3 * 3 *
4 * Setup routines for M32104UT Board 4 * Setup routines for M32104UT Board
5 * 5 *
diff --git a/arch/m32r/platforms/m32700ut/Makefile b/arch/m32r/platforms/m32700ut/Makefile
new file mode 100644
index 0000000000..0de59084f2
--- /dev/null
+++ b/arch/m32r/platforms/m32700ut/Makefile
@@ -0,0 +1 @@
obj-y := setup.o io.o
diff --git a/arch/m32r/m32700ut/dot.gdbinit_200MHz_16MB b/arch/m32r/platforms/m32700ut/dot.gdbinit_200MHz_16MB
index 525dab4698..525dab4698 100644
--- a/arch/m32r/m32700ut/dot.gdbinit_200MHz_16MB
+++ b/arch/m32r/platforms/m32700ut/dot.gdbinit_200MHz_16MB
diff --git a/arch/m32r/m32700ut/dot.gdbinit_300MHz_32MB b/arch/m32r/platforms/m32700ut/dot.gdbinit_300MHz_32MB
index aa503657a4..aa503657a4 100644
--- a/arch/m32r/m32700ut/dot.gdbinit_300MHz_32MB
+++ b/arch/m32r/platforms/m32700ut/dot.gdbinit_300MHz_32MB
diff --git a/arch/m32r/m32700ut/dot.gdbinit_400MHz_32MB b/arch/m32r/platforms/m32700ut/dot.gdbinit_400MHz_32MB
index adc608aab2..adc608aab2 100644
--- a/arch/m32r/m32700ut/dot.gdbinit_400MHz_32MB
+++ b/arch/m32r/platforms/m32700ut/dot.gdbinit_400MHz_32MB
diff --git a/arch/m32r/kernel/io_m32700ut.c b/arch/m32r/platforms/m32700ut/io.c
index 5898f4031a..6862586e58 100644
--- a/arch/m32r/kernel/io_m32700ut.c
+++ b/arch/m32r/platforms/m32700ut/io.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/io_m32700ut.c 2 * linux/arch/m32r/platforms/m32700ut/io.c
3 * 3 *
4 * Typical I/O routines for M32700UT board. 4 * Typical I/O routines for M32700UT board.
5 * 5 *
diff --git a/arch/m32r/kernel/setup_m32700ut.c b/arch/m32r/platforms/m32700ut/setup.c
index 7efc145c74..77b0ae9379 100644
--- a/arch/m32r/kernel/setup_m32700ut.c
+++ b/arch/m32r/platforms/m32700ut/setup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/setup_m32700ut.c 2 * linux/arch/m32r/platforms/m32700ut/setup.c
3 * 3 *
4 * Setup routines for Renesas M32700UT Board 4 * Setup routines for Renesas M32700UT Board
5 * 5 *
diff --git a/arch/m32r/platforms/mappi/Makefile b/arch/m32r/platforms/mappi/Makefile
new file mode 100644
index 0000000000..0de59084f2
--- /dev/null
+++ b/arch/m32r/platforms/mappi/Makefile
@@ -0,0 +1 @@
obj-y := setup.o io.o
diff --git a/arch/m32r/mappi/dot.gdbinit b/arch/m32r/platforms/mappi/dot.gdbinit
index 7a1d293863..7a1d293863 100644
--- a/arch/m32r/mappi/dot.gdbinit
+++ b/arch/m32r/platforms/mappi/dot.gdbinit
diff --git a/arch/m32r/mappi/dot.gdbinit.nommu b/arch/m32r/platforms/mappi/dot.gdbinit.nommu
index 297536cf67..297536cf67 100644
--- a/arch/m32r/mappi/dot.gdbinit.nommu
+++ b/arch/m32r/platforms/mappi/dot.gdbinit.nommu
diff --git a/arch/m32r/mappi/dot.gdbinit.smp b/arch/m32r/platforms/mappi/dot.gdbinit.smp
index 171489a440..171489a440 100644
--- a/arch/m32r/mappi/dot.gdbinit.smp
+++ b/arch/m32r/platforms/mappi/dot.gdbinit.smp
diff --git a/arch/m32r/kernel/io_mappi.c b/arch/m32r/platforms/mappi/io.c
index 31396789ab..ac1c396d47 100644
--- a/arch/m32r/kernel/io_mappi.c
+++ b/arch/m32r/platforms/mappi/io.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/io_mappi.c 2 * linux/arch/m32r/platforms/mappi/io.c
3 * 3 *
4 * Typical I/O routines for Mappi board. 4 * Typical I/O routines for Mappi board.
5 * 5 *
diff --git a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/platforms/mappi/setup.c
index fe73c9ec61..3ec087ff22 100644
--- a/arch/m32r/kernel/setup_mappi.c
+++ b/arch/m32r/platforms/mappi/setup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/setup_mappi.c 2 * linux/arch/m32r/platforms/mappi/setup.c
3 * 3 *
4 * Setup routines for Renesas MAPPI Board 4 * Setup routines for Renesas MAPPI Board
5 * 5 *
diff --git a/arch/m32r/platforms/mappi2/Makefile b/arch/m32r/platforms/mappi2/Makefile
new file mode 100644
index 0000000000..0de59084f2
--- /dev/null
+++ b/arch/m32r/platforms/mappi2/Makefile
@@ -0,0 +1 @@
obj-y := setup.o io.o
diff --git a/arch/m32r/mappi2/dot.gdbinit.vdec2 b/arch/m32r/platforms/mappi2/dot.gdbinit.vdec2
index 797a830bd4..797a830bd4 100644
--- a/arch/m32r/mappi2/dot.gdbinit.vdec2
+++ b/arch/m32r/platforms/mappi2/dot.gdbinit.vdec2
diff --git a/arch/m32r/kernel/io_mappi2.c b/arch/m32r/platforms/mappi2/io.c
index ecc6aa88f9..da58960b3f 100644
--- a/arch/m32r/kernel/io_mappi2.c
+++ b/arch/m32r/platforms/mappi2/io.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/io_mappi2.c 2 * linux/arch/m32r/platforms/mappi2/io.c
3 * 3 *
4 * Typical I/O routines for Mappi2 board. 4 * Typical I/O routines for Mappi2 board.
5 * 5 *
diff --git a/arch/m32r/kernel/setup_mappi2.c b/arch/m32r/platforms/mappi2/setup.c
index 55abb21027..d87969c635 100644
--- a/arch/m32r/kernel/setup_mappi2.c
+++ b/arch/m32r/platforms/mappi2/setup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/setup_mappi2.c 2 * linux/arch/m32r/platforms/mappi2/setup.c
3 * 3 *
4 * Setup routines for Renesas MAPPI-II(M3A-ZA36) Board 4 * Setup routines for Renesas MAPPI-II(M3A-ZA36) Board
5 * 5 *
diff --git a/arch/m32r/platforms/mappi3/Makefile b/arch/m32r/platforms/mappi3/Makefile
new file mode 100644
index 0000000000..0de59084f2
--- /dev/null
+++ b/arch/m32r/platforms/mappi3/Makefile
@@ -0,0 +1 @@
obj-y := setup.o io.o
diff --git a/arch/m32r/mappi3/dot.gdbinit b/arch/m32r/platforms/mappi3/dot.gdbinit
index 89c22184e1..89c22184e1 100644
--- a/arch/m32r/mappi3/dot.gdbinit
+++ b/arch/m32r/platforms/mappi3/dot.gdbinit
diff --git a/arch/m32r/kernel/io_mappi3.c b/arch/m32r/platforms/mappi3/io.c
index a13b5f6b07..1bc3f90fdc 100644
--- a/arch/m32r/kernel/io_mappi3.c
+++ b/arch/m32r/platforms/mappi3/io.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/io_mappi3.c 2 * linux/arch/m32r/platforms/mappi3/io.c
3 * 3 *
4 * Typical I/O routines for Mappi3 board. 4 * Typical I/O routines for Mappi3 board.
5 * 5 *
diff --git a/arch/m32r/kernel/setup_mappi3.c b/arch/m32r/platforms/mappi3/setup.c
index 93dc010c7f..785b4bd6d9 100644
--- a/arch/m32r/kernel/setup_mappi3.c
+++ b/arch/m32r/platforms/mappi3/setup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/setup_mappi3.c 2 * linux/arch/m32r/platforms/mappi3/setup.c
3 * 3 *
4 * Setup routines for Renesas MAPPI-III(M3A-2170) Board 4 * Setup routines for Renesas MAPPI-III(M3A-2170) Board
5 * 5 *
diff --git a/arch/m32r/platforms/oaks32r/Makefile b/arch/m32r/platforms/oaks32r/Makefile
new file mode 100644
index 0000000000..0de59084f2
--- /dev/null
+++ b/arch/m32r/platforms/oaks32r/Makefile
@@ -0,0 +1 @@
obj-y := setup.o io.o
diff --git a/arch/m32r/oaks32r/dot.gdbinit.nommu b/arch/m32r/platforms/oaks32r/dot.gdbinit.nommu
index d481d972b8..d481d972b8 100644
--- a/arch/m32r/oaks32r/dot.gdbinit.nommu
+++ b/arch/m32r/platforms/oaks32r/dot.gdbinit.nommu
diff --git a/arch/m32r/kernel/io_oaks32r.c b/arch/m32r/platforms/oaks32r/io.c
index 068bf47060..364a3b2e89 100644
--- a/arch/m32r/kernel/io_oaks32r.c
+++ b/arch/m32r/platforms/oaks32r/io.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/io_oaks32r.c 2 * linux/arch/m32r/platforms/oaks32r/io.c
3 * 3 *
4 * Typical I/O routines for OAKS32R board. 4 * Typical I/O routines for OAKS32R board.
5 * 5 *
diff --git a/arch/m32r/kernel/setup_oaks32r.c b/arch/m32r/platforms/oaks32r/setup.c
index cd62598e3c..6faa5db68e 100644
--- a/arch/m32r/kernel/setup_oaks32r.c
+++ b/arch/m32r/platforms/oaks32r/setup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/setup_oaks32r.c 2 * linux/arch/m32r/platforms/oaks32r/setup.c
3 * 3 *
4 * Setup routines for OAKS32R Board 4 * Setup routines for OAKS32R Board
5 * 5 *
diff --git a/arch/m32r/platforms/opsput/Makefile b/arch/m32r/platforms/opsput/Makefile
new file mode 100644
index 0000000000..0de59084f2
--- /dev/null
+++ b/arch/m32r/platforms/opsput/Makefile
@@ -0,0 +1 @@
obj-y := setup.o io.o
diff --git a/arch/m32r/opsput/dot.gdbinit b/arch/m32r/platforms/opsput/dot.gdbinit
index b7e6c66408..b7e6c66408 100644
--- a/arch/m32r/opsput/dot.gdbinit
+++ b/arch/m32r/platforms/opsput/dot.gdbinit
diff --git a/arch/m32r/kernel/io_opsput.c b/arch/m32r/platforms/opsput/io.c
index 3cbb1f717e..379efb7712 100644
--- a/arch/m32r/kernel/io_opsput.c
+++ b/arch/m32r/platforms/opsput/io.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/io_opsput.c 2 * linux/arch/m32r/platforms/opsput/io.c
3 * 3 *
4 * Typical I/O routines for OPSPUT board. 4 * Typical I/O routines for OPSPUT board.
5 * 5 *
diff --git a/arch/m32r/kernel/setup_opsput.c b/arch/m32r/platforms/opsput/setup.c
index 62d6b71de4..fab13fd854 100644
--- a/arch/m32r/kernel/setup_opsput.c
+++ b/arch/m32r/platforms/opsput/setup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/setup_opsput.c 2 * linux/arch/m32r/platforms/opsput/setup.c
3 * 3 *
4 * Setup routines for Renesas OPSPUT Board 4 * Setup routines for Renesas OPSPUT Board
5 * 5 *
diff --git a/arch/m32r/platforms/usrv/Makefile b/arch/m32r/platforms/usrv/Makefile
new file mode 100644
index 0000000000..0de59084f2
--- /dev/null
+++ b/arch/m32r/platforms/usrv/Makefile
@@ -0,0 +1 @@
obj-y := setup.o io.o
diff --git a/arch/m32r/kernel/io_usrv.c b/arch/m32r/platforms/usrv/io.c
index a8c0e2eceb..f5e50d37ba 100644
--- a/arch/m32r/kernel/io_usrv.c
+++ b/arch/m32r/platforms/usrv/io.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/io_usrv.c 2 * linux/arch/m32r/platforms/usrv/io.c
3 * 3 *
4 * Typical I/O routines for uServer board. 4 * Typical I/O routines for uServer board.
5 * 5 *
@@ -17,7 +17,7 @@
17#include <asm/io.h> 17#include <asm/io.h>
18 18
19#include <linux/types.h> 19#include <linux/types.h>
20#include "../drivers/m32r_cfc.h" 20#include "../../../../drivers/pcmcia/m32r_cfc.h"
21 21
22extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int); 22extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int);
23extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int); 23extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int);
diff --git a/arch/m32r/kernel/setup_usrv.c b/arch/m32r/platforms/usrv/setup.c
index f5b4b5ac31..89588d649e 100644
--- a/arch/m32r/kernel/setup_usrv.c
+++ b/arch/m32r/platforms/usrv/setup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/m32r/kernel/setup_usrv.c 2 * linux/arch/m32r/platforms/usrv/setup.c
3 * 3 *
4 * Setup routines for MITSUBISHI uServer 4 * Setup routines for MITSUBISHI uServer
5 * 5 *
@@ -198,7 +198,7 @@ void __init init_IRQ(void)
198#endif /* CONFIG_SERIAL_M32R_SIO */ 198#endif /* CONFIG_SERIAL_M32R_SIO */
199 199
200 /* INT#67-#71: CFC#0 IREQ on PLD */ 200 /* INT#67-#71: CFC#0 IREQ on PLD */
201 for (i = 0 ; i < CONFIG_CFC_NUM ; i++ ) { 201 for (i = 0 ; i < CONFIG_M32R_CFC_NUM ; i++ ) {
202 irq_desc[PLD_IRQ_CF0 + i].status = IRQ_DISABLED; 202 irq_desc[PLD_IRQ_CF0 + i].status = IRQ_DISABLED;
203 irq_desc[PLD_IRQ_CF0 + i].chip = &m32700ut_pld_irq_type; 203 irq_desc[PLD_IRQ_CF0 + i].chip = &m32700ut_pld_irq_type;
204 irq_desc[PLD_IRQ_CF0 + i].action = 0; 204 irq_desc[PLD_IRQ_CF0 + i].action = 0;
@@ -246,4 +246,3 @@ void __init init_IRQ(void)
246 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD11; 246 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD11;
247 enable_mappi_irq(M32R_IRQ_INT1); 247 enable_mappi_irq(M32R_IRQ_INT1);
248} 248}
249
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index e162ee685d..918f5dbeae 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -735,4 +735,14 @@ sys_call_table:
735 .long sys_tee 735 .long sys_tee
736 .long sys_vmsplice 736 .long sys_vmsplice
737 .long sys_move_pages /* 310 */ 737 .long sys_move_pages /* 310 */
738 .long sys_sched_setaffinity
739 .long sys_sched_getaffinity
740 .long sys_kexec_load
741 .long sys_getcpu
742 .long sys_epoll_pwait /* 315 */
743 .long sys_utimensat
744 .long sys_signalfd
745 .long sys_timerfd
746 .long sys_eventfd
747 .long sys_fallocate /* 320 */
738 748
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c
index 2cf0690b78..e792d3cba4 100644
--- a/arch/m68k/kernel/ptrace.c
+++ b/arch/m68k/kernel/ptrace.c
@@ -116,7 +116,6 @@ static inline void singlestep_disable(struct task_struct *child)
116void ptrace_disable(struct task_struct *child) 116void ptrace_disable(struct task_struct *child)
117{ 117{
118 singlestep_disable(child); 118 singlestep_disable(child);
119 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
120} 119}
121 120
122long arch_ptrace(struct task_struct *child, long request, long addr, long data) 121long arch_ptrace(struct task_struct *child, long request, long addr, long data)
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index 846f975346..47502d5ec1 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -28,6 +28,7 @@
28#include <linux/a.out.h> 28#include <linux/a.out.h>
29#include <linux/interrupt.h> 29#include <linux/interrupt.h>
30#include <linux/reboot.h> 30#include <linux/reboot.h>
31#include <linux/fs.h>
31 32
32#include <asm/uaccess.h> 33#include <asm/uaccess.h>
33#include <asm/system.h> 34#include <asm/system.h>
diff --git a/arch/m68knommu/kernel/sys_m68k.c b/arch/m68knommu/kernel/sys_m68k.c
index 48e6b33e8b..15d62c5279 100644
--- a/arch/m68knommu/kernel/sys_m68k.c
+++ b/arch/m68knommu/kernel/sys_m68k.c
@@ -18,6 +18,7 @@
18#include <linux/mman.h> 18#include <linux/mman.h>
19#include <linux/file.h> 19#include <linux/file.h>
20#include <linux/utsname.h> 20#include <linux/utsname.h>
21#include <linux/fs.h>
21 22
22#include <asm/setup.h> 23#include <asm/setup.h>
23#include <asm/uaccess.h> 24#include <asm/uaccess.h>
diff --git a/arch/m68knommu/kernel/syscalltable.S b/arch/m68knommu/kernel/syscalltable.S
index 4603f4f3c9..9620093514 100644
--- a/arch/m68knommu/kernel/syscalltable.S
+++ b/arch/m68knommu/kernel/syscalltable.S
@@ -329,6 +329,16 @@ ENTRY(sys_call_table)
329 .long sys_tee 329 .long sys_tee
330 .long sys_vmsplice 330 .long sys_vmsplice
331 .long sys_move_pages /* 310 */ 331 .long sys_move_pages /* 310 */
332 .long sys_sched_setaffinity
333 .long sys_sched_getaffinity
334 .long sys_kexec_load
335 .long sys_getcpu
336 .long sys_epoll_pwait /* 315 */
337 .long sys_utimensat
338 .long sys_signalfd
339 .long sys_timerfd
340 .long sys_eventfd
341 .long sys_fallocate /* 320 */
332 342
333 .rept NR_syscalls-(.-sys_call_table)/4 343 .rept NR_syscalls-(.-sys_call_table)/4
334 .long sys_ni_syscall 344 .long sys_ni_syscall
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 3b404b7dfa..3b807b4bc7 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -28,7 +28,6 @@ config BASLER_EXCITE
28 select MIPS_RM9122 28 select MIPS_RM9122
29 select SYS_HAS_CPU_RM9000 29 select SYS_HAS_CPU_RM9000
30 select SYS_SUPPORTS_32BIT_KERNEL 30 select SYS_SUPPORTS_32BIT_KERNEL
31 select SYS_SUPPORTS_64BIT_KERNEL
32 select SYS_SUPPORTS_BIG_ENDIAN 31 select SYS_SUPPORTS_BIG_ENDIAN
33 select SYS_SUPPORTS_KGDB 32 select SYS_SUPPORTS_KGDB
34 help 33 help
@@ -81,10 +80,10 @@ config MACH_DECSTATION
81 If you have one of the following DECstation Models you definitely 80 If you have one of the following DECstation Models you definitely
82 want to choose R4xx0 for the CPU Type: 81 want to choose R4xx0 for the CPU Type:
83 82
84 DECstation 5000/50 83 DECstation 5000/50
85 DECstation 5000/150 84 DECstation 5000/150
86 DECstation 5000/260 85 DECstation 5000/260
87 DECsystem 5900/260 86 DECsystem 5900/260
88 87
89 otherwise choose R3000. 88 otherwise choose R3000.
90 89
@@ -126,6 +125,7 @@ config LEMOTE_FULONG
126 select SYS_SUPPORTS_HIGHMEM 125 select SYS_SUPPORTS_HIGHMEM
127 select SYS_HAS_EARLY_PRINTK 126 select SYS_HAS_EARLY_PRINTK
128 select GENERIC_HARDIRQS_NO__DO_IRQ 127 select GENERIC_HARDIRQS_NO__DO_IRQ
128 select GENERIC_ISA_DMA_SUPPORT_BROKEN
129 select CPU_HAS_WB 129 select CPU_HAS_WB
130 help 130 help
131 Lemote Fulong mini-PC board based on the Chinese Loongson-2E CPU and 131 Lemote Fulong mini-PC board based on the Chinese Loongson-2E CPU and
@@ -192,8 +192,7 @@ config MIPS_MALTA
192 board. 192 board.
193 193
194config MIPS_SEAD 194config MIPS_SEAD
195 bool "MIPS SEAD board (EXPERIMENTAL)" 195 bool "MIPS SEAD board"
196 depends on EXPERIMENTAL
197 select IRQ_CPU 196 select IRQ_CPU
198 select DMA_NONCOHERENT 197 select DMA_NONCOHERENT
199 select SYS_HAS_EARLY_PRINTK 198 select SYS_HAS_EARLY_PRINTK
@@ -528,6 +527,7 @@ config TOSHIBA_JMR3927
528 select DMA_NONCOHERENT 527 select DMA_NONCOHERENT
529 select HW_HAS_PCI 528 select HW_HAS_PCI
530 select MIPS_TX3927 529 select MIPS_TX3927
530 select IRQ_TXX9
531 select SWAP_IO_SPACE 531 select SWAP_IO_SPACE
532 select SYS_HAS_CPU_TX39XX 532 select SYS_HAS_CPU_TX39XX
533 select SYS_SUPPORTS_32BIT_KERNEL 533 select SYS_SUPPORTS_32BIT_KERNEL
@@ -540,7 +540,9 @@ config TOSHIBA_RBTX4927
540 select DMA_NONCOHERENT 540 select DMA_NONCOHERENT
541 select HAS_TXX9_SERIAL 541 select HAS_TXX9_SERIAL
542 select HW_HAS_PCI 542 select HW_HAS_PCI
543 select I8259 543 select IRQ_CPU
544 select IRQ_TXX9
545 select I8259 if TOSHIBA_FPCIB0
544 select SWAP_IO_SPACE 546 select SWAP_IO_SPACE
545 select SYS_HAS_CPU_TX49XX 547 select SYS_HAS_CPU_TX49XX
546 select SYS_SUPPORTS_32BIT_KERNEL 548 select SYS_SUPPORTS_32BIT_KERNEL
@@ -555,12 +557,11 @@ config TOSHIBA_RBTX4927
555 557
556config TOSHIBA_RBTX4938 558config TOSHIBA_RBTX4938
557 bool "Toshiba RBTX4938 board" 559 bool "Toshiba RBTX4938 board"
558 select HAVE_STD_PC_SERIAL_PORT
559 select DMA_NONCOHERENT 560 select DMA_NONCOHERENT
560 select GENERIC_ISA_DMA
561 select HAS_TXX9_SERIAL 561 select HAS_TXX9_SERIAL
562 select HW_HAS_PCI 562 select HW_HAS_PCI
563 select I8259 563 select IRQ_CPU
564 select IRQ_TXX9
564 select SWAP_IO_SPACE 565 select SWAP_IO_SPACE
565 select SYS_HAS_CPU_TX49XX 566 select SYS_HAS_CPU_TX49XX
566 select SYS_SUPPORTS_32BIT_KERNEL 567 select SYS_SUPPORTS_32BIT_KERNEL
@@ -604,7 +605,6 @@ source "arch/mips/sibyte/Kconfig"
604source "arch/mips/tx4927/Kconfig" 605source "arch/mips/tx4927/Kconfig"
605source "arch/mips/tx4938/Kconfig" 606source "arch/mips/tx4938/Kconfig"
606source "arch/mips/vr41xx/Kconfig" 607source "arch/mips/vr41xx/Kconfig"
607source "arch/mips/philips/pnx8550/common/Kconfig"
608 608
609endmenu 609endmenu
610 610
@@ -693,9 +693,9 @@ config EARLY_PRINTK
693config SYS_HAS_EARLY_PRINTK 693config SYS_HAS_EARLY_PRINTK
694 bool 694 bool
695 695
696config GENERIC_ISA_DMA 696config HOTPLUG_CPU
697 bool 697 bool
698 select ZONE_DMA 698 default n
699 699
700config I8259 700config I8259
701 bool 701 bool
@@ -712,9 +712,13 @@ config MIPS_DISABLE_OBSOLETE_IDE
712config NO_IOPORT 712config NO_IOPORT
713 def_bool n 713 def_bool n
714 714
715config GENERIC_ISA_DMA
716 bool
717 select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n
718
715config GENERIC_ISA_DMA_SUPPORT_BROKEN 719config GENERIC_ISA_DMA_SUPPORT_BROKEN
716 bool 720 bool
717 select ZONE_DMA 721 select GENERIC_ISA_DMA
718 722
719config GENERIC_GPIO 723config GENERIC_GPIO
720 bool 724 bool
@@ -768,6 +772,9 @@ config IRQ_MSP_SLP
768config IRQ_MSP_CIC 772config IRQ_MSP_CIC
769 bool 773 bool
770 774
775config IRQ_TXX9
776 bool
777
771config MIPS_BOARDS_GEN 778config MIPS_BOARDS_GEN
772 bool 779 bool
773 780
@@ -811,20 +818,6 @@ config EMMA2RH
811config SERIAL_RM9000 818config SERIAL_RM9000
812 bool 819 bool
813 820
814#
815# Unfortunately not all GT64120 systems run the chip at the same clock.
816# As the user for the clock rate and try to minimize the available options.
817#
818choice
819 prompt "Galileo Chip Clock"
820 depends on MOMENCO_OCELOT
821 default SYSCLK_100 if MOMENCO_OCELOT
822
823config SYSCLK_100
824 bool "100" if MOMENCO_OCELOT
825
826endchoice
827
828config ARC32 821config ARC32
829 bool 822 bool
830 823
@@ -1427,8 +1420,7 @@ config SB1_PASS_2_1_WORKAROUNDS
1427 default y 1420 default y
1428 1421
1429config 64BIT_PHYS_ADDR 1422config 64BIT_PHYS_ADDR
1430 bool "Support for 64-bit physical address space" 1423 bool
1431 depends on (CPU_R4X00 || CPU_R5000 || CPU_RM7000 || CPU_RM9000 || CPU_R10000 || CPU_SB1 || CPU_MIPS32 || CPU_MIPS64) && 32BIT
1432 1424
1433config CPU_HAS_LLSC 1425config CPU_HAS_LLSC
1434 bool 1426 bool
diff --git a/arch/mips/au1000/Kconfig b/arch/mips/au1000/Kconfig
index abea880982..29c95d9721 100644
--- a/arch/mips/au1000/Kconfig
+++ b/arch/mips/au1000/Kconfig
@@ -136,6 +136,7 @@ config SOC_AU1200
136 136
137config SOC_AU1X00 137config SOC_AU1X00
138 bool 138 bool
139 select 64BIT_PHYS_ADDR
139 select SYS_HAS_CPU_MIPS32_R1 140 select SYS_HAS_CPU_MIPS32_R1
140 select SYS_SUPPORTS_32BIT_KERNEL 141 select SYS_SUPPORTS_32BIT_KERNEL
141 select SYS_SUPPORTS_APM_EMULATION 142 select SYS_SUPPORTS_APM_EMULATION
diff --git a/arch/mips/au1000/common/gpio.c b/arch/mips/au1000/common/gpio.c
index 7abe420994..8527856aec 100644
--- a/arch/mips/au1000/common/gpio.c
+++ b/arch/mips/au1000/common/gpio.c
@@ -131,12 +131,12 @@ int au1xxx_gpio_direction_input(unsigned gpio)
131{ 131{
132 if (gpio >= AU1XXX_GPIO_BASE) 132 if (gpio >= AU1XXX_GPIO_BASE)
133#if defined(CONFIG_SOC_AU1000) 133#if defined(CONFIG_SOC_AU1000)
134 ; 134 return -ENODEV;
135#else 135#else
136 return au1xxx_gpio2_direction_input(gpio); 136 return au1xxx_gpio2_direction_input(gpio);
137#endif 137#endif
138 else 138
139 return au1xxx_gpio1_direction_input(gpio); 139 return au1xxx_gpio1_direction_input(gpio);
140} 140}
141 141
142EXPORT_SYMBOL(au1xxx_gpio_direction_input); 142EXPORT_SYMBOL(au1xxx_gpio_direction_input);
@@ -145,12 +145,12 @@ int au1xxx_gpio_direction_output(unsigned gpio, int value)
145{ 145{
146 if (gpio >= AU1XXX_GPIO_BASE) 146 if (gpio >= AU1XXX_GPIO_BASE)
147#if defined(CONFIG_SOC_AU1000) 147#if defined(CONFIG_SOC_AU1000)
148 ; 148 return -ENODEV;
149#else 149#else
150 return au1xxx_gpio2_direction_output(gpio, value); 150 return au1xxx_gpio2_direction_output(gpio, value);
151#endif 151#endif
152 else 152
153 return au1xxx_gpio1_direction_output(gpio, value); 153 return au1xxx_gpio1_direction_output(gpio, value);
154} 154}
155 155
156EXPORT_SYMBOL(au1xxx_gpio_direction_output); 156EXPORT_SYMBOL(au1xxx_gpio_direction_output);
diff --git a/arch/mips/au1000/common/pci.c b/arch/mips/au1000/common/pci.c
index 6c25e6c09f..9be99a6893 100644
--- a/arch/mips/au1000/common/pci.c
+++ b/arch/mips/au1000/common/pci.c
@@ -74,6 +74,7 @@ static int __init au1x_pci_setup(void)
74 printk(KERN_ERR "Unable to ioremap pci space\n"); 74 printk(KERN_ERR "Unable to ioremap pci space\n");
75 return 1; 75 return 1;
76 } 76 }
77 au1x_controller.io_map_base = virt_io_addr;
77 78
78#ifdef CONFIG_DMA_NONCOHERENT 79#ifdef CONFIG_DMA_NONCOHERENT
79 { 80 {
diff --git a/arch/mips/au1000/mtx-1/board_setup.c b/arch/mips/au1000/mtx-1/board_setup.c
index 7bc5af8917..2c460c1165 100644
--- a/arch/mips/au1000/mtx-1/board_setup.c
+++ b/arch/mips/au1000/mtx-1/board_setup.c
@@ -54,11 +54,11 @@ void board_reset (void)
54 54
55void __init board_setup(void) 55void __init board_setup(void)
56{ 56{
57#ifdef CONFIG_USB_OHCI 57#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
58 // enable USB power switch 58 // enable USB power switch
59 au_writel( au_readl(GPIO2_DIR) | 0x10, GPIO2_DIR ); 59 au_writel( au_readl(GPIO2_DIR) | 0x10, GPIO2_DIR );
60 au_writel( 0x100000, GPIO2_OUTPUT ); 60 au_writel( 0x100000, GPIO2_OUTPUT );
61#endif // defined (CONFIG_USB_OHCI) 61#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */
62 62
63#ifdef CONFIG_PCI 63#ifdef CONFIG_PCI
64#if defined(__MIPSEB__) 64#if defined(__MIPSEB__)
diff --git a/arch/mips/au1000/pb1000/board_setup.c b/arch/mips/au1000/pb1000/board_setup.c
index 824cfafaff..0aed89114b 100644
--- a/arch/mips/au1000/pb1000/board_setup.c
+++ b/arch/mips/au1000/pb1000/board_setup.c
@@ -54,7 +54,7 @@ void __init board_setup(void)
54 au_writel(0, SYS_PINSTATERD); 54 au_writel(0, SYS_PINSTATERD);
55 udelay(100); 55 udelay(100);
56 56
57#ifdef CONFIG_USB_OHCI 57#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
58 /* zero and disable FREQ2 */ 58 /* zero and disable FREQ2 */
59 sys_freqctrl = au_readl(SYS_FREQCTRL0); 59 sys_freqctrl = au_readl(SYS_FREQCTRL0);
60 sys_freqctrl &= ~0xFFF00000; 60 sys_freqctrl &= ~0xFFF00000;
@@ -102,7 +102,7 @@ void __init board_setup(void)
102 /* 102 /*
103 * Route 48MHz FREQ2 into USB Host and/or Device 103 * Route 48MHz FREQ2 into USB Host and/or Device
104 */ 104 */
105#ifdef CONFIG_USB_OHCI 105#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
106 sys_clksrc |= ((4<<12) | (0<<11) | (0<<10)); 106 sys_clksrc |= ((4<<12) | (0<<11) | (0<<10));
107#endif 107#endif
108 au_writel(sys_clksrc, SYS_CLKSRC); 108 au_writel(sys_clksrc, SYS_CLKSRC);
@@ -116,7 +116,7 @@ void __init board_setup(void)
116 au_writel(pin_func, SYS_PINFUNC); 116 au_writel(pin_func, SYS_PINFUNC);
117 au_writel(0x2800, SYS_TRIOUTCLR); 117 au_writel(0x2800, SYS_TRIOUTCLR);
118 au_writel(0x0030, SYS_OUTPUTCLR); 118 au_writel(0x0030, SYS_OUTPUTCLR);
119#endif // defined (CONFIG_USB_OHCI) 119#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */
120 120
121 // make gpio 15 an input (for interrupt line) 121 // make gpio 15 an input (for interrupt line)
122 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x100); 122 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x100);
diff --git a/arch/mips/au1000/pb1100/board_setup.c b/arch/mips/au1000/pb1100/board_setup.c
index 6bc1f8e1b6..259ca05860 100644
--- a/arch/mips/au1000/pb1100/board_setup.c
+++ b/arch/mips/au1000/pb1100/board_setup.c
@@ -54,7 +54,7 @@ void __init board_setup(void)
54 au_writel(0, SYS_PININPUTEN); 54 au_writel(0, SYS_PININPUTEN);
55 udelay(100); 55 udelay(100);
56 56
57#ifdef CONFIG_USB_OHCI 57#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
58 { 58 {
59 u32 pin_func, sys_freqctrl, sys_clksrc; 59 u32 pin_func, sys_freqctrl, sys_clksrc;
60 60
@@ -98,7 +98,7 @@ void __init board_setup(void)
98 pin_func |= 0x8000; 98 pin_func |= 0x8000;
99 au_writel(pin_func, SYS_PINFUNC); 99 au_writel(pin_func, SYS_PINFUNC);
100 } 100 }
101#endif // defined (CONFIG_USB_OHCI) 101#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */
102 102
103 /* Enable sys bus clock divider when IDLE state or no bus activity. */ 103 /* Enable sys bus clock divider when IDLE state or no bus activity. */
104 au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL); 104 au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
diff --git a/arch/mips/au1000/pb1500/board_setup.c b/arch/mips/au1000/pb1500/board_setup.c
index c9b655616f..a2d850db89 100644
--- a/arch/mips/au1000/pb1500/board_setup.c
+++ b/arch/mips/au1000/pb1500/board_setup.c
@@ -56,7 +56,7 @@ void __init board_setup(void)
56 au_writel(0, SYS_PINSTATERD); 56 au_writel(0, SYS_PINSTATERD);
57 udelay(100); 57 udelay(100);
58 58
59#ifdef CONFIG_USB_OHCI 59#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
60 60
61 /* GPIO201 is input for PCMCIA card detect */ 61 /* GPIO201 is input for PCMCIA card detect */
62 /* GPIO203 is input for PCMCIA interrupt request */ 62 /* GPIO203 is input for PCMCIA interrupt request */
@@ -85,7 +85,7 @@ void __init board_setup(void)
85 /* 85 /*
86 * Route 48MHz FREQ2 into USB Host and/or Device 86 * Route 48MHz FREQ2 into USB Host and/or Device
87 */ 87 */
88#ifdef CONFIG_USB_OHCI 88#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
89 sys_clksrc |= ((4<<12) | (0<<11) | (0<<10)); 89 sys_clksrc |= ((4<<12) | (0<<11) | (0<<10));
90#endif 90#endif
91 au_writel(sys_clksrc, SYS_CLKSRC); 91 au_writel(sys_clksrc, SYS_CLKSRC);
@@ -95,7 +95,7 @@ void __init board_setup(void)
95 // 2nd USB port is USB host 95 // 2nd USB port is USB host
96 pin_func |= 0x8000; 96 pin_func |= 0x8000;
97 au_writel(pin_func, SYS_PINFUNC); 97 au_writel(pin_func, SYS_PINFUNC);
98#endif // defined (CONFIG_USB_OHCI) 98#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */
99 99
100 100
101 101
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig
index 67a80f4c7d..700a3a2d68 100644
--- a/arch/mips/configs/bigsur_defconfig
+++ b/arch/mips/configs/bigsur_defconfig
@@ -663,8 +663,8 @@ CONFIG_MOXA_SMARTIO_NEW=m
663# CONFIG_SX is not set 663# CONFIG_SX is not set
664# CONFIG_RIO is not set 664# CONFIG_RIO is not set
665# CONFIG_STALDRV is not set 665# CONFIG_STALDRV is not set
666CONFIG_SIBYTE_SB1250_DUART=y 666CONFIG_SERIAL_SB1250_DUART=y
667CONFIG_SIBYTE_SB1250_DUART_CONSOLE=y 667CONFIG_SERIAL_SB1250_DUART_CONSOLE=y
668 668
669# 669#
670# Serial drivers 670# Serial drivers
diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig
index 4dc3197e2e..8ecbbb226c 100644
--- a/arch/mips/configs/capcella_defconfig
+++ b/arch/mips/configs/capcella_defconfig
@@ -1,60 +1,47 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20 3# Linux kernel version: 2.6.23-rc2
4# Tue Feb 20 21:47:22 2007 4# Wed Aug 8 10:23:16 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
16# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 17# CONFIG_MIPS_ATLAS is not set
30# CONFIG_MIPS_MALTA is not set 18# CONFIG_MIPS_MALTA is not set
31# CONFIG_MIPS_SEAD is not set 19# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 21# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 22CONFIG_MACH_VR41XX=y
36# CONFIG_PNX8550_JBS is not set 23# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 24# CONFIG_PNX8550_STB810 is not set
38CONFIG_MACH_VR41XX=y 25# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 26# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_QEMU is not set 27# CONFIG_QEMU is not set
41# CONFIG_MARKEINS is not set
42# CONFIG_SGI_IP22 is not set 28# CONFIG_SGI_IP22 is not set
43# CONFIG_SGI_IP27 is not set 29# CONFIG_SGI_IP27 is not set
44# CONFIG_SGI_IP32 is not set 30# CONFIG_SGI_IP32 is not set
45# CONFIG_SIBYTE_BIGSUR is not set 31# CONFIG_SIBYTE_CRHINE is not set
32# CONFIG_SIBYTE_CARMEL is not set
33# CONFIG_SIBYTE_CRHONE is not set
34# CONFIG_SIBYTE_RHONE is not set
46# CONFIG_SIBYTE_SWARM is not set 35# CONFIG_SIBYTE_SWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set
47# CONFIG_SIBYTE_SENTOSA is not set 37# CONFIG_SIBYTE_SENTOSA is not set
48# CONFIG_SIBYTE_RHONE is not set
49# CONFIG_SIBYTE_CARMEL is not set
50# CONFIG_SIBYTE_PTSWARM is not set 38# CONFIG_SIBYTE_PTSWARM is not set
51# CONFIG_SIBYTE_LITTLESUR is not set 39# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_CRHINE is not set
53# CONFIG_SIBYTE_CRHONE is not set
54# CONFIG_SNI_RM is not set 40# CONFIG_SNI_RM is not set
55# CONFIG_TOSHIBA_JMR3927 is not set 41# CONFIG_TOSHIBA_JMR3927 is not set
56# CONFIG_TOSHIBA_RBTX4927 is not set 42# CONFIG_TOSHIBA_RBTX4927 is not set
57# CONFIG_TOSHIBA_RBTX4938 is not set 43# CONFIG_TOSHIBA_RBTX4938 is not set
44# CONFIG_WR_PPMC is not set
58# CONFIG_CASIO_E55 is not set 45# CONFIG_CASIO_E55 is not set
59# CONFIG_IBM_WORKPAD is not set 46# CONFIG_IBM_WORKPAD is not set
60# CONFIG_NEC_CMBVR4133 is not set 47# CONFIG_NEC_CMBVR4133 is not set
@@ -73,6 +60,8 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
73CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 60CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
74CONFIG_DMA_NONCOHERENT=y 61CONFIG_DMA_NONCOHERENT=y
75CONFIG_DMA_NEED_PCI_MAP_STATE=y 62CONFIG_DMA_NEED_PCI_MAP_STATE=y
63# CONFIG_HOTPLUG_CPU is not set
64# CONFIG_NO_IOPORT is not set
76# CONFIG_CPU_BIG_ENDIAN is not set 65# CONFIG_CPU_BIG_ENDIAN is not set
77CONFIG_CPU_LITTLE_ENDIAN=y 66CONFIG_CPU_LITTLE_ENDIAN=y
78CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 67CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
@@ -82,6 +71,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
82# 71#
83# CPU selection 72# CPU selection
84# 73#
74# CONFIG_CPU_LOONGSON2 is not set
85# CONFIG_CPU_MIPS32_R1 is not set 75# CONFIG_CPU_MIPS32_R1 is not set
86# CONFIG_CPU_MIPS32_R2 is not set 76# CONFIG_CPU_MIPS32_R2 is not set
87# CONFIG_CPU_MIPS64_R1 is not set 77# CONFIG_CPU_MIPS64_R1 is not set
@@ -103,7 +93,6 @@ CONFIG_CPU_VR41XX=y
103# CONFIG_CPU_SB1 is not set 93# CONFIG_CPU_SB1 is not set
104CONFIG_SYS_HAS_CPU_VR41XX=y 94CONFIG_SYS_HAS_CPU_VR41XX=y
105CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 95CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
106CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
107CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 96CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
108CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 97CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
109 98
@@ -119,7 +108,6 @@ CONFIG_PAGE_SIZE_4KB=y
119CONFIG_MIPS_MT_DISABLED=y 108CONFIG_MIPS_MT_DISABLED=y
120# CONFIG_MIPS_MT_SMP is not set 109# CONFIG_MIPS_MT_SMP is not set
121# CONFIG_MIPS_MT_SMTC is not set 110# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_VPE_LOADER is not set
123CONFIG_CPU_HAS_SYNC=y 111CONFIG_CPU_HAS_SYNC=y
124CONFIG_GENERIC_HARDIRQS=y 112CONFIG_GENERIC_HARDIRQS=y
125CONFIG_GENERIC_IRQ_PROBE=y 113CONFIG_GENERIC_IRQ_PROBE=y
@@ -133,48 +121,47 @@ CONFIG_FLAT_NODE_MEM_MAP=y
133# CONFIG_SPARSEMEM_STATIC is not set 121# CONFIG_SPARSEMEM_STATIC is not set
134CONFIG_SPLIT_PTLOCK_CPUS=4 122CONFIG_SPLIT_PTLOCK_CPUS=4
135# CONFIG_RESOURCES_64BIT is not set 123# CONFIG_RESOURCES_64BIT is not set
136CONFIG_ZONE_DMA_FLAG=1 124CONFIG_ZONE_DMA_FLAG=0
125CONFIG_VIRT_TO_BUS=y
137# CONFIG_HZ_48 is not set 126# CONFIG_HZ_48 is not set
138# CONFIG_HZ_100 is not set 127# CONFIG_HZ_100 is not set
139# CONFIG_HZ_128 is not set 128# CONFIG_HZ_128 is not set
140# CONFIG_HZ_250 is not set 129CONFIG_HZ_250=y
141# CONFIG_HZ_256 is not set 130# CONFIG_HZ_256 is not set
142CONFIG_HZ_1000=y 131# CONFIG_HZ_1000 is not set
143# CONFIG_HZ_1024 is not set 132# CONFIG_HZ_1024 is not set
144CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 133CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
145CONFIG_HZ=1000 134CONFIG_HZ=250
146CONFIG_PREEMPT_NONE=y 135CONFIG_PREEMPT_NONE=y
147# CONFIG_PREEMPT_VOLUNTARY is not set 136# CONFIG_PREEMPT_VOLUNTARY is not set
148# CONFIG_PREEMPT is not set 137# CONFIG_PREEMPT is not set
149# CONFIG_KEXEC is not set 138# CONFIG_KEXEC is not set
139CONFIG_SECCOMP=y
150CONFIG_LOCKDEP_SUPPORT=y 140CONFIG_LOCKDEP_SUPPORT=y
151CONFIG_STACKTRACE_SUPPORT=y 141CONFIG_STACKTRACE_SUPPORT=y
152CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 142CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
153 143
154# 144#
155# Code maturity level options 145# General setup
156# 146#
157CONFIG_EXPERIMENTAL=y 147CONFIG_EXPERIMENTAL=y
158CONFIG_BROKEN_ON_SMP=y 148CONFIG_BROKEN_ON_SMP=y
159CONFIG_INIT_ENV_ARG_LIMIT=32 149CONFIG_INIT_ENV_ARG_LIMIT=32
160
161#
162# General setup
163#
164CONFIG_LOCALVERSION="" 150CONFIG_LOCALVERSION=""
165CONFIG_LOCALVERSION_AUTO=y 151CONFIG_LOCALVERSION_AUTO=y
166CONFIG_SWAP=y 152CONFIG_SWAP=y
167CONFIG_SYSVIPC=y 153CONFIG_SYSVIPC=y
168# CONFIG_IPC_NS is not set
169CONFIG_SYSVIPC_SYSCTL=y 154CONFIG_SYSVIPC_SYSCTL=y
170# CONFIG_POSIX_MQUEUE is not set 155# CONFIG_POSIX_MQUEUE is not set
171# CONFIG_BSD_PROCESS_ACCT is not set 156# CONFIG_BSD_PROCESS_ACCT is not set
172# CONFIG_TASKSTATS is not set 157# CONFIG_TASKSTATS is not set
173# CONFIG_UTS_NS is not set 158# CONFIG_USER_NS is not set
174# CONFIG_AUDIT is not set 159# CONFIG_AUDIT is not set
175# CONFIG_IKCONFIG is not set 160# CONFIG_IKCONFIG is not set
161CONFIG_LOG_BUF_SHIFT=14
176CONFIG_SYSFS_DEPRECATED=y 162CONFIG_SYSFS_DEPRECATED=y
177# CONFIG_RELAY is not set 163# CONFIG_RELAY is not set
164# CONFIG_BLK_DEV_INITRD is not set
178# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 165# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
179CONFIG_SYSCTL=y 166CONFIG_SYSCTL=y
180CONFIG_EMBEDDED=y 167CONFIG_EMBEDDED=y
@@ -187,32 +174,30 @@ CONFIG_BUG=y
187CONFIG_ELF_CORE=y 174CONFIG_ELF_CORE=y
188CONFIG_BASE_FULL=y 175CONFIG_BASE_FULL=y
189CONFIG_FUTEX=y 176CONFIG_FUTEX=y
177CONFIG_ANON_INODES=y
190CONFIG_EPOLL=y 178CONFIG_EPOLL=y
179CONFIG_SIGNALFD=y
180CONFIG_TIMERFD=y
181CONFIG_EVENTFD=y
191CONFIG_SHMEM=y 182CONFIG_SHMEM=y
192CONFIG_SLAB=y
193CONFIG_VM_EVENT_COUNTERS=y 183CONFIG_VM_EVENT_COUNTERS=y
184CONFIG_SLAB=y
185# CONFIG_SLUB is not set
186# CONFIG_SLOB is not set
194CONFIG_RT_MUTEXES=y 187CONFIG_RT_MUTEXES=y
195# CONFIG_TINY_SHMEM is not set 188# CONFIG_TINY_SHMEM is not set
196CONFIG_BASE_SMALL=0 189CONFIG_BASE_SMALL=0
197# CONFIG_SLOB is not set
198
199#
200# Loadable module support
201#
202CONFIG_MODULES=y 190CONFIG_MODULES=y
203CONFIG_MODULE_UNLOAD=y 191CONFIG_MODULE_UNLOAD=y
204# CONFIG_MODULE_FORCE_UNLOAD is not set 192CONFIG_MODULE_FORCE_UNLOAD=y
205CONFIG_MODVERSIONS=y 193CONFIG_MODVERSIONS=y
206CONFIG_MODULE_SRCVERSION_ALL=y 194CONFIG_MODULE_SRCVERSION_ALL=y
207CONFIG_KMOD=y 195CONFIG_KMOD=y
208
209#
210# Block layer
211#
212CONFIG_BLOCK=y 196CONFIG_BLOCK=y
213# CONFIG_LBD is not set 197# CONFIG_LBD is not set
214# CONFIG_BLK_DEV_IO_TRACE is not set 198# CONFIG_BLK_DEV_IO_TRACE is not set
215# CONFIG_LSF is not set 199# CONFIG_LSF is not set
200# CONFIG_BLK_DEV_BSG is not set
216 201
217# 202#
218# IO Schedulers 203# IO Schedulers
@@ -232,16 +217,13 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
232# 217#
233CONFIG_HW_HAS_PCI=y 218CONFIG_HW_HAS_PCI=y
234CONFIG_PCI=y 219CONFIG_PCI=y
220# CONFIG_ARCH_SUPPORTS_MSI is not set
235CONFIG_MMU=y 221CONFIG_MMU=y
236 222
237# 223#
238# PCCARD (PCMCIA/CardBus) support 224# PCCARD (PCMCIA/CardBus) support
239# 225#
240# CONFIG_PCCARD is not set 226# CONFIG_PCCARD is not set
241
242#
243# PCI Hotplug Support
244#
245# CONFIG_HOTPLUG_PCI is not set 227# CONFIG_HOTPLUG_PCI is not set
246 228
247# 229#
@@ -254,10 +236,7 @@ CONFIG_TRAD_SIGNALS=y
254# 236#
255# Power management options 237# Power management options
256# 238#
257CONFIG_PM=y 239# CONFIG_PM is not set
258# CONFIG_PM_LEGACY is not set
259# CONFIG_PM_DEBUG is not set
260# CONFIG_PM_SYSFS_DEPRECATED is not set
261 240
262# 241#
263# Networking 242# Networking
@@ -267,7 +246,6 @@ CONFIG_NET=y
267# 246#
268# Networking options 247# Networking options
269# 248#
270# CONFIG_NETDEBUG is not set
271CONFIG_PACKET=y 249CONFIG_PACKET=y
272CONFIG_PACKET_MMAP=y 250CONFIG_PACKET_MMAP=y
273CONFIG_UNIX=y 251CONFIG_UNIX=y
@@ -309,20 +287,13 @@ CONFIG_TCP_MD5SIG=y
309# CONFIG_INET6_TUNNEL is not set 287# CONFIG_INET6_TUNNEL is not set
310CONFIG_NETWORK_SECMARK=y 288CONFIG_NETWORK_SECMARK=y
311# CONFIG_NETFILTER is not set 289# CONFIG_NETFILTER is not set
312
313#
314# DCCP Configuration (EXPERIMENTAL)
315#
316# CONFIG_IP_DCCP is not set 290# CONFIG_IP_DCCP is not set
317 291CONFIG_IP_SCTP=m
318# 292# CONFIG_SCTP_DBG_MSG is not set
319# SCTP Configuration (EXPERIMENTAL) 293# CONFIG_SCTP_DBG_OBJCNT is not set
320# 294# CONFIG_SCTP_HMAC_NONE is not set
321# CONFIG_IP_SCTP is not set 295# CONFIG_SCTP_HMAC_SHA1 is not set
322 296CONFIG_SCTP_HMAC_MD5=y
323#
324# TIPC Configuration (EXPERIMENTAL)
325#
326# CONFIG_TIPC is not set 297# CONFIG_TIPC is not set
327# CONFIG_ATM is not set 298# CONFIG_ATM is not set
328# CONFIG_BRIDGE is not set 299# CONFIG_BRIDGE is not set
@@ -348,7 +319,17 @@ CONFIG_NETWORK_SECMARK=y
348# CONFIG_HAMRADIO is not set 319# CONFIG_HAMRADIO is not set
349# CONFIG_IRDA is not set 320# CONFIG_IRDA is not set
350# CONFIG_BT is not set 321# CONFIG_BT is not set
322# CONFIG_AF_RXRPC is not set
323
324#
325# Wireless
326#
327# CONFIG_CFG80211 is not set
328# CONFIG_WIRELESS_EXT is not set
329# CONFIG_MAC80211 is not set
351# CONFIG_IEEE80211 is not set 330# CONFIG_IEEE80211 is not set
331# CONFIG_RFKILL is not set
332# CONFIG_NET_9P is not set
352 333
353# 334#
354# Device Drivers 335# Device Drivers
@@ -361,30 +342,10 @@ CONFIG_STANDALONE=y
361CONFIG_PREVENT_FIRMWARE_BUILD=y 342CONFIG_PREVENT_FIRMWARE_BUILD=y
362CONFIG_FW_LOADER=m 343CONFIG_FW_LOADER=m
363# CONFIG_SYS_HYPERVISOR is not set 344# CONFIG_SYS_HYPERVISOR is not set
364 345# CONFIG_CONNECTOR is not set
365#
366# Connector - unified userspace <-> kernelspace linker
367#
368CONFIG_CONNECTOR=m
369
370#
371# Memory Technology Devices (MTD)
372#
373# CONFIG_MTD is not set 346# CONFIG_MTD is not set
374
375#
376# Parallel port support
377#
378# CONFIG_PARPORT is not set 347# CONFIG_PARPORT is not set
379 348CONFIG_BLK_DEV=y
380#
381# Plug and Play support
382#
383# CONFIG_PNPACPI is not set
384
385#
386# Block devices
387#
388# CONFIG_BLK_CPQ_DA is not set 349# CONFIG_BLK_CPQ_DA is not set
389# CONFIG_BLK_CPQ_CISS_DA is not set 350# CONFIG_BLK_CPQ_CISS_DA is not set
390# CONFIG_BLK_DEV_DAC960 is not set 351# CONFIG_BLK_DEV_DAC960 is not set
@@ -397,19 +358,9 @@ CONFIG_BLK_DEV_RAM=y
397CONFIG_BLK_DEV_RAM_COUNT=16 358CONFIG_BLK_DEV_RAM_COUNT=16
398CONFIG_BLK_DEV_RAM_SIZE=4096 359CONFIG_BLK_DEV_RAM_SIZE=4096
399CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 360CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
400# CONFIG_BLK_DEV_INITRD is not set
401# CONFIG_CDROM_PKTCDVD is not set 361# CONFIG_CDROM_PKTCDVD is not set
402# CONFIG_ATA_OVER_ETH is not set 362# CONFIG_ATA_OVER_ETH is not set
403 363# CONFIG_MISC_DEVICES is not set
404#
405# Misc devices
406#
407CONFIG_SGI_IOC4=m
408# CONFIG_TIFM_CORE is not set
409
410#
411# ATA/ATAPI/MFM/RLL support
412#
413CONFIG_IDE=y 364CONFIG_IDE=y
414CONFIG_IDE_MAX_HWIFS=4 365CONFIG_IDE_MAX_HWIFS=4
415CONFIG_BLK_DEV_IDE=y 366CONFIG_BLK_DEV_IDE=y
@@ -424,15 +375,16 @@ CONFIG_BLK_DEV_IDEDISK=y
424# CONFIG_BLK_DEV_IDETAPE is not set 375# CONFIG_BLK_DEV_IDETAPE is not set
425# CONFIG_BLK_DEV_IDEFLOPPY is not set 376# CONFIG_BLK_DEV_IDEFLOPPY is not set
426# CONFIG_IDE_TASK_IOCTL is not set 377# CONFIG_IDE_TASK_IOCTL is not set
378CONFIG_IDE_PROC_FS=y
427 379
428# 380#
429# IDE chipset support/bugfixes 381# IDE chipset support/bugfixes
430# 382#
431CONFIG_IDE_GENERIC=y 383CONFIG_IDE_GENERIC=y
432# CONFIG_BLK_DEV_IDEPCI is not set 384# CONFIG_BLK_DEV_IDEPCI is not set
385# CONFIG_IDEPCI_PCIBUS_ORDER is not set
433# CONFIG_IDE_ARM is not set 386# CONFIG_IDE_ARM is not set
434# CONFIG_BLK_DEV_IDEDMA is not set 387# CONFIG_BLK_DEV_IDEDMA is not set
435# CONFIG_IDEDMA_AUTO is not set
436# CONFIG_BLK_DEV_HD is not set 388# CONFIG_BLK_DEV_HD is not set
437 389
438# 390#
@@ -440,16 +392,9 @@ CONFIG_IDE_GENERIC=y
440# 392#
441# CONFIG_RAID_ATTRS is not set 393# CONFIG_RAID_ATTRS is not set
442# CONFIG_SCSI is not set 394# CONFIG_SCSI is not set
395# CONFIG_SCSI_DMA is not set
443# CONFIG_SCSI_NETLINK is not set 396# CONFIG_SCSI_NETLINK is not set
444
445#
446# Serial ATA (prod) and Parallel ATA (experimental) drivers
447#
448# CONFIG_ATA is not set 397# CONFIG_ATA is not set
449
450#
451# Multi-device support (RAID and LVM)
452#
453# CONFIG_MD is not set 398# CONFIG_MD is not set
454 399
455# 400#
@@ -460,30 +405,17 @@ CONFIG_IDE_GENERIC=y
460# 405#
461# IEEE 1394 (FireWire) support 406# IEEE 1394 (FireWire) support
462# 407#
408# CONFIG_FIREWIRE is not set
463# CONFIG_IEEE1394 is not set 409# CONFIG_IEEE1394 is not set
464
465#
466# I2O device support
467#
468# CONFIG_I2O is not set 410# CONFIG_I2O is not set
469
470#
471# Network device support
472#
473CONFIG_NETDEVICES=y 411CONFIG_NETDEVICES=y
412# CONFIG_NETDEVICES_MULTIQUEUE is not set
474# CONFIG_DUMMY is not set 413# CONFIG_DUMMY is not set
475# CONFIG_BONDING is not set 414# CONFIG_BONDING is not set
415# CONFIG_MACVLAN is not set
476# CONFIG_EQUALIZER is not set 416# CONFIG_EQUALIZER is not set
477# CONFIG_TUN is not set 417# CONFIG_TUN is not set
478
479#
480# ARCnet devices
481#
482# CONFIG_ARCNET is not set 418# CONFIG_ARCNET is not set
483
484#
485# PHY device support
486#
487CONFIG_PHYLIB=m 419CONFIG_PHYLIB=m
488 420
489# 421#
@@ -497,22 +429,16 @@ CONFIG_CICADA_PHY=m
497CONFIG_VITESSE_PHY=m 429CONFIG_VITESSE_PHY=m
498CONFIG_SMSC_PHY=m 430CONFIG_SMSC_PHY=m
499# CONFIG_BROADCOM_PHY is not set 431# CONFIG_BROADCOM_PHY is not set
432# CONFIG_ICPLUS_PHY is not set
500# CONFIG_FIXED_PHY is not set 433# CONFIG_FIXED_PHY is not set
501
502#
503# Ethernet (10 or 100Mbit)
504#
505CONFIG_NET_ETHERNET=y 434CONFIG_NET_ETHERNET=y
506CONFIG_MII=y 435CONFIG_MII=y
436# CONFIG_AX88796 is not set
507# CONFIG_HAPPYMEAL is not set 437# CONFIG_HAPPYMEAL is not set
508# CONFIG_SUNGEM is not set 438# CONFIG_SUNGEM is not set
509# CONFIG_CASSINI is not set 439# CONFIG_CASSINI is not set
510# CONFIG_NET_VENDOR_3COM is not set 440# CONFIG_NET_VENDOR_3COM is not set
511# CONFIG_DM9000 is not set 441# CONFIG_DM9000 is not set
512
513#
514# Tulip family network device support
515#
516# CONFIG_NET_TULIP is not set 442# CONFIG_NET_TULIP is not set
517# CONFIG_HP100 is not set 443# CONFIG_HP100 is not set
518CONFIG_NET_PCI=y 444CONFIG_NET_PCI=y
@@ -521,6 +447,7 @@ CONFIG_NET_PCI=y
521# CONFIG_ADAPTEC_STARFIRE is not set 447# CONFIG_ADAPTEC_STARFIRE is not set
522# CONFIG_B44 is not set 448# CONFIG_B44 is not set
523# CONFIG_FORCEDETH is not set 449# CONFIG_FORCEDETH is not set
450# CONFIG_TC35815 is not set
524# CONFIG_DGRS is not set 451# CONFIG_DGRS is not set
525# CONFIG_EEPRO100 is not set 452# CONFIG_EEPRO100 is not set
526# CONFIG_E100 is not set 453# CONFIG_E100 is not set
@@ -539,50 +466,15 @@ CONFIG_8139TOO_PIO=y
539# CONFIG_TLAN is not set 466# CONFIG_TLAN is not set
540# CONFIG_VIA_RHINE is not set 467# CONFIG_VIA_RHINE is not set
541# CONFIG_SC92031 is not set 468# CONFIG_SC92031 is not set
542 469# CONFIG_NETDEV_1000 is not set
543# 470# CONFIG_NETDEV_10000 is not set
544# Ethernet (1000 Mbit)
545#
546# CONFIG_ACENIC is not set
547# CONFIG_DL2K is not set
548# CONFIG_E1000 is not set
549# CONFIG_NS83820 is not set
550# CONFIG_HAMACHI is not set
551# CONFIG_YELLOWFIN is not set
552# CONFIG_R8169 is not set
553# CONFIG_SIS190 is not set
554# CONFIG_SKGE is not set
555# CONFIG_SKY2 is not set
556# CONFIG_SK98LIN is not set
557# CONFIG_VIA_VELOCITY is not set
558# CONFIG_TIGON3 is not set
559# CONFIG_BNX2 is not set
560CONFIG_QLA3XXX=m
561# CONFIG_ATL1 is not set
562
563#
564# Ethernet (10000 Mbit)
565#
566# CONFIG_CHELSIO_T1 is not set
567CONFIG_CHELSIO_T3=m
568# CONFIG_IXGB is not set
569# CONFIG_S2IO is not set
570# CONFIG_MYRI10GE is not set
571CONFIG_NETXEN_NIC=m
572
573#
574# Token Ring devices
575#
576# CONFIG_TR is not set 471# CONFIG_TR is not set
577 472
578# 473#
579# Wireless LAN (non-hamradio) 474# Wireless LAN
580#
581# CONFIG_NET_RADIO is not set
582
583#
584# Wan interfaces
585# 475#
476# CONFIG_WLAN_PRE80211 is not set
477# CONFIG_WLAN_80211 is not set
586# CONFIG_WAN is not set 478# CONFIG_WAN is not set
587# CONFIG_FDDI is not set 479# CONFIG_FDDI is not set
588# CONFIG_HIPPI is not set 480# CONFIG_HIPPI is not set
@@ -592,15 +484,7 @@ CONFIG_NETXEN_NIC=m
592# CONFIG_NETCONSOLE is not set 484# CONFIG_NETCONSOLE is not set
593# CONFIG_NETPOLL is not set 485# CONFIG_NETPOLL is not set
594# CONFIG_NET_POLL_CONTROLLER is not set 486# CONFIG_NET_POLL_CONTROLLER is not set
595
596#
597# ISDN subsystem
598#
599# CONFIG_ISDN is not set 487# CONFIG_ISDN is not set
600
601#
602# Telephony Support
603#
604# CONFIG_PHONE is not set 488# CONFIG_PHONE is not set
605 489
606# 490#
@@ -608,6 +492,7 @@ CONFIG_NETXEN_NIC=m
608# 492#
609CONFIG_INPUT=y 493CONFIG_INPUT=y
610# CONFIG_INPUT_FF_MEMLESS is not set 494# CONFIG_INPUT_FF_MEMLESS is not set
495# CONFIG_INPUT_POLLDEV is not set
611 496
612# 497#
613# Userland interfaces 498# Userland interfaces
@@ -624,6 +509,7 @@ CONFIG_INPUT=y
624# CONFIG_INPUT_KEYBOARD is not set 509# CONFIG_INPUT_KEYBOARD is not set
625# CONFIG_INPUT_MOUSE is not set 510# CONFIG_INPUT_MOUSE is not set
626# CONFIG_INPUT_JOYSTICK is not set 511# CONFIG_INPUT_JOYSTICK is not set
512# CONFIG_INPUT_TABLET is not set
627# CONFIG_INPUT_TOUCHSCREEN is not set 513# CONFIG_INPUT_TOUCHSCREEN is not set
628# CONFIG_INPUT_MISC is not set 514# CONFIG_INPUT_MISC is not set
629 515
@@ -658,34 +544,17 @@ CONFIG_SERIAL_VR41XX_CONSOLE=y
658CONFIG_UNIX98_PTYS=y 544CONFIG_UNIX98_PTYS=y
659CONFIG_LEGACY_PTYS=y 545CONFIG_LEGACY_PTYS=y
660CONFIG_LEGACY_PTY_COUNT=256 546CONFIG_LEGACY_PTY_COUNT=256
661
662#
663# IPMI
664#
665# CONFIG_IPMI_HANDLER is not set 547# CONFIG_IPMI_HANDLER is not set
666
667#
668# Watchdog Cards
669#
670# CONFIG_WATCHDOG is not set 548# CONFIG_WATCHDOG is not set
671# CONFIG_HW_RANDOM is not set 549# CONFIG_HW_RANDOM is not set
672# CONFIG_RTC is not set 550# CONFIG_RTC is not set
673# CONFIG_GEN_RTC is not set
674# CONFIG_DTLK is not set
675# CONFIG_R3964 is not set 551# CONFIG_R3964 is not set
676# CONFIG_APPLICOM is not set 552# CONFIG_APPLICOM is not set
677# CONFIG_DRM is not set 553# CONFIG_DRM is not set
678CONFIG_GPIO_VR41XX=y 554CONFIG_GPIO_VR41XX=y
679# CONFIG_RAW_DRIVER is not set 555# CONFIG_RAW_DRIVER is not set
680
681#
682# TPM devices
683#
684# CONFIG_TCG_TPM is not set 556# CONFIG_TCG_TPM is not set
685 557CONFIG_DEVPORT=y
686#
687# I2C support
688#
689# CONFIG_I2C is not set 558# CONFIG_I2C is not set
690 559
691# 560#
@@ -693,32 +562,33 @@ CONFIG_GPIO_VR41XX=y
693# 562#
694# CONFIG_SPI is not set 563# CONFIG_SPI is not set
695# CONFIG_SPI_MASTER is not set 564# CONFIG_SPI_MASTER is not set
696
697#
698# Dallas's 1-wire bus
699#
700# CONFIG_W1 is not set 565# CONFIG_W1 is not set
566# CONFIG_POWER_SUPPLY is not set
567# CONFIG_HWMON is not set
701 568
702# 569#
703# Hardware Monitoring support 570# Multifunction device drivers
704# 571#
705# CONFIG_HWMON is not set 572# CONFIG_MFD_SM501 is not set
706# CONFIG_HWMON_VID is not set
707 573
708# 574#
709# Multimedia devices 575# Multimedia devices
710# 576#
711# CONFIG_VIDEO_DEV is not set 577# CONFIG_VIDEO_DEV is not set
578# CONFIG_DVB_CORE is not set
579# CONFIG_DAB is not set
712 580
713# 581#
714# Digital Video Broadcasting Devices 582# Graphics support
715# 583#
716# CONFIG_DVB is not set 584# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
717 585
718# 586#
719# Graphics support 587# Display device support
720# 588#
721# CONFIG_FIRMWARE_EDID is not set 589# CONFIG_DISPLAY_SUPPORT is not set
590# CONFIG_VGASTATE is not set
591# CONFIG_VIDEO_OUTPUT_CONTROL is not set
722# CONFIG_FB is not set 592# CONFIG_FB is not set
723 593
724# 594#
@@ -726,65 +596,16 @@ CONFIG_GPIO_VR41XX=y
726# 596#
727# CONFIG_VGA_CONSOLE is not set 597# CONFIG_VGA_CONSOLE is not set
728CONFIG_DUMMY_CONSOLE=y 598CONFIG_DUMMY_CONSOLE=y
729# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
730 599
731# 600#
732# Sound 601# Sound
733# 602#
734# CONFIG_SOUND is not set 603# CONFIG_SOUND is not set
735 604# CONFIG_HID_SUPPORT is not set
736# 605# CONFIG_USB_SUPPORT is not set
737# HID Devices
738#
739# CONFIG_HID is not set
740
741#
742# USB support
743#
744CONFIG_USB_ARCH_HAS_HCD=y
745CONFIG_USB_ARCH_HAS_OHCI=y
746CONFIG_USB_ARCH_HAS_EHCI=y
747# CONFIG_USB is not set
748
749#
750# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
751#
752
753#
754# USB Gadget Support
755#
756# CONFIG_USB_GADGET is not set
757
758#
759# MMC/SD Card support
760#
761# CONFIG_MMC is not set 606# CONFIG_MMC is not set
762
763#
764# LED devices
765#
766# CONFIG_NEW_LEDS is not set 607# CONFIG_NEW_LEDS is not set
767
768#
769# LED drivers
770#
771
772#
773# LED Triggers
774#
775
776#
777# InfiniBand support
778#
779# CONFIG_INFINIBAND is not set 608# CONFIG_INFINIBAND is not set
780
781#
782# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
783#
784
785#
786# Real Time Clock
787#
788CONFIG_RTC_LIB=y 609CONFIG_RTC_LIB=y
789CONFIG_RTC_CLASS=y 610CONFIG_RTC_CLASS=y
790CONFIG_RTC_HCTOSYS=y 611CONFIG_RTC_HCTOSYS=y
@@ -798,18 +619,29 @@ CONFIG_RTC_INTF_SYSFS=y
798CONFIG_RTC_INTF_PROC=y 619CONFIG_RTC_INTF_PROC=y
799CONFIG_RTC_INTF_DEV=y 620CONFIG_RTC_INTF_DEV=y
800# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 621# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
622# CONFIG_RTC_DRV_TEST is not set
623
624#
625# SPI RTC drivers
626#
801 627
802# 628#
803# RTC drivers 629# Platform RTC drivers
804# 630#
631# CONFIG_RTC_DRV_CMOS is not set
805# CONFIG_RTC_DRV_DS1553 is not set 632# CONFIG_RTC_DRV_DS1553 is not set
633# CONFIG_RTC_DRV_STK17TA8 is not set
806# CONFIG_RTC_DRV_DS1742 is not set 634# CONFIG_RTC_DRV_DS1742 is not set
807# CONFIG_RTC_DRV_M48T86 is not set 635# CONFIG_RTC_DRV_M48T86 is not set
808CONFIG_RTC_DRV_VR41XX=y 636# CONFIG_RTC_DRV_M48T59 is not set
809# CONFIG_RTC_DRV_TEST is not set
810# CONFIG_RTC_DRV_V3020 is not set 637# CONFIG_RTC_DRV_V3020 is not set
811 638
812# 639#
640# on-CPU RTC drivers
641#
642CONFIG_RTC_DRV_VR41XX=y
643
644#
813# DMA Engine support 645# DMA Engine support
814# 646#
815# CONFIG_DMA_ENGINE is not set 647# CONFIG_DMA_ENGINE is not set
@@ -823,12 +655,9 @@ CONFIG_RTC_DRV_VR41XX=y
823# 655#
824 656
825# 657#
826# Auxiliary Display support 658# Userspace I/O
827#
828
829#
830# Virtualization
831# 659#
660# CONFIG_UIO is not set
832 661
833# 662#
834# File systems 663# File systems
@@ -836,8 +665,14 @@ CONFIG_RTC_DRV_VR41XX=y
836CONFIG_EXT2_FS=y 665CONFIG_EXT2_FS=y
837# CONFIG_EXT2_FS_XATTR is not set 666# CONFIG_EXT2_FS_XATTR is not set
838# CONFIG_EXT2_FS_XIP is not set 667# CONFIG_EXT2_FS_XIP is not set
839# CONFIG_EXT3_FS is not set 668CONFIG_EXT3_FS=y
669CONFIG_EXT3_FS_XATTR=y
670# CONFIG_EXT3_FS_POSIX_ACL is not set
671# CONFIG_EXT3_FS_SECURITY is not set
840# CONFIG_EXT4DEV_FS is not set 672# CONFIG_EXT4DEV_FS is not set
673CONFIG_JBD=y
674# CONFIG_JBD_DEBUG is not set
675CONFIG_FS_MBCACHE=y
841# CONFIG_REISERFS_FS is not set 676# CONFIG_REISERFS_FS is not set
842# CONFIG_JFS_FS is not set 677# CONFIG_JFS_FS is not set
843CONFIG_FS_POSIX_ACL=y 678CONFIG_FS_POSIX_ACL=y
@@ -852,7 +687,7 @@ CONFIG_INOTIFY_USER=y
852CONFIG_DNOTIFY=y 687CONFIG_DNOTIFY=y
853# CONFIG_AUTOFS_FS is not set 688# CONFIG_AUTOFS_FS is not set
854CONFIG_AUTOFS4_FS=y 689CONFIG_AUTOFS4_FS=y
855CONFIG_FUSE_FS=m 690# CONFIG_FUSE_FS is not set
856CONFIG_GENERIC_ACL=y 691CONFIG_GENERIC_ACL=y
857 692
858# 693#
@@ -879,7 +714,7 @@ CONFIG_TMPFS=y
879CONFIG_TMPFS_POSIX_ACL=y 714CONFIG_TMPFS_POSIX_ACL=y
880# CONFIG_HUGETLB_PAGE is not set 715# CONFIG_HUGETLB_PAGE is not set
881CONFIG_RAMFS=y 716CONFIG_RAMFS=y
882CONFIG_CONFIGFS_FS=m 717# CONFIG_CONFIGFS_FS is not set
883 718
884# 719#
885# Miscellaneous filesystems 720# Miscellaneous filesystems
@@ -905,14 +740,12 @@ CONFIG_NFS_FS=y
905# CONFIG_NFS_V3 is not set 740# CONFIG_NFS_V3 is not set
906# CONFIG_NFS_V4 is not set 741# CONFIG_NFS_V4 is not set
907# CONFIG_NFS_DIRECTIO is not set 742# CONFIG_NFS_DIRECTIO is not set
908CONFIG_NFSD=y 743# CONFIG_NFSD is not set
909# CONFIG_NFSD_V3 is not set
910# CONFIG_NFSD_TCP is not set
911CONFIG_ROOT_NFS=y 744CONFIG_ROOT_NFS=y
912CONFIG_LOCKD=y 745CONFIG_LOCKD=y
913CONFIG_EXPORTFS=y
914CONFIG_NFS_COMMON=y 746CONFIG_NFS_COMMON=y
915CONFIG_SUNRPC=y 747CONFIG_SUNRPC=y
748# CONFIG_SUNRPC_BIND34 is not set
916# CONFIG_RPCSEC_GSS_KRB5 is not set 749# CONFIG_RPCSEC_GSS_KRB5 is not set
917# CONFIG_RPCSEC_GSS_SPKM3 is not set 750# CONFIG_RPCSEC_GSS_SPKM3 is not set
918# CONFIG_SMB_FS is not set 751# CONFIG_SMB_FS is not set
@@ -920,7 +753,6 @@ CONFIG_SUNRPC=y
920# CONFIG_NCP_FS is not set 753# CONFIG_NCP_FS is not set
921# CONFIG_CODA_FS is not set 754# CONFIG_CODA_FS is not set
922# CONFIG_AFS_FS is not set 755# CONFIG_AFS_FS is not set
923# CONFIG_9P_FS is not set
924 756
925# 757#
926# Partition Types 758# Partition Types
@@ -936,10 +768,7 @@ CONFIG_MSDOS_PARTITION=y
936# 768#
937# Distributed Lock Manager 769# Distributed Lock Manager
938# 770#
939CONFIG_DLM=m 771# CONFIG_DLM is not set
940CONFIG_DLM_TCP=y
941# CONFIG_DLM_SCTP is not set
942# CONFIG_DLM_DEBUG is not set
943 772
944# 773#
945# Profiling support 774# Profiling support
@@ -957,7 +786,6 @@ CONFIG_ENABLE_MUST_CHECK=y
957# CONFIG_DEBUG_FS is not set 786# CONFIG_DEBUG_FS is not set
958# CONFIG_HEADERS_CHECK is not set 787# CONFIG_HEADERS_CHECK is not set
959# CONFIG_DEBUG_KERNEL is not set 788# CONFIG_DEBUG_KERNEL is not set
960CONFIG_LOG_BUF_SHIFT=14
961CONFIG_CROSSCOMPILE=y 789CONFIG_CROSSCOMPILE=y
962CONFIG_CMDLINE="mem=32M console=ttyVR0,38400" 790CONFIG_CMDLINE="mem=32M console=ttyVR0,38400"
963 791
@@ -966,10 +794,6 @@ CONFIG_CMDLINE="mem=32M console=ttyVR0,38400"
966# 794#
967# CONFIG_KEYS is not set 795# CONFIG_KEYS is not set
968# CONFIG_SECURITY is not set 796# CONFIG_SECURITY is not set
969
970#
971# Cryptographic options
972#
973CONFIG_CRYPTO=y 797CONFIG_CRYPTO=y
974CONFIG_CRYPTO_ALGAPI=y 798CONFIG_CRYPTO_ALGAPI=y
975CONFIG_CRYPTO_BLKCIPHER=m 799CONFIG_CRYPTO_BLKCIPHER=m
@@ -990,6 +814,7 @@ CONFIG_CRYPTO_ECB=m
990CONFIG_CRYPTO_CBC=m 814CONFIG_CRYPTO_CBC=m
991CONFIG_CRYPTO_PCBC=m 815CONFIG_CRYPTO_PCBC=m
992CONFIG_CRYPTO_LRW=m 816CONFIG_CRYPTO_LRW=m
817# CONFIG_CRYPTO_CRYPTD is not set
993CONFIG_CRYPTO_DES=m 818CONFIG_CRYPTO_DES=m
994CONFIG_CRYPTO_FCRYPT=m 819CONFIG_CRYPTO_FCRYPT=m
995CONFIG_CRYPTO_BLOWFISH=m 820CONFIG_CRYPTO_BLOWFISH=m
@@ -1008,10 +833,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1008# CONFIG_CRYPTO_CRC32C is not set 833# CONFIG_CRYPTO_CRC32C is not set
1009CONFIG_CRYPTO_CAMELLIA=m 834CONFIG_CRYPTO_CAMELLIA=m
1010# CONFIG_CRYPTO_TEST is not set 835# CONFIG_CRYPTO_TEST is not set
1011 836# CONFIG_CRYPTO_HW is not set
1012#
1013# Hardware crypto devices
1014#
1015 837
1016# 838#
1017# Library routines 839# Library routines
@@ -1019,10 +841,13 @@ CONFIG_CRYPTO_CAMELLIA=m
1019CONFIG_BITREVERSE=y 841CONFIG_BITREVERSE=y
1020# CONFIG_CRC_CCITT is not set 842# CONFIG_CRC_CCITT is not set
1021# CONFIG_CRC16 is not set 843# CONFIG_CRC16 is not set
844# CONFIG_CRC_ITU_T is not set
1022CONFIG_CRC32=y 845CONFIG_CRC32=y
846# CONFIG_CRC7 is not set
1023# CONFIG_LIBCRC32C is not set 847# CONFIG_LIBCRC32C is not set
1024CONFIG_ZLIB_INFLATE=m 848CONFIG_ZLIB_INFLATE=m
1025CONFIG_ZLIB_DEFLATE=m 849CONFIG_ZLIB_DEFLATE=m
1026CONFIG_PLIST=y 850CONFIG_PLIST=y
1027CONFIG_HAS_IOMEM=y 851CONFIG_HAS_IOMEM=y
1028CONFIG_HAS_IOPORT=y 852CONFIG_HAS_IOPORT=y
853CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig
index 6d6a01b9a8..ebcb7ad881 100644
--- a/arch/mips/configs/cobalt_defconfig
+++ b/arch/mips/configs/cobalt_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc2 3# Linux kernel version: 2.6.23-rc2
4# Fri May 25 11:17:29 2007 4# Tue Aug 7 22:12:54 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -13,33 +13,35 @@ CONFIG_MIPS=y
13CONFIG_MIPS_COBALT=y 13CONFIG_MIPS_COBALT=y
14# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
15# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
16# CONFIG_LEMOTE_FULONG is not set
16# CONFIG_MIPS_ATLAS is not set 17# CONFIG_MIPS_ATLAS is not set
17# CONFIG_MIPS_MALTA is not set 18# CONFIG_MIPS_MALTA is not set
18# CONFIG_MIPS_SEAD is not set 19# CONFIG_MIPS_SEAD is not set
19# CONFIG_WR_PPMC is not set
20# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
21# CONFIG_MARKEINS is not set
22# CONFIG_MACH_VR41XX is not set
21# CONFIG_PNX8550_JBS is not set 23# CONFIG_PNX8550_JBS is not set
22# CONFIG_PNX8550_STB810 is not set 24# CONFIG_PNX8550_STB810 is not set
23# CONFIG_MACH_VR41XX is not set 25# CONFIG_PMC_MSP is not set
24# CONFIG_PMC_YOSEMITE is not set 26# CONFIG_PMC_YOSEMITE is not set
25# CONFIG_QEMU is not set 27# CONFIG_QEMU is not set
26# CONFIG_MARKEINS is not set
27# CONFIG_SGI_IP22 is not set 28# CONFIG_SGI_IP22 is not set
28# CONFIG_SGI_IP27 is not set 29# CONFIG_SGI_IP27 is not set
29# CONFIG_SGI_IP32 is not set 30# CONFIG_SGI_IP32 is not set
30# CONFIG_SIBYTE_BIGSUR is not set 31# CONFIG_SIBYTE_CRHINE is not set
32# CONFIG_SIBYTE_CARMEL is not set
33# CONFIG_SIBYTE_CRHONE is not set
34# CONFIG_SIBYTE_RHONE is not set
31# CONFIG_SIBYTE_SWARM is not set 35# CONFIG_SIBYTE_SWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set
32# CONFIG_SIBYTE_SENTOSA is not set 37# CONFIG_SIBYTE_SENTOSA is not set
33# CONFIG_SIBYTE_RHONE is not set
34# CONFIG_SIBYTE_CARMEL is not set
35# CONFIG_SIBYTE_PTSWARM is not set 38# CONFIG_SIBYTE_PTSWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set 39# CONFIG_SIBYTE_BIGSUR is not set
37# CONFIG_SIBYTE_CRHINE is not set
38# CONFIG_SIBYTE_CRHONE is not set
39# CONFIG_SNI_RM is not set 40# CONFIG_SNI_RM is not set
40# CONFIG_TOSHIBA_JMR3927 is not set 41# CONFIG_TOSHIBA_JMR3927 is not set
41# CONFIG_TOSHIBA_RBTX4927 is not set 42# CONFIG_TOSHIBA_RBTX4927 is not set
42# CONFIG_TOSHIBA_RBTX4938 is not set 43# CONFIG_TOSHIBA_RBTX4938 is not set
44# CONFIG_WR_PPMC is not set
43CONFIG_RWSEM_GENERIC_SPINLOCK=y 45CONFIG_RWSEM_GENERIC_SPINLOCK=y
44# CONFIG_ARCH_HAS_ILOG2_U32 is not set 46# CONFIG_ARCH_HAS_ILOG2_U32 is not set
45# CONFIG_ARCH_HAS_ILOG2_U64 is not set 47# CONFIG_ARCH_HAS_ILOG2_U64 is not set
@@ -54,6 +56,7 @@ CONFIG_DMA_NEED_PCI_MAP_STATE=y
54CONFIG_EARLY_PRINTK=y 56CONFIG_EARLY_PRINTK=y
55CONFIG_SYS_HAS_EARLY_PRINTK=y 57CONFIG_SYS_HAS_EARLY_PRINTK=y
56CONFIG_I8259=y 58CONFIG_I8259=y
59# CONFIG_NO_IOPORT is not set
57# CONFIG_CPU_BIG_ENDIAN is not set 60# CONFIG_CPU_BIG_ENDIAN is not set
58CONFIG_CPU_LITTLE_ENDIAN=y 61CONFIG_CPU_LITTLE_ENDIAN=y
59CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 62CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
@@ -64,6 +67,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
64# 67#
65# CPU selection 68# CPU selection
66# 69#
70# CONFIG_CPU_LOONGSON2 is not set
67# CONFIG_CPU_MIPS32_R1 is not set 71# CONFIG_CPU_MIPS32_R1 is not set
68# CONFIG_CPU_MIPS32_R2 is not set 72# CONFIG_CPU_MIPS32_R2 is not set
69# CONFIG_CPU_MIPS64_R1 is not set 73# CONFIG_CPU_MIPS64_R1 is not set
@@ -101,7 +105,6 @@ CONFIG_PAGE_SIZE_4KB=y
101CONFIG_MIPS_MT_DISABLED=y 105CONFIG_MIPS_MT_DISABLED=y
102# CONFIG_MIPS_MT_SMP is not set 106# CONFIG_MIPS_MT_SMP is not set
103# CONFIG_MIPS_MT_SMTC is not set 107# CONFIG_MIPS_MT_SMTC is not set
104# CONFIG_MIPS_VPE_LOADER is not set
105CONFIG_CPU_HAS_LLSC=y 108CONFIG_CPU_HAS_LLSC=y
106CONFIG_CPU_HAS_SYNC=y 109CONFIG_CPU_HAS_SYNC=y
107CONFIG_GENERIC_HARDIRQS=y 110CONFIG_GENERIC_HARDIRQS=y
@@ -117,43 +120,40 @@ CONFIG_FLAT_NODE_MEM_MAP=y
117CONFIG_SPLIT_PTLOCK_CPUS=4 120CONFIG_SPLIT_PTLOCK_CPUS=4
118# CONFIG_RESOURCES_64BIT is not set 121# CONFIG_RESOURCES_64BIT is not set
119CONFIG_ZONE_DMA_FLAG=0 122CONFIG_ZONE_DMA_FLAG=0
123CONFIG_VIRT_TO_BUS=y
120# CONFIG_HZ_48 is not set 124# CONFIG_HZ_48 is not set
121# CONFIG_HZ_100 is not set 125# CONFIG_HZ_100 is not set
122# CONFIG_HZ_128 is not set 126# CONFIG_HZ_128 is not set
123# CONFIG_HZ_250 is not set 127CONFIG_HZ_250=y
124# CONFIG_HZ_256 is not set 128# CONFIG_HZ_256 is not set
125CONFIG_HZ_1000=y 129# CONFIG_HZ_1000 is not set
126# CONFIG_HZ_1024 is not set 130# CONFIG_HZ_1024 is not set
127CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 131CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
128CONFIG_HZ=1000 132CONFIG_HZ=250
129CONFIG_PREEMPT_NONE=y 133CONFIG_PREEMPT_NONE=y
130# CONFIG_PREEMPT_VOLUNTARY is not set 134# CONFIG_PREEMPT_VOLUNTARY is not set
131# CONFIG_PREEMPT is not set 135# CONFIG_PREEMPT is not set
132# CONFIG_KEXEC is not set 136# CONFIG_KEXEC is not set
137CONFIG_SECCOMP=y
133CONFIG_LOCKDEP_SUPPORT=y 138CONFIG_LOCKDEP_SUPPORT=y
134CONFIG_STACKTRACE_SUPPORT=y 139CONFIG_STACKTRACE_SUPPORT=y
135CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 140CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
136 141
137# 142#
138# Code maturity level options 143# General setup
139# 144#
140CONFIG_EXPERIMENTAL=y 145CONFIG_EXPERIMENTAL=y
141CONFIG_BROKEN_ON_SMP=y 146CONFIG_BROKEN_ON_SMP=y
142CONFIG_INIT_ENV_ARG_LIMIT=32 147CONFIG_INIT_ENV_ARG_LIMIT=32
143
144#
145# General setup
146#
147CONFIG_LOCALVERSION="" 148CONFIG_LOCALVERSION=""
148CONFIG_LOCALVERSION_AUTO=y 149CONFIG_LOCALVERSION_AUTO=y
149CONFIG_SWAP=y 150CONFIG_SWAP=y
150CONFIG_SYSVIPC=y 151CONFIG_SYSVIPC=y
151# CONFIG_IPC_NS is not set
152CONFIG_SYSVIPC_SYSCTL=y 152CONFIG_SYSVIPC_SYSCTL=y
153# CONFIG_POSIX_MQUEUE is not set 153# CONFIG_POSIX_MQUEUE is not set
154# CONFIG_BSD_PROCESS_ACCT is not set 154# CONFIG_BSD_PROCESS_ACCT is not set
155# CONFIG_TASKSTATS is not set 155# CONFIG_TASKSTATS is not set
156# CONFIG_UTS_NS is not set 156# CONFIG_USER_NS is not set
157# CONFIG_AUDIT is not set 157# CONFIG_AUDIT is not set
158# CONFIG_IKCONFIG is not set 158# CONFIG_IKCONFIG is not set
159CONFIG_LOG_BUF_SHIFT=14 159CONFIG_LOG_BUF_SHIFT=14
@@ -185,19 +185,17 @@ CONFIG_SLAB=y
185CONFIG_RT_MUTEXES=y 185CONFIG_RT_MUTEXES=y
186# CONFIG_TINY_SHMEM is not set 186# CONFIG_TINY_SHMEM is not set
187CONFIG_BASE_SMALL=0 187CONFIG_BASE_SMALL=0
188 188CONFIG_MODULES=y
189# 189CONFIG_MODULE_UNLOAD=y
190# Loadable module support 190# CONFIG_MODULE_FORCE_UNLOAD is not set
191# 191# CONFIG_MODVERSIONS is not set
192# CONFIG_MODULES is not set 192# CONFIG_MODULE_SRCVERSION_ALL is not set
193 193# CONFIG_KMOD is not set
194#
195# Block layer
196#
197CONFIG_BLOCK=y 194CONFIG_BLOCK=y
198# CONFIG_LBD is not set 195# CONFIG_LBD is not set
199# CONFIG_BLK_DEV_IO_TRACE is not set 196# CONFIG_BLK_DEV_IO_TRACE is not set
200# CONFIG_LSF is not set 197# CONFIG_LSF is not set
198# CONFIG_BLK_DEV_BSG is not set
201 199
202# 200#
203# IO Schedulers 201# IO Schedulers
@@ -236,10 +234,7 @@ CONFIG_TRAD_SIGNALS=y
236# 234#
237# Power management options 235# Power management options
238# 236#
239CONFIG_PM=y 237# CONFIG_PM is not set
240# CONFIG_PM_LEGACY is not set
241# CONFIG_PM_DEBUG is not set
242# CONFIG_PM_SYSFS_DEPRECATED is not set
243 238
244# 239#
245# Networking 240# Networking
@@ -286,20 +281,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
286# CONFIG_INET6_TUNNEL is not set 281# CONFIG_INET6_TUNNEL is not set
287# CONFIG_NETWORK_SECMARK is not set 282# CONFIG_NETWORK_SECMARK is not set
288# CONFIG_NETFILTER is not set 283# CONFIG_NETFILTER is not set
289
290#
291# DCCP Configuration (EXPERIMENTAL)
292#
293# CONFIG_IP_DCCP is not set 284# CONFIG_IP_DCCP is not set
294
295#
296# SCTP Configuration (EXPERIMENTAL)
297#
298# CONFIG_IP_SCTP is not set 285# CONFIG_IP_SCTP is not set
299
300#
301# TIPC Configuration (EXPERIMENTAL)
302#
303# CONFIG_TIPC is not set 286# CONFIG_TIPC is not set
304# CONFIG_ATM is not set 287# CONFIG_ATM is not set
305# CONFIG_BRIDGE is not set 288# CONFIG_BRIDGE is not set
@@ -335,6 +318,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
335# CONFIG_MAC80211 is not set 318# CONFIG_MAC80211 is not set
336# CONFIG_IEEE80211 is not set 319# CONFIG_IEEE80211 is not set
337# CONFIG_RFKILL is not set 320# CONFIG_RFKILL is not set
321# CONFIG_NET_9P is not set
338 322
339# 323#
340# Device Drivers 324# Device Drivers
@@ -347,12 +331,7 @@ CONFIG_STANDALONE=y
347CONFIG_PREVENT_FIRMWARE_BUILD=y 331CONFIG_PREVENT_FIRMWARE_BUILD=y
348CONFIG_FW_LOADER=y 332CONFIG_FW_LOADER=y
349# CONFIG_SYS_HYPERVISOR is not set 333# CONFIG_SYS_HYPERVISOR is not set
350 334# CONFIG_CONNECTOR is not set
351#
352# Connector - unified userspace <-> kernelspace linker
353#
354CONFIG_CONNECTOR=y
355CONFIG_PROC_EVENTS=y
356CONFIG_MTD=y 335CONFIG_MTD=y
357# CONFIG_MTD_DEBUG is not set 336# CONFIG_MTD_DEBUG is not set
358# CONFIG_MTD_CONCAT is not set 337# CONFIG_MTD_CONCAT is not set
@@ -430,20 +409,8 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
430# UBI - Unsorted block images 409# UBI - Unsorted block images
431# 410#
432# CONFIG_MTD_UBI is not set 411# CONFIG_MTD_UBI is not set
433
434#
435# Parallel port support
436#
437# CONFIG_PARPORT is not set 412# CONFIG_PARPORT is not set
438 413CONFIG_BLK_DEV=y
439#
440# Plug and Play support
441#
442# CONFIG_PNPACPI is not set
443
444#
445# Block devices
446#
447# CONFIG_BLK_CPQ_DA is not set 414# CONFIG_BLK_CPQ_DA is not set
448# CONFIG_BLK_CPQ_CISS_DA is not set 415# CONFIG_BLK_CPQ_CISS_DA is not set
449# CONFIG_BLK_DEV_DAC960 is not set 416# CONFIG_BLK_DEV_DAC960 is not set
@@ -453,17 +420,11 @@ CONFIG_BLK_DEV_LOOP=y
453# CONFIG_BLK_DEV_CRYPTOLOOP is not set 420# CONFIG_BLK_DEV_CRYPTOLOOP is not set
454# CONFIG_BLK_DEV_NBD is not set 421# CONFIG_BLK_DEV_NBD is not set
455# CONFIG_BLK_DEV_SX8 is not set 422# CONFIG_BLK_DEV_SX8 is not set
423# CONFIG_BLK_DEV_UB is not set
456# CONFIG_BLK_DEV_RAM is not set 424# CONFIG_BLK_DEV_RAM is not set
457# CONFIG_CDROM_PKTCDVD is not set 425# CONFIG_CDROM_PKTCDVD is not set
458# CONFIG_ATA_OVER_ETH is not set 426# CONFIG_ATA_OVER_ETH is not set
459 427# CONFIG_MISC_DEVICES is not set
460#
461# Misc devices
462#
463# CONFIG_PHANTOM is not set
464# CONFIG_SGI_IOC4 is not set
465# CONFIG_TIFM_CORE is not set
466# CONFIG_BLINK is not set
467# CONFIG_IDE is not set 428# CONFIG_IDE is not set
468 429
469# 430#
@@ -471,6 +432,7 @@ CONFIG_BLK_DEV_LOOP=y
471# 432#
472CONFIG_RAID_ATTRS=y 433CONFIG_RAID_ATTRS=y
473CONFIG_SCSI=y 434CONFIG_SCSI=y
435CONFIG_SCSI_DMA=y
474# CONFIG_SCSI_TGT is not set 436# CONFIG_SCSI_TGT is not set
475# CONFIG_SCSI_NETLINK is not set 437# CONFIG_SCSI_NETLINK is not set
476CONFIG_SCSI_PROC_FS=y 438CONFIG_SCSI_PROC_FS=y
@@ -492,6 +454,7 @@ CONFIG_BLK_DEV_SD=y
492# CONFIG_SCSI_CONSTANTS is not set 454# CONFIG_SCSI_CONSTANTS is not set
493# CONFIG_SCSI_LOGGING is not set 455# CONFIG_SCSI_LOGGING is not set
494# CONFIG_SCSI_SCAN_ASYNC is not set 456# CONFIG_SCSI_SCAN_ASYNC is not set
457CONFIG_SCSI_WAIT_SCAN=m
495 458
496# 459#
497# SCSI Transports 460# SCSI Transports
@@ -499,45 +462,8 @@ CONFIG_BLK_DEV_SD=y
499# CONFIG_SCSI_SPI_ATTRS is not set 462# CONFIG_SCSI_SPI_ATTRS is not set
500# CONFIG_SCSI_FC_ATTRS is not set 463# CONFIG_SCSI_FC_ATTRS is not set
501# CONFIG_SCSI_ISCSI_ATTRS is not set 464# CONFIG_SCSI_ISCSI_ATTRS is not set
502# CONFIG_SCSI_SAS_ATTRS is not set
503# CONFIG_SCSI_SAS_LIBSAS is not set 465# CONFIG_SCSI_SAS_LIBSAS is not set
504 466# CONFIG_SCSI_LOWLEVEL is not set
505#
506# SCSI low-level drivers
507#
508# CONFIG_ISCSI_TCP is not set
509# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
510# CONFIG_SCSI_3W_9XXX is not set
511# CONFIG_SCSI_ACARD is not set
512# CONFIG_SCSI_AACRAID is not set
513# CONFIG_SCSI_AIC7XXX is not set
514# CONFIG_SCSI_AIC7XXX_OLD is not set
515# CONFIG_SCSI_AIC79XX is not set
516# CONFIG_SCSI_AIC94XX is not set
517# CONFIG_SCSI_DPT_I2O is not set
518# CONFIG_SCSI_ARCMSR is not set
519# CONFIG_MEGARAID_NEWGEN is not set
520# CONFIG_MEGARAID_LEGACY is not set
521# CONFIG_MEGARAID_SAS is not set
522# CONFIG_SCSI_HPTIOP is not set
523# CONFIG_SCSI_DMX3191D is not set
524# CONFIG_SCSI_FUTURE_DOMAIN is not set
525# CONFIG_SCSI_IPS is not set
526# CONFIG_SCSI_INITIO is not set
527# CONFIG_SCSI_INIA100 is not set
528# CONFIG_SCSI_STEX is not set
529# CONFIG_SCSI_SYM53C8XX_2 is not set
530# CONFIG_SCSI_IPR is not set
531# CONFIG_SCSI_QLOGIC_1280 is not set
532# CONFIG_SCSI_QLA_FC is not set
533# CONFIG_SCSI_QLA_ISCSI is not set
534# CONFIG_SCSI_LPFC is not set
535# CONFIG_SCSI_DC395x is not set
536# CONFIG_SCSI_DC390T is not set
537# CONFIG_SCSI_NSP32 is not set
538# CONFIG_SCSI_DEBUG is not set
539# CONFIG_SCSI_ESP_CORE is not set
540# CONFIG_SCSI_SRP is not set
541CONFIG_ATA=y 467CONFIG_ATA=y
542# CONFIG_ATA_NONSTANDARD is not set 468# CONFIG_ATA_NONSTANDARD is not set
543# CONFIG_SATA_AHCI is not set 469# CONFIG_SATA_AHCI is not set
@@ -593,10 +519,6 @@ CONFIG_ATA=y
593CONFIG_PATA_VIA=y 519CONFIG_PATA_VIA=y
594# CONFIG_PATA_WINBOND is not set 520# CONFIG_PATA_WINBOND is not set
595# CONFIG_PATA_PLATFORM is not set 521# CONFIG_PATA_PLATFORM is not set
596
597#
598# Multi-device support (RAID and LVM)
599#
600# CONFIG_MD is not set 522# CONFIG_MD is not set
601 523
602# 524#
@@ -612,41 +534,24 @@ CONFIG_PATA_VIA=y
612# 534#
613# CONFIG_FIREWIRE is not set 535# CONFIG_FIREWIRE is not set
614# CONFIG_IEEE1394 is not set 536# CONFIG_IEEE1394 is not set
615
616#
617# I2O device support
618#
619# CONFIG_I2O is not set 537# CONFIG_I2O is not set
620
621#
622# Network device support
623#
624CONFIG_NETDEVICES=y 538CONFIG_NETDEVICES=y
539# CONFIG_NETDEVICES_MULTIQUEUE is not set
625# CONFIG_DUMMY is not set 540# CONFIG_DUMMY is not set
626# CONFIG_BONDING is not set 541# CONFIG_BONDING is not set
542# CONFIG_MACVLAN is not set
627# CONFIG_EQUALIZER is not set 543# CONFIG_EQUALIZER is not set
628# CONFIG_TUN is not set 544# CONFIG_TUN is not set
629
630#
631# ARCnet devices
632#
633# CONFIG_ARCNET is not set 545# CONFIG_ARCNET is not set
634# CONFIG_PHYLIB is not set 546# CONFIG_PHYLIB is not set
635
636#
637# Ethernet (10 or 100Mbit)
638#
639CONFIG_NET_ETHERNET=y 547CONFIG_NET_ETHERNET=y
640# CONFIG_MII is not set 548# CONFIG_MII is not set
549# CONFIG_AX88796 is not set
641# CONFIG_HAPPYMEAL is not set 550# CONFIG_HAPPYMEAL is not set
642# CONFIG_SUNGEM is not set 551# CONFIG_SUNGEM is not set
643# CONFIG_CASSINI is not set 552# CONFIG_CASSINI is not set
644# CONFIG_NET_VENDOR_3COM is not set 553# CONFIG_NET_VENDOR_3COM is not set
645# CONFIG_DM9000 is not set 554# CONFIG_DM9000 is not set
646
647#
648# Tulip family network device support
649#
650CONFIG_NET_TULIP=y 555CONFIG_NET_TULIP=y
651CONFIG_DE2104X=y 556CONFIG_DE2104X=y
652CONFIG_TULIP=y 557CONFIG_TULIP=y
@@ -661,10 +566,6 @@ CONFIG_TULIP=y
661# CONFIG_NET_PCI is not set 566# CONFIG_NET_PCI is not set
662# CONFIG_NETDEV_1000 is not set 567# CONFIG_NETDEV_1000 is not set
663# CONFIG_NETDEV_10000 is not set 568# CONFIG_NETDEV_10000 is not set
664
665#
666# Token Ring devices
667#
668# CONFIG_TR is not set 569# CONFIG_TR is not set
669 570
670# 571#
@@ -672,6 +573,16 @@ CONFIG_TULIP=y
672# 573#
673# CONFIG_WLAN_PRE80211 is not set 574# CONFIG_WLAN_PRE80211 is not set
674# CONFIG_WLAN_80211 is not set 575# CONFIG_WLAN_80211 is not set
576
577#
578# USB Network Adapters
579#
580# CONFIG_USB_CATC is not set
581# CONFIG_USB_KAWETH is not set
582# CONFIG_USB_PEGASUS is not set
583# CONFIG_USB_RTL8150 is not set
584# CONFIG_USB_USBNET_MII is not set
585# CONFIG_USB_USBNET is not set
675# CONFIG_WAN is not set 586# CONFIG_WAN is not set
676# CONFIG_FDDI is not set 587# CONFIG_FDDI is not set
677# CONFIG_HIPPI is not set 588# CONFIG_HIPPI is not set
@@ -682,15 +593,7 @@ CONFIG_TULIP=y
682# CONFIG_NETCONSOLE is not set 593# CONFIG_NETCONSOLE is not set
683# CONFIG_NETPOLL is not set 594# CONFIG_NETPOLL is not set
684# CONFIG_NET_POLL_CONTROLLER is not set 595# CONFIG_NET_POLL_CONTROLLER is not set
685
686#
687# ISDN subsystem
688#
689# CONFIG_ISDN is not set 596# CONFIG_ISDN is not set
690
691#
692# Telephony Support
693#
694# CONFIG_PHONE is not set 597# CONFIG_PHONE is not set
695 598
696# 599#
@@ -698,6 +601,7 @@ CONFIG_TULIP=y
698# 601#
699CONFIG_INPUT=y 602CONFIG_INPUT=y
700# CONFIG_INPUT_FF_MEMLESS is not set 603# CONFIG_INPUT_FF_MEMLESS is not set
604CONFIG_INPUT_POLLDEV=y
701 605
702# 606#
703# Userland interfaces 607# Userland interfaces
@@ -705,7 +609,7 @@ CONFIG_INPUT=y
705# CONFIG_INPUT_MOUSEDEV is not set 609# CONFIG_INPUT_MOUSEDEV is not set
706# CONFIG_INPUT_JOYDEV is not set 610# CONFIG_INPUT_JOYDEV is not set
707# CONFIG_INPUT_TSDEV is not set 611# CONFIG_INPUT_TSDEV is not set
708# CONFIG_INPUT_EVDEV is not set 612CONFIG_INPUT_EVDEV=y
709# CONFIG_INPUT_EVBUG is not set 613# CONFIG_INPUT_EVBUG is not set
710 614
711# 615#
@@ -725,7 +629,6 @@ CONFIG_INPUT_COBALT_BTNS=y
725# CONFIG_INPUT_POWERMATE is not set 629# CONFIG_INPUT_POWERMATE is not set
726# CONFIG_INPUT_YEALINK is not set 630# CONFIG_INPUT_YEALINK is not set
727# CONFIG_INPUT_UINPUT is not set 631# CONFIG_INPUT_UINPUT is not set
728CONFIG_INPUT_POLLDEV=y
729 632
730# 633#
731# Hardware I/O ports 634# Hardware I/O ports
@@ -761,24 +664,15 @@ CONFIG_SERIAL_CORE_CONSOLE=y
761CONFIG_UNIX98_PTYS=y 664CONFIG_UNIX98_PTYS=y
762CONFIG_LEGACY_PTYS=y 665CONFIG_LEGACY_PTYS=y
763CONFIG_LEGACY_PTY_COUNT=256 666CONFIG_LEGACY_PTY_COUNT=256
764
765#
766# IPMI
767#
768# CONFIG_IPMI_HANDLER is not set 667# CONFIG_IPMI_HANDLER is not set
769# CONFIG_WATCHDOG is not set 668# CONFIG_WATCHDOG is not set
770# CONFIG_HW_RANDOM is not set 669# CONFIG_HW_RANDOM is not set
771# CONFIG_RTC is not set 670# CONFIG_RTC is not set
772# CONFIG_GEN_RTC is not set
773CONFIG_COBALT_LCD=y 671CONFIG_COBALT_LCD=y
774# CONFIG_R3964 is not set 672# CONFIG_R3964 is not set
775# CONFIG_APPLICOM is not set 673# CONFIG_APPLICOM is not set
776# CONFIG_DRM is not set 674# CONFIG_DRM is not set
777# CONFIG_RAW_DRIVER is not set 675# CONFIG_RAW_DRIVER is not set
778
779#
780# TPM devices
781#
782# CONFIG_TCG_TPM is not set 676# CONFIG_TCG_TPM is not set
783CONFIG_DEVPORT=y 677CONFIG_DEVPORT=y
784# CONFIG_I2C is not set 678# CONFIG_I2C is not set
@@ -788,11 +682,8 @@ CONFIG_DEVPORT=y
788# 682#
789# CONFIG_SPI is not set 683# CONFIG_SPI is not set
790# CONFIG_SPI_MASTER is not set 684# CONFIG_SPI_MASTER is not set
791
792#
793# Dallas's 1-wire bus
794#
795# CONFIG_W1 is not set 685# CONFIG_W1 is not set
686# CONFIG_POWER_SUPPLY is not set
796# CONFIG_HWMON is not set 687# CONFIG_HWMON is not set
797 688
798# 689#
@@ -817,6 +708,7 @@ CONFIG_DEVPORT=y
817# 708#
818# CONFIG_DISPLAY_SUPPORT is not set 709# CONFIG_DISPLAY_SUPPORT is not set
819# CONFIG_VGASTATE is not set 710# CONFIG_VGASTATE is not set
711# CONFIG_VIDEO_OUTPUT_CONTROL is not set
820# CONFIG_FB is not set 712# CONFIG_FB is not set
821 713
822# 714#
@@ -829,55 +721,131 @@ CONFIG_DUMMY_CONSOLE=y
829# Sound 721# Sound
830# 722#
831# CONFIG_SOUND is not set 723# CONFIG_SOUND is not set
724CONFIG_HID_SUPPORT=y
725CONFIG_HID=m
726# CONFIG_HID_DEBUG is not set
832 727
833# 728#
834# HID Devices 729# USB Input Devices
835# 730#
836# CONFIG_HID is not set 731CONFIG_USB_HID=m
732# CONFIG_USB_HIDINPUT_POWERBOOK is not set
733# CONFIG_HID_FF is not set
734# CONFIG_USB_HIDDEV is not set
837 735
838# 736#
839# USB support 737# USB HID Boot Protocol drivers
840# 738#
739# CONFIG_USB_KBD is not set
740# CONFIG_USB_MOUSE is not set
741CONFIG_USB_SUPPORT=y
841CONFIG_USB_ARCH_HAS_HCD=y 742CONFIG_USB_ARCH_HAS_HCD=y
842CONFIG_USB_ARCH_HAS_OHCI=y 743CONFIG_USB_ARCH_HAS_OHCI=y
843CONFIG_USB_ARCH_HAS_EHCI=y 744CONFIG_USB_ARCH_HAS_EHCI=y
844# CONFIG_USB is not set 745CONFIG_USB=m
746# CONFIG_USB_DEBUG is not set
747
748#
749# Miscellaneous USB options
750#
751# CONFIG_USB_DEVICEFS is not set
752# CONFIG_USB_DEVICE_CLASS is not set
753# CONFIG_USB_DYNAMIC_MINORS is not set
754# CONFIG_USB_OTG is not set
755
756#
757# USB Host Controller Drivers
758#
759CONFIG_USB_EHCI_HCD=m
760# CONFIG_USB_EHCI_SPLIT_ISO is not set
761# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
762# CONFIG_USB_EHCI_TT_NEWSCHED is not set
763# CONFIG_USB_ISP116X_HCD is not set
764CONFIG_USB_OHCI_HCD=m
765# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
766# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
767CONFIG_USB_OHCI_LITTLE_ENDIAN=y
768# CONFIG_USB_UHCI_HCD is not set
769# CONFIG_USB_SL811_HCD is not set
770# CONFIG_USB_R8A66597_HCD is not set
771
772#
773# USB Device Class drivers
774#
775# CONFIG_USB_ACM is not set
776# CONFIG_USB_PRINTER is not set
845 777
846# 778#
847# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 779# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
848# 780#
849 781
850# 782#
851# USB Gadget Support 783# may also be needed; see USB_STORAGE Help for more information
852# 784#
853# CONFIG_USB_GADGET is not set 785CONFIG_USB_STORAGE=m
854# CONFIG_MMC is not set 786# CONFIG_USB_STORAGE_DEBUG is not set
787# CONFIG_USB_STORAGE_DATAFAB is not set
788# CONFIG_USB_STORAGE_FREECOM is not set
789# CONFIG_USB_STORAGE_DPCM is not set
790# CONFIG_USB_STORAGE_USBAT is not set
791# CONFIG_USB_STORAGE_SDDR09 is not set
792# CONFIG_USB_STORAGE_SDDR55 is not set
793# CONFIG_USB_STORAGE_JUMPSHOT is not set
794# CONFIG_USB_STORAGE_ALAUDA is not set
795# CONFIG_USB_STORAGE_ONETOUCH is not set
796# CONFIG_USB_STORAGE_KARMA is not set
797# CONFIG_USB_LIBUSUAL is not set
855 798
856# 799#
857# LED devices 800# USB Imaging devices
858# 801#
859# CONFIG_NEW_LEDS is not set 802# CONFIG_USB_MDC800 is not set
803# CONFIG_USB_MICROTEK is not set
804CONFIG_USB_MON=y
860 805
861# 806#
862# LED drivers 807# USB port drivers
863# 808#
864 809
865# 810#
866# LED Triggers 811# USB Serial Converter support
867# 812#
813# CONFIG_USB_SERIAL is not set
868 814
869# 815#
870# InfiniBand support 816# USB Miscellaneous drivers
871# 817#
872# CONFIG_INFINIBAND is not set 818# CONFIG_USB_EMI62 is not set
819# CONFIG_USB_EMI26 is not set
820# CONFIG_USB_ADUTUX is not set
821# CONFIG_USB_AUERSWALD is not set
822# CONFIG_USB_RIO500 is not set
823# CONFIG_USB_LEGOTOWER is not set
824# CONFIG_USB_LCD is not set
825# CONFIG_USB_BERRY_CHARGE is not set
826# CONFIG_USB_LED is not set
827# CONFIG_USB_CYPRESS_CY7C63 is not set
828# CONFIG_USB_CYTHERM is not set
829# CONFIG_USB_PHIDGET is not set
830# CONFIG_USB_IDMOUSE is not set
831# CONFIG_USB_FTDI_ELAN is not set
832# CONFIG_USB_APPLEDISPLAY is not set
833# CONFIG_USB_SISUSBVGA is not set
834# CONFIG_USB_LD is not set
835# CONFIG_USB_TRANCEVIBRATOR is not set
836# CONFIG_USB_IOWARRIOR is not set
873 837
874# 838#
875# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 839# USB DSL modem support
876# 840#
877 841
878# 842#
879# Real Time Clock 843# USB Gadget Support
880# 844#
845# CONFIG_USB_GADGET is not set
846# CONFIG_MMC is not set
847# CONFIG_NEW_LEDS is not set
848# CONFIG_INFINIBAND is not set
881CONFIG_RTC_LIB=y 849CONFIG_RTC_LIB=y
882CONFIG_RTC_CLASS=y 850CONFIG_RTC_CLASS=y
883CONFIG_RTC_HCTOSYS=y 851CONFIG_RTC_HCTOSYS=y
@@ -894,10 +862,6 @@ CONFIG_RTC_INTF_DEV=y
894# CONFIG_RTC_DRV_TEST is not set 862# CONFIG_RTC_DRV_TEST is not set
895 863
896# 864#
897# I2C RTC drivers
898#
899
900#
901# SPI RTC drivers 865# SPI RTC drivers
902# 866#
903 867
@@ -906,8 +870,10 @@ CONFIG_RTC_INTF_DEV=y
906# 870#
907CONFIG_RTC_DRV_CMOS=y 871CONFIG_RTC_DRV_CMOS=y
908# CONFIG_RTC_DRV_DS1553 is not set 872# CONFIG_RTC_DRV_DS1553 is not set
873# CONFIG_RTC_DRV_STK17TA8 is not set
909# CONFIG_RTC_DRV_DS1742 is not set 874# CONFIG_RTC_DRV_DS1742 is not set
910# CONFIG_RTC_DRV_M48T86 is not set 875# CONFIG_RTC_DRV_M48T86 is not set
876# CONFIG_RTC_DRV_M48T59 is not set
911# CONFIG_RTC_DRV_V3020 is not set 877# CONFIG_RTC_DRV_V3020 is not set
912 878
913# 879#
@@ -928,6 +894,11 @@ CONFIG_RTC_DRV_CMOS=y
928# 894#
929 895
930# 896#
897# Userspace I/O
898#
899# CONFIG_UIO is not set
900
901#
931# File systems 902# File systems
932# 903#
933CONFIG_EXT2_FS=y 904CONFIG_EXT2_FS=y
@@ -1032,7 +1003,6 @@ CONFIG_SUNRPC=y
1032# CONFIG_NCP_FS is not set 1003# CONFIG_NCP_FS is not set
1033# CONFIG_CODA_FS is not set 1004# CONFIG_CODA_FS is not set
1034# CONFIG_AFS_FS is not set 1005# CONFIG_AFS_FS is not set
1035# CONFIG_9P_FS is not set
1036 1006
1037# 1007#
1038# Partition Types 1008# Partition Types
@@ -1074,10 +1044,6 @@ CONFIG_CMDLINE=""
1074# 1044#
1075# CONFIG_KEYS is not set 1045# CONFIG_KEYS is not set
1076# CONFIG_SECURITY is not set 1046# CONFIG_SECURITY is not set
1077
1078#
1079# Cryptographic options
1080#
1081# CONFIG_CRYPTO is not set 1047# CONFIG_CRYPTO is not set
1082 1048
1083# 1049#
@@ -1088,6 +1054,7 @@ CONFIG_BITREVERSE=y
1088# CONFIG_CRC16 is not set 1054# CONFIG_CRC16 is not set
1089# CONFIG_CRC_ITU_T is not set 1055# CONFIG_CRC_ITU_T is not set
1090CONFIG_CRC32=y 1056CONFIG_CRC32=y
1057# CONFIG_CRC7 is not set
1091CONFIG_LIBCRC32C=y 1058CONFIG_LIBCRC32C=y
1092CONFIG_PLIST=y 1059CONFIG_PLIST=y
1093CONFIG_HAS_IOMEM=y 1060CONFIG_HAS_IOMEM=y
diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig
index 5467d750b6..d0d07faeb8 100644
--- a/arch/mips/configs/e55_defconfig
+++ b/arch/mips/configs/e55_defconfig
@@ -1,60 +1,47 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20 3# Linux kernel version: 2.6.23-rc2
4# Tue Feb 20 21:47:28 2007 4# Wed Aug 8 10:36:25 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
16# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 17# CONFIG_MIPS_ATLAS is not set
30# CONFIG_MIPS_MALTA is not set 18# CONFIG_MIPS_MALTA is not set
31# CONFIG_MIPS_SEAD is not set 19# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 21# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 22CONFIG_MACH_VR41XX=y
36# CONFIG_PNX8550_JBS is not set 23# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 24# CONFIG_PNX8550_STB810 is not set
38CONFIG_MACH_VR41XX=y 25# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 26# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_QEMU is not set 27# CONFIG_QEMU is not set
41# CONFIG_MARKEINS is not set
42# CONFIG_SGI_IP22 is not set 28# CONFIG_SGI_IP22 is not set
43# CONFIG_SGI_IP27 is not set 29# CONFIG_SGI_IP27 is not set
44# CONFIG_SGI_IP32 is not set 30# CONFIG_SGI_IP32 is not set
45# CONFIG_SIBYTE_BIGSUR is not set 31# CONFIG_SIBYTE_CRHINE is not set
32# CONFIG_SIBYTE_CARMEL is not set
33# CONFIG_SIBYTE_CRHONE is not set
34# CONFIG_SIBYTE_RHONE is not set
46# CONFIG_SIBYTE_SWARM is not set 35# CONFIG_SIBYTE_SWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set
47# CONFIG_SIBYTE_SENTOSA is not set 37# CONFIG_SIBYTE_SENTOSA is not set
48# CONFIG_SIBYTE_RHONE is not set
49# CONFIG_SIBYTE_CARMEL is not set
50# CONFIG_SIBYTE_PTSWARM is not set 38# CONFIG_SIBYTE_PTSWARM is not set
51# CONFIG_SIBYTE_LITTLESUR is not set 39# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_CRHINE is not set
53# CONFIG_SIBYTE_CRHONE is not set
54# CONFIG_SNI_RM is not set 40# CONFIG_SNI_RM is not set
55# CONFIG_TOSHIBA_JMR3927 is not set 41# CONFIG_TOSHIBA_JMR3927 is not set
56# CONFIG_TOSHIBA_RBTX4927 is not set 42# CONFIG_TOSHIBA_RBTX4927 is not set
57# CONFIG_TOSHIBA_RBTX4938 is not set 43# CONFIG_TOSHIBA_RBTX4938 is not set
44# CONFIG_WR_PPMC is not set
58CONFIG_CASIO_E55=y 45CONFIG_CASIO_E55=y
59# CONFIG_IBM_WORKPAD is not set 46# CONFIG_IBM_WORKPAD is not set
60# CONFIG_NEC_CMBVR4133 is not set 47# CONFIG_NEC_CMBVR4133 is not set
@@ -72,6 +59,8 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
72CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 59CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
73CONFIG_DMA_NONCOHERENT=y 60CONFIG_DMA_NONCOHERENT=y
74CONFIG_DMA_NEED_PCI_MAP_STATE=y 61CONFIG_DMA_NEED_PCI_MAP_STATE=y
62# CONFIG_HOTPLUG_CPU is not set
63# CONFIG_NO_IOPORT is not set
75# CONFIG_CPU_BIG_ENDIAN is not set 64# CONFIG_CPU_BIG_ENDIAN is not set
76CONFIG_CPU_LITTLE_ENDIAN=y 65CONFIG_CPU_LITTLE_ENDIAN=y
77CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 66CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
@@ -81,6 +70,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
81# 70#
82# CPU selection 71# CPU selection
83# 72#
73# CONFIG_CPU_LOONGSON2 is not set
84# CONFIG_CPU_MIPS32_R1 is not set 74# CONFIG_CPU_MIPS32_R1 is not set
85# CONFIG_CPU_MIPS32_R2 is not set 75# CONFIG_CPU_MIPS32_R2 is not set
86# CONFIG_CPU_MIPS64_R1 is not set 76# CONFIG_CPU_MIPS64_R1 is not set
@@ -102,7 +92,6 @@ CONFIG_CPU_VR41XX=y
102# CONFIG_CPU_SB1 is not set 92# CONFIG_CPU_SB1 is not set
103CONFIG_SYS_HAS_CPU_VR41XX=y 93CONFIG_SYS_HAS_CPU_VR41XX=y
104CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 94CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
105CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
106CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 95CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
107CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 96CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
108 97
@@ -118,7 +107,6 @@ CONFIG_PAGE_SIZE_4KB=y
118CONFIG_MIPS_MT_DISABLED=y 107CONFIG_MIPS_MT_DISABLED=y
119# CONFIG_MIPS_MT_SMP is not set 108# CONFIG_MIPS_MT_SMP is not set
120# CONFIG_MIPS_MT_SMTC is not set 109# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_VPE_LOADER is not set
122CONFIG_CPU_HAS_SYNC=y 110CONFIG_CPU_HAS_SYNC=y
123CONFIG_GENERIC_HARDIRQS=y 111CONFIG_GENERIC_HARDIRQS=y
124CONFIG_GENERIC_IRQ_PROBE=y 112CONFIG_GENERIC_IRQ_PROBE=y
@@ -132,45 +120,44 @@ CONFIG_FLAT_NODE_MEM_MAP=y
132# CONFIG_SPARSEMEM_STATIC is not set 120# CONFIG_SPARSEMEM_STATIC is not set
133CONFIG_SPLIT_PTLOCK_CPUS=4 121CONFIG_SPLIT_PTLOCK_CPUS=4
134# CONFIG_RESOURCES_64BIT is not set 122# CONFIG_RESOURCES_64BIT is not set
135CONFIG_ZONE_DMA_FLAG=1 123CONFIG_ZONE_DMA_FLAG=0
124CONFIG_VIRT_TO_BUS=y
136# CONFIG_HZ_48 is not set 125# CONFIG_HZ_48 is not set
137# CONFIG_HZ_100 is not set 126# CONFIG_HZ_100 is not set
138# CONFIG_HZ_128 is not set 127# CONFIG_HZ_128 is not set
139# CONFIG_HZ_250 is not set 128CONFIG_HZ_250=y
140# CONFIG_HZ_256 is not set 129# CONFIG_HZ_256 is not set
141CONFIG_HZ_1000=y 130# CONFIG_HZ_1000 is not set
142# CONFIG_HZ_1024 is not set 131# CONFIG_HZ_1024 is not set
143CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 132CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
144CONFIG_HZ=1000 133CONFIG_HZ=250
145CONFIG_PREEMPT_NONE=y 134CONFIG_PREEMPT_NONE=y
146# CONFIG_PREEMPT_VOLUNTARY is not set 135# CONFIG_PREEMPT_VOLUNTARY is not set
147# CONFIG_PREEMPT is not set 136# CONFIG_PREEMPT is not set
148# CONFIG_KEXEC is not set 137# CONFIG_KEXEC is not set
138CONFIG_SECCOMP=y
149CONFIG_LOCKDEP_SUPPORT=y 139CONFIG_LOCKDEP_SUPPORT=y
150CONFIG_STACKTRACE_SUPPORT=y 140CONFIG_STACKTRACE_SUPPORT=y
151CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 141CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
152 142
153# 143#
154# Code maturity level options 144# General setup
155# 145#
156CONFIG_EXPERIMENTAL=y 146CONFIG_EXPERIMENTAL=y
157CONFIG_BROKEN_ON_SMP=y 147CONFIG_BROKEN_ON_SMP=y
158CONFIG_INIT_ENV_ARG_LIMIT=32 148CONFIG_INIT_ENV_ARG_LIMIT=32
159
160#
161# General setup
162#
163CONFIG_LOCALVERSION="" 149CONFIG_LOCALVERSION=""
164CONFIG_LOCALVERSION_AUTO=y 150CONFIG_LOCALVERSION_AUTO=y
165CONFIG_SWAP=y 151CONFIG_SWAP=y
166CONFIG_SYSVIPC=y 152CONFIG_SYSVIPC=y
167# CONFIG_IPC_NS is not set
168CONFIG_SYSVIPC_SYSCTL=y 153CONFIG_SYSVIPC_SYSCTL=y
169# CONFIG_BSD_PROCESS_ACCT is not set 154# CONFIG_BSD_PROCESS_ACCT is not set
170# CONFIG_UTS_NS is not set 155# CONFIG_USER_NS is not set
171# CONFIG_IKCONFIG is not set 156# CONFIG_IKCONFIG is not set
157CONFIG_LOG_BUF_SHIFT=14
172CONFIG_SYSFS_DEPRECATED=y 158CONFIG_SYSFS_DEPRECATED=y
173# CONFIG_RELAY is not set 159# CONFIG_RELAY is not set
160# CONFIG_BLK_DEV_INITRD is not set
174# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 161# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
175CONFIG_SYSCTL=y 162CONFIG_SYSCTL=y
176CONFIG_EMBEDDED=y 163CONFIG_EMBEDDED=y
@@ -183,32 +170,30 @@ CONFIG_BUG=y
183CONFIG_ELF_CORE=y 170CONFIG_ELF_CORE=y
184CONFIG_BASE_FULL=y 171CONFIG_BASE_FULL=y
185CONFIG_FUTEX=y 172CONFIG_FUTEX=y
173CONFIG_ANON_INODES=y
186CONFIG_EPOLL=y 174CONFIG_EPOLL=y
175CONFIG_SIGNALFD=y
176CONFIG_TIMERFD=y
177CONFIG_EVENTFD=y
187CONFIG_SHMEM=y 178CONFIG_SHMEM=y
188CONFIG_SLAB=y
189CONFIG_VM_EVENT_COUNTERS=y 179CONFIG_VM_EVENT_COUNTERS=y
180CONFIG_SLAB=y
181# CONFIG_SLUB is not set
182# CONFIG_SLOB is not set
190CONFIG_RT_MUTEXES=y 183CONFIG_RT_MUTEXES=y
191# CONFIG_TINY_SHMEM is not set 184# CONFIG_TINY_SHMEM is not set
192CONFIG_BASE_SMALL=0 185CONFIG_BASE_SMALL=0
193# CONFIG_SLOB is not set
194
195#
196# Loadable module support
197#
198CONFIG_MODULES=y 186CONFIG_MODULES=y
199CONFIG_MODULE_UNLOAD=y 187CONFIG_MODULE_UNLOAD=y
200# CONFIG_MODULE_FORCE_UNLOAD is not set 188CONFIG_MODULE_FORCE_UNLOAD=y
201CONFIG_MODVERSIONS=y 189CONFIG_MODVERSIONS=y
202CONFIG_MODULE_SRCVERSION_ALL=y 190CONFIG_MODULE_SRCVERSION_ALL=y
203CONFIG_KMOD=y 191CONFIG_KMOD=y
204
205#
206# Block layer
207#
208CONFIG_BLOCK=y 192CONFIG_BLOCK=y
209# CONFIG_LBD is not set 193# CONFIG_LBD is not set
210# CONFIG_BLK_DEV_IO_TRACE is not set 194# CONFIG_BLK_DEV_IO_TRACE is not set
211# CONFIG_LSF is not set 195# CONFIG_LSF is not set
196# CONFIG_BLK_DEV_BSG is not set
212 197
213# 198#
214# IO Schedulers 199# IO Schedulers
@@ -226,6 +211,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
226# 211#
227# Bus options (PCI, PCMCIA, EISA, ISA, TC) 212# Bus options (PCI, PCMCIA, EISA, ISA, TC)
228# 213#
214# CONFIG_ARCH_SUPPORTS_MSI is not set
229CONFIG_ISA=y 215CONFIG_ISA=y
230CONFIG_MMU=y 216CONFIG_MMU=y
231 217
@@ -234,10 +220,6 @@ CONFIG_MMU=y
234# 220#
235 221
236# 222#
237# PCI Hotplug Support
238#
239
240#
241# Executable file formats 223# Executable file formats
242# 224#
243CONFIG_BINFMT_ELF=y 225CONFIG_BINFMT_ELF=y
@@ -247,10 +229,7 @@ CONFIG_TRAD_SIGNALS=y
247# 229#
248# Power management options 230# Power management options
249# 231#
250CONFIG_PM=y 232# CONFIG_PM is not set
251# CONFIG_PM_LEGACY is not set
252# CONFIG_PM_DEBUG is not set
253# CONFIG_PM_SYSFS_DEPRECATED is not set
254 233
255# 234#
256# Networking 235# Networking
@@ -267,46 +246,18 @@ CONFIG_PM=y
267CONFIG_STANDALONE=y 246CONFIG_STANDALONE=y
268CONFIG_PREVENT_FIRMWARE_BUILD=y 247CONFIG_PREVENT_FIRMWARE_BUILD=y
269# CONFIG_SYS_HYPERVISOR is not set 248# CONFIG_SYS_HYPERVISOR is not set
270
271#
272# Connector - unified userspace <-> kernelspace linker
273#
274
275#
276# Memory Technology Devices (MTD)
277#
278# CONFIG_MTD is not set 249# CONFIG_MTD is not set
279
280#
281# Parallel port support
282#
283# CONFIG_PARPORT is not set 250# CONFIG_PARPORT is not set
284
285#
286# Plug and Play support
287#
288# CONFIG_PNP is not set 251# CONFIG_PNP is not set
289# CONFIG_PNPACPI is not set 252CONFIG_BLK_DEV=y
290
291#
292# Block devices
293#
294# CONFIG_BLK_DEV_COW_COMMON is not set 253# CONFIG_BLK_DEV_COW_COMMON is not set
295# CONFIG_BLK_DEV_LOOP is not set 254# CONFIG_BLK_DEV_LOOP is not set
296CONFIG_BLK_DEV_RAM=m 255CONFIG_BLK_DEV_RAM=y
297CONFIG_BLK_DEV_RAM_COUNT=16 256CONFIG_BLK_DEV_RAM_COUNT=16
298CONFIG_BLK_DEV_RAM_SIZE=4096 257CONFIG_BLK_DEV_RAM_SIZE=4096
299CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 258CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
300# CONFIG_BLK_DEV_INITRD is not set
301# CONFIG_CDROM_PKTCDVD is not set 259# CONFIG_CDROM_PKTCDVD is not set
302 260# CONFIG_MISC_DEVICES is not set
303#
304# Misc devices
305#
306
307#
308# ATA/ATAPI/MFM/RLL support
309#
310CONFIG_IDE=y 261CONFIG_IDE=y
311CONFIG_IDE_MAX_HWIFS=4 262CONFIG_IDE_MAX_HWIFS=4
312CONFIG_BLK_DEV_IDE=y 263CONFIG_BLK_DEV_IDE=y
@@ -321,15 +272,16 @@ CONFIG_BLK_DEV_IDEDISK=y
321# CONFIG_BLK_DEV_IDETAPE is not set 272# CONFIG_BLK_DEV_IDETAPE is not set
322# CONFIG_BLK_DEV_IDEFLOPPY is not set 273# CONFIG_BLK_DEV_IDEFLOPPY is not set
323# CONFIG_IDE_TASK_IOCTL is not set 274# CONFIG_IDE_TASK_IOCTL is not set
275CONFIG_IDE_PROC_FS=y
324 276
325# 277#
326# IDE chipset support/bugfixes 278# IDE chipset support/bugfixes
327# 279#
328CONFIG_IDE_GENERIC=y 280CONFIG_IDE_GENERIC=y
281# CONFIG_IDEPCI_PCIBUS_ORDER is not set
329# CONFIG_IDE_ARM is not set 282# CONFIG_IDE_ARM is not set
330# CONFIG_IDE_CHIPSETS is not set 283# CONFIG_IDE_CHIPSETS is not set
331# CONFIG_BLK_DEV_IDEDMA is not set 284# CONFIG_BLK_DEV_IDEDMA is not set
332# CONFIG_IDEDMA_AUTO is not set
333# CONFIG_BLK_DEV_HD is not set 285# CONFIG_BLK_DEV_HD is not set
334 286
335# 287#
@@ -337,43 +289,10 @@ CONFIG_IDE_GENERIC=y
337# 289#
338# CONFIG_RAID_ATTRS is not set 290# CONFIG_RAID_ATTRS is not set
339# CONFIG_SCSI is not set 291# CONFIG_SCSI is not set
292# CONFIG_SCSI_DMA is not set
340# CONFIG_SCSI_NETLINK is not set 293# CONFIG_SCSI_NETLINK is not set
341
342#
343# Serial ATA (prod) and Parallel ATA (experimental) drivers
344#
345# CONFIG_ATA is not set 294# CONFIG_ATA is not set
346
347#
348# Old CD-ROM drivers (not SCSI, not IDE)
349#
350# CONFIG_CD_NO_IDESCSI is not set
351
352#
353# Multi-device support (RAID and LVM)
354#
355# CONFIG_MD is not set 295# CONFIG_MD is not set
356
357#
358# Fusion MPT device support
359#
360# CONFIG_FUSION is not set
361
362#
363# IEEE 1394 (FireWire) support
364#
365
366#
367# I2O device support
368#
369
370#
371# ISDN subsystem
372#
373
374#
375# Telephony Support
376#
377# CONFIG_PHONE is not set 296# CONFIG_PHONE is not set
378 297
379# 298#
@@ -381,14 +300,12 @@ CONFIG_IDE_GENERIC=y
381# 300#
382CONFIG_INPUT=y 301CONFIG_INPUT=y
383# CONFIG_INPUT_FF_MEMLESS is not set 302# CONFIG_INPUT_FF_MEMLESS is not set
303# CONFIG_INPUT_POLLDEV is not set
384 304
385# 305#
386# Userland interfaces 306# Userland interfaces
387# 307#
388CONFIG_INPUT_MOUSEDEV=y 308# CONFIG_INPUT_MOUSEDEV is not set
389CONFIG_INPUT_MOUSEDEV_PSAUX=y
390CONFIG_INPUT_MOUSEDEV_SCREEN_X=320
391CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240
392# CONFIG_INPUT_JOYDEV is not set 309# CONFIG_INPUT_JOYDEV is not set
393# CONFIG_INPUT_TSDEV is not set 310# CONFIG_INPUT_TSDEV is not set
394# CONFIG_INPUT_EVDEV is not set 311# CONFIG_INPUT_EVDEV is not set
@@ -400,6 +317,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240
400# CONFIG_INPUT_KEYBOARD is not set 317# CONFIG_INPUT_KEYBOARD is not set
401# CONFIG_INPUT_MOUSE is not set 318# CONFIG_INPUT_MOUSE is not set
402# CONFIG_INPUT_JOYSTICK is not set 319# CONFIG_INPUT_JOYSTICK is not set
320# CONFIG_INPUT_TABLET is not set
403# CONFIG_INPUT_TOUCHSCREEN is not set 321# CONFIG_INPUT_TOUCHSCREEN is not set
404# CONFIG_INPUT_MISC is not set 322# CONFIG_INPUT_MISC is not set
405 323
@@ -433,45 +351,16 @@ CONFIG_SERIAL_VR41XX_CONSOLE=y
433CONFIG_UNIX98_PTYS=y 351CONFIG_UNIX98_PTYS=y
434CONFIG_LEGACY_PTYS=y 352CONFIG_LEGACY_PTYS=y
435CONFIG_LEGACY_PTY_COUNT=256 353CONFIG_LEGACY_PTY_COUNT=256
436
437#
438# IPMI
439#
440# CONFIG_IPMI_HANDLER is not set 354# CONFIG_IPMI_HANDLER is not set
441 355# CONFIG_WATCHDOG is not set
442#
443# Watchdog Cards
444#
445CONFIG_WATCHDOG=y
446# CONFIG_WATCHDOG_NOWAYOUT is not set
447
448#
449# Watchdog Device Drivers
450#
451# CONFIG_SOFT_WATCHDOG is not set
452
453#
454# ISA-based Watchdog Cards
455#
456# CONFIG_PCWATCHDOG is not set
457# CONFIG_MIXCOMWD is not set
458# CONFIG_WDT is not set
459# CONFIG_HW_RANDOM is not set 356# CONFIG_HW_RANDOM is not set
460# CONFIG_RTC is not set 357# CONFIG_RTC is not set
461# CONFIG_GEN_RTC is not set
462# CONFIG_DTLK is not set 358# CONFIG_DTLK is not set
463# CONFIG_R3964 is not set 359# CONFIG_R3964 is not set
464CONFIG_GPIO_VR41XX=y 360CONFIG_GPIO_VR41XX=y
465# CONFIG_RAW_DRIVER is not set 361# CONFIG_RAW_DRIVER is not set
466
467#
468# TPM devices
469#
470# CONFIG_TCG_TPM is not set 362# CONFIG_TCG_TPM is not set
471 363CONFIG_DEVPORT=y
472#
473# I2C support
474#
475# CONFIG_I2C is not set 364# CONFIG_I2C is not set
476 365
477# 366#
@@ -479,31 +368,32 @@ CONFIG_GPIO_VR41XX=y
479# 368#
480# CONFIG_SPI is not set 369# CONFIG_SPI is not set
481# CONFIG_SPI_MASTER is not set 370# CONFIG_SPI_MASTER is not set
482
483#
484# Dallas's 1-wire bus
485#
486# CONFIG_W1 is not set 371# CONFIG_W1 is not set
372# CONFIG_POWER_SUPPLY is not set
373# CONFIG_HWMON is not set
487 374
488# 375#
489# Hardware Monitoring support 376# Multifunction device drivers
490# 377#
491# CONFIG_HWMON is not set 378# CONFIG_MFD_SM501 is not set
492# CONFIG_HWMON_VID is not set
493 379
494# 380#
495# Multimedia devices 381# Multimedia devices
496# 382#
497# CONFIG_VIDEO_DEV is not set 383# CONFIG_VIDEO_DEV is not set
384# CONFIG_DAB is not set
498 385
499# 386#
500# Digital Video Broadcasting Devices 387# Graphics support
501# 388#
389# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
502 390
503# 391#
504# Graphics support 392# Display device support
505# 393#
506# CONFIG_FIRMWARE_EDID is not set 394# CONFIG_DISPLAY_SUPPORT is not set
395# CONFIG_VGASTATE is not set
396# CONFIG_VIDEO_OUTPUT_CONTROL is not set
507# CONFIG_FB is not set 397# CONFIG_FB is not set
508 398
509# 399#
@@ -512,65 +402,49 @@ CONFIG_GPIO_VR41XX=y
512# CONFIG_VGA_CONSOLE is not set 402# CONFIG_VGA_CONSOLE is not set
513# CONFIG_MDA_CONSOLE is not set 403# CONFIG_MDA_CONSOLE is not set
514CONFIG_DUMMY_CONSOLE=y 404CONFIG_DUMMY_CONSOLE=y
515# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
516 405
517# 406#
518# Sound 407# Sound
519# 408#
520# CONFIG_SOUND is not set 409# CONFIG_SOUND is not set
521 410# CONFIG_HID_SUPPORT is not set
522# 411# CONFIG_USB_SUPPORT is not set
523# HID Devices
524#
525CONFIG_HID=y
526# CONFIG_HID_DEBUG is not set
527
528#
529# USB support
530#
531# CONFIG_USB_ARCH_HAS_HCD is not set
532# CONFIG_USB_ARCH_HAS_OHCI is not set
533# CONFIG_USB_ARCH_HAS_EHCI is not set
534
535#
536# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
537#
538
539#
540# USB Gadget Support
541#
542# CONFIG_USB_GADGET is not set
543
544#
545# MMC/SD Card support
546#
547# CONFIG_MMC is not set 412# CONFIG_MMC is not set
548
549#
550# LED devices
551#
552# CONFIG_NEW_LEDS is not set 413# CONFIG_NEW_LEDS is not set
414CONFIG_RTC_LIB=y
415CONFIG_RTC_CLASS=y
416CONFIG_RTC_HCTOSYS=y
417CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
418# CONFIG_RTC_DEBUG is not set
553 419
554# 420#
555# LED drivers 421# RTC interfaces
556# 422#
423CONFIG_RTC_INTF_SYSFS=y
424CONFIG_RTC_INTF_PROC=y
425CONFIG_RTC_INTF_DEV=y
426# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
427# CONFIG_RTC_DRV_TEST is not set
557 428
558# 429#
559# LED Triggers 430# SPI RTC drivers
560# 431#
561 432
562# 433#
563# InfiniBand support 434# Platform RTC drivers
564# 435#
436# CONFIG_RTC_DRV_CMOS is not set
437# CONFIG_RTC_DRV_DS1553 is not set
438# CONFIG_RTC_DRV_STK17TA8 is not set
439# CONFIG_RTC_DRV_DS1742 is not set
440# CONFIG_RTC_DRV_M48T86 is not set
441# CONFIG_RTC_DRV_M48T59 is not set
442# CONFIG_RTC_DRV_V3020 is not set
565 443
566# 444#
567# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 445# on-CPU RTC drivers
568# 446#
569 447CONFIG_RTC_DRV_VR41XX=y
570#
571# Real Time Clock
572#
573# CONFIG_RTC_CLASS is not set
574 448
575# 449#
576# DMA Engine support 450# DMA Engine support
@@ -586,12 +460,9 @@ CONFIG_HID=y
586# 460#
587 461
588# 462#
589# Auxiliary Display support 463# Userspace I/O
590#
591
592#
593# Virtualization
594# 464#
465# CONFIG_UIO is not set
595 466
596# 467#
597# File systems 468# File systems
@@ -599,8 +470,14 @@ CONFIG_HID=y
599CONFIG_EXT2_FS=y 470CONFIG_EXT2_FS=y
600# CONFIG_EXT2_FS_XATTR is not set 471# CONFIG_EXT2_FS_XATTR is not set
601# CONFIG_EXT2_FS_XIP is not set 472# CONFIG_EXT2_FS_XIP is not set
602# CONFIG_EXT3_FS is not set 473CONFIG_EXT3_FS=y
474CONFIG_EXT3_FS_XATTR=y
475# CONFIG_EXT3_FS_POSIX_ACL is not set
476# CONFIG_EXT3_FS_SECURITY is not set
603# CONFIG_EXT4DEV_FS is not set 477# CONFIG_EXT4DEV_FS is not set
478CONFIG_JBD=y
479# CONFIG_JBD_DEBUG is not set
480CONFIG_FS_MBCACHE=y
604# CONFIG_REISERFS_FS is not set 481# CONFIG_REISERFS_FS is not set
605# CONFIG_JFS_FS is not set 482# CONFIG_JFS_FS is not set
606CONFIG_FS_POSIX_ACL=y 483CONFIG_FS_POSIX_ACL=y
@@ -614,7 +491,7 @@ CONFIG_INOTIFY_USER=y
614CONFIG_DNOTIFY=y 491CONFIG_DNOTIFY=y
615# CONFIG_AUTOFS_FS is not set 492# CONFIG_AUTOFS_FS is not set
616CONFIG_AUTOFS4_FS=y 493CONFIG_AUTOFS4_FS=y
617CONFIG_FUSE_FS=m 494# CONFIG_FUSE_FS is not set
618CONFIG_GENERIC_ACL=y 495CONFIG_GENERIC_ACL=y
619 496
620# 497#
@@ -687,7 +564,6 @@ CONFIG_ENABLE_MUST_CHECK=y
687# CONFIG_DEBUG_FS is not set 564# CONFIG_DEBUG_FS is not set
688# CONFIG_HEADERS_CHECK is not set 565# CONFIG_HEADERS_CHECK is not set
689# CONFIG_DEBUG_KERNEL is not set 566# CONFIG_DEBUG_KERNEL is not set
690CONFIG_LOG_BUF_SHIFT=14
691CONFIG_CROSSCOMPILE=y 567CONFIG_CROSSCOMPILE=y
692CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x1f0,0x3f6,40 mem=8M" 568CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x1f0,0x3f6,40 mem=8M"
693 569
@@ -696,10 +572,6 @@ CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x1f0,0x3f6,40 mem=8M"
696# 572#
697# CONFIG_KEYS is not set 573# CONFIG_KEYS is not set
698# CONFIG_SECURITY is not set 574# CONFIG_SECURITY is not set
699
700#
701# Cryptographic options
702#
703# CONFIG_CRYPTO is not set 575# CONFIG_CRYPTO is not set
704 576
705# 577#
@@ -707,8 +579,11 @@ CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x1f0,0x3f6,40 mem=8M"
707# 579#
708# CONFIG_CRC_CCITT is not set 580# CONFIG_CRC_CCITT is not set
709# CONFIG_CRC16 is not set 581# CONFIG_CRC16 is not set
582# CONFIG_CRC_ITU_T is not set
710# CONFIG_CRC32 is not set 583# CONFIG_CRC32 is not set
584# CONFIG_CRC7 is not set
711# CONFIG_LIBCRC32C is not set 585# CONFIG_LIBCRC32C is not set
712CONFIG_PLIST=y 586CONFIG_PLIST=y
713CONFIG_HAS_IOMEM=y 587CONFIG_HAS_IOMEM=y
714CONFIG_HAS_IOPORT=y 588CONFIG_HAS_IOPORT=y
589CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig
index 934d8a0089..670039bb1a 100644
--- a/arch/mips/configs/ip22_defconfig
+++ b/arch/mips/configs/ip22_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20 3# Linux kernel version: 2.6.23-rc2
4# Tue Feb 20 21:47:32 2007 4# Tue Aug 7 12:39:49 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -9,52 +9,40 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
12# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MACH_ALCHEMY is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 13# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 14# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 15# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 16# CONFIG_MACH_JAZZ is not set
17# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 18# CONFIG_MIPS_ATLAS is not set
30# CONFIG_MIPS_MALTA is not set 19# CONFIG_MIPS_MALTA is not set
31# CONFIG_MIPS_SEAD is not set 20# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 21# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 22# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 23# CONFIG_MACH_VR41XX is not set
36# CONFIG_PNX8550_JBS is not set 24# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 25# CONFIG_PNX8550_STB810 is not set
38# CONFIG_MACH_VR41XX is not set 26# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 27# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_QEMU is not set 28# CONFIG_QEMU is not set
41# CONFIG_MARKEINS is not set
42CONFIG_SGI_IP22=y 29CONFIG_SGI_IP22=y
43# CONFIG_SGI_IP27 is not set 30# CONFIG_SGI_IP27 is not set
44# CONFIG_SGI_IP32 is not set 31# CONFIG_SGI_IP32 is not set
45# CONFIG_SIBYTE_BIGSUR is not set 32# CONFIG_SIBYTE_CRHINE is not set
33# CONFIG_SIBYTE_CARMEL is not set
34# CONFIG_SIBYTE_CRHONE is not set
35# CONFIG_SIBYTE_RHONE is not set
46# CONFIG_SIBYTE_SWARM is not set 36# CONFIG_SIBYTE_SWARM is not set
37# CONFIG_SIBYTE_LITTLESUR is not set
47# CONFIG_SIBYTE_SENTOSA is not set 38# CONFIG_SIBYTE_SENTOSA is not set
48# CONFIG_SIBYTE_RHONE is not set
49# CONFIG_SIBYTE_CARMEL is not set
50# CONFIG_SIBYTE_PTSWARM is not set 39# CONFIG_SIBYTE_PTSWARM is not set
51# CONFIG_SIBYTE_LITTLESUR is not set 40# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_CRHINE is not set
53# CONFIG_SIBYTE_CRHONE is not set
54# CONFIG_SNI_RM is not set 41# CONFIG_SNI_RM is not set
55# CONFIG_TOSHIBA_JMR3927 is not set 42# CONFIG_TOSHIBA_JMR3927 is not set
56# CONFIG_TOSHIBA_RBTX4927 is not set 43# CONFIG_TOSHIBA_RBTX4927 is not set
57# CONFIG_TOSHIBA_RBTX4938 is not set 44# CONFIG_TOSHIBA_RBTX4938 is not set
45# CONFIG_WR_PPMC is not set
58CONFIG_RWSEM_GENERIC_SPINLOCK=y 46CONFIG_RWSEM_GENERIC_SPINLOCK=y
59# CONFIG_ARCH_HAS_ILOG2_U32 is not set 47# CONFIG_ARCH_HAS_ILOG2_U32 is not set
60# CONFIG_ARCH_HAS_ILOG2_U64 is not set 48# CONFIG_ARCH_HAS_ILOG2_U64 is not set
@@ -67,6 +55,9 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
67CONFIG_ARC=y 55CONFIG_ARC=y
68CONFIG_DMA_NONCOHERENT=y 56CONFIG_DMA_NONCOHERENT=y
69CONFIG_DMA_NEED_PCI_MAP_STATE=y 57CONFIG_DMA_NEED_PCI_MAP_STATE=y
58CONFIG_EARLY_PRINTK=y
59CONFIG_SYS_HAS_EARLY_PRINTK=y
60# CONFIG_NO_IOPORT is not set
70CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN=y 61CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN=y
71CONFIG_CPU_BIG_ENDIAN=y 62CONFIG_CPU_BIG_ENDIAN=y
72# CONFIG_CPU_LITTLE_ENDIAN is not set 63# CONFIG_CPU_LITTLE_ENDIAN is not set
@@ -82,6 +73,7 @@ CONFIG_ARC_PROMLIB=y
82# 73#
83# CPU selection 74# CPU selection
84# 75#
76# CONFIG_CPU_LOONGSON2 is not set
85# CONFIG_CPU_MIPS32_R1 is not set 77# CONFIG_CPU_MIPS32_R1 is not set
86# CONFIG_CPU_MIPS32_R2 is not set 78# CONFIG_CPU_MIPS32_R2 is not set
87# CONFIG_CPU_MIPS64_R1 is not set 79# CONFIG_CPU_MIPS64_R1 is not set
@@ -122,8 +114,6 @@ CONFIG_IP22_CPU_SCACHE=y
122CONFIG_MIPS_MT_DISABLED=y 114CONFIG_MIPS_MT_DISABLED=y
123# CONFIG_MIPS_MT_SMP is not set 115# CONFIG_MIPS_MT_SMP is not set
124# CONFIG_MIPS_MT_SMTC is not set 116# CONFIG_MIPS_MT_SMTC is not set
125# CONFIG_MIPS_VPE_LOADER is not set
126# CONFIG_64BIT_PHYS_ADDR is not set
127CONFIG_CPU_HAS_LLSC=y 117CONFIG_CPU_HAS_LLSC=y
128CONFIG_CPU_HAS_SYNC=y 118CONFIG_CPU_HAS_SYNC=y
129CONFIG_GENERIC_HARDIRQS=y 119CONFIG_GENERIC_HARDIRQS=y
@@ -139,6 +129,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
139CONFIG_SPLIT_PTLOCK_CPUS=4 129CONFIG_SPLIT_PTLOCK_CPUS=4
140# CONFIG_RESOURCES_64BIT is not set 130# CONFIG_RESOURCES_64BIT is not set
141CONFIG_ZONE_DMA_FLAG=1 131CONFIG_ZONE_DMA_FLAG=1
132CONFIG_BOUNCE=y
133CONFIG_VIRT_TO_BUS=y
142# CONFIG_HZ_48 is not set 134# CONFIG_HZ_48 is not set
143# CONFIG_HZ_100 is not set 135# CONFIG_HZ_100 is not set
144# CONFIG_HZ_128 is not set 136# CONFIG_HZ_128 is not set
@@ -152,35 +144,33 @@ CONFIG_HZ=1000
152CONFIG_PREEMPT_VOLUNTARY=y 144CONFIG_PREEMPT_VOLUNTARY=y
153# CONFIG_PREEMPT is not set 145# CONFIG_PREEMPT is not set
154# CONFIG_KEXEC is not set 146# CONFIG_KEXEC is not set
147CONFIG_SECCOMP=y
155CONFIG_LOCKDEP_SUPPORT=y 148CONFIG_LOCKDEP_SUPPORT=y
156CONFIG_STACKTRACE_SUPPORT=y 149CONFIG_STACKTRACE_SUPPORT=y
157CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 150CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
158 151
159# 152#
160# Code maturity level options 153# General setup
161# 154#
162CONFIG_EXPERIMENTAL=y 155CONFIG_EXPERIMENTAL=y
163CONFIG_BROKEN_ON_SMP=y 156CONFIG_BROKEN_ON_SMP=y
164CONFIG_INIT_ENV_ARG_LIMIT=32 157CONFIG_INIT_ENV_ARG_LIMIT=32
165
166#
167# General setup
168#
169CONFIG_LOCALVERSION="" 158CONFIG_LOCALVERSION=""
170CONFIG_LOCALVERSION_AUTO=y 159CONFIG_LOCALVERSION_AUTO=y
171CONFIG_SWAP=y 160CONFIG_SWAP=y
172CONFIG_SYSVIPC=y 161CONFIG_SYSVIPC=y
173# CONFIG_IPC_NS is not set
174CONFIG_SYSVIPC_SYSCTL=y 162CONFIG_SYSVIPC_SYSCTL=y
175# CONFIG_POSIX_MQUEUE is not set 163# CONFIG_POSIX_MQUEUE is not set
176# CONFIG_BSD_PROCESS_ACCT is not set 164# CONFIG_BSD_PROCESS_ACCT is not set
177# CONFIG_TASKSTATS is not set 165# CONFIG_TASKSTATS is not set
178# CONFIG_UTS_NS is not set 166# CONFIG_USER_NS is not set
179# CONFIG_AUDIT is not set 167# CONFIG_AUDIT is not set
180CONFIG_IKCONFIG=y 168CONFIG_IKCONFIG=y
181CONFIG_IKCONFIG_PROC=y 169CONFIG_IKCONFIG_PROC=y
170CONFIG_LOG_BUF_SHIFT=14
182CONFIG_SYSFS_DEPRECATED=y 171CONFIG_SYSFS_DEPRECATED=y
183CONFIG_RELAY=y 172CONFIG_RELAY=y
173# CONFIG_BLK_DEV_INITRD is not set
184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 174# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
185CONFIG_SYSCTL=y 175CONFIG_SYSCTL=y
186CONFIG_EMBEDDED=y 176CONFIG_EMBEDDED=y
@@ -193,32 +183,30 @@ CONFIG_BUG=y
193CONFIG_ELF_CORE=y 183CONFIG_ELF_CORE=y
194CONFIG_BASE_FULL=y 184CONFIG_BASE_FULL=y
195CONFIG_FUTEX=y 185CONFIG_FUTEX=y
186CONFIG_ANON_INODES=y
196CONFIG_EPOLL=y 187CONFIG_EPOLL=y
188CONFIG_SIGNALFD=y
189CONFIG_TIMERFD=y
190CONFIG_EVENTFD=y
197CONFIG_SHMEM=y 191CONFIG_SHMEM=y
198CONFIG_SLAB=y
199CONFIG_VM_EVENT_COUNTERS=y 192CONFIG_VM_EVENT_COUNTERS=y
193CONFIG_SLAB=y
194# CONFIG_SLUB is not set
195# CONFIG_SLOB is not set
200CONFIG_RT_MUTEXES=y 196CONFIG_RT_MUTEXES=y
201# CONFIG_TINY_SHMEM is not set 197# CONFIG_TINY_SHMEM is not set
202CONFIG_BASE_SMALL=0 198CONFIG_BASE_SMALL=0
203# CONFIG_SLOB is not set
204
205#
206# Loadable module support
207#
208CONFIG_MODULES=y 199CONFIG_MODULES=y
209CONFIG_MODULE_UNLOAD=y 200CONFIG_MODULE_UNLOAD=y
210# CONFIG_MODULE_FORCE_UNLOAD is not set 201# CONFIG_MODULE_FORCE_UNLOAD is not set
211CONFIG_MODVERSIONS=y 202CONFIG_MODVERSIONS=y
212CONFIG_MODULE_SRCVERSION_ALL=y 203CONFIG_MODULE_SRCVERSION_ALL=y
213CONFIG_KMOD=y 204CONFIG_KMOD=y
214
215#
216# Block layer
217#
218CONFIG_BLOCK=y 205CONFIG_BLOCK=y
219# CONFIG_LBD is not set 206# CONFIG_LBD is not set
220# CONFIG_BLK_DEV_IO_TRACE is not set 207# CONFIG_BLK_DEV_IO_TRACE is not set
221# CONFIG_LSF is not set 208# CONFIG_LSF is not set
209# CONFIG_BLK_DEV_BSG is not set
222 210
223# 211#
224# IO Schedulers 212# IO Schedulers
@@ -237,6 +225,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
237# Bus options (PCI, PCMCIA, EISA, ISA, TC) 225# Bus options (PCI, PCMCIA, EISA, ISA, TC)
238# 226#
239CONFIG_HW_HAS_EISA=y 227CONFIG_HW_HAS_EISA=y
228# CONFIG_ARCH_SUPPORTS_MSI is not set
240# CONFIG_EISA is not set 229# CONFIG_EISA is not set
241CONFIG_MMU=y 230CONFIG_MMU=y
242 231
@@ -245,10 +234,6 @@ CONFIG_MMU=y
245# 234#
246 235
247# 236#
248# PCI Hotplug Support
249#
250
251#
252# Executable file formats 237# Executable file formats
253# 238#
254CONFIG_BINFMT_ELF=y 239CONFIG_BINFMT_ELF=y
@@ -261,7 +246,7 @@ CONFIG_TRAD_SIGNALS=y
261CONFIG_PM=y 246CONFIG_PM=y
262# CONFIG_PM_LEGACY is not set 247# CONFIG_PM_LEGACY is not set
263# CONFIG_PM_DEBUG is not set 248# CONFIG_PM_DEBUG is not set
264# CONFIG_PM_SYSFS_DEPRECATED is not set 249# CONFIG_SUSPEND is not set
265 250
266# 251#
267# Networking 252# Networking
@@ -271,7 +256,6 @@ CONFIG_NET=y
271# 256#
272# Networking options 257# Networking options
273# 258#
274# CONFIG_NETDEBUG is not set
275CONFIG_PACKET=y 259CONFIG_PACKET=y
276CONFIG_PACKET_MMAP=y 260CONFIG_PACKET_MMAP=y
277CONFIG_UNIX=y 261CONFIG_UNIX=y
@@ -308,10 +292,6 @@ CONFIG_INET_TCP_DIAG=y
308CONFIG_TCP_CONG_CUBIC=y 292CONFIG_TCP_CONG_CUBIC=y
309CONFIG_DEFAULT_TCP_CONG="cubic" 293CONFIG_DEFAULT_TCP_CONG="cubic"
310CONFIG_TCP_MD5SIG=y 294CONFIG_TCP_MD5SIG=y
311
312#
313# IP: Virtual Server Configuration
314#
315CONFIG_IP_VS=m 295CONFIG_IP_VS=m
316# CONFIG_IP_VS_DEBUG is not set 296# CONFIG_IP_VS_DEBUG is not set
317CONFIG_IP_VS_TAB_BITS=12 297CONFIG_IP_VS_TAB_BITS=12
@@ -346,10 +326,11 @@ CONFIG_IPV6=m
346CONFIG_IPV6_PRIVACY=y 326CONFIG_IPV6_PRIVACY=y
347CONFIG_IPV6_ROUTER_PREF=y 327CONFIG_IPV6_ROUTER_PREF=y
348CONFIG_IPV6_ROUTE_INFO=y 328CONFIG_IPV6_ROUTE_INFO=y
329CONFIG_IPV6_OPTIMISTIC_DAD=y
349CONFIG_INET6_AH=m 330CONFIG_INET6_AH=m
350CONFIG_INET6_ESP=m 331CONFIG_INET6_ESP=m
351CONFIG_INET6_IPCOMP=m 332CONFIG_INET6_IPCOMP=m
352CONFIG_IPV6_MIP6=y 333CONFIG_IPV6_MIP6=m
353CONFIG_INET6_XFRM_TUNNEL=m 334CONFIG_INET6_XFRM_TUNNEL=m
354CONFIG_INET6_TUNNEL=m 335CONFIG_INET6_TUNNEL=m
355CONFIG_INET6_XFRM_MODE_TRANSPORT=m 336CONFIG_INET6_XFRM_MODE_TRANSPORT=m
@@ -371,8 +352,6 @@ CONFIG_NETFILTER_NETLINK=m
371CONFIG_NETFILTER_NETLINK_QUEUE=m 352CONFIG_NETFILTER_NETLINK_QUEUE=m
372CONFIG_NETFILTER_NETLINK_LOG=m 353CONFIG_NETFILTER_NETLINK_LOG=m
373CONFIG_NF_CONNTRACK_ENABLED=m 354CONFIG_NF_CONNTRACK_ENABLED=m
374CONFIG_NF_CONNTRACK_SUPPORT=y
375# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
376CONFIG_NF_CONNTRACK=m 355CONFIG_NF_CONNTRACK=m
377CONFIG_NF_CT_ACCT=y 356CONFIG_NF_CT_ACCT=y
378CONFIG_NF_CONNTRACK_MARK=y 357CONFIG_NF_CONNTRACK_MARK=y
@@ -380,6 +359,7 @@ CONFIG_NF_CONNTRACK_SECMARK=y
380CONFIG_NF_CONNTRACK_EVENTS=y 359CONFIG_NF_CONNTRACK_EVENTS=y
381CONFIG_NF_CT_PROTO_GRE=m 360CONFIG_NF_CT_PROTO_GRE=m
382CONFIG_NF_CT_PROTO_SCTP=m 361CONFIG_NF_CT_PROTO_SCTP=m
362CONFIG_NF_CT_PROTO_UDPLITE=m
383CONFIG_NF_CONNTRACK_AMANDA=m 363CONFIG_NF_CONNTRACK_AMANDA=m
384CONFIG_NF_CONNTRACK_FTP=m 364CONFIG_NF_CONNTRACK_FTP=m
385CONFIG_NF_CONNTRACK_H323=m 365CONFIG_NF_CONNTRACK_H323=m
@@ -398,11 +378,13 @@ CONFIG_NETFILTER_XT_TARGET_MARK=m
398CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 378CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
399CONFIG_NETFILTER_XT_TARGET_NFLOG=m 379CONFIG_NETFILTER_XT_TARGET_NFLOG=m
400CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 380CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
381CONFIG_NETFILTER_XT_TARGET_TRACE=m
401CONFIG_NETFILTER_XT_TARGET_SECMARK=m 382CONFIG_NETFILTER_XT_TARGET_SECMARK=m
402CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m 383CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
403CONFIG_NETFILTER_XT_TARGET_TCPMSS=m 384CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
404CONFIG_NETFILTER_XT_MATCH_COMMENT=m 385CONFIG_NETFILTER_XT_MATCH_COMMENT=m
405CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 386CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
387CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
406CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 388CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
407CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 389CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
408CONFIG_NETFILTER_XT_MATCH_DCCP=m 390CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -423,6 +405,7 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
423CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 405CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
424CONFIG_NETFILTER_XT_MATCH_STRING=m 406CONFIG_NETFILTER_XT_MATCH_STRING=m
425CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 407CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
408CONFIG_NETFILTER_XT_MATCH_U32=m
426CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m 409CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
427 410
428# 411#
@@ -490,25 +473,13 @@ CONFIG_IP6_NF_TARGET_REJECT=m
490CONFIG_IP6_NF_MANGLE=m 473CONFIG_IP6_NF_MANGLE=m
491CONFIG_IP6_NF_TARGET_HL=m 474CONFIG_IP6_NF_TARGET_HL=m
492CONFIG_IP6_NF_RAW=m 475CONFIG_IP6_NF_RAW=m
493
494#
495# DCCP Configuration (EXPERIMENTAL)
496#
497# CONFIG_IP_DCCP is not set 476# CONFIG_IP_DCCP is not set
498
499#
500# SCTP Configuration (EXPERIMENTAL)
501#
502CONFIG_IP_SCTP=m 477CONFIG_IP_SCTP=m
503# CONFIG_SCTP_DBG_MSG is not set 478# CONFIG_SCTP_DBG_MSG is not set
504# CONFIG_SCTP_DBG_OBJCNT is not set 479# CONFIG_SCTP_DBG_OBJCNT is not set
505# CONFIG_SCTP_HMAC_NONE is not set 480# CONFIG_SCTP_HMAC_NONE is not set
506# CONFIG_SCTP_HMAC_SHA1 is not set 481# CONFIG_SCTP_HMAC_SHA1 is not set
507CONFIG_SCTP_HMAC_MD5=y 482CONFIG_SCTP_HMAC_MD5=y
508
509#
510# TIPC Configuration (EXPERIMENTAL)
511#
512# CONFIG_TIPC is not set 483# CONFIG_TIPC is not set
513# CONFIG_ATM is not set 484# CONFIG_ATM is not set
514# CONFIG_BRIDGE is not set 485# CONFIG_BRIDGE is not set
@@ -527,9 +498,6 @@ CONFIG_SCTP_HMAC_MD5=y
527# 498#
528CONFIG_NET_SCHED=y 499CONFIG_NET_SCHED=y
529CONFIG_NET_SCH_FIFO=y 500CONFIG_NET_SCH_FIFO=y
530# CONFIG_NET_SCH_CLK_JIFFIES is not set
531CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
532# CONFIG_NET_SCH_CLK_CPU is not set
533 501
534# 502#
535# Queueing/Scheduling 503# Queueing/Scheduling
@@ -538,6 +506,7 @@ CONFIG_NET_SCH_CBQ=m
538CONFIG_NET_SCH_HTB=m 506CONFIG_NET_SCH_HTB=m
539CONFIG_NET_SCH_HFSC=m 507CONFIG_NET_SCH_HFSC=m
540CONFIG_NET_SCH_PRIO=m 508CONFIG_NET_SCH_PRIO=m
509CONFIG_NET_SCH_RR=m
541CONFIG_NET_SCH_RED=m 510CONFIG_NET_SCH_RED=m
542CONFIG_NET_SCH_SFQ=m 511CONFIG_NET_SCH_SFQ=m
543CONFIG_NET_SCH_TEQL=m 512CONFIG_NET_SCH_TEQL=m
@@ -562,10 +531,16 @@ CONFIG_NET_CLS_U32=m
562CONFIG_NET_CLS_RSVP=m 531CONFIG_NET_CLS_RSVP=m
563CONFIG_NET_CLS_RSVP6=m 532CONFIG_NET_CLS_RSVP6=m
564# CONFIG_NET_EMATCH is not set 533# CONFIG_NET_EMATCH is not set
565# CONFIG_NET_CLS_ACT is not set 534CONFIG_NET_CLS_ACT=y
535CONFIG_NET_ACT_POLICE=y
536CONFIG_NET_ACT_GACT=m
537CONFIG_GACT_PROB=y
538CONFIG_NET_ACT_MIRRED=m
539CONFIG_NET_ACT_IPT=m
540CONFIG_NET_ACT_PEDIT=m
541CONFIG_NET_ACT_SIMP=m
566CONFIG_NET_CLS_POLICE=y 542CONFIG_NET_CLS_POLICE=y
567# CONFIG_NET_CLS_IND is not set 543# CONFIG_NET_CLS_IND is not set
568CONFIG_NET_ESTIMATOR=y
569 544
570# 545#
571# Network testing 546# Network testing
@@ -574,14 +549,26 @@ CONFIG_NET_ESTIMATOR=y
574# CONFIG_HAMRADIO is not set 549# CONFIG_HAMRADIO is not set
575# CONFIG_IRDA is not set 550# CONFIG_IRDA is not set
576# CONFIG_BT is not set 551# CONFIG_BT is not set
552# CONFIG_AF_RXRPC is not set
553CONFIG_FIB_RULES=y
554
555#
556# Wireless
557#
558CONFIG_CFG80211=m
559CONFIG_WIRELESS_EXT=y
560CONFIG_MAC80211=m
561# CONFIG_MAC80211_DEBUG is not set
577CONFIG_IEEE80211=m 562CONFIG_IEEE80211=m
578# CONFIG_IEEE80211_DEBUG is not set 563# CONFIG_IEEE80211_DEBUG is not set
579CONFIG_IEEE80211_CRYPT_WEP=m 564CONFIG_IEEE80211_CRYPT_WEP=m
580CONFIG_IEEE80211_CRYPT_CCMP=m 565CONFIG_IEEE80211_CRYPT_CCMP=m
566CONFIG_IEEE80211_CRYPT_TKIP=m
581CONFIG_IEEE80211_SOFTMAC=m 567CONFIG_IEEE80211_SOFTMAC=m
582# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 568# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
583CONFIG_WIRELESS_EXT=y 569CONFIG_RFKILL=m
584CONFIG_FIB_RULES=y 570CONFIG_RFKILL_INPUT=m
571# CONFIG_NET_9P is not set
585 572
586# 573#
587# Device Drivers 574# Device Drivers
@@ -593,47 +580,19 @@ CONFIG_FIB_RULES=y
593CONFIG_STANDALONE=y 580CONFIG_STANDALONE=y
594CONFIG_PREVENT_FIRMWARE_BUILD=y 581CONFIG_PREVENT_FIRMWARE_BUILD=y
595# CONFIG_SYS_HYPERVISOR is not set 582# CONFIG_SYS_HYPERVISOR is not set
596
597#
598# Connector - unified userspace <-> kernelspace linker
599#
600CONFIG_CONNECTOR=m 583CONFIG_CONNECTOR=m
601
602#
603# Memory Technology Devices (MTD)
604#
605# CONFIG_MTD is not set 584# CONFIG_MTD is not set
606
607#
608# Parallel port support
609#
610# CONFIG_PARPORT is not set 585# CONFIG_PARPORT is not set
611 586CONFIG_BLK_DEV=y
612#
613# Plug and Play support
614#
615# CONFIG_PNPACPI is not set
616
617#
618# Block devices
619#
620# CONFIG_BLK_DEV_COW_COMMON is not set 587# CONFIG_BLK_DEV_COW_COMMON is not set
621# CONFIG_BLK_DEV_LOOP is not set 588# CONFIG_BLK_DEV_LOOP is not set
622# CONFIG_BLK_DEV_NBD is not set 589# CONFIG_BLK_DEV_NBD is not set
623# CONFIG_BLK_DEV_RAM is not set 590# CONFIG_BLK_DEV_RAM is not set
624# CONFIG_BLK_DEV_INITRD is not set
625CONFIG_CDROM_PKTCDVD=m 591CONFIG_CDROM_PKTCDVD=m
626CONFIG_CDROM_PKTCDVD_BUFFERS=8 592CONFIG_CDROM_PKTCDVD_BUFFERS=8
627# CONFIG_CDROM_PKTCDVD_WCACHE is not set 593# CONFIG_CDROM_PKTCDVD_WCACHE is not set
628CONFIG_ATA_OVER_ETH=m 594CONFIG_ATA_OVER_ETH=m
629 595# CONFIG_MISC_DEVICES is not set
630#
631# Misc devices
632#
633
634#
635# ATA/ATAPI/MFM/RLL support
636#
637# CONFIG_IDE is not set 596# CONFIG_IDE is not set
638 597
639# 598#
@@ -641,6 +600,7 @@ CONFIG_ATA_OVER_ETH=m
641# 600#
642CONFIG_RAID_ATTRS=m 601CONFIG_RAID_ATTRS=m
643CONFIG_SCSI=y 602CONFIG_SCSI=y
603CONFIG_SCSI_DMA=y
644CONFIG_SCSI_TGT=m 604CONFIG_SCSI_TGT=m
645# CONFIG_SCSI_NETLINK is not set 605# CONFIG_SCSI_NETLINK is not set
646CONFIG_SCSI_PROC_FS=y 606CONFIG_SCSI_PROC_FS=y
@@ -663,6 +623,7 @@ CONFIG_CHR_DEV_SCH=m
663CONFIG_SCSI_CONSTANTS=y 623CONFIG_SCSI_CONSTANTS=y
664# CONFIG_SCSI_LOGGING is not set 624# CONFIG_SCSI_LOGGING is not set
665CONFIG_SCSI_SCAN_ASYNC=y 625CONFIG_SCSI_SCAN_ASYNC=y
626CONFIG_SCSI_WAIT_SCAN=m
666 627
667# 628#
668# SCSI Transports 629# SCSI Transports
@@ -670,51 +631,21 @@ CONFIG_SCSI_SCAN_ASYNC=y
670CONFIG_SCSI_SPI_ATTRS=m 631CONFIG_SCSI_SPI_ATTRS=m
671# CONFIG_SCSI_FC_ATTRS is not set 632# CONFIG_SCSI_FC_ATTRS is not set
672CONFIG_SCSI_ISCSI_ATTRS=m 633CONFIG_SCSI_ISCSI_ATTRS=m
673CONFIG_SCSI_SAS_ATTRS=m
674# CONFIG_SCSI_SAS_LIBSAS is not set 634# CONFIG_SCSI_SAS_LIBSAS is not set
675 635CONFIG_SCSI_LOWLEVEL=y
676#
677# SCSI low-level drivers
678#
679CONFIG_ISCSI_TCP=m 636CONFIG_ISCSI_TCP=m
680CONFIG_SGIWD93_SCSI=y 637CONFIG_SGIWD93_SCSI=y
681# CONFIG_SCSI_DEBUG is not set 638# CONFIG_SCSI_DEBUG is not set
682
683#
684# Serial ATA (prod) and Parallel ATA (experimental) drivers
685#
686# CONFIG_ATA is not set 639# CONFIG_ATA is not set
687
688#
689# Multi-device support (RAID and LVM)
690#
691# CONFIG_MD is not set 640# CONFIG_MD is not set
692
693#
694# Fusion MPT device support
695#
696# CONFIG_FUSION is not set
697
698#
699# IEEE 1394 (FireWire) support
700#
701
702#
703# I2O device support
704#
705
706#
707# Network device support
708#
709CONFIG_NETDEVICES=y 641CONFIG_NETDEVICES=y
642# CONFIG_NETDEVICES_MULTIQUEUE is not set
643# CONFIG_IFB is not set
710CONFIG_DUMMY=m 644CONFIG_DUMMY=m
711CONFIG_BONDING=m 645CONFIG_BONDING=m
646CONFIG_MACVLAN=m
712CONFIG_EQUALIZER=m 647CONFIG_EQUALIZER=m
713CONFIG_TUN=m 648CONFIG_TUN=m
714
715#
716# PHY device support
717#
718CONFIG_PHYLIB=m 649CONFIG_PHYLIB=m
719 650
720# 651#
@@ -728,36 +659,25 @@ CONFIG_CICADA_PHY=m
728# CONFIG_VITESSE_PHY is not set 659# CONFIG_VITESSE_PHY is not set
729# CONFIG_SMSC_PHY is not set 660# CONFIG_SMSC_PHY is not set
730# CONFIG_BROADCOM_PHY is not set 661# CONFIG_BROADCOM_PHY is not set
662# CONFIG_ICPLUS_PHY is not set
731# CONFIG_FIXED_PHY is not set 663# CONFIG_FIXED_PHY is not set
732
733#
734# Ethernet (10 or 100Mbit)
735#
736CONFIG_NET_ETHERNET=y 664CONFIG_NET_ETHERNET=y
737# CONFIG_MII is not set 665# CONFIG_MII is not set
666# CONFIG_AX88796 is not set
738# CONFIG_DM9000 is not set 667# CONFIG_DM9000 is not set
739CONFIG_SGISEEQ=y 668CONFIG_SGISEEQ=y
669# CONFIG_NETDEV_1000 is not set
670# CONFIG_NETDEV_10000 is not set
740 671
741# 672#
742# Ethernet (1000 Mbit) 673# Wireless LAN
743#
744
745#
746# Ethernet (10000 Mbit)
747#
748
749#
750# Token Ring devices
751#
752
753#
754# Wireless LAN (non-hamradio)
755#
756# CONFIG_NET_RADIO is not set
757
758#
759# Wan interfaces
760# 674#
675CONFIG_WLAN_PRE80211=y
676CONFIG_STRIP=m
677CONFIG_WLAN_80211=y
678# CONFIG_LIBERTAS is not set
679CONFIG_HOSTAP=m
680# CONFIG_HOSTAP_FIRMWARE is not set
761# CONFIG_WAN is not set 681# CONFIG_WAN is not set
762# CONFIG_PPP is not set 682# CONFIG_PPP is not set
763# CONFIG_SLIP is not set 683# CONFIG_SLIP is not set
@@ -765,15 +685,7 @@ CONFIG_SGISEEQ=y
765# CONFIG_NETCONSOLE is not set 685# CONFIG_NETCONSOLE is not set
766# CONFIG_NETPOLL is not set 686# CONFIG_NETPOLL is not set
767# CONFIG_NET_POLL_CONTROLLER is not set 687# CONFIG_NET_POLL_CONTROLLER is not set
768
769#
770# ISDN subsystem
771#
772# CONFIG_ISDN is not set 688# CONFIG_ISDN is not set
773
774#
775# Telephony Support
776#
777# CONFIG_PHONE is not set 689# CONFIG_PHONE is not set
778 690
779# 691#
@@ -781,6 +693,7 @@ CONFIG_SGISEEQ=y
781# 693#
782CONFIG_INPUT=y 694CONFIG_INPUT=y
783# CONFIG_INPUT_FF_MEMLESS is not set 695# CONFIG_INPUT_FF_MEMLESS is not set
696# CONFIG_INPUT_POLLDEV is not set
784 697
785# 698#
786# Userland interfaces 699# Userland interfaces
@@ -806,9 +719,16 @@ CONFIG_KEYBOARD_ATKBD=y
806# CONFIG_KEYBOARD_STOWAWAY is not set 719# CONFIG_KEYBOARD_STOWAWAY is not set
807CONFIG_INPUT_MOUSE=y 720CONFIG_INPUT_MOUSE=y
808CONFIG_MOUSE_PS2=m 721CONFIG_MOUSE_PS2=m
722# CONFIG_MOUSE_PS2_ALPS is not set
723CONFIG_MOUSE_PS2_LOGIPS2PP=y
724# CONFIG_MOUSE_PS2_SYNAPTICS is not set
725# CONFIG_MOUSE_PS2_LIFEBOOK is not set
726CONFIG_MOUSE_PS2_TRACKPOINT=y
727# CONFIG_MOUSE_PS2_TOUCHKIT is not set
809CONFIG_MOUSE_SERIAL=m 728CONFIG_MOUSE_SERIAL=m
810# CONFIG_MOUSE_VSXXXAA is not set 729# CONFIG_MOUSE_VSXXXAA is not set
811# CONFIG_INPUT_JOYSTICK is not set 730# CONFIG_INPUT_JOYSTICK is not set
731# CONFIG_INPUT_TABLET is not set
812# CONFIG_INPUT_TOUCHSCREEN is not set 732# CONFIG_INPUT_TOUCHSCREEN is not set
813# CONFIG_INPUT_MISC is not set 733# CONFIG_INPUT_MISC is not set
814 734
@@ -844,15 +764,7 @@ CONFIG_SERIAL_CORE=m
844CONFIG_UNIX98_PTYS=y 764CONFIG_UNIX98_PTYS=y
845CONFIG_LEGACY_PTYS=y 765CONFIG_LEGACY_PTYS=y
846CONFIG_LEGACY_PTY_COUNT=256 766CONFIG_LEGACY_PTY_COUNT=256
847
848#
849# IPMI
850#
851# CONFIG_IPMI_HANDLER is not set 767# CONFIG_IPMI_HANDLER is not set
852
853#
854# Watchdog Cards
855#
856CONFIG_WATCHDOG=y 768CONFIG_WATCHDOG=y
857# CONFIG_WATCHDOG_NOWAYOUT is not set 769# CONFIG_WATCHDOG_NOWAYOUT is not set
858 770
@@ -864,20 +776,10 @@ CONFIG_INDYDOG=m
864# CONFIG_HW_RANDOM is not set 776# CONFIG_HW_RANDOM is not set
865# CONFIG_RTC is not set 777# CONFIG_RTC is not set
866CONFIG_SGI_DS1286=m 778CONFIG_SGI_DS1286=m
867# CONFIG_GEN_RTC is not set
868# CONFIG_DTLK is not set
869# CONFIG_R3964 is not set 779# CONFIG_R3964 is not set
870CONFIG_RAW_DRIVER=m 780CONFIG_RAW_DRIVER=m
871CONFIG_MAX_RAW_DEVS=256 781CONFIG_MAX_RAW_DEVS=256
872
873#
874# TPM devices
875#
876# CONFIG_TCG_TPM is not set 782# CONFIG_TCG_TPM is not set
877
878#
879# I2C support
880#
881# CONFIG_I2C is not set 783# CONFIG_I2C is not set
882 784
883# 785#
@@ -885,32 +787,33 @@ CONFIG_MAX_RAW_DEVS=256
885# 787#
886# CONFIG_SPI is not set 788# CONFIG_SPI is not set
887# CONFIG_SPI_MASTER is not set 789# CONFIG_SPI_MASTER is not set
888
889#
890# Dallas's 1-wire bus
891#
892# CONFIG_W1 is not set 790# CONFIG_W1 is not set
791# CONFIG_POWER_SUPPLY is not set
792# CONFIG_HWMON is not set
893 793
894# 794#
895# Hardware Monitoring support 795# Multifunction device drivers
896# 796#
897# CONFIG_HWMON is not set 797# CONFIG_MFD_SM501 is not set
898# CONFIG_HWMON_VID is not set
899 798
900# 799#
901# Multimedia devices 800# Multimedia devices
902# 801#
903# CONFIG_VIDEO_DEV is not set 802# CONFIG_VIDEO_DEV is not set
803# CONFIG_DVB_CORE is not set
804# CONFIG_DAB is not set
904 805
905# 806#
906# Digital Video Broadcasting Devices 807# Graphics support
907# 808#
908# CONFIG_DVB is not set 809# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
909 810
910# 811#
911# Graphics support 812# Display device support
912# 813#
913CONFIG_FIRMWARE_EDID=y 814# CONFIG_DISPLAY_SUPPORT is not set
815# CONFIG_VGASTATE is not set
816# CONFIG_VIDEO_OUTPUT_CONTROL is not set
914# CONFIG_FB is not set 817# CONFIG_FB is not set
915 818
916# 819#
@@ -920,31 +823,20 @@ CONFIG_FIRMWARE_EDID=y
920CONFIG_SGI_NEWPORT_CONSOLE=y 823CONFIG_SGI_NEWPORT_CONSOLE=y
921CONFIG_DUMMY_CONSOLE=y 824CONFIG_DUMMY_CONSOLE=y
922CONFIG_FONT_8x16=y 825CONFIG_FONT_8x16=y
923
924#
925# Logo configuration
926#
927CONFIG_LOGO=y 826CONFIG_LOGO=y
928# CONFIG_LOGO_LINUX_MONO is not set 827# CONFIG_LOGO_LINUX_MONO is not set
929# CONFIG_LOGO_LINUX_VGA16 is not set 828# CONFIG_LOGO_LINUX_VGA16 is not set
930# CONFIG_LOGO_LINUX_CLUT224 is not set 829# CONFIG_LOGO_LINUX_CLUT224 is not set
931CONFIG_LOGO_SGI_CLUT224=y 830CONFIG_LOGO_SGI_CLUT224=y
932# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
933 831
934# 832#
935# Sound 833# Sound
936# 834#
937# CONFIG_SOUND is not set 835# CONFIG_SOUND is not set
938 836CONFIG_HID_SUPPORT=y
939#
940# HID Devices
941#
942CONFIG_HID=y 837CONFIG_HID=y
943# CONFIG_HID_DEBUG is not set 838# CONFIG_HID_DEBUG is not set
944 839CONFIG_USB_SUPPORT=y
945#
946# USB support
947#
948# CONFIG_USB_ARCH_HAS_HCD is not set 840# CONFIG_USB_ARCH_HAS_HCD is not set
949# CONFIG_USB_ARCH_HAS_OHCI is not set 841# CONFIG_USB_ARCH_HAS_OHCI is not set
950# CONFIG_USB_ARCH_HAS_EHCI is not set 842# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -957,36 +849,8 @@ CONFIG_HID=y
957# USB Gadget Support 849# USB Gadget Support
958# 850#
959# CONFIG_USB_GADGET is not set 851# CONFIG_USB_GADGET is not set
960
961#
962# MMC/SD Card support
963#
964# CONFIG_MMC is not set 852# CONFIG_MMC is not set
965
966#
967# LED devices
968#
969# CONFIG_NEW_LEDS is not set 853# CONFIG_NEW_LEDS is not set
970
971#
972# LED drivers
973#
974
975#
976# LED Triggers
977#
978
979#
980# InfiniBand support
981#
982
983#
984# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
985#
986
987#
988# Real Time Clock
989#
990# CONFIG_RTC_CLASS is not set 854# CONFIG_RTC_CLASS is not set
991 855
992# 856#
@@ -1003,12 +867,9 @@ CONFIG_HID=y
1003# 867#
1004 868
1005# 869#
1006# Auxiliary Display support 870# Userspace I/O
1007#
1008
1009#
1010# Virtualization
1011# 871#
872# CONFIG_UIO is not set
1012 873
1013# 874#
1014# File systems 875# File systems
@@ -1121,6 +982,7 @@ CONFIG_NFS_ACL_SUPPORT=m
1121CONFIG_NFS_COMMON=y 982CONFIG_NFS_COMMON=y
1122CONFIG_SUNRPC=m 983CONFIG_SUNRPC=m
1123CONFIG_SUNRPC_GSS=m 984CONFIG_SUNRPC_GSS=m
985# CONFIG_SUNRPC_BIND34 is not set
1124CONFIG_RPCSEC_GSS_KRB5=m 986CONFIG_RPCSEC_GSS_KRB5=m
1125# CONFIG_RPCSEC_GSS_SPKM3 is not set 987# CONFIG_RPCSEC_GSS_SPKM3 is not set
1126CONFIG_SMB_FS=m 988CONFIG_SMB_FS=m
@@ -1136,7 +998,6 @@ CONFIG_CIFS=m
1136CONFIG_CODA_FS=m 998CONFIG_CODA_FS=m
1137# CONFIG_CODA_FS_OLD_API is not set 999# CONFIG_CODA_FS_OLD_API is not set
1138# CONFIG_AFS_FS is not set 1000# CONFIG_AFS_FS is not set
1139# CONFIG_9P_FS is not set
1140 1001
1141# 1002#
1142# Partition Types 1003# Partition Types
@@ -1158,6 +1019,7 @@ CONFIG_SGI_PARTITION=y
1158# CONFIG_SUN_PARTITION is not set 1019# CONFIG_SUN_PARTITION is not set
1159# CONFIG_KARMA_PARTITION is not set 1020# CONFIG_KARMA_PARTITION is not set
1160# CONFIG_EFI_PARTITION is not set 1021# CONFIG_EFI_PARTITION is not set
1022# CONFIG_SYSV68_PARTITION is not set
1161 1023
1162# 1024#
1163# Native Language Support 1025# Native Language Support
@@ -1207,8 +1069,6 @@ CONFIG_NLS_UTF8=m
1207# Distributed Lock Manager 1069# Distributed Lock Manager
1208# 1070#
1209CONFIG_DLM=m 1071CONFIG_DLM=m
1210CONFIG_DLM_TCP=y
1211# CONFIG_DLM_SCTP is not set
1212# CONFIG_DLM_DEBUG is not set 1072# CONFIG_DLM_DEBUG is not set
1213 1073
1214# 1074#
@@ -1227,7 +1087,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1227# CONFIG_DEBUG_FS is not set 1087# CONFIG_DEBUG_FS is not set
1228# CONFIG_HEADERS_CHECK is not set 1088# CONFIG_HEADERS_CHECK is not set
1229# CONFIG_DEBUG_KERNEL is not set 1089# CONFIG_DEBUG_KERNEL is not set
1230CONFIG_LOG_BUF_SHIFT=14
1231CONFIG_CROSSCOMPILE=y 1090CONFIG_CROSSCOMPILE=y
1232CONFIG_CMDLINE="" 1091CONFIG_CMDLINE=""
1233 1092
@@ -1237,12 +1096,9 @@ CONFIG_CMDLINE=""
1237CONFIG_KEYS=y 1096CONFIG_KEYS=y
1238CONFIG_KEYS_DEBUG_PROC_KEYS=y 1097CONFIG_KEYS_DEBUG_PROC_KEYS=y
1239# CONFIG_SECURITY is not set 1098# CONFIG_SECURITY is not set
1240
1241#
1242# Cryptographic options
1243#
1244CONFIG_CRYPTO=y 1099CONFIG_CRYPTO=y
1245CONFIG_CRYPTO_ALGAPI=y 1100CONFIG_CRYPTO_ALGAPI=y
1101CONFIG_CRYPTO_ABLKCIPHER=m
1246CONFIG_CRYPTO_BLKCIPHER=m 1102CONFIG_CRYPTO_BLKCIPHER=m
1247CONFIG_CRYPTO_HASH=y 1103CONFIG_CRYPTO_HASH=y
1248CONFIG_CRYPTO_MANAGER=y 1104CONFIG_CRYPTO_MANAGER=y
@@ -1261,6 +1117,7 @@ CONFIG_CRYPTO_ECB=m
1261CONFIG_CRYPTO_CBC=m 1117CONFIG_CRYPTO_CBC=m
1262CONFIG_CRYPTO_PCBC=m 1118CONFIG_CRYPTO_PCBC=m
1263CONFIG_CRYPTO_LRW=m 1119CONFIG_CRYPTO_LRW=m
1120CONFIG_CRYPTO_CRYPTD=m
1264CONFIG_CRYPTO_DES=m 1121CONFIG_CRYPTO_DES=m
1265CONFIG_CRYPTO_FCRYPT=m 1122CONFIG_CRYPTO_FCRYPT=m
1266CONFIG_CRYPTO_BLOWFISH=m 1123CONFIG_CRYPTO_BLOWFISH=m
@@ -1279,10 +1136,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1279CONFIG_CRYPTO_CRC32C=m 1136CONFIG_CRYPTO_CRC32C=m
1280CONFIG_CRYPTO_CAMELLIA=m 1137CONFIG_CRYPTO_CAMELLIA=m
1281# CONFIG_CRYPTO_TEST is not set 1138# CONFIG_CRYPTO_TEST is not set
1282 1139# CONFIG_CRYPTO_HW is not set
1283#
1284# Hardware crypto devices
1285#
1286 1140
1287# 1141#
1288# Library routines 1142# Library routines
@@ -1290,7 +1144,9 @@ CONFIG_CRYPTO_CAMELLIA=m
1290CONFIG_BITREVERSE=m 1144CONFIG_BITREVERSE=m
1291# CONFIG_CRC_CCITT is not set 1145# CONFIG_CRC_CCITT is not set
1292CONFIG_CRC16=m 1146CONFIG_CRC16=m
1147# CONFIG_CRC_ITU_T is not set
1293CONFIG_CRC32=m 1148CONFIG_CRC32=m
1149# CONFIG_CRC7 is not set
1294CONFIG_LIBCRC32C=m 1150CONFIG_LIBCRC32C=m
1295CONFIG_ZLIB_INFLATE=m 1151CONFIG_ZLIB_INFLATE=m
1296CONFIG_ZLIB_DEFLATE=m 1152CONFIG_ZLIB_DEFLATE=m
@@ -1301,3 +1157,4 @@ CONFIG_TEXTSEARCH_FSM=m
1301CONFIG_PLIST=y 1157CONFIG_PLIST=y
1302CONFIG_HAS_IOMEM=y 1158CONFIG_HAS_IOMEM=y
1303CONFIG_HAS_IOPORT=y 1159CONFIG_HAS_IOPORT=y
1160CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig
index eb35f7518d..49bcc58929 100644
--- a/arch/mips/configs/ip27_defconfig
+++ b/arch/mips/configs/ip27_defconfig
@@ -1,66 +1,52 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20 3# Linux kernel version: 2.6.23-rc2
4# Tue Feb 20 21:47:32 2007 4# Tue Aug 7 13:04:24 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
16# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 17# CONFIG_MIPS_ATLAS is not set
30# CONFIG_MIPS_MALTA is not set 18# CONFIG_MIPS_MALTA is not set
31# CONFIG_MIPS_SEAD is not set 19# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 21# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 22# CONFIG_MACH_VR41XX is not set
36# CONFIG_PNX8550_JBS is not set 23# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 24# CONFIG_PNX8550_STB810 is not set
38# CONFIG_MACH_VR41XX is not set 25# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 26# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_QEMU is not set 27# CONFIG_QEMU is not set
41# CONFIG_MARKEINS is not set
42# CONFIG_SGI_IP22 is not set 28# CONFIG_SGI_IP22 is not set
43CONFIG_SGI_IP27=y 29CONFIG_SGI_IP27=y
44# CONFIG_SGI_IP32 is not set 30# CONFIG_SGI_IP32 is not set
45# CONFIG_SIBYTE_BIGSUR is not set 31# CONFIG_SIBYTE_CRHINE is not set
32# CONFIG_SIBYTE_CARMEL is not set
33# CONFIG_SIBYTE_CRHONE is not set
34# CONFIG_SIBYTE_RHONE is not set
46# CONFIG_SIBYTE_SWARM is not set 35# CONFIG_SIBYTE_SWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set
47# CONFIG_SIBYTE_SENTOSA is not set 37# CONFIG_SIBYTE_SENTOSA is not set
48# CONFIG_SIBYTE_RHONE is not set
49# CONFIG_SIBYTE_CARMEL is not set
50# CONFIG_SIBYTE_PTSWARM is not set 38# CONFIG_SIBYTE_PTSWARM is not set
51# CONFIG_SIBYTE_LITTLESUR is not set 39# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_CRHINE is not set
53# CONFIG_SIBYTE_CRHONE is not set
54# CONFIG_SNI_RM is not set 40# CONFIG_SNI_RM is not set
55# CONFIG_TOSHIBA_JMR3927 is not set 41# CONFIG_TOSHIBA_JMR3927 is not set
56# CONFIG_TOSHIBA_RBTX4927 is not set 42# CONFIG_TOSHIBA_RBTX4927 is not set
57# CONFIG_TOSHIBA_RBTX4938 is not set 43# CONFIG_TOSHIBA_RBTX4938 is not set
44# CONFIG_WR_PPMC is not set
58CONFIG_SGI_SN_M_MODE=y 45CONFIG_SGI_SN_M_MODE=y
59# CONFIG_SGI_SN_N_MODE is not set 46# CONFIG_SGI_SN_N_MODE is not set
60# CONFIG_MAPPED_KERNEL is not set 47# CONFIG_MAPPED_KERNEL is not set
61# CONFIG_REPLICATE_KTEXT is not set 48# CONFIG_REPLICATE_KTEXT is not set
62# CONFIG_REPLICATE_EXHANDLERS is not set 49# CONFIG_REPLICATE_EXHANDLERS is not set
63CONFIG_EARLY_PRINTK=y
64CONFIG_RWSEM_GENERIC_SPINLOCK=y 50CONFIG_RWSEM_GENERIC_SPINLOCK=y
65# CONFIG_ARCH_HAS_ILOG2_U32 is not set 51# CONFIG_ARCH_HAS_ILOG2_U32 is not set
66# CONFIG_ARCH_HAS_ILOG2_U64 is not set 52# CONFIG_ARCH_HAS_ILOG2_U64 is not set
@@ -72,6 +58,9 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
72CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 58CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
73CONFIG_ARC=y 59CONFIG_ARC=y
74CONFIG_DMA_IP27=y 60CONFIG_DMA_IP27=y
61CONFIG_EARLY_PRINTK=y
62CONFIG_SYS_HAS_EARLY_PRINTK=y
63# CONFIG_NO_IOPORT is not set
75CONFIG_CPU_BIG_ENDIAN=y 64CONFIG_CPU_BIG_ENDIAN=y
76# CONFIG_CPU_LITTLE_ENDIAN is not set 65# CONFIG_CPU_LITTLE_ENDIAN is not set
77CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 66CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
@@ -82,6 +71,7 @@ CONFIG_BOOT_ELF64=y
82# 71#
83# CPU selection 72# CPU selection
84# 73#
74# CONFIG_CPU_LOONGSON2 is not set
85# CONFIG_CPU_MIPS32_R1 is not set 75# CONFIG_CPU_MIPS32_R1 is not set
86# CONFIG_CPU_MIPS32_R2 is not set 76# CONFIG_CPU_MIPS32_R2 is not set
87# CONFIG_CPU_MIPS64_R1 is not set 77# CONFIG_CPU_MIPS64_R1 is not set
@@ -119,7 +109,6 @@ CONFIG_CPU_HAS_PREFETCH=y
119CONFIG_MIPS_MT_DISABLED=y 109CONFIG_MIPS_MT_DISABLED=y
120# CONFIG_MIPS_MT_SMP is not set 110# CONFIG_MIPS_MT_SMP is not set
121# CONFIG_MIPS_MT_SMTC is not set 111# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_VPE_LOADER is not set
123CONFIG_CPU_HAS_LLSC=y 112CONFIG_CPU_HAS_LLSC=y
124CONFIG_CPU_HAS_SYNC=y 113CONFIG_CPU_HAS_SYNC=y
125CONFIG_GENERIC_HARDIRQS=y 114CONFIG_GENERIC_HARDIRQS=y
@@ -141,7 +130,8 @@ CONFIG_NEED_MULTIPLE_NODES=y
141CONFIG_SPLIT_PTLOCK_CPUS=4 130CONFIG_SPLIT_PTLOCK_CPUS=4
142CONFIG_MIGRATION=y 131CONFIG_MIGRATION=y
143CONFIG_RESOURCES_64BIT=y 132CONFIG_RESOURCES_64BIT=y
144CONFIG_ZONE_DMA_FLAG=1 133CONFIG_ZONE_DMA_FLAG=0
134CONFIG_VIRT_TO_BUS=y
145CONFIG_SMP=y 135CONFIG_SMP=y
146CONFIG_SYS_SUPPORTS_SMP=y 136CONFIG_SYS_SUPPORTS_SMP=y
147CONFIG_NR_CPUS_DEFAULT_64=y 137CONFIG_NR_CPUS_DEFAULT_64=y
@@ -161,36 +151,34 @@ CONFIG_PREEMPT_NONE=y
161CONFIG_PREEMPT_BKL=y 151CONFIG_PREEMPT_BKL=y
162# CONFIG_MIPS_INSANE_LARGE is not set 152# CONFIG_MIPS_INSANE_LARGE is not set
163# CONFIG_KEXEC is not set 153# CONFIG_KEXEC is not set
154CONFIG_SECCOMP=y
164CONFIG_LOCKDEP_SUPPORT=y 155CONFIG_LOCKDEP_SUPPORT=y
165CONFIG_STACKTRACE_SUPPORT=y 156CONFIG_STACKTRACE_SUPPORT=y
166CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 157CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
167 158
168# 159#
169# Code maturity level options 160# General setup
170# 161#
171CONFIG_EXPERIMENTAL=y 162CONFIG_EXPERIMENTAL=y
172CONFIG_LOCK_KERNEL=y 163CONFIG_LOCK_KERNEL=y
173CONFIG_INIT_ENV_ARG_LIMIT=32 164CONFIG_INIT_ENV_ARG_LIMIT=32
174
175#
176# General setup
177#
178CONFIG_LOCALVERSION="" 165CONFIG_LOCALVERSION=""
179CONFIG_LOCALVERSION_AUTO=y 166CONFIG_LOCALVERSION_AUTO=y
180CONFIG_SWAP=y 167CONFIG_SWAP=y
181CONFIG_SYSVIPC=y 168CONFIG_SYSVIPC=y
182# CONFIG_IPC_NS is not set
183CONFIG_SYSVIPC_SYSCTL=y 169CONFIG_SYSVIPC_SYSCTL=y
184CONFIG_POSIX_MQUEUE=y 170CONFIG_POSIX_MQUEUE=y
185# CONFIG_BSD_PROCESS_ACCT is not set 171# CONFIG_BSD_PROCESS_ACCT is not set
186# CONFIG_TASKSTATS is not set 172# CONFIG_TASKSTATS is not set
187# CONFIG_UTS_NS is not set 173# CONFIG_USER_NS is not set
188# CONFIG_AUDIT is not set 174# CONFIG_AUDIT is not set
189CONFIG_IKCONFIG=y 175CONFIG_IKCONFIG=y
190CONFIG_IKCONFIG_PROC=y 176CONFIG_IKCONFIG_PROC=y
177CONFIG_LOG_BUF_SHIFT=15
191CONFIG_CPUSETS=y 178CONFIG_CPUSETS=y
192CONFIG_SYSFS_DEPRECATED=y 179CONFIG_SYSFS_DEPRECATED=y
193CONFIG_RELAY=y 180CONFIG_RELAY=y
181# CONFIG_BLK_DEV_INITRD is not set
194# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 182# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
195CONFIG_SYSCTL=y 183CONFIG_SYSCTL=y
196CONFIG_EMBEDDED=y 184CONFIG_EMBEDDED=y
@@ -203,18 +191,19 @@ CONFIG_BUG=y
203CONFIG_ELF_CORE=y 191CONFIG_ELF_CORE=y
204CONFIG_BASE_FULL=y 192CONFIG_BASE_FULL=y
205CONFIG_FUTEX=y 193CONFIG_FUTEX=y
194CONFIG_ANON_INODES=y
206CONFIG_EPOLL=y 195CONFIG_EPOLL=y
196CONFIG_SIGNALFD=y
197CONFIG_TIMERFD=y
198CONFIG_EVENTFD=y
207CONFIG_SHMEM=y 199CONFIG_SHMEM=y
208CONFIG_SLAB=y
209CONFIG_VM_EVENT_COUNTERS=y 200CONFIG_VM_EVENT_COUNTERS=y
201CONFIG_SLAB=y
202# CONFIG_SLUB is not set
203# CONFIG_SLOB is not set
210CONFIG_RT_MUTEXES=y 204CONFIG_RT_MUTEXES=y
211# CONFIG_TINY_SHMEM is not set 205# CONFIG_TINY_SHMEM is not set
212CONFIG_BASE_SMALL=0 206CONFIG_BASE_SMALL=0
213# CONFIG_SLOB is not set
214
215#
216# Loadable module support
217#
218CONFIG_MODULES=y 207CONFIG_MODULES=y
219CONFIG_MODULE_UNLOAD=y 208CONFIG_MODULE_UNLOAD=y
220# CONFIG_MODULE_FORCE_UNLOAD is not set 209# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -222,12 +211,9 @@ CONFIG_MODULE_UNLOAD=y
222CONFIG_MODULE_SRCVERSION_ALL=y 211CONFIG_MODULE_SRCVERSION_ALL=y
223CONFIG_KMOD=y 212CONFIG_KMOD=y
224CONFIG_STOP_MACHINE=y 213CONFIG_STOP_MACHINE=y
225
226#
227# Block layer
228#
229CONFIG_BLOCK=y 214CONFIG_BLOCK=y
230# CONFIG_BLK_DEV_IO_TRACE is not set 215# CONFIG_BLK_DEV_IO_TRACE is not set
216# CONFIG_BLK_DEV_BSG is not set
231 217
232# 218#
233# IO Schedulers 219# IO Schedulers
@@ -248,16 +234,13 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
248CONFIG_HW_HAS_PCI=y 234CONFIG_HW_HAS_PCI=y
249CONFIG_PCI=y 235CONFIG_PCI=y
250CONFIG_PCI_DOMAINS=y 236CONFIG_PCI_DOMAINS=y
237# CONFIG_ARCH_SUPPORTS_MSI is not set
251CONFIG_MMU=y 238CONFIG_MMU=y
252 239
253# 240#
254# PCCARD (PCMCIA/CardBus) support 241# PCCARD (PCMCIA/CardBus) support
255# 242#
256# CONFIG_PCCARD is not set 243# CONFIG_PCCARD is not set
257
258#
259# PCI Hotplug Support
260#
261# CONFIG_HOTPLUG_PCI is not set 244# CONFIG_HOTPLUG_PCI is not set
262 245
263# 246#
@@ -279,7 +262,6 @@ CONFIG_BINFMT_ELF32=y
279CONFIG_PM=y 262CONFIG_PM=y
280# CONFIG_PM_LEGACY is not set 263# CONFIG_PM_LEGACY is not set
281# CONFIG_PM_DEBUG is not set 264# CONFIG_PM_DEBUG is not set
282# CONFIG_PM_SYSFS_DEPRECATED is not set
283 265
284# 266#
285# Networking 267# Networking
@@ -289,7 +271,6 @@ CONFIG_NET=y
289# 271#
290# Networking options 272# Networking options
291# 273#
292# CONFIG_NETDEBUG is not set
293CONFIG_PACKET=y 274CONFIG_PACKET=y
294CONFIG_PACKET_MMAP=y 275CONFIG_PACKET_MMAP=y
295CONFIG_UNIX=y 276CONFIG_UNIX=y
@@ -331,20 +312,13 @@ CONFIG_TCP_MD5SIG=y
331# CONFIG_INET6_TUNNEL is not set 312# CONFIG_INET6_TUNNEL is not set
332CONFIG_NETWORK_SECMARK=y 313CONFIG_NETWORK_SECMARK=y
333# CONFIG_NETFILTER is not set 314# CONFIG_NETFILTER is not set
334
335#
336# DCCP Configuration (EXPERIMENTAL)
337#
338# CONFIG_IP_DCCP is not set 315# CONFIG_IP_DCCP is not set
339 316CONFIG_IP_SCTP=m
340# 317# CONFIG_SCTP_DBG_MSG is not set
341# SCTP Configuration (EXPERIMENTAL) 318# CONFIG_SCTP_DBG_OBJCNT is not set
342# 319# CONFIG_SCTP_HMAC_NONE is not set
343# CONFIG_IP_SCTP is not set 320# CONFIG_SCTP_HMAC_SHA1 is not set
344 321CONFIG_SCTP_HMAC_MD5=y
345#
346# TIPC Configuration (EXPERIMENTAL)
347#
348# CONFIG_TIPC is not set 322# CONFIG_TIPC is not set
349# CONFIG_ATM is not set 323# CONFIG_ATM is not set
350# CONFIG_BRIDGE is not set 324# CONFIG_BRIDGE is not set
@@ -363,9 +337,6 @@ CONFIG_NETWORK_SECMARK=y
363# 337#
364CONFIG_NET_SCHED=y 338CONFIG_NET_SCHED=y
365CONFIG_NET_SCH_FIFO=y 339CONFIG_NET_SCH_FIFO=y
366# CONFIG_NET_SCH_CLK_JIFFIES is not set
367CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
368# CONFIG_NET_SCH_CLK_CPU is not set
369 340
370# 341#
371# Queueing/Scheduling 342# Queueing/Scheduling
@@ -374,6 +345,7 @@ CONFIG_NET_SCH_CBQ=m
374CONFIG_NET_SCH_HTB=m 345CONFIG_NET_SCH_HTB=m
375CONFIG_NET_SCH_HFSC=m 346CONFIG_NET_SCH_HFSC=m
376CONFIG_NET_SCH_PRIO=m 347CONFIG_NET_SCH_PRIO=m
348CONFIG_NET_SCH_RR=m
377CONFIG_NET_SCH_RED=m 349CONFIG_NET_SCH_RED=m
378CONFIG_NET_SCH_SFQ=m 350CONFIG_NET_SCH_SFQ=m
379CONFIG_NET_SCH_TEQL=m 351CONFIG_NET_SCH_TEQL=m
@@ -398,10 +370,15 @@ CONFIG_CLS_U32_MARK=y
398CONFIG_NET_CLS_RSVP=m 370CONFIG_NET_CLS_RSVP=m
399CONFIG_NET_CLS_RSVP6=m 371CONFIG_NET_CLS_RSVP6=m
400# CONFIG_NET_EMATCH is not set 372# CONFIG_NET_EMATCH is not set
401# CONFIG_NET_CLS_ACT is not set 373CONFIG_NET_CLS_ACT=y
374CONFIG_NET_ACT_POLICE=y
375CONFIG_NET_ACT_GACT=m
376CONFIG_GACT_PROB=y
377CONFIG_NET_ACT_MIRRED=m
378CONFIG_NET_ACT_PEDIT=m
379# CONFIG_NET_ACT_SIMP is not set
402CONFIG_NET_CLS_POLICE=y 380CONFIG_NET_CLS_POLICE=y
403# CONFIG_NET_CLS_IND is not set 381# CONFIG_NET_CLS_IND is not set
404CONFIG_NET_ESTIMATOR=y
405 382
406# 383#
407# Network testing 384# Network testing
@@ -410,13 +387,24 @@ CONFIG_NET_ESTIMATOR=y
410# CONFIG_HAMRADIO is not set 387# CONFIG_HAMRADIO is not set
411# CONFIG_IRDA is not set 388# CONFIG_IRDA is not set
412# CONFIG_BT is not set 389# CONFIG_BT is not set
390# CONFIG_AF_RXRPC is not set
391
392#
393# Wireless
394#
395CONFIG_CFG80211=m
396CONFIG_WIRELESS_EXT=y
397CONFIG_MAC80211=m
398# CONFIG_MAC80211_DEBUG is not set
413CONFIG_IEEE80211=m 399CONFIG_IEEE80211=m
414# CONFIG_IEEE80211_DEBUG is not set 400# CONFIG_IEEE80211_DEBUG is not set
415CONFIG_IEEE80211_CRYPT_WEP=m 401CONFIG_IEEE80211_CRYPT_WEP=m
416CONFIG_IEEE80211_CRYPT_CCMP=m 402CONFIG_IEEE80211_CRYPT_CCMP=m
403CONFIG_IEEE80211_CRYPT_TKIP=m
417CONFIG_IEEE80211_SOFTMAC=m 404CONFIG_IEEE80211_SOFTMAC=m
418# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 405# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
419CONFIG_WIRELESS_EXT=y 406CONFIG_RFKILL=m
407# CONFIG_NET_9P is not set
420 408
421# 409#
422# Device Drivers 410# Device Drivers
@@ -429,30 +417,10 @@ CONFIG_STANDALONE=y
429CONFIG_PREVENT_FIRMWARE_BUILD=y 417CONFIG_PREVENT_FIRMWARE_BUILD=y
430CONFIG_FW_LOADER=y 418CONFIG_FW_LOADER=y
431# CONFIG_SYS_HYPERVISOR is not set 419# CONFIG_SYS_HYPERVISOR is not set
432
433#
434# Connector - unified userspace <-> kernelspace linker
435#
436CONFIG_CONNECTOR=m 420CONFIG_CONNECTOR=m
437
438#
439# Memory Technology Devices (MTD)
440#
441# CONFIG_MTD is not set 421# CONFIG_MTD is not set
442
443#
444# Parallel port support
445#
446# CONFIG_PARPORT is not set 422# CONFIG_PARPORT is not set
447 423CONFIG_BLK_DEV=y
448#
449# Plug and Play support
450#
451# CONFIG_PNPACPI is not set
452
453#
454# Block devices
455#
456# CONFIG_BLK_CPQ_DA is not set 424# CONFIG_BLK_CPQ_DA is not set
457# CONFIG_BLK_CPQ_CISS_DA is not set 425# CONFIG_BLK_CPQ_CISS_DA is not set
458# CONFIG_BLK_DEV_DAC960 is not set 426# CONFIG_BLK_DEV_DAC960 is not set
@@ -463,21 +431,11 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
463# CONFIG_BLK_DEV_NBD is not set 431# CONFIG_BLK_DEV_NBD is not set
464# CONFIG_BLK_DEV_SX8 is not set 432# CONFIG_BLK_DEV_SX8 is not set
465# CONFIG_BLK_DEV_RAM is not set 433# CONFIG_BLK_DEV_RAM is not set
466# CONFIG_BLK_DEV_INITRD is not set
467CONFIG_CDROM_PKTCDVD=m 434CONFIG_CDROM_PKTCDVD=m
468CONFIG_CDROM_PKTCDVD_BUFFERS=8 435CONFIG_CDROM_PKTCDVD_BUFFERS=8
469# CONFIG_CDROM_PKTCDVD_WCACHE is not set 436# CONFIG_CDROM_PKTCDVD_WCACHE is not set
470CONFIG_ATA_OVER_ETH=m 437CONFIG_ATA_OVER_ETH=m
471 438# CONFIG_MISC_DEVICES is not set
472#
473# Misc devices
474#
475CONFIG_SGI_IOC4=m
476# CONFIG_TIFM_CORE is not set
477
478#
479# ATA/ATAPI/MFM/RLL support
480#
481# CONFIG_IDE is not set 439# CONFIG_IDE is not set
482 440
483# 441#
@@ -485,6 +443,7 @@ CONFIG_SGI_IOC4=m
485# 443#
486CONFIG_RAID_ATTRS=m 444CONFIG_RAID_ATTRS=m
487CONFIG_SCSI=y 445CONFIG_SCSI=y
446CONFIG_SCSI_DMA=y
488CONFIG_SCSI_TGT=m 447CONFIG_SCSI_TGT=m
489CONFIG_SCSI_NETLINK=y 448CONFIG_SCSI_NETLINK=y
490CONFIG_SCSI_PROC_FS=y 449CONFIG_SCSI_PROC_FS=y
@@ -507,6 +466,7 @@ CONFIG_CHR_DEV_SCH=m
507CONFIG_SCSI_CONSTANTS=y 466CONFIG_SCSI_CONSTANTS=y
508CONFIG_SCSI_LOGGING=y 467CONFIG_SCSI_LOGGING=y
509CONFIG_SCSI_SCAN_ASYNC=y 468CONFIG_SCSI_SCAN_ASYNC=y
469CONFIG_SCSI_WAIT_SCAN=m
510 470
511# 471#
512# SCSI Transports 472# SCSI Transports
@@ -517,10 +477,7 @@ CONFIG_SCSI_ISCSI_ATTRS=m
517CONFIG_SCSI_SAS_ATTRS=m 477CONFIG_SCSI_SAS_ATTRS=m
518CONFIG_SCSI_SAS_LIBSAS=m 478CONFIG_SCSI_SAS_LIBSAS=m
519# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set 479# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
520 480CONFIG_SCSI_LOWLEVEL=y
521#
522# SCSI low-level drivers
523#
524# CONFIG_ISCSI_TCP is not set 481# CONFIG_ISCSI_TCP is not set
525# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 482# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
526# CONFIG_SCSI_3W_9XXX is not set 483# CONFIG_SCSI_3W_9XXX is not set
@@ -551,15 +508,7 @@ CONFIG_SCSI_QLOGIC_1280=y
551# CONFIG_SCSI_DC390T is not set 508# CONFIG_SCSI_DC390T is not set
552# CONFIG_SCSI_DEBUG is not set 509# CONFIG_SCSI_DEBUG is not set
553# CONFIG_SCSI_SRP is not set 510# CONFIG_SCSI_SRP is not set
554
555#
556# Serial ATA (prod) and Parallel ATA (experimental) drivers
557#
558# CONFIG_ATA is not set 511# CONFIG_ATA is not set
559
560#
561# Multi-device support (RAID and LVM)
562#
563CONFIG_MD=y 512CONFIG_MD=y
564CONFIG_BLK_DEV_MD=y 513CONFIG_BLK_DEV_MD=y
565CONFIG_MD_LINEAR=m 514CONFIG_MD_LINEAR=m
@@ -578,6 +527,8 @@ CONFIG_DM_MIRROR=m
578CONFIG_DM_ZERO=m 527CONFIG_DM_ZERO=m
579CONFIG_DM_MULTIPATH=m 528CONFIG_DM_MULTIPATH=m
580CONFIG_DM_MULTIPATH_EMC=m 529CONFIG_DM_MULTIPATH_EMC=m
530CONFIG_DM_MULTIPATH_RDAC=m
531# CONFIG_DM_DELAY is not set
581 532
582# 533#
583# Fusion MPT device support 534# Fusion MPT device support
@@ -590,30 +541,18 @@ CONFIG_DM_MULTIPATH_EMC=m
590# 541#
591# IEEE 1394 (FireWire) support 542# IEEE 1394 (FireWire) support
592# 543#
544# CONFIG_FIREWIRE is not set
593# CONFIG_IEEE1394 is not set 545# CONFIG_IEEE1394 is not set
594
595#
596# I2O device support
597#
598# CONFIG_I2O is not set 546# CONFIG_I2O is not set
599
600#
601# Network device support
602#
603CONFIG_NETDEVICES=y 547CONFIG_NETDEVICES=y
548CONFIG_NETDEVICES_MULTIQUEUE=y
549CONFIG_IFB=m
604# CONFIG_DUMMY is not set 550# CONFIG_DUMMY is not set
605# CONFIG_BONDING is not set 551# CONFIG_BONDING is not set
552CONFIG_MACVLAN=m
606# CONFIG_EQUALIZER is not set 553# CONFIG_EQUALIZER is not set
607# CONFIG_TUN is not set 554# CONFIG_TUN is not set
608
609#
610# ARCnet devices
611#
612# CONFIG_ARCNET is not set 555# CONFIG_ARCNET is not set
613
614#
615# PHY device support
616#
617CONFIG_PHYLIB=m 556CONFIG_PHYLIB=m
618 557
619# 558#
@@ -627,30 +566,21 @@ CONFIG_CICADA_PHY=m
627CONFIG_VITESSE_PHY=m 566CONFIG_VITESSE_PHY=m
628CONFIG_SMSC_PHY=m 567CONFIG_SMSC_PHY=m
629# CONFIG_BROADCOM_PHY is not set 568# CONFIG_BROADCOM_PHY is not set
569CONFIG_ICPLUS_PHY=m
630# CONFIG_FIXED_PHY is not set 570# CONFIG_FIXED_PHY is not set
631
632#
633# Ethernet (10 or 100Mbit)
634#
635CONFIG_NET_ETHERNET=y 571CONFIG_NET_ETHERNET=y
636CONFIG_MII=y 572CONFIG_MII=y
573CONFIG_AX88796=m
637CONFIG_SGI_IOC3_ETH=y 574CONFIG_SGI_IOC3_ETH=y
638# CONFIG_HAPPYMEAL is not set 575# CONFIG_HAPPYMEAL is not set
639# CONFIG_SUNGEM is not set 576# CONFIG_SUNGEM is not set
640# CONFIG_CASSINI is not set 577# CONFIG_CASSINI is not set
641# CONFIG_NET_VENDOR_3COM is not set 578# CONFIG_NET_VENDOR_3COM is not set
642# CONFIG_DM9000 is not set 579# CONFIG_DM9000 is not set
643
644#
645# Tulip family network device support
646#
647# CONFIG_NET_TULIP is not set 580# CONFIG_NET_TULIP is not set
648# CONFIG_HP100 is not set 581# CONFIG_HP100 is not set
649# CONFIG_NET_PCI is not set 582# CONFIG_NET_PCI is not set
650 583CONFIG_NETDEV_1000=y
651#
652# Ethernet (1000 Mbit)
653#
654# CONFIG_ACENIC is not set 584# CONFIG_ACENIC is not set
655# CONFIG_DL2K is not set 585# CONFIG_DL2K is not set
656# CONFIG_E1000 is not set 586# CONFIG_E1000 is not set
@@ -661,35 +591,57 @@ CONFIG_SGI_IOC3_ETH=y
661# CONFIG_SIS190 is not set 591# CONFIG_SIS190 is not set
662# CONFIG_SKGE is not set 592# CONFIG_SKGE is not set
663# CONFIG_SKY2 is not set 593# CONFIG_SKY2 is not set
664# CONFIG_SK98LIN is not set 594CONFIG_VIA_VELOCITY=m
665# CONFIG_TIGON3 is not set 595# CONFIG_TIGON3 is not set
666# CONFIG_BNX2 is not set 596# CONFIG_BNX2 is not set
667CONFIG_QLA3XXX=m 597CONFIG_QLA3XXX=m
668# CONFIG_ATL1 is not set 598# CONFIG_ATL1 is not set
669 599CONFIG_NETDEV_10000=y
670#
671# Ethernet (10000 Mbit)
672#
673# CONFIG_CHELSIO_T1 is not set 600# CONFIG_CHELSIO_T1 is not set
674CONFIG_CHELSIO_T3=m 601CONFIG_CHELSIO_T3=m
675# CONFIG_IXGB is not set 602# CONFIG_IXGB is not set
676# CONFIG_S2IO is not set 603# CONFIG_S2IO is not set
677# CONFIG_MYRI10GE is not set 604# CONFIG_MYRI10GE is not set
678CONFIG_NETXEN_NIC=m 605CONFIG_NETXEN_NIC=m
679 606# CONFIG_MLX4_CORE is not set
680#
681# Token Ring devices
682#
683# CONFIG_TR is not set 607# CONFIG_TR is not set
684 608
685# 609#
686# Wireless LAN (non-hamradio) 610# Wireless LAN
687# 611#
688# CONFIG_NET_RADIO is not set 612# CONFIG_WLAN_PRE80211 is not set
689 613CONFIG_WLAN_80211=y
690# 614CONFIG_IPW2100=m
691# Wan interfaces 615CONFIG_IPW2100_MONITOR=y
692# 616CONFIG_IPW2100_DEBUG=y
617CONFIG_IPW2200=m
618CONFIG_IPW2200_MONITOR=y
619CONFIG_IPW2200_RADIOTAP=y
620CONFIG_IPW2200_PROMISCUOUS=y
621CONFIG_IPW2200_QOS=y
622CONFIG_IPW2200_DEBUG=y
623CONFIG_LIBERTAS=m
624# CONFIG_LIBERTAS_DEBUG is not set
625CONFIG_HERMES=m
626CONFIG_PLX_HERMES=m
627CONFIG_TMD_HERMES=m
628CONFIG_NORTEL_HERMES=m
629CONFIG_PCI_HERMES=m
630CONFIG_ATMEL=m
631CONFIG_PCI_ATMEL=m
632CONFIG_PRISM54=m
633CONFIG_HOSTAP=m
634CONFIG_HOSTAP_FIRMWARE=y
635CONFIG_HOSTAP_FIRMWARE_NVRAM=y
636CONFIG_HOSTAP_PLX=m
637CONFIG_HOSTAP_PCI=m
638CONFIG_BCM43XX=m
639CONFIG_BCM43XX_DEBUG=y
640CONFIG_BCM43XX_DMA=y
641CONFIG_BCM43XX_PIO=y
642CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
643# CONFIG_BCM43XX_DMA_MODE is not set
644# CONFIG_BCM43XX_PIO_MODE is not set
693# CONFIG_WAN is not set 645# CONFIG_WAN is not set
694# CONFIG_FDDI is not set 646# CONFIG_FDDI is not set
695# CONFIG_HIPPI is not set 647# CONFIG_HIPPI is not set
@@ -700,15 +652,7 @@ CONFIG_NETXEN_NIC=m
700# CONFIG_NETCONSOLE is not set 652# CONFIG_NETCONSOLE is not set
701# CONFIG_NETPOLL is not set 653# CONFIG_NETPOLL is not set
702# CONFIG_NET_POLL_CONTROLLER is not set 654# CONFIG_NET_POLL_CONTROLLER is not set
703
704#
705# ISDN subsystem
706#
707# CONFIG_ISDN is not set 655# CONFIG_ISDN is not set
708
709#
710# Telephony Support
711#
712# CONFIG_PHONE is not set 656# CONFIG_PHONE is not set
713 657
714# 658#
@@ -756,34 +700,17 @@ CONFIG_SERIAL_CORE_CONSOLE=y
756CONFIG_UNIX98_PTYS=y 700CONFIG_UNIX98_PTYS=y
757CONFIG_LEGACY_PTYS=y 701CONFIG_LEGACY_PTYS=y
758CONFIG_LEGACY_PTY_COUNT=256 702CONFIG_LEGACY_PTY_COUNT=256
759
760#
761# IPMI
762#
763# CONFIG_IPMI_HANDLER is not set 703# CONFIG_IPMI_HANDLER is not set
764
765#
766# Watchdog Cards
767#
768# CONFIG_WATCHDOG is not set 704# CONFIG_WATCHDOG is not set
769# CONFIG_HW_RANDOM is not set 705CONFIG_HW_RANDOM=m
770# CONFIG_RTC is not set 706# CONFIG_RTC is not set
771CONFIG_SGI_IP27_RTC=y 707CONFIG_SGI_IP27_RTC=y
772# CONFIG_GEN_RTC is not set
773# CONFIG_DTLK is not set
774# CONFIG_R3964 is not set 708# CONFIG_R3964 is not set
775# CONFIG_APPLICOM is not set 709# CONFIG_APPLICOM is not set
776# CONFIG_DRM is not set 710# CONFIG_DRM is not set
777# CONFIG_RAW_DRIVER is not set 711# CONFIG_RAW_DRIVER is not set
778
779#
780# TPM devices
781#
782# CONFIG_TCG_TPM is not set 712# CONFIG_TCG_TPM is not set
783 713CONFIG_DEVPORT=y
784#
785# I2C support
786#
787# CONFIG_I2C is not set 714# CONFIG_I2C is not set
788 715
789# 716#
@@ -791,43 +718,40 @@ CONFIG_SGI_IP27_RTC=y
791# 718#
792# CONFIG_SPI is not set 719# CONFIG_SPI is not set
793# CONFIG_SPI_MASTER is not set 720# CONFIG_SPI_MASTER is not set
794
795#
796# Dallas's 1-wire bus
797#
798# CONFIG_W1 is not set 721# CONFIG_W1 is not set
722# CONFIG_POWER_SUPPLY is not set
723# CONFIG_HWMON is not set
799 724
800# 725#
801# Hardware Monitoring support 726# Multifunction device drivers
802# 727#
803# CONFIG_HWMON is not set 728# CONFIG_MFD_SM501 is not set
804# CONFIG_HWMON_VID is not set
805 729
806# 730#
807# Multimedia devices 731# Multimedia devices
808# 732#
809# CONFIG_VIDEO_DEV is not set 733# CONFIG_VIDEO_DEV is not set
734# CONFIG_DVB_CORE is not set
735# CONFIG_DAB is not set
810 736
811# 737#
812# Digital Video Broadcasting Devices 738# Graphics support
813# 739#
814# CONFIG_DVB is not set 740# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
815 741
816# 742#
817# Graphics support 743# Display device support
818# 744#
819# CONFIG_FIRMWARE_EDID is not set 745# CONFIG_DISPLAY_SUPPORT is not set
746# CONFIG_VGASTATE is not set
747# CONFIG_VIDEO_OUTPUT_CONTROL is not set
820# CONFIG_FB is not set 748# CONFIG_FB is not set
821# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
822 749
823# 750#
824# Sound 751# Sound
825# 752#
826# CONFIG_SOUND is not set 753# CONFIG_SOUND is not set
827 754CONFIG_USB_SUPPORT=y
828#
829# USB support
830#
831CONFIG_USB_ARCH_HAS_HCD=y 755CONFIG_USB_ARCH_HAS_HCD=y
832CONFIG_USB_ARCH_HAS_OHCI=y 756CONFIG_USB_ARCH_HAS_OHCI=y
833CONFIG_USB_ARCH_HAS_EHCI=y 757CONFIG_USB_ARCH_HAS_EHCI=y
@@ -841,37 +765,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
841# USB Gadget Support 765# USB Gadget Support
842# 766#
843# CONFIG_USB_GADGET is not set 767# CONFIG_USB_GADGET is not set
844
845#
846# MMC/SD Card support
847#
848# CONFIG_MMC is not set 768# CONFIG_MMC is not set
849
850#
851# LED devices
852#
853# CONFIG_NEW_LEDS is not set 769# CONFIG_NEW_LEDS is not set
854
855#
856# LED drivers
857#
858
859#
860# LED Triggers
861#
862
863#
864# InfiniBand support
865#
866# CONFIG_INFINIBAND is not set 770# CONFIG_INFINIBAND is not set
867
868#
869# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
870#
871
872#
873# Real Time Clock
874#
875# CONFIG_RTC_CLASS is not set 771# CONFIG_RTC_CLASS is not set
876 772
877# 773#
@@ -888,12 +784,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
888# 784#
889 785
890# 786#
891# Auxiliary Display support 787# Userspace I/O
892#
893
894#
895# Virtualization
896# 788#
789CONFIG_UIO=y
790# CONFIG_UIO_CIF is not set
897 791
898# 792#
899# File systems 793# File systems
@@ -992,6 +886,7 @@ CONFIG_LOCKD_V4=y
992CONFIG_NFS_COMMON=y 886CONFIG_NFS_COMMON=y
993CONFIG_SUNRPC=y 887CONFIG_SUNRPC=y
994CONFIG_SUNRPC_GSS=y 888CONFIG_SUNRPC_GSS=y
889# CONFIG_SUNRPC_BIND34 is not set
995CONFIG_RPCSEC_GSS_KRB5=y 890CONFIG_RPCSEC_GSS_KRB5=y
996# CONFIG_RPCSEC_GSS_SPKM3 is not set 891# CONFIG_RPCSEC_GSS_SPKM3 is not set
997# CONFIG_SMB_FS is not set 892# CONFIG_SMB_FS is not set
@@ -999,7 +894,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
999# CONFIG_NCP_FS is not set 894# CONFIG_NCP_FS is not set
1000# CONFIG_CODA_FS is not set 895# CONFIG_CODA_FS is not set
1001# CONFIG_AFS_FS is not set 896# CONFIG_AFS_FS is not set
1002# CONFIG_9P_FS is not set
1003 897
1004# 898#
1005# Partition Types 899# Partition Types
@@ -1021,6 +915,7 @@ CONFIG_SGI_PARTITION=y
1021# CONFIG_SUN_PARTITION is not set 915# CONFIG_SUN_PARTITION is not set
1022# CONFIG_KARMA_PARTITION is not set 916# CONFIG_KARMA_PARTITION is not set
1023# CONFIG_EFI_PARTITION is not set 917# CONFIG_EFI_PARTITION is not set
918# CONFIG_SYSV68_PARTITION is not set
1024 919
1025# 920#
1026# Native Language Support 921# Native Language Support
@@ -1031,8 +926,6 @@ CONFIG_SGI_PARTITION=y
1031# Distributed Lock Manager 926# Distributed Lock Manager
1032# 927#
1033CONFIG_DLM=m 928CONFIG_DLM=m
1034CONFIG_DLM_TCP=y
1035# CONFIG_DLM_SCTP is not set
1036# CONFIG_DLM_DEBUG is not set 929# CONFIG_DLM_DEBUG is not set
1037 930
1038# 931#
@@ -1051,7 +944,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1051# CONFIG_DEBUG_FS is not set 944# CONFIG_DEBUG_FS is not set
1052# CONFIG_HEADERS_CHECK is not set 945# CONFIG_HEADERS_CHECK is not set
1053# CONFIG_DEBUG_KERNEL is not set 946# CONFIG_DEBUG_KERNEL is not set
1054CONFIG_LOG_BUF_SHIFT=15
1055CONFIG_CROSSCOMPILE=y 947CONFIG_CROSSCOMPILE=y
1056CONFIG_CMDLINE="" 948CONFIG_CMDLINE=""
1057CONFIG_SYS_SUPPORTS_KGDB=y 949CONFIG_SYS_SUPPORTS_KGDB=y
@@ -1062,12 +954,13 @@ CONFIG_SYS_SUPPORTS_KGDB=y
1062CONFIG_KEYS=y 954CONFIG_KEYS=y
1063CONFIG_KEYS_DEBUG_PROC_KEYS=y 955CONFIG_KEYS_DEBUG_PROC_KEYS=y
1064# CONFIG_SECURITY is not set 956# CONFIG_SECURITY is not set
1065 957CONFIG_XOR_BLOCKS=m
1066# 958CONFIG_ASYNC_CORE=m
1067# Cryptographic options 959CONFIG_ASYNC_MEMCPY=m
1068# 960CONFIG_ASYNC_XOR=m
1069CONFIG_CRYPTO=y 961CONFIG_CRYPTO=y
1070CONFIG_CRYPTO_ALGAPI=y 962CONFIG_CRYPTO_ALGAPI=y
963CONFIG_CRYPTO_ABLKCIPHER=m
1071CONFIG_CRYPTO_BLKCIPHER=y 964CONFIG_CRYPTO_BLKCIPHER=y
1072CONFIG_CRYPTO_HASH=y 965CONFIG_CRYPTO_HASH=y
1073CONFIG_CRYPTO_MANAGER=y 966CONFIG_CRYPTO_MANAGER=y
@@ -1086,6 +979,7 @@ CONFIG_CRYPTO_ECB=m
1086CONFIG_CRYPTO_CBC=y 979CONFIG_CRYPTO_CBC=y
1087CONFIG_CRYPTO_PCBC=m 980CONFIG_CRYPTO_PCBC=m
1088CONFIG_CRYPTO_LRW=m 981CONFIG_CRYPTO_LRW=m
982CONFIG_CRYPTO_CRYPTD=m
1089CONFIG_CRYPTO_DES=y 983CONFIG_CRYPTO_DES=y
1090CONFIG_CRYPTO_FCRYPT=m 984CONFIG_CRYPTO_FCRYPT=m
1091CONFIG_CRYPTO_BLOWFISH=m 985CONFIG_CRYPTO_BLOWFISH=m
@@ -1104,21 +998,21 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1104CONFIG_CRYPTO_CRC32C=m 998CONFIG_CRYPTO_CRC32C=m
1105CONFIG_CRYPTO_CAMELLIA=m 999CONFIG_CRYPTO_CAMELLIA=m
1106# CONFIG_CRYPTO_TEST is not set 1000# CONFIG_CRYPTO_TEST is not set
1107 1001CONFIG_CRYPTO_HW=y
1108#
1109# Hardware crypto devices
1110#
1111 1002
1112# 1003#
1113# Library routines 1004# Library routines
1114# 1005#
1115CONFIG_BITREVERSE=y 1006CONFIG_BITREVERSE=y
1116# CONFIG_CRC_CCITT is not set 1007CONFIG_CRC_CCITT=m
1117CONFIG_CRC16=m 1008# CONFIG_CRC16 is not set
1009# CONFIG_CRC_ITU_T is not set
1118CONFIG_CRC32=y 1010CONFIG_CRC32=y
1011# CONFIG_CRC7 is not set
1119CONFIG_LIBCRC32C=m 1012CONFIG_LIBCRC32C=m
1120CONFIG_ZLIB_INFLATE=m 1013CONFIG_ZLIB_INFLATE=m
1121CONFIG_ZLIB_DEFLATE=m 1014CONFIG_ZLIB_DEFLATE=m
1122CONFIG_PLIST=y 1015CONFIG_PLIST=y
1123CONFIG_HAS_IOMEM=y 1016CONFIG_HAS_IOMEM=y
1124CONFIG_HAS_IOPORT=y 1017CONFIG_HAS_IOPORT=y
1018CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig
index 95a72d2750..eb96791c33 100644
--- a/arch/mips/configs/jmr3927_defconfig
+++ b/arch/mips/configs/jmr3927_defconfig
@@ -1,60 +1,47 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21-rc3 3# Linux kernel version: 2.6.23-rc1
4# Thu Mar 15 00:40:40 2007 4# Thu Aug 2 23:07:36 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
16# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 17# CONFIG_MIPS_ATLAS is not set
30# CONFIG_MIPS_MALTA is not set 18# CONFIG_MIPS_MALTA is not set
31# CONFIG_MIPS_SEAD is not set 19# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 21# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 22# CONFIG_MACH_VR41XX is not set
36# CONFIG_PNX8550_JBS is not set 23# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 24# CONFIG_PNX8550_STB810 is not set
38# CONFIG_MACH_VR41XX is not set 25# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 26# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_QEMU is not set 27# CONFIG_QEMU is not set
41# CONFIG_MARKEINS is not set
42# CONFIG_SGI_IP22 is not set 28# CONFIG_SGI_IP22 is not set
43# CONFIG_SGI_IP27 is not set 29# CONFIG_SGI_IP27 is not set
44# CONFIG_SGI_IP32 is not set 30# CONFIG_SGI_IP32 is not set
45# CONFIG_SIBYTE_BIGSUR is not set 31# CONFIG_SIBYTE_CRHINE is not set
32# CONFIG_SIBYTE_CARMEL is not set
33# CONFIG_SIBYTE_CRHONE is not set
34# CONFIG_SIBYTE_RHONE is not set
46# CONFIG_SIBYTE_SWARM is not set 35# CONFIG_SIBYTE_SWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set
47# CONFIG_SIBYTE_SENTOSA is not set 37# CONFIG_SIBYTE_SENTOSA is not set
48# CONFIG_SIBYTE_RHONE is not set
49# CONFIG_SIBYTE_CARMEL is not set
50# CONFIG_SIBYTE_PTSWARM is not set 38# CONFIG_SIBYTE_PTSWARM is not set
51# CONFIG_SIBYTE_LITTLESUR is not set 39# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_CRHINE is not set
53# CONFIG_SIBYTE_CRHONE is not set
54# CONFIG_SNI_RM is not set 40# CONFIG_SNI_RM is not set
55CONFIG_TOSHIBA_JMR3927=y 41CONFIG_TOSHIBA_JMR3927=y
56# CONFIG_TOSHIBA_RBTX4927 is not set 42# CONFIG_TOSHIBA_RBTX4927 is not set
57# CONFIG_TOSHIBA_RBTX4938 is not set 43# CONFIG_TOSHIBA_RBTX4938 is not set
44# CONFIG_WR_PPMC is not set
58CONFIG_RWSEM_GENERIC_SPINLOCK=y 45CONFIG_RWSEM_GENERIC_SPINLOCK=y
59# CONFIG_ARCH_HAS_ILOG2_U32 is not set 46# CONFIG_ARCH_HAS_ILOG2_U32 is not set
60# CONFIG_ARCH_HAS_ILOG2_U64 is not set 47# CONFIG_ARCH_HAS_ILOG2_U64 is not set
@@ -66,10 +53,12 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
66CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 53CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
67CONFIG_DMA_NONCOHERENT=y 54CONFIG_DMA_NONCOHERENT=y
68CONFIG_DMA_NEED_PCI_MAP_STATE=y 55CONFIG_DMA_NEED_PCI_MAP_STATE=y
56# CONFIG_NO_IOPORT is not set
69CONFIG_CPU_BIG_ENDIAN=y 57CONFIG_CPU_BIG_ENDIAN=y
70# CONFIG_CPU_LITTLE_ENDIAN is not set 58# CONFIG_CPU_LITTLE_ENDIAN is not set
71CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 59CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
72CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 60CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
61CONFIG_IRQ_TXX9=y
73CONFIG_MIPS_TX3927=y 62CONFIG_MIPS_TX3927=y
74CONFIG_SWAP_IO_SPACE=y 63CONFIG_SWAP_IO_SPACE=y
75CONFIG_MIPS_L1_CACHE_SHIFT=5 64CONFIG_MIPS_L1_CACHE_SHIFT=5
@@ -77,6 +66,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
77# 66#
78# CPU selection 67# CPU selection
79# 68#
69# CONFIG_CPU_LOONGSON2 is not set
80# CONFIG_CPU_MIPS32_R1 is not set 70# CONFIG_CPU_MIPS32_R1 is not set
81# CONFIG_CPU_MIPS32_R2 is not set 71# CONFIG_CPU_MIPS32_R2 is not set
82# CONFIG_CPU_MIPS64_R1 is not set 72# CONFIG_CPU_MIPS64_R1 is not set
@@ -112,21 +102,17 @@ CONFIG_PAGE_SIZE_4KB=y
112CONFIG_MIPS_MT_DISABLED=y 102CONFIG_MIPS_MT_DISABLED=y
113# CONFIG_MIPS_MT_SMP is not set 103# CONFIG_MIPS_MT_SMP is not set
114# CONFIG_MIPS_MT_SMTC is not set 104# CONFIG_MIPS_MT_SMTC is not set
115# CONFIG_MIPS_VPE_LOADER is not set
116CONFIG_CPU_HAS_SYNC=y 105CONFIG_CPU_HAS_SYNC=y
117CONFIG_GENERIC_HARDIRQS=y 106CONFIG_GENERIC_HARDIRQS=y
118CONFIG_GENERIC_IRQ_PROBE=y 107CONFIG_GENERIC_IRQ_PROBE=y
119CONFIG_ARCH_FLATMEM_ENABLE=y 108CONFIG_ARCH_FLATMEM_ENABLE=y
120CONFIG_SELECT_MEMORY_MODEL=y
121CONFIG_FLATMEM_MANUAL=y
122# CONFIG_DISCONTIGMEM_MANUAL is not set
123# CONFIG_SPARSEMEM_MANUAL is not set
124CONFIG_FLATMEM=y 109CONFIG_FLATMEM=y
125CONFIG_FLAT_NODE_MEM_MAP=y 110CONFIG_FLAT_NODE_MEM_MAP=y
126# CONFIG_SPARSEMEM_STATIC is not set 111# CONFIG_SPARSEMEM_STATIC is not set
127CONFIG_SPLIT_PTLOCK_CPUS=4 112CONFIG_SPLIT_PTLOCK_CPUS=4
128# CONFIG_RESOURCES_64BIT is not set 113# CONFIG_RESOURCES_64BIT is not set
129CONFIG_ZONE_DMA_FLAG=1 114CONFIG_ZONE_DMA_FLAG=0
115CONFIG_VIRT_TO_BUS=y
130# CONFIG_HZ_48 is not set 116# CONFIG_HZ_48 is not set
131# CONFIG_HZ_100 is not set 117# CONFIG_HZ_100 is not set
132# CONFIG_HZ_128 is not set 118# CONFIG_HZ_128 is not set
@@ -139,37 +125,30 @@ CONFIG_HZ=250
139CONFIG_PREEMPT_NONE=y 125CONFIG_PREEMPT_NONE=y
140# CONFIG_PREEMPT_VOLUNTARY is not set 126# CONFIG_PREEMPT_VOLUNTARY is not set
141# CONFIG_PREEMPT is not set 127# CONFIG_PREEMPT is not set
142# CONFIG_KEXEC is not set 128# CONFIG_SECCOMP is not set
143CONFIG_LOCKDEP_SUPPORT=y 129CONFIG_LOCKDEP_SUPPORT=y
144CONFIG_STACKTRACE_SUPPORT=y 130CONFIG_STACKTRACE_SUPPORT=y
145CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 131CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
146 132
147# 133#
148# Code maturity level options 134# General setup
149# 135#
150CONFIG_EXPERIMENTAL=y 136# CONFIG_EXPERIMENTAL is not set
151CONFIG_BROKEN_ON_SMP=y 137CONFIG_BROKEN_ON_SMP=y
152CONFIG_INIT_ENV_ARG_LIMIT=32 138CONFIG_INIT_ENV_ARG_LIMIT=32
153
154#
155# General setup
156#
157CONFIG_LOCALVERSION="" 139CONFIG_LOCALVERSION=""
158CONFIG_LOCALVERSION_AUTO=y 140CONFIG_LOCALVERSION_AUTO=y
159CONFIG_SWAP=y 141CONFIG_SWAP=y
160CONFIG_SYSVIPC=y 142CONFIG_SYSVIPC=y
161# CONFIG_IPC_NS is not set
162CONFIG_SYSVIPC_SYSCTL=y 143CONFIG_SYSVIPC_SYSCTL=y
163# CONFIG_POSIX_MQUEUE is not set
164# CONFIG_BSD_PROCESS_ACCT is not set 144# CONFIG_BSD_PROCESS_ACCT is not set
165# CONFIG_TASKSTATS is not set 145# CONFIG_TASKSTATS is not set
166# CONFIG_UTS_NS is not set
167# CONFIG_AUDIT is not set 146# CONFIG_AUDIT is not set
168# CONFIG_IKCONFIG is not set 147# CONFIG_IKCONFIG is not set
148CONFIG_LOG_BUF_SHIFT=14
169CONFIG_SYSFS_DEPRECATED=y 149CONFIG_SYSFS_DEPRECATED=y
170# CONFIG_RELAY is not set 150# CONFIG_RELAY is not set
171# CONFIG_BLK_DEV_INITRD is not set 151# CONFIG_BLK_DEV_INITRD is not set
172# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
173CONFIG_SYSCTL=y 152CONFIG_SYSCTL=y
174CONFIG_EMBEDDED=y 153CONFIG_EMBEDDED=y
175CONFIG_SYSCTL_SYSCALL=y 154CONFIG_SYSCTL_SYSCALL=y
@@ -181,23 +160,20 @@ CONFIG_BUG=y
181CONFIG_ELF_CORE=y 160CONFIG_ELF_CORE=y
182CONFIG_BASE_FULL=y 161CONFIG_BASE_FULL=y
183CONFIG_FUTEX=y 162CONFIG_FUTEX=y
163CONFIG_ANON_INODES=y
184CONFIG_EPOLL=y 164CONFIG_EPOLL=y
165CONFIG_SIGNALFD=y
166CONFIG_TIMERFD=y
167CONFIG_EVENTFD=y
185CONFIG_SHMEM=y 168CONFIG_SHMEM=y
186CONFIG_SLAB=y
187CONFIG_VM_EVENT_COUNTERS=y 169CONFIG_VM_EVENT_COUNTERS=y
170CONFIG_SLAB=y
171# CONFIG_SLUB is not set
172# CONFIG_SLOB is not set
188CONFIG_RT_MUTEXES=y 173CONFIG_RT_MUTEXES=y
189# CONFIG_TINY_SHMEM is not set 174# CONFIG_TINY_SHMEM is not set
190CONFIG_BASE_SMALL=0 175CONFIG_BASE_SMALL=0
191# CONFIG_SLOB is not set
192
193#
194# Loadable module support
195#
196# CONFIG_MODULES is not set 176# CONFIG_MODULES is not set
197
198#
199# Block layer
200#
201CONFIG_BLOCK=y 177CONFIG_BLOCK=y
202# CONFIG_LBD is not set 178# CONFIG_LBD is not set
203# CONFIG_BLK_DEV_IO_TRACE is not set 179# CONFIG_BLK_DEV_IO_TRACE is not set
@@ -221,6 +197,7 @@ CONFIG_DEFAULT_IOSCHED="cfq"
221# 197#
222CONFIG_HW_HAS_PCI=y 198CONFIG_HW_HAS_PCI=y
223CONFIG_PCI=y 199CONFIG_PCI=y
200# CONFIG_ARCH_SUPPORTS_MSI is not set
224CONFIG_MMU=y 201CONFIG_MMU=y
225 202
226# 203#
@@ -228,10 +205,6 @@ CONFIG_MMU=y
228# 205#
229 206
230# 207#
231# PCI Hotplug Support
232#
233
234#
235# Executable file formats 208# Executable file formats
236# 209#
237CONFIG_BINFMT_ELF=y 210CONFIG_BINFMT_ELF=y
@@ -251,7 +224,6 @@ CONFIG_NET=y
251# 224#
252# Networking options 225# Networking options
253# 226#
254# CONFIG_NETDEBUG is not set
255CONFIG_PACKET=y 227CONFIG_PACKET=y
256# CONFIG_PACKET_MMAP is not set 228# CONFIG_PACKET_MMAP is not set
257CONFIG_UNIX=y 229CONFIG_UNIX=y
@@ -266,7 +238,6 @@ CONFIG_IP_PNP_BOOTP=y
266# CONFIG_IP_PNP_RARP is not set 238# CONFIG_IP_PNP_RARP is not set
267# CONFIG_NET_IPIP is not set 239# CONFIG_NET_IPIP is not set
268# CONFIG_NET_IPGRE is not set 240# CONFIG_NET_IPGRE is not set
269# CONFIG_ARPD is not set
270# CONFIG_SYN_COOKIES is not set 241# CONFIG_SYN_COOKIES is not set
271# CONFIG_INET_AH is not set 242# CONFIG_INET_AH is not set
272# CONFIG_INET_ESP is not set 243# CONFIG_INET_ESP is not set
@@ -280,38 +251,17 @@ CONFIG_IP_PNP_BOOTP=y
280# CONFIG_TCP_CONG_ADVANCED is not set 251# CONFIG_TCP_CONG_ADVANCED is not set
281CONFIG_TCP_CONG_CUBIC=y 252CONFIG_TCP_CONG_CUBIC=y
282CONFIG_DEFAULT_TCP_CONG="cubic" 253CONFIG_DEFAULT_TCP_CONG="cubic"
283# CONFIG_TCP_MD5SIG is not set
284# CONFIG_IPV6 is not set 254# CONFIG_IPV6 is not set
285# CONFIG_INET6_XFRM_TUNNEL is not set 255# CONFIG_INET6_XFRM_TUNNEL is not set
286# CONFIG_INET6_TUNNEL is not set 256# CONFIG_INET6_TUNNEL is not set
287# CONFIG_NETWORK_SECMARK is not set 257# CONFIG_NETWORK_SECMARK is not set
288# CONFIG_NETFILTER is not set 258# CONFIG_NETFILTER is not set
289
290#
291# DCCP Configuration (EXPERIMENTAL)
292#
293# CONFIG_IP_DCCP is not set
294
295#
296# SCTP Configuration (EXPERIMENTAL)
297#
298# CONFIG_IP_SCTP is not set
299
300#
301# TIPC Configuration (EXPERIMENTAL)
302#
303# CONFIG_TIPC is not set
304# CONFIG_ATM is not set
305# CONFIG_BRIDGE is not set 259# CONFIG_BRIDGE is not set
306# CONFIG_VLAN_8021Q is not set 260# CONFIG_VLAN_8021Q is not set
307# CONFIG_DECNET is not set 261# CONFIG_DECNET is not set
308# CONFIG_LLC2 is not set 262# CONFIG_LLC2 is not set
309# CONFIG_IPX is not set 263# CONFIG_IPX is not set
310# CONFIG_ATALK is not set 264# CONFIG_ATALK is not set
311# CONFIG_X25 is not set
312# CONFIG_LAPB is not set
313# CONFIG_ECONET is not set
314# CONFIG_WAN_ROUTER is not set
315 265
316# 266#
317# QoS and/or fair queueing 267# QoS and/or fair queueing
@@ -325,7 +275,14 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
325# CONFIG_HAMRADIO is not set 275# CONFIG_HAMRADIO is not set
326# CONFIG_IRDA is not set 276# CONFIG_IRDA is not set
327# CONFIG_BT is not set 277# CONFIG_BT is not set
278
279#
280# Wireless
281#
282# CONFIG_CFG80211 is not set
283# CONFIG_WIRELESS_EXT is not set
328# CONFIG_IEEE80211 is not set 284# CONFIG_IEEE80211 is not set
285# CONFIG_RFKILL is not set
329 286
330# 287#
331# Device Drivers 288# Device Drivers
@@ -337,34 +294,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
337CONFIG_STANDALONE=y 294CONFIG_STANDALONE=y
338CONFIG_PREVENT_FIRMWARE_BUILD=y 295CONFIG_PREVENT_FIRMWARE_BUILD=y
339# CONFIG_SYS_HYPERVISOR is not set 296# CONFIG_SYS_HYPERVISOR is not set
340
341#
342# Connector - unified userspace <-> kernelspace linker
343#
344# CONFIG_CONNECTOR is not set 297# CONFIG_CONNECTOR is not set
345
346#
347# Memory Technology Devices (MTD)
348#
349# CONFIG_MTD is not set 298# CONFIG_MTD is not set
350
351#
352# Parallel port support
353#
354# CONFIG_PARPORT is not set 299# CONFIG_PARPORT is not set
355 300CONFIG_BLK_DEV=y
356#
357# Plug and Play support
358#
359# CONFIG_PNPACPI is not set
360
361#
362# Block devices
363#
364# CONFIG_BLK_CPQ_DA is not set 301# CONFIG_BLK_CPQ_DA is not set
365# CONFIG_BLK_CPQ_CISS_DA is not set 302# CONFIG_BLK_CPQ_CISS_DA is not set
366# CONFIG_BLK_DEV_DAC960 is not set 303# CONFIG_BLK_DEV_DAC960 is not set
367# CONFIG_BLK_DEV_UMEM is not set
368# CONFIG_BLK_DEV_COW_COMMON is not set 304# CONFIG_BLK_DEV_COW_COMMON is not set
369# CONFIG_BLK_DEV_LOOP is not set 305# CONFIG_BLK_DEV_LOOP is not set
370# CONFIG_BLK_DEV_NBD is not set 306# CONFIG_BLK_DEV_NBD is not set
@@ -372,16 +308,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
372# CONFIG_BLK_DEV_RAM is not set 308# CONFIG_BLK_DEV_RAM is not set
373# CONFIG_CDROM_PKTCDVD is not set 309# CONFIG_CDROM_PKTCDVD is not set
374# CONFIG_ATA_OVER_ETH is not set 310# CONFIG_ATA_OVER_ETH is not set
375 311# CONFIG_MISC_DEVICES is not set
376#
377# Misc devices
378#
379# CONFIG_SGI_IOC4 is not set
380# CONFIG_TIFM_CORE is not set
381
382#
383# ATA/ATAPI/MFM/RLL support
384#
385# CONFIG_IDE is not set 312# CONFIG_IDE is not set
386 313
387# 314#
@@ -389,16 +316,9 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
389# 316#
390# CONFIG_RAID_ATTRS is not set 317# CONFIG_RAID_ATTRS is not set
391# CONFIG_SCSI is not set 318# CONFIG_SCSI is not set
319# CONFIG_SCSI_DMA is not set
392# CONFIG_SCSI_NETLINK is not set 320# CONFIG_SCSI_NETLINK is not set
393
394#
395# Serial ATA (prod) and Parallel ATA (experimental) drivers
396#
397# CONFIG_ATA is not set 321# CONFIG_ATA is not set
398
399#
400# Multi-device support (RAID and LVM)
401#
402# CONFIG_MD is not set 322# CONFIG_MD is not set
403 323
404# 324#
@@ -409,46 +329,28 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
409# 329#
410# IEEE 1394 (FireWire) support 330# IEEE 1394 (FireWire) support
411# 331#
412# CONFIG_IEEE1394 is not set
413 332
414# 333#
415# I2O device support 334# An alternative FireWire stack is available with EXPERIMENTAL=y
416# 335#
336# CONFIG_IEEE1394 is not set
417# CONFIG_I2O is not set 337# CONFIG_I2O is not set
418
419#
420# Network device support
421#
422CONFIG_NETDEVICES=y 338CONFIG_NETDEVICES=y
339# CONFIG_NETDEVICES_MULTIQUEUE is not set
423# CONFIG_DUMMY is not set 340# CONFIG_DUMMY is not set
424# CONFIG_BONDING is not set 341# CONFIG_BONDING is not set
425# CONFIG_EQUALIZER is not set 342# CONFIG_EQUALIZER is not set
426# CONFIG_TUN is not set 343# CONFIG_TUN is not set
427
428#
429# ARCnet devices
430#
431# CONFIG_ARCNET is not set 344# CONFIG_ARCNET is not set
432
433#
434# PHY device support
435#
436# CONFIG_PHYLIB is not set 345# CONFIG_PHYLIB is not set
437
438#
439# Ethernet (10 or 100Mbit)
440#
441CONFIG_NET_ETHERNET=y 346CONFIG_NET_ETHERNET=y
442CONFIG_MII=y 347CONFIG_MII=y
348# CONFIG_AX88796 is not set
443# CONFIG_HAPPYMEAL is not set 349# CONFIG_HAPPYMEAL is not set
444# CONFIG_SUNGEM is not set 350# CONFIG_SUNGEM is not set
445# CONFIG_CASSINI is not set 351# CONFIG_CASSINI is not set
446# CONFIG_NET_VENDOR_3COM is not set 352# CONFIG_NET_VENDOR_3COM is not set
447# CONFIG_DM9000 is not set 353# CONFIG_DM9000 is not set
448
449#
450# Tulip family network device support
451#
452# CONFIG_NET_TULIP is not set 354# CONFIG_NET_TULIP is not set
453# CONFIG_HP100 is not set 355# CONFIG_HP100 is not set
454CONFIG_NET_PCI=y 356CONFIG_NET_PCI=y
@@ -464,76 +366,28 @@ CONFIG_TC35815=y
464# CONFIG_FEALNX is not set 366# CONFIG_FEALNX is not set
465# CONFIG_NATSEMI is not set 367# CONFIG_NATSEMI is not set
466# CONFIG_NE2K_PCI is not set 368# CONFIG_NE2K_PCI is not set
467# CONFIG_8139CP is not set
468# CONFIG_8139TOO is not set 369# CONFIG_8139TOO is not set
469# CONFIG_SIS900 is not set 370# CONFIG_SIS900 is not set
470# CONFIG_EPIC100 is not set 371# CONFIG_EPIC100 is not set
471# CONFIG_SUNDANCE is not set 372# CONFIG_SUNDANCE is not set
472# CONFIG_TLAN is not set 373# CONFIG_TLAN is not set
473# CONFIG_VIA_RHINE is not set 374# CONFIG_VIA_RHINE is not set
474# CONFIG_SC92031 is not set 375# CONFIG_NETDEV_1000 is not set
475 376# CONFIG_NETDEV_10000 is not set
476#
477# Ethernet (1000 Mbit)
478#
479# CONFIG_ACENIC is not set
480# CONFIG_DL2K is not set
481# CONFIG_E1000 is not set
482# CONFIG_NS83820 is not set
483# CONFIG_HAMACHI is not set
484# CONFIG_YELLOWFIN is not set
485# CONFIG_R8169 is not set
486# CONFIG_SIS190 is not set
487# CONFIG_SKGE is not set
488# CONFIG_SKY2 is not set
489# CONFIG_SK98LIN is not set
490# CONFIG_VIA_VELOCITY is not set
491# CONFIG_TIGON3 is not set
492# CONFIG_BNX2 is not set
493# CONFIG_QLA3XXX is not set
494# CONFIG_ATL1 is not set
495
496#
497# Ethernet (10000 Mbit)
498#
499# CONFIG_CHELSIO_T1 is not set
500# CONFIG_CHELSIO_T3 is not set
501# CONFIG_IXGB is not set
502# CONFIG_S2IO is not set
503# CONFIG_MYRI10GE is not set
504# CONFIG_NETXEN_NIC is not set
505
506#
507# Token Ring devices
508#
509# CONFIG_TR is not set 377# CONFIG_TR is not set
510 378
511# 379#
512# Wireless LAN (non-hamradio) 380# Wireless LAN
513#
514# CONFIG_NET_RADIO is not set
515
516#
517# Wan interfaces
518# 381#
382# CONFIG_WLAN_PRE80211 is not set
383# CONFIG_WLAN_80211 is not set
519# CONFIG_WAN is not set 384# CONFIG_WAN is not set
520# CONFIG_FDDI is not set 385# CONFIG_FDDI is not set
521# CONFIG_HIPPI is not set
522# CONFIG_PPP is not set 386# CONFIG_PPP is not set
523# CONFIG_SLIP is not set 387# CONFIG_SLIP is not set
524# CONFIG_SHAPER is not set
525# CONFIG_NETCONSOLE is not set
526# CONFIG_NETPOLL is not set 388# CONFIG_NETPOLL is not set
527# CONFIG_NET_POLL_CONTROLLER is not set 389# CONFIG_NET_POLL_CONTROLLER is not set
528
529#
530# ISDN subsystem
531#
532# CONFIG_ISDN is not set 390# CONFIG_ISDN is not set
533
534#
535# Telephony Support
536#
537# CONFIG_PHONE is not set 391# CONFIG_PHONE is not set
538 392
539# 393#
@@ -541,6 +395,7 @@ CONFIG_TC35815=y
541# 395#
542CONFIG_INPUT=y 396CONFIG_INPUT=y
543# CONFIG_INPUT_FF_MEMLESS is not set 397# CONFIG_INPUT_FF_MEMLESS is not set
398# CONFIG_INPUT_POLLDEV is not set
544 399
545# 400#
546# Userland interfaces 401# Userland interfaces
@@ -557,6 +412,7 @@ CONFIG_INPUT=y
557# CONFIG_INPUT_KEYBOARD is not set 412# CONFIG_INPUT_KEYBOARD is not set
558# CONFIG_INPUT_MOUSE is not set 413# CONFIG_INPUT_MOUSE is not set
559# CONFIG_INPUT_JOYSTICK is not set 414# CONFIG_INPUT_JOYSTICK is not set
415# CONFIG_INPUT_TABLET is not set
560# CONFIG_INPUT_TOUCHSCREEN is not set 416# CONFIG_INPUT_TOUCHSCREEN is not set
561# CONFIG_INPUT_MISC is not set 417# CONFIG_INPUT_MISC is not set
562 418
@@ -607,33 +463,15 @@ CONFIG_SERIAL_TXX9_STDSERIAL=y
607# CONFIG_UNIX98_PTYS is not set 463# CONFIG_UNIX98_PTYS is not set
608CONFIG_LEGACY_PTYS=y 464CONFIG_LEGACY_PTYS=y
609CONFIG_LEGACY_PTY_COUNT=256 465CONFIG_LEGACY_PTY_COUNT=256
610
611#
612# IPMI
613#
614# CONFIG_IPMI_HANDLER is not set 466# CONFIG_IPMI_HANDLER is not set
615
616#
617# Watchdog Cards
618#
619# CONFIG_WATCHDOG is not set 467# CONFIG_WATCHDOG is not set
620# CONFIG_HW_RANDOM is not set 468# CONFIG_HW_RANDOM is not set
621# CONFIG_RTC is not set 469# CONFIG_RTC is not set
622# CONFIG_GEN_RTC is not set
623# CONFIG_DTLK is not set
624# CONFIG_R3964 is not set 470# CONFIG_R3964 is not set
625# CONFIG_APPLICOM is not set 471# CONFIG_APPLICOM is not set
626# CONFIG_DRM is not set 472# CONFIG_DRM is not set
627# CONFIG_RAW_DRIVER is not set 473# CONFIG_RAW_DRIVER is not set
628 474CONFIG_DEVPORT=y
629#
630# TPM devices
631#
632# CONFIG_TCG_TPM is not set
633
634#
635# I2C support
636#
637# CONFIG_I2C is not set 475# CONFIG_I2C is not set
638 476
639# 477#
@@ -641,17 +479,9 @@ CONFIG_LEGACY_PTY_COUNT=256
641# 479#
642# CONFIG_SPI is not set 480# CONFIG_SPI is not set
643# CONFIG_SPI_MASTER is not set 481# CONFIG_SPI_MASTER is not set
644
645#
646# Dallas's 1-wire bus
647#
648# CONFIG_W1 is not set 482# CONFIG_W1 is not set
649 483# CONFIG_POWER_SUPPLY is not set
650#
651# Hardware Monitoring support
652#
653# CONFIG_HWMON is not set 484# CONFIG_HWMON is not set
654# CONFIG_HWMON_VID is not set
655 485
656# 486#
657# Multifunction device drivers 487# Multifunction device drivers
@@ -662,75 +492,31 @@ CONFIG_LEGACY_PTY_COUNT=256
662# Multimedia devices 492# Multimedia devices
663# 493#
664# CONFIG_VIDEO_DEV is not set 494# CONFIG_VIDEO_DEV is not set
495# CONFIG_DVB_CORE is not set
496# CONFIG_DAB is not set
665 497
666# 498#
667# Digital Video Broadcasting Devices 499# Graphics support
668# 500#
669# CONFIG_DVB is not set 501# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
670 502
671# 503#
672# Graphics support 504# Display device support
673# 505#
674# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 506# CONFIG_DISPLAY_SUPPORT is not set
507# CONFIG_VGASTATE is not set
508# CONFIG_VIDEO_OUTPUT_CONTROL is not set
675# CONFIG_FB is not set 509# CONFIG_FB is not set
676 510
677# 511#
678# Sound 512# Sound
679# 513#
680# CONFIG_SOUND is not set 514# CONFIG_SOUND is not set
681 515# CONFIG_HID_SUPPORT is not set
682# 516# CONFIG_USB_SUPPORT is not set
683# HID Devices
684#
685# CONFIG_HID is not set
686
687#
688# USB support
689#
690CONFIG_USB_ARCH_HAS_HCD=y
691CONFIG_USB_ARCH_HAS_OHCI=y
692CONFIG_USB_ARCH_HAS_EHCI=y
693# CONFIG_USB is not set
694
695#
696# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
697#
698
699#
700# USB Gadget Support
701#
702# CONFIG_USB_GADGET is not set
703
704#
705# MMC/SD Card support
706#
707# CONFIG_MMC is not set 517# CONFIG_MMC is not set
708
709#
710# LED devices
711#
712# CONFIG_NEW_LEDS is not set 518# CONFIG_NEW_LEDS is not set
713
714#
715# LED drivers
716#
717
718#
719# LED Triggers
720#
721
722#
723# InfiniBand support
724#
725# CONFIG_INFINIBAND is not set 519# CONFIG_INFINIBAND is not set
726
727#
728# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
729#
730
731#
732# Real Time Clock
733#
734CONFIG_RTC_LIB=y 520CONFIG_RTC_LIB=y
735CONFIG_RTC_CLASS=y 521CONFIG_RTC_CLASS=y
736CONFIG_RTC_HCTOSYS=y 522CONFIG_RTC_HCTOSYS=y
@@ -744,17 +530,28 @@ CONFIG_RTC_INTF_SYSFS=y
744CONFIG_RTC_INTF_PROC=y 530CONFIG_RTC_INTF_PROC=y
745CONFIG_RTC_INTF_DEV=y 531CONFIG_RTC_INTF_DEV=y
746# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 532# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
533# CONFIG_RTC_DRV_TEST is not set
534
535#
536# SPI RTC drivers
537#
747 538
748# 539#
749# RTC drivers 540# Platform RTC drivers
750# 541#
542# CONFIG_RTC_DRV_CMOS is not set
751# CONFIG_RTC_DRV_DS1553 is not set 543# CONFIG_RTC_DRV_DS1553 is not set
544# CONFIG_RTC_DRV_STK17TA8 is not set
752CONFIG_RTC_DRV_DS1742=y 545CONFIG_RTC_DRV_DS1742=y
753# CONFIG_RTC_DRV_M48T86 is not set 546# CONFIG_RTC_DRV_M48T86 is not set
754# CONFIG_RTC_DRV_TEST is not set 547# CONFIG_RTC_DRV_M48T59 is not set
755# CONFIG_RTC_DRV_V3020 is not set 548# CONFIG_RTC_DRV_V3020 is not set
756 549
757# 550#
551# on-CPU RTC drivers
552#
553
554#
758# DMA Engine support 555# DMA Engine support
759# 556#
760# CONFIG_DMA_ENGINE is not set 557# CONFIG_DMA_ENGINE is not set
@@ -768,24 +565,19 @@ CONFIG_RTC_DRV_DS1742=y
768# 565#
769 566
770# 567#
771# Auxiliary Display support 568# Userspace I/O
772#
773
774#
775# Virtualization
776# 569#
570# CONFIG_UIO is not set
777 571
778# 572#
779# File systems 573# File systems
780# 574#
781# CONFIG_EXT2_FS is not set 575# CONFIG_EXT2_FS is not set
782# CONFIG_EXT3_FS is not set 576# CONFIG_EXT3_FS is not set
783# CONFIG_EXT4DEV_FS is not set
784# CONFIG_REISERFS_FS is not set 577# CONFIG_REISERFS_FS is not set
785# CONFIG_JFS_FS is not set 578# CONFIG_JFS_FS is not set
786# CONFIG_FS_POSIX_ACL is not set 579# CONFIG_FS_POSIX_ACL is not set
787# CONFIG_XFS_FS is not set 580# CONFIG_XFS_FS is not set
788# CONFIG_GFS2_FS is not set
789# CONFIG_OCFS2_FS is not set 581# CONFIG_OCFS2_FS is not set
790# CONFIG_MINIX_FS is not set 582# CONFIG_MINIX_FS is not set
791# CONFIG_ROMFS_FS is not set 583# CONFIG_ROMFS_FS is not set
@@ -820,18 +612,11 @@ CONFIG_SYSFS=y
820# CONFIG_TMPFS is not set 612# CONFIG_TMPFS is not set
821# CONFIG_HUGETLB_PAGE is not set 613# CONFIG_HUGETLB_PAGE is not set
822CONFIG_RAMFS=y 614CONFIG_RAMFS=y
823# CONFIG_CONFIGFS_FS is not set
824 615
825# 616#
826# Miscellaneous filesystems 617# Miscellaneous filesystems
827# 618#
828# CONFIG_ADFS_FS is not set
829# CONFIG_AFFS_FS is not set
830# CONFIG_HFS_FS is not set
831# CONFIG_HFSPLUS_FS is not set 619# CONFIG_HFSPLUS_FS is not set
832# CONFIG_BEFS_FS is not set
833# CONFIG_BFS_FS is not set
834# CONFIG_EFS_FS is not set
835# CONFIG_CRAMFS is not set 620# CONFIG_CRAMFS is not set
836# CONFIG_VXFS_FS is not set 621# CONFIG_VXFS_FS is not set
837# CONFIG_HPFS_FS is not set 622# CONFIG_HPFS_FS is not set
@@ -844,21 +629,16 @@ CONFIG_RAMFS=y
844# 629#
845CONFIG_NFS_FS=y 630CONFIG_NFS_FS=y
846# CONFIG_NFS_V3 is not set 631# CONFIG_NFS_V3 is not set
847# CONFIG_NFS_V4 is not set
848# CONFIG_NFS_DIRECTIO is not set 632# CONFIG_NFS_DIRECTIO is not set
849# CONFIG_NFSD is not set 633# CONFIG_NFSD is not set
850CONFIG_ROOT_NFS=y 634CONFIG_ROOT_NFS=y
851CONFIG_LOCKD=y 635CONFIG_LOCKD=y
852CONFIG_NFS_COMMON=y 636CONFIG_NFS_COMMON=y
853CONFIG_SUNRPC=y 637CONFIG_SUNRPC=y
854# CONFIG_RPCSEC_GSS_KRB5 is not set
855# CONFIG_RPCSEC_GSS_SPKM3 is not set
856# CONFIG_SMB_FS is not set 638# CONFIG_SMB_FS is not set
857# CONFIG_CIFS is not set 639# CONFIG_CIFS is not set
858# CONFIG_NCP_FS is not set 640# CONFIG_NCP_FS is not set
859# CONFIG_CODA_FS is not set 641# CONFIG_CODA_FS is not set
860# CONFIG_AFS_FS is not set
861# CONFIG_9P_FS is not set
862 642
863# 643#
864# Partition Types 644# Partition Types
@@ -872,16 +652,6 @@ CONFIG_MSDOS_PARTITION=y
872# CONFIG_NLS is not set 652# CONFIG_NLS is not set
873 653
874# 654#
875# Distributed Lock Manager
876#
877# CONFIG_DLM is not set
878
879#
880# Profiling support
881#
882# CONFIG_PROFILING is not set
883
884#
885# Kernel hacking 655# Kernel hacking
886# 656#
887CONFIG_TRACE_IRQFLAGS_SUPPORT=y 657CONFIG_TRACE_IRQFLAGS_SUPPORT=y
@@ -892,7 +662,6 @@ CONFIG_ENABLE_MUST_CHECK=y
892# CONFIG_DEBUG_FS is not set 662# CONFIG_DEBUG_FS is not set
893# CONFIG_HEADERS_CHECK is not set 663# CONFIG_HEADERS_CHECK is not set
894# CONFIG_DEBUG_KERNEL is not set 664# CONFIG_DEBUG_KERNEL is not set
895CONFIG_LOG_BUF_SHIFT=14
896CONFIG_CROSSCOMPILE=y 665CONFIG_CROSSCOMPILE=y
897CONFIG_CMDLINE="" 666CONFIG_CMDLINE=""
898 667
@@ -901,10 +670,6 @@ CONFIG_CMDLINE=""
901# 670#
902# CONFIG_KEYS is not set 671# CONFIG_KEYS is not set
903# CONFIG_SECURITY is not set 672# CONFIG_SECURITY is not set
904
905#
906# Cryptographic options
907#
908# CONFIG_CRYPTO is not set 673# CONFIG_CRYPTO is not set
909 674
910# 675#
@@ -913,8 +678,11 @@ CONFIG_CMDLINE=""
913CONFIG_BITREVERSE=y 678CONFIG_BITREVERSE=y
914# CONFIG_CRC_CCITT is not set 679# CONFIG_CRC_CCITT is not set
915# CONFIG_CRC16 is not set 680# CONFIG_CRC16 is not set
681# CONFIG_CRC_ITU_T is not set
916CONFIG_CRC32=y 682CONFIG_CRC32=y
683# CONFIG_CRC7 is not set
917# CONFIG_LIBCRC32C is not set 684# CONFIG_LIBCRC32C is not set
918CONFIG_PLIST=y 685CONFIG_PLIST=y
919CONFIG_HAS_IOMEM=y 686CONFIG_HAS_IOMEM=y
920CONFIG_HAS_IOPORT=y 687CONFIG_HAS_IOPORT=y
688CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index fbfa568588..fbd2d802fd 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20 3# Linux kernel version: 2.6.23-rc2
4# Sun Feb 18 21:27:55 2007 4# Tue Aug 7 12:59:29 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -9,52 +9,40 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
12# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MACH_ALCHEMY is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 13# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 14# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 15# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 16# CONFIG_MACH_JAZZ is not set
17# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 18# CONFIG_MIPS_ATLAS is not set
30CONFIG_MIPS_MALTA=y 19CONFIG_MIPS_MALTA=y
31# CONFIG_MIPS_SEAD is not set 20# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 21# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 22# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 23# CONFIG_MACH_VR41XX is not set
36# CONFIG_PNX8550_JBS is not set 24# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 25# CONFIG_PNX8550_STB810 is not set
38# CONFIG_MACH_VR41XX is not set 26# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 27# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_QEMU is not set 28# CONFIG_QEMU is not set
41# CONFIG_MARKEINS is not set
42# CONFIG_SGI_IP22 is not set 29# CONFIG_SGI_IP22 is not set
43# CONFIG_SGI_IP27 is not set 30# CONFIG_SGI_IP27 is not set
44# CONFIG_SGI_IP32 is not set 31# CONFIG_SGI_IP32 is not set
45# CONFIG_SIBYTE_BIGSUR is not set 32# CONFIG_SIBYTE_CRHINE is not set
33# CONFIG_SIBYTE_CARMEL is not set
34# CONFIG_SIBYTE_CRHONE is not set
35# CONFIG_SIBYTE_RHONE is not set
46# CONFIG_SIBYTE_SWARM is not set 36# CONFIG_SIBYTE_SWARM is not set
37# CONFIG_SIBYTE_LITTLESUR is not set
47# CONFIG_SIBYTE_SENTOSA is not set 38# CONFIG_SIBYTE_SENTOSA is not set
48# CONFIG_SIBYTE_RHONE is not set
49# CONFIG_SIBYTE_CARMEL is not set
50# CONFIG_SIBYTE_PTSWARM is not set 39# CONFIG_SIBYTE_PTSWARM is not set
51# CONFIG_SIBYTE_LITTLESUR is not set 40# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_CRHINE is not set
53# CONFIG_SIBYTE_CRHONE is not set
54# CONFIG_SNI_RM is not set 41# CONFIG_SNI_RM is not set
55# CONFIG_TOSHIBA_JMR3927 is not set 42# CONFIG_TOSHIBA_JMR3927 is not set
56# CONFIG_TOSHIBA_RBTX4927 is not set 43# CONFIG_TOSHIBA_RBTX4927 is not set
57# CONFIG_TOSHIBA_RBTX4938 is not set 44# CONFIG_TOSHIBA_RBTX4938 is not set
45# CONFIG_WR_PPMC is not set
58CONFIG_RWSEM_GENERIC_SPINLOCK=y 46CONFIG_RWSEM_GENERIC_SPINLOCK=y
59# CONFIG_ARCH_HAS_ILOG2_U32 is not set 47# CONFIG_ARCH_HAS_ILOG2_U32 is not set
60# CONFIG_ARCH_HAS_ILOG2_U64 is not set 48# CONFIG_ARCH_HAS_ILOG2_U64 is not set
@@ -67,25 +55,28 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
67CONFIG_ARCH_MAY_HAVE_PC_FDC=y 55CONFIG_ARCH_MAY_HAVE_PC_FDC=y
68CONFIG_DMA_NONCOHERENT=y 56CONFIG_DMA_NONCOHERENT=y
69CONFIG_DMA_NEED_PCI_MAP_STATE=y 57CONFIG_DMA_NEED_PCI_MAP_STATE=y
58CONFIG_EARLY_PRINTK=y
59CONFIG_SYS_HAS_EARLY_PRINTK=y
70CONFIG_GENERIC_ISA_DMA=y 60CONFIG_GENERIC_ISA_DMA=y
71CONFIG_I8259=y 61CONFIG_I8259=y
72CONFIG_MIPS_BONITO64=y 62CONFIG_MIPS_BONITO64=y
73CONFIG_MIPS_MSC=y 63CONFIG_MIPS_MSC=y
64# CONFIG_NO_IOPORT is not set
74# CONFIG_CPU_BIG_ENDIAN is not set 65# CONFIG_CPU_BIG_ENDIAN is not set
75CONFIG_CPU_LITTLE_ENDIAN=y 66CONFIG_CPU_LITTLE_ENDIAN=y
76CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 67CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
77CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 68CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
78CONFIG_IRQ_CPU=y 69CONFIG_IRQ_CPU=y
79CONFIG_MIPS_BOARDS_GEN=y 70CONFIG_MIPS_BOARDS_GEN=y
80CONFIG_MIPS_GT64120=y 71CONFIG_PCI_GT64XXX_PCI0=y
81CONFIG_SWAP_IO_SPACE=y 72CONFIG_SWAP_IO_SPACE=y
82CONFIG_BOOT_ELF32=y 73CONFIG_BOOT_ELF32=y
83CONFIG_MIPS_L1_CACHE_SHIFT=5 74CONFIG_MIPS_L1_CACHE_SHIFT=5
84CONFIG_HAVE_STD_PC_SERIAL_PORT=y
85 75
86# 76#
87# CPU selection 77# CPU selection
88# 78#
79# CONFIG_CPU_LOONGSON2 is not set
89# CONFIG_CPU_MIPS32_R1 is not set 80# CONFIG_CPU_MIPS32_R1 is not set
90CONFIG_CPU_MIPS32_R2=y 81CONFIG_CPU_MIPS32_R2=y
91# CONFIG_CPU_MIPS64_R1 is not set 82# CONFIG_CPU_MIPS64_R1 is not set
@@ -131,14 +122,14 @@ CONFIG_CPU_HAS_PREFETCH=y
131# CONFIG_MIPS_MT_DISABLED is not set 122# CONFIG_MIPS_MT_DISABLED is not set
132CONFIG_MIPS_MT_SMP=y 123CONFIG_MIPS_MT_SMP=y
133# CONFIG_MIPS_MT_SMTC is not set 124# CONFIG_MIPS_MT_SMTC is not set
134# CONFIG_MIPS_VPE_LOADER is not set
135CONFIG_MIPS_MT=y 125CONFIG_MIPS_MT=y
136CONFIG_SYS_SUPPORTS_MULTITHREADING=y 126CONFIG_SYS_SUPPORTS_MULTITHREADING=y
137CONFIG_MIPS_MT_FPAFF=y 127CONFIG_MIPS_MT_FPAFF=y
138# CONFIG_64BIT_PHYS_ADDR is not set 128# CONFIG_MIPS_VPE_LOADER is not set
139CONFIG_CPU_HAS_LLSC=y 129CONFIG_CPU_HAS_LLSC=y
140# CONFIG_CPU_HAS_SMARTMIPS is not set 130# CONFIG_CPU_HAS_SMARTMIPS is not set
141CONFIG_CPU_MIPSR2_IRQ_VI=y 131CONFIG_CPU_MIPSR2_IRQ_VI=y
132CONFIG_CPU_MIPSR2_IRQ_EI=y
142CONFIG_CPU_MIPSR2_SRS=y 133CONFIG_CPU_MIPSR2_SRS=y
143CONFIG_CPU_HAS_SYNC=y 134CONFIG_CPU_HAS_SYNC=y
144CONFIG_GENERIC_HARDIRQS=y 135CONFIG_GENERIC_HARDIRQS=y
@@ -157,8 +148,11 @@ CONFIG_FLAT_NODE_MEM_MAP=y
157CONFIG_SPLIT_PTLOCK_CPUS=4 148CONFIG_SPLIT_PTLOCK_CPUS=4
158# CONFIG_RESOURCES_64BIT is not set 149# CONFIG_RESOURCES_64BIT is not set
159CONFIG_ZONE_DMA_FLAG=1 150CONFIG_ZONE_DMA_FLAG=1
151CONFIG_BOUNCE=y
152CONFIG_VIRT_TO_BUS=y
160CONFIG_SMP=y 153CONFIG_SMP=y
161CONFIG_SYS_SUPPORTS_SMP=y 154CONFIG_SYS_SUPPORTS_SMP=y
155CONFIG_NR_CPUS_DEFAULT_2=y
162CONFIG_NR_CPUS=2 156CONFIG_NR_CPUS=2
163# CONFIG_HZ_48 is not set 157# CONFIG_HZ_48 is not set
164CONFIG_HZ_100=y 158CONFIG_HZ_100=y
@@ -174,35 +168,33 @@ CONFIG_PREEMPT_NONE=y
174# CONFIG_PREEMPT is not set 168# CONFIG_PREEMPT is not set
175CONFIG_PREEMPT_BKL=y 169CONFIG_PREEMPT_BKL=y
176# CONFIG_KEXEC is not set 170# CONFIG_KEXEC is not set
171CONFIG_SECCOMP=y
177CONFIG_LOCKDEP_SUPPORT=y 172CONFIG_LOCKDEP_SUPPORT=y
178CONFIG_STACKTRACE_SUPPORT=y 173CONFIG_STACKTRACE_SUPPORT=y
179CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 174CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
180 175
181# 176#
182# Code maturity level options 177# General setup
183# 178#
184CONFIG_EXPERIMENTAL=y 179CONFIG_EXPERIMENTAL=y
185CONFIG_LOCK_KERNEL=y 180CONFIG_LOCK_KERNEL=y
186CONFIG_INIT_ENV_ARG_LIMIT=32 181CONFIG_INIT_ENV_ARG_LIMIT=32
187
188#
189# General setup
190#
191CONFIG_LOCALVERSION="" 182CONFIG_LOCALVERSION=""
192CONFIG_LOCALVERSION_AUTO=y 183CONFIG_LOCALVERSION_AUTO=y
193CONFIG_SWAP=y 184CONFIG_SWAP=y
194CONFIG_SYSVIPC=y 185CONFIG_SYSVIPC=y
195# CONFIG_IPC_NS is not set
196CONFIG_SYSVIPC_SYSCTL=y 186CONFIG_SYSVIPC_SYSCTL=y
197# CONFIG_POSIX_MQUEUE is not set 187# CONFIG_POSIX_MQUEUE is not set
198# CONFIG_BSD_PROCESS_ACCT is not set 188# CONFIG_BSD_PROCESS_ACCT is not set
199# CONFIG_TASKSTATS is not set 189# CONFIG_TASKSTATS is not set
200# CONFIG_UTS_NS is not set 190# CONFIG_USER_NS is not set
201# CONFIG_AUDIT is not set 191# CONFIG_AUDIT is not set
202# CONFIG_IKCONFIG is not set 192# CONFIG_IKCONFIG is not set
193CONFIG_LOG_BUF_SHIFT=15
203# CONFIG_CPUSETS is not set 194# CONFIG_CPUSETS is not set
204CONFIG_SYSFS_DEPRECATED=y 195CONFIG_SYSFS_DEPRECATED=y
205CONFIG_RELAY=y 196CONFIG_RELAY=y
197# CONFIG_BLK_DEV_INITRD is not set
206# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 198# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
207CONFIG_SYSCTL=y 199CONFIG_SYSCTL=y
208CONFIG_EMBEDDED=y 200CONFIG_EMBEDDED=y
@@ -215,18 +207,19 @@ CONFIG_BUG=y
215CONFIG_ELF_CORE=y 207CONFIG_ELF_CORE=y
216CONFIG_BASE_FULL=y 208CONFIG_BASE_FULL=y
217CONFIG_FUTEX=y 209CONFIG_FUTEX=y
210CONFIG_ANON_INODES=y
218CONFIG_EPOLL=y 211CONFIG_EPOLL=y
212CONFIG_SIGNALFD=y
213CONFIG_TIMERFD=y
214CONFIG_EVENTFD=y
219CONFIG_SHMEM=y 215CONFIG_SHMEM=y
220CONFIG_SLAB=y
221CONFIG_VM_EVENT_COUNTERS=y 216CONFIG_VM_EVENT_COUNTERS=y
217CONFIG_SLAB=y
218# CONFIG_SLUB is not set
219# CONFIG_SLOB is not set
222CONFIG_RT_MUTEXES=y 220CONFIG_RT_MUTEXES=y
223# CONFIG_TINY_SHMEM is not set 221# CONFIG_TINY_SHMEM is not set
224CONFIG_BASE_SMALL=0 222CONFIG_BASE_SMALL=0
225# CONFIG_SLOB is not set
226
227#
228# Loadable module support
229#
230CONFIG_MODULES=y 223CONFIG_MODULES=y
231CONFIG_MODULE_UNLOAD=y 224CONFIG_MODULE_UNLOAD=y
232# CONFIG_MODULE_FORCE_UNLOAD is not set 225# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -234,14 +227,11 @@ CONFIG_MODVERSIONS=y
234CONFIG_MODULE_SRCVERSION_ALL=y 227CONFIG_MODULE_SRCVERSION_ALL=y
235CONFIG_KMOD=y 228CONFIG_KMOD=y
236CONFIG_STOP_MACHINE=y 229CONFIG_STOP_MACHINE=y
237
238#
239# Block layer
240#
241CONFIG_BLOCK=y 230CONFIG_BLOCK=y
242# CONFIG_LBD is not set 231# CONFIG_LBD is not set
243# CONFIG_BLK_DEV_IO_TRACE is not set 232# CONFIG_BLK_DEV_IO_TRACE is not set
244# CONFIG_LSF is not set 233# CONFIG_LSF is not set
234# CONFIG_BLK_DEV_BSG is not set
245 235
246# 236#
247# IO Schedulers 237# IO Schedulers
@@ -261,16 +251,13 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
261# 251#
262CONFIG_HW_HAS_PCI=y 252CONFIG_HW_HAS_PCI=y
263CONFIG_PCI=y 253CONFIG_PCI=y
254# CONFIG_ARCH_SUPPORTS_MSI is not set
264CONFIG_MMU=y 255CONFIG_MMU=y
265 256
266# 257#
267# PCCARD (PCMCIA/CardBus) support 258# PCCARD (PCMCIA/CardBus) support
268# 259#
269# CONFIG_PCCARD is not set 260# CONFIG_PCCARD is not set
270
271#
272# PCI Hotplug Support
273#
274# CONFIG_HOTPLUG_PCI is not set 261# CONFIG_HOTPLUG_PCI is not set
275 262
276# 263#
@@ -286,7 +273,6 @@ CONFIG_TRAD_SIGNALS=y
286CONFIG_PM=y 273CONFIG_PM=y
287# CONFIG_PM_LEGACY is not set 274# CONFIG_PM_LEGACY is not set
288# CONFIG_PM_DEBUG is not set 275# CONFIG_PM_DEBUG is not set
289# CONFIG_PM_SYSFS_DEPRECATED is not set
290 276
291# 277#
292# Networking 278# Networking
@@ -296,7 +282,6 @@ CONFIG_NET=y
296# 282#
297# Networking options 283# Networking options
298# 284#
299# CONFIG_NETDEBUG is not set
300CONFIG_PACKET=y 285CONFIG_PACKET=y
301CONFIG_PACKET_MMAP=y 286CONFIG_PACKET_MMAP=y
302CONFIG_UNIX=y 287CONFIG_UNIX=y
@@ -314,7 +299,6 @@ CONFIG_ASK_IP_FIB_HASH=y
314CONFIG_IP_FIB_HASH=y 299CONFIG_IP_FIB_HASH=y
315CONFIG_IP_MULTIPLE_TABLES=y 300CONFIG_IP_MULTIPLE_TABLES=y
316CONFIG_IP_ROUTE_MULTIPATH=y 301CONFIG_IP_ROUTE_MULTIPATH=y
317# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
318CONFIG_IP_ROUTE_VERBOSE=y 302CONFIG_IP_ROUTE_VERBOSE=y
319CONFIG_IP_PNP=y 303CONFIG_IP_PNP=y
320CONFIG_IP_PNP_DHCP=y 304CONFIG_IP_PNP_DHCP=y
@@ -342,10 +326,6 @@ CONFIG_INET_TCP_DIAG=y
342CONFIG_TCP_CONG_CUBIC=y 326CONFIG_TCP_CONG_CUBIC=y
343CONFIG_DEFAULT_TCP_CONG="cubic" 327CONFIG_DEFAULT_TCP_CONG="cubic"
344CONFIG_TCP_MD5SIG=y 328CONFIG_TCP_MD5SIG=y
345
346#
347# IP: Virtual Server Configuration
348#
349CONFIG_IP_VS=m 329CONFIG_IP_VS=m
350# CONFIG_IP_VS_DEBUG is not set 330# CONFIG_IP_VS_DEBUG is not set
351CONFIG_IP_VS_TAB_BITS=12 331CONFIG_IP_VS_TAB_BITS=12
@@ -380,6 +360,7 @@ CONFIG_IPV6=m
380CONFIG_IPV6_PRIVACY=y 360CONFIG_IPV6_PRIVACY=y
381CONFIG_IPV6_ROUTER_PREF=y 361CONFIG_IPV6_ROUTER_PREF=y
382CONFIG_IPV6_ROUTE_INFO=y 362CONFIG_IPV6_ROUTE_INFO=y
363CONFIG_IPV6_OPTIMISTIC_DAD=y
383CONFIG_INET6_AH=m 364CONFIG_INET6_AH=m
384CONFIG_INET6_ESP=m 365CONFIG_INET6_ESP=m
385CONFIG_INET6_IPCOMP=m 366CONFIG_INET6_IPCOMP=m
@@ -405,8 +386,6 @@ CONFIG_NETFILTER_NETLINK=m
405CONFIG_NETFILTER_NETLINK_QUEUE=m 386CONFIG_NETFILTER_NETLINK_QUEUE=m
406CONFIG_NETFILTER_NETLINK_LOG=m 387CONFIG_NETFILTER_NETLINK_LOG=m
407CONFIG_NF_CONNTRACK_ENABLED=m 388CONFIG_NF_CONNTRACK_ENABLED=m
408CONFIG_NF_CONNTRACK_SUPPORT=y
409# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
410CONFIG_NF_CONNTRACK=m 389CONFIG_NF_CONNTRACK=m
411CONFIG_NF_CT_ACCT=y 390CONFIG_NF_CT_ACCT=y
412CONFIG_NF_CONNTRACK_MARK=y 391CONFIG_NF_CONNTRACK_MARK=y
@@ -414,6 +393,7 @@ CONFIG_NF_CONNTRACK_SECMARK=y
414CONFIG_NF_CONNTRACK_EVENTS=y 393CONFIG_NF_CONNTRACK_EVENTS=y
415CONFIG_NF_CT_PROTO_GRE=m 394CONFIG_NF_CT_PROTO_GRE=m
416CONFIG_NF_CT_PROTO_SCTP=m 395CONFIG_NF_CT_PROTO_SCTP=m
396CONFIG_NF_CT_PROTO_UDPLITE=m
417CONFIG_NF_CONNTRACK_AMANDA=m 397CONFIG_NF_CONNTRACK_AMANDA=m
418CONFIG_NF_CONNTRACK_FTP=m 398CONFIG_NF_CONNTRACK_FTP=m
419CONFIG_NF_CONNTRACK_H323=m 399CONFIG_NF_CONNTRACK_H323=m
@@ -432,11 +412,13 @@ CONFIG_NETFILTER_XT_TARGET_MARK=m
432CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 412CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
433CONFIG_NETFILTER_XT_TARGET_NFLOG=m 413CONFIG_NETFILTER_XT_TARGET_NFLOG=m
434CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 414CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
415CONFIG_NETFILTER_XT_TARGET_TRACE=m
435CONFIG_NETFILTER_XT_TARGET_SECMARK=m 416CONFIG_NETFILTER_XT_TARGET_SECMARK=m
436# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set 417# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set
437CONFIG_NETFILTER_XT_TARGET_TCPMSS=m 418CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
438CONFIG_NETFILTER_XT_MATCH_COMMENT=m 419CONFIG_NETFILTER_XT_MATCH_COMMENT=m
439CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 420CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
421CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
440CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 422CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
441CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 423CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
442CONFIG_NETFILTER_XT_MATCH_DCCP=m 424CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -458,6 +440,7 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
458CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 440CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
459CONFIG_NETFILTER_XT_MATCH_STRING=m 441CONFIG_NETFILTER_XT_MATCH_STRING=m
460CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 442CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
443CONFIG_NETFILTER_XT_MATCH_U32=m
461CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m 444CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
462 445
463# 446#
@@ -549,25 +532,13 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
549CONFIG_BRIDGE_EBT_SNAT=m 532CONFIG_BRIDGE_EBT_SNAT=m
550CONFIG_BRIDGE_EBT_LOG=m 533CONFIG_BRIDGE_EBT_LOG=m
551CONFIG_BRIDGE_EBT_ULOG=m 534CONFIG_BRIDGE_EBT_ULOG=m
552
553#
554# DCCP Configuration (EXPERIMENTAL)
555#
556# CONFIG_IP_DCCP is not set 535# CONFIG_IP_DCCP is not set
557
558#
559# SCTP Configuration (EXPERIMENTAL)
560#
561CONFIG_IP_SCTP=m 536CONFIG_IP_SCTP=m
562# CONFIG_SCTP_DBG_MSG is not set 537# CONFIG_SCTP_DBG_MSG is not set
563# CONFIG_SCTP_DBG_OBJCNT is not set 538# CONFIG_SCTP_DBG_OBJCNT is not set
564# CONFIG_SCTP_HMAC_NONE is not set 539# CONFIG_SCTP_HMAC_NONE is not set
565# CONFIG_SCTP_HMAC_SHA1 is not set 540# CONFIG_SCTP_HMAC_SHA1 is not set
566CONFIG_SCTP_HMAC_MD5=y 541CONFIG_SCTP_HMAC_MD5=y
567
568#
569# TIPC Configuration (EXPERIMENTAL)
570#
571# CONFIG_TIPC is not set 542# CONFIG_TIPC is not set
572# CONFIG_ATM is not set 543# CONFIG_ATM is not set
573CONFIG_BRIDGE=m 544CONFIG_BRIDGE=m
@@ -591,9 +562,6 @@ CONFIG_IPDDP_DECAP=y
591# 562#
592CONFIG_NET_SCHED=y 563CONFIG_NET_SCHED=y
593CONFIG_NET_SCH_FIFO=y 564CONFIG_NET_SCH_FIFO=y
594CONFIG_NET_SCH_CLK_JIFFIES=y
595# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
596# CONFIG_NET_SCH_CLK_CPU is not set
597 565
598# 566#
599# Queueing/Scheduling 567# Queueing/Scheduling
@@ -602,6 +570,7 @@ CONFIG_NET_SCH_CBQ=m
602CONFIG_NET_SCH_HTB=m 570CONFIG_NET_SCH_HTB=m
603CONFIG_NET_SCH_HFSC=m 571CONFIG_NET_SCH_HFSC=m
604CONFIG_NET_SCH_PRIO=m 572CONFIG_NET_SCH_PRIO=m
573CONFIG_NET_SCH_RR=m
605CONFIG_NET_SCH_RED=m 574CONFIG_NET_SCH_RED=m
606CONFIG_NET_SCH_SFQ=m 575CONFIG_NET_SCH_SFQ=m
607CONFIG_NET_SCH_TEQL=m 576CONFIG_NET_SCH_TEQL=m
@@ -626,10 +595,16 @@ CONFIG_NET_CLS_U32=m
626CONFIG_NET_CLS_RSVP=m 595CONFIG_NET_CLS_RSVP=m
627CONFIG_NET_CLS_RSVP6=m 596CONFIG_NET_CLS_RSVP6=m
628# CONFIG_NET_EMATCH is not set 597# CONFIG_NET_EMATCH is not set
629# CONFIG_NET_CLS_ACT is not set 598CONFIG_NET_CLS_ACT=y
599CONFIG_NET_ACT_POLICE=y
600CONFIG_NET_ACT_GACT=m
601CONFIG_GACT_PROB=y
602CONFIG_NET_ACT_MIRRED=m
603CONFIG_NET_ACT_IPT=m
604CONFIG_NET_ACT_PEDIT=m
605CONFIG_NET_ACT_SIMP=m
630CONFIG_NET_CLS_POLICE=y 606CONFIG_NET_CLS_POLICE=y
631CONFIG_NET_CLS_IND=y 607CONFIG_NET_CLS_IND=y
632CONFIG_NET_ESTIMATOR=y
633 608
634# 609#
635# Network testing 610# Network testing
@@ -638,14 +613,26 @@ CONFIG_NET_ESTIMATOR=y
638# CONFIG_HAMRADIO is not set 613# CONFIG_HAMRADIO is not set
639# CONFIG_IRDA is not set 614# CONFIG_IRDA is not set
640# CONFIG_BT is not set 615# CONFIG_BT is not set
616# CONFIG_AF_RXRPC is not set
617CONFIG_FIB_RULES=y
618
619#
620# Wireless
621#
622CONFIG_CFG80211=m
623CONFIG_WIRELESS_EXT=y
624CONFIG_MAC80211=m
625# CONFIG_MAC80211_DEBUG is not set
641CONFIG_IEEE80211=m 626CONFIG_IEEE80211=m
642# CONFIG_IEEE80211_DEBUG is not set 627# CONFIG_IEEE80211_DEBUG is not set
643CONFIG_IEEE80211_CRYPT_WEP=m 628CONFIG_IEEE80211_CRYPT_WEP=m
644CONFIG_IEEE80211_CRYPT_CCMP=m 629CONFIG_IEEE80211_CRYPT_CCMP=m
630CONFIG_IEEE80211_CRYPT_TKIP=m
645CONFIG_IEEE80211_SOFTMAC=m 631CONFIG_IEEE80211_SOFTMAC=m
646# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 632# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
647CONFIG_WIRELESS_EXT=y 633CONFIG_RFKILL=m
648CONFIG_FIB_RULES=y 634CONFIG_RFKILL_INPUT=m
635# CONFIG_NET_9P is not set
649 636
650# 637#
651# Device Drivers 638# Device Drivers
@@ -658,15 +645,7 @@ CONFIG_STANDALONE=y
658CONFIG_PREVENT_FIRMWARE_BUILD=y 645CONFIG_PREVENT_FIRMWARE_BUILD=y
659CONFIG_FW_LOADER=y 646CONFIG_FW_LOADER=y
660# CONFIG_SYS_HYPERVISOR is not set 647# CONFIG_SYS_HYPERVISOR is not set
661
662#
663# Connector - unified userspace <-> kernelspace linker
664#
665CONFIG_CONNECTOR=m 648CONFIG_CONNECTOR=m
666
667#
668# Memory Technology Devices (MTD)
669#
670CONFIG_MTD=y 649CONFIG_MTD=y
671# CONFIG_MTD_DEBUG is not set 650# CONFIG_MTD_DEBUG is not set
672# CONFIG_MTD_CONCAT is not set 651# CONFIG_MTD_CONCAT is not set
@@ -710,7 +689,6 @@ CONFIG_MTD_CFI_UTIL=y
710# CONFIG_MTD_RAM is not set 689# CONFIG_MTD_RAM is not set
711# CONFIG_MTD_ROM is not set 690# CONFIG_MTD_ROM is not set
712# CONFIG_MTD_ABSENT is not set 691# CONFIG_MTD_ABSENT is not set
713# CONFIG_MTD_OBSOLETE_CHIPS is not set
714 692
715# 693#
716# Mapping drivers for chip access 694# Mapping drivers for chip access
@@ -737,30 +715,23 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
737# CONFIG_MTD_DOC2000 is not set 715# CONFIG_MTD_DOC2000 is not set
738# CONFIG_MTD_DOC2001 is not set 716# CONFIG_MTD_DOC2001 is not set
739# CONFIG_MTD_DOC2001PLUS is not set 717# CONFIG_MTD_DOC2001PLUS is not set
740
741#
742# NAND Flash Device Drivers
743#
744# CONFIG_MTD_NAND is not set 718# CONFIG_MTD_NAND is not set
745# CONFIG_MTD_NAND_CAFE is not set
746
747#
748# OneNAND Flash Device Drivers
749#
750# CONFIG_MTD_ONENAND is not set 719# CONFIG_MTD_ONENAND is not set
751 720
752# 721#
753# Parallel port support 722# UBI - Unsorted block images
754#
755# CONFIG_PARPORT is not set
756
757#
758# Plug and Play support
759# 723#
724CONFIG_MTD_UBI=m
725CONFIG_MTD_UBI_WL_THRESHOLD=4096
726CONFIG_MTD_UBI_BEB_RESERVE=1
727CONFIG_MTD_UBI_GLUEBI=y
760 728
761# 729#
762# Block devices 730# UBI debugging options
763# 731#
732# CONFIG_MTD_UBI_DEBUG is not set
733# CONFIG_PARPORT is not set
734CONFIG_BLK_DEV=y
764CONFIG_BLK_DEV_FD=m 735CONFIG_BLK_DEV_FD=m
765# CONFIG_BLK_CPQ_DA is not set 736# CONFIG_BLK_CPQ_DA is not set
766# CONFIG_BLK_CPQ_CISS_DA is not set 737# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -775,21 +746,11 @@ CONFIG_BLK_DEV_RAM=y
775CONFIG_BLK_DEV_RAM_COUNT=16 746CONFIG_BLK_DEV_RAM_COUNT=16
776CONFIG_BLK_DEV_RAM_SIZE=4096 747CONFIG_BLK_DEV_RAM_SIZE=4096
777CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 748CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
778# CONFIG_BLK_DEV_INITRD is not set
779CONFIG_CDROM_PKTCDVD=m 749CONFIG_CDROM_PKTCDVD=m
780CONFIG_CDROM_PKTCDVD_BUFFERS=8 750CONFIG_CDROM_PKTCDVD_BUFFERS=8
781# CONFIG_CDROM_PKTCDVD_WCACHE is not set 751# CONFIG_CDROM_PKTCDVD_WCACHE is not set
782CONFIG_ATA_OVER_ETH=m 752CONFIG_ATA_OVER_ETH=m
783 753# CONFIG_MISC_DEVICES is not set
784#
785# Misc devices
786#
787CONFIG_SGI_IOC4=m
788# CONFIG_TIFM_CORE is not set
789
790#
791# ATA/ATAPI/MFM/RLL support
792#
793CONFIG_IDE=y 754CONFIG_IDE=y
794CONFIG_IDE_MAX_HWIFS=4 755CONFIG_IDE_MAX_HWIFS=4
795CONFIG_BLK_DEV_IDE=y 756CONFIG_BLK_DEV_IDE=y
@@ -805,6 +766,7 @@ CONFIG_BLK_DEV_IDECD=y
805# CONFIG_BLK_DEV_IDEFLOPPY is not set 766# CONFIG_BLK_DEV_IDEFLOPPY is not set
806# CONFIG_BLK_DEV_IDESCSI is not set 767# CONFIG_BLK_DEV_IDESCSI is not set
807# CONFIG_IDE_TASK_IOCTL is not set 768# CONFIG_IDE_TASK_IOCTL is not set
769CONFIG_IDE_PROC_FS=y
808 770
809# 771#
810# IDE chipset support/bugfixes 772# IDE chipset support/bugfixes
@@ -812,12 +774,12 @@ CONFIG_BLK_DEV_IDECD=y
812CONFIG_IDE_GENERIC=y 774CONFIG_IDE_GENERIC=y
813CONFIG_BLK_DEV_IDEPCI=y 775CONFIG_BLK_DEV_IDEPCI=y
814# CONFIG_IDEPCI_SHARE_IRQ is not set 776# CONFIG_IDEPCI_SHARE_IRQ is not set
777CONFIG_IDEPCI_PCIBUS_ORDER=y
815# CONFIG_BLK_DEV_OFFBOARD is not set 778# CONFIG_BLK_DEV_OFFBOARD is not set
816CONFIG_BLK_DEV_GENERIC=y 779CONFIG_BLK_DEV_GENERIC=y
817# CONFIG_BLK_DEV_OPTI621 is not set 780# CONFIG_BLK_DEV_OPTI621 is not set
818CONFIG_BLK_DEV_IDEDMA_PCI=y 781CONFIG_BLK_DEV_IDEDMA_PCI=y
819# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 782# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
820CONFIG_IDEDMA_PCI_AUTO=y
821# CONFIG_IDEDMA_ONLYDISK is not set 783# CONFIG_IDEDMA_ONLYDISK is not set
822# CONFIG_BLK_DEV_AEC62XX is not set 784# CONFIG_BLK_DEV_AEC62XX is not set
823# CONFIG_BLK_DEV_ALI15X3 is not set 785# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -846,7 +808,6 @@ CONFIG_BLK_DEV_TC86C001=m
846# CONFIG_IDE_ARM is not set 808# CONFIG_IDE_ARM is not set
847CONFIG_BLK_DEV_IDEDMA=y 809CONFIG_BLK_DEV_IDEDMA=y
848# CONFIG_IDEDMA_IVB is not set 810# CONFIG_IDEDMA_IVB is not set
849CONFIG_IDEDMA_AUTO=y
850# CONFIG_BLK_DEV_HD is not set 811# CONFIG_BLK_DEV_HD is not set
851 812
852# 813#
@@ -854,6 +815,7 @@ CONFIG_IDEDMA_AUTO=y
854# 815#
855CONFIG_RAID_ATTRS=m 816CONFIG_RAID_ATTRS=m
856CONFIG_SCSI=m 817CONFIG_SCSI=m
818CONFIG_SCSI_DMA=y
857CONFIG_SCSI_TGT=m 819CONFIG_SCSI_TGT=m
858CONFIG_SCSI_NETLINK=y 820CONFIG_SCSI_NETLINK=y
859CONFIG_SCSI_PROC_FS=y 821CONFIG_SCSI_PROC_FS=y
@@ -876,6 +838,7 @@ CONFIG_SCSI_MULTI_LUN=y
876CONFIG_SCSI_CONSTANTS=y 838CONFIG_SCSI_CONSTANTS=y
877CONFIG_SCSI_LOGGING=y 839CONFIG_SCSI_LOGGING=y
878CONFIG_SCSI_SCAN_ASYNC=y 840CONFIG_SCSI_SCAN_ASYNC=y
841CONFIG_SCSI_WAIT_SCAN=m
879 842
880# 843#
881# SCSI Transports 844# SCSI Transports
@@ -883,12 +846,8 @@ CONFIG_SCSI_SCAN_ASYNC=y
883CONFIG_SCSI_SPI_ATTRS=m 846CONFIG_SCSI_SPI_ATTRS=m
884CONFIG_SCSI_FC_ATTRS=m 847CONFIG_SCSI_FC_ATTRS=m
885CONFIG_SCSI_ISCSI_ATTRS=m 848CONFIG_SCSI_ISCSI_ATTRS=m
886CONFIG_SCSI_SAS_ATTRS=m
887# CONFIG_SCSI_SAS_LIBSAS is not set 849# CONFIG_SCSI_SAS_LIBSAS is not set
888 850CONFIG_SCSI_LOWLEVEL=y
889#
890# SCSI low-level drivers
891#
892CONFIG_ISCSI_TCP=m 851CONFIG_ISCSI_TCP=m
893CONFIG_BLK_DEV_3W_XXXX_RAID=m 852CONFIG_BLK_DEV_3W_XXXX_RAID=m
894CONFIG_SCSI_3W_9XXX=m 853CONFIG_SCSI_3W_9XXX=m
@@ -925,15 +884,7 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
925# CONFIG_SCSI_NSP32 is not set 884# CONFIG_SCSI_NSP32 is not set
926# CONFIG_SCSI_DEBUG is not set 885# CONFIG_SCSI_DEBUG is not set
927# CONFIG_SCSI_SRP is not set 886# CONFIG_SCSI_SRP is not set
928
929#
930# Serial ATA (prod) and Parallel ATA (experimental) drivers
931#
932# CONFIG_ATA is not set 887# CONFIG_ATA is not set
933
934#
935# Multi-device support (RAID and LVM)
936#
937CONFIG_MD=y 888CONFIG_MD=y
938CONFIG_BLK_DEV_MD=m 889CONFIG_BLK_DEV_MD=m
939CONFIG_MD_LINEAR=m 890CONFIG_MD_LINEAR=m
@@ -952,6 +903,8 @@ CONFIG_DM_MIRROR=m
952CONFIG_DM_ZERO=m 903CONFIG_DM_ZERO=m
953CONFIG_DM_MULTIPATH=m 904CONFIG_DM_MULTIPATH=m
954CONFIG_DM_MULTIPATH_EMC=m 905CONFIG_DM_MULTIPATH_EMC=m
906CONFIG_DM_MULTIPATH_RDAC=m
907# CONFIG_DM_DELAY is not set
955 908
956# 909#
957# Fusion MPT device support 910# Fusion MPT device support
@@ -964,30 +917,18 @@ CONFIG_DM_MULTIPATH_EMC=m
964# 917#
965# IEEE 1394 (FireWire) support 918# IEEE 1394 (FireWire) support
966# 919#
920# CONFIG_FIREWIRE is not set
967# CONFIG_IEEE1394 is not set 921# CONFIG_IEEE1394 is not set
968
969#
970# I2O device support
971#
972# CONFIG_I2O is not set 922# CONFIG_I2O is not set
973
974#
975# Network device support
976#
977CONFIG_NETDEVICES=y 923CONFIG_NETDEVICES=y
924CONFIG_NETDEVICES_MULTIQUEUE=y
925CONFIG_IFB=m
978CONFIG_DUMMY=m 926CONFIG_DUMMY=m
979CONFIG_BONDING=m 927CONFIG_BONDING=m
928CONFIG_MACVLAN=m
980CONFIG_EQUALIZER=m 929CONFIG_EQUALIZER=m
981CONFIG_TUN=m 930CONFIG_TUN=m
982
983#
984# ARCnet devices
985#
986# CONFIG_ARCNET is not set 931# CONFIG_ARCNET is not set
987
988#
989# PHY device support
990#
991CONFIG_PHYLIB=m 932CONFIG_PHYLIB=m
992 933
993# 934#
@@ -1000,23 +941,17 @@ CONFIG_LXT_PHY=m
1000CONFIG_CICADA_PHY=m 941CONFIG_CICADA_PHY=m
1001CONFIG_VITESSE_PHY=m 942CONFIG_VITESSE_PHY=m
1002CONFIG_SMSC_PHY=m 943CONFIG_SMSC_PHY=m
1003# CONFIG_BROADCOM_PHY is not set 944CONFIG_BROADCOM_PHY=m
945CONFIG_ICPLUS_PHY=m
1004# CONFIG_FIXED_PHY is not set 946# CONFIG_FIXED_PHY is not set
1005
1006#
1007# Ethernet (10 or 100Mbit)
1008#
1009CONFIG_NET_ETHERNET=y 947CONFIG_NET_ETHERNET=y
1010CONFIG_MII=y 948CONFIG_MII=y
949CONFIG_AX88796=m
1011# CONFIG_HAPPYMEAL is not set 950# CONFIG_HAPPYMEAL is not set
1012# CONFIG_SUNGEM is not set 951# CONFIG_SUNGEM is not set
1013# CONFIG_CASSINI is not set 952# CONFIG_CASSINI is not set
1014# CONFIG_NET_VENDOR_3COM is not set 953# CONFIG_NET_VENDOR_3COM is not set
1015# CONFIG_DM9000 is not set 954# CONFIG_DM9000 is not set
1016
1017#
1018# Tulip family network device support
1019#
1020# CONFIG_NET_TULIP is not set 955# CONFIG_NET_TULIP is not set
1021# CONFIG_HP100 is not set 956# CONFIG_HP100 is not set
1022CONFIG_NET_PCI=y 957CONFIG_NET_PCI=y
@@ -1026,6 +961,7 @@ CONFIG_PCNET32=y
1026# CONFIG_ADAPTEC_STARFIRE is not set 961# CONFIG_ADAPTEC_STARFIRE is not set
1027# CONFIG_B44 is not set 962# CONFIG_B44 is not set
1028# CONFIG_FORCEDETH is not set 963# CONFIG_FORCEDETH is not set
964CONFIG_TC35815=m
1029# CONFIG_DGRS is not set 965# CONFIG_DGRS is not set
1030# CONFIG_EEPRO100 is not set 966# CONFIG_EEPRO100 is not set
1031# CONFIG_E100 is not set 967# CONFIG_E100 is not set
@@ -1040,10 +976,7 @@ CONFIG_PCNET32=y
1040# CONFIG_TLAN is not set 976# CONFIG_TLAN is not set
1041# CONFIG_VIA_RHINE is not set 977# CONFIG_VIA_RHINE is not set
1042# CONFIG_SC92031 is not set 978# CONFIG_SC92031 is not set
1043 979CONFIG_NETDEV_1000=y
1044#
1045# Ethernet (1000 Mbit)
1046#
1047# CONFIG_ACENIC is not set 980# CONFIG_ACENIC is not set
1048# CONFIG_DL2K is not set 981# CONFIG_DL2K is not set
1049# CONFIG_E1000 is not set 982# CONFIG_E1000 is not set
@@ -1054,36 +987,58 @@ CONFIG_PCNET32=y
1054# CONFIG_SIS190 is not set 987# CONFIG_SIS190 is not set
1055# CONFIG_SKGE is not set 988# CONFIG_SKGE is not set
1056# CONFIG_SKY2 is not set 989# CONFIG_SKY2 is not set
1057# CONFIG_SK98LIN is not set
1058# CONFIG_VIA_VELOCITY is not set 990# CONFIG_VIA_VELOCITY is not set
1059# CONFIG_TIGON3 is not set 991# CONFIG_TIGON3 is not set
1060# CONFIG_BNX2 is not set 992# CONFIG_BNX2 is not set
1061# CONFIG_QLA3XXX is not set 993# CONFIG_QLA3XXX is not set
1062# CONFIG_ATL1 is not set 994# CONFIG_ATL1 is not set
1063 995CONFIG_NETDEV_10000=y
1064#
1065# Ethernet (10000 Mbit)
1066#
1067# CONFIG_CHELSIO_T1 is not set 996# CONFIG_CHELSIO_T1 is not set
1068CONFIG_CHELSIO_T3=m 997CONFIG_CHELSIO_T3=m
1069# CONFIG_IXGB is not set 998# CONFIG_IXGB is not set
1070# CONFIG_S2IO is not set 999# CONFIG_S2IO is not set
1071# CONFIG_MYRI10GE is not set 1000# CONFIG_MYRI10GE is not set
1072CONFIG_NETXEN_NIC=m 1001CONFIG_NETXEN_NIC=m
1073 1002# CONFIG_MLX4_CORE is not set
1074#
1075# Token Ring devices
1076#
1077# CONFIG_TR is not set 1003# CONFIG_TR is not set
1078 1004
1079# 1005#
1080# Wireless LAN (non-hamradio) 1006# Wireless LAN
1081# 1007#
1082# CONFIG_NET_RADIO is not set 1008CONFIG_WLAN_PRE80211=y
1083 1009CONFIG_STRIP=m
1084# 1010CONFIG_WLAN_80211=y
1085# Wan interfaces 1011CONFIG_IPW2100=m
1086# 1012CONFIG_IPW2100_MONITOR=y
1013# CONFIG_IPW2100_DEBUG is not set
1014CONFIG_IPW2200=m
1015CONFIG_IPW2200_MONITOR=y
1016CONFIG_IPW2200_RADIOTAP=y
1017CONFIG_IPW2200_PROMISCUOUS=y
1018CONFIG_IPW2200_QOS=y
1019# CONFIG_IPW2200_DEBUG is not set
1020CONFIG_LIBERTAS=m
1021# CONFIG_LIBERTAS_DEBUG is not set
1022CONFIG_HERMES=m
1023CONFIG_PLX_HERMES=m
1024CONFIG_TMD_HERMES=m
1025CONFIG_NORTEL_HERMES=m
1026CONFIG_PCI_HERMES=m
1027CONFIG_ATMEL=m
1028CONFIG_PCI_ATMEL=m
1029CONFIG_PRISM54=m
1030CONFIG_HOSTAP=m
1031CONFIG_HOSTAP_FIRMWARE=y
1032CONFIG_HOSTAP_FIRMWARE_NVRAM=y
1033CONFIG_HOSTAP_PLX=m
1034CONFIG_HOSTAP_PCI=m
1035CONFIG_BCM43XX=m
1036CONFIG_BCM43XX_DEBUG=y
1037CONFIG_BCM43XX_DMA=y
1038CONFIG_BCM43XX_PIO=y
1039CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
1040# CONFIG_BCM43XX_DMA_MODE is not set
1041# CONFIG_BCM43XX_PIO_MODE is not set
1087# CONFIG_WAN is not set 1042# CONFIG_WAN is not set
1088# CONFIG_FDDI is not set 1043# CONFIG_FDDI is not set
1089# CONFIG_HIPPI is not set 1044# CONFIG_HIPPI is not set
@@ -1094,15 +1049,7 @@ CONFIG_NETXEN_NIC=m
1094# CONFIG_NETCONSOLE is not set 1049# CONFIG_NETCONSOLE is not set
1095# CONFIG_NETPOLL is not set 1050# CONFIG_NETPOLL is not set
1096# CONFIG_NET_POLL_CONTROLLER is not set 1051# CONFIG_NET_POLL_CONTROLLER is not set
1097
1098#
1099# ISDN subsystem
1100#
1101# CONFIG_ISDN is not set 1052# CONFIG_ISDN is not set
1102
1103#
1104# Telephony Support
1105#
1106# CONFIG_PHONE is not set 1053# CONFIG_PHONE is not set
1107 1054
1108# 1055#
@@ -1110,6 +1057,7 @@ CONFIG_NETXEN_NIC=m
1110# 1057#
1111CONFIG_INPUT=y 1058CONFIG_INPUT=y
1112# CONFIG_INPUT_FF_MEMLESS is not set 1059# CONFIG_INPUT_FF_MEMLESS is not set
1060# CONFIG_INPUT_POLLDEV is not set
1113 1061
1114# 1062#
1115# Userland interfaces 1063# Userland interfaces
@@ -1129,6 +1077,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
1129# CONFIG_INPUT_KEYBOARD is not set 1077# CONFIG_INPUT_KEYBOARD is not set
1130# CONFIG_INPUT_MOUSE is not set 1078# CONFIG_INPUT_MOUSE is not set
1131# CONFIG_INPUT_JOYSTICK is not set 1079# CONFIG_INPUT_JOYSTICK is not set
1080# CONFIG_INPUT_TABLET is not set
1132# CONFIG_INPUT_TOUCHSCREEN is not set 1081# CONFIG_INPUT_TOUCHSCREEN is not set
1133# CONFIG_INPUT_MISC is not set 1082# CONFIG_INPUT_MISC is not set
1134 1083
@@ -1171,32 +1120,16 @@ CONFIG_SERIAL_CORE_CONSOLE=y
1171CONFIG_UNIX98_PTYS=y 1120CONFIG_UNIX98_PTYS=y
1172CONFIG_LEGACY_PTYS=y 1121CONFIG_LEGACY_PTYS=y
1173CONFIG_LEGACY_PTY_COUNT=256 1122CONFIG_LEGACY_PTY_COUNT=256
1174
1175#
1176# IPMI
1177#
1178# CONFIG_IPMI_HANDLER is not set 1123# CONFIG_IPMI_HANDLER is not set
1179
1180#
1181# Watchdog Cards
1182#
1183# CONFIG_WATCHDOG is not set 1124# CONFIG_WATCHDOG is not set
1184# CONFIG_HW_RANDOM is not set 1125CONFIG_HW_RANDOM=m
1185CONFIG_RTC=y 1126CONFIG_RTC=y
1186# CONFIG_DTLK is not set
1187# CONFIG_R3964 is not set 1127# CONFIG_R3964 is not set
1188# CONFIG_APPLICOM is not set 1128# CONFIG_APPLICOM is not set
1189# CONFIG_DRM is not set 1129# CONFIG_DRM is not set
1190# CONFIG_RAW_DRIVER is not set 1130# CONFIG_RAW_DRIVER is not set
1191
1192#
1193# TPM devices
1194#
1195# CONFIG_TCG_TPM is not set 1131# CONFIG_TCG_TPM is not set
1196 1132CONFIG_DEVPORT=y
1197#
1198# I2C support
1199#
1200# CONFIG_I2C is not set 1133# CONFIG_I2C is not set
1201 1134
1202# 1135#
@@ -1204,32 +1137,33 @@ CONFIG_RTC=y
1204# 1137#
1205# CONFIG_SPI is not set 1138# CONFIG_SPI is not set
1206# CONFIG_SPI_MASTER is not set 1139# CONFIG_SPI_MASTER is not set
1207
1208#
1209# Dallas's 1-wire bus
1210#
1211# CONFIG_W1 is not set 1140# CONFIG_W1 is not set
1141# CONFIG_POWER_SUPPLY is not set
1142# CONFIG_HWMON is not set
1212 1143
1213# 1144#
1214# Hardware Monitoring support 1145# Multifunction device drivers
1215# 1146#
1216# CONFIG_HWMON is not set 1147# CONFIG_MFD_SM501 is not set
1217# CONFIG_HWMON_VID is not set
1218 1148
1219# 1149#
1220# Multimedia devices 1150# Multimedia devices
1221# 1151#
1222# CONFIG_VIDEO_DEV is not set 1152# CONFIG_VIDEO_DEV is not set
1153# CONFIG_DVB_CORE is not set
1154# CONFIG_DAB is not set
1223 1155
1224# 1156#
1225# Digital Video Broadcasting Devices 1157# Graphics support
1226# 1158#
1227# CONFIG_DVB is not set 1159# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1228 1160
1229# 1161#
1230# Graphics support 1162# Display device support
1231# 1163#
1232# CONFIG_FIRMWARE_EDID is not set 1164# CONFIG_DISPLAY_SUPPORT is not set
1165# CONFIG_VGASTATE is not set
1166# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1233# CONFIG_FB is not set 1167# CONFIG_FB is not set
1234 1168
1235# 1169#
@@ -1237,22 +1171,15 @@ CONFIG_RTC=y
1237# 1171#
1238# CONFIG_VGA_CONSOLE is not set 1172# CONFIG_VGA_CONSOLE is not set
1239CONFIG_DUMMY_CONSOLE=y 1173CONFIG_DUMMY_CONSOLE=y
1240# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1241 1174
1242# 1175#
1243# Sound 1176# Sound
1244# 1177#
1245# CONFIG_SOUND is not set 1178# CONFIG_SOUND is not set
1246 1179CONFIG_HID_SUPPORT=y
1247#
1248# HID Devices
1249#
1250CONFIG_HID=m 1180CONFIG_HID=m
1251# CONFIG_HID_DEBUG is not set 1181# CONFIG_HID_DEBUG is not set
1252 1182CONFIG_USB_SUPPORT=y
1253#
1254# USB support
1255#
1256CONFIG_USB_ARCH_HAS_HCD=y 1183CONFIG_USB_ARCH_HAS_HCD=y
1257CONFIG_USB_ARCH_HAS_OHCI=y 1184CONFIG_USB_ARCH_HAS_OHCI=y
1258CONFIG_USB_ARCH_HAS_EHCI=y 1185CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1266,37 +1193,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1266# USB Gadget Support 1193# USB Gadget Support
1267# 1194#
1268# CONFIG_USB_GADGET is not set 1195# CONFIG_USB_GADGET is not set
1269
1270#
1271# MMC/SD Card support
1272#
1273# CONFIG_MMC is not set 1196# CONFIG_MMC is not set
1274
1275#
1276# LED devices
1277#
1278# CONFIG_NEW_LEDS is not set 1197# CONFIG_NEW_LEDS is not set
1279
1280#
1281# LED drivers
1282#
1283
1284#
1285# LED Triggers
1286#
1287
1288#
1289# InfiniBand support
1290#
1291# CONFIG_INFINIBAND is not set 1198# CONFIG_INFINIBAND is not set
1292
1293#
1294# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1295#
1296
1297#
1298# Real Time Clock
1299#
1300# CONFIG_RTC_CLASS is not set 1199# CONFIG_RTC_CLASS is not set
1301 1200
1302# 1201#
@@ -1313,12 +1212,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1313# 1212#
1314 1213
1315# 1214#
1316# Auxiliary Display support 1215# Userspace I/O
1317#
1318
1319#
1320# Virtualization
1321# 1216#
1217CONFIG_UIO=m
1218CONFIG_UIO_CIF=m
1322 1219
1323# 1220#
1324# File systems 1221# File systems
@@ -1451,6 +1348,7 @@ CONFIG_LOCKD_V4=y
1451CONFIG_EXPORTFS=y 1348CONFIG_EXPORTFS=y
1452CONFIG_NFS_COMMON=y 1349CONFIG_NFS_COMMON=y
1453CONFIG_SUNRPC=y 1350CONFIG_SUNRPC=y
1351# CONFIG_SUNRPC_BIND34 is not set
1454# CONFIG_RPCSEC_GSS_KRB5 is not set 1352# CONFIG_RPCSEC_GSS_KRB5 is not set
1455# CONFIG_RPCSEC_GSS_SPKM3 is not set 1353# CONFIG_RPCSEC_GSS_SPKM3 is not set
1456# CONFIG_SMB_FS is not set 1354# CONFIG_SMB_FS is not set
@@ -1458,7 +1356,6 @@ CONFIG_SUNRPC=y
1458# CONFIG_NCP_FS is not set 1356# CONFIG_NCP_FS is not set
1459# CONFIG_CODA_FS is not set 1357# CONFIG_CODA_FS is not set
1460# CONFIG_AFS_FS is not set 1358# CONFIG_AFS_FS is not set
1461# CONFIG_9P_FS is not set
1462 1359
1463# 1360#
1464# Partition Types 1361# Partition Types
@@ -1531,7 +1428,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1531# CONFIG_DEBUG_FS is not set 1428# CONFIG_DEBUG_FS is not set
1532# CONFIG_HEADERS_CHECK is not set 1429# CONFIG_HEADERS_CHECK is not set
1533# CONFIG_DEBUG_KERNEL is not set 1430# CONFIG_DEBUG_KERNEL is not set
1534CONFIG_LOG_BUF_SHIFT=15
1535CONFIG_CROSSCOMPILE=y 1431CONFIG_CROSSCOMPILE=y
1536CONFIG_CMDLINE="" 1432CONFIG_CMDLINE=""
1537 1433
@@ -1540,12 +1436,13 @@ CONFIG_CMDLINE=""
1540# 1436#
1541# CONFIG_KEYS is not set 1437# CONFIG_KEYS is not set
1542# CONFIG_SECURITY is not set 1438# CONFIG_SECURITY is not set
1543 1439CONFIG_XOR_BLOCKS=m
1544# 1440CONFIG_ASYNC_CORE=m
1545# Cryptographic options 1441CONFIG_ASYNC_MEMCPY=m
1546# 1442CONFIG_ASYNC_XOR=m
1547CONFIG_CRYPTO=y 1443CONFIG_CRYPTO=y
1548CONFIG_CRYPTO_ALGAPI=y 1444CONFIG_CRYPTO_ALGAPI=y
1445CONFIG_CRYPTO_ABLKCIPHER=m
1549CONFIG_CRYPTO_BLKCIPHER=m 1446CONFIG_CRYPTO_BLKCIPHER=m
1550CONFIG_CRYPTO_HASH=y 1447CONFIG_CRYPTO_HASH=y
1551CONFIG_CRYPTO_MANAGER=y 1448CONFIG_CRYPTO_MANAGER=y
@@ -1564,6 +1461,7 @@ CONFIG_CRYPTO_ECB=m
1564CONFIG_CRYPTO_CBC=m 1461CONFIG_CRYPTO_CBC=m
1565CONFIG_CRYPTO_PCBC=m 1462CONFIG_CRYPTO_PCBC=m
1566CONFIG_CRYPTO_LRW=m 1463CONFIG_CRYPTO_LRW=m
1464CONFIG_CRYPTO_CRYPTD=m
1567CONFIG_CRYPTO_DES=m 1465CONFIG_CRYPTO_DES=m
1568CONFIG_CRYPTO_FCRYPT=m 1466CONFIG_CRYPTO_FCRYPT=m
1569CONFIG_CRYPTO_BLOWFISH=m 1467CONFIG_CRYPTO_BLOWFISH=m
@@ -1582,10 +1480,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1582CONFIG_CRYPTO_CRC32C=m 1480CONFIG_CRYPTO_CRC32C=m
1583CONFIG_CRYPTO_CAMELLIA=m 1481CONFIG_CRYPTO_CAMELLIA=m
1584# CONFIG_CRYPTO_TEST is not set 1482# CONFIG_CRYPTO_TEST is not set
1585 1483CONFIG_CRYPTO_HW=y
1586#
1587# Hardware crypto devices
1588#
1589 1484
1590# 1485#
1591# Library routines 1486# Library routines
@@ -1593,7 +1488,9 @@ CONFIG_CRYPTO_CAMELLIA=m
1593CONFIG_BITREVERSE=y 1488CONFIG_BITREVERSE=y
1594# CONFIG_CRC_CCITT is not set 1489# CONFIG_CRC_CCITT is not set
1595CONFIG_CRC16=m 1490CONFIG_CRC16=m
1491# CONFIG_CRC_ITU_T is not set
1596CONFIG_CRC32=y 1492CONFIG_CRC32=y
1493# CONFIG_CRC7 is not set
1597CONFIG_LIBCRC32C=m 1494CONFIG_LIBCRC32C=m
1598CONFIG_ZLIB_INFLATE=m 1495CONFIG_ZLIB_INFLATE=m
1599CONFIG_ZLIB_DEFLATE=m 1496CONFIG_ZLIB_DEFLATE=m
@@ -1604,3 +1501,4 @@ CONFIG_TEXTSEARCH_FSM=m
1604CONFIG_PLIST=y 1501CONFIG_PLIST=y
1605CONFIG_HAS_IOMEM=y 1502CONFIG_HAS_IOMEM=y
1606CONFIG_HAS_IOPORT=y 1503CONFIG_HAS_IOPORT=y
1504CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig
index 239810b6c8..8334350d72 100644
--- a/arch/mips/configs/mpc30x_defconfig
+++ b/arch/mips/configs/mpc30x_defconfig
@@ -1,60 +1,47 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20 3# Linux kernel version: 2.6.23-rc2
4# Tue Feb 20 21:47:35 2007 4# Wed Aug 8 15:09:51 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
16# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 17# CONFIG_MIPS_ATLAS is not set
30# CONFIG_MIPS_MALTA is not set 18# CONFIG_MIPS_MALTA is not set
31# CONFIG_MIPS_SEAD is not set 19# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 21# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 22CONFIG_MACH_VR41XX=y
36# CONFIG_PNX8550_JBS is not set 23# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 24# CONFIG_PNX8550_STB810 is not set
38CONFIG_MACH_VR41XX=y 25# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 26# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_QEMU is not set 27# CONFIG_QEMU is not set
41# CONFIG_MARKEINS is not set
42# CONFIG_SGI_IP22 is not set 28# CONFIG_SGI_IP22 is not set
43# CONFIG_SGI_IP27 is not set 29# CONFIG_SGI_IP27 is not set
44# CONFIG_SGI_IP32 is not set 30# CONFIG_SGI_IP32 is not set
45# CONFIG_SIBYTE_BIGSUR is not set 31# CONFIG_SIBYTE_CRHINE is not set
32# CONFIG_SIBYTE_CARMEL is not set
33# CONFIG_SIBYTE_CRHONE is not set
34# CONFIG_SIBYTE_RHONE is not set
46# CONFIG_SIBYTE_SWARM is not set 35# CONFIG_SIBYTE_SWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set
47# CONFIG_SIBYTE_SENTOSA is not set 37# CONFIG_SIBYTE_SENTOSA is not set
48# CONFIG_SIBYTE_RHONE is not set
49# CONFIG_SIBYTE_CARMEL is not set
50# CONFIG_SIBYTE_PTSWARM is not set 38# CONFIG_SIBYTE_PTSWARM is not set
51# CONFIG_SIBYTE_LITTLESUR is not set 39# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_CRHINE is not set
53# CONFIG_SIBYTE_CRHONE is not set
54# CONFIG_SNI_RM is not set 40# CONFIG_SNI_RM is not set
55# CONFIG_TOSHIBA_JMR3927 is not set 41# CONFIG_TOSHIBA_JMR3927 is not set
56# CONFIG_TOSHIBA_RBTX4927 is not set 42# CONFIG_TOSHIBA_RBTX4927 is not set
57# CONFIG_TOSHIBA_RBTX4938 is not set 43# CONFIG_TOSHIBA_RBTX4938 is not set
44# CONFIG_WR_PPMC is not set
58# CONFIG_CASIO_E55 is not set 45# CONFIG_CASIO_E55 is not set
59# CONFIG_IBM_WORKPAD is not set 46# CONFIG_IBM_WORKPAD is not set
60# CONFIG_NEC_CMBVR4133 is not set 47# CONFIG_NEC_CMBVR4133 is not set
@@ -73,6 +60,8 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
73CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 60CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
74CONFIG_DMA_NONCOHERENT=y 61CONFIG_DMA_NONCOHERENT=y
75CONFIG_DMA_NEED_PCI_MAP_STATE=y 62CONFIG_DMA_NEED_PCI_MAP_STATE=y
63# CONFIG_HOTPLUG_CPU is not set
64# CONFIG_NO_IOPORT is not set
76# CONFIG_CPU_BIG_ENDIAN is not set 65# CONFIG_CPU_BIG_ENDIAN is not set
77CONFIG_CPU_LITTLE_ENDIAN=y 66CONFIG_CPU_LITTLE_ENDIAN=y
78CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 67CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
@@ -82,6 +71,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
82# 71#
83# CPU selection 72# CPU selection
84# 73#
74# CONFIG_CPU_LOONGSON2 is not set
85# CONFIG_CPU_MIPS32_R1 is not set 75# CONFIG_CPU_MIPS32_R1 is not set
86# CONFIG_CPU_MIPS32_R2 is not set 76# CONFIG_CPU_MIPS32_R2 is not set
87# CONFIG_CPU_MIPS64_R1 is not set 77# CONFIG_CPU_MIPS64_R1 is not set
@@ -103,7 +93,6 @@ CONFIG_CPU_VR41XX=y
103# CONFIG_CPU_SB1 is not set 93# CONFIG_CPU_SB1 is not set
104CONFIG_SYS_HAS_CPU_VR41XX=y 94CONFIG_SYS_HAS_CPU_VR41XX=y
105CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 95CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
106CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
107CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 96CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
108CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 97CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
109 98
@@ -119,7 +108,6 @@ CONFIG_PAGE_SIZE_4KB=y
119CONFIG_MIPS_MT_DISABLED=y 108CONFIG_MIPS_MT_DISABLED=y
120# CONFIG_MIPS_MT_SMP is not set 109# CONFIG_MIPS_MT_SMP is not set
121# CONFIG_MIPS_MT_SMTC is not set 110# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_VPE_LOADER is not set
123CONFIG_CPU_HAS_SYNC=y 111CONFIG_CPU_HAS_SYNC=y
124CONFIG_GENERIC_HARDIRQS=y 112CONFIG_GENERIC_HARDIRQS=y
125CONFIG_GENERIC_IRQ_PROBE=y 113CONFIG_GENERIC_IRQ_PROBE=y
@@ -133,48 +121,47 @@ CONFIG_FLAT_NODE_MEM_MAP=y
133# CONFIG_SPARSEMEM_STATIC is not set 121# CONFIG_SPARSEMEM_STATIC is not set
134CONFIG_SPLIT_PTLOCK_CPUS=4 122CONFIG_SPLIT_PTLOCK_CPUS=4
135# CONFIG_RESOURCES_64BIT is not set 123# CONFIG_RESOURCES_64BIT is not set
136CONFIG_ZONE_DMA_FLAG=1 124CONFIG_ZONE_DMA_FLAG=0
125CONFIG_VIRT_TO_BUS=y
137# CONFIG_HZ_48 is not set 126# CONFIG_HZ_48 is not set
138# CONFIG_HZ_100 is not set 127# CONFIG_HZ_100 is not set
139# CONFIG_HZ_128 is not set 128# CONFIG_HZ_128 is not set
140# CONFIG_HZ_250 is not set 129CONFIG_HZ_250=y
141# CONFIG_HZ_256 is not set 130# CONFIG_HZ_256 is not set
142CONFIG_HZ_1000=y 131# CONFIG_HZ_1000 is not set
143# CONFIG_HZ_1024 is not set 132# CONFIG_HZ_1024 is not set
144CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 133CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
145CONFIG_HZ=1000 134CONFIG_HZ=250
146CONFIG_PREEMPT_NONE=y 135CONFIG_PREEMPT_NONE=y
147# CONFIG_PREEMPT_VOLUNTARY is not set 136# CONFIG_PREEMPT_VOLUNTARY is not set
148# CONFIG_PREEMPT is not set 137# CONFIG_PREEMPT is not set
149# CONFIG_KEXEC is not set 138# CONFIG_KEXEC is not set
139CONFIG_SECCOMP=y
150CONFIG_LOCKDEP_SUPPORT=y 140CONFIG_LOCKDEP_SUPPORT=y
151CONFIG_STACKTRACE_SUPPORT=y 141CONFIG_STACKTRACE_SUPPORT=y
152CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 142CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
153 143
154# 144#
155# Code maturity level options 145# General setup
156# 146#
157CONFIG_EXPERIMENTAL=y 147CONFIG_EXPERIMENTAL=y
158CONFIG_BROKEN_ON_SMP=y 148CONFIG_BROKEN_ON_SMP=y
159CONFIG_INIT_ENV_ARG_LIMIT=32 149CONFIG_INIT_ENV_ARG_LIMIT=32
160
161#
162# General setup
163#
164CONFIG_LOCALVERSION="" 150CONFIG_LOCALVERSION=""
165CONFIG_LOCALVERSION_AUTO=y 151CONFIG_LOCALVERSION_AUTO=y
166CONFIG_SWAP=y 152CONFIG_SWAP=y
167CONFIG_SYSVIPC=y 153CONFIG_SYSVIPC=y
168# CONFIG_IPC_NS is not set
169CONFIG_SYSVIPC_SYSCTL=y 154CONFIG_SYSVIPC_SYSCTL=y
170# CONFIG_POSIX_MQUEUE is not set 155# CONFIG_POSIX_MQUEUE is not set
171# CONFIG_BSD_PROCESS_ACCT is not set 156# CONFIG_BSD_PROCESS_ACCT is not set
172# CONFIG_TASKSTATS is not set 157# CONFIG_TASKSTATS is not set
173# CONFIG_UTS_NS is not set 158# CONFIG_USER_NS is not set
174# CONFIG_AUDIT is not set 159# CONFIG_AUDIT is not set
175# CONFIG_IKCONFIG is not set 160# CONFIG_IKCONFIG is not set
161CONFIG_LOG_BUF_SHIFT=14
176CONFIG_SYSFS_DEPRECATED=y 162CONFIG_SYSFS_DEPRECATED=y
177CONFIG_RELAY=y 163CONFIG_RELAY=y
164# CONFIG_BLK_DEV_INITRD is not set
178# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 165# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
179CONFIG_SYSCTL=y 166CONFIG_SYSCTL=y
180CONFIG_EMBEDDED=y 167CONFIG_EMBEDDED=y
@@ -187,32 +174,30 @@ CONFIG_BUG=y
187CONFIG_ELF_CORE=y 174CONFIG_ELF_CORE=y
188CONFIG_BASE_FULL=y 175CONFIG_BASE_FULL=y
189CONFIG_FUTEX=y 176CONFIG_FUTEX=y
177CONFIG_ANON_INODES=y
190CONFIG_EPOLL=y 178CONFIG_EPOLL=y
179CONFIG_SIGNALFD=y
180CONFIG_TIMERFD=y
181CONFIG_EVENTFD=y
191CONFIG_SHMEM=y 182CONFIG_SHMEM=y
192CONFIG_SLAB=y
193CONFIG_VM_EVENT_COUNTERS=y 183CONFIG_VM_EVENT_COUNTERS=y
184CONFIG_SLAB=y
185# CONFIG_SLUB is not set
186# CONFIG_SLOB is not set
194CONFIG_RT_MUTEXES=y 187CONFIG_RT_MUTEXES=y
195# CONFIG_TINY_SHMEM is not set 188# CONFIG_TINY_SHMEM is not set
196CONFIG_BASE_SMALL=0 189CONFIG_BASE_SMALL=0
197# CONFIG_SLOB is not set
198
199#
200# Loadable module support
201#
202CONFIG_MODULES=y 190CONFIG_MODULES=y
203CONFIG_MODULE_UNLOAD=y 191CONFIG_MODULE_UNLOAD=y
204# CONFIG_MODULE_FORCE_UNLOAD is not set 192# CONFIG_MODULE_FORCE_UNLOAD is not set
205CONFIG_MODVERSIONS=y 193CONFIG_MODVERSIONS=y
206CONFIG_MODULE_SRCVERSION_ALL=y 194CONFIG_MODULE_SRCVERSION_ALL=y
207CONFIG_KMOD=y 195CONFIG_KMOD=y
208
209#
210# Block layer
211#
212CONFIG_BLOCK=y 196CONFIG_BLOCK=y
213# CONFIG_LBD is not set 197# CONFIG_LBD is not set
214# CONFIG_BLK_DEV_IO_TRACE is not set 198# CONFIG_BLK_DEV_IO_TRACE is not set
215# CONFIG_LSF is not set 199# CONFIG_LSF is not set
200# CONFIG_BLK_DEV_BSG is not set
216 201
217# 202#
218# IO Schedulers 203# IO Schedulers
@@ -232,29 +217,13 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
232# 217#
233CONFIG_HW_HAS_PCI=y 218CONFIG_HW_HAS_PCI=y
234CONFIG_PCI=y 219CONFIG_PCI=y
220# CONFIG_ARCH_SUPPORTS_MSI is not set
235CONFIG_MMU=y 221CONFIG_MMU=y
236 222
237# 223#
238# PCCARD (PCMCIA/CardBus) support 224# PCCARD (PCMCIA/CardBus) support
239# 225#
240CONFIG_PCCARD=y 226# CONFIG_PCCARD is not set
241# CONFIG_PCMCIA_DEBUG is not set
242CONFIG_PCMCIA=y
243CONFIG_PCMCIA_LOAD_CIS=y
244CONFIG_PCMCIA_IOCTL=y
245# CONFIG_CARDBUS is not set
246
247#
248# PC-card bridges
249#
250# CONFIG_YENTA is not set
251# CONFIG_PD6729 is not set
252# CONFIG_I82092 is not set
253# CONFIG_PCMCIA_VRC4173 is not set
254
255#
256# PCI Hotplug Support
257#
258# CONFIG_HOTPLUG_PCI is not set 227# CONFIG_HOTPLUG_PCI is not set
259 228
260# 229#
@@ -267,10 +236,7 @@ CONFIG_TRAD_SIGNALS=y
267# 236#
268# Power management options 237# Power management options
269# 238#
270CONFIG_PM=y 239# CONFIG_PM is not set
271# CONFIG_PM_LEGACY is not set
272# CONFIG_PM_DEBUG is not set
273# CONFIG_PM_SYSFS_DEPRECATED is not set
274 240
275# 241#
276# Networking 242# Networking
@@ -280,7 +246,6 @@ CONFIG_NET=y
280# 246#
281# Networking options 247# Networking options
282# 248#
283# CONFIG_NETDEBUG is not set
284CONFIG_PACKET=y 249CONFIG_PACKET=y
285CONFIG_PACKET_MMAP=y 250CONFIG_PACKET_MMAP=y
286CONFIG_UNIX=y 251CONFIG_UNIX=y
@@ -313,26 +278,17 @@ CONFIG_INET_TCP_DIAG=y
313# CONFIG_TCP_CONG_ADVANCED is not set 278# CONFIG_TCP_CONG_ADVANCED is not set
314CONFIG_TCP_CONG_CUBIC=y 279CONFIG_TCP_CONG_CUBIC=y
315CONFIG_DEFAULT_TCP_CONG="cubic" 280CONFIG_DEFAULT_TCP_CONG="cubic"
316CONFIG_TCP_MD5SIG=y 281# CONFIG_TCP_MD5SIG is not set
317# CONFIG_IPV6 is not set 282# CONFIG_IPV6 is not set
318# CONFIG_INET6_XFRM_TUNNEL is not set 283# CONFIG_INET6_XFRM_TUNNEL is not set
319# CONFIG_INET6_TUNNEL is not set 284# CONFIG_INET6_TUNNEL is not set
320CONFIG_NETWORK_SECMARK=y 285CONFIG_NETWORK_SECMARK=y
321# CONFIG_NETFILTER is not set 286# CONFIG_NETFILTER is not set
322
323#
324# DCCP Configuration (EXPERIMENTAL)
325#
326# CONFIG_IP_DCCP is not set 287# CONFIG_IP_DCCP is not set
327
328#
329# SCTP Configuration (EXPERIMENTAL)
330#
331# CONFIG_IP_SCTP is not set 288# CONFIG_IP_SCTP is not set
332 289# CONFIG_SCTP_HMAC_NONE is not set
333# 290# CONFIG_SCTP_HMAC_SHA1 is not set
334# TIPC Configuration (EXPERIMENTAL) 291# CONFIG_SCTP_HMAC_MD5 is not set
335#
336# CONFIG_TIPC is not set 292# CONFIG_TIPC is not set
337# CONFIG_ATM is not set 293# CONFIG_ATM is not set
338# CONFIG_BRIDGE is not set 294# CONFIG_BRIDGE is not set
@@ -358,14 +314,17 @@ CONFIG_NETWORK_SECMARK=y
358# CONFIG_HAMRADIO is not set 314# CONFIG_HAMRADIO is not set
359# CONFIG_IRDA is not set 315# CONFIG_IRDA is not set
360# CONFIG_BT is not set 316# CONFIG_BT is not set
361CONFIG_IEEE80211=m 317# CONFIG_AF_RXRPC is not set
362# CONFIG_IEEE80211_DEBUG is not set 318
363CONFIG_IEEE80211_CRYPT_WEP=m 319#
364CONFIG_IEEE80211_CRYPT_CCMP=m 320# Wireless
365CONFIG_IEEE80211_CRYPT_TKIP=m 321#
366CONFIG_IEEE80211_SOFTMAC=m 322# CONFIG_CFG80211 is not set
367# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 323# CONFIG_WIRELESS_EXT is not set
368CONFIG_WIRELESS_EXT=y 324# CONFIG_MAC80211 is not set
325# CONFIG_IEEE80211 is not set
326# CONFIG_RFKILL is not set
327# CONFIG_NET_9P is not set
369 328
370# 329#
371# Device Drivers 330# Device Drivers
@@ -378,30 +337,10 @@ CONFIG_STANDALONE=y
378CONFIG_PREVENT_FIRMWARE_BUILD=y 337CONFIG_PREVENT_FIRMWARE_BUILD=y
379CONFIG_FW_LOADER=y 338CONFIG_FW_LOADER=y
380# CONFIG_SYS_HYPERVISOR is not set 339# CONFIG_SYS_HYPERVISOR is not set
381
382#
383# Connector - unified userspace <-> kernelspace linker
384#
385CONFIG_CONNECTOR=m 340CONFIG_CONNECTOR=m
386
387#
388# Memory Technology Devices (MTD)
389#
390# CONFIG_MTD is not set 341# CONFIG_MTD is not set
391
392#
393# Parallel port support
394#
395# CONFIG_PARPORT is not set 342# CONFIG_PARPORT is not set
396 343CONFIG_BLK_DEV=y
397#
398# Plug and Play support
399#
400# CONFIG_PNPACPI is not set
401
402#
403# Block devices
404#
405# CONFIG_BLK_CPQ_DA is not set 344# CONFIG_BLK_CPQ_DA is not set
406# CONFIG_BLK_CPQ_CISS_DA is not set 345# CONFIG_BLK_CPQ_CISS_DA is not set
407# CONFIG_BLK_DEV_DAC960 is not set 346# CONFIG_BLK_DEV_DAC960 is not set
@@ -412,19 +351,9 @@ CONFIG_CONNECTOR=m
412# CONFIG_BLK_DEV_SX8 is not set 351# CONFIG_BLK_DEV_SX8 is not set
413# CONFIG_BLK_DEV_UB is not set 352# CONFIG_BLK_DEV_UB is not set
414# CONFIG_BLK_DEV_RAM is not set 353# CONFIG_BLK_DEV_RAM is not set
415# CONFIG_BLK_DEV_INITRD is not set
416# CONFIG_CDROM_PKTCDVD is not set 354# CONFIG_CDROM_PKTCDVD is not set
417CONFIG_ATA_OVER_ETH=m 355CONFIG_ATA_OVER_ETH=m
418 356# CONFIG_MISC_DEVICES is not set
419#
420# Misc devices
421#
422CONFIG_SGI_IOC4=m
423# CONFIG_TIFM_CORE is not set
424
425#
426# ATA/ATAPI/MFM/RLL support
427#
428CONFIG_IDE=y 357CONFIG_IDE=y
429CONFIG_IDE_MAX_HWIFS=4 358CONFIG_IDE_MAX_HWIFS=4
430CONFIG_BLK_DEV_IDE=y 359CONFIG_BLK_DEV_IDE=y
@@ -435,20 +364,20 @@ CONFIG_BLK_DEV_IDE=y
435# CONFIG_BLK_DEV_IDE_SATA is not set 364# CONFIG_BLK_DEV_IDE_SATA is not set
436CONFIG_BLK_DEV_IDEDISK=y 365CONFIG_BLK_DEV_IDEDISK=y
437# CONFIG_IDEDISK_MULTI_MODE is not set 366# CONFIG_IDEDISK_MULTI_MODE is not set
438CONFIG_BLK_DEV_IDECS=m
439# CONFIG_BLK_DEV_IDECD is not set 367# CONFIG_BLK_DEV_IDECD is not set
440# CONFIG_BLK_DEV_IDETAPE is not set 368# CONFIG_BLK_DEV_IDETAPE is not set
441# CONFIG_BLK_DEV_IDEFLOPPY is not set 369# CONFIG_BLK_DEV_IDEFLOPPY is not set
442# CONFIG_IDE_TASK_IOCTL is not set 370# CONFIG_IDE_TASK_IOCTL is not set
371CONFIG_IDE_PROC_FS=y
443 372
444# 373#
445# IDE chipset support/bugfixes 374# IDE chipset support/bugfixes
446# 375#
447CONFIG_IDE_GENERIC=y 376CONFIG_IDE_GENERIC=y
448# CONFIG_BLK_DEV_IDEPCI is not set 377# CONFIG_BLK_DEV_IDEPCI is not set
378# CONFIG_IDEPCI_PCIBUS_ORDER is not set
449# CONFIG_IDE_ARM is not set 379# CONFIG_IDE_ARM is not set
450# CONFIG_BLK_DEV_IDEDMA is not set 380# CONFIG_BLK_DEV_IDEDMA is not set
451# CONFIG_IDEDMA_AUTO is not set
452# CONFIG_BLK_DEV_HD is not set 381# CONFIG_BLK_DEV_HD is not set
453 382
454# 383#
@@ -456,16 +385,9 @@ CONFIG_IDE_GENERIC=y
456# 385#
457# CONFIG_RAID_ATTRS is not set 386# CONFIG_RAID_ATTRS is not set
458# CONFIG_SCSI is not set 387# CONFIG_SCSI is not set
388# CONFIG_SCSI_DMA is not set
459# CONFIG_SCSI_NETLINK is not set 389# CONFIG_SCSI_NETLINK is not set
460
461#
462# Serial ATA (prod) and Parallel ATA (experimental) drivers
463#
464# CONFIG_ATA is not set 390# CONFIG_ATA is not set
465
466#
467# Multi-device support (RAID and LVM)
468#
469# CONFIG_MD is not set 391# CONFIG_MD is not set
470 392
471# 393#
@@ -476,135 +398,38 @@ CONFIG_IDE_GENERIC=y
476# 398#
477# IEEE 1394 (FireWire) support 399# IEEE 1394 (FireWire) support
478# 400#
401# CONFIG_FIREWIRE is not set
479# CONFIG_IEEE1394 is not set 402# CONFIG_IEEE1394 is not set
480
481#
482# I2O device support
483#
484# CONFIG_I2O is not set 403# CONFIG_I2O is not set
485
486#
487# Network device support
488#
489CONFIG_NETDEVICES=y 404CONFIG_NETDEVICES=y
405# CONFIG_NETDEVICES_MULTIQUEUE is not set
490# CONFIG_DUMMY is not set 406# CONFIG_DUMMY is not set
491# CONFIG_BONDING is not set 407# CONFIG_BONDING is not set
408# CONFIG_MACVLAN is not set
492# CONFIG_EQUALIZER is not set 409# CONFIG_EQUALIZER is not set
493# CONFIG_TUN is not set 410# CONFIG_TUN is not set
494
495#
496# ARCnet devices
497#
498# CONFIG_ARCNET is not set 411# CONFIG_ARCNET is not set
499
500#
501# PHY device support
502#
503
504#
505# Ethernet (10 or 100Mbit)
506#
507# CONFIG_NET_ETHERNET is not set 412# CONFIG_NET_ETHERNET is not set
508CONFIG_MII=m 413CONFIG_MII=m
509 414# CONFIG_NETDEV_1000 is not set
510# 415# CONFIG_NETDEV_10000 is not set
511# Ethernet (1000 Mbit)
512#
513# CONFIG_ACENIC is not set
514# CONFIG_DL2K is not set
515# CONFIG_E1000 is not set
516# CONFIG_NS83820 is not set
517# CONFIG_HAMACHI is not set
518# CONFIG_YELLOWFIN is not set
519# CONFIG_R8169 is not set
520# CONFIG_SIS190 is not set
521# CONFIG_SKGE is not set
522# CONFIG_SKY2 is not set
523# CONFIG_SK98LIN is not set
524# CONFIG_TIGON3 is not set
525# CONFIG_BNX2 is not set
526CONFIG_QLA3XXX=m
527# CONFIG_ATL1 is not set
528
529#
530# Ethernet (10000 Mbit)
531#
532# CONFIG_CHELSIO_T1 is not set
533CONFIG_CHELSIO_T3=m
534# CONFIG_IXGB is not set
535# CONFIG_S2IO is not set
536# CONFIG_MYRI10GE is not set
537CONFIG_NETXEN_NIC=m
538
539#
540# Token Ring devices
541#
542# CONFIG_TR is not set 416# CONFIG_TR is not set
543 417
544# 418#
545# Wireless LAN (non-hamradio) 419# Wireless LAN
546# 420#
547CONFIG_NET_RADIO=y 421# CONFIG_WLAN_PRE80211 is not set
548# CONFIG_NET_WIRELESS_RTNETLINK is not set 422# CONFIG_WLAN_80211 is not set
549 423
550# 424#
551# Obsolete Wireless cards support (pre-802.11) 425# USB Network Adapters
552#
553# CONFIG_STRIP is not set
554# CONFIG_PCMCIA_WAVELAN is not set
555# CONFIG_PCMCIA_NETWAVE is not set
556
557#
558# Wireless 802.11 Frequency Hopping cards support
559#
560# CONFIG_PCMCIA_RAYCS is not set
561
562#
563# Wireless 802.11b ISA/PCI cards support
564#
565# CONFIG_IPW2100 is not set
566# CONFIG_IPW2200 is not set
567CONFIG_HERMES=m
568# CONFIG_PLX_HERMES is not set
569# CONFIG_TMD_HERMES is not set
570# CONFIG_NORTEL_HERMES is not set
571# CONFIG_PCI_HERMES is not set
572# CONFIG_ATMEL is not set
573
574#
575# Wireless 802.11b Pcmcia/Cardbus cards support
576#
577CONFIG_PCMCIA_HERMES=m
578# CONFIG_PCMCIA_SPECTRUM is not set
579# CONFIG_AIRO_CS is not set
580# CONFIG_PCMCIA_WL3501 is not set
581
582#
583# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
584#
585# CONFIG_PRISM54 is not set
586# CONFIG_USB_ZD1201 is not set
587# CONFIG_HOSTAP is not set
588# CONFIG_BCM43XX is not set
589# CONFIG_ZD1211RW is not set
590CONFIG_NET_WIRELESS=y
591
592#
593# PCMCIA network device support
594#
595CONFIG_NET_PCMCIA=y
596CONFIG_PCMCIA_3C589=m
597CONFIG_PCMCIA_3C574=m
598CONFIG_PCMCIA_FMVJ18X=m
599CONFIG_PCMCIA_PCNET=m
600CONFIG_PCMCIA_NMCLAN=m
601CONFIG_PCMCIA_SMC91C92=m
602CONFIG_PCMCIA_XIRC2PS=m
603CONFIG_PCMCIA_AXNET=m
604
605#
606# Wan interfaces
607# 426#
427# CONFIG_USB_CATC is not set
428# CONFIG_USB_KAWETH is not set
429CONFIG_USB_PEGASUS=m
430# CONFIG_USB_RTL8150 is not set
431# CONFIG_USB_USBNET_MII is not set
432# CONFIG_USB_USBNET is not set
608# CONFIG_WAN is not set 433# CONFIG_WAN is not set
609# CONFIG_FDDI is not set 434# CONFIG_FDDI is not set
610# CONFIG_HIPPI is not set 435# CONFIG_HIPPI is not set
@@ -614,15 +439,7 @@ CONFIG_PCMCIA_AXNET=m
614# CONFIG_NETCONSOLE is not set 439# CONFIG_NETCONSOLE is not set
615# CONFIG_NETPOLL is not set 440# CONFIG_NETPOLL is not set
616# CONFIG_NET_POLL_CONTROLLER is not set 441# CONFIG_NET_POLL_CONTROLLER is not set
617
618#
619# ISDN subsystem
620#
621# CONFIG_ISDN is not set 442# CONFIG_ISDN is not set
622
623#
624# Telephony Support
625#
626# CONFIG_PHONE is not set 443# CONFIG_PHONE is not set
627 444
628# 445#
@@ -630,14 +447,12 @@ CONFIG_PCMCIA_AXNET=m
630# 447#
631CONFIG_INPUT=y 448CONFIG_INPUT=y
632# CONFIG_INPUT_FF_MEMLESS is not set 449# CONFIG_INPUT_FF_MEMLESS is not set
450# CONFIG_INPUT_POLLDEV is not set
633 451
634# 452#
635# Userland interfaces 453# Userland interfaces
636# 454#
637CONFIG_INPUT_MOUSEDEV=y 455# CONFIG_INPUT_MOUSEDEV is not set
638CONFIG_INPUT_MOUSEDEV_PSAUX=y
639CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
640CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
641# CONFIG_INPUT_JOYDEV is not set 456# CONFIG_INPUT_JOYDEV is not set
642# CONFIG_INPUT_TSDEV is not set 457# CONFIG_INPUT_TSDEV is not set
643# CONFIG_INPUT_EVDEV is not set 458# CONFIG_INPUT_EVDEV is not set
@@ -649,18 +464,14 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
649# CONFIG_INPUT_KEYBOARD is not set 464# CONFIG_INPUT_KEYBOARD is not set
650# CONFIG_INPUT_MOUSE is not set 465# CONFIG_INPUT_MOUSE is not set
651# CONFIG_INPUT_JOYSTICK is not set 466# CONFIG_INPUT_JOYSTICK is not set
467# CONFIG_INPUT_TABLET is not set
652# CONFIG_INPUT_TOUCHSCREEN is not set 468# CONFIG_INPUT_TOUCHSCREEN is not set
653# CONFIG_INPUT_MISC is not set 469# CONFIG_INPUT_MISC is not set
654 470
655# 471#
656# Hardware I/O ports 472# Hardware I/O ports
657# 473#
658CONFIG_SERIO=y 474# CONFIG_SERIO is not set
659# CONFIG_SERIO_I8042 is not set
660CONFIG_SERIO_SERPORT=y
661# CONFIG_SERIO_PCIPS2 is not set
662# CONFIG_SERIO_LIBPS2 is not set
663CONFIG_SERIO_RAW=m
664# CONFIG_GAMEPORT is not set 475# CONFIG_GAMEPORT is not set
665 476
666# 477#
@@ -680,46 +491,25 @@ CONFIG_VT_HW_CONSOLE_BINDING=y
680# 491#
681# Non-8250 serial port support 492# Non-8250 serial port support
682# 493#
683# CONFIG_SERIAL_VR41XX is not set 494CONFIG_SERIAL_CORE=y
495CONFIG_SERIAL_CORE_CONSOLE=y
496CONFIG_SERIAL_VR41XX=y
497CONFIG_SERIAL_VR41XX_CONSOLE=y
684# CONFIG_SERIAL_JSM is not set 498# CONFIG_SERIAL_JSM is not set
685CONFIG_UNIX98_PTYS=y 499CONFIG_UNIX98_PTYS=y
686CONFIG_LEGACY_PTYS=y 500CONFIG_LEGACY_PTYS=y
687CONFIG_LEGACY_PTY_COUNT=256 501CONFIG_LEGACY_PTY_COUNT=256
688
689#
690# IPMI
691#
692# CONFIG_IPMI_HANDLER is not set 502# CONFIG_IPMI_HANDLER is not set
693
694#
695# Watchdog Cards
696#
697# CONFIG_WATCHDOG is not set 503# CONFIG_WATCHDOG is not set
698# CONFIG_HW_RANDOM is not set 504# CONFIG_HW_RANDOM is not set
699# CONFIG_RTC is not set 505# CONFIG_RTC is not set
700# CONFIG_GEN_RTC is not set
701# CONFIG_DTLK is not set
702# CONFIG_R3964 is not set 506# CONFIG_R3964 is not set
703# CONFIG_APPLICOM is not set 507# CONFIG_APPLICOM is not set
704# CONFIG_DRM is not set 508# CONFIG_DRM is not set
705 509CONFIG_GPIO_VR41XX=y
706#
707# PCMCIA character devices
708#
709# CONFIG_SYNCLINK_CS is not set
710# CONFIG_CARDMAN_4000 is not set
711# CONFIG_CARDMAN_4040 is not set
712# CONFIG_GPIO_VR41XX is not set
713# CONFIG_RAW_DRIVER is not set 510# CONFIG_RAW_DRIVER is not set
714
715#
716# TPM devices
717#
718# CONFIG_TCG_TPM is not set 511# CONFIG_TCG_TPM is not set
719 512CONFIG_DEVPORT=y
720#
721# I2C support
722#
723# CONFIG_I2C is not set 513# CONFIG_I2C is not set
724 514
725# 515#
@@ -727,33 +517,33 @@ CONFIG_LEGACY_PTY_COUNT=256
727# 517#
728# CONFIG_SPI is not set 518# CONFIG_SPI is not set
729# CONFIG_SPI_MASTER is not set 519# CONFIG_SPI_MASTER is not set
730
731#
732# Dallas's 1-wire bus
733#
734# CONFIG_W1 is not set 520# CONFIG_W1 is not set
521# CONFIG_POWER_SUPPLY is not set
522# CONFIG_HWMON is not set
735 523
736# 524#
737# Hardware Monitoring support 525# Multifunction device drivers
738# 526#
739# CONFIG_HWMON is not set 527# CONFIG_MFD_SM501 is not set
740# CONFIG_HWMON_VID is not set
741 528
742# 529#
743# Multimedia devices 530# Multimedia devices
744# 531#
745# CONFIG_VIDEO_DEV is not set 532# CONFIG_VIDEO_DEV is not set
533# CONFIG_DVB_CORE is not set
534# CONFIG_DAB is not set
746 535
747# 536#
748# Digital Video Broadcasting Devices 537# Graphics support
749# 538#
750# CONFIG_DVB is not set 539# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
751# CONFIG_USB_DABUSB is not set
752 540
753# 541#
754# Graphics support 542# Display device support
755# 543#
756# CONFIG_FIRMWARE_EDID is not set 544# CONFIG_DISPLAY_SUPPORT is not set
545# CONFIG_VGASTATE is not set
546# CONFIG_VIDEO_OUTPUT_CONTROL is not set
757# CONFIG_FB is not set 547# CONFIG_FB is not set
758 548
759# 549#
@@ -761,22 +551,13 @@ CONFIG_LEGACY_PTY_COUNT=256
761# 551#
762# CONFIG_VGA_CONSOLE is not set 552# CONFIG_VGA_CONSOLE is not set
763CONFIG_DUMMY_CONSOLE=y 553CONFIG_DUMMY_CONSOLE=y
764# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
765 554
766# 555#
767# Sound 556# Sound
768# 557#
769# CONFIG_SOUND is not set 558# CONFIG_SOUND is not set
770 559# CONFIG_HID_SUPPORT is not set
771# 560CONFIG_USB_SUPPORT=y
772# HID Devices
773#
774CONFIG_HID=y
775# CONFIG_HID_DEBUG is not set
776
777#
778# USB support
779#
780CONFIG_USB_ARCH_HAS_HCD=y 561CONFIG_USB_ARCH_HAS_HCD=y
781CONFIG_USB_ARCH_HAS_OHCI=y 562CONFIG_USB_ARCH_HAS_OHCI=y
782CONFIG_USB_ARCH_HAS_EHCI=y 563CONFIG_USB_ARCH_HAS_EHCI=y
@@ -787,8 +568,8 @@ CONFIG_USB=m
787# Miscellaneous USB options 568# Miscellaneous USB options
788# 569#
789CONFIG_USB_DEVICEFS=y 570CONFIG_USB_DEVICEFS=y
571CONFIG_USB_DEVICE_CLASS=y
790# CONFIG_USB_DYNAMIC_MINORS is not set 572# CONFIG_USB_DYNAMIC_MINORS is not set
791# CONFIG_USB_SUSPEND is not set
792# CONFIG_USB_OTG is not set 573# CONFIG_USB_OTG is not set
793 574
794# 575#
@@ -802,6 +583,7 @@ CONFIG_USB_OHCI_HCD=m
802CONFIG_USB_OHCI_LITTLE_ENDIAN=y 583CONFIG_USB_OHCI_LITTLE_ENDIAN=y
803# CONFIG_USB_UHCI_HCD is not set 584# CONFIG_USB_UHCI_HCD is not set
804# CONFIG_USB_SL811_HCD is not set 585# CONFIG_USB_SL811_HCD is not set
586# CONFIG_USB_R8A66597_HCD is not set
805 587
806# 588#
807# USB Device Class drivers 589# USB Device Class drivers
@@ -819,43 +601,9 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
819# CONFIG_USB_LIBUSUAL is not set 601# CONFIG_USB_LIBUSUAL is not set
820 602
821# 603#
822# USB Input Devices
823#
824# CONFIG_USB_HID is not set
825
826#
827# USB HID Boot Protocol drivers
828#
829# CONFIG_USB_KBD is not set
830# CONFIG_USB_MOUSE is not set
831# CONFIG_USB_AIPTEK is not set
832# CONFIG_USB_WACOM is not set
833# CONFIG_USB_ACECAD is not set
834# CONFIG_USB_KBTAB is not set
835# CONFIG_USB_POWERMATE is not set
836# CONFIG_USB_TOUCHSCREEN is not set
837# CONFIG_USB_YEALINK is not set
838# CONFIG_USB_XPAD is not set
839# CONFIG_USB_ATI_REMOTE is not set
840# CONFIG_USB_ATI_REMOTE2 is not set
841# CONFIG_USB_KEYSPAN_REMOTE is not set
842# CONFIG_USB_APPLETOUCH is not set
843# CONFIG_USB_GTCO is not set
844
845#
846# USB Imaging devices 604# USB Imaging devices
847# 605#
848# CONFIG_USB_MDC800 is not set 606# CONFIG_USB_MDC800 is not set
849
850#
851# USB Network Adapters
852#
853# CONFIG_USB_CATC is not set
854# CONFIG_USB_KAWETH is not set
855CONFIG_USB_PEGASUS=m
856# CONFIG_USB_RTL8150 is not set
857# CONFIG_USB_USBNET_MII is not set
858# CONFIG_USB_USBNET is not set
859# CONFIG_USB_MON is not set 607# CONFIG_USB_MON is not set
860 608
861# 609#
@@ -887,6 +635,7 @@ CONFIG_USB_PEGASUS=m
887# CONFIG_USB_APPLEDISPLAY is not set 635# CONFIG_USB_APPLEDISPLAY is not set
888# CONFIG_USB_LD is not set 636# CONFIG_USB_LD is not set
889# CONFIG_USB_TRANCEVIBRATOR is not set 637# CONFIG_USB_TRANCEVIBRATOR is not set
638# CONFIG_USB_IOWARRIOR is not set
890# CONFIG_USB_TEST is not set 639# CONFIG_USB_TEST is not set
891 640
892# 641#
@@ -897,38 +646,43 @@ CONFIG_USB_PEGASUS=m
897# USB Gadget Support 646# USB Gadget Support
898# 647#
899# CONFIG_USB_GADGET is not set 648# CONFIG_USB_GADGET is not set
900
901#
902# MMC/SD Card support
903#
904# CONFIG_MMC is not set 649# CONFIG_MMC is not set
905
906#
907# LED devices
908#
909# CONFIG_NEW_LEDS is not set 650# CONFIG_NEW_LEDS is not set
651# CONFIG_INFINIBAND is not set
652CONFIG_RTC_LIB=y
653CONFIG_RTC_CLASS=y
654CONFIG_RTC_HCTOSYS=y
655CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
656# CONFIG_RTC_DEBUG is not set
910 657
911# 658#
912# LED drivers 659# RTC interfaces
913#
914
915#
916# LED Triggers
917# 660#
661CONFIG_RTC_INTF_SYSFS=y
662CONFIG_RTC_INTF_PROC=y
663CONFIG_RTC_INTF_DEV=y
664# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
665# CONFIG_RTC_DRV_TEST is not set
918 666
919# 667#
920# InfiniBand support 668# SPI RTC drivers
921# 669#
922# CONFIG_INFINIBAND is not set
923 670
924# 671#
925# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 672# Platform RTC drivers
926# 673#
674# CONFIG_RTC_DRV_CMOS is not set
675# CONFIG_RTC_DRV_DS1553 is not set
676# CONFIG_RTC_DRV_STK17TA8 is not set
677# CONFIG_RTC_DRV_DS1742 is not set
678# CONFIG_RTC_DRV_M48T86 is not set
679# CONFIG_RTC_DRV_M48T59 is not set
680# CONFIG_RTC_DRV_V3020 is not set
927 681
928# 682#
929# Real Time Clock 683# on-CPU RTC drivers
930# 684#
931# CONFIG_RTC_CLASS is not set 685CONFIG_RTC_DRV_VR41XX=y
932 686
933# 687#
934# DMA Engine support 688# DMA Engine support
@@ -944,12 +698,9 @@ CONFIG_USB_PEGASUS=m
944# 698#
945 699
946# 700#
947# Auxiliary Display support 701# Userspace I/O
948#
949
950#
951# Virtualization
952# 702#
703# CONFIG_UIO is not set
953 704
954# 705#
955# File systems 706# File systems
@@ -973,7 +724,7 @@ CONFIG_INOTIFY_USER=y
973CONFIG_DNOTIFY=y 724CONFIG_DNOTIFY=y
974CONFIG_AUTOFS_FS=y 725CONFIG_AUTOFS_FS=y
975CONFIG_AUTOFS4_FS=y 726CONFIG_AUTOFS4_FS=y
976CONFIG_FUSE_FS=m 727# CONFIG_FUSE_FS is not set
977 728
978# 729#
979# CD-ROM/DVD Filesystems 730# CD-ROM/DVD Filesystems
@@ -1005,7 +756,6 @@ CONFIG_CONFIGFS_FS=m
1005# 756#
1006# CONFIG_ADFS_FS is not set 757# CONFIG_ADFS_FS is not set
1007# CONFIG_AFFS_FS is not set 758# CONFIG_AFFS_FS is not set
1008# CONFIG_ECRYPT_FS is not set
1009# CONFIG_HFS_FS is not set 759# CONFIG_HFS_FS is not set
1010# CONFIG_HFSPLUS_FS is not set 760# CONFIG_HFSPLUS_FS is not set
1011# CONFIG_BEFS_FS is not set 761# CONFIG_BEFS_FS is not set
@@ -1029,6 +779,7 @@ CONFIG_NFS_FS=y
1029CONFIG_LOCKD=y 779CONFIG_LOCKD=y
1030CONFIG_NFS_COMMON=y 780CONFIG_NFS_COMMON=y
1031CONFIG_SUNRPC=y 781CONFIG_SUNRPC=y
782# CONFIG_SUNRPC_BIND34 is not set
1032# CONFIG_RPCSEC_GSS_KRB5 is not set 783# CONFIG_RPCSEC_GSS_KRB5 is not set
1033# CONFIG_RPCSEC_GSS_SPKM3 is not set 784# CONFIG_RPCSEC_GSS_SPKM3 is not set
1034# CONFIG_SMB_FS is not set 785# CONFIG_SMB_FS is not set
@@ -1036,7 +787,6 @@ CONFIG_SUNRPC=y
1036# CONFIG_NCP_FS is not set 787# CONFIG_NCP_FS is not set
1037# CONFIG_CODA_FS is not set 788# CONFIG_CODA_FS is not set
1038# CONFIG_AFS_FS is not set 789# CONFIG_AFS_FS is not set
1039# CONFIG_9P_FS is not set
1040 790
1041# 791#
1042# Partition Types 792# Partition Types
@@ -1052,10 +802,7 @@ CONFIG_MSDOS_PARTITION=y
1052# 802#
1053# Distributed Lock Manager 803# Distributed Lock Manager
1054# 804#
1055CONFIG_DLM=m 805# CONFIG_DLM is not set
1056CONFIG_DLM_TCP=y
1057# CONFIG_DLM_SCTP is not set
1058# CONFIG_DLM_DEBUG is not set
1059 806
1060# 807#
1061# Profiling support 808# Profiling support
@@ -1073,73 +820,26 @@ CONFIG_ENABLE_MUST_CHECK=y
1073# CONFIG_DEBUG_FS is not set 820# CONFIG_DEBUG_FS is not set
1074# CONFIG_HEADERS_CHECK is not set 821# CONFIG_HEADERS_CHECK is not set
1075# CONFIG_DEBUG_KERNEL is not set 822# CONFIG_DEBUG_KERNEL is not set
1076CONFIG_LOG_BUF_SHIFT=14
1077CONFIG_CROSSCOMPILE=y 823CONFIG_CROSSCOMPILE=y
1078CONFIG_CMDLINE="mem=32M console=ttyVR0,19200 ide0=0x170,0x376,73" 824CONFIG_CMDLINE="mem=32M console=ttyVR0,19200 ide0=0x170,0x376,73"
1079 825
1080# 826#
1081# Security options 827# Security options
1082# 828#
1083CONFIG_KEYS=y 829# CONFIG_KEYS is not set
1084CONFIG_KEYS_DEBUG_PROC_KEYS=y
1085# CONFIG_SECURITY is not set 830# CONFIG_SECURITY is not set
1086 831# CONFIG_CRYPTO is not set
1087#
1088# Cryptographic options
1089#
1090CONFIG_CRYPTO=y
1091CONFIG_CRYPTO_ALGAPI=y
1092CONFIG_CRYPTO_BLKCIPHER=m
1093CONFIG_CRYPTO_HASH=y
1094CONFIG_CRYPTO_MANAGER=y
1095CONFIG_CRYPTO_HMAC=y
1096CONFIG_CRYPTO_XCBC=m
1097CONFIG_CRYPTO_NULL=m
1098CONFIG_CRYPTO_MD4=m
1099CONFIG_CRYPTO_MD5=y
1100CONFIG_CRYPTO_SHA1=m
1101CONFIG_CRYPTO_SHA256=m
1102CONFIG_CRYPTO_SHA512=m
1103CONFIG_CRYPTO_WP512=m
1104CONFIG_CRYPTO_TGR192=m
1105CONFIG_CRYPTO_GF128MUL=m
1106CONFIG_CRYPTO_ECB=m
1107CONFIG_CRYPTO_CBC=m
1108CONFIG_CRYPTO_PCBC=m
1109CONFIG_CRYPTO_LRW=m
1110CONFIG_CRYPTO_DES=m
1111CONFIG_CRYPTO_FCRYPT=m
1112CONFIG_CRYPTO_BLOWFISH=m
1113CONFIG_CRYPTO_TWOFISH=m
1114CONFIG_CRYPTO_TWOFISH_COMMON=m
1115CONFIG_CRYPTO_SERPENT=m
1116CONFIG_CRYPTO_AES=m
1117CONFIG_CRYPTO_CAST5=m
1118CONFIG_CRYPTO_CAST6=m
1119CONFIG_CRYPTO_TEA=m
1120CONFIG_CRYPTO_ARC4=m
1121CONFIG_CRYPTO_KHAZAD=m
1122CONFIG_CRYPTO_ANUBIS=m
1123CONFIG_CRYPTO_DEFLATE=m
1124CONFIG_CRYPTO_MICHAEL_MIC=m
1125CONFIG_CRYPTO_CRC32C=m
1126CONFIG_CRYPTO_CAMELLIA=m
1127# CONFIG_CRYPTO_TEST is not set
1128
1129#
1130# Hardware crypto devices
1131#
1132 832
1133# 833#
1134# Library routines 834# Library routines
1135# 835#
1136CONFIG_BITREVERSE=y
1137# CONFIG_CRC_CCITT is not set 836# CONFIG_CRC_CCITT is not set
1138CONFIG_CRC16=m 837# CONFIG_CRC16 is not set
1139CONFIG_CRC32=y 838# CONFIG_CRC_ITU_T is not set
1140CONFIG_LIBCRC32C=m 839# CONFIG_CRC32 is not set
1141CONFIG_ZLIB_INFLATE=m 840# CONFIG_CRC7 is not set
1142CONFIG_ZLIB_DEFLATE=m 841# CONFIG_LIBCRC32C is not set
1143CONFIG_PLIST=y 842CONFIG_PLIST=y
1144CONFIG_HAS_IOMEM=y 843CONFIG_HAS_IOMEM=y
1145CONFIG_HAS_IOPORT=y 844CONFIG_HAS_IOPORT=y
845CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/rbhma4200_defconfig b/arch/mips/configs/rbhma4200_defconfig
index 9913980add..9383a59809 100644
--- a/arch/mips/configs/rbhma4200_defconfig
+++ b/arch/mips/configs/rbhma4200_defconfig
@@ -1,58 +1,47 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21 3# Linux kernel version: 2.6.23-rc1
4# Wed May 9 23:44:19 2007 4# Thu Aug 2 22:55:57 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set
14# CONFIG_MIPS_PB1100 is not set
15# CONFIG_MIPS_PB1500 is not set
16# CONFIG_MIPS_PB1550 is not set
17# CONFIG_MIPS_PB1200 is not set
18# CONFIG_MIPS_DB1000 is not set
19# CONFIG_MIPS_DB1100 is not set
20# CONFIG_MIPS_DB1500 is not set
21# CONFIG_MIPS_DB1550 is not set
22# CONFIG_MIPS_DB1200 is not set
23# CONFIG_MIPS_MIRAGE is not set
24# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
25# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
16# CONFIG_LEMOTE_FULONG is not set
28# CONFIG_MIPS_ATLAS is not set 17# CONFIG_MIPS_ATLAS is not set
29# CONFIG_MIPS_MALTA is not set 18# CONFIG_MIPS_MALTA is not set
30# CONFIG_MIPS_SEAD is not set 19# CONFIG_MIPS_SEAD is not set
31# CONFIG_WR_PPMC is not set
32# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
33# CONFIG_MIPS_XXS1500 is not set 21# CONFIG_MARKEINS is not set
22# CONFIG_MACH_VR41XX is not set
34# CONFIG_PNX8550_JBS is not set 23# CONFIG_PNX8550_JBS is not set
35# CONFIG_PNX8550_STB810 is not set 24# CONFIG_PNX8550_STB810 is not set
36# CONFIG_MACH_VR41XX is not set 25# CONFIG_PMC_MSP is not set
37# CONFIG_PMC_YOSEMITE is not set 26# CONFIG_PMC_YOSEMITE is not set
38# CONFIG_QEMU is not set 27# CONFIG_QEMU is not set
39# CONFIG_MARKEINS is not set
40# CONFIG_SGI_IP22 is not set 28# CONFIG_SGI_IP22 is not set
41# CONFIG_SGI_IP27 is not set 29# CONFIG_SGI_IP27 is not set
42# CONFIG_SGI_IP32 is not set 30# CONFIG_SGI_IP32 is not set
43# CONFIG_SIBYTE_BIGSUR is not set 31# CONFIG_SIBYTE_CRHINE is not set
32# CONFIG_SIBYTE_CARMEL is not set
33# CONFIG_SIBYTE_CRHONE is not set
34# CONFIG_SIBYTE_RHONE is not set
44# CONFIG_SIBYTE_SWARM is not set 35# CONFIG_SIBYTE_SWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set
45# CONFIG_SIBYTE_SENTOSA is not set 37# CONFIG_SIBYTE_SENTOSA is not set
46# CONFIG_SIBYTE_RHONE is not set
47# CONFIG_SIBYTE_CARMEL is not set
48# CONFIG_SIBYTE_PTSWARM is not set 38# CONFIG_SIBYTE_PTSWARM is not set
49# CONFIG_SIBYTE_LITTLESUR is not set 39# CONFIG_SIBYTE_BIGSUR is not set
50# CONFIG_SIBYTE_CRHINE is not set
51# CONFIG_SIBYTE_CRHONE is not set
52# CONFIG_SNI_RM is not set 40# CONFIG_SNI_RM is not set
53# CONFIG_TOSHIBA_JMR3927 is not set 41# CONFIG_TOSHIBA_JMR3927 is not set
54CONFIG_TOSHIBA_RBTX4927=y 42CONFIG_TOSHIBA_RBTX4927=y
55# CONFIG_TOSHIBA_RBTX4938 is not set 43# CONFIG_TOSHIBA_RBTX4938 is not set
44# CONFIG_WR_PPMC is not set
56# CONFIG_TOSHIBA_FPCIB0 is not set 45# CONFIG_TOSHIBA_FPCIB0 is not set
57CONFIG_RWSEM_GENERIC_SPINLOCK=y 46CONFIG_RWSEM_GENERIC_SPINLOCK=y
58# CONFIG_ARCH_HAS_ILOG2_U32 is not set 47# CONFIG_ARCH_HAS_ILOG2_U32 is not set
@@ -65,17 +54,20 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
65CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 54CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
66CONFIG_DMA_NONCOHERENT=y 55CONFIG_DMA_NONCOHERENT=y
67CONFIG_DMA_NEED_PCI_MAP_STATE=y 56CONFIG_DMA_NEED_PCI_MAP_STATE=y
68CONFIG_I8259=y 57# CONFIG_NO_IOPORT is not set
69CONFIG_CPU_BIG_ENDIAN=y 58CONFIG_CPU_BIG_ENDIAN=y
70# CONFIG_CPU_LITTLE_ENDIAN is not set 59# CONFIG_CPU_LITTLE_ENDIAN is not set
71CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 60CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
72CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 61CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
62CONFIG_IRQ_CPU=y
63CONFIG_IRQ_TXX9=y
73CONFIG_SWAP_IO_SPACE=y 64CONFIG_SWAP_IO_SPACE=y
74CONFIG_MIPS_L1_CACHE_SHIFT=5 65CONFIG_MIPS_L1_CACHE_SHIFT=5
75 66
76# 67#
77# CPU selection 68# CPU selection
78# 69#
70# CONFIG_CPU_LOONGSON2 is not set
79# CONFIG_CPU_MIPS32_R1 is not set 71# CONFIG_CPU_MIPS32_R1 is not set
80# CONFIG_CPU_MIPS32_R2 is not set 72# CONFIG_CPU_MIPS32_R2 is not set
81# CONFIG_CPU_MIPS64_R1 is not set 73# CONFIG_CPU_MIPS64_R1 is not set
@@ -114,22 +106,18 @@ CONFIG_CPU_HAS_PREFETCH=y
114CONFIG_MIPS_MT_DISABLED=y 106CONFIG_MIPS_MT_DISABLED=y
115# CONFIG_MIPS_MT_SMP is not set 107# CONFIG_MIPS_MT_SMP is not set
116# CONFIG_MIPS_MT_SMTC is not set 108# CONFIG_MIPS_MT_SMTC is not set
117# CONFIG_MIPS_VPE_LOADER is not set
118CONFIG_CPU_HAS_LLSC=y 109CONFIG_CPU_HAS_LLSC=y
119CONFIG_CPU_HAS_SYNC=y 110CONFIG_CPU_HAS_SYNC=y
120CONFIG_GENERIC_HARDIRQS=y 111CONFIG_GENERIC_HARDIRQS=y
121CONFIG_GENERIC_IRQ_PROBE=y 112CONFIG_GENERIC_IRQ_PROBE=y
122CONFIG_ARCH_FLATMEM_ENABLE=y 113CONFIG_ARCH_FLATMEM_ENABLE=y
123CONFIG_SELECT_MEMORY_MODEL=y
124CONFIG_FLATMEM_MANUAL=y
125# CONFIG_DISCONTIGMEM_MANUAL is not set
126# CONFIG_SPARSEMEM_MANUAL is not set
127CONFIG_FLATMEM=y 114CONFIG_FLATMEM=y
128CONFIG_FLAT_NODE_MEM_MAP=y 115CONFIG_FLAT_NODE_MEM_MAP=y
129# CONFIG_SPARSEMEM_STATIC is not set 116# CONFIG_SPARSEMEM_STATIC is not set
130CONFIG_SPLIT_PTLOCK_CPUS=4 117CONFIG_SPLIT_PTLOCK_CPUS=4
131# CONFIG_RESOURCES_64BIT is not set 118# CONFIG_RESOURCES_64BIT is not set
132CONFIG_ZONE_DMA_FLAG=0 119CONFIG_ZONE_DMA_FLAG=0
120CONFIG_VIRT_TO_BUS=y
133# CONFIG_HZ_48 is not set 121# CONFIG_HZ_48 is not set
134# CONFIG_HZ_100 is not set 122# CONFIG_HZ_100 is not set
135# CONFIG_HZ_128 is not set 123# CONFIG_HZ_128 is not set
@@ -142,31 +130,24 @@ CONFIG_HZ=250
142CONFIG_PREEMPT_NONE=y 130CONFIG_PREEMPT_NONE=y
143# CONFIG_PREEMPT_VOLUNTARY is not set 131# CONFIG_PREEMPT_VOLUNTARY is not set
144# CONFIG_PREEMPT is not set 132# CONFIG_PREEMPT is not set
145# CONFIG_KEXEC is not set 133# CONFIG_SECCOMP is not set
146CONFIG_LOCKDEP_SUPPORT=y 134CONFIG_LOCKDEP_SUPPORT=y
147CONFIG_STACKTRACE_SUPPORT=y 135CONFIG_STACKTRACE_SUPPORT=y
148CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 136CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
149 137
150# 138#
151# Code maturity level options 139# General setup
152# 140#
153CONFIG_EXPERIMENTAL=y 141# CONFIG_EXPERIMENTAL is not set
154CONFIG_BROKEN_ON_SMP=y 142CONFIG_BROKEN_ON_SMP=y
155CONFIG_INIT_ENV_ARG_LIMIT=32 143CONFIG_INIT_ENV_ARG_LIMIT=32
156
157#
158# General setup
159#
160CONFIG_LOCALVERSION="" 144CONFIG_LOCALVERSION=""
161CONFIG_LOCALVERSION_AUTO=y 145CONFIG_LOCALVERSION_AUTO=y
162CONFIG_SWAP=y 146CONFIG_SWAP=y
163CONFIG_SYSVIPC=y 147CONFIG_SYSVIPC=y
164# CONFIG_IPC_NS is not set
165CONFIG_SYSVIPC_SYSCTL=y 148CONFIG_SYSVIPC_SYSCTL=y
166# CONFIG_POSIX_MQUEUE is not set
167# CONFIG_BSD_PROCESS_ACCT is not set 149# CONFIG_BSD_PROCESS_ACCT is not set
168# CONFIG_TASKSTATS is not set 150# CONFIG_TASKSTATS is not set
169# CONFIG_UTS_NS is not set
170# CONFIG_AUDIT is not set 151# CONFIG_AUDIT is not set
171CONFIG_IKCONFIG=y 152CONFIG_IKCONFIG=y
172CONFIG_IKCONFIG_PROC=y 153CONFIG_IKCONFIG_PROC=y
@@ -175,7 +156,6 @@ CONFIG_SYSFS_DEPRECATED=y
175# CONFIG_RELAY is not set 156# CONFIG_RELAY is not set
176CONFIG_BLK_DEV_INITRD=y 157CONFIG_BLK_DEV_INITRD=y
177CONFIG_INITRAMFS_SOURCE="" 158CONFIG_INITRAMFS_SOURCE=""
178CONFIG_CC_OPTIMIZE_FOR_SIZE=y
179CONFIG_SYSCTL=y 159CONFIG_SYSCTL=y
180CONFIG_EMBEDDED=y 160CONFIG_EMBEDDED=y
181CONFIG_SYSCTL_SYSCALL=y 161CONFIG_SYSCTL_SYSCALL=y
@@ -187,7 +167,11 @@ CONFIG_BUG=y
187CONFIG_ELF_CORE=y 167CONFIG_ELF_CORE=y
188CONFIG_BASE_FULL=y 168CONFIG_BASE_FULL=y
189# CONFIG_FUTEX is not set 169# CONFIG_FUTEX is not set
170CONFIG_ANON_INODES=y
190# CONFIG_EPOLL is not set 171# CONFIG_EPOLL is not set
172CONFIG_SIGNALFD=y
173CONFIG_TIMERFD=y
174CONFIG_EVENTFD=y
191CONFIG_SHMEM=y 175CONFIG_SHMEM=y
192CONFIG_VM_EVENT_COUNTERS=y 176CONFIG_VM_EVENT_COUNTERS=y
193CONFIG_SLAB=y 177CONFIG_SLAB=y
@@ -195,19 +179,11 @@ CONFIG_SLAB=y
195# CONFIG_SLOB is not set 179# CONFIG_SLOB is not set
196# CONFIG_TINY_SHMEM is not set 180# CONFIG_TINY_SHMEM is not set
197CONFIG_BASE_SMALL=0 181CONFIG_BASE_SMALL=0
198
199#
200# Loadable module support
201#
202CONFIG_MODULES=y 182CONFIG_MODULES=y
203# CONFIG_MODULE_UNLOAD is not set 183# CONFIG_MODULE_UNLOAD is not set
204# CONFIG_MODVERSIONS is not set 184# CONFIG_MODVERSIONS is not set
205# CONFIG_MODULE_SRCVERSION_ALL is not set 185# CONFIG_MODULE_SRCVERSION_ALL is not set
206CONFIG_KMOD=y 186CONFIG_KMOD=y
207
208#
209# Block layer
210#
211CONFIG_BLOCK=y 187CONFIG_BLOCK=y
212# CONFIG_LBD is not set 188# CONFIG_LBD is not set
213# CONFIG_BLK_DEV_IO_TRACE is not set 189# CONFIG_BLK_DEV_IO_TRACE is not set
@@ -273,7 +249,6 @@ CONFIG_IP_PNP=y
273# CONFIG_NET_IPIP is not set 249# CONFIG_NET_IPIP is not set
274# CONFIG_NET_IPGRE is not set 250# CONFIG_NET_IPGRE is not set
275# CONFIG_IP_MROUTE is not set 251# CONFIG_IP_MROUTE is not set
276# CONFIG_ARPD is not set
277# CONFIG_SYN_COOKIES is not set 252# CONFIG_SYN_COOKIES is not set
278# CONFIG_INET_AH is not set 253# CONFIG_INET_AH is not set
279# CONFIG_INET_ESP is not set 254# CONFIG_INET_ESP is not set
@@ -288,38 +263,17 @@ CONFIG_INET_TCP_DIAG=y
288# CONFIG_TCP_CONG_ADVANCED is not set 263# CONFIG_TCP_CONG_ADVANCED is not set
289CONFIG_TCP_CONG_CUBIC=y 264CONFIG_TCP_CONG_CUBIC=y
290CONFIG_DEFAULT_TCP_CONG="cubic" 265CONFIG_DEFAULT_TCP_CONG="cubic"
291# CONFIG_TCP_MD5SIG is not set
292# CONFIG_IPV6 is not set 266# CONFIG_IPV6 is not set
293# CONFIG_INET6_XFRM_TUNNEL is not set 267# CONFIG_INET6_XFRM_TUNNEL is not set
294# CONFIG_INET6_TUNNEL is not set 268# CONFIG_INET6_TUNNEL is not set
295# CONFIG_NETWORK_SECMARK is not set 269# CONFIG_NETWORK_SECMARK is not set
296# CONFIG_NETFILTER is not set 270# CONFIG_NETFILTER is not set
297
298#
299# DCCP Configuration (EXPERIMENTAL)
300#
301# CONFIG_IP_DCCP is not set
302
303#
304# SCTP Configuration (EXPERIMENTAL)
305#
306# CONFIG_IP_SCTP is not set
307
308#
309# TIPC Configuration (EXPERIMENTAL)
310#
311# CONFIG_TIPC is not set
312# CONFIG_ATM is not set
313# CONFIG_BRIDGE is not set 271# CONFIG_BRIDGE is not set
314# CONFIG_VLAN_8021Q is not set 272# CONFIG_VLAN_8021Q is not set
315# CONFIG_DECNET is not set 273# CONFIG_DECNET is not set
316# CONFIG_LLC2 is not set 274# CONFIG_LLC2 is not set
317# CONFIG_IPX is not set 275# CONFIG_IPX is not set
318# CONFIG_ATALK is not set 276# CONFIG_ATALK is not set
319# CONFIG_X25 is not set
320# CONFIG_LAPB is not set
321# CONFIG_ECONET is not set
322# CONFIG_WAN_ROUTER is not set
323 277
324# 278#
325# QoS and/or fair queueing 279# QoS and/or fair queueing
@@ -333,14 +287,12 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
333# CONFIG_HAMRADIO is not set 287# CONFIG_HAMRADIO is not set
334# CONFIG_IRDA is not set 288# CONFIG_IRDA is not set
335# CONFIG_BT is not set 289# CONFIG_BT is not set
336# CONFIG_AF_RXRPC is not set
337 290
338# 291#
339# Wireless 292# Wireless
340# 293#
341# CONFIG_CFG80211 is not set 294# CONFIG_CFG80211 is not set
342# CONFIG_WIRELESS_EXT is not set 295# CONFIG_WIRELESS_EXT is not set
343# CONFIG_MAC80211 is not set
344# CONFIG_IEEE80211 is not set 296# CONFIG_IEEE80211 is not set
345# CONFIG_RFKILL is not set 297# CONFIG_RFKILL is not set
346 298
@@ -354,30 +306,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
354CONFIG_STANDALONE=y 306CONFIG_STANDALONE=y
355CONFIG_PREVENT_FIRMWARE_BUILD=y 307CONFIG_PREVENT_FIRMWARE_BUILD=y
356# CONFIG_SYS_HYPERVISOR is not set 308# CONFIG_SYS_HYPERVISOR is not set
357
358#
359# Connector - unified userspace <-> kernelspace linker
360#
361# CONFIG_CONNECTOR is not set 309# CONFIG_CONNECTOR is not set
362# CONFIG_MTD is not set 310# CONFIG_MTD is not set
363
364#
365# Parallel port support
366#
367# CONFIG_PARPORT is not set 311# CONFIG_PARPORT is not set
368 312CONFIG_BLK_DEV=y
369#
370# Plug and Play support
371#
372# CONFIG_PNPACPI is not set
373
374#
375# Block devices
376#
377# CONFIG_BLK_CPQ_DA is not set 313# CONFIG_BLK_CPQ_DA is not set
378# CONFIG_BLK_CPQ_CISS_DA is not set 314# CONFIG_BLK_CPQ_CISS_DA is not set
379# CONFIG_BLK_DEV_DAC960 is not set 315# CONFIG_BLK_DEV_DAC960 is not set
380# CONFIG_BLK_DEV_UMEM is not set
381# CONFIG_BLK_DEV_COW_COMMON is not set 316# CONFIG_BLK_DEV_COW_COMMON is not set
382CONFIG_BLK_DEV_LOOP=y 317CONFIG_BLK_DEV_LOOP=y
383# CONFIG_BLK_DEV_CRYPTOLOOP is not set 318# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -389,18 +324,7 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
389CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 324CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
390# CONFIG_CDROM_PKTCDVD is not set 325# CONFIG_CDROM_PKTCDVD is not set
391# CONFIG_ATA_OVER_ETH is not set 326# CONFIG_ATA_OVER_ETH is not set
392 327# CONFIG_MISC_DEVICES is not set
393#
394# Misc devices
395#
396# CONFIG_PHANTOM is not set
397# CONFIG_SGI_IOC4 is not set
398# CONFIG_TIFM_CORE is not set
399# CONFIG_BLINK is not set
400
401#
402# ATA/ATAPI/MFM/RLL support
403#
404# CONFIG_IDE is not set 328# CONFIG_IDE is not set
405 329
406# 330#
@@ -408,16 +332,9 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
408# 332#
409# CONFIG_RAID_ATTRS is not set 333# CONFIG_RAID_ATTRS is not set
410# CONFIG_SCSI is not set 334# CONFIG_SCSI is not set
335# CONFIG_SCSI_DMA is not set
411# CONFIG_SCSI_NETLINK is not set 336# CONFIG_SCSI_NETLINK is not set
412
413#
414# Serial ATA (prod) and Parallel ATA (experimental) drivers
415#
416# CONFIG_ATA is not set 337# CONFIG_ATA is not set
417
418#
419# Multi-device support (RAID and LVM)
420#
421# CONFIG_MD is not set 338# CONFIG_MD is not set
422 339
423# 340#
@@ -428,83 +345,34 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
428# 345#
429# IEEE 1394 (FireWire) support 346# IEEE 1394 (FireWire) support
430# 347#
431# CONFIG_IEEE1394 is not set
432 348
433# 349#
434# I2O device support 350# An alternative FireWire stack is available with EXPERIMENTAL=y
435# 351#
352# CONFIG_IEEE1394 is not set
436# CONFIG_I2O is not set 353# CONFIG_I2O is not set
437
438#
439# Network device support
440#
441CONFIG_NETDEVICES=y 354CONFIG_NETDEVICES=y
355# CONFIG_NETDEVICES_MULTIQUEUE is not set
442# CONFIG_DUMMY is not set 356# CONFIG_DUMMY is not set
443# CONFIG_BONDING is not set 357# CONFIG_BONDING is not set
444# CONFIG_EQUALIZER is not set 358# CONFIG_EQUALIZER is not set
445# CONFIG_TUN is not set 359# CONFIG_TUN is not set
446
447#
448# ARCnet devices
449#
450# CONFIG_ARCNET is not set 360# CONFIG_ARCNET is not set
451
452#
453# PHY device support
454#
455# CONFIG_PHYLIB is not set 361# CONFIG_PHYLIB is not set
456
457#
458# Ethernet (10 or 100Mbit)
459#
460CONFIG_NET_ETHERNET=y 362CONFIG_NET_ETHERNET=y
461# CONFIG_MII is not set 363# CONFIG_MII is not set
364# CONFIG_AX88796 is not set
462# CONFIG_HAPPYMEAL is not set 365# CONFIG_HAPPYMEAL is not set
463# CONFIG_SUNGEM is not set 366# CONFIG_SUNGEM is not set
464# CONFIG_CASSINI is not set 367# CONFIG_CASSINI is not set
465# CONFIG_NET_VENDOR_3COM is not set 368# CONFIG_NET_VENDOR_3COM is not set
466# CONFIG_DM9000 is not set 369# CONFIG_DM9000 is not set
467
468#
469# Tulip family network device support
470#
471# CONFIG_NET_TULIP is not set 370# CONFIG_NET_TULIP is not set
472# CONFIG_HP100 is not set 371# CONFIG_HP100 is not set
473CONFIG_NE2000=y 372CONFIG_NE2000=y
474# CONFIG_NET_PCI is not set 373# CONFIG_NET_PCI is not set
475 374# CONFIG_NETDEV_1000 is not set
476# 375# CONFIG_NETDEV_10000 is not set
477# Ethernet (1000 Mbit)
478#
479# CONFIG_ACENIC is not set
480# CONFIG_DL2K is not set
481# CONFIG_E1000 is not set
482# CONFIG_NS83820 is not set
483# CONFIG_HAMACHI is not set
484# CONFIG_YELLOWFIN is not set
485# CONFIG_R8169 is not set
486# CONFIG_SIS190 is not set
487# CONFIG_SKGE is not set
488# CONFIG_SKY2 is not set
489# CONFIG_SK98LIN is not set
490# CONFIG_TIGON3 is not set
491# CONFIG_BNX2 is not set
492# CONFIG_QLA3XXX is not set
493# CONFIG_ATL1 is not set
494
495#
496# Ethernet (10000 Mbit)
497#
498# CONFIG_CHELSIO_T1 is not set
499# CONFIG_CHELSIO_T3 is not set
500# CONFIG_IXGB is not set
501# CONFIG_S2IO is not set
502# CONFIG_MYRI10GE is not set
503# CONFIG_NETXEN_NIC is not set
504
505#
506# Token Ring devices
507#
508# CONFIG_TR is not set 376# CONFIG_TR is not set
509 377
510# 378#
@@ -512,28 +380,13 @@ CONFIG_NE2000=y
512# 380#
513# CONFIG_WLAN_PRE80211 is not set 381# CONFIG_WLAN_PRE80211 is not set
514# CONFIG_WLAN_80211 is not set 382# CONFIG_WLAN_80211 is not set
515
516#
517# Wan interfaces
518#
519# CONFIG_WAN is not set 383# CONFIG_WAN is not set
520# CONFIG_FDDI is not set 384# CONFIG_FDDI is not set
521# CONFIG_HIPPI is not set
522# CONFIG_PPP is not set 385# CONFIG_PPP is not set
523# CONFIG_SLIP is not set 386# CONFIG_SLIP is not set
524# CONFIG_SHAPER is not set
525# CONFIG_NETCONSOLE is not set
526# CONFIG_NETPOLL is not set 387# CONFIG_NETPOLL is not set
527# CONFIG_NET_POLL_CONTROLLER is not set 388# CONFIG_NET_POLL_CONTROLLER is not set
528
529#
530# ISDN subsystem
531#
532# CONFIG_ISDN is not set 389# CONFIG_ISDN is not set
533
534#
535# Telephony Support
536#
537# CONFIG_PHONE is not set 390# CONFIG_PHONE is not set
538 391
539# 392#
@@ -577,29 +430,14 @@ CONFIG_SERIAL_TXX9_STDSERIAL=y
577CONFIG_UNIX98_PTYS=y 430CONFIG_UNIX98_PTYS=y
578CONFIG_LEGACY_PTYS=y 431CONFIG_LEGACY_PTYS=y
579CONFIG_LEGACY_PTY_COUNT=256 432CONFIG_LEGACY_PTY_COUNT=256
580
581#
582# IPMI
583#
584# CONFIG_IPMI_HANDLER is not set 433# CONFIG_IPMI_HANDLER is not set
585
586#
587# Watchdog Cards
588#
589# CONFIG_WATCHDOG is not set 434# CONFIG_WATCHDOG is not set
590# CONFIG_HW_RANDOM is not set 435# CONFIG_HW_RANDOM is not set
591# CONFIG_RTC is not set 436# CONFIG_RTC is not set
592# CONFIG_GEN_RTC is not set
593# CONFIG_DTLK is not set
594# CONFIG_R3964 is not set 437# CONFIG_R3964 is not set
595# CONFIG_APPLICOM is not set 438# CONFIG_APPLICOM is not set
596# CONFIG_DRM is not set 439# CONFIG_DRM is not set
597# CONFIG_RAW_DRIVER is not set 440# CONFIG_RAW_DRIVER is not set
598
599#
600# TPM devices
601#
602# CONFIG_TCG_TPM is not set
603CONFIG_DEVPORT=y 441CONFIG_DEVPORT=y
604# CONFIG_I2C is not set 442# CONFIG_I2C is not set
605 443
@@ -608,11 +446,8 @@ CONFIG_DEVPORT=y
608# 446#
609# CONFIG_SPI is not set 447# CONFIG_SPI is not set
610# CONFIG_SPI_MASTER is not set 448# CONFIG_SPI_MASTER is not set
611
612#
613# Dallas's 1-wire bus
614#
615# CONFIG_W1 is not set 449# CONFIG_W1 is not set
450# CONFIG_POWER_SUPPLY is not set
616# CONFIG_HWMON is not set 451# CONFIG_HWMON is not set
617 452
618# 453#
@@ -624,11 +459,8 @@ CONFIG_DEVPORT=y
624# Multimedia devices 459# Multimedia devices
625# 460#
626# CONFIG_VIDEO_DEV is not set 461# CONFIG_VIDEO_DEV is not set
627 462# CONFIG_DVB_CORE is not set
628# 463# CONFIG_DAB is not set
629# Digital Video Broadcasting Devices
630#
631# CONFIG_DVB is not set
632 464
633# 465#
634# Graphics support 466# Graphics support
@@ -640,56 +472,17 @@ CONFIG_DEVPORT=y
640# 472#
641# CONFIG_DISPLAY_SUPPORT is not set 473# CONFIG_DISPLAY_SUPPORT is not set
642# CONFIG_VGASTATE is not set 474# CONFIG_VGASTATE is not set
475# CONFIG_VIDEO_OUTPUT_CONTROL is not set
643# CONFIG_FB is not set 476# CONFIG_FB is not set
644 477
645# 478#
646# Sound 479# Sound
647# 480#
648# CONFIG_SOUND is not set 481# CONFIG_SOUND is not set
649 482# CONFIG_USB_SUPPORT is not set
650#
651# USB support
652#
653CONFIG_USB_ARCH_HAS_HCD=y
654CONFIG_USB_ARCH_HAS_OHCI=y
655CONFIG_USB_ARCH_HAS_EHCI=y
656# CONFIG_USB is not set
657
658#
659# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
660#
661
662#
663# USB Gadget Support
664#
665# CONFIG_USB_GADGET is not set
666# CONFIG_MMC is not set 483# CONFIG_MMC is not set
667
668#
669# LED devices
670#
671# CONFIG_NEW_LEDS is not set 484# CONFIG_NEW_LEDS is not set
672
673#
674# LED drivers
675#
676
677#
678# LED Triggers
679#
680
681#
682# InfiniBand support
683#
684# CONFIG_INFINIBAND is not set 485# CONFIG_INFINIBAND is not set
685
686#
687# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
688#
689
690#
691# Real Time Clock
692#
693CONFIG_RTC_LIB=y 486CONFIG_RTC_LIB=y
694CONFIG_RTC_CLASS=y 487CONFIG_RTC_CLASS=y
695CONFIG_RTC_HCTOSYS=y 488CONFIG_RTC_HCTOSYS=y
@@ -706,19 +499,18 @@ CONFIG_RTC_INTF_DEV=y
706# CONFIG_RTC_DRV_TEST is not set 499# CONFIG_RTC_DRV_TEST is not set
707 500
708# 501#
709# I2C RTC drivers
710#
711
712#
713# SPI RTC drivers 502# SPI RTC drivers
714# 503#
715 504
716# 505#
717# Platform RTC drivers 506# Platform RTC drivers
718# 507#
508# CONFIG_RTC_DRV_CMOS is not set
719# CONFIG_RTC_DRV_DS1553 is not set 509# CONFIG_RTC_DRV_DS1553 is not set
510# CONFIG_RTC_DRV_STK17TA8 is not set
720CONFIG_RTC_DRV_DS1742=y 511CONFIG_RTC_DRV_DS1742=y
721# CONFIG_RTC_DRV_M48T86 is not set 512# CONFIG_RTC_DRV_M48T86 is not set
513# CONFIG_RTC_DRV_M48T59 is not set
722# CONFIG_RTC_DRV_V3020 is not set 514# CONFIG_RTC_DRV_V3020 is not set
723 515
724# 516#
@@ -739,24 +531,19 @@ CONFIG_RTC_DRV_DS1742=y
739# 531#
740 532
741# 533#
742# Auxiliary Display support 534# Userspace I/O
743#
744
745#
746# Virtualization
747# 535#
536# CONFIG_UIO is not set
748 537
749# 538#
750# File systems 539# File systems
751# 540#
752# CONFIG_EXT2_FS is not set 541# CONFIG_EXT2_FS is not set
753# CONFIG_EXT3_FS is not set 542# CONFIG_EXT3_FS is not set
754# CONFIG_EXT4DEV_FS is not set
755# CONFIG_REISERFS_FS is not set 543# CONFIG_REISERFS_FS is not set
756# CONFIG_JFS_FS is not set 544# CONFIG_JFS_FS is not set
757CONFIG_FS_POSIX_ACL=y 545CONFIG_FS_POSIX_ACL=y
758# CONFIG_XFS_FS is not set 546# CONFIG_XFS_FS is not set
759# CONFIG_GFS2_FS is not set
760# CONFIG_OCFS2_FS is not set 547# CONFIG_OCFS2_FS is not set
761# CONFIG_MINIX_FS is not set 548# CONFIG_MINIX_FS is not set
762# CONFIG_ROMFS_FS is not set 549# CONFIG_ROMFS_FS is not set
@@ -793,18 +580,11 @@ CONFIG_TMPFS=y
793CONFIG_TMPFS_POSIX_ACL=y 580CONFIG_TMPFS_POSIX_ACL=y
794# CONFIG_HUGETLB_PAGE is not set 581# CONFIG_HUGETLB_PAGE is not set
795CONFIG_RAMFS=y 582CONFIG_RAMFS=y
796# CONFIG_CONFIGFS_FS is not set
797 583
798# 584#
799# Miscellaneous filesystems 585# Miscellaneous filesystems
800# 586#
801# CONFIG_ADFS_FS is not set
802# CONFIG_AFFS_FS is not set
803# CONFIG_HFS_FS is not set
804# CONFIG_HFSPLUS_FS is not set 587# CONFIG_HFSPLUS_FS is not set
805# CONFIG_BEFS_FS is not set
806# CONFIG_BFS_FS is not set
807# CONFIG_EFS_FS is not set
808# CONFIG_CRAMFS is not set 588# CONFIG_CRAMFS is not set
809# CONFIG_VXFS_FS is not set 589# CONFIG_VXFS_FS is not set
810# CONFIG_HPFS_FS is not set 590# CONFIG_HPFS_FS is not set
@@ -818,7 +598,6 @@ CONFIG_RAMFS=y
818CONFIG_NFS_FS=y 598CONFIG_NFS_FS=y
819CONFIG_NFS_V3=y 599CONFIG_NFS_V3=y
820# CONFIG_NFS_V3_ACL is not set 600# CONFIG_NFS_V3_ACL is not set
821# CONFIG_NFS_V4 is not set
822# CONFIG_NFS_DIRECTIO is not set 601# CONFIG_NFS_DIRECTIO is not set
823# CONFIG_NFSD is not set 602# CONFIG_NFSD is not set
824CONFIG_ROOT_NFS=y 603CONFIG_ROOT_NFS=y
@@ -826,15 +605,10 @@ CONFIG_LOCKD=y
826CONFIG_LOCKD_V4=y 605CONFIG_LOCKD_V4=y
827CONFIG_NFS_COMMON=y 606CONFIG_NFS_COMMON=y
828CONFIG_SUNRPC=y 607CONFIG_SUNRPC=y
829# CONFIG_SUNRPC_BIND34 is not set
830# CONFIG_RPCSEC_GSS_KRB5 is not set
831# CONFIG_RPCSEC_GSS_SPKM3 is not set
832# CONFIG_SMB_FS is not set 608# CONFIG_SMB_FS is not set
833# CONFIG_CIFS is not set 609# CONFIG_CIFS is not set
834# CONFIG_NCP_FS is not set 610# CONFIG_NCP_FS is not set
835# CONFIG_CODA_FS is not set 611# CONFIG_CODA_FS is not set
836# CONFIG_AFS_FS is not set
837# CONFIG_9P_FS is not set
838 612
839# 613#
840# Partition Types 614# Partition Types
@@ -848,16 +622,6 @@ CONFIG_MSDOS_PARTITION=y
848# CONFIG_NLS is not set 622# CONFIG_NLS is not set
849 623
850# 624#
851# Distributed Lock Manager
852#
853# CONFIG_DLM is not set
854
855#
856# Profiling support
857#
858# CONFIG_PROFILING is not set
859
860#
861# Kernel hacking 625# Kernel hacking
862# 626#
863CONFIG_TRACE_IRQFLAGS_SUPPORT=y 627CONFIG_TRACE_IRQFLAGS_SUPPORT=y
@@ -877,10 +641,6 @@ CONFIG_SYS_SUPPORTS_KGDB=y
877# 641#
878# CONFIG_KEYS is not set 642# CONFIG_KEYS is not set
879# CONFIG_SECURITY is not set 643# CONFIG_SECURITY is not set
880
881#
882# Cryptographic options
883#
884# CONFIG_CRYPTO is not set 644# CONFIG_CRYPTO is not set
885 645
886# 646#
@@ -889,7 +649,9 @@ CONFIG_SYS_SUPPORTS_KGDB=y
889CONFIG_BITREVERSE=y 649CONFIG_BITREVERSE=y
890# CONFIG_CRC_CCITT is not set 650# CONFIG_CRC_CCITT is not set
891# CONFIG_CRC16 is not set 651# CONFIG_CRC16 is not set
652# CONFIG_CRC_ITU_T is not set
892CONFIG_CRC32=y 653CONFIG_CRC32=y
654# CONFIG_CRC7 is not set
893# CONFIG_LIBCRC32C is not set 655# CONFIG_LIBCRC32C is not set
894CONFIG_HAS_IOMEM=y 656CONFIG_HAS_IOMEM=y
895CONFIG_HAS_IOPORT=y 657CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/rbhma4500_defconfig b/arch/mips/configs/rbhma4500_defconfig
index 40453cd7c7..d1b56cc0fd 100644
--- a/arch/mips/configs/rbhma4500_defconfig
+++ b/arch/mips/configs/rbhma4500_defconfig
@@ -1,48 +1,47 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc5 3# Linux kernel version: 2.6.23-rc1
4# Fri Jun 22 21:39:45 2007 4# Thu Aug 2 22:59:53 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
12# CONFIG_LEMOTE_FULONG is not set
13# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
14# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
15# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
16# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
17# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
16# CONFIG_LEMOTE_FULONG is not set
18# CONFIG_MIPS_ATLAS is not set 17# CONFIG_MIPS_ATLAS is not set
19# CONFIG_MIPS_MALTA is not set 18# CONFIG_MIPS_MALTA is not set
20# CONFIG_MIPS_SEAD is not set 19# CONFIG_MIPS_SEAD is not set
21# CONFIG_WR_PPMC is not set
22# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
21# CONFIG_MARKEINS is not set
22# CONFIG_MACH_VR41XX is not set
23# CONFIG_PNX8550_JBS is not set 23# CONFIG_PNX8550_JBS is not set
24# CONFIG_PNX8550_STB810 is not set 24# CONFIG_PNX8550_STB810 is not set
25# CONFIG_MACH_VR41XX is not set
26# CONFIG_PMC_MSP is not set 25# CONFIG_PMC_MSP is not set
27# CONFIG_PMC_YOSEMITE is not set 26# CONFIG_PMC_YOSEMITE is not set
28# CONFIG_QEMU is not set 27# CONFIG_QEMU is not set
29# CONFIG_MARKEINS is not set
30# CONFIG_SGI_IP22 is not set 28# CONFIG_SGI_IP22 is not set
31# CONFIG_SGI_IP27 is not set 29# CONFIG_SGI_IP27 is not set
32# CONFIG_SGI_IP32 is not set 30# CONFIG_SGI_IP32 is not set
33# CONFIG_SIBYTE_BIGSUR is not set 31# CONFIG_SIBYTE_CRHINE is not set
32# CONFIG_SIBYTE_CARMEL is not set
33# CONFIG_SIBYTE_CRHONE is not set
34# CONFIG_SIBYTE_RHONE is not set
34# CONFIG_SIBYTE_SWARM is not set 35# CONFIG_SIBYTE_SWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set
35# CONFIG_SIBYTE_SENTOSA is not set 37# CONFIG_SIBYTE_SENTOSA is not set
36# CONFIG_SIBYTE_RHONE is not set
37# CONFIG_SIBYTE_CARMEL is not set
38# CONFIG_SIBYTE_PTSWARM is not set 38# CONFIG_SIBYTE_PTSWARM is not set
39# CONFIG_SIBYTE_LITTLESUR is not set 39# CONFIG_SIBYTE_BIGSUR is not set
40# CONFIG_SIBYTE_CRHINE is not set
41# CONFIG_SIBYTE_CRHONE is not set
42# CONFIG_SNI_RM is not set 40# CONFIG_SNI_RM is not set
43# CONFIG_TOSHIBA_JMR3927 is not set 41# CONFIG_TOSHIBA_JMR3927 is not set
44# CONFIG_TOSHIBA_RBTX4927 is not set 42# CONFIG_TOSHIBA_RBTX4927 is not set
45CONFIG_TOSHIBA_RBTX4938=y 43CONFIG_TOSHIBA_RBTX4938=y
44# CONFIG_WR_PPMC is not set
46 45
47# 46#
48# Multiplex Pin Select 47# Multiplex Pin Select
@@ -61,17 +60,16 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
61CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 60CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
62CONFIG_DMA_NONCOHERENT=y 61CONFIG_DMA_NONCOHERENT=y
63CONFIG_DMA_NEED_PCI_MAP_STATE=y 62CONFIG_DMA_NEED_PCI_MAP_STATE=y
64CONFIG_GENERIC_ISA_DMA=y
65CONFIG_I8259=y
66# CONFIG_NO_IOPORT is not set 63# CONFIG_NO_IOPORT is not set
67CONFIG_GENERIC_GPIO=y 64CONFIG_GENERIC_GPIO=y
68# CONFIG_CPU_BIG_ENDIAN is not set 65# CONFIG_CPU_BIG_ENDIAN is not set
69CONFIG_CPU_LITTLE_ENDIAN=y 66CONFIG_CPU_LITTLE_ENDIAN=y
70CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 67CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
71CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 68CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
69CONFIG_IRQ_CPU=y
70CONFIG_IRQ_TXX9=y
72CONFIG_SWAP_IO_SPACE=y 71CONFIG_SWAP_IO_SPACE=y
73CONFIG_MIPS_L1_CACHE_SHIFT=5 72CONFIG_MIPS_L1_CACHE_SHIFT=5
74CONFIG_HAVE_STD_PC_SERIAL_PORT=y
75 73
76# 74#
77# CPU selection 75# CPU selection
@@ -114,22 +112,18 @@ CONFIG_CPU_HAS_PREFETCH=y
114CONFIG_MIPS_MT_DISABLED=y 112CONFIG_MIPS_MT_DISABLED=y
115# CONFIG_MIPS_MT_SMP is not set 113# CONFIG_MIPS_MT_SMP is not set
116# CONFIG_MIPS_MT_SMTC is not set 114# CONFIG_MIPS_MT_SMTC is not set
117# CONFIG_MIPS_VPE_LOADER is not set
118CONFIG_CPU_HAS_LLSC=y 115CONFIG_CPU_HAS_LLSC=y
119CONFIG_CPU_HAS_SYNC=y 116CONFIG_CPU_HAS_SYNC=y
120CONFIG_GENERIC_HARDIRQS=y 117CONFIG_GENERIC_HARDIRQS=y
121CONFIG_GENERIC_IRQ_PROBE=y 118CONFIG_GENERIC_IRQ_PROBE=y
122CONFIG_ARCH_FLATMEM_ENABLE=y 119CONFIG_ARCH_FLATMEM_ENABLE=y
123CONFIG_SELECT_MEMORY_MODEL=y
124CONFIG_FLATMEM_MANUAL=y
125# CONFIG_DISCONTIGMEM_MANUAL is not set
126# CONFIG_SPARSEMEM_MANUAL is not set
127CONFIG_FLATMEM=y 120CONFIG_FLATMEM=y
128CONFIG_FLAT_NODE_MEM_MAP=y 121CONFIG_FLAT_NODE_MEM_MAP=y
129# CONFIG_SPARSEMEM_STATIC is not set 122# CONFIG_SPARSEMEM_STATIC is not set
130CONFIG_SPLIT_PTLOCK_CPUS=4 123CONFIG_SPLIT_PTLOCK_CPUS=4
131# CONFIG_RESOURCES_64BIT is not set 124# CONFIG_RESOURCES_64BIT is not set
132CONFIG_ZONE_DMA_FLAG=1 125CONFIG_ZONE_DMA_FLAG=0
126CONFIG_VIRT_TO_BUS=y
133# CONFIG_HZ_48 is not set 127# CONFIG_HZ_48 is not set
134# CONFIG_HZ_100 is not set 128# CONFIG_HZ_100 is not set
135# CONFIG_HZ_128 is not set 129# CONFIG_HZ_128 is not set
@@ -142,31 +136,24 @@ CONFIG_HZ=250
142CONFIG_PREEMPT_NONE=y 136CONFIG_PREEMPT_NONE=y
143# CONFIG_PREEMPT_VOLUNTARY is not set 137# CONFIG_PREEMPT_VOLUNTARY is not set
144# CONFIG_PREEMPT is not set 138# CONFIG_PREEMPT is not set
145# CONFIG_KEXEC is not set 139# CONFIG_SECCOMP is not set
146CONFIG_LOCKDEP_SUPPORT=y 140CONFIG_LOCKDEP_SUPPORT=y
147CONFIG_STACKTRACE_SUPPORT=y 141CONFIG_STACKTRACE_SUPPORT=y
148CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 142CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
149 143
150# 144#
151# Code maturity level options 145# General setup
152# 146#
153CONFIG_EXPERIMENTAL=y 147# CONFIG_EXPERIMENTAL is not set
154CONFIG_BROKEN_ON_SMP=y 148CONFIG_BROKEN_ON_SMP=y
155CONFIG_INIT_ENV_ARG_LIMIT=32 149CONFIG_INIT_ENV_ARG_LIMIT=32
156
157#
158# General setup
159#
160CONFIG_LOCALVERSION="" 150CONFIG_LOCALVERSION=""
161CONFIG_LOCALVERSION_AUTO=y 151CONFIG_LOCALVERSION_AUTO=y
162CONFIG_SWAP=y 152CONFIG_SWAP=y
163CONFIG_SYSVIPC=y 153CONFIG_SYSVIPC=y
164# CONFIG_IPC_NS is not set
165CONFIG_SYSVIPC_SYSCTL=y 154CONFIG_SYSVIPC_SYSCTL=y
166# CONFIG_POSIX_MQUEUE is not set
167# CONFIG_BSD_PROCESS_ACCT is not set 155# CONFIG_BSD_PROCESS_ACCT is not set
168# CONFIG_TASKSTATS is not set 156# CONFIG_TASKSTATS is not set
169# CONFIG_UTS_NS is not set
170# CONFIG_AUDIT is not set 157# CONFIG_AUDIT is not set
171CONFIG_IKCONFIG=y 158CONFIG_IKCONFIG=y
172CONFIG_IKCONFIG_PROC=y 159CONFIG_IKCONFIG_PROC=y
@@ -175,7 +162,6 @@ CONFIG_SYSFS_DEPRECATED=y
175# CONFIG_RELAY is not set 162# CONFIG_RELAY is not set
176CONFIG_BLK_DEV_INITRD=y 163CONFIG_BLK_DEV_INITRD=y
177CONFIG_INITRAMFS_SOURCE="" 164CONFIG_INITRAMFS_SOURCE=""
178CONFIG_CC_OPTIMIZE_FOR_SIZE=y
179CONFIG_SYSCTL=y 165CONFIG_SYSCTL=y
180CONFIG_EMBEDDED=y 166CONFIG_EMBEDDED=y
181CONFIG_SYSCTL_SYSCALL=y 167CONFIG_SYSCTL_SYSCALL=y
@@ -199,19 +185,11 @@ CONFIG_SLAB=y
199# CONFIG_SLOB is not set 185# CONFIG_SLOB is not set
200# CONFIG_TINY_SHMEM is not set 186# CONFIG_TINY_SHMEM is not set
201CONFIG_BASE_SMALL=0 187CONFIG_BASE_SMALL=0
202
203#
204# Loadable module support
205#
206CONFIG_MODULES=y 188CONFIG_MODULES=y
207# CONFIG_MODULE_UNLOAD is not set 189# CONFIG_MODULE_UNLOAD is not set
208# CONFIG_MODVERSIONS is not set 190# CONFIG_MODVERSIONS is not set
209# CONFIG_MODULE_SRCVERSION_ALL is not set 191# CONFIG_MODULE_SRCVERSION_ALL is not set
210CONFIG_KMOD=y 192CONFIG_KMOD=y
211
212#
213# Block layer
214#
215CONFIG_BLOCK=y 193CONFIG_BLOCK=y
216# CONFIG_LBD is not set 194# CONFIG_LBD is not set
217# CONFIG_BLK_DEV_IO_TRACE is not set 195# CONFIG_BLK_DEV_IO_TRACE is not set
@@ -277,7 +255,6 @@ CONFIG_IP_PNP=y
277# CONFIG_NET_IPIP is not set 255# CONFIG_NET_IPIP is not set
278# CONFIG_NET_IPGRE is not set 256# CONFIG_NET_IPGRE is not set
279# CONFIG_IP_MROUTE is not set 257# CONFIG_IP_MROUTE is not set
280# CONFIG_ARPD is not set
281# CONFIG_SYN_COOKIES is not set 258# CONFIG_SYN_COOKIES is not set
282# CONFIG_INET_AH is not set 259# CONFIG_INET_AH is not set
283# CONFIG_INET_ESP is not set 260# CONFIG_INET_ESP is not set
@@ -292,26 +269,17 @@ CONFIG_INET_TCP_DIAG=y
292# CONFIG_TCP_CONG_ADVANCED is not set 269# CONFIG_TCP_CONG_ADVANCED is not set
293CONFIG_TCP_CONG_CUBIC=y 270CONFIG_TCP_CONG_CUBIC=y
294CONFIG_DEFAULT_TCP_CONG="cubic" 271CONFIG_DEFAULT_TCP_CONG="cubic"
295# CONFIG_TCP_MD5SIG is not set
296# CONFIG_IPV6 is not set 272# CONFIG_IPV6 is not set
297# CONFIG_INET6_XFRM_TUNNEL is not set 273# CONFIG_INET6_XFRM_TUNNEL is not set
298# CONFIG_INET6_TUNNEL is not set 274# CONFIG_INET6_TUNNEL is not set
299# CONFIG_NETWORK_SECMARK is not set 275# CONFIG_NETWORK_SECMARK is not set
300# CONFIG_NETFILTER is not set 276# CONFIG_NETFILTER is not set
301# CONFIG_IP_DCCP is not set
302# CONFIG_IP_SCTP is not set
303# CONFIG_TIPC is not set
304# CONFIG_ATM is not set
305# CONFIG_BRIDGE is not set 277# CONFIG_BRIDGE is not set
306# CONFIG_VLAN_8021Q is not set 278# CONFIG_VLAN_8021Q is not set
307# CONFIG_DECNET is not set 279# CONFIG_DECNET is not set
308# CONFIG_LLC2 is not set 280# CONFIG_LLC2 is not set
309# CONFIG_IPX is not set 281# CONFIG_IPX is not set
310# CONFIG_ATALK is not set 282# CONFIG_ATALK is not set
311# CONFIG_X25 is not set
312# CONFIG_LAPB is not set
313# CONFIG_ECONET is not set
314# CONFIG_WAN_ROUTER is not set
315 283
316# 284#
317# QoS and/or fair queueing 285# QoS and/or fair queueing
@@ -325,14 +293,12 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
325# CONFIG_HAMRADIO is not set 293# CONFIG_HAMRADIO is not set
326# CONFIG_IRDA is not set 294# CONFIG_IRDA is not set
327# CONFIG_BT is not set 295# CONFIG_BT is not set
328# CONFIG_AF_RXRPC is not set
329 296
330# 297#
331# Wireless 298# Wireless
332# 299#
333# CONFIG_CFG80211 is not set 300# CONFIG_CFG80211 is not set
334# CONFIG_WIRELESS_EXT is not set 301# CONFIG_WIRELESS_EXT is not set
335# CONFIG_MAC80211 is not set
336# CONFIG_IEEE80211 is not set 302# CONFIG_IEEE80211 is not set
337# CONFIG_RFKILL is not set 303# CONFIG_RFKILL is not set
338 304
@@ -346,30 +312,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
346CONFIG_STANDALONE=y 312CONFIG_STANDALONE=y
347CONFIG_PREVENT_FIRMWARE_BUILD=y 313CONFIG_PREVENT_FIRMWARE_BUILD=y
348# CONFIG_SYS_HYPERVISOR is not set 314# CONFIG_SYS_HYPERVISOR is not set
349
350#
351# Connector - unified userspace <-> kernelspace linker
352#
353# CONFIG_CONNECTOR is not set 315# CONFIG_CONNECTOR is not set
354# CONFIG_MTD is not set 316# CONFIG_MTD is not set
355
356#
357# Parallel port support
358#
359# CONFIG_PARPORT is not set 317# CONFIG_PARPORT is not set
360 318CONFIG_BLK_DEV=y
361#
362# Plug and Play support
363#
364# CONFIG_PNPACPI is not set
365
366#
367# Block devices
368#
369# CONFIG_BLK_CPQ_DA is not set 319# CONFIG_BLK_CPQ_DA is not set
370# CONFIG_BLK_CPQ_CISS_DA is not set 320# CONFIG_BLK_CPQ_CISS_DA is not set
371# CONFIG_BLK_DEV_DAC960 is not set 321# CONFIG_BLK_DEV_DAC960 is not set
372# CONFIG_BLK_DEV_UMEM is not set
373# CONFIG_BLK_DEV_COW_COMMON is not set 322# CONFIG_BLK_DEV_COW_COMMON is not set
374CONFIG_BLK_DEV_LOOP=y 323CONFIG_BLK_DEV_LOOP=y
375# CONFIG_BLK_DEV_CRYPTOLOOP is not set 324# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -381,14 +330,7 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
381CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 330CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
382# CONFIG_CDROM_PKTCDVD is not set 331# CONFIG_CDROM_PKTCDVD is not set
383# CONFIG_ATA_OVER_ETH is not set 332# CONFIG_ATA_OVER_ETH is not set
384 333# CONFIG_MISC_DEVICES is not set
385#
386# Misc devices
387#
388# CONFIG_PHANTOM is not set
389# CONFIG_SGI_IOC4 is not set
390# CONFIG_TIFM_CORE is not set
391# CONFIG_BLINK is not set
392# CONFIG_IDE is not set 334# CONFIG_IDE is not set
393 335
394# 336#
@@ -396,12 +338,9 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
396# 338#
397# CONFIG_RAID_ATTRS is not set 339# CONFIG_RAID_ATTRS is not set
398# CONFIG_SCSI is not set 340# CONFIG_SCSI is not set
341# CONFIG_SCSI_DMA is not set
399# CONFIG_SCSI_NETLINK is not set 342# CONFIG_SCSI_NETLINK is not set
400# CONFIG_ATA is not set 343# CONFIG_ATA is not set
401
402#
403# Multi-device support (RAID and LVM)
404#
405# CONFIG_MD is not set 344# CONFIG_MD is not set
406 345
407# 346#
@@ -412,39 +351,28 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
412# 351#
413# IEEE 1394 (FireWire) support 352# IEEE 1394 (FireWire) support
414# 353#
415# CONFIG_FIREWIRE is not set
416# CONFIG_IEEE1394 is not set
417 354
418# 355#
419# I2O device support 356# An alternative FireWire stack is available with EXPERIMENTAL=y
420# 357#
358# CONFIG_IEEE1394 is not set
421# CONFIG_I2O is not set 359# CONFIG_I2O is not set
422
423#
424# Network device support
425#
426CONFIG_NETDEVICES=y 360CONFIG_NETDEVICES=y
361# CONFIG_NETDEVICES_MULTIQUEUE is not set
427# CONFIG_DUMMY is not set 362# CONFIG_DUMMY is not set
428# CONFIG_BONDING is not set 363# CONFIG_BONDING is not set
429# CONFIG_EQUALIZER is not set 364# CONFIG_EQUALIZER is not set
430# CONFIG_TUN is not set 365# CONFIG_TUN is not set
431# CONFIG_ARCNET is not set 366# CONFIG_ARCNET is not set
432# CONFIG_PHYLIB is not set 367# CONFIG_PHYLIB is not set
433
434#
435# Ethernet (10 or 100Mbit)
436#
437CONFIG_NET_ETHERNET=y 368CONFIG_NET_ETHERNET=y
438CONFIG_MII=y 369CONFIG_MII=y
370# CONFIG_AX88796 is not set
439# CONFIG_HAPPYMEAL is not set 371# CONFIG_HAPPYMEAL is not set
440# CONFIG_SUNGEM is not set 372# CONFIG_SUNGEM is not set
441# CONFIG_CASSINI is not set 373# CONFIG_CASSINI is not set
442# CONFIG_NET_VENDOR_3COM is not set 374# CONFIG_NET_VENDOR_3COM is not set
443# CONFIG_DM9000 is not set 375# CONFIG_DM9000 is not set
444
445#
446# Tulip family network device support
447#
448# CONFIG_NET_TULIP is not set 376# CONFIG_NET_TULIP is not set
449# CONFIG_HP100 is not set 377# CONFIG_HP100 is not set
450CONFIG_NE2000=y 378CONFIG_NE2000=y
@@ -461,14 +389,12 @@ CONFIG_TC35815=y
461# CONFIG_FEALNX is not set 389# CONFIG_FEALNX is not set
462# CONFIG_NATSEMI is not set 390# CONFIG_NATSEMI is not set
463# CONFIG_NE2K_PCI is not set 391# CONFIG_NE2K_PCI is not set
464# CONFIG_8139CP is not set
465# CONFIG_8139TOO is not set 392# CONFIG_8139TOO is not set
466# CONFIG_SIS900 is not set 393# CONFIG_SIS900 is not set
467# CONFIG_EPIC100 is not set 394# CONFIG_EPIC100 is not set
468# CONFIG_SUNDANCE is not set 395# CONFIG_SUNDANCE is not set
469# CONFIG_TLAN is not set 396# CONFIG_TLAN is not set
470# CONFIG_VIA_RHINE is not set 397# CONFIG_VIA_RHINE is not set
471# CONFIG_SC92031 is not set
472# CONFIG_NETDEV_1000 is not set 398# CONFIG_NETDEV_1000 is not set
473# CONFIG_NETDEV_10000 is not set 399# CONFIG_NETDEV_10000 is not set
474# CONFIG_TR is not set 400# CONFIG_TR is not set
@@ -480,22 +406,11 @@ CONFIG_TC35815=y
480# CONFIG_WLAN_80211 is not set 406# CONFIG_WLAN_80211 is not set
481# CONFIG_WAN is not set 407# CONFIG_WAN is not set
482# CONFIG_FDDI is not set 408# CONFIG_FDDI is not set
483# CONFIG_HIPPI is not set
484# CONFIG_PPP is not set 409# CONFIG_PPP is not set
485# CONFIG_SLIP is not set 410# CONFIG_SLIP is not set
486# CONFIG_SHAPER is not set
487# CONFIG_NETCONSOLE is not set
488# CONFIG_NETPOLL is not set 411# CONFIG_NETPOLL is not set
489# CONFIG_NET_POLL_CONTROLLER is not set 412# CONFIG_NET_POLL_CONTROLLER is not set
490
491#
492# ISDN subsystem
493#
494# CONFIG_ISDN is not set 413# CONFIG_ISDN is not set
495
496#
497# Telephony Support
498#
499# CONFIG_PHONE is not set 414# CONFIG_PHONE is not set
500 415
501# 416#
@@ -534,24 +449,14 @@ CONFIG_SERIAL_TXX9_STDSERIAL=y
534CONFIG_UNIX98_PTYS=y 449CONFIG_UNIX98_PTYS=y
535CONFIG_LEGACY_PTYS=y 450CONFIG_LEGACY_PTYS=y
536CONFIG_LEGACY_PTY_COUNT=256 451CONFIG_LEGACY_PTY_COUNT=256
537
538#
539# IPMI
540#
541# CONFIG_IPMI_HANDLER is not set 452# CONFIG_IPMI_HANDLER is not set
542# CONFIG_WATCHDOG is not set 453# CONFIG_WATCHDOG is not set
543# CONFIG_HW_RANDOM is not set 454# CONFIG_HW_RANDOM is not set
544# CONFIG_RTC is not set 455# CONFIG_RTC is not set
545# CONFIG_GEN_RTC is not set
546# CONFIG_R3964 is not set 456# CONFIG_R3964 is not set
547# CONFIG_APPLICOM is not set 457# CONFIG_APPLICOM is not set
548# CONFIG_DRM is not set 458# CONFIG_DRM is not set
549# CONFIG_RAW_DRIVER is not set 459# CONFIG_RAW_DRIVER is not set
550
551#
552# TPM devices
553#
554# CONFIG_TCG_TPM is not set
555CONFIG_DEVPORT=y 460CONFIG_DEVPORT=y
556# CONFIG_I2C is not set 461# CONFIG_I2C is not set
557 462
@@ -564,19 +469,15 @@ CONFIG_SPI_MASTER=y
564# 469#
565# SPI Master Controller Drivers 470# SPI Master Controller Drivers
566# 471#
567# CONFIG_SPI_BITBANG is not set
568CONFIG_SPI_TXX9=y 472CONFIG_SPI_TXX9=y
569 473
570# 474#
571# SPI Protocol Masters 475# SPI Protocol Masters
572# 476#
573CONFIG_SPI_AT25=y 477CONFIG_SPI_AT25=y
574# CONFIG_SPI_SPIDEV is not set 478# CONFIG_SPI_TLE62X0 is not set
575
576#
577# Dallas's 1-wire bus
578#
579# CONFIG_W1 is not set 479# CONFIG_W1 is not set
480# CONFIG_POWER_SUPPLY is not set
580# CONFIG_HWMON is not set 481# CONFIG_HWMON is not set
581 482
582# 483#
@@ -601,56 +502,17 @@ CONFIG_SPI_AT25=y
601# 502#
602# CONFIG_DISPLAY_SUPPORT is not set 503# CONFIG_DISPLAY_SUPPORT is not set
603# CONFIG_VGASTATE is not set 504# CONFIG_VGASTATE is not set
505# CONFIG_VIDEO_OUTPUT_CONTROL is not set
604# CONFIG_FB is not set 506# CONFIG_FB is not set
605 507
606# 508#
607# Sound 509# Sound
608# 510#
609# CONFIG_SOUND is not set 511# CONFIG_SOUND is not set
610 512# CONFIG_USB_SUPPORT is not set
611#
612# USB support
613#
614CONFIG_USB_ARCH_HAS_HCD=y
615CONFIG_USB_ARCH_HAS_OHCI=y
616CONFIG_USB_ARCH_HAS_EHCI=y
617# CONFIG_USB is not set
618
619#
620# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
621#
622
623#
624# USB Gadget Support
625#
626# CONFIG_USB_GADGET is not set
627# CONFIG_MMC is not set 513# CONFIG_MMC is not set
628
629#
630# LED devices
631#
632# CONFIG_NEW_LEDS is not set 514# CONFIG_NEW_LEDS is not set
633
634#
635# LED drivers
636#
637
638#
639# LED Triggers
640#
641
642#
643# InfiniBand support
644#
645# CONFIG_INFINIBAND is not set 515# CONFIG_INFINIBAND is not set
646
647#
648# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
649#
650
651#
652# Real Time Clock
653#
654CONFIG_RTC_LIB=y 516CONFIG_RTC_LIB=y
655CONFIG_RTC_CLASS=y 517CONFIG_RTC_CLASS=y
656CONFIG_RTC_HCTOSYS=y 518CONFIG_RTC_HCTOSYS=y
@@ -667,10 +529,6 @@ CONFIG_RTC_INTF_DEV_UIE_EMUL=y
667# CONFIG_RTC_DRV_TEST is not set 529# CONFIG_RTC_DRV_TEST is not set
668 530
669# 531#
670# I2C RTC drivers
671#
672
673#
674# SPI RTC drivers 532# SPI RTC drivers
675# 533#
676CONFIG_RTC_DRV_RS5C348=y 534CONFIG_RTC_DRV_RS5C348=y
@@ -681,8 +539,10 @@ CONFIG_RTC_DRV_RS5C348=y
681# 539#
682# CONFIG_RTC_DRV_CMOS is not set 540# CONFIG_RTC_DRV_CMOS is not set
683# CONFIG_RTC_DRV_DS1553 is not set 541# CONFIG_RTC_DRV_DS1553 is not set
542# CONFIG_RTC_DRV_STK17TA8 is not set
684# CONFIG_RTC_DRV_DS1742 is not set 543# CONFIG_RTC_DRV_DS1742 is not set
685# CONFIG_RTC_DRV_M48T86 is not set 544# CONFIG_RTC_DRV_M48T86 is not set
545# CONFIG_RTC_DRV_M48T59 is not set
686# CONFIG_RTC_DRV_V3020 is not set 546# CONFIG_RTC_DRV_V3020 is not set
687 547
688# 548#
@@ -703,16 +563,19 @@ CONFIG_RTC_DRV_RS5C348=y
703# 563#
704 564
705# 565#
566# Userspace I/O
567#
568# CONFIG_UIO is not set
569
570#
706# File systems 571# File systems
707# 572#
708# CONFIG_EXT2_FS is not set 573# CONFIG_EXT2_FS is not set
709# CONFIG_EXT3_FS is not set 574# CONFIG_EXT3_FS is not set
710# CONFIG_EXT4DEV_FS is not set
711# CONFIG_REISERFS_FS is not set 575# CONFIG_REISERFS_FS is not set
712# CONFIG_JFS_FS is not set 576# CONFIG_JFS_FS is not set
713CONFIG_FS_POSIX_ACL=y 577CONFIG_FS_POSIX_ACL=y
714# CONFIG_XFS_FS is not set 578# CONFIG_XFS_FS is not set
715# CONFIG_GFS2_FS is not set
716# CONFIG_OCFS2_FS is not set 579# CONFIG_OCFS2_FS is not set
717# CONFIG_MINIX_FS is not set 580# CONFIG_MINIX_FS is not set
718# CONFIG_ROMFS_FS is not set 581# CONFIG_ROMFS_FS is not set
@@ -749,18 +612,11 @@ CONFIG_TMPFS=y
749CONFIG_TMPFS_POSIX_ACL=y 612CONFIG_TMPFS_POSIX_ACL=y
750# CONFIG_HUGETLB_PAGE is not set 613# CONFIG_HUGETLB_PAGE is not set
751CONFIG_RAMFS=y 614CONFIG_RAMFS=y
752# CONFIG_CONFIGFS_FS is not set
753 615
754# 616#
755# Miscellaneous filesystems 617# Miscellaneous filesystems
756# 618#
757# CONFIG_ADFS_FS is not set
758# CONFIG_AFFS_FS is not set
759# CONFIG_HFS_FS is not set
760# CONFIG_HFSPLUS_FS is not set 619# CONFIG_HFSPLUS_FS is not set
761# CONFIG_BEFS_FS is not set
762# CONFIG_BFS_FS is not set
763# CONFIG_EFS_FS is not set
764# CONFIG_CRAMFS is not set 620# CONFIG_CRAMFS is not set
765# CONFIG_VXFS_FS is not set 621# CONFIG_VXFS_FS is not set
766# CONFIG_HPFS_FS is not set 622# CONFIG_HPFS_FS is not set
@@ -774,7 +630,6 @@ CONFIG_RAMFS=y
774CONFIG_NFS_FS=y 630CONFIG_NFS_FS=y
775CONFIG_NFS_V3=y 631CONFIG_NFS_V3=y
776# CONFIG_NFS_V3_ACL is not set 632# CONFIG_NFS_V3_ACL is not set
777# CONFIG_NFS_V4 is not set
778# CONFIG_NFS_DIRECTIO is not set 633# CONFIG_NFS_DIRECTIO is not set
779# CONFIG_NFSD is not set 634# CONFIG_NFSD is not set
780CONFIG_ROOT_NFS=y 635CONFIG_ROOT_NFS=y
@@ -782,15 +637,10 @@ CONFIG_LOCKD=y
782CONFIG_LOCKD_V4=y 637CONFIG_LOCKD_V4=y
783CONFIG_NFS_COMMON=y 638CONFIG_NFS_COMMON=y
784CONFIG_SUNRPC=y 639CONFIG_SUNRPC=y
785# CONFIG_SUNRPC_BIND34 is not set
786# CONFIG_RPCSEC_GSS_KRB5 is not set
787# CONFIG_RPCSEC_GSS_SPKM3 is not set
788# CONFIG_SMB_FS is not set 640# CONFIG_SMB_FS is not set
789# CONFIG_CIFS is not set 641# CONFIG_CIFS is not set
790# CONFIG_NCP_FS is not set 642# CONFIG_NCP_FS is not set
791# CONFIG_CODA_FS is not set 643# CONFIG_CODA_FS is not set
792# CONFIG_AFS_FS is not set
793# CONFIG_9P_FS is not set
794 644
795# 645#
796# Partition Types 646# Partition Types
@@ -804,16 +654,6 @@ CONFIG_MSDOS_PARTITION=y
804# CONFIG_NLS is not set 654# CONFIG_NLS is not set
805 655
806# 656#
807# Distributed Lock Manager
808#
809# CONFIG_DLM is not set
810
811#
812# Profiling support
813#
814# CONFIG_PROFILING is not set
815
816#
817# Kernel hacking 657# Kernel hacking
818# 658#
819CONFIG_TRACE_IRQFLAGS_SUPPORT=y 659CONFIG_TRACE_IRQFLAGS_SUPPORT=y
@@ -833,10 +673,6 @@ CONFIG_SYS_SUPPORTS_KGDB=y
833# 673#
834# CONFIG_KEYS is not set 674# CONFIG_KEYS is not set
835# CONFIG_SECURITY is not set 675# CONFIG_SECURITY is not set
836
837#
838# Cryptographic options
839#
840# CONFIG_CRYPTO is not set 676# CONFIG_CRYPTO is not set
841 677
842# 678#
@@ -847,6 +683,7 @@ CONFIG_BITREVERSE=y
847# CONFIG_CRC16 is not set 683# CONFIG_CRC16 is not set
848# CONFIG_CRC_ITU_T is not set 684# CONFIG_CRC_ITU_T is not set
849CONFIG_CRC32=y 685CONFIG_CRC32=y
686# CONFIG_CRC7 is not set
850# CONFIG_LIBCRC32C is not set 687# CONFIG_LIBCRC32C is not set
851CONFIG_HAS_IOMEM=y 688CONFIG_HAS_IOMEM=y
852CONFIG_HAS_IOPORT=y 689CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig
index e72fdf36b3..93f9e8331a 100644
--- a/arch/mips/configs/sb1250-swarm_defconfig
+++ b/arch/mips/configs/sb1250-swarm_defconfig
@@ -655,8 +655,8 @@ CONFIG_MOXA_SMARTIO_NEW=m
655# CONFIG_SX is not set 655# CONFIG_SX is not set
656# CONFIG_RIO is not set 656# CONFIG_RIO is not set
657# CONFIG_STALDRV is not set 657# CONFIG_STALDRV is not set
658CONFIG_SIBYTE_SB1250_DUART=y 658CONFIG_SERIAL_SB1250_DUART=y
659CONFIG_SIBYTE_SB1250_DUART_CONSOLE=y 659CONFIG_SERIAL_SB1250_DUART_CONSOLE=y
660 660
661# 661#
662# Serial drivers 662# Serial drivers
diff --git a/arch/mips/configs/tb0219_defconfig b/arch/mips/configs/tb0219_defconfig
index e9f2cef4c7..326aa7aa40 100644
--- a/arch/mips/configs/tb0219_defconfig
+++ b/arch/mips/configs/tb0219_defconfig
@@ -1,60 +1,47 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21-rc6 3# Linux kernel version: 2.6.23-rc2
4# Sun Apr 15 01:06:01 2007 4# Wed Aug 8 16:11:47 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
16# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 17# CONFIG_MIPS_ATLAS is not set
30# CONFIG_MIPS_MALTA is not set 18# CONFIG_MIPS_MALTA is not set
31# CONFIG_MIPS_SEAD is not set 19# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 21# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 22CONFIG_MACH_VR41XX=y
36# CONFIG_PNX8550_JBS is not set 23# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 24# CONFIG_PNX8550_STB810 is not set
38CONFIG_MACH_VR41XX=y 25# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 26# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_QEMU is not set 27# CONFIG_QEMU is not set
41# CONFIG_MARKEINS is not set
42# CONFIG_SGI_IP22 is not set 28# CONFIG_SGI_IP22 is not set
43# CONFIG_SGI_IP27 is not set 29# CONFIG_SGI_IP27 is not set
44# CONFIG_SGI_IP32 is not set 30# CONFIG_SGI_IP32 is not set
45# CONFIG_SIBYTE_BIGSUR is not set 31# CONFIG_SIBYTE_CRHINE is not set
32# CONFIG_SIBYTE_CARMEL is not set
33# CONFIG_SIBYTE_CRHONE is not set
34# CONFIG_SIBYTE_RHONE is not set
46# CONFIG_SIBYTE_SWARM is not set 35# CONFIG_SIBYTE_SWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set
47# CONFIG_SIBYTE_SENTOSA is not set 37# CONFIG_SIBYTE_SENTOSA is not set
48# CONFIG_SIBYTE_RHONE is not set
49# CONFIG_SIBYTE_CARMEL is not set
50# CONFIG_SIBYTE_PTSWARM is not set 38# CONFIG_SIBYTE_PTSWARM is not set
51# CONFIG_SIBYTE_LITTLESUR is not set 39# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_CRHINE is not set
53# CONFIG_SIBYTE_CRHONE is not set
54# CONFIG_SNI_RM is not set 40# CONFIG_SNI_RM is not set
55# CONFIG_TOSHIBA_JMR3927 is not set 41# CONFIG_TOSHIBA_JMR3927 is not set
56# CONFIG_TOSHIBA_RBTX4927 is not set 42# CONFIG_TOSHIBA_RBTX4927 is not set
57# CONFIG_TOSHIBA_RBTX4938 is not set 43# CONFIG_TOSHIBA_RBTX4938 is not set
44# CONFIG_WR_PPMC is not set
58# CONFIG_CASIO_E55 is not set 45# CONFIG_CASIO_E55 is not set
59# CONFIG_IBM_WORKPAD is not set 46# CONFIG_IBM_WORKPAD is not set
60# CONFIG_NEC_CMBVR4133 is not set 47# CONFIG_NEC_CMBVR4133 is not set
@@ -76,6 +63,8 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
76CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 63CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
77CONFIG_DMA_NONCOHERENT=y 64CONFIG_DMA_NONCOHERENT=y
78CONFIG_DMA_NEED_PCI_MAP_STATE=y 65CONFIG_DMA_NEED_PCI_MAP_STATE=y
66# CONFIG_HOTPLUG_CPU is not set
67# CONFIG_NO_IOPORT is not set
79# CONFIG_CPU_BIG_ENDIAN is not set 68# CONFIG_CPU_BIG_ENDIAN is not set
80CONFIG_CPU_LITTLE_ENDIAN=y 69CONFIG_CPU_LITTLE_ENDIAN=y
81CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 70CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
@@ -85,6 +74,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
85# 74#
86# CPU selection 75# CPU selection
87# 76#
77# CONFIG_CPU_LOONGSON2 is not set
88# CONFIG_CPU_MIPS32_R1 is not set 78# CONFIG_CPU_MIPS32_R1 is not set
89# CONFIG_CPU_MIPS32_R2 is not set 79# CONFIG_CPU_MIPS32_R2 is not set
90# CONFIG_CPU_MIPS64_R1 is not set 80# CONFIG_CPU_MIPS64_R1 is not set
@@ -106,7 +96,6 @@ CONFIG_CPU_VR41XX=y
106# CONFIG_CPU_SB1 is not set 96# CONFIG_CPU_SB1 is not set
107CONFIG_SYS_HAS_CPU_VR41XX=y 97CONFIG_SYS_HAS_CPU_VR41XX=y
108CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 98CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
109CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
110CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 99CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
111CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 100CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
112 101
@@ -122,7 +111,6 @@ CONFIG_PAGE_SIZE_4KB=y
122CONFIG_MIPS_MT_DISABLED=y 111CONFIG_MIPS_MT_DISABLED=y
123# CONFIG_MIPS_MT_SMP is not set 112# CONFIG_MIPS_MT_SMP is not set
124# CONFIG_MIPS_MT_SMTC is not set 113# CONFIG_MIPS_MT_SMTC is not set
125# CONFIG_MIPS_VPE_LOADER is not set
126CONFIG_CPU_HAS_SYNC=y 114CONFIG_CPU_HAS_SYNC=y
127CONFIG_GENERIC_HARDIRQS=y 115CONFIG_GENERIC_HARDIRQS=y
128CONFIG_GENERIC_IRQ_PROBE=y 116CONFIG_GENERIC_IRQ_PROBE=y
@@ -136,46 +124,44 @@ CONFIG_FLAT_NODE_MEM_MAP=y
136# CONFIG_SPARSEMEM_STATIC is not set 124# CONFIG_SPARSEMEM_STATIC is not set
137CONFIG_SPLIT_PTLOCK_CPUS=4 125CONFIG_SPLIT_PTLOCK_CPUS=4
138# CONFIG_RESOURCES_64BIT is not set 126# CONFIG_RESOURCES_64BIT is not set
139CONFIG_ZONE_DMA_FLAG=1 127CONFIG_ZONE_DMA_FLAG=0
128CONFIG_VIRT_TO_BUS=y
140# CONFIG_HZ_48 is not set 129# CONFIG_HZ_48 is not set
141# CONFIG_HZ_100 is not set 130# CONFIG_HZ_100 is not set
142# CONFIG_HZ_128 is not set 131# CONFIG_HZ_128 is not set
143# CONFIG_HZ_250 is not set 132CONFIG_HZ_250=y
144# CONFIG_HZ_256 is not set 133# CONFIG_HZ_256 is not set
145CONFIG_HZ_1000=y 134# CONFIG_HZ_1000 is not set
146# CONFIG_HZ_1024 is not set 135# CONFIG_HZ_1024 is not set
147CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 136CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
148CONFIG_HZ=1000 137CONFIG_HZ=250
149CONFIG_PREEMPT_NONE=y 138CONFIG_PREEMPT_NONE=y
150# CONFIG_PREEMPT_VOLUNTARY is not set 139# CONFIG_PREEMPT_VOLUNTARY is not set
151# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
152# CONFIG_KEXEC is not set 141# CONFIG_KEXEC is not set
142CONFIG_SECCOMP=y
153CONFIG_LOCKDEP_SUPPORT=y 143CONFIG_LOCKDEP_SUPPORT=y
154CONFIG_STACKTRACE_SUPPORT=y 144CONFIG_STACKTRACE_SUPPORT=y
155CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 145CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
156 146
157# 147#
158# Code maturity level options 148# General setup
159# 149#
160CONFIG_EXPERIMENTAL=y 150CONFIG_EXPERIMENTAL=y
161CONFIG_BROKEN_ON_SMP=y 151CONFIG_BROKEN_ON_SMP=y
162CONFIG_INIT_ENV_ARG_LIMIT=32 152CONFIG_INIT_ENV_ARG_LIMIT=32
163
164#
165# General setup
166#
167CONFIG_LOCALVERSION="" 153CONFIG_LOCALVERSION=""
168CONFIG_LOCALVERSION_AUTO=y 154CONFIG_LOCALVERSION_AUTO=y
169CONFIG_SWAP=y 155CONFIG_SWAP=y
170CONFIG_SYSVIPC=y 156CONFIG_SYSVIPC=y
171# CONFIG_IPC_NS is not set
172CONFIG_SYSVIPC_SYSCTL=y 157CONFIG_SYSVIPC_SYSCTL=y
173# CONFIG_POSIX_MQUEUE is not set 158# CONFIG_POSIX_MQUEUE is not set
174# CONFIG_BSD_PROCESS_ACCT is not set 159# CONFIG_BSD_PROCESS_ACCT is not set
175# CONFIG_TASKSTATS is not set 160# CONFIG_TASKSTATS is not set
176# CONFIG_UTS_NS is not set 161# CONFIG_USER_NS is not set
177# CONFIG_AUDIT is not set 162# CONFIG_AUDIT is not set
178# CONFIG_IKCONFIG is not set 163# CONFIG_IKCONFIG is not set
164CONFIG_LOG_BUF_SHIFT=14
179CONFIG_SYSFS_DEPRECATED=y 165CONFIG_SYSFS_DEPRECATED=y
180# CONFIG_RELAY is not set 166# CONFIG_RELAY is not set
181# CONFIG_BLK_DEV_INITRD is not set 167# CONFIG_BLK_DEV_INITRD is not set
@@ -191,32 +177,30 @@ CONFIG_BUG=y
191CONFIG_ELF_CORE=y 177CONFIG_ELF_CORE=y
192CONFIG_BASE_FULL=y 178CONFIG_BASE_FULL=y
193CONFIG_FUTEX=y 179CONFIG_FUTEX=y
180CONFIG_ANON_INODES=y
194CONFIG_EPOLL=y 181CONFIG_EPOLL=y
182CONFIG_SIGNALFD=y
183CONFIG_TIMERFD=y
184CONFIG_EVENTFD=y
195CONFIG_SHMEM=y 185CONFIG_SHMEM=y
196CONFIG_SLAB=y
197CONFIG_VM_EVENT_COUNTERS=y 186CONFIG_VM_EVENT_COUNTERS=y
187CONFIG_SLAB=y
188# CONFIG_SLUB is not set
189# CONFIG_SLOB is not set
198CONFIG_RT_MUTEXES=y 190CONFIG_RT_MUTEXES=y
199# CONFIG_TINY_SHMEM is not set 191# CONFIG_TINY_SHMEM is not set
200CONFIG_BASE_SMALL=0 192CONFIG_BASE_SMALL=0
201# CONFIG_SLOB is not set
202
203#
204# Loadable module support
205#
206CONFIG_MODULES=y 193CONFIG_MODULES=y
207CONFIG_MODULE_UNLOAD=y 194CONFIG_MODULE_UNLOAD=y
208# CONFIG_MODULE_FORCE_UNLOAD is not set 195CONFIG_MODULE_FORCE_UNLOAD=y
209CONFIG_MODVERSIONS=y 196CONFIG_MODVERSIONS=y
210CONFIG_MODULE_SRCVERSION_ALL=y 197CONFIG_MODULE_SRCVERSION_ALL=y
211CONFIG_KMOD=y 198CONFIG_KMOD=y
212
213#
214# Block layer
215#
216CONFIG_BLOCK=y 199CONFIG_BLOCK=y
217# CONFIG_LBD is not set 200# CONFIG_LBD is not set
218# CONFIG_BLK_DEV_IO_TRACE is not set 201# CONFIG_BLK_DEV_IO_TRACE is not set
219# CONFIG_LSF is not set 202# CONFIG_LSF is not set
203# CONFIG_BLK_DEV_BSG is not set
220 204
221# 205#
222# IO Schedulers 206# IO Schedulers
@@ -236,16 +220,13 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
236# 220#
237CONFIG_HW_HAS_PCI=y 221CONFIG_HW_HAS_PCI=y
238CONFIG_PCI=y 222CONFIG_PCI=y
223# CONFIG_ARCH_SUPPORTS_MSI is not set
239CONFIG_MMU=y 224CONFIG_MMU=y
240 225
241# 226#
242# PCCARD (PCMCIA/CardBus) support 227# PCCARD (PCMCIA/CardBus) support
243# 228#
244# CONFIG_PCCARD is not set 229# CONFIG_PCCARD is not set
245
246#
247# PCI Hotplug Support
248#
249# CONFIG_HOTPLUG_PCI is not set 230# CONFIG_HOTPLUG_PCI is not set
250 231
251# 232#
@@ -258,10 +239,7 @@ CONFIG_TRAD_SIGNALS=y
258# 239#
259# Power management options 240# Power management options
260# 241#
261CONFIG_PM=y 242# CONFIG_PM is not set
262# CONFIG_PM_LEGACY is not set
263# CONFIG_PM_DEBUG is not set
264# CONFIG_PM_SYSFS_DEPRECATED is not set
265 243
266# 244#
267# Networking 245# Networking
@@ -271,14 +249,9 @@ CONFIG_NET=y
271# 249#
272# Networking options 250# Networking options
273# 251#
274# CONFIG_NETDEBUG is not set
275CONFIG_PACKET=y 252CONFIG_PACKET=y
276# CONFIG_PACKET_MMAP is not set 253# CONFIG_PACKET_MMAP is not set
277CONFIG_UNIX=y 254CONFIG_UNIX=y
278CONFIG_XFRM=y
279# CONFIG_XFRM_USER is not set
280# CONFIG_XFRM_SUB_POLICY is not set
281CONFIG_XFRM_MIGRATE=y
282# CONFIG_NET_KEY is not set 255# CONFIG_NET_KEY is not set
283CONFIG_INET=y 256CONFIG_INET=y
284CONFIG_IP_MULTICAST=y 257CONFIG_IP_MULTICAST=y
@@ -288,7 +261,6 @@ CONFIG_ASK_IP_FIB_HASH=y
288CONFIG_IP_FIB_HASH=y 261CONFIG_IP_FIB_HASH=y
289CONFIG_IP_MULTIPLE_TABLES=y 262CONFIG_IP_MULTIPLE_TABLES=y
290CONFIG_IP_ROUTE_MULTIPATH=y 263CONFIG_IP_ROUTE_MULTIPATH=y
291# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
292CONFIG_IP_ROUTE_VERBOSE=y 264CONFIG_IP_ROUTE_VERBOSE=y
293CONFIG_IP_PNP=y 265CONFIG_IP_PNP=y
294# CONFIG_IP_PNP_DHCP is not set 266# CONFIG_IP_PNP_DHCP is not set
@@ -305,34 +277,25 @@ CONFIG_SYN_COOKIES=y
305# CONFIG_INET_IPCOMP is not set 277# CONFIG_INET_IPCOMP is not set
306# CONFIG_INET_XFRM_TUNNEL is not set 278# CONFIG_INET_XFRM_TUNNEL is not set
307CONFIG_INET_TUNNEL=m 279CONFIG_INET_TUNNEL=m
308CONFIG_INET_XFRM_MODE_TRANSPORT=m 280# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
309CONFIG_INET_XFRM_MODE_TUNNEL=m 281# CONFIG_INET_XFRM_MODE_TUNNEL is not set
310CONFIG_INET_XFRM_MODE_BEET=m 282# CONFIG_INET_XFRM_MODE_BEET is not set
311CONFIG_INET_DIAG=y 283CONFIG_INET_DIAG=y
312CONFIG_INET_TCP_DIAG=y 284CONFIG_INET_TCP_DIAG=y
313# CONFIG_TCP_CONG_ADVANCED is not set 285# CONFIG_TCP_CONG_ADVANCED is not set
314CONFIG_TCP_CONG_CUBIC=y 286CONFIG_TCP_CONG_CUBIC=y
315CONFIG_DEFAULT_TCP_CONG="cubic" 287CONFIG_DEFAULT_TCP_CONG="cubic"
316CONFIG_TCP_MD5SIG=y 288# CONFIG_TCP_MD5SIG is not set
317# CONFIG_IPV6 is not set 289# CONFIG_IPV6 is not set
318# CONFIG_INET6_XFRM_TUNNEL is not set 290# CONFIG_INET6_XFRM_TUNNEL is not set
319# CONFIG_INET6_TUNNEL is not set 291# CONFIG_INET6_TUNNEL is not set
320CONFIG_NETWORK_SECMARK=y 292CONFIG_NETWORK_SECMARK=y
321# CONFIG_NETFILTER is not set 293# CONFIG_NETFILTER is not set
322
323#
324# DCCP Configuration (EXPERIMENTAL)
325#
326# CONFIG_IP_DCCP is not set 294# CONFIG_IP_DCCP is not set
327
328#
329# SCTP Configuration (EXPERIMENTAL)
330#
331# CONFIG_IP_SCTP is not set 295# CONFIG_IP_SCTP is not set
332 296# CONFIG_SCTP_HMAC_NONE is not set
333# 297# CONFIG_SCTP_HMAC_SHA1 is not set
334# TIPC Configuration (EXPERIMENTAL) 298# CONFIG_SCTP_HMAC_MD5 is not set
335#
336# CONFIG_TIPC is not set 299# CONFIG_TIPC is not set
337# CONFIG_ATM is not set 300# CONFIG_ATM is not set
338# CONFIG_BRIDGE is not set 301# CONFIG_BRIDGE is not set
@@ -358,10 +321,20 @@ CONFIG_NETWORK_SECMARK=y
358# CONFIG_HAMRADIO is not set 321# CONFIG_HAMRADIO is not set
359# CONFIG_IRDA is not set 322# CONFIG_IRDA is not set
360# CONFIG_BT is not set 323# CONFIG_BT is not set
361# CONFIG_IEEE80211 is not set 324# CONFIG_AF_RXRPC is not set
362CONFIG_FIB_RULES=y 325CONFIG_FIB_RULES=y
363 326
364# 327#
328# Wireless
329#
330# CONFIG_CFG80211 is not set
331# CONFIG_WIRELESS_EXT is not set
332# CONFIG_MAC80211 is not set
333# CONFIG_IEEE80211 is not set
334# CONFIG_RFKILL is not set
335# CONFIG_NET_9P is not set
336
337#
365# Device Drivers 338# Device Drivers
366# 339#
367 340
@@ -372,30 +345,10 @@ CONFIG_STANDALONE=y
372CONFIG_PREVENT_FIRMWARE_BUILD=y 345CONFIG_PREVENT_FIRMWARE_BUILD=y
373CONFIG_FW_LOADER=m 346CONFIG_FW_LOADER=m
374# CONFIG_SYS_HYPERVISOR is not set 347# CONFIG_SYS_HYPERVISOR is not set
375
376#
377# Connector - unified userspace <-> kernelspace linker
378#
379# CONFIG_CONNECTOR is not set 348# CONFIG_CONNECTOR is not set
380
381#
382# Memory Technology Devices (MTD)
383#
384# CONFIG_MTD is not set 349# CONFIG_MTD is not set
385
386#
387# Parallel port support
388#
389# CONFIG_PARPORT is not set 350# CONFIG_PARPORT is not set
390 351CONFIG_BLK_DEV=y
391#
392# Plug and Play support
393#
394# CONFIG_PNPACPI is not set
395
396#
397# Block devices
398#
399# CONFIG_BLK_CPQ_DA is not set 352# CONFIG_BLK_CPQ_DA is not set
400# CONFIG_BLK_CPQ_CISS_DA is not set 353# CONFIG_BLK_CPQ_CISS_DA is not set
401# CONFIG_BLK_DEV_DAC960 is not set 354# CONFIG_BLK_DEV_DAC960 is not set
@@ -412,16 +365,7 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
412CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 365CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
413# CONFIG_CDROM_PKTCDVD is not set 366# CONFIG_CDROM_PKTCDVD is not set
414# CONFIG_ATA_OVER_ETH is not set 367# CONFIG_ATA_OVER_ETH is not set
415 368# CONFIG_MISC_DEVICES is not set
416#
417# Misc devices
418#
419CONFIG_SGI_IOC4=m
420# CONFIG_TIFM_CORE is not set
421
422#
423# ATA/ATAPI/MFM/RLL support
424#
425# CONFIG_IDE is not set 369# CONFIG_IDE is not set
426 370
427# 371#
@@ -429,16 +373,9 @@ CONFIG_SGI_IOC4=m
429# 373#
430# CONFIG_RAID_ATTRS is not set 374# CONFIG_RAID_ATTRS is not set
431# CONFIG_SCSI is not set 375# CONFIG_SCSI is not set
376# CONFIG_SCSI_DMA is not set
432# CONFIG_SCSI_NETLINK is not set 377# CONFIG_SCSI_NETLINK is not set
433
434#
435# Serial ATA (prod) and Parallel ATA (experimental) drivers
436#
437# CONFIG_ATA is not set 378# CONFIG_ATA is not set
438
439#
440# Multi-device support (RAID and LVM)
441#
442# CONFIG_MD is not set 379# CONFIG_MD is not set
443 380
444# 381#
@@ -449,30 +386,17 @@ CONFIG_SGI_IOC4=m
449# 386#
450# IEEE 1394 (FireWire) support 387# IEEE 1394 (FireWire) support
451# 388#
389# CONFIG_FIREWIRE is not set
452# CONFIG_IEEE1394 is not set 390# CONFIG_IEEE1394 is not set
453
454#
455# I2O device support
456#
457# CONFIG_I2O is not set 391# CONFIG_I2O is not set
458
459#
460# Network device support
461#
462CONFIG_NETDEVICES=y 392CONFIG_NETDEVICES=y
463CONFIG_DUMMY=m 393# CONFIG_NETDEVICES_MULTIQUEUE is not set
394# CONFIG_DUMMY is not set
464# CONFIG_BONDING is not set 395# CONFIG_BONDING is not set
396# CONFIG_MACVLAN is not set
465# CONFIG_EQUALIZER is not set 397# CONFIG_EQUALIZER is not set
466# CONFIG_TUN is not set 398# CONFIG_TUN is not set
467
468#
469# ARCnet devices
470#
471# CONFIG_ARCNET is not set 399# CONFIG_ARCNET is not set
472
473#
474# PHY device support
475#
476CONFIG_PHYLIB=m 400CONFIG_PHYLIB=m
477 401
478# 402#
@@ -486,29 +410,46 @@ CONFIG_CICADA_PHY=m
486CONFIG_VITESSE_PHY=m 410CONFIG_VITESSE_PHY=m
487CONFIG_SMSC_PHY=m 411CONFIG_SMSC_PHY=m
488# CONFIG_BROADCOM_PHY is not set 412# CONFIG_BROADCOM_PHY is not set
413# CONFIG_ICPLUS_PHY is not set
489# CONFIG_FIXED_PHY is not set 414# CONFIG_FIXED_PHY is not set
490
491#
492# Ethernet (10 or 100Mbit)
493#
494CONFIG_NET_ETHERNET=y 415CONFIG_NET_ETHERNET=y
495CONFIG_MII=y 416CONFIG_MII=y
417# CONFIG_AX88796 is not set
496# CONFIG_HAPPYMEAL is not set 418# CONFIG_HAPPYMEAL is not set
497# CONFIG_SUNGEM is not set 419# CONFIG_SUNGEM is not set
498# CONFIG_CASSINI is not set 420# CONFIG_CASSINI is not set
499# CONFIG_NET_VENDOR_3COM is not set 421# CONFIG_NET_VENDOR_3COM is not set
500# CONFIG_DM9000 is not set 422# CONFIG_DM9000 is not set
501
502#
503# Tulip family network device support
504#
505# CONFIG_NET_TULIP is not set 423# CONFIG_NET_TULIP is not set
506# CONFIG_HP100 is not set 424# CONFIG_HP100 is not set
507# CONFIG_NET_PCI is not set 425CONFIG_NET_PCI=y
508 426# CONFIG_PCNET32 is not set
509# 427# CONFIG_AMD8111_ETH is not set
510# Ethernet (1000 Mbit) 428# CONFIG_ADAPTEC_STARFIRE is not set
511# 429# CONFIG_B44 is not set
430# CONFIG_FORCEDETH is not set
431# CONFIG_TC35815 is not set
432# CONFIG_DGRS is not set
433# CONFIG_EEPRO100 is not set
434# CONFIG_E100 is not set
435# CONFIG_FEALNX is not set
436# CONFIG_NATSEMI is not set
437# CONFIG_NE2K_PCI is not set
438# CONFIG_8139CP is not set
439CONFIG_8139TOO=y
440CONFIG_8139TOO_PIO=y
441# CONFIG_8139TOO_TUNE_TWISTER is not set
442# CONFIG_8139TOO_8129 is not set
443# CONFIG_8139_OLD_RX_RESET is not set
444# CONFIG_SIS900 is not set
445# CONFIG_EPIC100 is not set
446# CONFIG_SUNDANCE is not set
447# CONFIG_TLAN is not set
448CONFIG_VIA_RHINE=y
449CONFIG_VIA_RHINE_MMIO=y
450# CONFIG_VIA_RHINE_NAPI is not set
451# CONFIG_SC92031 is not set
452CONFIG_NETDEV_1000=y
512# CONFIG_ACENIC is not set 453# CONFIG_ACENIC is not set
513# CONFIG_DL2K is not set 454# CONFIG_DL2K is not set
514# CONFIG_E1000 is not set 455# CONFIG_E1000 is not set
@@ -520,35 +461,29 @@ CONFIG_R8169=y
520# CONFIG_SIS190 is not set 461# CONFIG_SIS190 is not set
521# CONFIG_SKGE is not set 462# CONFIG_SKGE is not set
522# CONFIG_SKY2 is not set 463# CONFIG_SKY2 is not set
523# CONFIG_SK98LIN is not set 464CONFIG_VIA_VELOCITY=y
524# CONFIG_TIGON3 is not set 465# CONFIG_TIGON3 is not set
525# CONFIG_BNX2 is not set 466# CONFIG_BNX2 is not set
526CONFIG_QLA3XXX=m 467# CONFIG_QLA3XXX is not set
527# CONFIG_ATL1 is not set 468# CONFIG_ATL1 is not set
528 469# CONFIG_NETDEV_10000 is not set
529#
530# Ethernet (10000 Mbit)
531#
532# CONFIG_CHELSIO_T1 is not set
533CONFIG_CHELSIO_T3=m
534# CONFIG_IXGB is not set
535# CONFIG_S2IO is not set
536# CONFIG_MYRI10GE is not set
537CONFIG_NETXEN_NIC=m
538
539#
540# Token Ring devices
541#
542# CONFIG_TR is not set 470# CONFIG_TR is not set
543 471
544# 472#
545# Wireless LAN (non-hamradio) 473# Wireless LAN
546# 474#
547# CONFIG_NET_RADIO is not set 475# CONFIG_WLAN_PRE80211 is not set
476# CONFIG_WLAN_80211 is not set
548 477
549# 478#
550# Wan interfaces 479# USB Network Adapters
551# 480#
481# CONFIG_USB_CATC is not set
482# CONFIG_USB_KAWETH is not set
483# CONFIG_USB_PEGASUS is not set
484# CONFIG_USB_RTL8150 is not set
485# CONFIG_USB_USBNET_MII is not set
486# CONFIG_USB_USBNET is not set
552# CONFIG_WAN is not set 487# CONFIG_WAN is not set
553# CONFIG_FDDI is not set 488# CONFIG_FDDI is not set
554# CONFIG_HIPPI is not set 489# CONFIG_HIPPI is not set
@@ -558,15 +493,7 @@ CONFIG_NETXEN_NIC=m
558# CONFIG_NETCONSOLE is not set 493# CONFIG_NETCONSOLE is not set
559# CONFIG_NETPOLL is not set 494# CONFIG_NETPOLL is not set
560# CONFIG_NET_POLL_CONTROLLER is not set 495# CONFIG_NET_POLL_CONTROLLER is not set
561
562#
563# ISDN subsystem
564#
565# CONFIG_ISDN is not set 496# CONFIG_ISDN is not set
566
567#
568# Telephony Support
569#
570# CONFIG_PHONE is not set 497# CONFIG_PHONE is not set
571 498
572# 499#
@@ -574,6 +501,7 @@ CONFIG_NETXEN_NIC=m
574# 501#
575CONFIG_INPUT=y 502CONFIG_INPUT=y
576# CONFIG_INPUT_FF_MEMLESS is not set 503# CONFIG_INPUT_FF_MEMLESS is not set
504# CONFIG_INPUT_POLLDEV is not set
577 505
578# 506#
579# Userland interfaces 507# Userland interfaces
@@ -590,6 +518,7 @@ CONFIG_INPUT=y
590# CONFIG_INPUT_KEYBOARD is not set 518# CONFIG_INPUT_KEYBOARD is not set
591# CONFIG_INPUT_MOUSE is not set 519# CONFIG_INPUT_MOUSE is not set
592# CONFIG_INPUT_JOYSTICK is not set 520# CONFIG_INPUT_JOYSTICK is not set
521# CONFIG_INPUT_TABLET is not set
593# CONFIG_INPUT_TOUCHSCREEN is not set 522# CONFIG_INPUT_TOUCHSCREEN is not set
594# CONFIG_INPUT_MISC is not set 523# CONFIG_INPUT_MISC is not set
595 524
@@ -624,35 +553,18 @@ CONFIG_SERIAL_VR41XX_CONSOLE=y
624CONFIG_UNIX98_PTYS=y 553CONFIG_UNIX98_PTYS=y
625CONFIG_LEGACY_PTYS=y 554CONFIG_LEGACY_PTYS=y
626CONFIG_LEGACY_PTY_COUNT=256 555CONFIG_LEGACY_PTY_COUNT=256
627
628#
629# IPMI
630#
631# CONFIG_IPMI_HANDLER is not set 556# CONFIG_IPMI_HANDLER is not set
632
633#
634# Watchdog Cards
635#
636# CONFIG_WATCHDOG is not set 557# CONFIG_WATCHDOG is not set
637# CONFIG_HW_RANDOM is not set 558# CONFIG_HW_RANDOM is not set
638# CONFIG_RTC is not set 559# CONFIG_RTC is not set
639# CONFIG_GEN_RTC is not set
640# CONFIG_DTLK is not set
641# CONFIG_R3964 is not set 560# CONFIG_R3964 is not set
642# CONFIG_APPLICOM is not set 561# CONFIG_APPLICOM is not set
643CONFIG_GPIO_TB0219=y 562CONFIG_GPIO_TB0219=y
644# CONFIG_DRM is not set 563# CONFIG_DRM is not set
645CONFIG_GPIO_VR41XX=y 564CONFIG_GPIO_VR41XX=y
646# CONFIG_RAW_DRIVER is not set 565# CONFIG_RAW_DRIVER is not set
647
648#
649# TPM devices
650#
651# CONFIG_TCG_TPM is not set 566# CONFIG_TCG_TPM is not set
652 567CONFIG_DEVPORT=y
653#
654# I2C support
655#
656# CONFIG_I2C is not set 568# CONFIG_I2C is not set
657 569
658# 570#
@@ -660,17 +572,9 @@ CONFIG_GPIO_VR41XX=y
660# 572#
661# CONFIG_SPI is not set 573# CONFIG_SPI is not set
662# CONFIG_SPI_MASTER is not set 574# CONFIG_SPI_MASTER is not set
663
664#
665# Dallas's 1-wire bus
666#
667# CONFIG_W1 is not set 575# CONFIG_W1 is not set
668 576# CONFIG_POWER_SUPPLY is not set
669#
670# Hardware Monitoring support
671#
672# CONFIG_HWMON is not set 577# CONFIG_HWMON is not set
673# CONFIG_HWMON_VID is not set
674 578
675# 579#
676# Multifunction device drivers 580# Multifunction device drivers
@@ -681,17 +585,20 @@ CONFIG_GPIO_VR41XX=y
681# Multimedia devices 585# Multimedia devices
682# 586#
683# CONFIG_VIDEO_DEV is not set 587# CONFIG_VIDEO_DEV is not set
588# CONFIG_DVB_CORE is not set
589# CONFIG_DAB is not set
684 590
685# 591#
686# Digital Video Broadcasting Devices 592# Graphics support
687# 593#
688# CONFIG_DVB is not set 594# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
689# CONFIG_USB_DABUSB is not set
690 595
691# 596#
692# Graphics support 597# Display device support
693# 598#
694# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 599# CONFIG_DISPLAY_SUPPORT is not set
600# CONFIG_VGASTATE is not set
601# CONFIG_VIDEO_OUTPUT_CONTROL is not set
695# CONFIG_FB is not set 602# CONFIG_FB is not set
696 603
697# 604#
@@ -704,16 +611,8 @@ CONFIG_DUMMY_CONSOLE=y
704# Sound 611# Sound
705# 612#
706# CONFIG_SOUND is not set 613# CONFIG_SOUND is not set
707 614# CONFIG_HID_SUPPORT is not set
708# 615CONFIG_USB_SUPPORT=y
709# HID Devices
710#
711CONFIG_HID=y
712# CONFIG_HID_DEBUG is not set
713
714#
715# USB support
716#
717CONFIG_USB_ARCH_HAS_HCD=y 616CONFIG_USB_ARCH_HAS_HCD=y
718CONFIG_USB_ARCH_HAS_OHCI=y 617CONFIG_USB_ARCH_HAS_OHCI=y
719CONFIG_USB_ARCH_HAS_EHCI=y 618CONFIG_USB_ARCH_HAS_EHCI=y
@@ -724,8 +623,8 @@ CONFIG_USB=m
724# Miscellaneous USB options 623# Miscellaneous USB options
725# 624#
726CONFIG_USB_DEVICEFS=y 625CONFIG_USB_DEVICEFS=y
626CONFIG_USB_DEVICE_CLASS=y
727# CONFIG_USB_DYNAMIC_MINORS is not set 627# CONFIG_USB_DYNAMIC_MINORS is not set
728# CONFIG_USB_SUSPEND is not set
729# CONFIG_USB_OTG is not set 628# CONFIG_USB_OTG is not set
730 629
731# 630#
@@ -735,7 +634,6 @@ CONFIG_USB_EHCI_HCD=m
735# CONFIG_USB_EHCI_SPLIT_ISO is not set 634# CONFIG_USB_EHCI_SPLIT_ISO is not set
736# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 635# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
737# CONFIG_USB_EHCI_TT_NEWSCHED is not set 636# CONFIG_USB_EHCI_TT_NEWSCHED is not set
738# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
739# CONFIG_USB_ISP116X_HCD is not set 637# CONFIG_USB_ISP116X_HCD is not set
740CONFIG_USB_OHCI_HCD=m 638CONFIG_USB_OHCI_HCD=m
741# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 639# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -743,6 +641,7 @@ CONFIG_USB_OHCI_HCD=m
743CONFIG_USB_OHCI_LITTLE_ENDIAN=y 641CONFIG_USB_OHCI_LITTLE_ENDIAN=y
744# CONFIG_USB_UHCI_HCD is not set 642# CONFIG_USB_UHCI_HCD is not set
745# CONFIG_USB_SL811_HCD is not set 643# CONFIG_USB_SL811_HCD is not set
644# CONFIG_USB_R8A66597_HCD is not set
746 645
747# 646#
748# USB Device Class drivers 647# USB Device Class drivers
@@ -760,43 +659,9 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
760# CONFIG_USB_LIBUSUAL is not set 659# CONFIG_USB_LIBUSUAL is not set
761 660
762# 661#
763# USB Input Devices
764#
765# CONFIG_USB_HID is not set
766
767#
768# USB HID Boot Protocol drivers
769#
770# CONFIG_USB_KBD is not set
771# CONFIG_USB_MOUSE is not set
772# CONFIG_USB_AIPTEK is not set
773# CONFIG_USB_WACOM is not set
774# CONFIG_USB_ACECAD is not set
775# CONFIG_USB_KBTAB is not set
776# CONFIG_USB_POWERMATE is not set
777# CONFIG_USB_TOUCHSCREEN is not set
778# CONFIG_USB_YEALINK is not set
779# CONFIG_USB_XPAD is not set
780# CONFIG_USB_ATI_REMOTE is not set
781# CONFIG_USB_ATI_REMOTE2 is not set
782# CONFIG_USB_KEYSPAN_REMOTE is not set
783# CONFIG_USB_APPLETOUCH is not set
784# CONFIG_USB_GTCO is not set
785
786#
787# USB Imaging devices 662# USB Imaging devices
788# 663#
789# CONFIG_USB_MDC800 is not set 664# CONFIG_USB_MDC800 is not set
790
791#
792# USB Network Adapters
793#
794# CONFIG_USB_CATC is not set
795# CONFIG_USB_KAWETH is not set
796# CONFIG_USB_PEGASUS is not set
797# CONFIG_USB_RTL8150 is not set
798# CONFIG_USB_USBNET_MII is not set
799# CONFIG_USB_USBNET is not set
800CONFIG_USB_MON=y 665CONFIG_USB_MON=y
801 666
802# 667#
@@ -840,37 +705,9 @@ CONFIG_USB_MON=y
840# USB Gadget Support 705# USB Gadget Support
841# 706#
842# CONFIG_USB_GADGET is not set 707# CONFIG_USB_GADGET is not set
843
844#
845# MMC/SD Card support
846#
847# CONFIG_MMC is not set 708# CONFIG_MMC is not set
848
849#
850# LED devices
851#
852# CONFIG_NEW_LEDS is not set 709# CONFIG_NEW_LEDS is not set
853
854#
855# LED drivers
856#
857
858#
859# LED Triggers
860#
861
862#
863# InfiniBand support
864#
865# CONFIG_INFINIBAND is not set 710# CONFIG_INFINIBAND is not set
866
867#
868# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
869#
870
871#
872# Real Time Clock
873#
874CONFIG_RTC_LIB=y 711CONFIG_RTC_LIB=y
875CONFIG_RTC_CLASS=y 712CONFIG_RTC_CLASS=y
876CONFIG_RTC_HCTOSYS=y 713CONFIG_RTC_HCTOSYS=y
@@ -884,18 +721,29 @@ CONFIG_RTC_INTF_SYSFS=y
884CONFIG_RTC_INTF_PROC=y 721CONFIG_RTC_INTF_PROC=y
885CONFIG_RTC_INTF_DEV=y 722CONFIG_RTC_INTF_DEV=y
886# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 723# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
724# CONFIG_RTC_DRV_TEST is not set
725
726#
727# SPI RTC drivers
728#
887 729
888# 730#
889# RTC drivers 731# Platform RTC drivers
890# 732#
733# CONFIG_RTC_DRV_CMOS is not set
891# CONFIG_RTC_DRV_DS1553 is not set 734# CONFIG_RTC_DRV_DS1553 is not set
735# CONFIG_RTC_DRV_STK17TA8 is not set
892# CONFIG_RTC_DRV_DS1742 is not set 736# CONFIG_RTC_DRV_DS1742 is not set
893# CONFIG_RTC_DRV_M48T86 is not set 737# CONFIG_RTC_DRV_M48T86 is not set
894CONFIG_RTC_DRV_VR41XX=y 738# CONFIG_RTC_DRV_M48T59 is not set
895# CONFIG_RTC_DRV_TEST is not set
896# CONFIG_RTC_DRV_V3020 is not set 739# CONFIG_RTC_DRV_V3020 is not set
897 740
898# 741#
742# on-CPU RTC drivers
743#
744CONFIG_RTC_DRV_VR41XX=y
745
746#
899# DMA Engine support 747# DMA Engine support
900# 748#
901# CONFIG_DMA_ENGINE is not set 749# CONFIG_DMA_ENGINE is not set
@@ -909,12 +757,9 @@ CONFIG_RTC_DRV_VR41XX=y
909# 757#
910 758
911# 759#
912# Auxiliary Display support 760# Userspace I/O
913#
914
915#
916# Virtualization
917# 761#
762# CONFIG_UIO is not set
918 763
919# 764#
920# File systems 765# File systems
@@ -922,8 +767,14 @@ CONFIG_RTC_DRV_VR41XX=y
922CONFIG_EXT2_FS=y 767CONFIG_EXT2_FS=y
923# CONFIG_EXT2_FS_XATTR is not set 768# CONFIG_EXT2_FS_XATTR is not set
924# CONFIG_EXT2_FS_XIP is not set 769# CONFIG_EXT2_FS_XIP is not set
925# CONFIG_EXT3_FS is not set 770CONFIG_EXT3_FS=y
771CONFIG_EXT3_FS_XATTR=y
772# CONFIG_EXT3_FS_POSIX_ACL is not set
773# CONFIG_EXT3_FS_SECURITY is not set
926# CONFIG_EXT4DEV_FS is not set 774# CONFIG_EXT4DEV_FS is not set
775CONFIG_JBD=y
776# CONFIG_JBD_DEBUG is not set
777CONFIG_FS_MBCACHE=y
927# CONFIG_REISERFS_FS is not set 778# CONFIG_REISERFS_FS is not set
928# CONFIG_JFS_FS is not set 779# CONFIG_JFS_FS is not set
929CONFIG_FS_POSIX_ACL=y 780CONFIG_FS_POSIX_ACL=y
@@ -938,7 +789,7 @@ CONFIG_INOTIFY_USER=y
938CONFIG_DNOTIFY=y 789CONFIG_DNOTIFY=y
939# CONFIG_AUTOFS_FS is not set 790# CONFIG_AUTOFS_FS is not set
940CONFIG_AUTOFS4_FS=y 791CONFIG_AUTOFS4_FS=y
941CONFIG_FUSE_FS=m 792# CONFIG_FUSE_FS is not set
942CONFIG_GENERIC_ACL=y 793CONFIG_GENERIC_ACL=y
943 794
944# 795#
@@ -965,7 +816,7 @@ CONFIG_TMPFS=y
965CONFIG_TMPFS_POSIX_ACL=y 816CONFIG_TMPFS_POSIX_ACL=y
966# CONFIG_HUGETLB_PAGE is not set 817# CONFIG_HUGETLB_PAGE is not set
967CONFIG_RAMFS=y 818CONFIG_RAMFS=y
968CONFIG_CONFIGFS_FS=m 819# CONFIG_CONFIGFS_FS is not set
969 820
970# 821#
971# Miscellaneous filesystems 822# Miscellaneous filesystems
@@ -1003,6 +854,7 @@ CONFIG_LOCKD_V4=y
1003CONFIG_EXPORTFS=y 854CONFIG_EXPORTFS=y
1004CONFIG_NFS_COMMON=y 855CONFIG_NFS_COMMON=y
1005CONFIG_SUNRPC=y 856CONFIG_SUNRPC=y
857# CONFIG_SUNRPC_BIND34 is not set
1006# CONFIG_RPCSEC_GSS_KRB5 is not set 858# CONFIG_RPCSEC_GSS_KRB5 is not set
1007# CONFIG_RPCSEC_GSS_SPKM3 is not set 859# CONFIG_RPCSEC_GSS_SPKM3 is not set
1008# CONFIG_SMB_FS is not set 860# CONFIG_SMB_FS is not set
@@ -1010,7 +862,6 @@ CONFIG_SUNRPC=y
1010# CONFIG_NCP_FS is not set 862# CONFIG_NCP_FS is not set
1011# CONFIG_CODA_FS is not set 863# CONFIG_CODA_FS is not set
1012# CONFIG_AFS_FS is not set 864# CONFIG_AFS_FS is not set
1013# CONFIG_9P_FS is not set
1014 865
1015# 866#
1016# Partition Types 867# Partition Types
@@ -1026,10 +877,7 @@ CONFIG_MSDOS_PARTITION=y
1026# 877#
1027# Distributed Lock Manager 878# Distributed Lock Manager
1028# 879#
1029CONFIG_DLM=m 880# CONFIG_DLM is not set
1030CONFIG_DLM_TCP=y
1031# CONFIG_DLM_SCTP is not set
1032# CONFIG_DLM_DEBUG is not set
1033 881
1034# 882#
1035# Profiling support 883# Profiling support
@@ -1047,7 +895,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1047# CONFIG_DEBUG_FS is not set 895# CONFIG_DEBUG_FS is not set
1048# CONFIG_HEADERS_CHECK is not set 896# CONFIG_HEADERS_CHECK is not set
1049# CONFIG_DEBUG_KERNEL is not set 897# CONFIG_DEBUG_KERNEL is not set
1050CONFIG_LOG_BUF_SHIFT=14
1051CONFIG_CROSSCOMPILE=y 898CONFIG_CROSSCOMPILE=y
1052CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs" 899CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
1053 900
@@ -1056,63 +903,20 @@ CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
1056# 903#
1057# CONFIG_KEYS is not set 904# CONFIG_KEYS is not set
1058# CONFIG_SECURITY is not set 905# CONFIG_SECURITY is not set
1059 906# CONFIG_CRYPTO is not set
1060#
1061# Cryptographic options
1062#
1063CONFIG_CRYPTO=y
1064CONFIG_CRYPTO_ALGAPI=y
1065CONFIG_CRYPTO_BLKCIPHER=m
1066CONFIG_CRYPTO_HASH=m
1067CONFIG_CRYPTO_MANAGER=m
1068CONFIG_CRYPTO_HMAC=m
1069CONFIG_CRYPTO_XCBC=m
1070CONFIG_CRYPTO_NULL=m
1071CONFIG_CRYPTO_MD4=m
1072CONFIG_CRYPTO_MD5=y
1073CONFIG_CRYPTO_SHA1=m
1074CONFIG_CRYPTO_SHA256=m
1075CONFIG_CRYPTO_SHA512=m
1076CONFIG_CRYPTO_WP512=m
1077CONFIG_CRYPTO_TGR192=m
1078CONFIG_CRYPTO_GF128MUL=m
1079CONFIG_CRYPTO_ECB=m
1080CONFIG_CRYPTO_CBC=m
1081CONFIG_CRYPTO_PCBC=m
1082CONFIG_CRYPTO_LRW=m
1083CONFIG_CRYPTO_DES=m
1084CONFIG_CRYPTO_FCRYPT=m
1085CONFIG_CRYPTO_BLOWFISH=m
1086CONFIG_CRYPTO_TWOFISH=m
1087CONFIG_CRYPTO_TWOFISH_COMMON=m
1088CONFIG_CRYPTO_SERPENT=m
1089CONFIG_CRYPTO_AES=m
1090CONFIG_CRYPTO_CAST5=m
1091CONFIG_CRYPTO_CAST6=m
1092CONFIG_CRYPTO_TEA=m
1093CONFIG_CRYPTO_ARC4=m
1094CONFIG_CRYPTO_KHAZAD=m
1095CONFIG_CRYPTO_ANUBIS=m
1096CONFIG_CRYPTO_DEFLATE=m
1097CONFIG_CRYPTO_MICHAEL_MIC=m
1098CONFIG_CRYPTO_CRC32C=m
1099CONFIG_CRYPTO_CAMELLIA=m
1100# CONFIG_CRYPTO_TEST is not set
1101
1102#
1103# Hardware crypto devices
1104#
1105 907
1106# 908#
1107# Library routines 909# Library routines
1108# 910#
1109CONFIG_BITREVERSE=y 911CONFIG_BITREVERSE=y
1110# CONFIG_CRC_CCITT is not set 912CONFIG_CRC_CCITT=y
1111# CONFIG_CRC16 is not set 913# CONFIG_CRC16 is not set
914# CONFIG_CRC_ITU_T is not set
1112CONFIG_CRC32=y 915CONFIG_CRC32=y
1113CONFIG_LIBCRC32C=m 916# CONFIG_CRC7 is not set
917# CONFIG_LIBCRC32C is not set
1114CONFIG_ZLIB_INFLATE=m 918CONFIG_ZLIB_INFLATE=m
1115CONFIG_ZLIB_DEFLATE=m
1116CONFIG_PLIST=y 919CONFIG_PLIST=y
1117CONFIG_HAS_IOMEM=y 920CONFIG_HAS_IOMEM=y
1118CONFIG_HAS_IOPORT=y 921CONFIG_HAS_IOPORT=y
922CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig
index aea6756884..9fd0faeacf 100644
--- a/arch/mips/configs/tb0226_defconfig
+++ b/arch/mips/configs/tb0226_defconfig
@@ -1,68 +1,56 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20 3# Linux kernel version: 2.6.23-rc2
4# Tue Feb 20 21:47:41 2007 4# Thu Aug 9 11:16:55 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
16# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 17# CONFIG_MIPS_ATLAS is not set
30# CONFIG_MIPS_MALTA is not set 18# CONFIG_MIPS_MALTA is not set
31# CONFIG_MIPS_SEAD is not set 19# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 21# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 22CONFIG_MACH_VR41XX=y
36# CONFIG_PNX8550_JBS is not set 23# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 24# CONFIG_PNX8550_STB810 is not set
38CONFIG_MACH_VR41XX=y 25# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 26# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_QEMU is not set 27# CONFIG_QEMU is not set
41# CONFIG_MARKEINS is not set
42# CONFIG_SGI_IP22 is not set 28# CONFIG_SGI_IP22 is not set
43# CONFIG_SGI_IP27 is not set 29# CONFIG_SGI_IP27 is not set
44# CONFIG_SGI_IP32 is not set 30# CONFIG_SGI_IP32 is not set
45# CONFIG_SIBYTE_BIGSUR is not set 31# CONFIG_SIBYTE_CRHINE is not set
32# CONFIG_SIBYTE_CARMEL is not set
33# CONFIG_SIBYTE_CRHONE is not set
34# CONFIG_SIBYTE_RHONE is not set
46# CONFIG_SIBYTE_SWARM is not set 35# CONFIG_SIBYTE_SWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set
47# CONFIG_SIBYTE_SENTOSA is not set 37# CONFIG_SIBYTE_SENTOSA is not set
48# CONFIG_SIBYTE_RHONE is not set
49# CONFIG_SIBYTE_CARMEL is not set
50# CONFIG_SIBYTE_PTSWARM is not set 38# CONFIG_SIBYTE_PTSWARM is not set
51# CONFIG_SIBYTE_LITTLESUR is not set 39# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_CRHINE is not set
53# CONFIG_SIBYTE_CRHONE is not set
54# CONFIG_SNI_RM is not set 40# CONFIG_SNI_RM is not set
55# CONFIG_TOSHIBA_JMR3927 is not set 41# CONFIG_TOSHIBA_JMR3927 is not set
56# CONFIG_TOSHIBA_RBTX4927 is not set 42# CONFIG_TOSHIBA_RBTX4927 is not set
57# CONFIG_TOSHIBA_RBTX4938 is not set 43# CONFIG_TOSHIBA_RBTX4938 is not set
44# CONFIG_WR_PPMC is not set
58# CONFIG_CASIO_E55 is not set 45# CONFIG_CASIO_E55 is not set
59# CONFIG_IBM_WORKPAD is not set 46# CONFIG_IBM_WORKPAD is not set
60# CONFIG_NEC_CMBVR4133 is not set 47# CONFIG_NEC_CMBVR4133 is not set
61CONFIG_TANBAC_TB022X=y 48CONFIG_TANBAC_TB022X=y
62CONFIG_TANBAC_TB0226=y
63# CONFIG_TANBAC_TB0287 is not set
64# CONFIG_VICTOR_MPC30X is not set 49# CONFIG_VICTOR_MPC30X is not set
65# CONFIG_ZAO_CAPCELLA is not set 50# CONFIG_ZAO_CAPCELLA is not set
51# CONFIG_TANBAC_TB0219 is not set
52CONFIG_TANBAC_TB0226=y
53# CONFIG_TANBAC_TB0287 is not set
66CONFIG_PCI_VR41XX=y 54CONFIG_PCI_VR41XX=y
67CONFIG_RWSEM_GENERIC_SPINLOCK=y 55CONFIG_RWSEM_GENERIC_SPINLOCK=y
68# CONFIG_ARCH_HAS_ILOG2_U32 is not set 56# CONFIG_ARCH_HAS_ILOG2_U32 is not set
@@ -75,6 +63,8 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
75CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 63CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
76CONFIG_DMA_NONCOHERENT=y 64CONFIG_DMA_NONCOHERENT=y
77CONFIG_DMA_NEED_PCI_MAP_STATE=y 65CONFIG_DMA_NEED_PCI_MAP_STATE=y
66# CONFIG_HOTPLUG_CPU is not set
67# CONFIG_NO_IOPORT is not set
78# CONFIG_CPU_BIG_ENDIAN is not set 68# CONFIG_CPU_BIG_ENDIAN is not set
79CONFIG_CPU_LITTLE_ENDIAN=y 69CONFIG_CPU_LITTLE_ENDIAN=y
80CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 70CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
@@ -84,6 +74,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
84# 74#
85# CPU selection 75# CPU selection
86# 76#
77# CONFIG_CPU_LOONGSON2 is not set
87# CONFIG_CPU_MIPS32_R1 is not set 78# CONFIG_CPU_MIPS32_R1 is not set
88# CONFIG_CPU_MIPS32_R2 is not set 79# CONFIG_CPU_MIPS32_R2 is not set
89# CONFIG_CPU_MIPS64_R1 is not set 80# CONFIG_CPU_MIPS64_R1 is not set
@@ -105,7 +96,6 @@ CONFIG_CPU_VR41XX=y
105# CONFIG_CPU_SB1 is not set 96# CONFIG_CPU_SB1 is not set
106CONFIG_SYS_HAS_CPU_VR41XX=y 97CONFIG_SYS_HAS_CPU_VR41XX=y
107CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 98CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
108CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
109CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 99CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
110CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 100CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
111 101
@@ -121,7 +111,6 @@ CONFIG_PAGE_SIZE_4KB=y
121CONFIG_MIPS_MT_DISABLED=y 111CONFIG_MIPS_MT_DISABLED=y
122# CONFIG_MIPS_MT_SMP is not set 112# CONFIG_MIPS_MT_SMP is not set
123# CONFIG_MIPS_MT_SMTC is not set 113# CONFIG_MIPS_MT_SMTC is not set
124# CONFIG_MIPS_VPE_LOADER is not set
125CONFIG_CPU_HAS_SYNC=y 114CONFIG_CPU_HAS_SYNC=y
126CONFIG_GENERIC_HARDIRQS=y 115CONFIG_GENERIC_HARDIRQS=y
127CONFIG_GENERIC_IRQ_PROBE=y 116CONFIG_GENERIC_IRQ_PROBE=y
@@ -135,48 +124,47 @@ CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set 124# CONFIG_SPARSEMEM_STATIC is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4 125CONFIG_SPLIT_PTLOCK_CPUS=4
137# CONFIG_RESOURCES_64BIT is not set 126# CONFIG_RESOURCES_64BIT is not set
138CONFIG_ZONE_DMA_FLAG=1 127CONFIG_ZONE_DMA_FLAG=0
128CONFIG_VIRT_TO_BUS=y
139# CONFIG_HZ_48 is not set 129# CONFIG_HZ_48 is not set
140# CONFIG_HZ_100 is not set 130# CONFIG_HZ_100 is not set
141# CONFIG_HZ_128 is not set 131# CONFIG_HZ_128 is not set
142# CONFIG_HZ_250 is not set 132CONFIG_HZ_250=y
143# CONFIG_HZ_256 is not set 133# CONFIG_HZ_256 is not set
144CONFIG_HZ_1000=y 134# CONFIG_HZ_1000 is not set
145# CONFIG_HZ_1024 is not set 135# CONFIG_HZ_1024 is not set
146CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 136CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
147CONFIG_HZ=1000 137CONFIG_HZ=250
148CONFIG_PREEMPT_NONE=y 138CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set 139# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
151# CONFIG_KEXEC is not set 141# CONFIG_KEXEC is not set
142CONFIG_SECCOMP=y
152CONFIG_LOCKDEP_SUPPORT=y 143CONFIG_LOCKDEP_SUPPORT=y
153CONFIG_STACKTRACE_SUPPORT=y 144CONFIG_STACKTRACE_SUPPORT=y
154CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 145CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
155 146
156# 147#
157# Code maturity level options 148# General setup
158# 149#
159CONFIG_EXPERIMENTAL=y 150CONFIG_EXPERIMENTAL=y
160CONFIG_BROKEN_ON_SMP=y 151CONFIG_BROKEN_ON_SMP=y
161CONFIG_INIT_ENV_ARG_LIMIT=32 152CONFIG_INIT_ENV_ARG_LIMIT=32
162
163#
164# General setup
165#
166CONFIG_LOCALVERSION="" 153CONFIG_LOCALVERSION=""
167CONFIG_LOCALVERSION_AUTO=y 154CONFIG_LOCALVERSION_AUTO=y
168CONFIG_SWAP=y 155CONFIG_SWAP=y
169CONFIG_SYSVIPC=y 156CONFIG_SYSVIPC=y
170# CONFIG_IPC_NS is not set
171CONFIG_SYSVIPC_SYSCTL=y 157CONFIG_SYSVIPC_SYSCTL=y
172# CONFIG_POSIX_MQUEUE is not set 158# CONFIG_POSIX_MQUEUE is not set
173# CONFIG_BSD_PROCESS_ACCT is not set 159# CONFIG_BSD_PROCESS_ACCT is not set
174# CONFIG_TASKSTATS is not set 160# CONFIG_TASKSTATS is not set
175# CONFIG_UTS_NS is not set 161# CONFIG_USER_NS is not set
176# CONFIG_AUDIT is not set 162# CONFIG_AUDIT is not set
177# CONFIG_IKCONFIG is not set 163# CONFIG_IKCONFIG is not set
164CONFIG_LOG_BUF_SHIFT=14
178CONFIG_SYSFS_DEPRECATED=y 165CONFIG_SYSFS_DEPRECATED=y
179# CONFIG_RELAY is not set 166# CONFIG_RELAY is not set
167# CONFIG_BLK_DEV_INITRD is not set
180# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 168# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
181CONFIG_SYSCTL=y 169CONFIG_SYSCTL=y
182CONFIG_EMBEDDED=y 170CONFIG_EMBEDDED=y
@@ -189,32 +177,30 @@ CONFIG_BUG=y
189CONFIG_ELF_CORE=y 177CONFIG_ELF_CORE=y
190CONFIG_BASE_FULL=y 178CONFIG_BASE_FULL=y
191CONFIG_FUTEX=y 179CONFIG_FUTEX=y
180CONFIG_ANON_INODES=y
192CONFIG_EPOLL=y 181CONFIG_EPOLL=y
182CONFIG_SIGNALFD=y
183CONFIG_TIMERFD=y
184CONFIG_EVENTFD=y
193CONFIG_SHMEM=y 185CONFIG_SHMEM=y
194CONFIG_SLAB=y
195CONFIG_VM_EVENT_COUNTERS=y 186CONFIG_VM_EVENT_COUNTERS=y
187CONFIG_SLAB=y
188# CONFIG_SLUB is not set
189# CONFIG_SLOB is not set
196CONFIG_RT_MUTEXES=y 190CONFIG_RT_MUTEXES=y
197# CONFIG_TINY_SHMEM is not set 191# CONFIG_TINY_SHMEM is not set
198CONFIG_BASE_SMALL=0 192CONFIG_BASE_SMALL=0
199# CONFIG_SLOB is not set
200
201#
202# Loadable module support
203#
204CONFIG_MODULES=y 193CONFIG_MODULES=y
205CONFIG_MODULE_UNLOAD=y 194CONFIG_MODULE_UNLOAD=y
206# CONFIG_MODULE_FORCE_UNLOAD is not set 195CONFIG_MODULE_FORCE_UNLOAD=y
207CONFIG_MODVERSIONS=y 196CONFIG_MODVERSIONS=y
208CONFIG_MODULE_SRCVERSION_ALL=y 197CONFIG_MODULE_SRCVERSION_ALL=y
209CONFIG_KMOD=y 198CONFIG_KMOD=y
210
211#
212# Block layer
213#
214CONFIG_BLOCK=y 199CONFIG_BLOCK=y
215# CONFIG_LBD is not set 200# CONFIG_LBD is not set
216# CONFIG_BLK_DEV_IO_TRACE is not set 201# CONFIG_BLK_DEV_IO_TRACE is not set
217# CONFIG_LSF is not set 202# CONFIG_LSF is not set
203# CONFIG_BLK_DEV_BSG is not set
218 204
219# 205#
220# IO Schedulers 206# IO Schedulers
@@ -234,16 +220,13 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
234# 220#
235CONFIG_HW_HAS_PCI=y 221CONFIG_HW_HAS_PCI=y
236CONFIG_PCI=y 222CONFIG_PCI=y
223# CONFIG_ARCH_SUPPORTS_MSI is not set
237CONFIG_MMU=y 224CONFIG_MMU=y
238 225
239# 226#
240# PCCARD (PCMCIA/CardBus) support 227# PCCARD (PCMCIA/CardBus) support
241# 228#
242# CONFIG_PCCARD is not set 229# CONFIG_PCCARD is not set
243
244#
245# PCI Hotplug Support
246#
247# CONFIG_HOTPLUG_PCI is not set 230# CONFIG_HOTPLUG_PCI is not set
248 231
249# 232#
@@ -256,10 +239,7 @@ CONFIG_TRAD_SIGNALS=y
256# 239#
257# Power management options 240# Power management options
258# 241#
259CONFIG_PM=y 242# CONFIG_PM is not set
260# CONFIG_PM_LEGACY is not set
261# CONFIG_PM_DEBUG is not set
262# CONFIG_PM_SYSFS_DEPRECATED is not set
263 243
264# 244#
265# Networking 245# Networking
@@ -269,14 +249,9 @@ CONFIG_NET=y
269# 249#
270# Networking options 250# Networking options
271# 251#
272# CONFIG_NETDEBUG is not set
273CONFIG_PACKET=y 252CONFIG_PACKET=y
274# CONFIG_PACKET_MMAP is not set 253# CONFIG_PACKET_MMAP is not set
275CONFIG_UNIX=y 254CONFIG_UNIX=y
276CONFIG_XFRM=y
277# CONFIG_XFRM_USER is not set
278# CONFIG_XFRM_SUB_POLICY is not set
279CONFIG_XFRM_MIGRATE=y
280# CONFIG_NET_KEY is not set 255# CONFIG_NET_KEY is not set
281CONFIG_INET=y 256CONFIG_INET=y
282CONFIG_IP_MULTICAST=y 257CONFIG_IP_MULTICAST=y
@@ -286,7 +261,6 @@ CONFIG_ASK_IP_FIB_HASH=y
286CONFIG_IP_FIB_HASH=y 261CONFIG_IP_FIB_HASH=y
287CONFIG_IP_MULTIPLE_TABLES=y 262CONFIG_IP_MULTIPLE_TABLES=y
288CONFIG_IP_ROUTE_MULTIPATH=y 263CONFIG_IP_ROUTE_MULTIPATH=y
289# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
290CONFIG_IP_ROUTE_VERBOSE=y 264CONFIG_IP_ROUTE_VERBOSE=y
291CONFIG_IP_PNP=y 265CONFIG_IP_PNP=y
292# CONFIG_IP_PNP_DHCP is not set 266# CONFIG_IP_PNP_DHCP is not set
@@ -302,34 +276,25 @@ CONFIG_SYN_COOKIES=y
302# CONFIG_INET_IPCOMP is not set 276# CONFIG_INET_IPCOMP is not set
303# CONFIG_INET_XFRM_TUNNEL is not set 277# CONFIG_INET_XFRM_TUNNEL is not set
304# CONFIG_INET_TUNNEL is not set 278# CONFIG_INET_TUNNEL is not set
305CONFIG_INET_XFRM_MODE_TRANSPORT=m 279# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
306CONFIG_INET_XFRM_MODE_TUNNEL=m 280# CONFIG_INET_XFRM_MODE_TUNNEL is not set
307CONFIG_INET_XFRM_MODE_BEET=m 281# CONFIG_INET_XFRM_MODE_BEET is not set
308CONFIG_INET_DIAG=y 282CONFIG_INET_DIAG=y
309CONFIG_INET_TCP_DIAG=y 283CONFIG_INET_TCP_DIAG=y
310# CONFIG_TCP_CONG_ADVANCED is not set 284# CONFIG_TCP_CONG_ADVANCED is not set
311CONFIG_TCP_CONG_CUBIC=y 285CONFIG_TCP_CONG_CUBIC=y
312CONFIG_DEFAULT_TCP_CONG="cubic" 286CONFIG_DEFAULT_TCP_CONG="cubic"
313CONFIG_TCP_MD5SIG=y 287# CONFIG_TCP_MD5SIG is not set
314# CONFIG_IPV6 is not set 288# CONFIG_IPV6 is not set
315# CONFIG_INET6_XFRM_TUNNEL is not set 289# CONFIG_INET6_XFRM_TUNNEL is not set
316# CONFIG_INET6_TUNNEL is not set 290# CONFIG_INET6_TUNNEL is not set
317CONFIG_NETWORK_SECMARK=y 291CONFIG_NETWORK_SECMARK=y
318# CONFIG_NETFILTER is not set 292# CONFIG_NETFILTER is not set
319
320#
321# DCCP Configuration (EXPERIMENTAL)
322#
323# CONFIG_IP_DCCP is not set 293# CONFIG_IP_DCCP is not set
324
325#
326# SCTP Configuration (EXPERIMENTAL)
327#
328# CONFIG_IP_SCTP is not set 294# CONFIG_IP_SCTP is not set
329 295# CONFIG_SCTP_HMAC_NONE is not set
330# 296# CONFIG_SCTP_HMAC_SHA1 is not set
331# TIPC Configuration (EXPERIMENTAL) 297# CONFIG_SCTP_HMAC_MD5 is not set
332#
333# CONFIG_TIPC is not set 298# CONFIG_TIPC is not set
334# CONFIG_ATM is not set 299# CONFIG_ATM is not set
335# CONFIG_BRIDGE is not set 300# CONFIG_BRIDGE is not set
@@ -355,10 +320,20 @@ CONFIG_NETWORK_SECMARK=y
355# CONFIG_HAMRADIO is not set 320# CONFIG_HAMRADIO is not set
356# CONFIG_IRDA is not set 321# CONFIG_IRDA is not set
357# CONFIG_BT is not set 322# CONFIG_BT is not set
358# CONFIG_IEEE80211 is not set 323# CONFIG_AF_RXRPC is not set
359CONFIG_FIB_RULES=y 324CONFIG_FIB_RULES=y
360 325
361# 326#
327# Wireless
328#
329# CONFIG_CFG80211 is not set
330# CONFIG_WIRELESS_EXT is not set
331# CONFIG_MAC80211 is not set
332# CONFIG_IEEE80211 is not set
333# CONFIG_RFKILL is not set
334# CONFIG_NET_9P is not set
335
336#
362# Device Drivers 337# Device Drivers
363# 338#
364 339
@@ -369,30 +344,10 @@ CONFIG_STANDALONE=y
369CONFIG_PREVENT_FIRMWARE_BUILD=y 344CONFIG_PREVENT_FIRMWARE_BUILD=y
370CONFIG_FW_LOADER=y 345CONFIG_FW_LOADER=y
371# CONFIG_SYS_HYPERVISOR is not set 346# CONFIG_SYS_HYPERVISOR is not set
372 347# CONFIG_CONNECTOR is not set
373#
374# Connector - unified userspace <-> kernelspace linker
375#
376CONFIG_CONNECTOR=m
377
378#
379# Memory Technology Devices (MTD)
380#
381# CONFIG_MTD is not set 348# CONFIG_MTD is not set
382
383#
384# Parallel port support
385#
386# CONFIG_PARPORT is not set 349# CONFIG_PARPORT is not set
387 350CONFIG_BLK_DEV=y
388#
389# Plug and Play support
390#
391# CONFIG_PNPACPI is not set
392
393#
394# Block devices
395#
396# CONFIG_BLK_CPQ_DA is not set 351# CONFIG_BLK_CPQ_DA is not set
397# CONFIG_BLK_CPQ_CISS_DA is not set 352# CONFIG_BLK_CPQ_CISS_DA is not set
398# CONFIG_BLK_DEV_DAC960 is not set 353# CONFIG_BLK_DEV_DAC960 is not set
@@ -407,19 +362,9 @@ CONFIG_BLK_DEV_RAM=y
407CONFIG_BLK_DEV_RAM_COUNT=16 362CONFIG_BLK_DEV_RAM_COUNT=16
408CONFIG_BLK_DEV_RAM_SIZE=4096 363CONFIG_BLK_DEV_RAM_SIZE=4096
409CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 364CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
410# CONFIG_BLK_DEV_INITRD is not set
411# CONFIG_CDROM_PKTCDVD is not set 365# CONFIG_CDROM_PKTCDVD is not set
412# CONFIG_ATA_OVER_ETH is not set 366# CONFIG_ATA_OVER_ETH is not set
413 367# CONFIG_MISC_DEVICES is not set
414#
415# Misc devices
416#
417CONFIG_SGI_IOC4=m
418# CONFIG_TIFM_CORE is not set
419
420#
421# ATA/ATAPI/MFM/RLL support
422#
423# CONFIG_IDE is not set 368# CONFIG_IDE is not set
424 369
425# 370#
@@ -427,6 +372,7 @@ CONFIG_SGI_IOC4=m
427# 372#
428# CONFIG_RAID_ATTRS is not set 373# CONFIG_RAID_ATTRS is not set
429CONFIG_SCSI=y 374CONFIG_SCSI=y
375CONFIG_SCSI_DMA=y
430CONFIG_SCSI_TGT=m 376CONFIG_SCSI_TGT=m
431# CONFIG_SCSI_NETLINK is not set 377# CONFIG_SCSI_NETLINK is not set
432CONFIG_SCSI_PROC_FS=y 378CONFIG_SCSI_PROC_FS=y
@@ -448,6 +394,7 @@ CONFIG_SCSI_MULTI_LUN=y
448# CONFIG_SCSI_CONSTANTS is not set 394# CONFIG_SCSI_CONSTANTS is not set
449# CONFIG_SCSI_LOGGING is not set 395# CONFIG_SCSI_LOGGING is not set
450CONFIG_SCSI_SCAN_ASYNC=y 396CONFIG_SCSI_SCAN_ASYNC=y
397CONFIG_SCSI_WAIT_SCAN=m
451 398
452# 399#
453# SCSI Transports 400# SCSI Transports
@@ -458,51 +405,8 @@ CONFIG_SCSI_SCAN_ASYNC=y
458CONFIG_SCSI_SAS_ATTRS=m 405CONFIG_SCSI_SAS_ATTRS=m
459CONFIG_SCSI_SAS_LIBSAS=m 406CONFIG_SCSI_SAS_LIBSAS=m
460# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set 407# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
461 408# CONFIG_SCSI_LOWLEVEL is not set
462#
463# SCSI low-level drivers
464#
465# CONFIG_ISCSI_TCP is not set
466# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
467# CONFIG_SCSI_3W_9XXX is not set
468# CONFIG_SCSI_ACARD is not set
469# CONFIG_SCSI_AACRAID is not set
470# CONFIG_SCSI_AIC7XXX is not set
471# CONFIG_SCSI_AIC7XXX_OLD is not set
472# CONFIG_SCSI_AIC79XX is not set
473CONFIG_SCSI_AIC94XX=m
474# CONFIG_AIC94XX_DEBUG is not set
475# CONFIG_SCSI_DPT_I2O is not set
476# CONFIG_SCSI_ARCMSR is not set
477# CONFIG_MEGARAID_NEWGEN is not set
478# CONFIG_MEGARAID_LEGACY is not set
479# CONFIG_MEGARAID_SAS is not set
480# CONFIG_SCSI_HPTIOP is not set
481# CONFIG_SCSI_DMX3191D is not set
482# CONFIG_SCSI_FUTURE_DOMAIN is not set
483# CONFIG_SCSI_IPS is not set
484# CONFIG_SCSI_INITIO is not set
485# CONFIG_SCSI_INIA100 is not set
486# CONFIG_SCSI_STEX is not set
487# CONFIG_SCSI_SYM53C8XX_2 is not set
488# CONFIG_SCSI_QLOGIC_1280 is not set
489# CONFIG_SCSI_QLA_FC is not set
490# CONFIG_SCSI_QLA_ISCSI is not set
491# CONFIG_SCSI_LPFC is not set
492# CONFIG_SCSI_DC395x is not set
493# CONFIG_SCSI_DC390T is not set
494# CONFIG_SCSI_NSP32 is not set
495# CONFIG_SCSI_DEBUG is not set
496# CONFIG_SCSI_SRP is not set
497
498#
499# Serial ATA (prod) and Parallel ATA (experimental) drivers
500#
501# CONFIG_ATA is not set 409# CONFIG_ATA is not set
502
503#
504# Multi-device support (RAID and LVM)
505#
506# CONFIG_MD is not set 410# CONFIG_MD is not set
507 411
508# 412#
@@ -516,59 +420,26 @@ CONFIG_SCSI_AIC94XX=m
516# 420#
517# IEEE 1394 (FireWire) support 421# IEEE 1394 (FireWire) support
518# 422#
423# CONFIG_FIREWIRE is not set
519# CONFIG_IEEE1394 is not set 424# CONFIG_IEEE1394 is not set
520
521#
522# I2O device support
523#
524# CONFIG_I2O is not set 425# CONFIG_I2O is not set
525
526#
527# Network device support
528#
529CONFIG_NETDEVICES=y 426CONFIG_NETDEVICES=y
427# CONFIG_NETDEVICES_MULTIQUEUE is not set
530# CONFIG_DUMMY is not set 428# CONFIG_DUMMY is not set
531# CONFIG_BONDING is not set 429# CONFIG_BONDING is not set
430# CONFIG_MACVLAN is not set
532# CONFIG_EQUALIZER is not set 431# CONFIG_EQUALIZER is not set
533# CONFIG_TUN is not set 432# CONFIG_TUN is not set
534
535#
536# ARCnet devices
537#
538# CONFIG_ARCNET is not set 433# CONFIG_ARCNET is not set
539 434# CONFIG_PHYLIB is not set
540#
541# PHY device support
542#
543CONFIG_PHYLIB=m
544
545#
546# MII PHY device drivers
547#
548CONFIG_MARVELL_PHY=m
549CONFIG_DAVICOM_PHY=m
550CONFIG_QSEMI_PHY=m
551CONFIG_LXT_PHY=m
552CONFIG_CICADA_PHY=m
553CONFIG_VITESSE_PHY=m
554CONFIG_SMSC_PHY=m
555# CONFIG_BROADCOM_PHY is not set
556# CONFIG_FIXED_PHY is not set
557
558#
559# Ethernet (10 or 100Mbit)
560#
561CONFIG_NET_ETHERNET=y 435CONFIG_NET_ETHERNET=y
562CONFIG_MII=y 436CONFIG_MII=y
437# CONFIG_AX88796 is not set
563# CONFIG_HAPPYMEAL is not set 438# CONFIG_HAPPYMEAL is not set
564# CONFIG_SUNGEM is not set 439# CONFIG_SUNGEM is not set
565# CONFIG_CASSINI is not set 440# CONFIG_CASSINI is not set
566# CONFIG_NET_VENDOR_3COM is not set 441# CONFIG_NET_VENDOR_3COM is not set
567# CONFIG_DM9000 is not set 442# CONFIG_DM9000 is not set
568
569#
570# Tulip family network device support
571#
572# CONFIG_NET_TULIP is not set 443# CONFIG_NET_TULIP is not set
573# CONFIG_HP100 is not set 444# CONFIG_HP100 is not set
574CONFIG_NET_PCI=y 445CONFIG_NET_PCI=y
@@ -577,6 +448,7 @@ CONFIG_NET_PCI=y
577# CONFIG_ADAPTEC_STARFIRE is not set 448# CONFIG_ADAPTEC_STARFIRE is not set
578# CONFIG_B44 is not set 449# CONFIG_B44 is not set
579# CONFIG_FORCEDETH is not set 450# CONFIG_FORCEDETH is not set
451# CONFIG_TC35815 is not set
580# CONFIG_DGRS is not set 452# CONFIG_DGRS is not set
581# CONFIG_EEPRO100 is not set 453# CONFIG_EEPRO100 is not set
582CONFIG_E100=y 454CONFIG_E100=y
@@ -591,50 +463,25 @@ CONFIG_E100=y
591# CONFIG_TLAN is not set 463# CONFIG_TLAN is not set
592# CONFIG_VIA_RHINE is not set 464# CONFIG_VIA_RHINE is not set
593# CONFIG_SC92031 is not set 465# CONFIG_SC92031 is not set
594 466# CONFIG_NETDEV_1000 is not set
595# 467# CONFIG_NETDEV_10000 is not set
596# Ethernet (1000 Mbit)
597#
598# CONFIG_ACENIC is not set
599# CONFIG_DL2K is not set
600# CONFIG_E1000 is not set
601# CONFIG_NS83820 is not set
602# CONFIG_HAMACHI is not set
603# CONFIG_YELLOWFIN is not set
604# CONFIG_R8169 is not set
605# CONFIG_SIS190 is not set
606# CONFIG_SKGE is not set
607# CONFIG_SKY2 is not set
608# CONFIG_SK98LIN is not set
609# CONFIG_VIA_VELOCITY is not set
610# CONFIG_TIGON3 is not set
611# CONFIG_BNX2 is not set
612CONFIG_QLA3XXX=m
613# CONFIG_ATL1 is not set
614
615#
616# Ethernet (10000 Mbit)
617#
618# CONFIG_CHELSIO_T1 is not set
619CONFIG_CHELSIO_T3=m
620# CONFIG_IXGB is not set
621# CONFIG_S2IO is not set
622# CONFIG_MYRI10GE is not set
623CONFIG_NETXEN_NIC=m
624
625#
626# Token Ring devices
627#
628# CONFIG_TR is not set 468# CONFIG_TR is not set
629 469
630# 470#
631# Wireless LAN (non-hamradio) 471# Wireless LAN
632# 472#
633# CONFIG_NET_RADIO is not set 473# CONFIG_WLAN_PRE80211 is not set
474# CONFIG_WLAN_80211 is not set
634 475
635# 476#
636# Wan interfaces 477# USB Network Adapters
637# 478#
479CONFIG_USB_CATC=m
480CONFIG_USB_KAWETH=m
481CONFIG_USB_PEGASUS=m
482CONFIG_USB_RTL8150=m
483# CONFIG_USB_USBNET_MII is not set
484# CONFIG_USB_USBNET is not set
638# CONFIG_WAN is not set 485# CONFIG_WAN is not set
639# CONFIG_FDDI is not set 486# CONFIG_FDDI is not set
640# CONFIG_HIPPI is not set 487# CONFIG_HIPPI is not set
@@ -645,15 +492,7 @@ CONFIG_NETXEN_NIC=m
645# CONFIG_NETCONSOLE is not set 492# CONFIG_NETCONSOLE is not set
646# CONFIG_NETPOLL is not set 493# CONFIG_NETPOLL is not set
647# CONFIG_NET_POLL_CONTROLLER is not set 494# CONFIG_NET_POLL_CONTROLLER is not set
648
649#
650# ISDN subsystem
651#
652# CONFIG_ISDN is not set 495# CONFIG_ISDN is not set
653
654#
655# Telephony Support
656#
657# CONFIG_PHONE is not set 496# CONFIG_PHONE is not set
658 497
659# 498#
@@ -661,6 +500,7 @@ CONFIG_NETXEN_NIC=m
661# 500#
662CONFIG_INPUT=y 501CONFIG_INPUT=y
663# CONFIG_INPUT_FF_MEMLESS is not set 502# CONFIG_INPUT_FF_MEMLESS is not set
503# CONFIG_INPUT_POLLDEV is not set
664 504
665# 505#
666# Userland interfaces 506# Userland interfaces
@@ -677,6 +517,7 @@ CONFIG_INPUT=y
677# CONFIG_INPUT_KEYBOARD is not set 517# CONFIG_INPUT_KEYBOARD is not set
678# CONFIG_INPUT_MOUSE is not set 518# CONFIG_INPUT_MOUSE is not set
679# CONFIG_INPUT_JOYSTICK is not set 519# CONFIG_INPUT_JOYSTICK is not set
520# CONFIG_INPUT_TABLET is not set
680# CONFIG_INPUT_TOUCHSCREEN is not set 521# CONFIG_INPUT_TOUCHSCREEN is not set
681# CONFIG_INPUT_MISC is not set 522# CONFIG_INPUT_MISC is not set
682 523
@@ -711,35 +552,18 @@ CONFIG_SERIAL_VR41XX_CONSOLE=y
711CONFIG_UNIX98_PTYS=y 552CONFIG_UNIX98_PTYS=y
712CONFIG_LEGACY_PTYS=y 553CONFIG_LEGACY_PTYS=y
713CONFIG_LEGACY_PTY_COUNT=256 554CONFIG_LEGACY_PTY_COUNT=256
714
715#
716# IPMI
717#
718# CONFIG_IPMI_HANDLER is not set 555# CONFIG_IPMI_HANDLER is not set
719
720#
721# Watchdog Cards
722#
723# CONFIG_WATCHDOG is not set 556# CONFIG_WATCHDOG is not set
724# CONFIG_HW_RANDOM is not set 557# CONFIG_HW_RANDOM is not set
725# CONFIG_RTC is not set 558# CONFIG_RTC is not set
726# CONFIG_GEN_RTC is not set
727# CONFIG_DTLK is not set
728# CONFIG_R3964 is not set 559# CONFIG_R3964 is not set
729# CONFIG_APPLICOM is not set 560# CONFIG_APPLICOM is not set
730# CONFIG_TANBAC_TB0219 is not set 561# CONFIG_GPIO_TB0219 is not set
731# CONFIG_DRM is not set 562# CONFIG_DRM is not set
732CONFIG_GPIO_VR41XX=y 563CONFIG_GPIO_VR41XX=y
733# CONFIG_RAW_DRIVER is not set 564# CONFIG_RAW_DRIVER is not set
734
735#
736# TPM devices
737#
738# CONFIG_TCG_TPM is not set 565# CONFIG_TCG_TPM is not set
739 566CONFIG_DEVPORT=y
740#
741# I2C support
742#
743# CONFIG_I2C is not set 567# CONFIG_I2C is not set
744 568
745# 569#
@@ -747,33 +571,33 @@ CONFIG_GPIO_VR41XX=y
747# 571#
748# CONFIG_SPI is not set 572# CONFIG_SPI is not set
749# CONFIG_SPI_MASTER is not set 573# CONFIG_SPI_MASTER is not set
750
751#
752# Dallas's 1-wire bus
753#
754# CONFIG_W1 is not set 574# CONFIG_W1 is not set
575# CONFIG_POWER_SUPPLY is not set
576# CONFIG_HWMON is not set
755 577
756# 578#
757# Hardware Monitoring support 579# Multifunction device drivers
758# 580#
759# CONFIG_HWMON is not set 581# CONFIG_MFD_SM501 is not set
760# CONFIG_HWMON_VID is not set
761 582
762# 583#
763# Multimedia devices 584# Multimedia devices
764# 585#
765# CONFIG_VIDEO_DEV is not set 586# CONFIG_VIDEO_DEV is not set
587# CONFIG_DVB_CORE is not set
588# CONFIG_DAB is not set
766 589
767# 590#
768# Digital Video Broadcasting Devices 591# Graphics support
769# 592#
770# CONFIG_DVB is not set 593# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
771# CONFIG_USB_DABUSB is not set
772 594
773# 595#
774# Graphics support 596# Display device support
775# 597#
776# CONFIG_FIRMWARE_EDID is not set 598# CONFIG_DISPLAY_SUPPORT is not set
599# CONFIG_VGASTATE is not set
600# CONFIG_VIDEO_OUTPUT_CONTROL is not set
777# CONFIG_FB is not set 601# CONFIG_FB is not set
778 602
779# 603#
@@ -781,22 +605,13 @@ CONFIG_GPIO_VR41XX=y
781# 605#
782# CONFIG_VGA_CONSOLE is not set 606# CONFIG_VGA_CONSOLE is not set
783CONFIG_DUMMY_CONSOLE=y 607CONFIG_DUMMY_CONSOLE=y
784# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
785 608
786# 609#
787# Sound 610# Sound
788# 611#
789# CONFIG_SOUND is not set 612# CONFIG_SOUND is not set
790 613# CONFIG_HID_SUPPORT is not set
791# 614CONFIG_USB_SUPPORT=y
792# HID Devices
793#
794CONFIG_HID=y
795# CONFIG_HID_DEBUG is not set
796
797#
798# USB support
799#
800CONFIG_USB_ARCH_HAS_HCD=y 615CONFIG_USB_ARCH_HAS_HCD=y
801CONFIG_USB_ARCH_HAS_OHCI=y 616CONFIG_USB_ARCH_HAS_OHCI=y
802CONFIG_USB_ARCH_HAS_EHCI=y 617CONFIG_USB_ARCH_HAS_EHCI=y
@@ -807,8 +622,8 @@ CONFIG_USB=y
807# Miscellaneous USB options 622# Miscellaneous USB options
808# 623#
809CONFIG_USB_DEVICEFS=y 624CONFIG_USB_DEVICEFS=y
625CONFIG_USB_DEVICE_CLASS=y
810# CONFIG_USB_DYNAMIC_MINORS is not set 626# CONFIG_USB_DYNAMIC_MINORS is not set
811# CONFIG_USB_SUSPEND is not set
812# CONFIG_USB_OTG is not set 627# CONFIG_USB_OTG is not set
813 628
814# 629#
@@ -818,7 +633,6 @@ CONFIG_USB_EHCI_HCD=y
818# CONFIG_USB_EHCI_SPLIT_ISO is not set 633# CONFIG_USB_EHCI_SPLIT_ISO is not set
819# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 634# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
820# CONFIG_USB_EHCI_TT_NEWSCHED is not set 635# CONFIG_USB_EHCI_TT_NEWSCHED is not set
821# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
822# CONFIG_USB_ISP116X_HCD is not set 636# CONFIG_USB_ISP116X_HCD is not set
823CONFIG_USB_OHCI_HCD=y 637CONFIG_USB_OHCI_HCD=y
824# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 638# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -826,11 +640,12 @@ CONFIG_USB_OHCI_HCD=y
826CONFIG_USB_OHCI_LITTLE_ENDIAN=y 640CONFIG_USB_OHCI_LITTLE_ENDIAN=y
827# CONFIG_USB_UHCI_HCD is not set 641# CONFIG_USB_UHCI_HCD is not set
828# CONFIG_USB_SL811_HCD is not set 642# CONFIG_USB_SL811_HCD is not set
643# CONFIG_USB_R8A66597_HCD is not set
829 644
830# 645#
831# USB Device Class drivers 646# USB Device Class drivers
832# 647#
833# CONFIG_USB_ACM is not set 648CONFIG_USB_ACM=y
834# CONFIG_USB_PRINTER is not set 649# CONFIG_USB_PRINTER is not set
835 650
836# 651#
@@ -854,44 +669,10 @@ CONFIG_USB_STORAGE=y
854# CONFIG_USB_LIBUSUAL is not set 669# CONFIG_USB_LIBUSUAL is not set
855 670
856# 671#
857# USB Input Devices
858#
859# CONFIG_USB_HID is not set
860
861#
862# USB HID Boot Protocol drivers
863#
864# CONFIG_USB_KBD is not set
865# CONFIG_USB_MOUSE is not set
866# CONFIG_USB_AIPTEK is not set
867# CONFIG_USB_WACOM is not set
868# CONFIG_USB_ACECAD is not set
869# CONFIG_USB_KBTAB is not set
870# CONFIG_USB_POWERMATE is not set
871# CONFIG_USB_TOUCHSCREEN is not set
872# CONFIG_USB_YEALINK is not set
873# CONFIG_USB_XPAD is not set
874# CONFIG_USB_ATI_REMOTE is not set
875# CONFIG_USB_ATI_REMOTE2 is not set
876# CONFIG_USB_KEYSPAN_REMOTE is not set
877# CONFIG_USB_APPLETOUCH is not set
878# CONFIG_USB_GTCO is not set
879
880#
881# USB Imaging devices 672# USB Imaging devices
882# 673#
883# CONFIG_USB_MDC800 is not set 674# CONFIG_USB_MDC800 is not set
884# CONFIG_USB_MICROTEK is not set 675# CONFIG_USB_MICROTEK is not set
885
886#
887# USB Network Adapters
888#
889# CONFIG_USB_CATC is not set
890# CONFIG_USB_KAWETH is not set
891# CONFIG_USB_PEGASUS is not set
892# CONFIG_USB_RTL8150 is not set
893# CONFIG_USB_USBNET_MII is not set
894# CONFIG_USB_USBNET is not set
895# CONFIG_USB_MON is not set 676# CONFIG_USB_MON is not set
896 677
897# 678#
@@ -924,6 +705,7 @@ CONFIG_USB_STORAGE=y
924# CONFIG_USB_SISUSBVGA is not set 705# CONFIG_USB_SISUSBVGA is not set
925# CONFIG_USB_LD is not set 706# CONFIG_USB_LD is not set
926# CONFIG_USB_TRANCEVIBRATOR is not set 707# CONFIG_USB_TRANCEVIBRATOR is not set
708# CONFIG_USB_IOWARRIOR is not set
927# CONFIG_USB_TEST is not set 709# CONFIG_USB_TEST is not set
928 710
929# 711#
@@ -934,37 +716,9 @@ CONFIG_USB_STORAGE=y
934# USB Gadget Support 716# USB Gadget Support
935# 717#
936# CONFIG_USB_GADGET is not set 718# CONFIG_USB_GADGET is not set
937
938#
939# MMC/SD Card support
940#
941# CONFIG_MMC is not set 719# CONFIG_MMC is not set
942
943#
944# LED devices
945#
946# CONFIG_NEW_LEDS is not set 720# CONFIG_NEW_LEDS is not set
947
948#
949# LED drivers
950#
951
952#
953# LED Triggers
954#
955
956#
957# InfiniBand support
958#
959# CONFIG_INFINIBAND is not set 721# CONFIG_INFINIBAND is not set
960
961#
962# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
963#
964
965#
966# Real Time Clock
967#
968CONFIG_RTC_LIB=y 722CONFIG_RTC_LIB=y
969CONFIG_RTC_CLASS=y 723CONFIG_RTC_CLASS=y
970CONFIG_RTC_HCTOSYS=y 724CONFIG_RTC_HCTOSYS=y
@@ -978,18 +732,29 @@ CONFIG_RTC_INTF_SYSFS=y
978CONFIG_RTC_INTF_PROC=y 732CONFIG_RTC_INTF_PROC=y
979CONFIG_RTC_INTF_DEV=y 733CONFIG_RTC_INTF_DEV=y
980# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 734# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
735# CONFIG_RTC_DRV_TEST is not set
736
737#
738# SPI RTC drivers
739#
981 740
982# 741#
983# RTC drivers 742# Platform RTC drivers
984# 743#
744# CONFIG_RTC_DRV_CMOS is not set
985# CONFIG_RTC_DRV_DS1553 is not set 745# CONFIG_RTC_DRV_DS1553 is not set
746# CONFIG_RTC_DRV_STK17TA8 is not set
986# CONFIG_RTC_DRV_DS1742 is not set 747# CONFIG_RTC_DRV_DS1742 is not set
987# CONFIG_RTC_DRV_M48T86 is not set 748# CONFIG_RTC_DRV_M48T86 is not set
988CONFIG_RTC_DRV_VR41XX=y 749# CONFIG_RTC_DRV_M48T59 is not set
989# CONFIG_RTC_DRV_TEST is not set
990# CONFIG_RTC_DRV_V3020 is not set 750# CONFIG_RTC_DRV_V3020 is not set
991 751
992# 752#
753# on-CPU RTC drivers
754#
755CONFIG_RTC_DRV_VR41XX=y
756
757#
993# DMA Engine support 758# DMA Engine support
994# 759#
995# CONFIG_DMA_ENGINE is not set 760# CONFIG_DMA_ENGINE is not set
@@ -1003,12 +768,9 @@ CONFIG_RTC_DRV_VR41XX=y
1003# 768#
1004 769
1005# 770#
1006# Auxiliary Display support 771# Userspace I/O
1007#
1008
1009#
1010# Virtualization
1011# 772#
773# CONFIG_UIO is not set
1012 774
1013# 775#
1014# File systems 776# File systems
@@ -1032,7 +794,7 @@ CONFIG_INOTIFY_USER=y
1032CONFIG_DNOTIFY=y 794CONFIG_DNOTIFY=y
1033# CONFIG_AUTOFS_FS is not set 795# CONFIG_AUTOFS_FS is not set
1034CONFIG_AUTOFS4_FS=y 796CONFIG_AUTOFS4_FS=y
1035CONFIG_FUSE_FS=m 797# CONFIG_FUSE_FS is not set
1036CONFIG_GENERIC_ACL=y 798CONFIG_GENERIC_ACL=y
1037 799
1038# 800#
@@ -1059,7 +821,7 @@ CONFIG_TMPFS=y
1059CONFIG_TMPFS_POSIX_ACL=y 821CONFIG_TMPFS_POSIX_ACL=y
1060# CONFIG_HUGETLB_PAGE is not set 822# CONFIG_HUGETLB_PAGE is not set
1061CONFIG_RAMFS=y 823CONFIG_RAMFS=y
1062CONFIG_CONFIGFS_FS=m 824# CONFIG_CONFIGFS_FS is not set
1063 825
1064# 826#
1065# Miscellaneous filesystems 827# Miscellaneous filesystems
@@ -1097,6 +859,7 @@ CONFIG_LOCKD_V4=y
1097CONFIG_EXPORTFS=m 859CONFIG_EXPORTFS=m
1098CONFIG_NFS_COMMON=y 860CONFIG_NFS_COMMON=y
1099CONFIG_SUNRPC=y 861CONFIG_SUNRPC=y
862# CONFIG_SUNRPC_BIND34 is not set
1100# CONFIG_RPCSEC_GSS_KRB5 is not set 863# CONFIG_RPCSEC_GSS_KRB5 is not set
1101# CONFIG_RPCSEC_GSS_SPKM3 is not set 864# CONFIG_RPCSEC_GSS_SPKM3 is not set
1102# CONFIG_SMB_FS is not set 865# CONFIG_SMB_FS is not set
@@ -1104,7 +867,6 @@ CONFIG_SUNRPC=y
1104# CONFIG_NCP_FS is not set 867# CONFIG_NCP_FS is not set
1105# CONFIG_CODA_FS is not set 868# CONFIG_CODA_FS is not set
1106# CONFIG_AFS_FS is not set 869# CONFIG_AFS_FS is not set
1107# CONFIG_9P_FS is not set
1108 870
1109# 871#
1110# Partition Types 872# Partition Types
@@ -1120,10 +882,7 @@ CONFIG_MSDOS_PARTITION=y
1120# 882#
1121# Distributed Lock Manager 883# Distributed Lock Manager
1122# 884#
1123CONFIG_DLM=m 885# CONFIG_DLM is not set
1124CONFIG_DLM_TCP=y
1125# CONFIG_DLM_SCTP is not set
1126# CONFIG_DLM_DEBUG is not set
1127 886
1128# 887#
1129# Profiling support 888# Profiling support
@@ -1141,7 +900,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1141# CONFIG_DEBUG_FS is not set 900# CONFIG_DEBUG_FS is not set
1142# CONFIG_HEADERS_CHECK is not set 901# CONFIG_HEADERS_CHECK is not set
1143# CONFIG_DEBUG_KERNEL is not set 902# CONFIG_DEBUG_KERNEL is not set
1144CONFIG_LOG_BUF_SHIFT=14
1145CONFIG_CROSSCOMPILE=y 903CONFIG_CROSSCOMPILE=y
1146CONFIG_CMDLINE="mem=32M console=ttyVR0,115200" 904CONFIG_CMDLINE="mem=32M console=ttyVR0,115200"
1147 905
@@ -1150,62 +908,20 @@ CONFIG_CMDLINE="mem=32M console=ttyVR0,115200"
1150# 908#
1151# CONFIG_KEYS is not set 909# CONFIG_KEYS is not set
1152# CONFIG_SECURITY is not set 910# CONFIG_SECURITY is not set
1153 911# CONFIG_CRYPTO is not set
1154#
1155# Cryptographic options
1156#
1157CONFIG_CRYPTO=y
1158CONFIG_CRYPTO_ALGAPI=y
1159CONFIG_CRYPTO_BLKCIPHER=m
1160CONFIG_CRYPTO_HASH=m
1161CONFIG_CRYPTO_MANAGER=m
1162CONFIG_CRYPTO_HMAC=m
1163CONFIG_CRYPTO_XCBC=m
1164CONFIG_CRYPTO_NULL=m
1165CONFIG_CRYPTO_MD4=m
1166CONFIG_CRYPTO_MD5=y
1167CONFIG_CRYPTO_SHA1=m
1168CONFIG_CRYPTO_SHA256=m
1169CONFIG_CRYPTO_SHA512=m
1170CONFIG_CRYPTO_WP512=m
1171CONFIG_CRYPTO_TGR192=m
1172CONFIG_CRYPTO_GF128MUL=m
1173CONFIG_CRYPTO_ECB=m
1174CONFIG_CRYPTO_CBC=m
1175CONFIG_CRYPTO_PCBC=m
1176CONFIG_CRYPTO_LRW=m
1177CONFIG_CRYPTO_DES=m
1178CONFIG_CRYPTO_FCRYPT=m
1179CONFIG_CRYPTO_BLOWFISH=m
1180CONFIG_CRYPTO_TWOFISH=m
1181CONFIG_CRYPTO_TWOFISH_COMMON=m
1182CONFIG_CRYPTO_SERPENT=m
1183CONFIG_CRYPTO_AES=m
1184CONFIG_CRYPTO_CAST5=m
1185CONFIG_CRYPTO_CAST6=m
1186CONFIG_CRYPTO_TEA=m
1187CONFIG_CRYPTO_ARC4=m
1188CONFIG_CRYPTO_KHAZAD=m
1189CONFIG_CRYPTO_ANUBIS=m
1190CONFIG_CRYPTO_DEFLATE=m
1191CONFIG_CRYPTO_MICHAEL_MIC=m
1192CONFIG_CRYPTO_CRC32C=m
1193CONFIG_CRYPTO_CAMELLIA=m
1194# CONFIG_CRYPTO_TEST is not set
1195
1196#
1197# Hardware crypto devices
1198#
1199 912
1200# 913#
1201# Library routines 914# Library routines
1202# 915#
916CONFIG_BITREVERSE=m
1203# CONFIG_CRC_CCITT is not set 917# CONFIG_CRC_CCITT is not set
1204# CONFIG_CRC16 is not set 918# CONFIG_CRC16 is not set
1205# CONFIG_CRC32 is not set 919# CONFIG_CRC_ITU_T is not set
1206CONFIG_LIBCRC32C=m 920CONFIG_CRC32=m
921# CONFIG_CRC7 is not set
922# CONFIG_LIBCRC32C is not set
1207CONFIG_ZLIB_INFLATE=m 923CONFIG_ZLIB_INFLATE=m
1208CONFIG_ZLIB_DEFLATE=m
1209CONFIG_PLIST=y 924CONFIG_PLIST=y
1210CONFIG_HAS_IOMEM=y 925CONFIG_HAS_IOMEM=y
1211CONFIG_HAS_IOPORT=y 926CONFIG_HAS_IOPORT=y
927CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/tb0287_defconfig b/arch/mips/configs/tb0287_defconfig
index 66383ecff2..499b6bd7ee 100644
--- a/arch/mips/configs/tb0287_defconfig
+++ b/arch/mips/configs/tb0287_defconfig
@@ -1,68 +1,56 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21-rc1 3# Linux kernel version: 2.6.23-rc2
4# Thu Feb 22 10:38:09 2007 4# Thu Aug 9 14:03:54 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
16# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 17# CONFIG_MIPS_ATLAS is not set
30# CONFIG_MIPS_MALTA is not set 18# CONFIG_MIPS_MALTA is not set
31# CONFIG_MIPS_SEAD is not set 19# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 21# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 22CONFIG_MACH_VR41XX=y
36# CONFIG_PNX8550_JBS is not set 23# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 24# CONFIG_PNX8550_STB810 is not set
38CONFIG_MACH_VR41XX=y 25# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 26# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_QEMU is not set 27# CONFIG_QEMU is not set
41# CONFIG_MARKEINS is not set
42# CONFIG_SGI_IP22 is not set 28# CONFIG_SGI_IP22 is not set
43# CONFIG_SGI_IP27 is not set 29# CONFIG_SGI_IP27 is not set
44# CONFIG_SGI_IP32 is not set 30# CONFIG_SGI_IP32 is not set
45# CONFIG_SIBYTE_BIGSUR is not set 31# CONFIG_SIBYTE_CRHINE is not set
32# CONFIG_SIBYTE_CARMEL is not set
33# CONFIG_SIBYTE_CRHONE is not set
34# CONFIG_SIBYTE_RHONE is not set
46# CONFIG_SIBYTE_SWARM is not set 35# CONFIG_SIBYTE_SWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set
47# CONFIG_SIBYTE_SENTOSA is not set 37# CONFIG_SIBYTE_SENTOSA is not set
48# CONFIG_SIBYTE_RHONE is not set
49# CONFIG_SIBYTE_CARMEL is not set
50# CONFIG_SIBYTE_PTSWARM is not set 38# CONFIG_SIBYTE_PTSWARM is not set
51# CONFIG_SIBYTE_LITTLESUR is not set 39# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_CRHINE is not set
53# CONFIG_SIBYTE_CRHONE is not set
54# CONFIG_SNI_RM is not set 40# CONFIG_SNI_RM is not set
55# CONFIG_TOSHIBA_JMR3927 is not set 41# CONFIG_TOSHIBA_JMR3927 is not set
56# CONFIG_TOSHIBA_RBTX4927 is not set 42# CONFIG_TOSHIBA_RBTX4927 is not set
57# CONFIG_TOSHIBA_RBTX4938 is not set 43# CONFIG_TOSHIBA_RBTX4938 is not set
44# CONFIG_WR_PPMC is not set
58# CONFIG_CASIO_E55 is not set 45# CONFIG_CASIO_E55 is not set
59# CONFIG_IBM_WORKPAD is not set 46# CONFIG_IBM_WORKPAD is not set
60# CONFIG_NEC_CMBVR4133 is not set 47# CONFIG_NEC_CMBVR4133 is not set
61CONFIG_TANBAC_TB022X=y 48CONFIG_TANBAC_TB022X=y
62# CONFIG_TANBAC_TB0226 is not set
63CONFIG_TANBAC_TB0287=y
64# CONFIG_VICTOR_MPC30X is not set 49# CONFIG_VICTOR_MPC30X is not set
65# CONFIG_ZAO_CAPCELLA is not set 50# CONFIG_ZAO_CAPCELLA is not set
51# CONFIG_TANBAC_TB0219 is not set
52# CONFIG_TANBAC_TB0226 is not set
53CONFIG_TANBAC_TB0287=y
66CONFIG_PCI_VR41XX=y 54CONFIG_PCI_VR41XX=y
67CONFIG_RWSEM_GENERIC_SPINLOCK=y 55CONFIG_RWSEM_GENERIC_SPINLOCK=y
68# CONFIG_ARCH_HAS_ILOG2_U32 is not set 56# CONFIG_ARCH_HAS_ILOG2_U32 is not set
@@ -75,6 +63,8 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
75CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 63CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
76CONFIG_DMA_NONCOHERENT=y 64CONFIG_DMA_NONCOHERENT=y
77CONFIG_DMA_NEED_PCI_MAP_STATE=y 65CONFIG_DMA_NEED_PCI_MAP_STATE=y
66# CONFIG_HOTPLUG_CPU is not set
67# CONFIG_NO_IOPORT is not set
78# CONFIG_CPU_BIG_ENDIAN is not set 68# CONFIG_CPU_BIG_ENDIAN is not set
79CONFIG_CPU_LITTLE_ENDIAN=y 69CONFIG_CPU_LITTLE_ENDIAN=y
80CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 70CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
@@ -84,6 +74,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
84# 74#
85# CPU selection 75# CPU selection
86# 76#
77# CONFIG_CPU_LOONGSON2 is not set
87# CONFIG_CPU_MIPS32_R1 is not set 78# CONFIG_CPU_MIPS32_R1 is not set
88# CONFIG_CPU_MIPS32_R2 is not set 79# CONFIG_CPU_MIPS32_R2 is not set
89# CONFIG_CPU_MIPS64_R1 is not set 80# CONFIG_CPU_MIPS64_R1 is not set
@@ -105,7 +96,6 @@ CONFIG_CPU_VR41XX=y
105# CONFIG_CPU_SB1 is not set 96# CONFIG_CPU_SB1 is not set
106CONFIG_SYS_HAS_CPU_VR41XX=y 97CONFIG_SYS_HAS_CPU_VR41XX=y
107CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 98CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
108CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
109CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 99CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
110CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 100CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
111 101
@@ -121,7 +111,6 @@ CONFIG_PAGE_SIZE_4KB=y
121CONFIG_MIPS_MT_DISABLED=y 111CONFIG_MIPS_MT_DISABLED=y
122# CONFIG_MIPS_MT_SMP is not set 112# CONFIG_MIPS_MT_SMP is not set
123# CONFIG_MIPS_MT_SMTC is not set 113# CONFIG_MIPS_MT_SMTC is not set
124# CONFIG_MIPS_VPE_LOADER is not set
125CONFIG_CPU_HAS_SYNC=y 114CONFIG_CPU_HAS_SYNC=y
126CONFIG_GENERIC_HARDIRQS=y 115CONFIG_GENERIC_HARDIRQS=y
127CONFIG_GENERIC_IRQ_PROBE=y 116CONFIG_GENERIC_IRQ_PROBE=y
@@ -135,86 +124,83 @@ CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set 124# CONFIG_SPARSEMEM_STATIC is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4 125CONFIG_SPLIT_PTLOCK_CPUS=4
137# CONFIG_RESOURCES_64BIT is not set 126# CONFIG_RESOURCES_64BIT is not set
138CONFIG_ZONE_DMA_FLAG=1 127CONFIG_ZONE_DMA_FLAG=0
128CONFIG_VIRT_TO_BUS=y
139# CONFIG_HZ_48 is not set 129# CONFIG_HZ_48 is not set
140# CONFIG_HZ_100 is not set 130# CONFIG_HZ_100 is not set
141# CONFIG_HZ_128 is not set 131# CONFIG_HZ_128 is not set
142# CONFIG_HZ_250 is not set 132CONFIG_HZ_250=y
143# CONFIG_HZ_256 is not set 133# CONFIG_HZ_256 is not set
144CONFIG_HZ_1000=y 134# CONFIG_HZ_1000 is not set
145# CONFIG_HZ_1024 is not set 135# CONFIG_HZ_1024 is not set
146CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 136CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
147CONFIG_HZ=1000 137CONFIG_HZ=250
148CONFIG_PREEMPT_NONE=y 138CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set 139# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
151# CONFIG_KEXEC is not set 141# CONFIG_KEXEC is not set
142CONFIG_SECCOMP=y
152CONFIG_LOCKDEP_SUPPORT=y 143CONFIG_LOCKDEP_SUPPORT=y
153CONFIG_STACKTRACE_SUPPORT=y 144CONFIG_STACKTRACE_SUPPORT=y
154CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 145CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
155 146
156# 147#
157# Code maturity level options 148# General setup
158# 149#
159CONFIG_EXPERIMENTAL=y 150CONFIG_EXPERIMENTAL=y
160CONFIG_BROKEN_ON_SMP=y 151CONFIG_BROKEN_ON_SMP=y
161CONFIG_INIT_ENV_ARG_LIMIT=32 152CONFIG_INIT_ENV_ARG_LIMIT=32
162
163#
164# General setup
165#
166CONFIG_LOCALVERSION="" 153CONFIG_LOCALVERSION=""
167CONFIG_LOCALVERSION_AUTO=y 154CONFIG_LOCALVERSION_AUTO=y
168CONFIG_SWAP=y 155CONFIG_SWAP=y
169CONFIG_SYSVIPC=y 156CONFIG_SYSVIPC=y
170# CONFIG_IPC_NS is not set
171CONFIG_SYSVIPC_SYSCTL=y 157CONFIG_SYSVIPC_SYSCTL=y
172# CONFIG_POSIX_MQUEUE is not set 158# CONFIG_POSIX_MQUEUE is not set
173# CONFIG_BSD_PROCESS_ACCT is not set 159# CONFIG_BSD_PROCESS_ACCT is not set
174# CONFIG_TASKSTATS is not set 160# CONFIG_TASKSTATS is not set
175# CONFIG_UTS_NS is not set 161# CONFIG_USER_NS is not set
176# CONFIG_AUDIT is not set 162# CONFIG_AUDIT is not set
177# CONFIG_IKCONFIG is not set 163# CONFIG_IKCONFIG is not set
164CONFIG_LOG_BUF_SHIFT=14
178CONFIG_SYSFS_DEPRECATED=y 165CONFIG_SYSFS_DEPRECATED=y
179# CONFIG_RELAY is not set 166# CONFIG_RELAY is not set
167# CONFIG_BLK_DEV_INITRD is not set
180# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 168# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
181CONFIG_SYSCTL=y 169CONFIG_SYSCTL=y
182CONFIG_EMBEDDED=y 170CONFIG_EMBEDDED=y
183# CONFIG_SYSCTL_SYSCALL is not set 171# CONFIG_SYSCTL_SYSCALL is not set
184CONFIG_KALLSYMS=y 172CONFIG_KALLSYMS=y
185# CONFIG_KALLSYMS_EXTRA_PASS is not set 173# CONFIG_KALLSYMS_EXTRA_PASS is not set
186# CONFIG_HOTPLUG is not set 174CONFIG_HOTPLUG=y
187CONFIG_PRINTK=y 175CONFIG_PRINTK=y
188CONFIG_BUG=y 176CONFIG_BUG=y
189CONFIG_ELF_CORE=y 177CONFIG_ELF_CORE=y
190CONFIG_BASE_FULL=y 178CONFIG_BASE_FULL=y
191CONFIG_FUTEX=y 179CONFIG_FUTEX=y
180CONFIG_ANON_INODES=y
192CONFIG_EPOLL=y 181CONFIG_EPOLL=y
182CONFIG_SIGNALFD=y
183CONFIG_TIMERFD=y
184CONFIG_EVENTFD=y
193CONFIG_SHMEM=y 185CONFIG_SHMEM=y
194CONFIG_SLAB=y
195CONFIG_VM_EVENT_COUNTERS=y 186CONFIG_VM_EVENT_COUNTERS=y
187CONFIG_SLAB=y
188# CONFIG_SLUB is not set
189# CONFIG_SLOB is not set
196CONFIG_RT_MUTEXES=y 190CONFIG_RT_MUTEXES=y
197# CONFIG_TINY_SHMEM is not set 191# CONFIG_TINY_SHMEM is not set
198CONFIG_BASE_SMALL=0 192CONFIG_BASE_SMALL=0
199# CONFIG_SLOB is not set
200
201#
202# Loadable module support
203#
204CONFIG_MODULES=y 193CONFIG_MODULES=y
205CONFIG_MODULE_UNLOAD=y 194CONFIG_MODULE_UNLOAD=y
206# CONFIG_MODULE_FORCE_UNLOAD is not set 195CONFIG_MODULE_FORCE_UNLOAD=y
207CONFIG_MODVERSIONS=y 196CONFIG_MODVERSIONS=y
208CONFIG_MODULE_SRCVERSION_ALL=y 197CONFIG_MODULE_SRCVERSION_ALL=y
209CONFIG_KMOD=y 198CONFIG_KMOD=y
210
211#
212# Block layer
213#
214CONFIG_BLOCK=y 199CONFIG_BLOCK=y
215# CONFIG_LBD is not set 200# CONFIG_LBD is not set
216# CONFIG_BLK_DEV_IO_TRACE is not set 201# CONFIG_BLK_DEV_IO_TRACE is not set
217# CONFIG_LSF is not set 202# CONFIG_LSF is not set
203# CONFIG_BLK_DEV_BSG is not set
218 204
219# 205#
220# IO Schedulers 206# IO Schedulers
@@ -234,15 +220,14 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
234# 220#
235CONFIG_HW_HAS_PCI=y 221CONFIG_HW_HAS_PCI=y
236CONFIG_PCI=y 222CONFIG_PCI=y
223# CONFIG_ARCH_SUPPORTS_MSI is not set
237CONFIG_MMU=y 224CONFIG_MMU=y
238 225
239# 226#
240# PCCARD (PCMCIA/CardBus) support 227# PCCARD (PCMCIA/CardBus) support
241# 228#
242 229# CONFIG_PCCARD is not set
243# 230# CONFIG_HOTPLUG_PCI is not set
244# PCI Hotplug Support
245#
246 231
247# 232#
248# Executable file formats 233# Executable file formats
@@ -254,10 +239,7 @@ CONFIG_TRAD_SIGNALS=y
254# 239#
255# Power management options 240# Power management options
256# 241#
257CONFIG_PM=y 242# CONFIG_PM is not set
258# CONFIG_PM_LEGACY is not set
259# CONFIG_PM_DEBUG is not set
260# CONFIG_PM_SYSFS_DEPRECATED is not set
261 243
262# 244#
263# Networking 245# Networking
@@ -267,14 +249,9 @@ CONFIG_NET=y
267# 249#
268# Networking options 250# Networking options
269# 251#
270# CONFIG_NETDEBUG is not set
271CONFIG_PACKET=y 252CONFIG_PACKET=y
272# CONFIG_PACKET_MMAP is not set 253# CONFIG_PACKET_MMAP is not set
273CONFIG_UNIX=y 254CONFIG_UNIX=y
274CONFIG_XFRM=y
275# CONFIG_XFRM_USER is not set
276# CONFIG_XFRM_SUB_POLICY is not set
277CONFIG_XFRM_MIGRATE=y
278# CONFIG_NET_KEY is not set 255# CONFIG_NET_KEY is not set
279CONFIG_INET=y 256CONFIG_INET=y
280CONFIG_IP_MULTICAST=y 257CONFIG_IP_MULTICAST=y
@@ -284,7 +261,6 @@ CONFIG_ASK_IP_FIB_HASH=y
284CONFIG_IP_FIB_HASH=y 261CONFIG_IP_FIB_HASH=y
285CONFIG_IP_MULTIPLE_TABLES=y 262CONFIG_IP_MULTIPLE_TABLES=y
286CONFIG_IP_ROUTE_MULTIPATH=y 263CONFIG_IP_ROUTE_MULTIPATH=y
287# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
288CONFIG_IP_ROUTE_VERBOSE=y 264CONFIG_IP_ROUTE_VERBOSE=y
289CONFIG_IP_PNP=y 265CONFIG_IP_PNP=y
290# CONFIG_IP_PNP_DHCP is not set 266# CONFIG_IP_PNP_DHCP is not set
@@ -301,9 +277,9 @@ CONFIG_SYN_COOKIES=y
301# CONFIG_INET_IPCOMP is not set 277# CONFIG_INET_IPCOMP is not set
302# CONFIG_INET_XFRM_TUNNEL is not set 278# CONFIG_INET_XFRM_TUNNEL is not set
303CONFIG_INET_TUNNEL=m 279CONFIG_INET_TUNNEL=m
304CONFIG_INET_XFRM_MODE_TRANSPORT=m 280# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
305CONFIG_INET_XFRM_MODE_TUNNEL=m 281# CONFIG_INET_XFRM_MODE_TUNNEL is not set
306CONFIG_INET_XFRM_MODE_BEET=y 282# CONFIG_INET_XFRM_MODE_BEET is not set
307CONFIG_INET_DIAG=y 283CONFIG_INET_DIAG=y
308CONFIG_INET_TCP_DIAG=y 284CONFIG_INET_TCP_DIAG=y
309CONFIG_TCP_CONG_ADVANCED=y 285CONFIG_TCP_CONG_ADVANCED=y
@@ -317,6 +293,8 @@ CONFIG_TCP_CONG_HTCP=m
317# CONFIG_TCP_CONG_SCALABLE is not set 293# CONFIG_TCP_CONG_SCALABLE is not set
318# CONFIG_TCP_CONG_LP is not set 294# CONFIG_TCP_CONG_LP is not set
319# CONFIG_TCP_CONG_VENO is not set 295# CONFIG_TCP_CONG_VENO is not set
296# CONFIG_TCP_CONG_YEAH is not set
297# CONFIG_TCP_CONG_ILLINOIS is not set
320CONFIG_DEFAULT_BIC=y 298CONFIG_DEFAULT_BIC=y
321# CONFIG_DEFAULT_CUBIC is not set 299# CONFIG_DEFAULT_CUBIC is not set
322# CONFIG_DEFAULT_HTCP is not set 300# CONFIG_DEFAULT_HTCP is not set
@@ -324,26 +302,14 @@ CONFIG_DEFAULT_BIC=y
324# CONFIG_DEFAULT_WESTWOOD is not set 302# CONFIG_DEFAULT_WESTWOOD is not set
325# CONFIG_DEFAULT_RENO is not set 303# CONFIG_DEFAULT_RENO is not set
326CONFIG_DEFAULT_TCP_CONG="bic" 304CONFIG_DEFAULT_TCP_CONG="bic"
327CONFIG_TCP_MD5SIG=y 305# CONFIG_TCP_MD5SIG is not set
328# CONFIG_IPV6 is not set 306# CONFIG_IPV6 is not set
329# CONFIG_INET6_XFRM_TUNNEL is not set 307# CONFIG_INET6_XFRM_TUNNEL is not set
330# CONFIG_INET6_TUNNEL is not set 308# CONFIG_INET6_TUNNEL is not set
331CONFIG_NETWORK_SECMARK=y 309CONFIG_NETWORK_SECMARK=y
332# CONFIG_NETFILTER is not set 310# CONFIG_NETFILTER is not set
333
334#
335# DCCP Configuration (EXPERIMENTAL)
336#
337# CONFIG_IP_DCCP is not set 311# CONFIG_IP_DCCP is not set
338
339#
340# SCTP Configuration (EXPERIMENTAL)
341#
342# CONFIG_IP_SCTP is not set 312# CONFIG_IP_SCTP is not set
343
344#
345# TIPC Configuration (EXPERIMENTAL)
346#
347# CONFIG_TIPC is not set 313# CONFIG_TIPC is not set
348# CONFIG_ATM is not set 314# CONFIG_ATM is not set
349# CONFIG_BRIDGE is not set 315# CONFIG_BRIDGE is not set
@@ -369,10 +335,20 @@ CONFIG_NETWORK_SECMARK=y
369# CONFIG_HAMRADIO is not set 335# CONFIG_HAMRADIO is not set
370# CONFIG_IRDA is not set 336# CONFIG_IRDA is not set
371# CONFIG_BT is not set 337# CONFIG_BT is not set
372# CONFIG_IEEE80211 is not set 338# CONFIG_AF_RXRPC is not set
373CONFIG_FIB_RULES=y 339CONFIG_FIB_RULES=y
374 340
375# 341#
342# Wireless
343#
344# CONFIG_CFG80211 is not set
345# CONFIG_WIRELESS_EXT is not set
346# CONFIG_MAC80211 is not set
347# CONFIG_IEEE80211 is not set
348# CONFIG_RFKILL is not set
349# CONFIG_NET_9P is not set
350
351#
376# Device Drivers 352# Device Drivers
377# 353#
378 354
@@ -381,31 +357,12 @@ CONFIG_FIB_RULES=y
381# 357#
382CONFIG_STANDALONE=y 358CONFIG_STANDALONE=y
383CONFIG_PREVENT_FIRMWARE_BUILD=y 359CONFIG_PREVENT_FIRMWARE_BUILD=y
360CONFIG_FW_LOADER=m
384# CONFIG_SYS_HYPERVISOR is not set 361# CONFIG_SYS_HYPERVISOR is not set
385
386#
387# Connector - unified userspace <-> kernelspace linker
388#
389# CONFIG_CONNECTOR is not set 362# CONFIG_CONNECTOR is not set
390
391#
392# Memory Technology Devices (MTD)
393#
394# CONFIG_MTD is not set 363# CONFIG_MTD is not set
395
396#
397# Parallel port support
398#
399# CONFIG_PARPORT is not set 364# CONFIG_PARPORT is not set
400 365CONFIG_BLK_DEV=y
401#
402# Plug and Play support
403#
404# CONFIG_PNPACPI is not set
405
406#
407# Block devices
408#
409# CONFIG_BLK_CPQ_DA is not set 366# CONFIG_BLK_CPQ_DA is not set
410# CONFIG_BLK_CPQ_CISS_DA is not set 367# CONFIG_BLK_CPQ_CISS_DA is not set
411# CONFIG_BLK_DEV_DAC960 is not set 368# CONFIG_BLK_DEV_DAC960 is not set
@@ -420,19 +377,9 @@ CONFIG_BLK_DEV_RAM=y
420CONFIG_BLK_DEV_RAM_COUNT=16 377CONFIG_BLK_DEV_RAM_COUNT=16
421CONFIG_BLK_DEV_RAM_SIZE=4096 378CONFIG_BLK_DEV_RAM_SIZE=4096
422CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 379CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
423# CONFIG_BLK_DEV_INITRD is not set
424# CONFIG_CDROM_PKTCDVD is not set 380# CONFIG_CDROM_PKTCDVD is not set
425# CONFIG_ATA_OVER_ETH is not set 381# CONFIG_ATA_OVER_ETH is not set
426 382# CONFIG_MISC_DEVICES is not set
427#
428# Misc devices
429#
430CONFIG_SGI_IOC4=m
431# CONFIG_TIFM_CORE is not set
432
433#
434# ATA/ATAPI/MFM/RLL support
435#
436# CONFIG_IDE is not set 383# CONFIG_IDE is not set
437 384
438# 385#
@@ -440,6 +387,7 @@ CONFIG_SGI_IOC4=m
440# 387#
441# CONFIG_RAID_ATTRS is not set 388# CONFIG_RAID_ATTRS is not set
442CONFIG_SCSI=y 389CONFIG_SCSI=y
390CONFIG_SCSI_DMA=y
443CONFIG_SCSI_TGT=m 391CONFIG_SCSI_TGT=m
444# CONFIG_SCSI_NETLINK is not set 392# CONFIG_SCSI_NETLINK is not set
445CONFIG_SCSI_PROC_FS=y 393CONFIG_SCSI_PROC_FS=y
@@ -461,6 +409,7 @@ CONFIG_BLK_DEV_SD=y
461# CONFIG_SCSI_CONSTANTS is not set 409# CONFIG_SCSI_CONSTANTS is not set
462# CONFIG_SCSI_LOGGING is not set 410# CONFIG_SCSI_LOGGING is not set
463CONFIG_SCSI_SCAN_ASYNC=y 411CONFIG_SCSI_SCAN_ASYNC=y
412CONFIG_SCSI_WAIT_SCAN=m
464 413
465# 414#
466# SCSI Transports 415# SCSI Transports
@@ -468,48 +417,8 @@ CONFIG_SCSI_SCAN_ASYNC=y
468# CONFIG_SCSI_SPI_ATTRS is not set 417# CONFIG_SCSI_SPI_ATTRS is not set
469# CONFIG_SCSI_FC_ATTRS is not set 418# CONFIG_SCSI_FC_ATTRS is not set
470# CONFIG_SCSI_ISCSI_ATTRS is not set 419# CONFIG_SCSI_ISCSI_ATTRS is not set
471# CONFIG_SCSI_SAS_ATTRS is not set
472# CONFIG_SCSI_SAS_LIBSAS is not set 420# CONFIG_SCSI_SAS_LIBSAS is not set
473 421# CONFIG_SCSI_LOWLEVEL is not set
474#
475# SCSI low-level drivers
476#
477# CONFIG_ISCSI_TCP is not set
478# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
479# CONFIG_SCSI_3W_9XXX is not set
480# CONFIG_SCSI_ACARD is not set
481# CONFIG_SCSI_AACRAID is not set
482# CONFIG_SCSI_AIC7XXX is not set
483# CONFIG_SCSI_AIC7XXX_OLD is not set
484# CONFIG_SCSI_AIC79XX is not set
485# CONFIG_SCSI_AIC94XX is not set
486# CONFIG_SCSI_DPT_I2O is not set
487# CONFIG_SCSI_ARCMSR is not set
488# CONFIG_MEGARAID_NEWGEN is not set
489# CONFIG_MEGARAID_LEGACY is not set
490# CONFIG_MEGARAID_SAS is not set
491# CONFIG_SCSI_HPTIOP is not set
492# CONFIG_SCSI_DMX3191D is not set
493# CONFIG_SCSI_FUTURE_DOMAIN is not set
494# CONFIG_SCSI_IPS is not set
495# CONFIG_SCSI_INITIO is not set
496# CONFIG_SCSI_INIA100 is not set
497# CONFIG_SCSI_STEX is not set
498# CONFIG_SCSI_SYM53C8XX_2 is not set
499# CONFIG_SCSI_IPR is not set
500# CONFIG_SCSI_QLOGIC_1280 is not set
501# CONFIG_SCSI_QLA_FC is not set
502# CONFIG_SCSI_QLA_ISCSI is not set
503# CONFIG_SCSI_LPFC is not set
504# CONFIG_SCSI_DC395x is not set
505# CONFIG_SCSI_DC390T is not set
506# CONFIG_SCSI_NSP32 is not set
507# CONFIG_SCSI_DEBUG is not set
508# CONFIG_SCSI_SRP is not set
509
510#
511# Serial ATA (prod) and Parallel ATA (experimental) drivers
512#
513CONFIG_ATA=y 422CONFIG_ATA=y
514# CONFIG_ATA_NONSTANDARD is not set 423# CONFIG_ATA_NONSTANDARD is not set
515# CONFIG_SATA_AHCI is not set 424# CONFIG_SATA_AHCI is not set
@@ -532,6 +441,7 @@ CONFIG_ATA=y
532# CONFIG_PATA_AMD is not set 441# CONFIG_PATA_AMD is not set
533# CONFIG_PATA_ARTOP is not set 442# CONFIG_PATA_ARTOP is not set
534# CONFIG_PATA_ATIIXP is not set 443# CONFIG_PATA_ATIIXP is not set
444# CONFIG_PATA_CMD640_PCI is not set
535# CONFIG_PATA_CMD64X is not set 445# CONFIG_PATA_CMD64X is not set
536# CONFIG_PATA_CS5520 is not set 446# CONFIG_PATA_CS5520 is not set
537# CONFIG_PATA_CS5530 is not set 447# CONFIG_PATA_CS5530 is not set
@@ -564,10 +474,6 @@ CONFIG_PATA_SIL680=y
564# CONFIG_PATA_VIA is not set 474# CONFIG_PATA_VIA is not set
565# CONFIG_PATA_WINBOND is not set 475# CONFIG_PATA_WINBOND is not set
566# CONFIG_PATA_PLATFORM is not set 476# CONFIG_PATA_PLATFORM is not set
567
568#
569# Multi-device support (RAID and LVM)
570#
571# CONFIG_MD is not set 477# CONFIG_MD is not set
572 478
573# 479#
@@ -581,17 +487,16 @@ CONFIG_PATA_SIL680=y
581# 487#
582# IEEE 1394 (FireWire) support 488# IEEE 1394 (FireWire) support
583# 489#
490# CONFIG_FIREWIRE is not set
584CONFIG_IEEE1394=m 491CONFIG_IEEE1394=m
585 492
586# 493#
587# Subsystem Options 494# Subsystem Options
588# 495#
589# CONFIG_IEEE1394_VERBOSEDEBUG is not set 496# CONFIG_IEEE1394_VERBOSEDEBUG is not set
590CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
591CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
592 497
593# 498#
594# Device Drivers 499# Controllers
595# 500#
596 501
597# 502#
@@ -600,59 +505,63 @@ CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
600CONFIG_IEEE1394_OHCI1394=m 505CONFIG_IEEE1394_OHCI1394=m
601 506
602# 507#
603# Protocol Drivers 508# Protocols
604# 509#
605CONFIG_IEEE1394_VIDEO1394=m 510CONFIG_IEEE1394_VIDEO1394=m
606CONFIG_IEEE1394_SBP2=m 511CONFIG_IEEE1394_SBP2=m
512# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
513CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y
607CONFIG_IEEE1394_ETH1394=m 514CONFIG_IEEE1394_ETH1394=m
608CONFIG_IEEE1394_DV1394=m 515CONFIG_IEEE1394_DV1394=m
609CONFIG_IEEE1394_RAWIO=m 516CONFIG_IEEE1394_RAWIO=m
610
611#
612# I2O device support
613#
614# CONFIG_I2O is not set 517# CONFIG_I2O is not set
615
616#
617# Network device support
618#
619CONFIG_NETDEVICES=y 518CONFIG_NETDEVICES=y
620CONFIG_DUMMY=m 519# CONFIG_NETDEVICES_MULTIQUEUE is not set
520# CONFIG_DUMMY is not set
621# CONFIG_BONDING is not set 521# CONFIG_BONDING is not set
522# CONFIG_MACVLAN is not set
622# CONFIG_EQUALIZER is not set 523# CONFIG_EQUALIZER is not set
623# CONFIG_TUN is not set 524# CONFIG_TUN is not set
624
625#
626# ARCnet devices
627#
628# CONFIG_ARCNET is not set 525# CONFIG_ARCNET is not set
629
630#
631# PHY device support
632#
633# CONFIG_PHYLIB is not set 526# CONFIG_PHYLIB is not set
634
635#
636# Ethernet (10 or 100Mbit)
637#
638CONFIG_NET_ETHERNET=y 527CONFIG_NET_ETHERNET=y
639CONFIG_MII=y 528CONFIG_MII=y
529# CONFIG_AX88796 is not set
640# CONFIG_HAPPYMEAL is not set 530# CONFIG_HAPPYMEAL is not set
641# CONFIG_SUNGEM is not set 531# CONFIG_SUNGEM is not set
642# CONFIG_CASSINI is not set 532# CONFIG_CASSINI is not set
643# CONFIG_NET_VENDOR_3COM is not set 533# CONFIG_NET_VENDOR_3COM is not set
644# CONFIG_DM9000 is not set 534# CONFIG_DM9000 is not set
645
646#
647# Tulip family network device support
648#
649# CONFIG_NET_TULIP is not set 535# CONFIG_NET_TULIP is not set
650# CONFIG_HP100 is not set 536# CONFIG_HP100 is not set
651# CONFIG_NET_PCI is not set 537CONFIG_NET_PCI=y
652 538# CONFIG_PCNET32 is not set
653# 539# CONFIG_AMD8111_ETH is not set
654# Ethernet (1000 Mbit) 540# CONFIG_ADAPTEC_STARFIRE is not set
655# 541# CONFIG_B44 is not set
542# CONFIG_FORCEDETH is not set
543# CONFIG_TC35815 is not set
544# CONFIG_DGRS is not set
545# CONFIG_EEPRO100 is not set
546# CONFIG_E100 is not set
547# CONFIG_FEALNX is not set
548# CONFIG_NATSEMI is not set
549# CONFIG_NE2K_PCI is not set
550# CONFIG_8139CP is not set
551CONFIG_8139TOO=y
552CONFIG_8139TOO_PIO=y
553# CONFIG_8139TOO_TUNE_TWISTER is not set
554# CONFIG_8139TOO_8129 is not set
555# CONFIG_8139_OLD_RX_RESET is not set
556# CONFIG_SIS900 is not set
557# CONFIG_EPIC100 is not set
558# CONFIG_SUNDANCE is not set
559# CONFIG_TLAN is not set
560CONFIG_VIA_RHINE=y
561CONFIG_VIA_RHINE_MMIO=y
562# CONFIG_VIA_RHINE_NAPI is not set
563# CONFIG_SC92031 is not set
564CONFIG_NETDEV_1000=y
656# CONFIG_ACENIC is not set 565# CONFIG_ACENIC is not set
657# CONFIG_DL2K is not set 566# CONFIG_DL2K is not set
658# CONFIG_E1000 is not set 567# CONFIG_E1000 is not set
@@ -664,35 +573,29 @@ CONFIG_R8169=y
664# CONFIG_SIS190 is not set 573# CONFIG_SIS190 is not set
665# CONFIG_SKGE is not set 574# CONFIG_SKGE is not set
666# CONFIG_SKY2 is not set 575# CONFIG_SKY2 is not set
667# CONFIG_SK98LIN is not set 576CONFIG_VIA_VELOCITY=y
668# CONFIG_TIGON3 is not set 577# CONFIG_TIGON3 is not set
669# CONFIG_BNX2 is not set 578# CONFIG_BNX2 is not set
670# CONFIG_QLA3XXX is not set 579# CONFIG_QLA3XXX is not set
671# CONFIG_ATL1 is not set 580# CONFIG_ATL1 is not set
672 581# CONFIG_NETDEV_10000 is not set
673#
674# Ethernet (10000 Mbit)
675#
676# CONFIG_CHELSIO_T1 is not set
677CONFIG_CHELSIO_T3=m
678# CONFIG_IXGB is not set
679# CONFIG_S2IO is not set
680# CONFIG_MYRI10GE is not set
681CONFIG_NETXEN_NIC=m
682
683#
684# Token Ring devices
685#
686# CONFIG_TR is not set 582# CONFIG_TR is not set
687 583
688# 584#
689# Wireless LAN (non-hamradio) 585# Wireless LAN
690# 586#
691# CONFIG_NET_RADIO is not set 587# CONFIG_WLAN_PRE80211 is not set
588# CONFIG_WLAN_80211 is not set
692 589
693# 590#
694# Wan interfaces 591# USB Network Adapters
695# 592#
593# CONFIG_USB_CATC is not set
594# CONFIG_USB_KAWETH is not set
595# CONFIG_USB_PEGASUS is not set
596# CONFIG_USB_RTL8150 is not set
597# CONFIG_USB_USBNET_MII is not set
598# CONFIG_USB_USBNET is not set
696# CONFIG_WAN is not set 599# CONFIG_WAN is not set
697# CONFIG_FDDI is not set 600# CONFIG_FDDI is not set
698# CONFIG_HIPPI is not set 601# CONFIG_HIPPI is not set
@@ -703,15 +606,7 @@ CONFIG_NETXEN_NIC=m
703# CONFIG_NETCONSOLE is not set 606# CONFIG_NETCONSOLE is not set
704# CONFIG_NETPOLL is not set 607# CONFIG_NETPOLL is not set
705# CONFIG_NET_POLL_CONTROLLER is not set 608# CONFIG_NET_POLL_CONTROLLER is not set
706
707#
708# ISDN subsystem
709#
710# CONFIG_ISDN is not set 609# CONFIG_ISDN is not set
711
712#
713# Telephony Support
714#
715# CONFIG_PHONE is not set 610# CONFIG_PHONE is not set
716 611
717# 612#
@@ -719,11 +614,15 @@ CONFIG_NETXEN_NIC=m
719# 614#
720CONFIG_INPUT=y 615CONFIG_INPUT=y
721# CONFIG_INPUT_FF_MEMLESS is not set 616# CONFIG_INPUT_FF_MEMLESS is not set
617# CONFIG_INPUT_POLLDEV is not set
722 618
723# 619#
724# Userland interfaces 620# Userland interfaces
725# 621#
726# CONFIG_INPUT_MOUSEDEV is not set 622CONFIG_INPUT_MOUSEDEV=y
623CONFIG_INPUT_MOUSEDEV_PSAUX=y
624CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
625CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
727# CONFIG_INPUT_JOYDEV is not set 626# CONFIG_INPUT_JOYDEV is not set
728# CONFIG_INPUT_TSDEV is not set 627# CONFIG_INPUT_TSDEV is not set
729# CONFIG_INPUT_EVDEV is not set 628# CONFIG_INPUT_EVDEV is not set
@@ -735,6 +634,7 @@ CONFIG_INPUT=y
735# CONFIG_INPUT_KEYBOARD is not set 634# CONFIG_INPUT_KEYBOARD is not set
736# CONFIG_INPUT_MOUSE is not set 635# CONFIG_INPUT_MOUSE is not set
737# CONFIG_INPUT_JOYSTICK is not set 636# CONFIG_INPUT_JOYSTICK is not set
637# CONFIG_INPUT_TABLET is not set
738# CONFIG_INPUT_TOUCHSCREEN is not set 638# CONFIG_INPUT_TOUCHSCREEN is not set
739# CONFIG_INPUT_MISC is not set 639# CONFIG_INPUT_MISC is not set
740 640
@@ -769,35 +669,18 @@ CONFIG_SERIAL_VR41XX_CONSOLE=y
769CONFIG_UNIX98_PTYS=y 669CONFIG_UNIX98_PTYS=y
770CONFIG_LEGACY_PTYS=y 670CONFIG_LEGACY_PTYS=y
771CONFIG_LEGACY_PTY_COUNT=256 671CONFIG_LEGACY_PTY_COUNT=256
772
773#
774# IPMI
775#
776# CONFIG_IPMI_HANDLER is not set 672# CONFIG_IPMI_HANDLER is not set
777
778#
779# Watchdog Cards
780#
781# CONFIG_WATCHDOG is not set 673# CONFIG_WATCHDOG is not set
782# CONFIG_HW_RANDOM is not set 674# CONFIG_HW_RANDOM is not set
783# CONFIG_RTC is not set 675# CONFIG_RTC is not set
784# CONFIG_GEN_RTC is not set
785# CONFIG_DTLK is not set
786# CONFIG_R3964 is not set 676# CONFIG_R3964 is not set
787# CONFIG_APPLICOM is not set 677# CONFIG_APPLICOM is not set
788# CONFIG_TANBAC_TB0219 is not set 678# CONFIG_GPIO_TB0219 is not set
789# CONFIG_DRM is not set 679# CONFIG_DRM is not set
790CONFIG_GPIO_VR41XX=y 680CONFIG_GPIO_VR41XX=y
791# CONFIG_RAW_DRIVER is not set 681# CONFIG_RAW_DRIVER is not set
792
793#
794# TPM devices
795#
796# CONFIG_TCG_TPM is not set 682# CONFIG_TCG_TPM is not set
797 683CONFIG_DEVPORT=y
798#
799# I2C support
800#
801# CONFIG_I2C is not set 684# CONFIG_I2C is not set
802 685
803# 686#
@@ -805,17 +688,9 @@ CONFIG_GPIO_VR41XX=y
805# 688#
806# CONFIG_SPI is not set 689# CONFIG_SPI is not set
807# CONFIG_SPI_MASTER is not set 690# CONFIG_SPI_MASTER is not set
808
809#
810# Dallas's 1-wire bus
811#
812# CONFIG_W1 is not set 691# CONFIG_W1 is not set
813 692# CONFIG_POWER_SUPPLY is not set
814#
815# Hardware Monitoring support
816#
817# CONFIG_HWMON is not set 693# CONFIG_HWMON is not set
818# CONFIG_HWMON_VID is not set
819 694
820# 695#
821# Multifunction device drivers 696# Multifunction device drivers
@@ -826,23 +701,31 @@ CONFIG_MFD_SM501=y
826# Multimedia devices 701# Multimedia devices
827# 702#
828# CONFIG_VIDEO_DEV is not set 703# CONFIG_VIDEO_DEV is not set
704# CONFIG_DVB_CORE is not set
705# CONFIG_DAB is not set
829 706
830# 707#
831# Digital Video Broadcasting Devices 708# Graphics support
832# 709#
833# CONFIG_DVB is not set 710# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
834# CONFIG_USB_DABUSB is not set
835 711
836# 712#
837# Graphics support 713# Display device support
838# 714#
839# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 715# CONFIG_DISPLAY_SUPPORT is not set
716# CONFIG_VGASTATE is not set
717CONFIG_VIDEO_OUTPUT_CONTROL=m
840CONFIG_FB=y 718CONFIG_FB=y
841# CONFIG_FIRMWARE_EDID is not set 719# CONFIG_FIRMWARE_EDID is not set
842# CONFIG_FB_DDC is not set 720# CONFIG_FB_DDC is not set
843CONFIG_FB_CFB_FILLRECT=y 721CONFIG_FB_CFB_FILLRECT=y
844CONFIG_FB_CFB_COPYAREA=y 722CONFIG_FB_CFB_COPYAREA=y
845CONFIG_FB_CFB_IMAGEBLIT=y 723CONFIG_FB_CFB_IMAGEBLIT=y
724# CONFIG_FB_SYS_FILLRECT is not set
725# CONFIG_FB_SYS_COPYAREA is not set
726# CONFIG_FB_SYS_IMAGEBLIT is not set
727# CONFIG_FB_SYS_FOPS is not set
728CONFIG_FB_DEFERRED_IO=y
846# CONFIG_FB_SVGALIB is not set 729# CONFIG_FB_SVGALIB is not set
847# CONFIG_FB_MACMODES is not set 730# CONFIG_FB_MACMODES is not set
848# CONFIG_FB_BACKLIGHT is not set 731# CONFIG_FB_BACKLIGHT is not set
@@ -850,7 +733,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
850# CONFIG_FB_TILEBLITTING is not set 733# CONFIG_FB_TILEBLITTING is not set
851 734
852# 735#
853# Frambuffer hardware drivers 736# Frame buffer hardware drivers
854# 737#
855# CONFIG_FB_CIRRUS is not set 738# CONFIG_FB_CIRRUS is not set
856# CONFIG_FB_PM2 is not set 739# CONFIG_FB_PM2 is not set
@@ -871,8 +754,10 @@ CONFIG_FB_CFB_IMAGEBLIT=y
871# CONFIG_FB_KYRO is not set 754# CONFIG_FB_KYRO is not set
872# CONFIG_FB_3DFX is not set 755# CONFIG_FB_3DFX is not set
873# CONFIG_FB_VOODOO1 is not set 756# CONFIG_FB_VOODOO1 is not set
874# CONFIG_FB_SMIVGX is not set 757# CONFIG_FB_VT8623 is not set
875# CONFIG_FB_TRIDENT is not set 758# CONFIG_FB_TRIDENT is not set
759# CONFIG_FB_ARK is not set
760# CONFIG_FB_PM3 is not set
876CONFIG_FB_SM501=y 761CONFIG_FB_SM501=y
877# CONFIG_FB_VIRTUAL is not set 762# CONFIG_FB_VIRTUAL is not set
878 763
@@ -881,27 +766,44 @@ CONFIG_FB_SM501=y
881# 766#
882# CONFIG_VGA_CONSOLE is not set 767# CONFIG_VGA_CONSOLE is not set
883CONFIG_DUMMY_CONSOLE=y 768CONFIG_DUMMY_CONSOLE=y
884# CONFIG_FRAMEBUFFER_CONSOLE is not set 769CONFIG_FRAMEBUFFER_CONSOLE=y
885 770# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
886# 771# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
887# Logo configuration 772CONFIG_FONTS=y
888# 773CONFIG_FONT_8x8=y
774CONFIG_FONT_8x16=y
775# CONFIG_FONT_6x11 is not set
776# CONFIG_FONT_7x14 is not set
777# CONFIG_FONT_PEARL_8x8 is not set
778# CONFIG_FONT_ACORN_8x8 is not set
779# CONFIG_FONT_MINI_4x6 is not set
780# CONFIG_FONT_SUN8x16 is not set
781# CONFIG_FONT_SUN12x22 is not set
782# CONFIG_FONT_10x18 is not set
889# CONFIG_LOGO is not set 783# CONFIG_LOGO is not set
890 784
891# 785#
892# Sound 786# Sound
893# 787#
894# CONFIG_SOUND is not set 788# CONFIG_SOUND is not set
789CONFIG_HID_SUPPORT=y
790CONFIG_HID=y
791# CONFIG_HID_DEBUG is not set
895 792
896# 793#
897# HID Devices 794# USB Input Devices
898# 795#
899CONFIG_HID=y 796CONFIG_USB_HID=m
900# CONFIG_HID_DEBUG is not set 797# CONFIG_USB_HIDINPUT_POWERBOOK is not set
798# CONFIG_HID_FF is not set
799# CONFIG_USB_HIDDEV is not set
901 800
902# 801#
903# USB support 802# USB HID Boot Protocol drivers
904# 803#
804# CONFIG_USB_KBD is not set
805# CONFIG_USB_MOUSE is not set
806CONFIG_USB_SUPPORT=y
905CONFIG_USB_ARCH_HAS_HCD=y 807CONFIG_USB_ARCH_HAS_HCD=y
906CONFIG_USB_ARCH_HAS_OHCI=y 808CONFIG_USB_ARCH_HAS_OHCI=y
907CONFIG_USB_ARCH_HAS_EHCI=y 809CONFIG_USB_ARCH_HAS_EHCI=y
@@ -912,8 +814,8 @@ CONFIG_USB=m
912# Miscellaneous USB options 814# Miscellaneous USB options
913# 815#
914# CONFIG_USB_DEVICEFS is not set 816# CONFIG_USB_DEVICEFS is not set
817CONFIG_USB_DEVICE_CLASS=y
915# CONFIG_USB_DYNAMIC_MINORS is not set 818# CONFIG_USB_DYNAMIC_MINORS is not set
916# CONFIG_USB_SUSPEND is not set
917# CONFIG_USB_OTG is not set 819# CONFIG_USB_OTG is not set
918 820
919# 821#
@@ -923,7 +825,6 @@ CONFIG_USB_EHCI_HCD=m
923# CONFIG_USB_EHCI_SPLIT_ISO is not set 825# CONFIG_USB_EHCI_SPLIT_ISO is not set
924# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 826# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
925# CONFIG_USB_EHCI_TT_NEWSCHED is not set 827# CONFIG_USB_EHCI_TT_NEWSCHED is not set
926# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
927# CONFIG_USB_ISP116X_HCD is not set 828# CONFIG_USB_ISP116X_HCD is not set
928CONFIG_USB_OHCI_HCD=m 829CONFIG_USB_OHCI_HCD=m
929# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 830# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -931,6 +832,7 @@ CONFIG_USB_OHCI_HCD=m
931CONFIG_USB_OHCI_LITTLE_ENDIAN=y 832CONFIG_USB_OHCI_LITTLE_ENDIAN=y
932# CONFIG_USB_UHCI_HCD is not set 833# CONFIG_USB_UHCI_HCD is not set
933# CONFIG_USB_SL811_HCD is not set 834# CONFIG_USB_SL811_HCD is not set
835# CONFIG_USB_R8A66597_HCD is not set
934 836
935# 837#
936# USB Device Class drivers 838# USB Device Class drivers
@@ -959,47 +861,10 @@ CONFIG_USB_STORAGE=m
959# CONFIG_USB_LIBUSUAL is not set 861# CONFIG_USB_LIBUSUAL is not set
960 862
961# 863#
962# USB Input Devices
963#
964CONFIG_USB_HID=m
965# CONFIG_USB_HIDINPUT_POWERBOOK is not set
966# CONFIG_HID_FF is not set
967# CONFIG_USB_HIDDEV is not set
968
969#
970# USB HID Boot Protocol drivers
971#
972# CONFIG_USB_KBD is not set
973# CONFIG_USB_MOUSE is not set
974# CONFIG_USB_AIPTEK is not set
975# CONFIG_USB_WACOM is not set
976# CONFIG_USB_ACECAD is not set
977# CONFIG_USB_KBTAB is not set
978# CONFIG_USB_POWERMATE is not set
979# CONFIG_USB_TOUCHSCREEN is not set
980# CONFIG_USB_YEALINK is not set
981# CONFIG_USB_XPAD is not set
982# CONFIG_USB_ATI_REMOTE is not set
983# CONFIG_USB_ATI_REMOTE2 is not set
984# CONFIG_USB_KEYSPAN_REMOTE is not set
985# CONFIG_USB_APPLETOUCH is not set
986# CONFIG_USB_GTCO is not set
987
988#
989# USB Imaging devices 864# USB Imaging devices
990# 865#
991# CONFIG_USB_MDC800 is not set 866# CONFIG_USB_MDC800 is not set
992# CONFIG_USB_MICROTEK is not set 867# CONFIG_USB_MICROTEK is not set
993
994#
995# USB Network Adapters
996#
997# CONFIG_USB_CATC is not set
998# CONFIG_USB_KAWETH is not set
999# CONFIG_USB_PEGASUS is not set
1000# CONFIG_USB_RTL8150 is not set
1001# CONFIG_USB_USBNET_MII is not set
1002# CONFIG_USB_USBNET is not set
1003CONFIG_USB_MON=y 868CONFIG_USB_MON=y
1004 869
1005# 870#
@@ -1032,6 +897,7 @@ CONFIG_USB_MON=y
1032# CONFIG_USB_SISUSBVGA is not set 897# CONFIG_USB_SISUSBVGA is not set
1033# CONFIG_USB_LD is not set 898# CONFIG_USB_LD is not set
1034# CONFIG_USB_TRANCEVIBRATOR is not set 899# CONFIG_USB_TRANCEVIBRATOR is not set
900# CONFIG_USB_IOWARRIOR is not set
1035 901
1036# 902#
1037# USB DSL modem support 903# USB DSL modem support
@@ -1041,37 +907,9 @@ CONFIG_USB_MON=y
1041# USB Gadget Support 907# USB Gadget Support
1042# 908#
1043# CONFIG_USB_GADGET is not set 909# CONFIG_USB_GADGET is not set
1044
1045#
1046# MMC/SD Card support
1047#
1048# CONFIG_MMC is not set 910# CONFIG_MMC is not set
1049
1050#
1051# LED devices
1052#
1053# CONFIG_NEW_LEDS is not set 911# CONFIG_NEW_LEDS is not set
1054
1055#
1056# LED drivers
1057#
1058
1059#
1060# LED Triggers
1061#
1062
1063#
1064# InfiniBand support
1065#
1066# CONFIG_INFINIBAND is not set 912# CONFIG_INFINIBAND is not set
1067
1068#
1069# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1070#
1071
1072#
1073# Real Time Clock
1074#
1075# CONFIG_RTC_CLASS is not set 913# CONFIG_RTC_CLASS is not set
1076 914
1077# 915#
@@ -1088,12 +926,9 @@ CONFIG_USB_MON=y
1088# 926#
1089 927
1090# 928#
1091# Auxiliary Display support 929# Userspace I/O
1092#
1093
1094#
1095# Virtualization
1096# 930#
931# CONFIG_UIO is not set
1097 932
1098# 933#
1099# File systems 934# File systems
@@ -1111,7 +946,7 @@ CONFIG_JBD=y
1111CONFIG_FS_MBCACHE=y 946CONFIG_FS_MBCACHE=y
1112# CONFIG_REISERFS_FS is not set 947# CONFIG_REISERFS_FS is not set
1113# CONFIG_JFS_FS is not set 948# CONFIG_JFS_FS is not set
1114# CONFIG_FS_POSIX_ACL is not set 949CONFIG_FS_POSIX_ACL=y
1115CONFIG_XFS_FS=y 950CONFIG_XFS_FS=y
1116CONFIG_XFS_QUOTA=y 951CONFIG_XFS_QUOTA=y
1117# CONFIG_XFS_SECURITY is not set 952# CONFIG_XFS_SECURITY is not set
@@ -1125,10 +960,11 @@ CONFIG_INOTIFY=y
1125CONFIG_INOTIFY_USER=y 960CONFIG_INOTIFY_USER=y
1126# CONFIG_QUOTA is not set 961# CONFIG_QUOTA is not set
1127CONFIG_QUOTACTL=y 962CONFIG_QUOTACTL=y
1128# CONFIG_DNOTIFY is not set 963CONFIG_DNOTIFY=y
1129# CONFIG_AUTOFS_FS is not set 964# CONFIG_AUTOFS_FS is not set
1130CONFIG_AUTOFS4_FS=y 965CONFIG_AUTOFS4_FS=y
1131# CONFIG_FUSE_FS is not set 966# CONFIG_FUSE_FS is not set
967CONFIG_GENERIC_ACL=y
1132 968
1133# 969#
1134# CD-ROM/DVD Filesystems 970# CD-ROM/DVD Filesystems
@@ -1151,10 +987,10 @@ CONFIG_PROC_KCORE=y
1151CONFIG_PROC_SYSCTL=y 987CONFIG_PROC_SYSCTL=y
1152CONFIG_SYSFS=y 988CONFIG_SYSFS=y
1153CONFIG_TMPFS=y 989CONFIG_TMPFS=y
1154# CONFIG_TMPFS_POSIX_ACL is not set 990CONFIG_TMPFS_POSIX_ACL=y
1155# CONFIG_HUGETLB_PAGE is not set 991# CONFIG_HUGETLB_PAGE is not set
1156CONFIG_RAMFS=y 992CONFIG_RAMFS=y
1157CONFIG_CONFIGFS_FS=m 993# CONFIG_CONFIGFS_FS is not set
1158 994
1159# 995#
1160# Miscellaneous filesystems 996# Miscellaneous filesystems
@@ -1181,12 +1017,18 @@ CONFIG_NFS_V3=y
1181# CONFIG_NFS_V3_ACL is not set 1017# CONFIG_NFS_V3_ACL is not set
1182# CONFIG_NFS_V4 is not set 1018# CONFIG_NFS_V4 is not set
1183# CONFIG_NFS_DIRECTIO is not set 1019# CONFIG_NFS_DIRECTIO is not set
1184# CONFIG_NFSD is not set 1020CONFIG_NFSD=m
1021CONFIG_NFSD_V3=y
1022# CONFIG_NFSD_V3_ACL is not set
1023# CONFIG_NFSD_V4 is not set
1024CONFIG_NFSD_TCP=y
1185CONFIG_ROOT_NFS=y 1025CONFIG_ROOT_NFS=y
1186CONFIG_LOCKD=y 1026CONFIG_LOCKD=y
1187CONFIG_LOCKD_V4=y 1027CONFIG_LOCKD_V4=y
1028CONFIG_EXPORTFS=m
1188CONFIG_NFS_COMMON=y 1029CONFIG_NFS_COMMON=y
1189CONFIG_SUNRPC=y 1030CONFIG_SUNRPC=y
1031# CONFIG_SUNRPC_BIND34 is not set
1190# CONFIG_RPCSEC_GSS_KRB5 is not set 1032# CONFIG_RPCSEC_GSS_KRB5 is not set
1191# CONFIG_RPCSEC_GSS_SPKM3 is not set 1033# CONFIG_RPCSEC_GSS_SPKM3 is not set
1192# CONFIG_SMB_FS is not set 1034# CONFIG_SMB_FS is not set
@@ -1194,7 +1036,6 @@ CONFIG_SUNRPC=y
1194# CONFIG_NCP_FS is not set 1036# CONFIG_NCP_FS is not set
1195# CONFIG_CODA_FS is not set 1037# CONFIG_CODA_FS is not set
1196# CONFIG_AFS_FS is not set 1038# CONFIG_AFS_FS is not set
1197# CONFIG_9P_FS is not set
1198 1039
1199# 1040#
1200# Partition Types 1041# Partition Types
@@ -1210,10 +1051,7 @@ CONFIG_MSDOS_PARTITION=y
1210# 1051#
1211# Distributed Lock Manager 1052# Distributed Lock Manager
1212# 1053#
1213CONFIG_DLM=m 1054# CONFIG_DLM is not set
1214CONFIG_DLM_TCP=y
1215# CONFIG_DLM_SCTP is not set
1216# CONFIG_DLM_DEBUG is not set
1217 1055
1218# 1056#
1219# Profiling support 1057# Profiling support
@@ -1231,7 +1069,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1231# CONFIG_DEBUG_FS is not set 1069# CONFIG_DEBUG_FS is not set
1232# CONFIG_HEADERS_CHECK is not set 1070# CONFIG_HEADERS_CHECK is not set
1233# CONFIG_DEBUG_KERNEL is not set 1071# CONFIG_DEBUG_KERNEL is not set
1234CONFIG_LOG_BUF_SHIFT=14
1235CONFIG_CROSSCOMPILE=y 1072CONFIG_CROSSCOMPILE=y
1236CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs" 1073CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
1237 1074
@@ -1240,63 +1077,20 @@ CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
1240# 1077#
1241# CONFIG_KEYS is not set 1078# CONFIG_KEYS is not set
1242# CONFIG_SECURITY is not set 1079# CONFIG_SECURITY is not set
1243 1080# CONFIG_CRYPTO is not set
1244#
1245# Cryptographic options
1246#
1247CONFIG_CRYPTO=y
1248CONFIG_CRYPTO_ALGAPI=y
1249CONFIG_CRYPTO_BLKCIPHER=m
1250CONFIG_CRYPTO_HASH=m
1251CONFIG_CRYPTO_MANAGER=m
1252CONFIG_CRYPTO_HMAC=m
1253CONFIG_CRYPTO_XCBC=m
1254CONFIG_CRYPTO_NULL=m
1255CONFIG_CRYPTO_MD4=m
1256CONFIG_CRYPTO_MD5=y
1257CONFIG_CRYPTO_SHA1=m
1258CONFIG_CRYPTO_SHA256=m
1259CONFIG_CRYPTO_SHA512=m
1260CONFIG_CRYPTO_WP512=m
1261CONFIG_CRYPTO_TGR192=m
1262CONFIG_CRYPTO_GF128MUL=m
1263CONFIG_CRYPTO_ECB=m
1264CONFIG_CRYPTO_CBC=m
1265CONFIG_CRYPTO_PCBC=m
1266CONFIG_CRYPTO_LRW=m
1267CONFIG_CRYPTO_DES=m
1268CONFIG_CRYPTO_FCRYPT=m
1269CONFIG_CRYPTO_BLOWFISH=m
1270CONFIG_CRYPTO_TWOFISH=m
1271CONFIG_CRYPTO_TWOFISH_COMMON=m
1272CONFIG_CRYPTO_SERPENT=m
1273CONFIG_CRYPTO_AES=m
1274CONFIG_CRYPTO_CAST5=m
1275CONFIG_CRYPTO_CAST6=m
1276CONFIG_CRYPTO_TEA=m
1277CONFIG_CRYPTO_ARC4=m
1278CONFIG_CRYPTO_KHAZAD=m
1279CONFIG_CRYPTO_ANUBIS=m
1280CONFIG_CRYPTO_DEFLATE=m
1281CONFIG_CRYPTO_MICHAEL_MIC=m
1282CONFIG_CRYPTO_CRC32C=m
1283CONFIG_CRYPTO_CAMELLIA=m
1284# CONFIG_CRYPTO_TEST is not set
1285
1286#
1287# Hardware crypto devices
1288#
1289 1081
1290# 1082#
1291# Library routines 1083# Library routines
1292# 1084#
1293CONFIG_BITREVERSE=y 1085CONFIG_BITREVERSE=y
1294# CONFIG_CRC_CCITT is not set 1086CONFIG_CRC_CCITT=y
1295# CONFIG_CRC16 is not set 1087# CONFIG_CRC16 is not set
1088# CONFIG_CRC_ITU_T is not set
1296CONFIG_CRC32=y 1089CONFIG_CRC32=y
1297CONFIG_LIBCRC32C=m 1090# CONFIG_CRC7 is not set
1091# CONFIG_LIBCRC32C is not set
1298CONFIG_ZLIB_INFLATE=m 1092CONFIG_ZLIB_INFLATE=m
1299CONFIG_ZLIB_DEFLATE=m
1300CONFIG_PLIST=y 1093CONFIG_PLIST=y
1301CONFIG_HAS_IOMEM=y 1094CONFIG_HAS_IOMEM=y
1302CONFIG_HAS_IOPORT=y 1095CONFIG_HAS_IOPORT=y
1096CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig
index db6fd4f157..b52256ca0b 100644
--- a/arch/mips/configs/workpad_defconfig
+++ b/arch/mips/configs/workpad_defconfig
@@ -1,60 +1,47 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20 3# Linux kernel version: 2.6.23-rc2
4# Tue Feb 20 21:47:42 2007 4# Thu Aug 9 14:33:57 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
16# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 17# CONFIG_MIPS_ATLAS is not set
30# CONFIG_MIPS_MALTA is not set 18# CONFIG_MIPS_MALTA is not set
31# CONFIG_MIPS_SEAD is not set 19# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 21# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 22CONFIG_MACH_VR41XX=y
36# CONFIG_PNX8550_JBS is not set 23# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 24# CONFIG_PNX8550_STB810 is not set
38CONFIG_MACH_VR41XX=y 25# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 26# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_QEMU is not set 27# CONFIG_QEMU is not set
41# CONFIG_MARKEINS is not set
42# CONFIG_SGI_IP22 is not set 28# CONFIG_SGI_IP22 is not set
43# CONFIG_SGI_IP27 is not set 29# CONFIG_SGI_IP27 is not set
44# CONFIG_SGI_IP32 is not set 30# CONFIG_SGI_IP32 is not set
45# CONFIG_SIBYTE_BIGSUR is not set 31# CONFIG_SIBYTE_CRHINE is not set
32# CONFIG_SIBYTE_CARMEL is not set
33# CONFIG_SIBYTE_CRHONE is not set
34# CONFIG_SIBYTE_RHONE is not set
46# CONFIG_SIBYTE_SWARM is not set 35# CONFIG_SIBYTE_SWARM is not set
36# CONFIG_SIBYTE_LITTLESUR is not set
47# CONFIG_SIBYTE_SENTOSA is not set 37# CONFIG_SIBYTE_SENTOSA is not set
48# CONFIG_SIBYTE_RHONE is not set
49# CONFIG_SIBYTE_CARMEL is not set
50# CONFIG_SIBYTE_PTSWARM is not set 38# CONFIG_SIBYTE_PTSWARM is not set
51# CONFIG_SIBYTE_LITTLESUR is not set 39# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_CRHINE is not set
53# CONFIG_SIBYTE_CRHONE is not set
54# CONFIG_SNI_RM is not set 40# CONFIG_SNI_RM is not set
55# CONFIG_TOSHIBA_JMR3927 is not set 41# CONFIG_TOSHIBA_JMR3927 is not set
56# CONFIG_TOSHIBA_RBTX4927 is not set 42# CONFIG_TOSHIBA_RBTX4927 is not set
57# CONFIG_TOSHIBA_RBTX4938 is not set 43# CONFIG_TOSHIBA_RBTX4938 is not set
44# CONFIG_WR_PPMC is not set
58# CONFIG_CASIO_E55 is not set 45# CONFIG_CASIO_E55 is not set
59CONFIG_IBM_WORKPAD=y 46CONFIG_IBM_WORKPAD=y
60# CONFIG_NEC_CMBVR4133 is not set 47# CONFIG_NEC_CMBVR4133 is not set
@@ -72,6 +59,8 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
72CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 59CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
73CONFIG_DMA_NONCOHERENT=y 60CONFIG_DMA_NONCOHERENT=y
74CONFIG_DMA_NEED_PCI_MAP_STATE=y 61CONFIG_DMA_NEED_PCI_MAP_STATE=y
62# CONFIG_HOTPLUG_CPU is not set
63# CONFIG_NO_IOPORT is not set
75# CONFIG_CPU_BIG_ENDIAN is not set 64# CONFIG_CPU_BIG_ENDIAN is not set
76CONFIG_CPU_LITTLE_ENDIAN=y 65CONFIG_CPU_LITTLE_ENDIAN=y
77CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 66CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
@@ -81,6 +70,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
81# 70#
82# CPU selection 71# CPU selection
83# 72#
73# CONFIG_CPU_LOONGSON2 is not set
84# CONFIG_CPU_MIPS32_R1 is not set 74# CONFIG_CPU_MIPS32_R1 is not set
85# CONFIG_CPU_MIPS32_R2 is not set 75# CONFIG_CPU_MIPS32_R2 is not set
86# CONFIG_CPU_MIPS64_R1 is not set 76# CONFIG_CPU_MIPS64_R1 is not set
@@ -102,7 +92,6 @@ CONFIG_CPU_VR41XX=y
102# CONFIG_CPU_SB1 is not set 92# CONFIG_CPU_SB1 is not set
103CONFIG_SYS_HAS_CPU_VR41XX=y 93CONFIG_SYS_HAS_CPU_VR41XX=y
104CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 94CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
105CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
106CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 95CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
107CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 96CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
108 97
@@ -118,7 +107,6 @@ CONFIG_PAGE_SIZE_4KB=y
118CONFIG_MIPS_MT_DISABLED=y 107CONFIG_MIPS_MT_DISABLED=y
119# CONFIG_MIPS_MT_SMP is not set 108# CONFIG_MIPS_MT_SMP is not set
120# CONFIG_MIPS_MT_SMTC is not set 109# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_VPE_LOADER is not set
122CONFIG_CPU_HAS_SYNC=y 110CONFIG_CPU_HAS_SYNC=y
123CONFIG_GENERIC_HARDIRQS=y 111CONFIG_GENERIC_HARDIRQS=y
124CONFIG_GENERIC_IRQ_PROBE=y 112CONFIG_GENERIC_IRQ_PROBE=y
@@ -132,48 +120,47 @@ CONFIG_FLAT_NODE_MEM_MAP=y
132# CONFIG_SPARSEMEM_STATIC is not set 120# CONFIG_SPARSEMEM_STATIC is not set
133CONFIG_SPLIT_PTLOCK_CPUS=4 121CONFIG_SPLIT_PTLOCK_CPUS=4
134# CONFIG_RESOURCES_64BIT is not set 122# CONFIG_RESOURCES_64BIT is not set
135CONFIG_ZONE_DMA_FLAG=1 123CONFIG_ZONE_DMA_FLAG=0
124CONFIG_VIRT_TO_BUS=y
136# CONFIG_HZ_48 is not set 125# CONFIG_HZ_48 is not set
137# CONFIG_HZ_100 is not set 126# CONFIG_HZ_100 is not set
138# CONFIG_HZ_128 is not set 127# CONFIG_HZ_128 is not set
139# CONFIG_HZ_250 is not set 128CONFIG_HZ_250=y
140# CONFIG_HZ_256 is not set 129# CONFIG_HZ_256 is not set
141CONFIG_HZ_1000=y 130# CONFIG_HZ_1000 is not set
142# CONFIG_HZ_1024 is not set 131# CONFIG_HZ_1024 is not set
143CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 132CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
144CONFIG_HZ=1000 133CONFIG_HZ=250
145CONFIG_PREEMPT_NONE=y 134CONFIG_PREEMPT_NONE=y
146# CONFIG_PREEMPT_VOLUNTARY is not set 135# CONFIG_PREEMPT_VOLUNTARY is not set
147# CONFIG_PREEMPT is not set 136# CONFIG_PREEMPT is not set
148# CONFIG_KEXEC is not set 137# CONFIG_KEXEC is not set
138CONFIG_SECCOMP=y
149CONFIG_LOCKDEP_SUPPORT=y 139CONFIG_LOCKDEP_SUPPORT=y
150CONFIG_STACKTRACE_SUPPORT=y 140CONFIG_STACKTRACE_SUPPORT=y
151CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 141CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
152 142
153# 143#
154# Code maturity level options 144# General setup
155# 145#
156CONFIG_EXPERIMENTAL=y 146CONFIG_EXPERIMENTAL=y
157CONFIG_BROKEN_ON_SMP=y 147CONFIG_BROKEN_ON_SMP=y
158CONFIG_INIT_ENV_ARG_LIMIT=32 148CONFIG_INIT_ENV_ARG_LIMIT=32
159
160#
161# General setup
162#
163CONFIG_LOCALVERSION="" 149CONFIG_LOCALVERSION=""
164CONFIG_LOCALVERSION_AUTO=y 150CONFIG_LOCALVERSION_AUTO=y
165CONFIG_SWAP=y 151CONFIG_SWAP=y
166CONFIG_SYSVIPC=y 152CONFIG_SYSVIPC=y
167# CONFIG_IPC_NS is not set
168CONFIG_SYSVIPC_SYSCTL=y 153CONFIG_SYSVIPC_SYSCTL=y
169# CONFIG_POSIX_MQUEUE is not set 154# CONFIG_POSIX_MQUEUE is not set
170# CONFIG_BSD_PROCESS_ACCT is not set 155# CONFIG_BSD_PROCESS_ACCT is not set
171# CONFIG_TASKSTATS is not set 156# CONFIG_TASKSTATS is not set
172# CONFIG_UTS_NS is not set 157# CONFIG_USER_NS is not set
173# CONFIG_AUDIT is not set 158# CONFIG_AUDIT is not set
174# CONFIG_IKCONFIG is not set 159# CONFIG_IKCONFIG is not set
160CONFIG_LOG_BUF_SHIFT=14
175CONFIG_SYSFS_DEPRECATED=y 161CONFIG_SYSFS_DEPRECATED=y
176# CONFIG_RELAY is not set 162# CONFIG_RELAY is not set
163# CONFIG_BLK_DEV_INITRD is not set
177# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 164# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
178CONFIG_SYSCTL=y 165CONFIG_SYSCTL=y
179CONFIG_EMBEDDED=y 166CONFIG_EMBEDDED=y
@@ -186,32 +173,30 @@ CONFIG_BUG=y
186CONFIG_ELF_CORE=y 173CONFIG_ELF_CORE=y
187CONFIG_BASE_FULL=y 174CONFIG_BASE_FULL=y
188CONFIG_FUTEX=y 175CONFIG_FUTEX=y
176CONFIG_ANON_INODES=y
189CONFIG_EPOLL=y 177CONFIG_EPOLL=y
178CONFIG_SIGNALFD=y
179CONFIG_TIMERFD=y
180CONFIG_EVENTFD=y
190CONFIG_SHMEM=y 181CONFIG_SHMEM=y
191CONFIG_SLAB=y
192CONFIG_VM_EVENT_COUNTERS=y 182CONFIG_VM_EVENT_COUNTERS=y
183CONFIG_SLAB=y
184# CONFIG_SLUB is not set
185# CONFIG_SLOB is not set
193CONFIG_RT_MUTEXES=y 186CONFIG_RT_MUTEXES=y
194# CONFIG_TINY_SHMEM is not set 187# CONFIG_TINY_SHMEM is not set
195CONFIG_BASE_SMALL=0 188CONFIG_BASE_SMALL=0
196# CONFIG_SLOB is not set
197
198#
199# Loadable module support
200#
201CONFIG_MODULES=y 189CONFIG_MODULES=y
202CONFIG_MODULE_UNLOAD=y 190CONFIG_MODULE_UNLOAD=y
203# CONFIG_MODULE_FORCE_UNLOAD is not set 191CONFIG_MODULE_FORCE_UNLOAD=y
204CONFIG_MODVERSIONS=y 192CONFIG_MODVERSIONS=y
205CONFIG_MODULE_SRCVERSION_ALL=y 193CONFIG_MODULE_SRCVERSION_ALL=y
206CONFIG_KMOD=y 194CONFIG_KMOD=y
207
208#
209# Block layer
210#
211CONFIG_BLOCK=y 195CONFIG_BLOCK=y
212# CONFIG_LBD is not set 196# CONFIG_LBD is not set
213# CONFIG_BLK_DEV_IO_TRACE is not set 197# CONFIG_BLK_DEV_IO_TRACE is not set
214# CONFIG_LSF is not set 198# CONFIG_LSF is not set
199# CONFIG_BLK_DEV_BSG is not set
215 200
216# 201#
217# IO Schedulers 202# IO Schedulers
@@ -229,6 +214,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
229# 214#
230# Bus options (PCI, PCMCIA, EISA, ISA, TC) 215# Bus options (PCI, PCMCIA, EISA, ISA, TC)
231# 216#
217# CONFIG_ARCH_SUPPORTS_MSI is not set
232CONFIG_ISA=y 218CONFIG_ISA=y
233CONFIG_MMU=y 219CONFIG_MMU=y
234 220
@@ -250,10 +236,6 @@ CONFIG_PCMCIA_PROBE=y
250CONFIG_PCMCIA_VRC4171=y 236CONFIG_PCMCIA_VRC4171=y
251 237
252# 238#
253# PCI Hotplug Support
254#
255
256#
257# Executable file formats 239# Executable file formats
258# 240#
259CONFIG_BINFMT_ELF=y 241CONFIG_BINFMT_ELF=y
@@ -263,10 +245,7 @@ CONFIG_TRAD_SIGNALS=y
263# 245#
264# Power management options 246# Power management options
265# 247#
266CONFIG_PM=y 248# CONFIG_PM is not set
267# CONFIG_PM_LEGACY is not set
268# CONFIG_PM_DEBUG is not set
269# CONFIG_PM_SYSFS_DEPRECATED is not set
270 249
271# 250#
272# Networking 251# Networking
@@ -276,7 +255,6 @@ CONFIG_NET=y
276# 255#
277# Networking options 256# Networking options
278# 257#
279# CONFIG_NETDEBUG is not set
280CONFIG_PACKET=y 258CONFIG_PACKET=y
281CONFIG_PACKET_MMAP=y 259CONFIG_PACKET_MMAP=y
282CONFIG_UNIX=y 260CONFIG_UNIX=y
@@ -301,34 +279,25 @@ CONFIG_IP_FIB_HASH=y
301# CONFIG_INET_IPCOMP is not set 279# CONFIG_INET_IPCOMP is not set
302# CONFIG_INET_XFRM_TUNNEL is not set 280# CONFIG_INET_XFRM_TUNNEL is not set
303# CONFIG_INET_TUNNEL is not set 281# CONFIG_INET_TUNNEL is not set
304CONFIG_INET_XFRM_MODE_TRANSPORT=m 282# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
305CONFIG_INET_XFRM_MODE_TUNNEL=m 283# CONFIG_INET_XFRM_MODE_TUNNEL is not set
306CONFIG_INET_XFRM_MODE_BEET=m 284# CONFIG_INET_XFRM_MODE_BEET is not set
307CONFIG_INET_DIAG=y 285CONFIG_INET_DIAG=y
308CONFIG_INET_TCP_DIAG=y 286CONFIG_INET_TCP_DIAG=y
309# CONFIG_TCP_CONG_ADVANCED is not set 287# CONFIG_TCP_CONG_ADVANCED is not set
310CONFIG_TCP_CONG_CUBIC=y 288CONFIG_TCP_CONG_CUBIC=y
311CONFIG_DEFAULT_TCP_CONG="cubic" 289CONFIG_DEFAULT_TCP_CONG="cubic"
312CONFIG_TCP_MD5SIG=y 290# CONFIG_TCP_MD5SIG is not set
313# CONFIG_IPV6 is not set 291# CONFIG_IPV6 is not set
314# CONFIG_INET6_XFRM_TUNNEL is not set 292# CONFIG_INET6_XFRM_TUNNEL is not set
315# CONFIG_INET6_TUNNEL is not set 293# CONFIG_INET6_TUNNEL is not set
316CONFIG_NETWORK_SECMARK=y 294CONFIG_NETWORK_SECMARK=y
317# CONFIG_NETFILTER is not set 295# CONFIG_NETFILTER is not set
318
319#
320# DCCP Configuration (EXPERIMENTAL)
321#
322# CONFIG_IP_DCCP is not set 296# CONFIG_IP_DCCP is not set
323
324#
325# SCTP Configuration (EXPERIMENTAL)
326#
327# CONFIG_IP_SCTP is not set 297# CONFIG_IP_SCTP is not set
328 298# CONFIG_SCTP_HMAC_NONE is not set
329# 299# CONFIG_SCTP_HMAC_SHA1 is not set
330# TIPC Configuration (EXPERIMENTAL) 300# CONFIG_SCTP_HMAC_MD5 is not set
331#
332# CONFIG_TIPC is not set 301# CONFIG_TIPC is not set
333# CONFIG_ATM is not set 302# CONFIG_ATM is not set
334# CONFIG_BRIDGE is not set 303# CONFIG_BRIDGE is not set
@@ -354,8 +323,17 @@ CONFIG_NETWORK_SECMARK=y
354# CONFIG_HAMRADIO is not set 323# CONFIG_HAMRADIO is not set
355# CONFIG_IRDA is not set 324# CONFIG_IRDA is not set
356# CONFIG_BT is not set 325# CONFIG_BT is not set
357# CONFIG_IEEE80211 is not set 326# CONFIG_AF_RXRPC is not set
327
328#
329# Wireless
330#
331# CONFIG_CFG80211 is not set
358CONFIG_WIRELESS_EXT=y 332CONFIG_WIRELESS_EXT=y
333# CONFIG_MAC80211 is not set
334# CONFIG_IEEE80211 is not set
335# CONFIG_RFKILL is not set
336# CONFIG_NET_9P is not set
359 337
360# 338#
361# Device Drivers 339# Device Drivers
@@ -368,31 +346,11 @@ CONFIG_STANDALONE=y
368CONFIG_PREVENT_FIRMWARE_BUILD=y 346CONFIG_PREVENT_FIRMWARE_BUILD=y
369CONFIG_FW_LOADER=y 347CONFIG_FW_LOADER=y
370# CONFIG_SYS_HYPERVISOR is not set 348# CONFIG_SYS_HYPERVISOR is not set
371 349# CONFIG_CONNECTOR is not set
372#
373# Connector - unified userspace <-> kernelspace linker
374#
375CONFIG_CONNECTOR=m
376
377#
378# Memory Technology Devices (MTD)
379#
380# CONFIG_MTD is not set 350# CONFIG_MTD is not set
381
382#
383# Parallel port support
384#
385# CONFIG_PARPORT is not set 351# CONFIG_PARPORT is not set
386
387#
388# Plug and Play support
389#
390# CONFIG_PNP is not set 352# CONFIG_PNP is not set
391# CONFIG_PNPACPI is not set 353CONFIG_BLK_DEV=y
392
393#
394# Block devices
395#
396# CONFIG_BLK_DEV_COW_COMMON is not set 354# CONFIG_BLK_DEV_COW_COMMON is not set
397# CONFIG_BLK_DEV_LOOP is not set 355# CONFIG_BLK_DEV_LOOP is not set
398# CONFIG_BLK_DEV_NBD is not set 356# CONFIG_BLK_DEV_NBD is not set
@@ -400,17 +358,9 @@ CONFIG_BLK_DEV_RAM=m
400CONFIG_BLK_DEV_RAM_COUNT=16 358CONFIG_BLK_DEV_RAM_COUNT=16
401CONFIG_BLK_DEV_RAM_SIZE=4096 359CONFIG_BLK_DEV_RAM_SIZE=4096
402CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 360CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
403# CONFIG_BLK_DEV_INITRD is not set
404# CONFIG_CDROM_PKTCDVD is not set 361# CONFIG_CDROM_PKTCDVD is not set
405# CONFIG_ATA_OVER_ETH is not set 362# CONFIG_ATA_OVER_ETH is not set
406 363# CONFIG_MISC_DEVICES is not set
407#
408# Misc devices
409#
410
411#
412# ATA/ATAPI/MFM/RLL support
413#
414CONFIG_IDE=y 364CONFIG_IDE=y
415CONFIG_IDE_MAX_HWIFS=4 365CONFIG_IDE_MAX_HWIFS=4
416CONFIG_BLK_DEV_IDE=y 366CONFIG_BLK_DEV_IDE=y
@@ -426,15 +376,16 @@ CONFIG_BLK_DEV_IDECS=m
426# CONFIG_BLK_DEV_IDETAPE is not set 376# CONFIG_BLK_DEV_IDETAPE is not set
427# CONFIG_BLK_DEV_IDEFLOPPY is not set 377# CONFIG_BLK_DEV_IDEFLOPPY is not set
428# CONFIG_IDE_TASK_IOCTL is not set 378# CONFIG_IDE_TASK_IOCTL is not set
379CONFIG_IDE_PROC_FS=y
429 380
430# 381#
431# IDE chipset support/bugfixes 382# IDE chipset support/bugfixes
432# 383#
433CONFIG_IDE_GENERIC=y 384CONFIG_IDE_GENERIC=y
385# CONFIG_IDEPCI_PCIBUS_ORDER is not set
434# CONFIG_IDE_ARM is not set 386# CONFIG_IDE_ARM is not set
435# CONFIG_IDE_CHIPSETS is not set 387# CONFIG_IDE_CHIPSETS is not set
436# CONFIG_BLK_DEV_IDEDMA is not set 388# CONFIG_BLK_DEV_IDEDMA is not set
437# CONFIG_IDEDMA_AUTO is not set
438# CONFIG_BLK_DEV_HD is not set 389# CONFIG_BLK_DEV_HD is not set
439 390
440# 391#
@@ -442,135 +393,38 @@ CONFIG_IDE_GENERIC=y
442# 393#
443# CONFIG_RAID_ATTRS is not set 394# CONFIG_RAID_ATTRS is not set
444# CONFIG_SCSI is not set 395# CONFIG_SCSI is not set
396# CONFIG_SCSI_DMA is not set
445# CONFIG_SCSI_NETLINK is not set 397# CONFIG_SCSI_NETLINK is not set
446
447#
448# Serial ATA (prod) and Parallel ATA (experimental) drivers
449#
450# CONFIG_ATA is not set 398# CONFIG_ATA is not set
451
452#
453# Old CD-ROM drivers (not SCSI, not IDE)
454#
455# CONFIG_CD_NO_IDESCSI is not set
456
457#
458# Multi-device support (RAID and LVM)
459#
460# CONFIG_MD is not set 399# CONFIG_MD is not set
461
462#
463# Fusion MPT device support
464#
465# CONFIG_FUSION is not set
466
467#
468# IEEE 1394 (FireWire) support
469#
470
471#
472# I2O device support
473#
474
475#
476# Network device support
477#
478CONFIG_NETDEVICES=y 400CONFIG_NETDEVICES=y
401# CONFIG_NETDEVICES_MULTIQUEUE is not set
479# CONFIG_DUMMY is not set 402# CONFIG_DUMMY is not set
480# CONFIG_BONDING is not set 403# CONFIG_BONDING is not set
404# CONFIG_MACVLAN is not set
481# CONFIG_EQUALIZER is not set 405# CONFIG_EQUALIZER is not set
482# CONFIG_TUN is not set 406# CONFIG_TUN is not set
483
484#
485# ARCnet devices
486#
487# CONFIG_ARCNET is not set 407# CONFIG_ARCNET is not set
488 408# CONFIG_NET_ETHERNET is not set
489#
490# PHY device support
491#
492CONFIG_PHYLIB=m
493
494#
495# MII PHY device drivers
496#
497CONFIG_MARVELL_PHY=m
498CONFIG_DAVICOM_PHY=m
499CONFIG_QSEMI_PHY=m
500CONFIG_LXT_PHY=m
501CONFIG_CICADA_PHY=m
502CONFIG_VITESSE_PHY=m
503CONFIG_SMSC_PHY=m
504# CONFIG_BROADCOM_PHY is not set
505# CONFIG_FIXED_PHY is not set
506
507#
508# Ethernet (10 or 100Mbit)
509#
510CONFIG_NET_ETHERNET=y
511CONFIG_MII=m 409CONFIG_MII=m
512# CONFIG_NET_VENDOR_3COM is not set 410# CONFIG_NETDEV_1000 is not set
513# CONFIG_NET_VENDOR_SMC is not set 411# CONFIG_NETDEV_10000 is not set
514# CONFIG_DM9000 is not set
515# CONFIG_NET_VENDOR_RACAL is not set
516# CONFIG_AT1700 is not set
517# CONFIG_DEPCA is not set
518# CONFIG_HP100 is not set
519# CONFIG_NET_ISA is not set
520# CONFIG_NET_PCI is not set
521
522#
523# Ethernet (1000 Mbit)
524#
525
526#
527# Ethernet (10000 Mbit)
528#
529
530#
531# Token Ring devices
532#
533# CONFIG_TR is not set 412# CONFIG_TR is not set
534 413
535# 414#
536# Wireless LAN (non-hamradio) 415# Wireless LAN
537#
538CONFIG_NET_RADIO=y
539# CONFIG_NET_WIRELESS_RTNETLINK is not set
540
541#
542# Obsolete Wireless cards support (pre-802.11)
543#
544# CONFIG_STRIP is not set
545# CONFIG_ARLAN is not set
546# CONFIG_WAVELAN is not set
547# CONFIG_PCMCIA_WAVELAN is not set
548# CONFIG_PCMCIA_NETWAVE is not set
549
550#
551# Wireless 802.11 Frequency Hopping cards support
552# 416#
417# CONFIG_WLAN_PRE80211 is not set
418CONFIG_WLAN_80211=y
553# CONFIG_PCMCIA_RAYCS is not set 419# CONFIG_PCMCIA_RAYCS is not set
554 420# CONFIG_LIBERTAS is not set
555#
556# Wireless 802.11b ISA/PCI cards support
557#
558CONFIG_HERMES=m 421CONFIG_HERMES=m
559# CONFIG_ATMEL is not set 422# CONFIG_ATMEL is not set
560
561#
562# Wireless 802.11b Pcmcia/Cardbus cards support
563#
564CONFIG_PCMCIA_HERMES=m 423CONFIG_PCMCIA_HERMES=m
565# CONFIG_PCMCIA_SPECTRUM is not set 424# CONFIG_PCMCIA_SPECTRUM is not set
566# CONFIG_AIRO_CS is not set 425# CONFIG_AIRO_CS is not set
567# CONFIG_PCMCIA_WL3501 is not set 426# CONFIG_PCMCIA_WL3501 is not set
568# CONFIG_HOSTAP is not set 427# CONFIG_HOSTAP is not set
569CONFIG_NET_WIRELESS=y
570
571#
572# PCMCIA network device support
573#
574CONFIG_NET_PCMCIA=y 428CONFIG_NET_PCMCIA=y
575CONFIG_PCMCIA_3C589=m 429CONFIG_PCMCIA_3C589=m
576CONFIG_PCMCIA_3C574=m 430CONFIG_PCMCIA_3C574=m
@@ -580,10 +434,6 @@ CONFIG_PCMCIA_NMCLAN=m
580CONFIG_PCMCIA_SMC91C92=m 434CONFIG_PCMCIA_SMC91C92=m
581CONFIG_PCMCIA_XIRC2PS=m 435CONFIG_PCMCIA_XIRC2PS=m
582CONFIG_PCMCIA_AXNET=m 436CONFIG_PCMCIA_AXNET=m
583
584#
585# Wan interfaces
586#
587# CONFIG_WAN is not set 437# CONFIG_WAN is not set
588# CONFIG_PPP is not set 438# CONFIG_PPP is not set
589# CONFIG_SLIP is not set 439# CONFIG_SLIP is not set
@@ -591,15 +441,7 @@ CONFIG_PCMCIA_AXNET=m
591# CONFIG_NETCONSOLE is not set 441# CONFIG_NETCONSOLE is not set
592# CONFIG_NETPOLL is not set 442# CONFIG_NETPOLL is not set
593# CONFIG_NET_POLL_CONTROLLER is not set 443# CONFIG_NET_POLL_CONTROLLER is not set
594
595#
596# ISDN subsystem
597#
598# CONFIG_ISDN is not set 444# CONFIG_ISDN is not set
599
600#
601# Telephony Support
602#
603# CONFIG_PHONE is not set 445# CONFIG_PHONE is not set
604 446
605# 447#
@@ -607,6 +449,7 @@ CONFIG_PCMCIA_AXNET=m
607# 449#
608CONFIG_INPUT=y 450CONFIG_INPUT=y
609# CONFIG_INPUT_FF_MEMLESS is not set 451# CONFIG_INPUT_FF_MEMLESS is not set
452# CONFIG_INPUT_POLLDEV is not set
610 453
611# 454#
612# Userland interfaces 455# Userland interfaces
@@ -623,6 +466,7 @@ CONFIG_INPUT=y
623# CONFIG_INPUT_KEYBOARD is not set 466# CONFIG_INPUT_KEYBOARD is not set
624# CONFIG_INPUT_MOUSE is not set 467# CONFIG_INPUT_MOUSE is not set
625# CONFIG_INPUT_JOYSTICK is not set 468# CONFIG_INPUT_JOYSTICK is not set
469# CONFIG_INPUT_TABLET is not set
626# CONFIG_INPUT_TOUCHSCREEN is not set 470# CONFIG_INPUT_TOUCHSCREEN is not set
627# CONFIG_INPUT_MISC is not set 471# CONFIG_INPUT_MISC is not set
628 472
@@ -656,19 +500,10 @@ CONFIG_SERIAL_VR41XX_CONSOLE=y
656CONFIG_UNIX98_PTYS=y 500CONFIG_UNIX98_PTYS=y
657CONFIG_LEGACY_PTYS=y 501CONFIG_LEGACY_PTYS=y
658CONFIG_LEGACY_PTY_COUNT=256 502CONFIG_LEGACY_PTY_COUNT=256
659
660#
661# IPMI
662#
663# CONFIG_IPMI_HANDLER is not set 503# CONFIG_IPMI_HANDLER is not set
664
665#
666# Watchdog Cards
667#
668# CONFIG_WATCHDOG is not set 504# CONFIG_WATCHDOG is not set
669# CONFIG_HW_RANDOM is not set 505# CONFIG_HW_RANDOM is not set
670# CONFIG_RTC is not set 506# CONFIG_RTC is not set
671# CONFIG_GEN_RTC is not set
672# CONFIG_DTLK is not set 507# CONFIG_DTLK is not set
673# CONFIG_R3964 is not set 508# CONFIG_R3964 is not set
674 509
@@ -678,17 +513,10 @@ CONFIG_LEGACY_PTY_COUNT=256
678# CONFIG_SYNCLINK_CS is not set 513# CONFIG_SYNCLINK_CS is not set
679# CONFIG_CARDMAN_4000 is not set 514# CONFIG_CARDMAN_4000 is not set
680# CONFIG_CARDMAN_4040 is not set 515# CONFIG_CARDMAN_4040 is not set
681# CONFIG_GPIO_VR41XX is not set 516CONFIG_GPIO_VR41XX=y
682# CONFIG_RAW_DRIVER is not set 517# CONFIG_RAW_DRIVER is not set
683
684#
685# TPM devices
686#
687# CONFIG_TCG_TPM is not set 518# CONFIG_TCG_TPM is not set
688 519CONFIG_DEVPORT=y
689#
690# I2C support
691#
692# CONFIG_I2C is not set 520# CONFIG_I2C is not set
693 521
694# 522#
@@ -696,32 +524,33 @@ CONFIG_LEGACY_PTY_COUNT=256
696# 524#
697# CONFIG_SPI is not set 525# CONFIG_SPI is not set
698# CONFIG_SPI_MASTER is not set 526# CONFIG_SPI_MASTER is not set
699
700#
701# Dallas's 1-wire bus
702#
703# CONFIG_W1 is not set 527# CONFIG_W1 is not set
528# CONFIG_POWER_SUPPLY is not set
529# CONFIG_HWMON is not set
704 530
705# 531#
706# Hardware Monitoring support 532# Multifunction device drivers
707# 533#
708# CONFIG_HWMON is not set 534# CONFIG_MFD_SM501 is not set
709# CONFIG_HWMON_VID is not set
710 535
711# 536#
712# Multimedia devices 537# Multimedia devices
713# 538#
714# CONFIG_VIDEO_DEV is not set 539# CONFIG_VIDEO_DEV is not set
540# CONFIG_DVB_CORE is not set
541# CONFIG_DAB is not set
715 542
716# 543#
717# Digital Video Broadcasting Devices 544# Graphics support
718# 545#
719# CONFIG_DVB is not set 546# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
720 547
721# 548#
722# Graphics support 549# Display device support
723# 550#
724# CONFIG_FIRMWARE_EDID is not set 551# CONFIG_DISPLAY_SUPPORT is not set
552# CONFIG_VGASTATE is not set
553# CONFIG_VIDEO_OUTPUT_CONTROL is not set
725# CONFIG_FB is not set 554# CONFIG_FB is not set
726 555
727# 556#
@@ -730,65 +559,51 @@ CONFIG_LEGACY_PTY_COUNT=256
730# CONFIG_VGA_CONSOLE is not set 559# CONFIG_VGA_CONSOLE is not set
731# CONFIG_MDA_CONSOLE is not set 560# CONFIG_MDA_CONSOLE is not set
732CONFIG_DUMMY_CONSOLE=y 561CONFIG_DUMMY_CONSOLE=y
733# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
734 562
735# 563#
736# Sound 564# Sound
737# 565#
738# CONFIG_SOUND is not set 566# CONFIG_SOUND is not set
739 567CONFIG_HID_SUPPORT=y
740#
741# HID Devices
742#
743CONFIG_HID=y 568CONFIG_HID=y
744# CONFIG_HID_DEBUG is not set 569# CONFIG_HID_DEBUG is not set
745 570# CONFIG_USB_SUPPORT is not set
746#
747# USB support
748#
749# CONFIG_USB_ARCH_HAS_HCD is not set
750# CONFIG_USB_ARCH_HAS_OHCI is not set
751# CONFIG_USB_ARCH_HAS_EHCI is not set
752
753#
754# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
755#
756
757#
758# USB Gadget Support
759#
760# CONFIG_USB_GADGET is not set
761
762#
763# MMC/SD Card support
764#
765# CONFIG_MMC is not set 571# CONFIG_MMC is not set
766
767#
768# LED devices
769#
770# CONFIG_NEW_LEDS is not set 572# CONFIG_NEW_LEDS is not set
573CONFIG_RTC_LIB=y
574CONFIG_RTC_CLASS=y
575CONFIG_RTC_HCTOSYS=y
576CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
577# CONFIG_RTC_DEBUG is not set
771 578
772# 579#
773# LED drivers 580# RTC interfaces
774#
775
776#
777# LED Triggers
778# 581#
582CONFIG_RTC_INTF_SYSFS=y
583CONFIG_RTC_INTF_PROC=y
584CONFIG_RTC_INTF_DEV=y
585# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
586# CONFIG_RTC_DRV_TEST is not set
779 587
780# 588#
781# InfiniBand support 589# SPI RTC drivers
782# 590#
783 591
784# 592#
785# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 593# Platform RTC drivers
786# 594#
595# CONFIG_RTC_DRV_CMOS is not set
596# CONFIG_RTC_DRV_DS1553 is not set
597# CONFIG_RTC_DRV_STK17TA8 is not set
598# CONFIG_RTC_DRV_DS1742 is not set
599# CONFIG_RTC_DRV_M48T86 is not set
600# CONFIG_RTC_DRV_M48T59 is not set
601# CONFIG_RTC_DRV_V3020 is not set
787 602
788# 603#
789# Real Time Clock 604# on-CPU RTC drivers
790# 605#
791# CONFIG_RTC_CLASS is not set 606CONFIG_RTC_DRV_VR41XX=y
792 607
793# 608#
794# DMA Engine support 609# DMA Engine support
@@ -804,23 +619,25 @@ CONFIG_HID=y
804# 619#
805 620
806# 621#
807# Auxiliary Display support 622# Userspace I/O
808#
809
810#
811# Virtualization
812# 623#
624# CONFIG_UIO is not set
813 625
814# 626#
815# File systems 627# File systems
816# 628#
817CONFIG_EXT2_FS=y 629CONFIG_EXT2_FS=y
818CONFIG_EXT2_FS_XATTR=y 630CONFIG_EXT2_FS_XATTR=y
819CONFIG_EXT2_FS_POSIX_ACL=y 631# CONFIG_EXT2_FS_POSIX_ACL is not set
820CONFIG_EXT2_FS_SECURITY=y 632# CONFIG_EXT2_FS_SECURITY is not set
821# CONFIG_EXT2_FS_XIP is not set 633# CONFIG_EXT2_FS_XIP is not set
822# CONFIG_EXT3_FS is not set 634CONFIG_EXT3_FS=y
635CONFIG_EXT3_FS_XATTR=y
636# CONFIG_EXT3_FS_POSIX_ACL is not set
637# CONFIG_EXT3_FS_SECURITY is not set
823# CONFIG_EXT4DEV_FS is not set 638# CONFIG_EXT4DEV_FS is not set
639CONFIG_JBD=y
640# CONFIG_JBD_DEBUG is not set
824CONFIG_FS_MBCACHE=y 641CONFIG_FS_MBCACHE=y
825# CONFIG_REISERFS_FS is not set 642# CONFIG_REISERFS_FS is not set
826# CONFIG_JFS_FS is not set 643# CONFIG_JFS_FS is not set
@@ -836,7 +653,7 @@ CONFIG_INOTIFY_USER=y
836CONFIG_DNOTIFY=y 653CONFIG_DNOTIFY=y
837# CONFIG_AUTOFS_FS is not set 654# CONFIG_AUTOFS_FS is not set
838CONFIG_AUTOFS4_FS=y 655CONFIG_AUTOFS4_FS=y
839CONFIG_FUSE_FS=m 656# CONFIG_FUSE_FS is not set
840CONFIG_GENERIC_ACL=y 657CONFIG_GENERIC_ACL=y
841 658
842# 659#
@@ -863,7 +680,7 @@ CONFIG_TMPFS=y
863CONFIG_TMPFS_POSIX_ACL=y 680CONFIG_TMPFS_POSIX_ACL=y
864# CONFIG_HUGETLB_PAGE is not set 681# CONFIG_HUGETLB_PAGE is not set
865CONFIG_RAMFS=y 682CONFIG_RAMFS=y
866CONFIG_CONFIGFS_FS=m 683# CONFIG_CONFIGFS_FS is not set
867 684
868# 685#
869# Miscellaneous filesystems 686# Miscellaneous filesystems
@@ -885,17 +702,22 @@ CONFIG_CONFIGFS_FS=m
885# 702#
886# Network File Systems 703# Network File Systems
887# 704#
888CONFIG_NFS_FS=y 705CONFIG_NFS_FS=m
889# CONFIG_NFS_V3 is not set 706CONFIG_NFS_V3=y
707# CONFIG_NFS_V3_ACL is not set
890# CONFIG_NFS_V4 is not set 708# CONFIG_NFS_V4 is not set
891# CONFIG_NFS_DIRECTIO is not set 709# CONFIG_NFS_DIRECTIO is not set
892CONFIG_NFSD=y 710CONFIG_NFSD=m
893# CONFIG_NFSD_V3 is not set 711CONFIG_NFSD_V3=y
712# CONFIG_NFSD_V3_ACL is not set
713# CONFIG_NFSD_V4 is not set
894# CONFIG_NFSD_TCP is not set 714# CONFIG_NFSD_TCP is not set
895CONFIG_LOCKD=y 715CONFIG_LOCKD=m
896CONFIG_EXPORTFS=y 716CONFIG_LOCKD_V4=y
717CONFIG_EXPORTFS=m
897CONFIG_NFS_COMMON=y 718CONFIG_NFS_COMMON=y
898CONFIG_SUNRPC=y 719CONFIG_SUNRPC=m
720# CONFIG_SUNRPC_BIND34 is not set
899# CONFIG_RPCSEC_GSS_KRB5 is not set 721# CONFIG_RPCSEC_GSS_KRB5 is not set
900# CONFIG_RPCSEC_GSS_SPKM3 is not set 722# CONFIG_RPCSEC_GSS_SPKM3 is not set
901# CONFIG_SMB_FS is not set 723# CONFIG_SMB_FS is not set
@@ -903,7 +725,6 @@ CONFIG_SUNRPC=y
903# CONFIG_NCP_FS is not set 725# CONFIG_NCP_FS is not set
904# CONFIG_CODA_FS is not set 726# CONFIG_CODA_FS is not set
905# CONFIG_AFS_FS is not set 727# CONFIG_AFS_FS is not set
906# CONFIG_9P_FS is not set
907 728
908# 729#
909# Partition Types 730# Partition Types
@@ -919,10 +740,7 @@ CONFIG_MSDOS_PARTITION=y
919# 740#
920# Distributed Lock Manager 741# Distributed Lock Manager
921# 742#
922CONFIG_DLM=m 743# CONFIG_DLM is not set
923CONFIG_DLM_TCP=y
924# CONFIG_DLM_SCTP is not set
925# CONFIG_DLM_DEBUG is not set
926 744
927# 745#
928# Profiling support 746# Profiling support
@@ -940,7 +758,6 @@ CONFIG_ENABLE_MUST_CHECK=y
940# CONFIG_DEBUG_FS is not set 758# CONFIG_DEBUG_FS is not set
941# CONFIG_HEADERS_CHECK is not set 759# CONFIG_HEADERS_CHECK is not set
942# CONFIG_DEBUG_KERNEL is not set 760# CONFIG_DEBUG_KERNEL is not set
943CONFIG_LOG_BUF_SHIFT=14
944CONFIG_CROSSCOMPILE=y 761CONFIG_CROSSCOMPILE=y
945CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x170,0x376,49 mem=16M" 762CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x170,0x376,49 mem=16M"
946 763
@@ -949,52 +766,7 @@ CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x170,0x376,49 mem=16M"
949# 766#
950# CONFIG_KEYS is not set 767# CONFIG_KEYS is not set
951# CONFIG_SECURITY is not set 768# CONFIG_SECURITY is not set
952 769# CONFIG_CRYPTO is not set
953#
954# Cryptographic options
955#
956CONFIG_CRYPTO=y
957CONFIG_CRYPTO_ALGAPI=y
958CONFIG_CRYPTO_BLKCIPHER=m
959CONFIG_CRYPTO_HASH=m
960CONFIG_CRYPTO_MANAGER=m
961CONFIG_CRYPTO_HMAC=m
962CONFIG_CRYPTO_XCBC=m
963CONFIG_CRYPTO_NULL=m
964CONFIG_CRYPTO_MD4=m
965CONFIG_CRYPTO_MD5=y
966CONFIG_CRYPTO_SHA1=m
967CONFIG_CRYPTO_SHA256=m
968CONFIG_CRYPTO_SHA512=m
969CONFIG_CRYPTO_WP512=m
970CONFIG_CRYPTO_TGR192=m
971CONFIG_CRYPTO_GF128MUL=m
972CONFIG_CRYPTO_ECB=m
973CONFIG_CRYPTO_CBC=m
974CONFIG_CRYPTO_PCBC=m
975CONFIG_CRYPTO_LRW=m
976CONFIG_CRYPTO_DES=m
977CONFIG_CRYPTO_FCRYPT=m
978CONFIG_CRYPTO_BLOWFISH=m
979CONFIG_CRYPTO_TWOFISH=m
980CONFIG_CRYPTO_TWOFISH_COMMON=m
981CONFIG_CRYPTO_SERPENT=m
982CONFIG_CRYPTO_AES=m
983CONFIG_CRYPTO_CAST5=m
984CONFIG_CRYPTO_CAST6=m
985CONFIG_CRYPTO_TEA=m
986CONFIG_CRYPTO_ARC4=m
987CONFIG_CRYPTO_KHAZAD=m
988CONFIG_CRYPTO_ANUBIS=m
989CONFIG_CRYPTO_DEFLATE=m
990CONFIG_CRYPTO_MICHAEL_MIC=m
991CONFIG_CRYPTO_CRC32C=m
992CONFIG_CRYPTO_CAMELLIA=m
993# CONFIG_CRYPTO_TEST is not set
994
995#
996# Hardware crypto devices
997#
998 770
999# 771#
1000# Library routines 772# Library routines
@@ -1002,10 +774,11 @@ CONFIG_CRYPTO_CAMELLIA=m
1002CONFIG_BITREVERSE=y 774CONFIG_BITREVERSE=y
1003# CONFIG_CRC_CCITT is not set 775# CONFIG_CRC_CCITT is not set
1004# CONFIG_CRC16 is not set 776# CONFIG_CRC16 is not set
777# CONFIG_CRC_ITU_T is not set
1005CONFIG_CRC32=y 778CONFIG_CRC32=y
1006CONFIG_LIBCRC32C=m 779# CONFIG_CRC7 is not set
1007CONFIG_ZLIB_INFLATE=m 780# CONFIG_LIBCRC32C is not set
1008CONFIG_ZLIB_DEFLATE=m
1009CONFIG_PLIST=y 781CONFIG_PLIST=y
1010CONFIG_HAS_IOMEM=y 782CONFIG_HAS_IOMEM=y
1011CONFIG_HAS_IOPORT=y 783CONFIG_HAS_IOPORT=y
784CONFIG_HAS_DMA=y
diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c
index b8a5e75ba0..3e634f2f54 100644
--- a/arch/mips/dec/setup.c
+++ b/arch/mips/dec/setup.c
@@ -55,7 +55,7 @@ EXPORT_SYMBOL(dec_kn_slot_size);
55 55
56int dec_tc_bus; 56int dec_tc_bus;
57 57
58spinlock_t ioasic_ssr_lock; 58DEFINE_SPINLOCK(ioasic_ssr_lock);
59 59
60volatile u32 *ioasic_base; 60volatile u32 *ioasic_base;
61 61
diff --git a/arch/mips/defconfig b/arch/mips/defconfig
index d3d81fb276..670039bb1a 100644
--- a/arch/mips/defconfig
+++ b/arch/mips/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20 3# Linux kernel version: 2.6.23-rc2
4# Tue Feb 20 21:47:14 2007 4# Tue Aug 7 12:39:49 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -9,52 +9,40 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
12# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MACH_ALCHEMY is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 13# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 14# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 15# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 16# CONFIG_MACH_JAZZ is not set
17# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 18# CONFIG_MIPS_ATLAS is not set
30# CONFIG_MIPS_MALTA is not set 19# CONFIG_MIPS_MALTA is not set
31# CONFIG_MIPS_SEAD is not set 20# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 21# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 22# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 23# CONFIG_MACH_VR41XX is not set
36# CONFIG_PNX8550_JBS is not set 24# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 25# CONFIG_PNX8550_STB810 is not set
38# CONFIG_MACH_VR41XX is not set 26# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 27# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_QEMU is not set 28# CONFIG_QEMU is not set
41# CONFIG_MARKEINS is not set
42CONFIG_SGI_IP22=y 29CONFIG_SGI_IP22=y
43# CONFIG_SGI_IP27 is not set 30# CONFIG_SGI_IP27 is not set
44# CONFIG_SGI_IP32 is not set 31# CONFIG_SGI_IP32 is not set
45# CONFIG_SIBYTE_BIGSUR is not set 32# CONFIG_SIBYTE_CRHINE is not set
33# CONFIG_SIBYTE_CARMEL is not set
34# CONFIG_SIBYTE_CRHONE is not set
35# CONFIG_SIBYTE_RHONE is not set
46# CONFIG_SIBYTE_SWARM is not set 36# CONFIG_SIBYTE_SWARM is not set
37# CONFIG_SIBYTE_LITTLESUR is not set
47# CONFIG_SIBYTE_SENTOSA is not set 38# CONFIG_SIBYTE_SENTOSA is not set
48# CONFIG_SIBYTE_RHONE is not set
49# CONFIG_SIBYTE_CARMEL is not set
50# CONFIG_SIBYTE_PTSWARM is not set 39# CONFIG_SIBYTE_PTSWARM is not set
51# CONFIG_SIBYTE_LITTLESUR is not set 40# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_CRHINE is not set
53# CONFIG_SIBYTE_CRHONE is not set
54# CONFIG_SNI_RM is not set 41# CONFIG_SNI_RM is not set
55# CONFIG_TOSHIBA_JMR3927 is not set 42# CONFIG_TOSHIBA_JMR3927 is not set
56# CONFIG_TOSHIBA_RBTX4927 is not set 43# CONFIG_TOSHIBA_RBTX4927 is not set
57# CONFIG_TOSHIBA_RBTX4938 is not set 44# CONFIG_TOSHIBA_RBTX4938 is not set
45# CONFIG_WR_PPMC is not set
58CONFIG_RWSEM_GENERIC_SPINLOCK=y 46CONFIG_RWSEM_GENERIC_SPINLOCK=y
59# CONFIG_ARCH_HAS_ILOG2_U32 is not set 47# CONFIG_ARCH_HAS_ILOG2_U32 is not set
60# CONFIG_ARCH_HAS_ILOG2_U64 is not set 48# CONFIG_ARCH_HAS_ILOG2_U64 is not set
@@ -67,6 +55,9 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
67CONFIG_ARC=y 55CONFIG_ARC=y
68CONFIG_DMA_NONCOHERENT=y 56CONFIG_DMA_NONCOHERENT=y
69CONFIG_DMA_NEED_PCI_MAP_STATE=y 57CONFIG_DMA_NEED_PCI_MAP_STATE=y
58CONFIG_EARLY_PRINTK=y
59CONFIG_SYS_HAS_EARLY_PRINTK=y
60# CONFIG_NO_IOPORT is not set
70CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN=y 61CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN=y
71CONFIG_CPU_BIG_ENDIAN=y 62CONFIG_CPU_BIG_ENDIAN=y
72# CONFIG_CPU_LITTLE_ENDIAN is not set 63# CONFIG_CPU_LITTLE_ENDIAN is not set
@@ -82,6 +73,7 @@ CONFIG_ARC_PROMLIB=y
82# 73#
83# CPU selection 74# CPU selection
84# 75#
76# CONFIG_CPU_LOONGSON2 is not set
85# CONFIG_CPU_MIPS32_R1 is not set 77# CONFIG_CPU_MIPS32_R1 is not set
86# CONFIG_CPU_MIPS32_R2 is not set 78# CONFIG_CPU_MIPS32_R2 is not set
87# CONFIG_CPU_MIPS64_R1 is not set 79# CONFIG_CPU_MIPS64_R1 is not set
@@ -122,8 +114,6 @@ CONFIG_IP22_CPU_SCACHE=y
122CONFIG_MIPS_MT_DISABLED=y 114CONFIG_MIPS_MT_DISABLED=y
123# CONFIG_MIPS_MT_SMP is not set 115# CONFIG_MIPS_MT_SMP is not set
124# CONFIG_MIPS_MT_SMTC is not set 116# CONFIG_MIPS_MT_SMTC is not set
125# CONFIG_MIPS_VPE_LOADER is not set
126# CONFIG_64BIT_PHYS_ADDR is not set
127CONFIG_CPU_HAS_LLSC=y 117CONFIG_CPU_HAS_LLSC=y
128CONFIG_CPU_HAS_SYNC=y 118CONFIG_CPU_HAS_SYNC=y
129CONFIG_GENERIC_HARDIRQS=y 119CONFIG_GENERIC_HARDIRQS=y
@@ -139,6 +129,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
139CONFIG_SPLIT_PTLOCK_CPUS=4 129CONFIG_SPLIT_PTLOCK_CPUS=4
140# CONFIG_RESOURCES_64BIT is not set 130# CONFIG_RESOURCES_64BIT is not set
141CONFIG_ZONE_DMA_FLAG=1 131CONFIG_ZONE_DMA_FLAG=1
132CONFIG_BOUNCE=y
133CONFIG_VIRT_TO_BUS=y
142# CONFIG_HZ_48 is not set 134# CONFIG_HZ_48 is not set
143# CONFIG_HZ_100 is not set 135# CONFIG_HZ_100 is not set
144# CONFIG_HZ_128 is not set 136# CONFIG_HZ_128 is not set
@@ -152,35 +144,33 @@ CONFIG_HZ=1000
152CONFIG_PREEMPT_VOLUNTARY=y 144CONFIG_PREEMPT_VOLUNTARY=y
153# CONFIG_PREEMPT is not set 145# CONFIG_PREEMPT is not set
154# CONFIG_KEXEC is not set 146# CONFIG_KEXEC is not set
147CONFIG_SECCOMP=y
155CONFIG_LOCKDEP_SUPPORT=y 148CONFIG_LOCKDEP_SUPPORT=y
156CONFIG_STACKTRACE_SUPPORT=y 149CONFIG_STACKTRACE_SUPPORT=y
157CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 150CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
158 151
159# 152#
160# Code maturity level options 153# General setup
161# 154#
162CONFIG_EXPERIMENTAL=y 155CONFIG_EXPERIMENTAL=y
163CONFIG_BROKEN_ON_SMP=y 156CONFIG_BROKEN_ON_SMP=y
164CONFIG_INIT_ENV_ARG_LIMIT=32 157CONFIG_INIT_ENV_ARG_LIMIT=32
165
166#
167# General setup
168#
169CONFIG_LOCALVERSION="" 158CONFIG_LOCALVERSION=""
170CONFIG_LOCALVERSION_AUTO=y 159CONFIG_LOCALVERSION_AUTO=y
171CONFIG_SWAP=y 160CONFIG_SWAP=y
172CONFIG_SYSVIPC=y 161CONFIG_SYSVIPC=y
173# CONFIG_IPC_NS is not set
174CONFIG_SYSVIPC_SYSCTL=y 162CONFIG_SYSVIPC_SYSCTL=y
175# CONFIG_POSIX_MQUEUE is not set 163# CONFIG_POSIX_MQUEUE is not set
176# CONFIG_BSD_PROCESS_ACCT is not set 164# CONFIG_BSD_PROCESS_ACCT is not set
177# CONFIG_TASKSTATS is not set 165# CONFIG_TASKSTATS is not set
178# CONFIG_UTS_NS is not set 166# CONFIG_USER_NS is not set
179# CONFIG_AUDIT is not set 167# CONFIG_AUDIT is not set
180CONFIG_IKCONFIG=y 168CONFIG_IKCONFIG=y
181CONFIG_IKCONFIG_PROC=y 169CONFIG_IKCONFIG_PROC=y
170CONFIG_LOG_BUF_SHIFT=14
182CONFIG_SYSFS_DEPRECATED=y 171CONFIG_SYSFS_DEPRECATED=y
183CONFIG_RELAY=y 172CONFIG_RELAY=y
173# CONFIG_BLK_DEV_INITRD is not set
184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 174# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
185CONFIG_SYSCTL=y 175CONFIG_SYSCTL=y
186CONFIG_EMBEDDED=y 176CONFIG_EMBEDDED=y
@@ -193,32 +183,30 @@ CONFIG_BUG=y
193CONFIG_ELF_CORE=y 183CONFIG_ELF_CORE=y
194CONFIG_BASE_FULL=y 184CONFIG_BASE_FULL=y
195CONFIG_FUTEX=y 185CONFIG_FUTEX=y
186CONFIG_ANON_INODES=y
196CONFIG_EPOLL=y 187CONFIG_EPOLL=y
188CONFIG_SIGNALFD=y
189CONFIG_TIMERFD=y
190CONFIG_EVENTFD=y
197CONFIG_SHMEM=y 191CONFIG_SHMEM=y
198CONFIG_SLAB=y
199CONFIG_VM_EVENT_COUNTERS=y 192CONFIG_VM_EVENT_COUNTERS=y
193CONFIG_SLAB=y
194# CONFIG_SLUB is not set
195# CONFIG_SLOB is not set
200CONFIG_RT_MUTEXES=y 196CONFIG_RT_MUTEXES=y
201# CONFIG_TINY_SHMEM is not set 197# CONFIG_TINY_SHMEM is not set
202CONFIG_BASE_SMALL=0 198CONFIG_BASE_SMALL=0
203# CONFIG_SLOB is not set
204
205#
206# Loadable module support
207#
208CONFIG_MODULES=y 199CONFIG_MODULES=y
209CONFIG_MODULE_UNLOAD=y 200CONFIG_MODULE_UNLOAD=y
210# CONFIG_MODULE_FORCE_UNLOAD is not set 201# CONFIG_MODULE_FORCE_UNLOAD is not set
211CONFIG_MODVERSIONS=y 202CONFIG_MODVERSIONS=y
212CONFIG_MODULE_SRCVERSION_ALL=y 203CONFIG_MODULE_SRCVERSION_ALL=y
213CONFIG_KMOD=y 204CONFIG_KMOD=y
214
215#
216# Block layer
217#
218CONFIG_BLOCK=y 205CONFIG_BLOCK=y
219# CONFIG_LBD is not set 206# CONFIG_LBD is not set
220# CONFIG_BLK_DEV_IO_TRACE is not set 207# CONFIG_BLK_DEV_IO_TRACE is not set
221# CONFIG_LSF is not set 208# CONFIG_LSF is not set
209# CONFIG_BLK_DEV_BSG is not set
222 210
223# 211#
224# IO Schedulers 212# IO Schedulers
@@ -237,6 +225,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
237# Bus options (PCI, PCMCIA, EISA, ISA, TC) 225# Bus options (PCI, PCMCIA, EISA, ISA, TC)
238# 226#
239CONFIG_HW_HAS_EISA=y 227CONFIG_HW_HAS_EISA=y
228# CONFIG_ARCH_SUPPORTS_MSI is not set
240# CONFIG_EISA is not set 229# CONFIG_EISA is not set
241CONFIG_MMU=y 230CONFIG_MMU=y
242 231
@@ -245,10 +234,6 @@ CONFIG_MMU=y
245# 234#
246 235
247# 236#
248# PCI Hotplug Support
249#
250
251#
252# Executable file formats 237# Executable file formats
253# 238#
254CONFIG_BINFMT_ELF=y 239CONFIG_BINFMT_ELF=y
@@ -261,7 +246,7 @@ CONFIG_TRAD_SIGNALS=y
261CONFIG_PM=y 246CONFIG_PM=y
262# CONFIG_PM_LEGACY is not set 247# CONFIG_PM_LEGACY is not set
263# CONFIG_PM_DEBUG is not set 248# CONFIG_PM_DEBUG is not set
264# CONFIG_PM_SYSFS_DEPRECATED is not set 249# CONFIG_SUSPEND is not set
265 250
266# 251#
267# Networking 252# Networking
@@ -271,7 +256,6 @@ CONFIG_NET=y
271# 256#
272# Networking options 257# Networking options
273# 258#
274# CONFIG_NETDEBUG is not set
275CONFIG_PACKET=y 259CONFIG_PACKET=y
276CONFIG_PACKET_MMAP=y 260CONFIG_PACKET_MMAP=y
277CONFIG_UNIX=y 261CONFIG_UNIX=y
@@ -308,10 +292,6 @@ CONFIG_INET_TCP_DIAG=y
308CONFIG_TCP_CONG_CUBIC=y 292CONFIG_TCP_CONG_CUBIC=y
309CONFIG_DEFAULT_TCP_CONG="cubic" 293CONFIG_DEFAULT_TCP_CONG="cubic"
310CONFIG_TCP_MD5SIG=y 294CONFIG_TCP_MD5SIG=y
311
312#
313# IP: Virtual Server Configuration
314#
315CONFIG_IP_VS=m 295CONFIG_IP_VS=m
316# CONFIG_IP_VS_DEBUG is not set 296# CONFIG_IP_VS_DEBUG is not set
317CONFIG_IP_VS_TAB_BITS=12 297CONFIG_IP_VS_TAB_BITS=12
@@ -346,10 +326,11 @@ CONFIG_IPV6=m
346CONFIG_IPV6_PRIVACY=y 326CONFIG_IPV6_PRIVACY=y
347CONFIG_IPV6_ROUTER_PREF=y 327CONFIG_IPV6_ROUTER_PREF=y
348CONFIG_IPV6_ROUTE_INFO=y 328CONFIG_IPV6_ROUTE_INFO=y
329CONFIG_IPV6_OPTIMISTIC_DAD=y
349CONFIG_INET6_AH=m 330CONFIG_INET6_AH=m
350CONFIG_INET6_ESP=m 331CONFIG_INET6_ESP=m
351CONFIG_INET6_IPCOMP=m 332CONFIG_INET6_IPCOMP=m
352CONFIG_IPV6_MIP6=y 333CONFIG_IPV6_MIP6=m
353CONFIG_INET6_XFRM_TUNNEL=m 334CONFIG_INET6_XFRM_TUNNEL=m
354CONFIG_INET6_TUNNEL=m 335CONFIG_INET6_TUNNEL=m
355CONFIG_INET6_XFRM_MODE_TRANSPORT=m 336CONFIG_INET6_XFRM_MODE_TRANSPORT=m
@@ -371,8 +352,6 @@ CONFIG_NETFILTER_NETLINK=m
371CONFIG_NETFILTER_NETLINK_QUEUE=m 352CONFIG_NETFILTER_NETLINK_QUEUE=m
372CONFIG_NETFILTER_NETLINK_LOG=m 353CONFIG_NETFILTER_NETLINK_LOG=m
373CONFIG_NF_CONNTRACK_ENABLED=m 354CONFIG_NF_CONNTRACK_ENABLED=m
374CONFIG_NF_CONNTRACK_SUPPORT=y
375# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
376CONFIG_NF_CONNTRACK=m 355CONFIG_NF_CONNTRACK=m
377CONFIG_NF_CT_ACCT=y 356CONFIG_NF_CT_ACCT=y
378CONFIG_NF_CONNTRACK_MARK=y 357CONFIG_NF_CONNTRACK_MARK=y
@@ -380,6 +359,7 @@ CONFIG_NF_CONNTRACK_SECMARK=y
380CONFIG_NF_CONNTRACK_EVENTS=y 359CONFIG_NF_CONNTRACK_EVENTS=y
381CONFIG_NF_CT_PROTO_GRE=m 360CONFIG_NF_CT_PROTO_GRE=m
382CONFIG_NF_CT_PROTO_SCTP=m 361CONFIG_NF_CT_PROTO_SCTP=m
362CONFIG_NF_CT_PROTO_UDPLITE=m
383CONFIG_NF_CONNTRACK_AMANDA=m 363CONFIG_NF_CONNTRACK_AMANDA=m
384CONFIG_NF_CONNTRACK_FTP=m 364CONFIG_NF_CONNTRACK_FTP=m
385CONFIG_NF_CONNTRACK_H323=m 365CONFIG_NF_CONNTRACK_H323=m
@@ -398,11 +378,13 @@ CONFIG_NETFILTER_XT_TARGET_MARK=m
398CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 378CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
399CONFIG_NETFILTER_XT_TARGET_NFLOG=m 379CONFIG_NETFILTER_XT_TARGET_NFLOG=m
400CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 380CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
381CONFIG_NETFILTER_XT_TARGET_TRACE=m
401CONFIG_NETFILTER_XT_TARGET_SECMARK=m 382CONFIG_NETFILTER_XT_TARGET_SECMARK=m
402CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m 383CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
403CONFIG_NETFILTER_XT_TARGET_TCPMSS=m 384CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
404CONFIG_NETFILTER_XT_MATCH_COMMENT=m 385CONFIG_NETFILTER_XT_MATCH_COMMENT=m
405CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 386CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
387CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
406CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 388CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
407CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 389CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
408CONFIG_NETFILTER_XT_MATCH_DCCP=m 390CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -423,6 +405,7 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
423CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 405CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
424CONFIG_NETFILTER_XT_MATCH_STRING=m 406CONFIG_NETFILTER_XT_MATCH_STRING=m
425CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 407CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
408CONFIG_NETFILTER_XT_MATCH_U32=m
426CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m 409CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
427 410
428# 411#
@@ -490,25 +473,13 @@ CONFIG_IP6_NF_TARGET_REJECT=m
490CONFIG_IP6_NF_MANGLE=m 473CONFIG_IP6_NF_MANGLE=m
491CONFIG_IP6_NF_TARGET_HL=m 474CONFIG_IP6_NF_TARGET_HL=m
492CONFIG_IP6_NF_RAW=m 475CONFIG_IP6_NF_RAW=m
493
494#
495# DCCP Configuration (EXPERIMENTAL)
496#
497# CONFIG_IP_DCCP is not set 476# CONFIG_IP_DCCP is not set
498
499#
500# SCTP Configuration (EXPERIMENTAL)
501#
502CONFIG_IP_SCTP=m 477CONFIG_IP_SCTP=m
503# CONFIG_SCTP_DBG_MSG is not set 478# CONFIG_SCTP_DBG_MSG is not set
504# CONFIG_SCTP_DBG_OBJCNT is not set 479# CONFIG_SCTP_DBG_OBJCNT is not set
505# CONFIG_SCTP_HMAC_NONE is not set 480# CONFIG_SCTP_HMAC_NONE is not set
506# CONFIG_SCTP_HMAC_SHA1 is not set 481# CONFIG_SCTP_HMAC_SHA1 is not set
507CONFIG_SCTP_HMAC_MD5=y 482CONFIG_SCTP_HMAC_MD5=y
508
509#
510# TIPC Configuration (EXPERIMENTAL)
511#
512# CONFIG_TIPC is not set 483# CONFIG_TIPC is not set
513# CONFIG_ATM is not set 484# CONFIG_ATM is not set
514# CONFIG_BRIDGE is not set 485# CONFIG_BRIDGE is not set
@@ -527,9 +498,6 @@ CONFIG_SCTP_HMAC_MD5=y
527# 498#
528CONFIG_NET_SCHED=y 499CONFIG_NET_SCHED=y
529CONFIG_NET_SCH_FIFO=y 500CONFIG_NET_SCH_FIFO=y
530# CONFIG_NET_SCH_CLK_JIFFIES is not set
531CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
532# CONFIG_NET_SCH_CLK_CPU is not set
533 501
534# 502#
535# Queueing/Scheduling 503# Queueing/Scheduling
@@ -538,6 +506,7 @@ CONFIG_NET_SCH_CBQ=m
538CONFIG_NET_SCH_HTB=m 506CONFIG_NET_SCH_HTB=m
539CONFIG_NET_SCH_HFSC=m 507CONFIG_NET_SCH_HFSC=m
540CONFIG_NET_SCH_PRIO=m 508CONFIG_NET_SCH_PRIO=m
509CONFIG_NET_SCH_RR=m
541CONFIG_NET_SCH_RED=m 510CONFIG_NET_SCH_RED=m
542CONFIG_NET_SCH_SFQ=m 511CONFIG_NET_SCH_SFQ=m
543CONFIG_NET_SCH_TEQL=m 512CONFIG_NET_SCH_TEQL=m
@@ -562,10 +531,16 @@ CONFIG_NET_CLS_U32=m
562CONFIG_NET_CLS_RSVP=m 531CONFIG_NET_CLS_RSVP=m
563CONFIG_NET_CLS_RSVP6=m 532CONFIG_NET_CLS_RSVP6=m
564# CONFIG_NET_EMATCH is not set 533# CONFIG_NET_EMATCH is not set
565# CONFIG_NET_CLS_ACT is not set 534CONFIG_NET_CLS_ACT=y
535CONFIG_NET_ACT_POLICE=y
536CONFIG_NET_ACT_GACT=m
537CONFIG_GACT_PROB=y
538CONFIG_NET_ACT_MIRRED=m
539CONFIG_NET_ACT_IPT=m
540CONFIG_NET_ACT_PEDIT=m
541CONFIG_NET_ACT_SIMP=m
566CONFIG_NET_CLS_POLICE=y 542CONFIG_NET_CLS_POLICE=y
567# CONFIG_NET_CLS_IND is not set 543# CONFIG_NET_CLS_IND is not set
568CONFIG_NET_ESTIMATOR=y
569 544
570# 545#
571# Network testing 546# Network testing
@@ -574,14 +549,26 @@ CONFIG_NET_ESTIMATOR=y
574# CONFIG_HAMRADIO is not set 549# CONFIG_HAMRADIO is not set
575# CONFIG_IRDA is not set 550# CONFIG_IRDA is not set
576# CONFIG_BT is not set 551# CONFIG_BT is not set
552# CONFIG_AF_RXRPC is not set
553CONFIG_FIB_RULES=y
554
555#
556# Wireless
557#
558CONFIG_CFG80211=m
559CONFIG_WIRELESS_EXT=y
560CONFIG_MAC80211=m
561# CONFIG_MAC80211_DEBUG is not set
577CONFIG_IEEE80211=m 562CONFIG_IEEE80211=m
578# CONFIG_IEEE80211_DEBUG is not set 563# CONFIG_IEEE80211_DEBUG is not set
579CONFIG_IEEE80211_CRYPT_WEP=m 564CONFIG_IEEE80211_CRYPT_WEP=m
580CONFIG_IEEE80211_CRYPT_CCMP=m 565CONFIG_IEEE80211_CRYPT_CCMP=m
566CONFIG_IEEE80211_CRYPT_TKIP=m
581CONFIG_IEEE80211_SOFTMAC=m 567CONFIG_IEEE80211_SOFTMAC=m
582# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 568# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
583CONFIG_WIRELESS_EXT=y 569CONFIG_RFKILL=m
584CONFIG_FIB_RULES=y 570CONFIG_RFKILL_INPUT=m
571# CONFIG_NET_9P is not set
585 572
586# 573#
587# Device Drivers 574# Device Drivers
@@ -593,47 +580,19 @@ CONFIG_FIB_RULES=y
593CONFIG_STANDALONE=y 580CONFIG_STANDALONE=y
594CONFIG_PREVENT_FIRMWARE_BUILD=y 581CONFIG_PREVENT_FIRMWARE_BUILD=y
595# CONFIG_SYS_HYPERVISOR is not set 582# CONFIG_SYS_HYPERVISOR is not set
596
597#
598# Connector - unified userspace <-> kernelspace linker
599#
600CONFIG_CONNECTOR=m 583CONFIG_CONNECTOR=m
601
602#
603# Memory Technology Devices (MTD)
604#
605# CONFIG_MTD is not set 584# CONFIG_MTD is not set
606
607#
608# Parallel port support
609#
610# CONFIG_PARPORT is not set 585# CONFIG_PARPORT is not set
611 586CONFIG_BLK_DEV=y
612#
613# Plug and Play support
614#
615# CONFIG_PNPACPI is not set
616
617#
618# Block devices
619#
620# CONFIG_BLK_DEV_COW_COMMON is not set 587# CONFIG_BLK_DEV_COW_COMMON is not set
621# CONFIG_BLK_DEV_LOOP is not set 588# CONFIG_BLK_DEV_LOOP is not set
622# CONFIG_BLK_DEV_NBD is not set 589# CONFIG_BLK_DEV_NBD is not set
623# CONFIG_BLK_DEV_RAM is not set 590# CONFIG_BLK_DEV_RAM is not set
624# CONFIG_BLK_DEV_INITRD is not set
625CONFIG_CDROM_PKTCDVD=m 591CONFIG_CDROM_PKTCDVD=m
626CONFIG_CDROM_PKTCDVD_BUFFERS=8 592CONFIG_CDROM_PKTCDVD_BUFFERS=8
627# CONFIG_CDROM_PKTCDVD_WCACHE is not set 593# CONFIG_CDROM_PKTCDVD_WCACHE is not set
628CONFIG_ATA_OVER_ETH=m 594CONFIG_ATA_OVER_ETH=m
629 595# CONFIG_MISC_DEVICES is not set
630#
631# Misc devices
632#
633
634#
635# ATA/ATAPI/MFM/RLL support
636#
637# CONFIG_IDE is not set 596# CONFIG_IDE is not set
638 597
639# 598#
@@ -641,6 +600,7 @@ CONFIG_ATA_OVER_ETH=m
641# 600#
642CONFIG_RAID_ATTRS=m 601CONFIG_RAID_ATTRS=m
643CONFIG_SCSI=y 602CONFIG_SCSI=y
603CONFIG_SCSI_DMA=y
644CONFIG_SCSI_TGT=m 604CONFIG_SCSI_TGT=m
645# CONFIG_SCSI_NETLINK is not set 605# CONFIG_SCSI_NETLINK is not set
646CONFIG_SCSI_PROC_FS=y 606CONFIG_SCSI_PROC_FS=y
@@ -663,6 +623,7 @@ CONFIG_CHR_DEV_SCH=m
663CONFIG_SCSI_CONSTANTS=y 623CONFIG_SCSI_CONSTANTS=y
664# CONFIG_SCSI_LOGGING is not set 624# CONFIG_SCSI_LOGGING is not set
665CONFIG_SCSI_SCAN_ASYNC=y 625CONFIG_SCSI_SCAN_ASYNC=y
626CONFIG_SCSI_WAIT_SCAN=m
666 627
667# 628#
668# SCSI Transports 629# SCSI Transports
@@ -670,51 +631,21 @@ CONFIG_SCSI_SCAN_ASYNC=y
670CONFIG_SCSI_SPI_ATTRS=m 631CONFIG_SCSI_SPI_ATTRS=m
671# CONFIG_SCSI_FC_ATTRS is not set 632# CONFIG_SCSI_FC_ATTRS is not set
672CONFIG_SCSI_ISCSI_ATTRS=m 633CONFIG_SCSI_ISCSI_ATTRS=m
673CONFIG_SCSI_SAS_ATTRS=m
674# CONFIG_SCSI_SAS_LIBSAS is not set 634# CONFIG_SCSI_SAS_LIBSAS is not set
675 635CONFIG_SCSI_LOWLEVEL=y
676#
677# SCSI low-level drivers
678#
679CONFIG_ISCSI_TCP=m 636CONFIG_ISCSI_TCP=m
680CONFIG_SGIWD93_SCSI=y 637CONFIG_SGIWD93_SCSI=y
681# CONFIG_SCSI_DEBUG is not set 638# CONFIG_SCSI_DEBUG is not set
682
683#
684# Serial ATA (prod) and Parallel ATA (experimental) drivers
685#
686# CONFIG_ATA is not set 639# CONFIG_ATA is not set
687
688#
689# Multi-device support (RAID and LVM)
690#
691# CONFIG_MD is not set 640# CONFIG_MD is not set
692
693#
694# Fusion MPT device support
695#
696# CONFIG_FUSION is not set
697
698#
699# IEEE 1394 (FireWire) support
700#
701
702#
703# I2O device support
704#
705
706#
707# Network device support
708#
709CONFIG_NETDEVICES=y 641CONFIG_NETDEVICES=y
642# CONFIG_NETDEVICES_MULTIQUEUE is not set
643# CONFIG_IFB is not set
710CONFIG_DUMMY=m 644CONFIG_DUMMY=m
711CONFIG_BONDING=m 645CONFIG_BONDING=m
646CONFIG_MACVLAN=m
712CONFIG_EQUALIZER=m 647CONFIG_EQUALIZER=m
713CONFIG_TUN=m 648CONFIG_TUN=m
714
715#
716# PHY device support
717#
718CONFIG_PHYLIB=m 649CONFIG_PHYLIB=m
719 650
720# 651#
@@ -728,36 +659,25 @@ CONFIG_CICADA_PHY=m
728# CONFIG_VITESSE_PHY is not set 659# CONFIG_VITESSE_PHY is not set
729# CONFIG_SMSC_PHY is not set 660# CONFIG_SMSC_PHY is not set
730# CONFIG_BROADCOM_PHY is not set 661# CONFIG_BROADCOM_PHY is not set
662# CONFIG_ICPLUS_PHY is not set
731# CONFIG_FIXED_PHY is not set 663# CONFIG_FIXED_PHY is not set
732
733#
734# Ethernet (10 or 100Mbit)
735#
736CONFIG_NET_ETHERNET=y 664CONFIG_NET_ETHERNET=y
737# CONFIG_MII is not set 665# CONFIG_MII is not set
666# CONFIG_AX88796 is not set
738# CONFIG_DM9000 is not set 667# CONFIG_DM9000 is not set
739CONFIG_SGISEEQ=y 668CONFIG_SGISEEQ=y
669# CONFIG_NETDEV_1000 is not set
670# CONFIG_NETDEV_10000 is not set
740 671
741# 672#
742# Ethernet (1000 Mbit) 673# Wireless LAN
743#
744
745#
746# Ethernet (10000 Mbit)
747#
748
749#
750# Token Ring devices
751#
752
753#
754# Wireless LAN (non-hamradio)
755#
756# CONFIG_NET_RADIO is not set
757
758#
759# Wan interfaces
760# 674#
675CONFIG_WLAN_PRE80211=y
676CONFIG_STRIP=m
677CONFIG_WLAN_80211=y
678# CONFIG_LIBERTAS is not set
679CONFIG_HOSTAP=m
680# CONFIG_HOSTAP_FIRMWARE is not set
761# CONFIG_WAN is not set 681# CONFIG_WAN is not set
762# CONFIG_PPP is not set 682# CONFIG_PPP is not set
763# CONFIG_SLIP is not set 683# CONFIG_SLIP is not set
@@ -765,15 +685,7 @@ CONFIG_SGISEEQ=y
765# CONFIG_NETCONSOLE is not set 685# CONFIG_NETCONSOLE is not set
766# CONFIG_NETPOLL is not set 686# CONFIG_NETPOLL is not set
767# CONFIG_NET_POLL_CONTROLLER is not set 687# CONFIG_NET_POLL_CONTROLLER is not set
768
769#
770# ISDN subsystem
771#
772# CONFIG_ISDN is not set 688# CONFIG_ISDN is not set
773
774#
775# Telephony Support
776#
777# CONFIG_PHONE is not set 689# CONFIG_PHONE is not set
778 690
779# 691#
@@ -781,6 +693,7 @@ CONFIG_SGISEEQ=y
781# 693#
782CONFIG_INPUT=y 694CONFIG_INPUT=y
783# CONFIG_INPUT_FF_MEMLESS is not set 695# CONFIG_INPUT_FF_MEMLESS is not set
696# CONFIG_INPUT_POLLDEV is not set
784 697
785# 698#
786# Userland interfaces 699# Userland interfaces
@@ -806,9 +719,16 @@ CONFIG_KEYBOARD_ATKBD=y
806# CONFIG_KEYBOARD_STOWAWAY is not set 719# CONFIG_KEYBOARD_STOWAWAY is not set
807CONFIG_INPUT_MOUSE=y 720CONFIG_INPUT_MOUSE=y
808CONFIG_MOUSE_PS2=m 721CONFIG_MOUSE_PS2=m
722# CONFIG_MOUSE_PS2_ALPS is not set
723CONFIG_MOUSE_PS2_LOGIPS2PP=y
724# CONFIG_MOUSE_PS2_SYNAPTICS is not set
725# CONFIG_MOUSE_PS2_LIFEBOOK is not set
726CONFIG_MOUSE_PS2_TRACKPOINT=y
727# CONFIG_MOUSE_PS2_TOUCHKIT is not set
809CONFIG_MOUSE_SERIAL=m 728CONFIG_MOUSE_SERIAL=m
810# CONFIG_MOUSE_VSXXXAA is not set 729# CONFIG_MOUSE_VSXXXAA is not set
811# CONFIG_INPUT_JOYSTICK is not set 730# CONFIG_INPUT_JOYSTICK is not set
731# CONFIG_INPUT_TABLET is not set
812# CONFIG_INPUT_TOUCHSCREEN is not set 732# CONFIG_INPUT_TOUCHSCREEN is not set
813# CONFIG_INPUT_MISC is not set 733# CONFIG_INPUT_MISC is not set
814 734
@@ -844,15 +764,7 @@ CONFIG_SERIAL_CORE=m
844CONFIG_UNIX98_PTYS=y 764CONFIG_UNIX98_PTYS=y
845CONFIG_LEGACY_PTYS=y 765CONFIG_LEGACY_PTYS=y
846CONFIG_LEGACY_PTY_COUNT=256 766CONFIG_LEGACY_PTY_COUNT=256
847
848#
849# IPMI
850#
851# CONFIG_IPMI_HANDLER is not set 767# CONFIG_IPMI_HANDLER is not set
852
853#
854# Watchdog Cards
855#
856CONFIG_WATCHDOG=y 768CONFIG_WATCHDOG=y
857# CONFIG_WATCHDOG_NOWAYOUT is not set 769# CONFIG_WATCHDOG_NOWAYOUT is not set
858 770
@@ -864,20 +776,10 @@ CONFIG_INDYDOG=m
864# CONFIG_HW_RANDOM is not set 776# CONFIG_HW_RANDOM is not set
865# CONFIG_RTC is not set 777# CONFIG_RTC is not set
866CONFIG_SGI_DS1286=m 778CONFIG_SGI_DS1286=m
867# CONFIG_GEN_RTC is not set
868# CONFIG_DTLK is not set
869# CONFIG_R3964 is not set 779# CONFIG_R3964 is not set
870CONFIG_RAW_DRIVER=m 780CONFIG_RAW_DRIVER=m
871CONFIG_MAX_RAW_DEVS=256 781CONFIG_MAX_RAW_DEVS=256
872
873#
874# TPM devices
875#
876# CONFIG_TCG_TPM is not set 782# CONFIG_TCG_TPM is not set
877
878#
879# I2C support
880#
881# CONFIG_I2C is not set 783# CONFIG_I2C is not set
882 784
883# 785#
@@ -885,32 +787,33 @@ CONFIG_MAX_RAW_DEVS=256
885# 787#
886# CONFIG_SPI is not set 788# CONFIG_SPI is not set
887# CONFIG_SPI_MASTER is not set 789# CONFIG_SPI_MASTER is not set
888
889#
890# Dallas's 1-wire bus
891#
892# CONFIG_W1 is not set 790# CONFIG_W1 is not set
791# CONFIG_POWER_SUPPLY is not set
792# CONFIG_HWMON is not set
893 793
894# 794#
895# Hardware Monitoring support 795# Multifunction device drivers
896# 796#
897# CONFIG_HWMON is not set 797# CONFIG_MFD_SM501 is not set
898# CONFIG_HWMON_VID is not set
899 798
900# 799#
901# Multimedia devices 800# Multimedia devices
902# 801#
903# CONFIG_VIDEO_DEV is not set 802# CONFIG_VIDEO_DEV is not set
803# CONFIG_DVB_CORE is not set
804# CONFIG_DAB is not set
904 805
905# 806#
906# Digital Video Broadcasting Devices 807# Graphics support
907# 808#
908# CONFIG_DVB is not set 809# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
909 810
910# 811#
911# Graphics support 812# Display device support
912# 813#
913CONFIG_FIRMWARE_EDID=y 814# CONFIG_DISPLAY_SUPPORT is not set
815# CONFIG_VGASTATE is not set
816# CONFIG_VIDEO_OUTPUT_CONTROL is not set
914# CONFIG_FB is not set 817# CONFIG_FB is not set
915 818
916# 819#
@@ -920,31 +823,20 @@ CONFIG_FIRMWARE_EDID=y
920CONFIG_SGI_NEWPORT_CONSOLE=y 823CONFIG_SGI_NEWPORT_CONSOLE=y
921CONFIG_DUMMY_CONSOLE=y 824CONFIG_DUMMY_CONSOLE=y
922CONFIG_FONT_8x16=y 825CONFIG_FONT_8x16=y
923
924#
925# Logo configuration
926#
927CONFIG_LOGO=y 826CONFIG_LOGO=y
928# CONFIG_LOGO_LINUX_MONO is not set 827# CONFIG_LOGO_LINUX_MONO is not set
929# CONFIG_LOGO_LINUX_VGA16 is not set 828# CONFIG_LOGO_LINUX_VGA16 is not set
930# CONFIG_LOGO_LINUX_CLUT224 is not set 829# CONFIG_LOGO_LINUX_CLUT224 is not set
931CONFIG_LOGO_SGI_CLUT224=y 830CONFIG_LOGO_SGI_CLUT224=y
932# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
933 831
934# 832#
935# Sound 833# Sound
936# 834#
937# CONFIG_SOUND is not set 835# CONFIG_SOUND is not set
938 836CONFIG_HID_SUPPORT=y
939#
940# HID Devices
941#
942CONFIG_HID=y 837CONFIG_HID=y
943# CONFIG_HID_DEBUG is not set 838# CONFIG_HID_DEBUG is not set
944 839CONFIG_USB_SUPPORT=y
945#
946# USB support
947#
948# CONFIG_USB_ARCH_HAS_HCD is not set 840# CONFIG_USB_ARCH_HAS_HCD is not set
949# CONFIG_USB_ARCH_HAS_OHCI is not set 841# CONFIG_USB_ARCH_HAS_OHCI is not set
950# CONFIG_USB_ARCH_HAS_EHCI is not set 842# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -957,36 +849,8 @@ CONFIG_HID=y
957# USB Gadget Support 849# USB Gadget Support
958# 850#
959# CONFIG_USB_GADGET is not set 851# CONFIG_USB_GADGET is not set
960
961#
962# MMC/SD Card support
963#
964# CONFIG_MMC is not set 852# CONFIG_MMC is not set
965
966#
967# LED devices
968#
969# CONFIG_NEW_LEDS is not set 853# CONFIG_NEW_LEDS is not set
970
971#
972# LED drivers
973#
974
975#
976# LED Triggers
977#
978
979#
980# InfiniBand support
981#
982
983#
984# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
985#
986
987#
988# Real Time Clock
989#
990# CONFIG_RTC_CLASS is not set 854# CONFIG_RTC_CLASS is not set
991 855
992# 856#
@@ -1003,12 +867,9 @@ CONFIG_HID=y
1003# 867#
1004 868
1005# 869#
1006# Auxiliary Display support 870# Userspace I/O
1007#
1008
1009#
1010# Virtualization
1011# 871#
872# CONFIG_UIO is not set
1012 873
1013# 874#
1014# File systems 875# File systems
@@ -1121,6 +982,7 @@ CONFIG_NFS_ACL_SUPPORT=m
1121CONFIG_NFS_COMMON=y 982CONFIG_NFS_COMMON=y
1122CONFIG_SUNRPC=m 983CONFIG_SUNRPC=m
1123CONFIG_SUNRPC_GSS=m 984CONFIG_SUNRPC_GSS=m
985# CONFIG_SUNRPC_BIND34 is not set
1124CONFIG_RPCSEC_GSS_KRB5=m 986CONFIG_RPCSEC_GSS_KRB5=m
1125# CONFIG_RPCSEC_GSS_SPKM3 is not set 987# CONFIG_RPCSEC_GSS_SPKM3 is not set
1126CONFIG_SMB_FS=m 988CONFIG_SMB_FS=m
@@ -1136,7 +998,6 @@ CONFIG_CIFS=m
1136CONFIG_CODA_FS=m 998CONFIG_CODA_FS=m
1137# CONFIG_CODA_FS_OLD_API is not set 999# CONFIG_CODA_FS_OLD_API is not set
1138# CONFIG_AFS_FS is not set 1000# CONFIG_AFS_FS is not set
1139# CONFIG_9P_FS is not set
1140 1001
1141# 1002#
1142# Partition Types 1003# Partition Types
@@ -1158,6 +1019,7 @@ CONFIG_SGI_PARTITION=y
1158# CONFIG_SUN_PARTITION is not set 1019# CONFIG_SUN_PARTITION is not set
1159# CONFIG_KARMA_PARTITION is not set 1020# CONFIG_KARMA_PARTITION is not set
1160# CONFIG_EFI_PARTITION is not set 1021# CONFIG_EFI_PARTITION is not set
1022# CONFIG_SYSV68_PARTITION is not set
1161 1023
1162# 1024#
1163# Native Language Support 1025# Native Language Support
@@ -1207,8 +1069,6 @@ CONFIG_NLS_UTF8=m
1207# Distributed Lock Manager 1069# Distributed Lock Manager
1208# 1070#
1209CONFIG_DLM=m 1071CONFIG_DLM=m
1210CONFIG_DLM_TCP=y
1211# CONFIG_DLM_SCTP is not set
1212# CONFIG_DLM_DEBUG is not set 1072# CONFIG_DLM_DEBUG is not set
1213 1073
1214# 1074#
@@ -1227,7 +1087,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1227# CONFIG_DEBUG_FS is not set 1087# CONFIG_DEBUG_FS is not set
1228# CONFIG_HEADERS_CHECK is not set 1088# CONFIG_HEADERS_CHECK is not set
1229# CONFIG_DEBUG_KERNEL is not set 1089# CONFIG_DEBUG_KERNEL is not set
1230CONFIG_LOG_BUF_SHIFT=14
1231CONFIG_CROSSCOMPILE=y 1090CONFIG_CROSSCOMPILE=y
1232CONFIG_CMDLINE="" 1091CONFIG_CMDLINE=""
1233 1092
@@ -1237,12 +1096,9 @@ CONFIG_CMDLINE=""
1237CONFIG_KEYS=y 1096CONFIG_KEYS=y
1238CONFIG_KEYS_DEBUG_PROC_KEYS=y 1097CONFIG_KEYS_DEBUG_PROC_KEYS=y
1239# CONFIG_SECURITY is not set 1098# CONFIG_SECURITY is not set
1240
1241#
1242# Cryptographic options
1243#
1244CONFIG_CRYPTO=y 1099CONFIG_CRYPTO=y
1245CONFIG_CRYPTO_ALGAPI=y 1100CONFIG_CRYPTO_ALGAPI=y
1101CONFIG_CRYPTO_ABLKCIPHER=m
1246CONFIG_CRYPTO_BLKCIPHER=m 1102CONFIG_CRYPTO_BLKCIPHER=m
1247CONFIG_CRYPTO_HASH=y 1103CONFIG_CRYPTO_HASH=y
1248CONFIG_CRYPTO_MANAGER=y 1104CONFIG_CRYPTO_MANAGER=y
@@ -1261,6 +1117,7 @@ CONFIG_CRYPTO_ECB=m
1261CONFIG_CRYPTO_CBC=m 1117CONFIG_CRYPTO_CBC=m
1262CONFIG_CRYPTO_PCBC=m 1118CONFIG_CRYPTO_PCBC=m
1263CONFIG_CRYPTO_LRW=m 1119CONFIG_CRYPTO_LRW=m
1120CONFIG_CRYPTO_CRYPTD=m
1264CONFIG_CRYPTO_DES=m 1121CONFIG_CRYPTO_DES=m
1265CONFIG_CRYPTO_FCRYPT=m 1122CONFIG_CRYPTO_FCRYPT=m
1266CONFIG_CRYPTO_BLOWFISH=m 1123CONFIG_CRYPTO_BLOWFISH=m
@@ -1279,10 +1136,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1279CONFIG_CRYPTO_CRC32C=m 1136CONFIG_CRYPTO_CRC32C=m
1280CONFIG_CRYPTO_CAMELLIA=m 1137CONFIG_CRYPTO_CAMELLIA=m
1281# CONFIG_CRYPTO_TEST is not set 1138# CONFIG_CRYPTO_TEST is not set
1282 1139# CONFIG_CRYPTO_HW is not set
1283#
1284# Hardware crypto devices
1285#
1286 1140
1287# 1141#
1288# Library routines 1142# Library routines
@@ -1290,7 +1144,9 @@ CONFIG_CRYPTO_CAMELLIA=m
1290CONFIG_BITREVERSE=m 1144CONFIG_BITREVERSE=m
1291# CONFIG_CRC_CCITT is not set 1145# CONFIG_CRC_CCITT is not set
1292CONFIG_CRC16=m 1146CONFIG_CRC16=m
1147# CONFIG_CRC_ITU_T is not set
1293CONFIG_CRC32=m 1148CONFIG_CRC32=m
1149# CONFIG_CRC7 is not set
1294CONFIG_LIBCRC32C=m 1150CONFIG_LIBCRC32C=m
1295CONFIG_ZLIB_INFLATE=m 1151CONFIG_ZLIB_INFLATE=m
1296CONFIG_ZLIB_DEFLATE=m 1152CONFIG_ZLIB_DEFLATE=m
@@ -1301,3 +1157,4 @@ CONFIG_TEXTSEARCH_FSM=m
1301CONFIG_PLIST=y 1157CONFIG_PLIST=y
1302CONFIG_HAS_IOMEM=y 1158CONFIG_HAS_IOMEM=y
1303CONFIG_HAS_IOPORT=y 1159CONFIG_HAS_IOPORT=y
1160CONFIG_HAS_DMA=y
diff --git a/arch/mips/jmr3927/rbhma3100/irq.c b/arch/mips/jmr3927/rbhma3100/irq.c
index 1187b44a3d..d9efe692e5 100644
--- a/arch/mips/jmr3927/rbhma3100/irq.c
+++ b/arch/mips/jmr3927/rbhma3100/irq.c
@@ -45,9 +45,6 @@
45#error JMR3927_IRQ_END > NR_IRQS 45#error JMR3927_IRQ_END > NR_IRQS
46#endif 46#endif
47 47
48#define irc_dlevel 0
49#define irc_elevel 1
50
51static unsigned char irc_level[TX3927_NUM_IR] = { 48static unsigned char irc_level[TX3927_NUM_IR] = {
52 5, 5, 5, 5, 5, 5, /* INT[5:0] */ 49 5, 5, 5, 5, 5, 5, /* INT[5:0] */
53 7, 7, /* SIO */ 50 7, 7, /* SIO */
@@ -80,34 +77,6 @@ static void unmask_irq_ioc(unsigned int irq)
80 (void)jmr3927_ioc_reg_in(JMR3927_IOC_REV_ADDR); 77 (void)jmr3927_ioc_reg_in(JMR3927_IOC_REV_ADDR);
81} 78}
82 79
83static void mask_irq_irc(unsigned int irq)
84{
85 unsigned int irq_nr = irq - JMR3927_IRQ_IRC;
86 volatile unsigned long *ilrp = &tx3927_ircptr->ilr[irq_nr / 2];
87 if (irq_nr & 1)
88 *ilrp = (*ilrp & 0x00ff) | (irc_dlevel << 8);
89 else
90 *ilrp = (*ilrp & 0xff00) | irc_dlevel;
91 /* update IRCSR */
92 tx3927_ircptr->imr = 0;
93 tx3927_ircptr->imr = irc_elevel;
94 /* flush write buffer */
95 (void)tx3927_ircptr->ssr;
96}
97
98static void unmask_irq_irc(unsigned int irq)
99{
100 unsigned int irq_nr = irq - JMR3927_IRQ_IRC;
101 volatile unsigned long *ilrp = &tx3927_ircptr->ilr[irq_nr / 2];
102 if (irq_nr & 1)
103 *ilrp = (*ilrp & 0x00ff) | (irc_level[irq_nr] << 8);
104 else
105 *ilrp = (*ilrp & 0xff00) | irc_level[irq_nr];
106 /* update IRCSR */
107 tx3927_ircptr->imr = 0;
108 tx3927_ircptr->imr = irc_elevel;
109}
110
111asmlinkage void plat_irq_dispatch(void) 80asmlinkage void plat_irq_dispatch(void)
112{ 81{
113 unsigned long cp0_cause = read_c0_cause(); 82 unsigned long cp0_cause = read_c0_cause();
@@ -168,10 +137,6 @@ void __init arch_init_irq(void)
168 /* clear PCI Reset interrupts */ 137 /* clear PCI Reset interrupts */
169 jmr3927_ioc_reg_out(0, JMR3927_IOC_RESET_ADDR); 138 jmr3927_ioc_reg_out(0, JMR3927_IOC_RESET_ADDR);
170 139
171 /* enable interrupt control */
172 tx3927_ircptr->cer = TX3927_IRCER_ICE;
173 tx3927_ircptr->imr = irc_elevel;
174
175 jmr3927_irq_init(); 140 jmr3927_irq_init();
176 141
177 /* setup IOC interrupt 1 (PCI, MODEM) */ 142 /* setup IOC interrupt 1 (PCI, MODEM) */
@@ -193,20 +158,13 @@ static struct irq_chip jmr3927_irq_ioc = {
193 .unmask = unmask_irq_ioc, 158 .unmask = unmask_irq_ioc,
194}; 159};
195 160
196static struct irq_chip jmr3927_irq_irc = {
197 .name = "jmr3927_irc",
198 .ack = mask_irq_irc,
199 .mask = mask_irq_irc,
200 .mask_ack = mask_irq_irc,
201 .unmask = unmask_irq_irc,
202};
203
204static void __init jmr3927_irq_init(void) 161static void __init jmr3927_irq_init(void)
205{ 162{
206 u32 i; 163 u32 i;
207 164
208 for (i = JMR3927_IRQ_IRC; i < JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC; i++) 165 txx9_irq_init(TX3927_IRC_REG);
209 set_irq_chip_and_handler(i, &jmr3927_irq_irc, handle_level_irq); 166 for (i = 0; i < TXx9_MAX_IR; i++)
167 txx9_irq_set_pri(i, irc_level[i]);
210 for (i = JMR3927_IRQ_IOC; i < JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC; i++) 168 for (i = JMR3927_IRQ_IOC; i < JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC; i++)
211 set_irq_chip_and_handler(i, &jmr3927_irq_ioc, handle_level_irq); 169 set_irq_chip_and_handler(i, &jmr3927_irq_ioc, handle_level_irq);
212} 170}
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c
index 8303001516..fde56e86c2 100644
--- a/arch/mips/jmr3927/rbhma3100/setup.c
+++ b/arch/mips/jmr3927/rbhma3100/setup.c
@@ -290,19 +290,6 @@ static void __init tx3927_setup(void)
290 tx3927_ccfgptr->crir, 290 tx3927_ccfgptr->crir,
291 tx3927_ccfgptr->ccfg, tx3927_ccfgptr->pcfg); 291 tx3927_ccfgptr->ccfg, tx3927_ccfgptr->pcfg);
292 292
293 /* IRC */
294 /* disable interrupt control */
295 tx3927_ircptr->cer = 0;
296 /* mask all IRC interrupts */
297 tx3927_ircptr->imr = 0;
298 for (i = 0; i < TX3927_NUM_IR / 2; i++) {
299 tx3927_ircptr->ilr[i] = 0;
300 }
301 /* setup IRC interrupt mode (Low Active) */
302 for (i = 0; i < TX3927_NUM_IR / 8; i++) {
303 tx3927_ircptr->cr[i] = 0;
304 }
305
306 /* TMR */ 293 /* TMR */
307 /* disable all timers */ 294 /* disable all timers */
308 for (i = 0; i < TX3927_NR_TMR; i++) { 295 for (i = 0; i < TX3927_NR_TMR; i++) {
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 07344cb375..2fd96d95a3 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -50,6 +50,7 @@ obj-$(CONFIG_IRQ_CPU) += irq_cpu.o
50obj-$(CONFIG_IRQ_CPU_RM7K) += irq-rm7000.o 50obj-$(CONFIG_IRQ_CPU_RM7K) += irq-rm7000.o
51obj-$(CONFIG_IRQ_CPU_RM9K) += irq-rm9000.o 51obj-$(CONFIG_IRQ_CPU_RM9K) += irq-rm9000.o
52obj-$(CONFIG_MIPS_BOARDS_GEN) += irq-msc01.o 52obj-$(CONFIG_MIPS_BOARDS_GEN) += irq-msc01.o
53obj-$(CONFIG_IRQ_TXX9) += irq_txx9.o
53 54
54obj-$(CONFIG_32BIT) += scall32-o32.o 55obj-$(CONFIG_32BIT) += scall32-o32.o
55obj-$(CONFIG_64BIT) += scall64-64.o 56obj-$(CONFIG_64BIT) += scall64-64.o
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index 013327286c..ca136298ac 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -232,6 +232,10 @@ void output_mm_defines(void)
232 constant("#define _PMD_T_LOG2 ", PMD_T_LOG2); 232 constant("#define _PMD_T_LOG2 ", PMD_T_LOG2);
233 constant("#define _PTE_T_LOG2 ", PTE_T_LOG2); 233 constant("#define _PTE_T_LOG2 ", PTE_T_LOG2);
234 linefeed; 234 linefeed;
235 constant("#define _PGD_ORDER ", PGD_ORDER);
236 constant("#define _PMD_ORDER ", PMD_ORDER);
237 constant("#define _PTE_ORDER ", PTE_ORDER);
238 linefeed;
235 constant("#define _PMD_SHIFT ", PMD_SHIFT); 239 constant("#define _PMD_SHIFT ", PMD_SHIFT);
236 constant("#define _PGDIR_SHIFT ", PGDIR_SHIFT); 240 constant("#define _PGDIR_SHIFT ", PGDIR_SHIFT);
237 linefeed; 241 linefeed;
diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c
index c09337b947..6648fde20b 100644
--- a/arch/mips/kernel/cpu-bugs64.c
+++ b/arch/mips/kernel/cpu-bugs64.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2003, 2004 Maciej W. Rozycki 2 * Copyright (C) 2003, 2004, 2007 Maciej W. Rozycki
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License 5 * modify it under the terms of the GNU General Public License
@@ -29,7 +29,7 @@ static inline void align_mod(const int align, const int mod)
29 ".endr\n\t" 29 ".endr\n\t"
30 ".set pop" 30 ".set pop"
31 : 31 :
32 : "n" (align), "n" (mod)); 32 : GCC_IMM_ASM (align), GCC_IMM_ASM (mod));
33} 33}
34 34
35static inline void mult_sh_align_mod(long *v1, long *v2, long *w, 35static inline void mult_sh_align_mod(long *v1, long *v2, long *w,
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 06448a9656..3e004161eb 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -199,7 +199,14 @@ static inline void check_wait(void)
199 if ((c->processor_id & 0xff) <= 0x64) 199 if ((c->processor_id & 0xff) <= 0x64)
200 break; 200 break;
201 201
202 cpu_wait = r4k_wait; 202 /*
203 * Another rev is incremeting c0_count at a reduced clock
204 * rate while in WAIT mode. So we basically have the choice
205 * between using the cp0 timer as clocksource or avoiding
206 * the WAIT instruction. Until more details are known,
207 * disable the use of WAIT for 20Kc entirely.
208 cpu_wait = r4k_wait;
209 */
203 break; 210 break;
204 case CPU_RM9000: 211 case CPU_RM9000:
205 if ((c->processor_id & 0x00ff) >= 0x40) 212 if ((c->processor_id & 0x00ff) >= 0x40)
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c
index 2345160e63..3a2d255361 100644
--- a/arch/mips/kernel/i8259.c
+++ b/arch/mips/kernel/i8259.c
@@ -36,6 +36,7 @@ void mask_and_ack_8259A(unsigned int);
36static struct irq_chip i8259A_chip = { 36static struct irq_chip i8259A_chip = {
37 .name = "XT-PIC", 37 .name = "XT-PIC",
38 .mask = disable_8259A_irq, 38 .mask = disable_8259A_irq,
39 .disable = disable_8259A_irq,
39 .unmask = enable_8259A_irq, 40 .unmask = enable_8259A_irq,
40 .mask_ack = mask_and_ack_8259A, 41 .mask_ack = mask_and_ack_8259A,
41}; 42};
@@ -176,10 +177,7 @@ handle_real_irq:
176 outb(cached_master_mask, PIC_MASTER_IMR); 177 outb(cached_master_mask, PIC_MASTER_IMR);
177 outb(0x60+irq,PIC_MASTER_CMD); /* 'Specific EOI to master */ 178 outb(0x60+irq,PIC_MASTER_CMD); /* 'Specific EOI to master */
178 } 179 }
179#ifdef CONFIG_MIPS_MT_SMTC 180 smtc_im_ack_irq(irq);
180 if (irq_hwmask[irq] & ST0_IM)
181 set_c0_status(irq_hwmask[irq] & ST0_IM);
182#endif /* CONFIG_MIPS_MT_SMTC */
183 spin_unlock_irqrestore(&i8259A_lock, flags); 181 spin_unlock_irqrestore(&i8259A_lock, flags);
184 return; 182 return;
185 183
diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c
index 6980deb6dc..28b2a8f009 100644
--- a/arch/mips/kernel/irixsig.c
+++ b/arch/mips/kernel/irixsig.c
@@ -725,7 +725,7 @@ asmlinkage int irix_getcontext(struct pt_regs *regs)
725 current->comm, current->pid, ctx); 725 current->comm, current->pid, ctx);
726#endif 726#endif
727 727
728 if (!access_ok(VERIFY_WRITE, ctx, sizeof(*ctx))); 728 if (!access_ok(VERIFY_WRITE, ctx, sizeof(*ctx)))
729 return -EFAULT; 729 return -EFAULT;
730 730
731 error = __put_user(current->thread.irix_oldctx, &ctx->link); 731 error = __put_user(current->thread.irix_oldctx, &ctx->link);
diff --git a/arch/mips/kernel/irq-msc01.c b/arch/mips/kernel/irq-msc01.c
index 410868b5ea..1ecdd50bfc 100644
--- a/arch/mips/kernel/irq-msc01.c
+++ b/arch/mips/kernel/irq-msc01.c
@@ -52,11 +52,8 @@ static void level_mask_and_ack_msc_irq(unsigned int irq)
52 mask_msc_irq(irq); 52 mask_msc_irq(irq);
53 if (!cpu_has_veic) 53 if (!cpu_has_veic)
54 MSCIC_WRITE(MSC01_IC_EOI, 0); 54 MSCIC_WRITE(MSC01_IC_EOI, 0);
55#ifdef CONFIG_MIPS_MT_SMTC
56 /* This actually needs to be a call into platform code */ 55 /* This actually needs to be a call into platform code */
57 if (irq_hwmask[irq] & ST0_IM) 56 smtc_im_ack_irq(irq);
58 set_c0_status(irq_hwmask[irq] & ST0_IM);
59#endif /* CONFIG_MIPS_MT_SMTC */
60} 57}
61 58
62/* 59/*
@@ -73,10 +70,7 @@ static void edge_mask_and_ack_msc_irq(unsigned int irq)
73 MSCIC_WRITE(MSC01_IC_SUP+irq*8, r | ~MSC01_IC_SUP_EDGE_BIT); 70 MSCIC_WRITE(MSC01_IC_SUP+irq*8, r | ~MSC01_IC_SUP_EDGE_BIT);
74 MSCIC_WRITE(MSC01_IC_SUP+irq*8, r); 71 MSCIC_WRITE(MSC01_IC_SUP+irq*8, r);
75 } 72 }
76#ifdef CONFIG_MIPS_MT_SMTC 73 smtc_im_ack_irq(irq);
77 if (irq_hwmask[irq] & ST0_IM)
78 set_c0_status(irq_hwmask[irq] & ST0_IM);
79#endif /* CONFIG_MIPS_MT_SMTC */
80} 74}
81 75
82/* 76/*
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index aeded6c17d..a990aad2f0 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -74,20 +74,12 @@ EXPORT_SYMBOL_GPL(free_irqno);
74 */ 74 */
75void ack_bad_irq(unsigned int irq) 75void ack_bad_irq(unsigned int irq)
76{ 76{
77 smtc_im_ack_irq(irq);
77 printk("unexpected IRQ # %d\n", irq); 78 printk("unexpected IRQ # %d\n", irq);
78} 79}
79 80
80atomic_t irq_err_count; 81atomic_t irq_err_count;
81 82
82#ifdef CONFIG_MIPS_MT_SMTC
83/*
84 * SMTC Kernel needs to manipulate low-level CPU interrupt mask
85 * in do_IRQ. These are passed in setup_irq_smtc() and stored
86 * in this table.
87 */
88unsigned long irq_hwmask[NR_IRQS];
89#endif /* CONFIG_MIPS_MT_SMTC */
90
91/* 83/*
92 * Generic, controller-independent functions: 84 * Generic, controller-independent functions:
93 */ 85 */
diff --git a/arch/mips/kernel/irq_txx9.c b/arch/mips/kernel/irq_txx9.c
new file mode 100644
index 0000000000..a4d1462c27
--- /dev/null
+++ b/arch/mips/kernel/irq_txx9.c
@@ -0,0 +1,192 @@
1/*
2 * linux/arch/mips/kernel/irq_txx9.c
3 *
4 * Based on linux/arch/mips/jmr3927/rbhma3100/irq.c,
5 * linux/arch/mips/tx4927/common/tx4927_irq.c,
6 * linux/arch/mips/tx4938/common/irq.c
7 *
8 * Copyright 2001, 2003-2005 MontaVista Software Inc.
9 * Author: MontaVista Software, Inc.
10 * ahennessy@mvista.com
11 * source@mvista.com
12 * Copyright (C) 2000-2001 Toshiba Corporation
13 *
14 * This file is subject to the terms and conditions of the GNU General Public
15 * License. See the file "COPYING" in the main directory of this archive
16 * for more details.
17 */
18#include <linux/init.h>
19#include <linux/interrupt.h>
20#include <linux/types.h>
21#include <asm/txx9irq.h>
22
23struct txx9_irc_reg {
24 u32 cer;
25 u32 cr[2];
26 u32 unused0;
27 u32 ilr[8];
28 u32 unused1[4];
29 u32 imr;
30 u32 unused2[7];
31 u32 scr;
32 u32 unused3[7];
33 u32 ssr;
34 u32 unused4[7];
35 u32 csr;
36};
37
38/* IRCER : Int. Control Enable */
39#define TXx9_IRCER_ICE 0x00000001
40
41/* IRCR : Int. Control */
42#define TXx9_IRCR_LOW 0x00000000
43#define TXx9_IRCR_HIGH 0x00000001
44#define TXx9_IRCR_DOWN 0x00000002
45#define TXx9_IRCR_UP 0x00000003
46#define TXx9_IRCR_EDGE(cr) ((cr) & 0x00000002)
47
48/* IRSCR : Int. Status Control */
49#define TXx9_IRSCR_EIClrE 0x00000100
50#define TXx9_IRSCR_EIClr_MASK 0x0000000f
51
52/* IRCSR : Int. Current Status */
53#define TXx9_IRCSR_IF 0x00010000
54#define TXx9_IRCSR_ILV_MASK 0x00000700
55#define TXx9_IRCSR_IVL_MASK 0x0000001f
56
57#define irc_dlevel 0
58#define irc_elevel 1
59
60static struct txx9_irc_reg __iomem *txx9_ircptr __read_mostly;
61
62static struct {
63 unsigned char level;
64 unsigned char mode;
65} txx9irq[TXx9_MAX_IR] __read_mostly;
66
67static void txx9_irq_unmask(unsigned int irq)
68{
69 unsigned int irq_nr = irq - TXX9_IRQ_BASE;
70 u32 __iomem *ilrp = &txx9_ircptr->ilr[(irq_nr % 16 ) / 2];
71 int ofs = irq_nr / 16 * 16 + (irq_nr & 1) * 8;
72
73 __raw_writel((__raw_readl(ilrp) & ~(0xff << ofs))
74 | (txx9irq[irq_nr].level << ofs),
75 ilrp);
76#ifdef CONFIG_CPU_TX39XX
77 /* update IRCSR */
78 __raw_writel(0, &txx9_ircptr->imr);
79 __raw_writel(irc_elevel, &txx9_ircptr->imr);
80#endif
81}
82
83static inline void txx9_irq_mask(unsigned int irq)
84{
85 unsigned int irq_nr = irq - TXX9_IRQ_BASE;
86 u32 __iomem *ilrp = &txx9_ircptr->ilr[(irq_nr % 16) / 2];
87 int ofs = irq_nr / 16 * 16 + (irq_nr & 1) * 8;
88
89 __raw_writel((__raw_readl(ilrp) & ~(0xff << ofs))
90 | (irc_dlevel << ofs),
91 ilrp);
92#ifdef CONFIG_CPU_TX39XX
93 /* update IRCSR */
94 __raw_writel(0, &txx9_ircptr->imr);
95 __raw_writel(irc_elevel, &txx9_ircptr->imr);
96 /* flush write buffer */
97 __raw_readl(&txx9_ircptr->ssr);
98#else
99 mmiowb();
100#endif
101}
102
103static void txx9_irq_mask_ack(unsigned int irq)
104{
105 unsigned int irq_nr = irq - TXX9_IRQ_BASE;
106
107 txx9_irq_mask(irq);
108 /* clear edge detection */
109 if (unlikely(TXx9_IRCR_EDGE(txx9irq[irq_nr].mode)))
110 __raw_writel(TXx9_IRSCR_EIClrE | irq_nr, &txx9_ircptr->scr);
111}
112
113static int txx9_irq_set_type(unsigned int irq, unsigned int flow_type)
114{
115 unsigned int irq_nr = irq - TXX9_IRQ_BASE;
116 u32 cr;
117 u32 __iomem *crp;
118 int ofs;
119 int mode;
120
121 if (flow_type & IRQF_TRIGGER_PROBE)
122 return 0;
123 switch (flow_type & IRQF_TRIGGER_MASK) {
124 case IRQF_TRIGGER_RISING: mode = TXx9_IRCR_UP; break;
125 case IRQF_TRIGGER_FALLING: mode = TXx9_IRCR_DOWN; break;
126 case IRQF_TRIGGER_HIGH: mode = TXx9_IRCR_HIGH; break;
127 case IRQF_TRIGGER_LOW: mode = TXx9_IRCR_LOW; break;
128 default:
129 return -EINVAL;
130 }
131 crp = &txx9_ircptr->cr[(unsigned int)irq_nr / 8];
132 cr = __raw_readl(crp);
133 ofs = (irq_nr & (8 - 1)) * 2;
134 cr &= ~(0x3 << ofs);
135 cr |= (mode & 0x3) << ofs;
136 __raw_writel(cr, crp);
137 txx9irq[irq_nr].mode = mode;
138 return 0;
139}
140
141static struct irq_chip txx9_irq_chip = {
142 .name = "TXX9",
143 .ack = txx9_irq_mask_ack,
144 .mask = txx9_irq_mask,
145 .mask_ack = txx9_irq_mask_ack,
146 .unmask = txx9_irq_unmask,
147 .set_type = txx9_irq_set_type,
148};
149
150void __init txx9_irq_init(unsigned long baseaddr)
151{
152 int i;
153
154 txx9_ircptr = ioremap(baseaddr, sizeof(struct txx9_irc_reg));
155 for (i = 0; i < TXx9_MAX_IR; i++) {
156 txx9irq[i].level = 4; /* middle level */
157 txx9irq[i].mode = TXx9_IRCR_LOW;
158 set_irq_chip_and_handler(TXX9_IRQ_BASE + i,
159 &txx9_irq_chip, handle_level_irq);
160 }
161
162 /* mask all IRC interrupts */
163 __raw_writel(0, &txx9_ircptr->imr);
164 for (i = 0; i < 8; i++)
165 __raw_writel(0, &txx9_ircptr->ilr[i]);
166 /* setup IRC interrupt mode (Low Active) */
167 for (i = 0; i < 2; i++)
168 __raw_writel(0, &txx9_ircptr->cr[i]);
169 /* enable interrupt control */
170 __raw_writel(TXx9_IRCER_ICE, &txx9_ircptr->cer);
171 __raw_writel(irc_elevel, &txx9_ircptr->imr);
172}
173
174int __init txx9_irq_set_pri(int irc_irq, int new_pri)
175{
176 int old_pri;
177
178 if ((unsigned int)irc_irq >= TXx9_MAX_IR)
179 return 0;
180 old_pri = txx9irq[irc_irq].level;
181 txx9irq[irc_irq].level = new_pri;
182 return old_pri;
183}
184
185int txx9_irq(void)
186{
187 u32 csr = __raw_readl(&txx9_ircptr->csr);
188
189 if (likely(!(csr & TXx9_IRCSR_IF)))
190 return TXX9_IRQ_BASE + (csr & (TXx9_MAX_IR - 1));
191 return -1;
192}
diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c
index 22960d67cf..85beb9b0b2 100644
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
@@ -78,11 +78,8 @@ machine_kexec(struct kimage *image)
78 */ 78 */
79 local_irq_disable(); 79 local_irq_disable();
80 80
81 flush_icache_range(reboot_code_buffer,
82 reboot_code_buffer + KEXEC_CONTROL_CODE_SIZE);
83
84 printk("Will call new kernel at %08lx\n", image->start); 81 printk("Will call new kernel at %08lx\n", image->start);
85 printk("Bye ...\n"); 82 printk("Bye ...\n");
86 flush_cache_all(); 83 __flush_cache_all();
87 ((noretfun_t) reboot_code_buffer)(); 84 ((noretfun_t) reboot_code_buffer)();
88} 85}
diff --git a/arch/mips/kernel/mips-mt.c b/arch/mips/kernel/mips-mt.c
index 7169a4db37..56750b02ab 100644
--- a/arch/mips/kernel/mips-mt.c
+++ b/arch/mips/kernel/mips-mt.c
@@ -4,6 +4,7 @@
4 */ 4 */
5 5
6#include <linux/device.h> 6#include <linux/device.h>
7#include <linux/kallsyms.h>
7#include <linux/kernel.h> 8#include <linux/kernel.h>
8#include <linux/sched.h> 9#include <linux/sched.h>
9#include <linux/module.h> 10#include <linux/module.h>
@@ -84,8 +85,9 @@ void mips_mt_regdump(unsigned long mvpctl)
84 read_vpe_c0_vpeconf0()); 85 read_vpe_c0_vpeconf0());
85 printk(" VPE%d.Status : %08lx\n", 86 printk(" VPE%d.Status : %08lx\n",
86 i, read_vpe_c0_status()); 87 i, read_vpe_c0_status());
87 printk(" VPE%d.EPC : %08lx\n", 88 printk(" VPE%d.EPC : %08lx ",
88 i, read_vpe_c0_epc()); 89 i, read_vpe_c0_epc());
90 print_symbol("%s\n", read_vpe_c0_epc());
89 printk(" VPE%d.Cause : %08lx\n", 91 printk(" VPE%d.Cause : %08lx\n",
90 i, read_vpe_c0_cause()); 92 i, read_vpe_c0_cause());
91 printk(" VPE%d.Config7 : %08lx\n", 93 printk(" VPE%d.Config7 : %08lx\n",
@@ -110,7 +112,8 @@ void mips_mt_regdump(unsigned long mvpctl)
110 } 112 }
111 printk(" TCStatus : %08lx\n", tcstatval); 113 printk(" TCStatus : %08lx\n", tcstatval);
112 printk(" TCBind : %08lx\n", read_tc_c0_tcbind()); 114 printk(" TCBind : %08lx\n", read_tc_c0_tcbind());
113 printk(" TCRestart : %08lx\n", read_tc_c0_tcrestart()); 115 printk(" TCRestart : %08lx ", read_tc_c0_tcrestart());
116 print_symbol("%s\n", read_tc_c0_tcrestart());
114 printk(" TCHalt : %08lx\n", haltval); 117 printk(" TCHalt : %08lx\n", haltval);
115 printk(" TCContext : %08lx\n", read_tc_c0_tccontext()); 118 printk(" TCContext : %08lx\n", read_tc_c0_tccontext());
116 if (!haltval) 119 if (!haltval)
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index aab89e97ab..1ba00c1550 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -56,8 +56,6 @@ static struct chan_waitqueues {
56 struct mutex mutex; 56 struct mutex mutex;
57} channel_wqs[RTLX_CHANNELS]; 57} channel_wqs[RTLX_CHANNELS];
58 58
59static struct irqaction irq;
60static int irq_num;
61static struct vpe_notifications notify; 59static struct vpe_notifications notify;
62static int sp_stopping = 0; 60static int sp_stopping = 0;
63 61
@@ -111,7 +109,7 @@ static void __used dump_rtlx(void)
111static int rtlx_init(struct rtlx_info *rtlxi) 109static int rtlx_init(struct rtlx_info *rtlxi)
112{ 110{
113 if (rtlxi->id != RTLX_ID) { 111 if (rtlxi->id != RTLX_ID) {
114 printk(KERN_ERR "no valid RTLX id at 0x%p 0x%x\n", rtlxi, rtlxi->id); 112 printk(KERN_ERR "no valid RTLX id at 0x%p 0x%lx\n", rtlxi, rtlxi->id);
115 return -ENOEXEC; 113 return -ENOEXEC;
116 } 114 }
117 115
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 53d7a97719..118be24224 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -375,7 +375,7 @@ EXPORT(sysn32_call_table)
375 PTR sys_mkdirat 375 PTR sys_mkdirat
376 PTR sys_mknodat 376 PTR sys_mknodat
377 PTR sys_fchownat 377 PTR sys_fchownat
378 PTR sys_futimesat /* 6255 */ 378 PTR compat_sys_futimesat /* 6255 */
379 PTR sys_newfstatat 379 PTR sys_newfstatat
380 PTR sys_unlinkat 380 PTR sys_unlinkat
381 PTR sys_renameat 381 PTR sys_renameat
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index b3ed731a24..dd68afce7d 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -525,5 +525,5 @@ sys_call_table:
525 PTR compat_sys_signalfd 525 PTR compat_sys_signalfd
526 PTR compat_sys_timerfd 526 PTR compat_sys_timerfd
527 PTR sys_eventfd 527 PTR sys_eventfd
528 PTR sys_fallocate /* 4320 */ 528 PTR sys32_fallocate /* 4320 */
529 .size sys_call_table,.-sys_call_table 529 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 19b30d6f17..05dcce4163 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -287,7 +287,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
287 * (unsigned long)idle->thread_info the gp 287 * (unsigned long)idle->thread_info the gp
288 * assumes a 1:1 mapping of TC => VPE 288 * assumes a 1:1 mapping of TC => VPE
289 */ 289 */
290void prom_boot_secondary(int cpu, struct task_struct *idle) 290void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle)
291{ 291{
292 struct thread_info *gp = task_thread_info(idle); 292 struct thread_info *gp = task_thread_info(idle);
293 dvpe(); 293 dvpe();
@@ -321,7 +321,7 @@ void prom_boot_secondary(int cpu, struct task_struct *idle)
321 evpe(EVPE_ENABLE); 321 evpe(EVPE_ENABLE);
322} 322}
323 323
324void prom_init_secondary(void) 324void __cpuinit prom_init_secondary(void)
325{ 325{
326 /* Enable per-cpu interrupts */ 326 /* Enable per-cpu interrupts */
327 327
@@ -330,7 +330,7 @@ void prom_init_secondary(void)
330 (STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP6 | STATUSF_IP7)); 330 (STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP6 | STATUSF_IP7));
331} 331}
332 332
333void prom_smp_finish(void) 333void __cpuinit prom_smp_finish(void)
334{ 334{
335 write_c0_compare(read_c0_count() + (8* mips_hpt_frequency/HZ)); 335 write_c0_compare(read_c0_count() + (8* mips_hpt_frequency/HZ));
336 336
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 16aa5d3711..f09404377e 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -25,10 +25,11 @@
25#include <asm/smtc_proc.h> 25#include <asm/smtc_proc.h>
26 26
27/* 27/*
28 * This file should be built into the kernel only if CONFIG_MIPS_MT_SMTC is set. 28 * SMTC Kernel needs to manipulate low-level CPU interrupt mask
29 * in do_IRQ. These are passed in setup_irq_smtc() and stored
30 * in this table.
29 */ 31 */
30 32unsigned long irq_hwmask[NR_IRQS];
31#define MIPS_CPU_IPI_IRQ 1
32 33
33#define LOCK_MT_PRA() \ 34#define LOCK_MT_PRA() \
34 local_irq_save(flags); \ 35 local_irq_save(flags); \
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index d48d1d5bea..9a5596bf85 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/param.h> 18#include <linux/param.h>
19#include <linux/profile.h>
19#include <linux/time.h> 20#include <linux/time.h>
20#include <linux/timex.h> 21#include <linux/timex.h>
21#include <linux/smp.h> 22#include <linux/smp.h>
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index c8e291c830..6379003f9d 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -606,6 +606,8 @@ asmlinkage void do_ov(struct pt_regs *regs)
606 */ 606 */
607asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) 607asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31)
608{ 608{
609 siginfo_t info;
610
609 die_if_kernel("FP exception in kernel code", regs); 611 die_if_kernel("FP exception in kernel code", regs);
610 612
611 if (fcr31 & FPU_CSR_UNI_X) { 613 if (fcr31 & FPU_CSR_UNI_X) {
@@ -641,9 +643,22 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31)
641 force_sig(sig, current); 643 force_sig(sig, current);
642 644
643 return; 645 return;
644 } 646 } else if (fcr31 & FPU_CSR_INV_X)
645 647 info.si_code = FPE_FLTINV;
646 force_sig(SIGFPE, current); 648 else if (fcr31 & FPU_CSR_DIV_X)
649 info.si_code = FPE_FLTDIV;
650 else if (fcr31 & FPU_CSR_OVF_X)
651 info.si_code = FPE_FLTOVF;
652 else if (fcr31 & FPU_CSR_UDF_X)
653 info.si_code = FPE_FLTUND;
654 else if (fcr31 & FPU_CSR_INE_X)
655 info.si_code = FPE_FLTRES;
656 else
657 info.si_code = __SI_FAULT;
658 info.si_signo = SIGFPE;
659 info.si_errno = 0;
660 info.si_addr = (void __user *) regs->cp0_epc;
661 force_sig_info(SIGFPE, &info, current);
647} 662}
648 663
649asmlinkage void do_bp(struct pt_regs *regs) 664asmlinkage void do_bp(struct pt_regs *regs)
@@ -1035,19 +1050,11 @@ void ejtag_exception_handler(struct pt_regs *regs)
1035/* 1050/*
1036 * NMI exception handler. 1051 * NMI exception handler.
1037 */ 1052 */
1038void nmi_exception_handler(struct pt_regs *regs) 1053NORET_TYPE void ATTRIB_NORET nmi_exception_handler(struct pt_regs *regs)
1039{ 1054{
1040#ifdef CONFIG_MIPS_MT_SMTC
1041 unsigned long dvpret = dvpe();
1042 bust_spinlocks(1);
1043 printk("NMI taken!!!!\n");
1044 mips_mt_regdump(dvpret);
1045#else
1046 bust_spinlocks(1); 1055 bust_spinlocks(1);
1047 printk("NMI taken!!!!\n"); 1056 printk("NMI taken!!!!\n");
1048#endif /* CONFIG_MIPS_MT_SMTC */
1049 die("NMI", regs); 1057 die("NMI", regs);
1050 while(1) ;
1051} 1058}
1052 1059
1053#define VECTORSPACING 0x100 /* for EI/VI mode */ 1060#define VECTORSPACING 0x100 /* for EI/VI mode */
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index bc9bae2a73..087ab99748 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -45,6 +45,8 @@ SECTIONS
45 __dbe_table : { *(__dbe_table) } 45 __dbe_table : { *(__dbe_table) }
46 __stop___dbe_table = .; 46 __stop___dbe_table = .;
47 47
48 NOTES
49
48 RODATA 50 RODATA
49 51
50 /* writeable */ 52 /* writeable */
@@ -142,15 +144,16 @@ SECTIONS
142 *(.exitcall.exit) 144 *(.exitcall.exit)
143 145
144 /* ABI crap starts here */ 146 /* ABI crap starts here */
145 *(.comment)
146 *(.MIPS.options) 147 *(.MIPS.options)
147 *(.note)
148 *(.options) 148 *(.options)
149 *(.pdr) 149 *(.pdr)
150 *(.reginfo) 150 *(.reginfo)
151 *(.mdebug*)
152 } 151 }
153 152
153 /* These mark the ABI of the kernel for debuggers. */
154 .mdebug.abi32 : { KEEP(*(.mdebug.abi32)) }
155 .mdebug.abi64 : { KEEP(*(.mdebug.abi64)) }
156
154 /* This is the MIPS specific mdebug section. */ 157 /* This is the MIPS specific mdebug section. */
155 .mdebug : { *(.mdebug) } 158 .mdebug : { *(.mdebug) }
156 159
diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile
index 91ed1eb331..8810dfb915 100644
--- a/arch/mips/lib/Makefile
+++ b/arch/mips/lib/Makefile
@@ -28,4 +28,4 @@ obj-$(CONFIG_CPU_TX49XX) += dump_tlb.o
28obj-$(CONFIG_CPU_VR41XX) += dump_tlb.o 28obj-$(CONFIG_CPU_VR41XX) += dump_tlb.o
29 29
30# libgcc-style stuff needed in the kernel 30# libgcc-style stuff needed in the kernel
31obj-y += ashldi3.o ashrdi3.o lshrdi3.o ucmpdi2.o 31obj-y += ashldi3.o ashrdi3.o cmpdi2.o lshrdi3.o ucmpdi2.o
diff --git a/arch/mips/lib/cmpdi2.c b/arch/mips/lib/cmpdi2.c
new file mode 100644
index 0000000000..8c1306437e
--- /dev/null
+++ b/arch/mips/lib/cmpdi2.c
@@ -0,0 +1,27 @@
1#include <linux/module.h>
2
3#include "libgcc.h"
4
5word_type __cmpdi2(long long a, long long b)
6{
7 const DWunion au = {
8 .ll = a
9 };
10 const DWunion bu = {
11 .ll = b
12 };
13
14 if (au.s.high < bu.s.high)
15 return 0;
16 else if (au.s.high > bu.s.high)
17 return 2;
18
19 if ((unsigned int) au.s.low < (unsigned int) bu.s.low)
20 return 0;
21 else if ((unsigned int) au.s.low > (unsigned int) bu.s.low)
22 return 2;
23
24 return 1;
25}
26
27EXPORT_SYMBOL(__cmpdi2);
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 97aeb8c4e6..b73f21823c 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -256,7 +256,7 @@ asmlinkage void plat_irq_dispatch(void)
256 256
257 if (irq == MIPSCPU_INT_I8259A) 257 if (irq == MIPSCPU_INT_I8259A)
258 malta_hw0_irqdispatch(); 258 malta_hw0_irqdispatch();
259 else if (irq > 0) 259 else if (irq >= 0)
260 do_IRQ(MIPS_CPU_IRQ_BASE + irq); 260 do_IRQ(MIPS_CPU_IRQ_BASE + irq);
261 else 261 else
262 spurious_interrupt(); 262 spurious_interrupt();
diff --git a/arch/mips/mips-boards/malta/malta_smtc.c b/arch/mips/mips-boards/malta/malta_smtc.c
index 0fb4c26990..ae05d058cb 100644
--- a/arch/mips/mips-boards/malta/malta_smtc.c
+++ b/arch/mips/mips-boards/malta/malta_smtc.c
@@ -1,6 +1,7 @@
1/* 1/*
2 * Malta Platform-specific hooks for SMP operation 2 * Malta Platform-specific hooks for SMP operation
3 */ 3 */
4#include <linux/irq.h>
4#include <linux/init.h> 5#include <linux/init.h>
5 6
6#include <asm/mipsregs.h> 7#include <asm/mipsregs.h>
@@ -24,7 +25,7 @@ void core_send_ipi(int cpu, unsigned int action)
24 * Platform "CPU" startup hook 25 * Platform "CPU" startup hook
25 */ 26 */
26 27
27void prom_boot_secondary(int cpu, struct task_struct *idle) 28void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle)
28{ 29{
29 smtc_boot_secondary(cpu, idle); 30 smtc_boot_secondary(cpu, idle);
30} 31}
@@ -33,7 +34,7 @@ void prom_boot_secondary(int cpu, struct task_struct *idle)
33 * Post-config but pre-boot cleanup entry point 34 * Post-config but pre-boot cleanup entry point
34 */ 35 */
35 36
36void prom_init_secondary(void) 37void __cpuinit prom_init_secondary(void)
37{ 38{
38 void smtc_init_secondary(void); 39 void smtc_init_secondary(void);
39 int myvpe; 40 int myvpe;
@@ -42,10 +43,11 @@ void prom_init_secondary(void)
42 myvpe = read_c0_tcbind() & TCBIND_CURVPE; 43 myvpe = read_c0_tcbind() & TCBIND_CURVPE;
43 if (myvpe != 0) { 44 if (myvpe != 0) {
44 /* Ideally, this should be done only once per VPE, but... */ 45 /* Ideally, this should be done only once per VPE, but... */
45 clear_c0_status(STATUSF_IP2); 46 clear_c0_status(ST0_IM);
46 set_c0_status(STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP3 47 set_c0_status((0x100 << cp0_compare_irq)
47 | STATUSF_IP4 | STATUSF_IP5 | STATUSF_IP6 48 | (0x100 << MIPS_CPU_IPI_IRQ));
48 | STATUSF_IP7); 49 if (cp0_perfcount_irq >= 0)
50 set_c0_status(0x100 << cp0_perfcount_irq);
49 } 51 }
50 52
51 smtc_init_secondary(); 53 smtc_init_secondary();
@@ -74,7 +76,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
74 * SMP initialization finalization entry point 76 * SMP initialization finalization entry point
75 */ 77 */
76 78
77void prom_smp_finish(void) 79void __cpuinit prom_smp_finish(void)
78{ 80{
79 smtc_smp_finish(); 81 smtc_smp_finish();
80} 82}
diff --git a/arch/mips/mips-boards/sim/sim_int.c b/arch/mips/mips-boards/sim/sim_int.c
deleted file mode 100644
index 766e0159ee..0000000000
--- a/arch/mips/mips-boards/sim/sim_int.c
+++ /dev/null
@@ -1,88 +0,0 @@
1/*
2 * Copyright (C) 1999, 2005 MIPS Technologies, Inc. All rights reserved.
3 *
4 * This program is free software; you can distribute it and/or modify it
5 * under the terms of the GNU General Public License (Version 2) as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
16 *
17 */
18#include <linux/init.h>
19#include <linux/sched.h>
20#include <linux/slab.h>
21#include <linux/interrupt.h>
22#include <linux/kernel_stat.h>
23#include <asm/mips-boards/simint.h>
24#include <asm/irq_cpu.h>
25
26static inline int clz(unsigned long x)
27{
28 __asm__ (
29 " .set push \n"
30 " .set mips32 \n"
31 " clz %0, %1 \n"
32 " .set pop \n"
33 : "=r" (x)
34 : "r" (x));
35
36 return x;
37}
38
39/*
40 * Version of ffs that only looks at bits 12..15.
41 */
42static inline unsigned int irq_ffs(unsigned int pending)
43{
44#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64)
45 return -clz(pending) + 31 - CAUSEB_IP;
46#else
47 unsigned int a0 = 7;
48 unsigned int t0;
49
50 t0 = s0 & 0xf000;
51 t0 = t0 < 1;
52 t0 = t0 << 2;
53 a0 = a0 - t0;
54 s0 = s0 << t0;
55
56 t0 = s0 & 0xc000;
57 t0 = t0 < 1;
58 t0 = t0 << 1;
59 a0 = a0 - t0;
60 s0 = s0 << t0;
61
62 t0 = s0 & 0x8000;
63 t0 = t0 < 1;
64 //t0 = t0 << 2;
65 a0 = a0 - t0;
66 //s0 = s0 << t0;
67
68 return a0;
69#endif
70}
71
72asmlinkage void plat_irq_dispatch(void)
73{
74 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
75 int irq;
76
77 irq = irq_ffs(pending);
78
79 if (irq > 0)
80 do_IRQ(MIPS_CPU_IRQ_BASE + irq);
81 else
82 spurious_interrupt();
83}
84
85void __init arch_init_irq(void)
86{
87 mips_cpu_irq_init();
88}
diff --git a/arch/mips/mipssim/sim_smp.c b/arch/mips/mipssim/sim_smp.c
index 38fa807b99..ccbbccac23 100644
--- a/arch/mips/mipssim/sim_smp.c
+++ b/arch/mips/mipssim/sim_smp.c
@@ -53,7 +53,7 @@ void core_send_ipi(int cpu, unsigned int action)
53 * Platform "CPU" startup hook 53 * Platform "CPU" startup hook
54 */ 54 */
55 55
56void prom_boot_secondary(int cpu, struct task_struct *idle) 56void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle)
57{ 57{
58#ifdef CONFIG_MIPS_MT_SMTC 58#ifdef CONFIG_MIPS_MT_SMTC
59 smtc_boot_secondary(cpu, idle); 59 smtc_boot_secondary(cpu, idle);
@@ -64,7 +64,7 @@ void prom_boot_secondary(int cpu, struct task_struct *idle)
64 * Post-config but pre-boot cleanup entry point 64 * Post-config but pre-boot cleanup entry point
65 */ 65 */
66 66
67void prom_init_secondary(void) 67void __cpuinit prom_init_secondary(void)
68{ 68{
69#ifdef CONFIG_MIPS_MT_SMTC 69#ifdef CONFIG_MIPS_MT_SMTC
70 void smtc_init_secondary(void); 70 void smtc_init_secondary(void);
@@ -103,7 +103,7 @@ void plat_prepare_cpus(unsigned int max_cpus)
103 * SMP initialization finalization entry point 103 * SMP initialization finalization entry point
104 */ 104 */
105 105
106void prom_smp_finish(void) 106void __cpuinit prom_smp_finish(void)
107{ 107{
108#ifdef CONFIG_MIPS_MT_SMTC 108#ifdef CONFIG_MIPS_MT_SMTC
109 smtc_smp_finish(); 109 smtc_smp_finish();
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index 76903c7276..f60b3dc0fc 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -35,7 +35,7 @@ static inline unsigned long dma_addr_to_virt(dma_addr_t dma_addr)
35static inline int cpu_is_noncoherent_r10000(struct device *dev) 35static inline int cpu_is_noncoherent_r10000(struct device *dev)
36{ 36{
37 return !plat_device_is_coherent(dev) && 37 return !plat_device_is_coherent(dev) &&
38 (current_cpu_data.cputype == CPU_R10000 && 38 (current_cpu_data.cputype == CPU_R10000 ||
39 current_cpu_data.cputype == CPU_R12000); 39 current_cpu_data.cputype == CPU_R12000);
40} 40}
41 41
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index b8cb0dde3a..5240432e6d 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -8,6 +8,7 @@
8 * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com 8 * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com
9 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. 9 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
10 */ 10 */
11#include <linux/bug.h>
11#include <linux/init.h> 12#include <linux/init.h>
12#include <linux/module.h> 13#include <linux/module.h>
13#include <linux/signal.h> 14#include <linux/signal.h>
@@ -26,6 +27,7 @@
26#include <linux/proc_fs.h> 27#include <linux/proc_fs.h>
27#include <linux/pfn.h> 28#include <linux/pfn.h>
28 29
30#include <asm/asm-offsets.h>
29#include <asm/bootinfo.h> 31#include <asm/bootinfo.h>
30#include <asm/cachectl.h> 32#include <asm/cachectl.h>
31#include <asm/cpu.h> 33#include <asm/cpu.h>
@@ -131,6 +133,8 @@ void *kmap_coherent(struct page *page, unsigned long addr)
131 pte_t pte; 133 pte_t pte;
132 int tlbidx; 134 int tlbidx;
133 135
136 BUG_ON(Page_dcache_dirty(page));
137
134 inc_preempt_count(); 138 inc_preempt_count();
135 idx = (addr >> PAGE_SHIFT) & (FIX_N_COLOURS - 1); 139 idx = (addr >> PAGE_SHIFT) & (FIX_N_COLOURS - 1);
136#ifdef CONFIG_MIPS_MT_SMTC 140#ifdef CONFIG_MIPS_MT_SMTC
@@ -207,7 +211,7 @@ void copy_user_highpage(struct page *to, struct page *from,
207 void *vfrom, *vto; 211 void *vfrom, *vto;
208 212
209 vto = kmap_atomic(to, KM_USER1); 213 vto = kmap_atomic(to, KM_USER1);
210 if (cpu_has_dc_aliases) { 214 if (cpu_has_dc_aliases && !Page_dcache_dirty(from)) {
211 vfrom = kmap_coherent(from, vaddr); 215 vfrom = kmap_coherent(from, vaddr);
212 copy_page(vto, vfrom); 216 copy_page(vto, vfrom);
213 kunmap_coherent(); 217 kunmap_coherent();
@@ -498,7 +502,13 @@ unsigned long pgd_current[NR_CPUS];
498 * different layout ... 502 * different layout ...
499 */ 503 */
500#define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<<order))) 504#define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<<order)))
501pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER); 505
506/*
507 * gcc 3.3 and older have trouble determining that PTRS_PER_PGD and PGD_ORDER
508 * are constants. So we use the variants from asm-offset.h until that gcc
509 * will officially be retired.
510 */
511pgd_t swapper_pg_dir[_PTRS_PER_PGD] __page_aligned(_PGD_ORDER);
502#ifdef CONFIG_64BIT 512#ifdef CONFIG_64BIT
503#ifdef MODULE_START 513#ifdef MODULE_START
504pgd_t module_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER); 514pgd_t module_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER);
diff --git a/arch/mips/mm/pg-r4k.c b/arch/mips/mm/pg-r4k.c
index dc795be628..e47e9e9486 100644
--- a/arch/mips/mm/pg-r4k.c
+++ b/arch/mips/mm/pg-r4k.c
@@ -209,7 +209,7 @@ static inline void build_cdex_p(void)
209 } 209 }
210 210
211 if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) 211 if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
212 build_insn_word(0x3c01a000); /* lui $at, 0xa000 */ 212 build_insn_word(0x8c200000); /* lw $zero, ($at) */
213 213
214 mi.c_format.opcode = cache_op; 214 mi.c_format.opcode = cache_op;
215 mi.c_format.rs = 4; /* $a0 */ 215 mi.c_format.rs = 4; /* $a0 */
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 4ec0964b83..6c425b0524 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -58,6 +58,21 @@ static __init int __maybe_unused r10000_llsc_war(void)
58} 58}
59 59
60/* 60/*
61 * Found by experiment: At least some revisions of the 4kc throw under
62 * some circumstances a machine check exception, triggered by invalid
63 * values in the index register. Delaying the tlbp instruction until
64 * after the next branch, plus adding an additional nop in front of
65 * tlbwi/tlbwr avoids the invalid index register values. Nobody knows
66 * why; it's not an issue caused by the core RTL.
67 *
68 */
69static __init int __attribute__((unused)) m4kc_tlbp_war(void)
70{
71 return (current_cpu_data.processor_id & 0xffff00) ==
72 (PRID_COMP_MIPS | PRID_IMP_4KC);
73}
74
75/*
61 * A little micro-assembler, intended for TLB refill handler 76 * A little micro-assembler, intended for TLB refill handler
62 * synthesizing. It is intentionally kept simple, does only support 77 * synthesizing. It is intentionally kept simple, does only support
63 * a subset of instructions, and does not try to hide pipeline effects 78 * a subset of instructions, and does not try to hide pipeline effects
@@ -78,7 +93,7 @@ enum fields
78 SET = 0x200 93 SET = 0x200
79}; 94};
80 95
81#define OP_MASK 0x2f 96#define OP_MASK 0x3f
82#define OP_SH 26 97#define OP_SH 26
83#define RS_MASK 0x1f 98#define RS_MASK 0x1f
84#define RS_SH 21 99#define RS_SH 21
@@ -92,7 +107,7 @@ enum fields
92#define IMM_SH 0 107#define IMM_SH 0
93#define JIMM_MASK 0x3ffffff 108#define JIMM_MASK 0x3ffffff
94#define JIMM_SH 0 109#define JIMM_SH 0
95#define FUNC_MASK 0x2f 110#define FUNC_MASK 0x3f
96#define FUNC_SH 0 111#define FUNC_SH 0
97#define SET_MASK 0x7 112#define SET_MASK 0x7
98#define SET_SH 0 113#define SET_SH 0
@@ -894,6 +909,8 @@ static __init void build_tlb_write_entry(u32 **p, struct label **l,
894 case CPU_20KC: 909 case CPU_20KC:
895 case CPU_25KF: 910 case CPU_25KF:
896 case CPU_LOONGSON2: 911 case CPU_LOONGSON2:
912 if (m4kc_tlbp_war())
913 i_nop(p);
897 tlbw(p); 914 tlbw(p);
898 break; 915 break;
899 916
@@ -1705,7 +1722,8 @@ build_r4000_tlbchange_handler_head(u32 **p, struct label **l,
1705 l_smp_pgtable_change(l, *p); 1722 l_smp_pgtable_change(l, *p);
1706# endif 1723# endif
1707 iPTE_LW(p, l, pte, ptr); /* get even pte */ 1724 iPTE_LW(p, l, pte, ptr); /* get even pte */
1708 build_tlb_probe_entry(p); 1725 if (!m4kc_tlbp_war())
1726 build_tlb_probe_entry(p);
1709} 1727}
1710 1728
1711static void __init 1729static void __init
@@ -1747,6 +1765,8 @@ static void __init build_r4000_tlb_load_handler(void)
1747 1765
1748 build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1); 1766 build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1);
1749 build_pte_present(&p, &l, &r, K0, K1, label_nopage_tlbl); 1767 build_pte_present(&p, &l, &r, K0, K1, label_nopage_tlbl);
1768 if (m4kc_tlbp_war())
1769 build_tlb_probe_entry(&p);
1750 build_make_valid(&p, &r, K0, K1); 1770 build_make_valid(&p, &r, K0, K1);
1751 build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1); 1771 build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1);
1752 1772
@@ -1781,6 +1801,8 @@ static void __init build_r4000_tlb_store_handler(void)
1781 1801
1782 build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1); 1802 build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1);
1783 build_pte_writable(&p, &l, &r, K0, K1, label_nopage_tlbs); 1803 build_pte_writable(&p, &l, &r, K0, K1, label_nopage_tlbs);
1804 if (m4kc_tlbp_war())
1805 build_tlb_probe_entry(&p);
1784 build_make_write(&p, &r, K0, K1); 1806 build_make_write(&p, &r, K0, K1);
1785 build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1); 1807 build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1);
1786 1808
@@ -1815,6 +1837,8 @@ static void __init build_r4000_tlb_modify_handler(void)
1815 1837
1816 build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1); 1838 build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1);
1817 build_pte_modifiable(&p, &l, &r, K0, K1, label_nopage_tlbm); 1839 build_pte_modifiable(&p, &l, &r, K0, K1, label_nopage_tlbm);
1840 if (m4kc_tlbp_war())
1841 build_tlb_probe_entry(&p);
1818 /* Present and writable bits set, set accessed and dirty bits. */ 1842 /* Present and writable bits set, set accessed and dirty bits. */
1819 build_make_write(&p, &r, K0, K1); 1843 build_make_write(&p, &r, K0, K1);
1820 build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1); 1844 build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1);
diff --git a/arch/mips/pci/ops-mace.c b/arch/mips/pci/ops-mace.c
index 8008e31c5e..fe54514493 100644
--- a/arch/mips/pci/ops-mace.c
+++ b/arch/mips/pci/ops-mace.c
@@ -29,22 +29,20 @@
29 * 4 N/C 29 * 4 N/C
30 */ 30 */
31 31
32#define chkslot(_bus,_devfn) \ 32static inline int mkaddr(struct pci_bus *bus, unsigned int devfn,
33do { \ 33 unsigned int reg)
34 if ((_bus)->number > 0 || PCI_SLOT (_devfn) < 1 \ 34{
35 || PCI_SLOT (_devfn) > 3) \ 35 return ((bus->number & 0xff) << 16) |
36 return PCIBIOS_DEVICE_NOT_FOUND; \ 36 ((devfn & 0xff) << 8) |
37} while (0) 37 (reg & 0xfc);
38}
38 39
39#define mkaddr(_devfn, _reg) \
40((((_devfn) & 0xffUL) << 8) | ((_reg) & 0xfcUL))
41 40
42static int 41static int
43mace_pci_read_config(struct pci_bus *bus, unsigned int devfn, 42mace_pci_read_config(struct pci_bus *bus, unsigned int devfn,
44 int reg, int size, u32 *val) 43 int reg, int size, u32 *val)
45{ 44{
46 chkslot(bus, devfn); 45 mace->pci.config_addr = mkaddr(bus, devfn, reg);
47 mace->pci.config_addr = mkaddr(devfn, reg);
48 switch (size) { 46 switch (size) {
49 case 1: 47 case 1:
50 *val = mace->pci.config_data.b[(reg & 3) ^ 3]; 48 *val = mace->pci.config_data.b[(reg & 3) ^ 3];
@@ -66,8 +64,7 @@ static int
66mace_pci_write_config(struct pci_bus *bus, unsigned int devfn, 64mace_pci_write_config(struct pci_bus *bus, unsigned int devfn,
67 int reg, int size, u32 val) 65 int reg, int size, u32 val)
68{ 66{
69 chkslot(bus, devfn); 67 mace->pci.config_addr = mkaddr(bus, devfn, reg);
70 mace->pci.config_addr = mkaddr(devfn, reg);
71 switch (size) { 68 switch (size) {
72 case 1: 69 case 1:
73 mace->pci.config_data.b[(reg & 3) ^ 3] = val; 70 mace->pci.config_data.b[(reg & 3) ^ 3] = val;
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 99d8f4fd3f..589b745d82 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -75,7 +75,7 @@ pcibios_align_resource(void *data, struct resource *res,
75 res->start = start; 75 res->start = start;
76} 76}
77 77
78void __init register_pci_controller(struct pci_controller *hose) 78void __devinit register_pci_controller(struct pci_controller *hose)
79{ 79{
80 if (request_resource(&iomem_resource, hose->mem_resource) < 0) 80 if (request_resource(&iomem_resource, hose->mem_resource) < 0)
81 goto out; 81 goto out;
@@ -141,6 +141,7 @@ static int __init pcibios_init(void)
141 141
142 bus = pci_scan_bus(next_busno, hose->pci_ops, hose); 142 bus = pci_scan_bus(next_busno, hose->pci_ops, hose);
143 hose->bus = bus; 143 hose->bus = bus;
144 need_domain_info = need_domain_info || hose->index;
144 hose->need_domain_info = need_domain_info; 145 hose->need_domain_info = need_domain_info;
145 if (bus) { 146 if (bus) {
146 next_busno = bus->subordinate + 1; 147 next_busno = bus->subordinate + 1;
@@ -230,7 +231,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
230 return pcibios_plat_dev_init(dev); 231 return pcibios_plat_dev_init(dev);
231} 232}
232 233
233static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev, 234static void pcibios_fixup_device_resources(struct pci_dev *dev,
234 struct pci_bus *bus) 235 struct pci_bus *bus)
235{ 236{
236 /* Update device resources. */ 237 /* Update device resources. */
@@ -251,7 +252,7 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev,
251 } 252 }
252} 253}
253 254
254void __devinit pcibios_fixup_bus(struct pci_bus *bus) 255void pcibios_fixup_bus(struct pci_bus *bus)
255{ 256{
256 /* Propagate hose info into the subordinate devices. */ 257 /* Propagate hose info into the subordinate devices. */
257 258
@@ -282,8 +283,7 @@ pcibios_update_irq(struct pci_dev *dev, int irq)
282 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); 283 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
283} 284}
284 285
285void __devinit 286void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
286pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
287 struct resource *res) 287 struct resource *res)
288{ 288{
289 struct pci_controller *hose = (struct pci_controller *)dev->sysdata; 289 struct pci_controller *hose = (struct pci_controller *)dev->sysdata;
diff --git a/arch/mips/philips/pnx8550/common/Kconfig b/arch/mips/philips/pnx8550/common/Kconfig
deleted file mode 100644
index 072572d173..0000000000
--- a/arch/mips/philips/pnx8550/common/Kconfig
+++ /dev/null
@@ -1 +0,0 @@
1# Place holder
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c
index 1c852d6a76..b0f12cd296 100644
--- a/arch/mips/pmc-sierra/yosemite/smp.c
+++ b/arch/mips/pmc-sierra/yosemite/smp.c
@@ -77,7 +77,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
77 * stack so the first thing we do is throw away that stuff and load useful 77 * stack so the first thing we do is throw away that stuff and load useful
78 * values into the registers ... 78 * values into the registers ...
79 */ 79 */
80void __init prom_boot_secondary(int cpu, struct task_struct *idle) 80void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle)
81{ 81{
82 unsigned long gp = (unsigned long) task_thread_info(idle); 82 unsigned long gp = (unsigned long) task_thread_info(idle);
83 unsigned long sp = __KSTK_TOS(idle); 83 unsigned long sp = __KSTK_TOS(idle);
@@ -97,12 +97,12 @@ void prom_cpus_done(void)
97 * After we've done initial boot, this function is called to allow the 97 * After we've done initial boot, this function is called to allow the
98 * board code to clean up state, if needed 98 * board code to clean up state, if needed
99 */ 99 */
100void prom_init_secondary(void) 100void __cpuinit prom_init_secondary(void)
101{ 101{
102 set_c0_status(ST0_CO | ST0_IE | ST0_IM); 102 set_c0_status(ST0_CO | ST0_IE | ST0_IM);
103} 103}
104 104
105void prom_smp_finish(void) 105void __cpuinit prom_smp_finish(void)
106{ 106{
107} 107}
108 108
diff --git a/arch/mips/qemu/q-smp.c b/arch/mips/qemu/q-smp.c
index 786bbfa214..4b0178d0df 100644
--- a/arch/mips/qemu/q-smp.c
+++ b/arch/mips/qemu/q-smp.c
@@ -22,11 +22,11 @@ void core_send_ipi(int cpu, unsigned int action)
22 * After we've done initial boot, this function is called to allow the 22 * After we've done initial boot, this function is called to allow the
23 * board code to clean up state, if needed 23 * board code to clean up state, if needed
24 */ 24 */
25void prom_init_secondary(void) 25void __cpuinit prom_init_secondary(void)
26{ 26{
27} 27}
28 28
29void prom_smp_finish(void) 29void __cpuinit prom_smp_finish(void)
30{ 30{
31} 31}
32 32
@@ -43,7 +43,7 @@ void __init prom_prepare_cpus(unsigned int max_cpus)
43/* 43/*
44 * Firmware CPU startup hook 44 * Firmware CPU startup hook
45 */ 45 */
46void prom_boot_secondary(int cpu, struct task_struct *idle) 46void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle)
47{ 47{
48} 48}
49 49
diff --git a/arch/mips/sgi-ip22/ip22-mc.c b/arch/mips/sgi-ip22/ip22-mc.c
index ddb6506d83..01a805dcc6 100644
--- a/arch/mips/sgi-ip22/ip22-mc.c
+++ b/arch/mips/sgi-ip22/ip22-mc.c
@@ -47,7 +47,7 @@ struct mem {
47/* 47/*
48 * Detect installed memory, do some sanity checks and notify kernel about it 48 * Detect installed memory, do some sanity checks and notify kernel about it
49 */ 49 */
50static void probe_memory(void) 50static void __init probe_memory(void)
51{ 51{
52 int i, j, found, cnt = 0; 52 int i, j, found, cnt = 0;
53 struct mem bank[4]; 53 struct mem bank[4];
diff --git a/arch/mips/sgi-ip22/ip22-platform.c b/arch/mips/sgi-ip22/ip22-platform.c
index 78b608d2d4..28ffec8e5d 100644
--- a/arch/mips/sgi-ip22/ip22-platform.c
+++ b/arch/mips/sgi-ip22/ip22-platform.c
@@ -150,8 +150,8 @@ static int __init sgiseeq_devinit(void)
150 return res; 150 return res;
151 151
152 /* Second HPC is missing? */ 152 /* Second HPC is missing? */
153 if (ip22_is_fullhouse() || 153 if (!ip22_is_fullhouse() ||
154 !get_dbe(tmp, (unsigned int *)&hpc3c1->pbdma[1])) 154 get_dbe(tmp, (unsigned int *)&hpc3c1->pbdma[1]))
155 return 0; 155 return 0;
156 156
157 sgimc->giopar |= SGIMC_GIOPAR_MASTEREXP1 | SGIMC_GIOPAR_EXP164 | 157 sgimc->giopar |= SGIMC_GIOPAR_MASTEREXP1 | SGIMC_GIOPAR_EXP164 |
diff --git a/arch/mips/sgi-ip22/ip22-setup.c b/arch/mips/sgi-ip22/ip22-setup.c
index 25097ecc9b..e7ce7982db 100644
--- a/arch/mips/sgi-ip22/ip22-setup.c
+++ b/arch/mips/sgi-ip22/ip22-setup.c
@@ -29,6 +29,7 @@
29#include <asm/sgi/ip22.h> 29#include <asm/sgi/ip22.h>
30 30
31unsigned long sgi_gfxaddr; 31unsigned long sgi_gfxaddr;
32EXPORT_SYMBOL_GPL(sgi_gfxaddr);
32 33
33/* 34/*
34 * Stop-A is originally a Sun thing that isn't standard on IP22 so to avoid 35 * Stop-A is originally a Sun thing that isn't standard on IP22 so to avoid
diff --git a/arch/mips/sgi-ip22/ip22-time.c b/arch/mips/sgi-ip22/ip22-time.c
index 8e88a442b2..de3d01823a 100644
--- a/arch/mips/sgi-ip22/ip22-time.c
+++ b/arch/mips/sgi-ip22/ip22-time.c
@@ -114,8 +114,8 @@ static unsigned long dosample(void)
114 } while (msb); 114 } while (msb);
115 115
116 /* Stop the counter. */ 116 /* Stop the counter. */
117 writeb(sgint->tcword, (SGINT_TCWORD_CNT2 | SGINT_TCWORD_CALL | 117 writeb(SGINT_TCWORD_CNT2 | SGINT_TCWORD_CALL | SGINT_TCWORD_MSWST,
118 SGINT_TCWORD_MSWST)); 118 &sgint->tcword);
119 /* 119 /*
120 * Return the difference, this is how far the r4k counter increments 120 * Return the difference, this is how far the r4k counter increments
121 * for every 1/HZ seconds. We round off the nearest 1 MHz of master 121 * for every 1/HZ seconds. We round off the nearest 1 MHz of master
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c
index ba8e079463..856649cf9f 100644
--- a/arch/mips/sgi-ip27/ip27-irq.c
+++ b/arch/mips/sgi-ip27/ip27-irq.c
@@ -207,11 +207,9 @@ static int intr_connect_level(int cpu, int bit)
207{ 207{
208 nasid_t nasid = COMPACT_TO_NASID_NODEID(cpu_to_node(cpu)); 208 nasid_t nasid = COMPACT_TO_NASID_NODEID(cpu_to_node(cpu));
209 struct slice_data *si = cpu_data[cpu].data; 209 struct slice_data *si = cpu_data[cpu].data;
210 unsigned long flags;
211 210
212 set_bit(bit, si->irq_enable_mask); 211 set_bit(bit, si->irq_enable_mask);
213 212
214 local_irq_save(flags);
215 if (!cputoslice(cpu)) { 213 if (!cputoslice(cpu)) {
216 REMOTE_HUB_S(nasid, PI_INT_MASK0_A, si->irq_enable_mask[0]); 214 REMOTE_HUB_S(nasid, PI_INT_MASK0_A, si->irq_enable_mask[0]);
217 REMOTE_HUB_S(nasid, PI_INT_MASK1_A, si->irq_enable_mask[1]); 215 REMOTE_HUB_S(nasid, PI_INT_MASK1_A, si->irq_enable_mask[1]);
@@ -219,7 +217,6 @@ static int intr_connect_level(int cpu, int bit)
219 REMOTE_HUB_S(nasid, PI_INT_MASK0_B, si->irq_enable_mask[0]); 217 REMOTE_HUB_S(nasid, PI_INT_MASK0_B, si->irq_enable_mask[0]);
220 REMOTE_HUB_S(nasid, PI_INT_MASK1_B, si->irq_enable_mask[1]); 218 REMOTE_HUB_S(nasid, PI_INT_MASK1_B, si->irq_enable_mask[1]);
221 } 219 }
222 local_irq_restore(flags);
223 220
224 return 0; 221 return 0;
225} 222}
@@ -285,6 +282,8 @@ static unsigned int startup_bridge_irq(unsigned int irq)
285 282
286 bridge->b_wid_tflush; 283 bridge->b_wid_tflush;
287 284
285 intr_connect_level(cpu, swlevel);
286
288 return 0; /* Never anything pending. */ 287 return 0; /* Never anything pending. */
289} 288}
290 289
@@ -292,7 +291,6 @@ static unsigned int startup_bridge_irq(unsigned int irq)
292static void shutdown_bridge_irq(unsigned int irq) 291static void shutdown_bridge_irq(unsigned int irq)
293{ 292{
294 struct bridge_controller *bc = IRQ_TO_BRIDGE(irq); 293 struct bridge_controller *bc = IRQ_TO_BRIDGE(irq);
295 struct hub_data *hub = hub_data(cpu_to_node(bc->irq_cpu));
296 bridge_t *bridge = bc->base; 294 bridge_t *bridge = bc->base;
297 int pin, swlevel; 295 int pin, swlevel;
298 cpuid_t cpu; 296 cpuid_t cpu;
@@ -307,8 +305,6 @@ static void shutdown_bridge_irq(unsigned int irq)
307 swlevel = find_level(&cpu, irq); 305 swlevel = find_level(&cpu, irq);
308 intr_disconnect_level(cpu, swlevel); 306 intr_disconnect_level(cpu, swlevel);
309 307
310 __clear_bit(swlevel, hub->irq_alloc_mask);
311
312 bridge->b_int_enable &= ~(1 << pin); 308 bridge->b_int_enable &= ~(1 << pin);
313 bridge->b_wid_tflush; 309 bridge->b_wid_tflush;
314} 310}
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c
index 08e79141b4..fbb27728a7 100644
--- a/arch/mips/sgi-ip27/ip27-smp.c
+++ b/arch/mips/sgi-ip27/ip27-smp.c
@@ -171,7 +171,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
171 * set sp to the kernel stack of the newly created idle process, gp to the proc 171 * set sp to the kernel stack of the newly created idle process, gp to the proc
172 * struct so that current_thread_info() will work. 172 * struct so that current_thread_info() will work.
173 */ 173 */
174void __init prom_boot_secondary(int cpu, struct task_struct *idle) 174void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle)
175{ 175{
176 unsigned long gp = (unsigned long)task_thread_info(idle); 176 unsigned long gp = (unsigned long)task_thread_info(idle);
177 unsigned long sp = __KSTK_TOS(idle); 177 unsigned long sp = __KSTK_TOS(idle);
@@ -191,7 +191,7 @@ void __init prom_cpus_done(void)
191{ 191{
192} 192}
193 193
194void prom_smp_finish(void) 194void __cpuinit prom_smp_finish(void)
195{ 195{
196} 196}
197 197
diff --git a/arch/mips/sgi-ip32/ip32-platform.c b/arch/mips/sgi-ip32/ip32-platform.c
index ba3697ee7f..7309e48d16 100644
--- a/arch/mips/sgi-ip32/ip32-platform.c
+++ b/arch/mips/sgi-ip32/ip32-platform.c
@@ -41,8 +41,8 @@ static struct platform_device uart8250_device = {
41 41
42static int __init uart8250_init(void) 42static int __init uart8250_init(void)
43{ 43{
44 uart8250_data[0].iobase = (unsigned long) &mace->isa.serial1; 44 uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1;
45 uart8250_data[1].iobase = (unsigned long) &mace->isa.serial1; 45 uart8250_data[1].membase = (void __iomem *) &mace->isa.serial1;
46 46
47 return platform_device_register(&uart8250_device); 47 return platform_device_register(&uart8250_device);
48} 48}
diff --git a/arch/mips/sibyte/Kconfig b/arch/mips/sibyte/Kconfig
index e6b003ec67..fdd7bd98fb 100644
--- a/arch/mips/sibyte/Kconfig
+++ b/arch/mips/sibyte/Kconfig
@@ -48,7 +48,6 @@ config SIBYTE_BCM1x55
48 48
49config SIBYTE_SB1xxx_SOC 49config SIBYTE_SB1xxx_SOC
50 bool 50 bool
51 depends on EXPERIMENTAL
52 select DMA_COHERENT 51 select DMA_COHERENT
53 select SIBYTE_CFE 52 select SIBYTE_CFE
54 select SWAP_IO_SPACE 53 select SWAP_IO_SPACE
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
index ba0c4b776c..e729b5f302 100644
--- a/arch/mips/sibyte/bcm1480/irq.c
+++ b/arch/mips/sibyte/bcm1480/irq.c
@@ -76,7 +76,7 @@ __setup("nokgdb", nokgdb);
76 76
77/* Default to UART1 */ 77/* Default to UART1 */
78int kgdb_port = 1; 78int kgdb_port = 1;
79#ifdef CONFIG_SIBYTE_SB1250_DUART 79#ifdef CONFIG_SERIAL_SB1250_DUART
80extern char sb1250_duart_present[]; 80extern char sb1250_duart_present[];
81#endif 81#endif
82#endif 82#endif
@@ -100,8 +100,8 @@ DEFINE_SPINLOCK(bcm1480_imr_lock);
100 100
101void bcm1480_mask_irq(int cpu, int irq) 101void bcm1480_mask_irq(int cpu, int irq)
102{ 102{
103 unsigned long flags; 103 unsigned long flags, hl_spacing;
104 u64 cur_ints,hl_spacing; 104 u64 cur_ints;
105 105
106 spin_lock_irqsave(&bcm1480_imr_lock, flags); 106 spin_lock_irqsave(&bcm1480_imr_lock, flags);
107 hl_spacing = 0; 107 hl_spacing = 0;
@@ -117,8 +117,8 @@ void bcm1480_mask_irq(int cpu, int irq)
117 117
118void bcm1480_unmask_irq(int cpu, int irq) 118void bcm1480_unmask_irq(int cpu, int irq)
119{ 119{
120 unsigned long flags; 120 unsigned long flags, hl_spacing;
121 u64 cur_ints,hl_spacing; 121 u64 cur_ints;
122 122
123 spin_lock_irqsave(&bcm1480_imr_lock, flags); 123 spin_lock_irqsave(&bcm1480_imr_lock, flags);
124 hl_spacing = 0; 124 hl_spacing = 0;
@@ -404,7 +404,7 @@ void __init arch_init_irq(void)
404 if (kgdb_flag) { 404 if (kgdb_flag) {
405 kgdb_irq = K_BCM1480_INT_UART_0 + kgdb_port; 405 kgdb_irq = K_BCM1480_INT_UART_0 + kgdb_port;
406 406
407#ifdef CONFIG_SIBYTE_SB1250_DUART 407#ifdef CONFIG_SERIAL_SB1250_DUART
408 sb1250_duart_present[kgdb_port] = 0; 408 sb1250_duart_present[kgdb_port] = 0;
409#endif 409#endif
410 /* Setup uart 1 settings, mapper */ 410 /* Setup uart 1 settings, mapper */
diff --git a/arch/mips/sibyte/bcm1480/setup.c b/arch/mips/sibyte/bcm1480/setup.c
index bb28f28e80..7e1aa348b8 100644
--- a/arch/mips/sibyte/bcm1480/setup.c
+++ b/arch/mips/sibyte/bcm1480/setup.c
@@ -15,6 +15,7 @@
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18#include <linux/init.h>
18#include <linux/kernel.h> 19#include <linux/kernel.h>
19#include <linux/module.h> 20#include <linux/module.h>
20#include <linux/reboot.h> 21#include <linux/reboot.h>
@@ -35,6 +36,7 @@ unsigned int soc_type;
35EXPORT_SYMBOL(soc_type); 36EXPORT_SYMBOL(soc_type);
36unsigned int periph_rev; 37unsigned int periph_rev;
37unsigned int zbbus_mhz; 38unsigned int zbbus_mhz;
39EXPORT_SYMBOL(zbbus_mhz);
38 40
39static unsigned int part_type; 41static unsigned int part_type;
40 42
diff --git a/arch/mips/sibyte/cfe/console.c b/arch/mips/sibyte/cfe/console.c
index c6ec748175..4cec9d798d 100644
--- a/arch/mips/sibyte/cfe/console.c
+++ b/arch/mips/sibyte/cfe/console.c
@@ -46,7 +46,7 @@ static int cfe_console_setup(struct console *cons, char *str)
46 /* XXXKW think about interaction with 'console=' cmdline arg */ 46 /* XXXKW think about interaction with 'console=' cmdline arg */
47 /* If none of the console options are configured, the build will break. */ 47 /* If none of the console options are configured, the build will break. */
48 if (cfe_getenv("BOOT_CONSOLE", consdev, 32) >= 0) { 48 if (cfe_getenv("BOOT_CONSOLE", consdev, 32) >= 0) {
49#ifdef CONFIG_SIBYTE_SB1250_DUART 49#ifdef CONFIG_SERIAL_SB1250_DUART
50 if (!strcmp(consdev, "uart0")) { 50 if (!strcmp(consdev, "uart0")) {
51 setleds("u0cn"); 51 setleds("u0cn");
52 } else if (!strcmp(consdev, "uart1")) { 52 } else if (!strcmp(consdev, "uart1")) {
diff --git a/arch/mips/sibyte/cfe/smp.c b/arch/mips/sibyte/cfe/smp.c
index eab20e2db3..5de4cff9d1 100644
--- a/arch/mips/sibyte/cfe/smp.c
+++ b/arch/mips/sibyte/cfe/smp.c
@@ -58,7 +58,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
58 * Setup the PC, SP, and GP of a secondary processor and start it 58 * Setup the PC, SP, and GP of a secondary processor and start it
59 * running! 59 * running!
60 */ 60 */
61void prom_boot_secondary(int cpu, struct task_struct *idle) 61void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle)
62{ 62{
63 int retval; 63 int retval;
64 64
@@ -72,7 +72,7 @@ void prom_boot_secondary(int cpu, struct task_struct *idle)
72/* 72/*
73 * Code to run on secondary just after probing the CPU 73 * Code to run on secondary just after probing the CPU
74 */ 74 */
75void prom_init_secondary(void) 75void __cpuinit prom_init_secondary(void)
76{ 76{
77#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) 77#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)
78 extern void bcm1480_smp_init(void); 78 extern void bcm1480_smp_init(void);
@@ -89,7 +89,7 @@ void prom_init_secondary(void)
89 * Do any tidying up before marking online and running the idle 89 * Do any tidying up before marking online and running the idle
90 * loop 90 * loop
91 */ 91 */
92void prom_smp_finish(void) 92void __cpuinit prom_smp_finish(void)
93{ 93{
94#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) 94#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)
95 extern void bcm1480_smp_finish(void); 95 extern void bcm1480_smp_finish(void);
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c
index 0e6a13c0bd..ad593a6c20 100644
--- a/arch/mips/sibyte/sb1250/irq.c
+++ b/arch/mips/sibyte/sb1250/irq.c
@@ -61,7 +61,7 @@ static int kgdb_irq;
61 61
62/* Default to UART1 */ 62/* Default to UART1 */
63int kgdb_port = 1; 63int kgdb_port = 1;
64#ifdef CONFIG_SIBYTE_SB1250_DUART 64#ifdef CONFIG_SERIAL_SB1250_DUART
65extern char sb1250_duart_present[]; 65extern char sb1250_duart_present[];
66#endif 66#endif
67#endif 67#endif
@@ -359,7 +359,7 @@ void __init arch_init_irq(void)
359 if (kgdb_flag) { 359 if (kgdb_flag) {
360 kgdb_irq = K_INT_UART_0 + kgdb_port; 360 kgdb_irq = K_INT_UART_0 + kgdb_port;
361 361
362#ifdef CONFIG_SIBYTE_SB1250_DUART 362#ifdef CONFIG_SERIAL_SB1250_DUART
363 sb1250_duart_present[kgdb_port] = 0; 363 sb1250_duart_present[kgdb_port] = 0;
364#endif 364#endif
365 /* Setup uart 1 settings, mapper */ 365 /* Setup uart 1 settings, mapper */
diff --git a/arch/mips/sni/pcimt_scache.c b/arch/mips/sni/pcimt_scache.c
deleted file mode 100644
index a59d457fa8..0000000000
--- a/arch/mips/sni/pcimt_scache.c
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * arch/mips/sni/pcimt_scache.c
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (c) 1997, 1998 by Ralf Baechle
9 */
10#include <linux/init.h>
11#include <linux/kernel.h>
12#include <asm/bcache.h>
13#include <asm/sni.h>
14
15#define cacheconf (*(volatile unsigned int *)PCIMT_CACHECONF)
16#define invspace (*(volatile unsigned int *)PCIMT_INVSPACE)
17
18void __init sni_pcimt_sc_init(void)
19{
20 unsigned int scsiz, sc_size;
21
22 scsiz = cacheconf & 7;
23 if (scsiz == 0) {
24 printk("Second level cache is deactived.\n");
25 return;
26 }
27 if (scsiz >= 6) {
28 printk("Invalid second level cache size configured, "
29 "deactivating second level cache.\n");
30 cacheconf = 0;
31 return;
32 }
33
34 sc_size = 128 << scsiz;
35 printk("%dkb second level cache detected, deactivating.\n", sc_size);
36 cacheconf = 0;
37}
diff --git a/arch/mips/sni/reset.c b/arch/mips/sni/reset.c
index 2eada8aea6..38b6a97a31 100644
--- a/arch/mips/sni/reset.c
+++ b/arch/mips/sni/reset.c
@@ -40,10 +40,6 @@ void sni_machine_restart(char *command)
40 } 40 }
41} 41}
42 42
43void sni_machine_halt(void)
44{
45}
46
47void sni_machine_power_off(void) 43void sni_machine_power_off(void)
48{ 44{
49 *(volatile unsigned char *)PCIMT_CSWCSM = 0xfd; 45 *(volatile unsigned char *)PCIMT_CSWCSM = 0xfd;
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c
index 4fedfbda0c..6edbb3051c 100644
--- a/arch/mips/sni/setup.c
+++ b/arch/mips/sni/setup.c
@@ -26,7 +26,6 @@
26unsigned int sni_brd_type; 26unsigned int sni_brd_type;
27 27
28extern void sni_machine_restart(char *command); 28extern void sni_machine_restart(char *command);
29extern void sni_machine_halt(void);
30extern void sni_machine_power_off(void); 29extern void sni_machine_power_off(void);
31 30
32static void __init sni_display_setup(void) 31static void __init sni_display_setup(void)
@@ -87,7 +86,6 @@ void __init plat_mem_setup(void)
87 } 86 }
88 87
89 _machine_restart = sni_machine_restart; 88 _machine_restart = sni_machine_restart;
90 _machine_halt = sni_machine_halt;
91 pm_power_off = sni_machine_power_off; 89 pm_power_off = sni_machine_power_off;
92 90
93 sni_display_setup(); 91 sni_display_setup();
diff --git a/arch/mips/tx4927/common/Makefile b/arch/mips/tx4927/common/Makefile
index 9cb9535eba..18375787e0 100644
--- a/arch/mips/tx4927/common/Makefile
+++ b/arch/mips/tx4927/common/Makefile
@@ -10,3 +10,5 @@ obj-y += tx4927_prom.o tx4927_setup.o tx4927_irq.o
10 10
11obj-$(CONFIG_TOSHIBA_FPCIB0) += smsc_fdc37m81x.o 11obj-$(CONFIG_TOSHIBA_FPCIB0) += smsc_fdc37m81x.o
12obj-$(CONFIG_KGDB) += tx4927_dbgio.o 12obj-$(CONFIG_KGDB) += tx4927_dbgio.o
13
14EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/tx4927/common/tx4927_irq.c b/arch/mips/tx4927/common/tx4927_irq.c
index 00b0b975f3..0aabd57fda 100644
--- a/arch/mips/tx4927/common/tx4927_irq.c
+++ b/arch/mips/tx4927/common/tx4927_irq.c
@@ -23,398 +23,20 @@
23 * with this program; if not, write to the Free Software Foundation, Inc., 23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA. 24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */ 25 */
26#include <linux/errno.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/kernel_stat.h>
29#include <linux/module.h>
30#include <linux/signal.h>
31#include <linux/sched.h>
32#include <linux/types.h>
33#include <linux/interrupt.h> 27#include <linux/interrupt.h>
34#include <linux/ioport.h> 28#include <asm/irq_cpu.h>
35#include <linux/timex.h>
36#include <linux/slab.h>
37#include <linux/random.h>
38#include <linux/irq.h>
39#include <linux/bitops.h>
40#include <asm/bootinfo.h>
41#include <asm/io.h>
42#include <asm/irq.h>
43#include <asm/mipsregs.h> 29#include <asm/mipsregs.h>
44#include <asm/system.h>
45#include <asm/tx4927/tx4927.h> 30#include <asm/tx4927/tx4927.h>
46#ifdef CONFIG_TOSHIBA_RBTX4927 31#ifdef CONFIG_TOSHIBA_RBTX4927
47#include <asm/tx4927/toshiba_rbtx4927.h> 32#include <asm/tx4927/toshiba_rbtx4927.h>
48#endif 33#endif
49 34
50/*
51 * DEBUG
52 */
53
54#undef TX4927_IRQ_DEBUG
55
56#ifdef TX4927_IRQ_DEBUG
57#define TX4927_IRQ_NONE 0x00000000
58
59#define TX4927_IRQ_INFO ( 1 << 0 )
60#define TX4927_IRQ_WARN ( 1 << 1 )
61#define TX4927_IRQ_EROR ( 1 << 2 )
62
63#define TX4927_IRQ_INIT ( 1 << 5 )
64#define TX4927_IRQ_NEST1 ( 1 << 6 )
65#define TX4927_IRQ_NEST2 ( 1 << 7 )
66#define TX4927_IRQ_NEST3 ( 1 << 8 )
67#define TX4927_IRQ_NEST4 ( 1 << 9 )
68
69#define TX4927_IRQ_CP0_INIT ( 1 << 10 )
70#define TX4927_IRQ_CP0_ENABLE ( 1 << 13 )
71#define TX4927_IRQ_CP0_DISABLE ( 1 << 14 )
72
73#define TX4927_IRQ_PIC_INIT ( 1 << 20 )
74#define TX4927_IRQ_PIC_ENABLE ( 1 << 23 )
75#define TX4927_IRQ_PIC_DISABLE ( 1 << 24 )
76
77#define TX4927_IRQ_ALL 0xffffffff
78#endif
79
80#ifdef TX4927_IRQ_DEBUG
81static const u32 tx4927_irq_debug_flag = (TX4927_IRQ_NONE
82 | TX4927_IRQ_INFO
83 | TX4927_IRQ_WARN | TX4927_IRQ_EROR
84// | TX4927_IRQ_CP0_INIT
85// | TX4927_IRQ_CP0_ENABLE
86// | TX4927_IRQ_CP0_ENDIRQ
87// | TX4927_IRQ_PIC_INIT
88// | TX4927_IRQ_PIC_ENABLE
89// | TX4927_IRQ_PIC_DISABLE
90// | TX4927_IRQ_INIT
91// | TX4927_IRQ_NEST1
92// | TX4927_IRQ_NEST2
93// | TX4927_IRQ_NEST3
94// | TX4927_IRQ_NEST4
95 );
96#endif
97
98#ifdef TX4927_IRQ_DEBUG
99#define TX4927_IRQ_DPRINTK(flag,str...) \
100 if ( (tx4927_irq_debug_flag) & (flag) ) \
101 { \
102 char tmp[100]; \
103 sprintf( tmp, str ); \
104 printk( "%s(%s:%u)::%s", __FUNCTION__, __FILE__, __LINE__, tmp ); \
105 }
106#else
107#define TX4927_IRQ_DPRINTK(flag,str...)
108#endif
109
110/*
111 * Forwad definitions for all pic's
112 */
113
114static void tx4927_irq_cp0_enable(unsigned int irq);
115static void tx4927_irq_cp0_disable(unsigned int irq);
116
117static void tx4927_irq_pic_enable(unsigned int irq);
118static void tx4927_irq_pic_disable(unsigned int irq);
119
120/*
121 * Kernel structs for all pic's
122 */
123
124#define TX4927_CP0_NAME "TX4927-CP0"
125static struct irq_chip tx4927_irq_cp0_type = {
126 .name = TX4927_CP0_NAME,
127 .ack = tx4927_irq_cp0_disable,
128 .mask = tx4927_irq_cp0_disable,
129 .mask_ack = tx4927_irq_cp0_disable,
130 .unmask = tx4927_irq_cp0_enable,
131};
132
133#define TX4927_PIC_NAME "TX4927-PIC"
134static struct irq_chip tx4927_irq_pic_type = {
135 .name = TX4927_PIC_NAME,
136 .ack = tx4927_irq_pic_disable,
137 .mask = tx4927_irq_pic_disable,
138 .mask_ack = tx4927_irq_pic_disable,
139 .unmask = tx4927_irq_pic_enable,
140};
141
142#define TX4927_PIC_ACTION(s) { no_action, 0, CPU_MASK_NONE, s, NULL, NULL }
143static struct irqaction tx4927_irq_pic_action =
144TX4927_PIC_ACTION(TX4927_PIC_NAME);
145
146#define CCP0_STATUS 12
147#define CCP0_CAUSE 13
148
149/*
150 * Functions for cp0
151 */
152
153#define tx4927_irq_cp0_mask(irq) ( 1 << ( irq-TX4927_IRQ_CP0_BEG+8 ) )
154
155static void
156tx4927_irq_cp0_modify(unsigned cp0_reg, unsigned clr_bits, unsigned set_bits)
157{
158 unsigned long val = 0;
159
160 switch (cp0_reg) {
161 case CCP0_STATUS:
162 val = read_c0_status();
163 break;
164
165 case CCP0_CAUSE:
166 val = read_c0_cause();
167 break;
168
169 }
170
171 val &= (~clr_bits);
172 val |= (set_bits);
173
174 switch (cp0_reg) {
175 case CCP0_STATUS:{
176 write_c0_status(val);
177 break;
178 }
179 case CCP0_CAUSE:{
180 write_c0_cause(val);
181 break;
182 }
183 }
184}
185
186static void __init tx4927_irq_cp0_init(void)
187{
188 int i;
189
190 TX4927_IRQ_DPRINTK(TX4927_IRQ_CP0_INIT, "beg=%d end=%d\n",
191 TX4927_IRQ_CP0_BEG, TX4927_IRQ_CP0_END);
192
193 for (i = TX4927_IRQ_CP0_BEG; i <= TX4927_IRQ_CP0_END; i++)
194 set_irq_chip_and_handler(i, &tx4927_irq_cp0_type,
195 handle_level_irq);
196}
197
198static void tx4927_irq_cp0_enable(unsigned int irq)
199{
200 TX4927_IRQ_DPRINTK(TX4927_IRQ_CP0_ENABLE, "irq=%d \n", irq);
201
202 tx4927_irq_cp0_modify(CCP0_STATUS, 0, tx4927_irq_cp0_mask(irq));
203}
204
205static void tx4927_irq_cp0_disable(unsigned int irq)
206{
207 TX4927_IRQ_DPRINTK(TX4927_IRQ_CP0_DISABLE, "irq=%d \n", irq);
208
209 tx4927_irq_cp0_modify(CCP0_STATUS, tx4927_irq_cp0_mask(irq), 0);
210}
211
212/*
213 * Functions for pic
214 */
215u32 tx4927_irq_pic_addr(int irq)
216{
217 /* MVMCP -- need to formulize this */
218 irq -= TX4927_IRQ_PIC_BEG;
219 switch (irq) {
220 case 17:
221 case 16:
222 case 1:
223 case 0:
224 return (0xff1ff610);
225
226 case 19:
227 case 18:
228 case 3:
229 case 2:
230 return (0xff1ff614);
231
232 case 21:
233 case 20:
234 case 5:
235 case 4:
236 return (0xff1ff618);
237
238 case 23:
239 case 22:
240 case 7:
241 case 6:
242 return (0xff1ff61c);
243
244 case 25:
245 case 24:
246 case 9:
247 case 8:
248 return (0xff1ff620);
249
250 case 27:
251 case 26:
252 case 11:
253 case 10:
254 return (0xff1ff624);
255
256 case 29:
257 case 28:
258 case 13:
259 case 12:
260 return (0xff1ff628);
261
262 case 31:
263 case 30:
264 case 15:
265 case 14:
266 return (0xff1ff62c);
267
268 }
269 return (0);
270}
271
272u32 tx4927_irq_pic_mask(int irq)
273{
274 /* MVMCP -- need to formulize this */
275 irq -= TX4927_IRQ_PIC_BEG;
276 switch (irq) {
277 case 31:
278 case 29:
279 case 27:
280 case 25:
281 case 23:
282 case 21:
283 case 19:
284 case 17:{
285 return (0x07000000);
286 }
287 case 30:
288 case 28:
289 case 26:
290 case 24:
291 case 22:
292 case 20:
293 case 18:
294 case 16:{
295 return (0x00070000);
296 }
297 case 15:
298 case 13:
299 case 11:
300 case 9:
301 case 7:
302 case 5:
303 case 3:
304 case 1:{
305 return (0x00000700);
306 }
307 case 14:
308 case 12:
309 case 10:
310 case 8:
311 case 6:
312 case 4:
313 case 2:
314 case 0:{
315 return (0x00000007);
316 }
317 }
318 return (0x00000000);
319}
320
321static void tx4927_irq_pic_modify(unsigned pic_reg, unsigned clr_bits,
322 unsigned set_bits)
323{
324 unsigned long val = 0;
325
326 val = TX4927_RD(pic_reg);
327 val &= (~clr_bits);
328 val |= (set_bits);
329 TX4927_WR(pic_reg, val);
330}
331
332static void __init tx4927_irq_pic_init(void)
333{
334 int i;
335
336 TX4927_IRQ_DPRINTK(TX4927_IRQ_PIC_INIT, "beg=%d end=%d\n",
337 TX4927_IRQ_PIC_BEG, TX4927_IRQ_PIC_END);
338
339 for (i = TX4927_IRQ_PIC_BEG; i <= TX4927_IRQ_PIC_END; i++)
340 set_irq_chip_and_handler(i, &tx4927_irq_pic_type,
341 handle_level_irq);
342
343 setup_irq(TX4927_IRQ_NEST_PIC_ON_CP0, &tx4927_irq_pic_action);
344
345 TX4927_WR(0xff1ff640, 0x6); /* irq level mask -- only accept hightest */
346 TX4927_WR(0xff1ff600, TX4927_RD(0xff1ff600) | 0x1); /* irq enable */
347}
348
349static void tx4927_irq_pic_enable(unsigned int irq)
350{
351 TX4927_IRQ_DPRINTK(TX4927_IRQ_PIC_ENABLE, "irq=%d\n", irq);
352
353 tx4927_irq_pic_modify(tx4927_irq_pic_addr(irq), 0,
354 tx4927_irq_pic_mask(irq));
355}
356
357static void tx4927_irq_pic_disable(unsigned int irq)
358{
359 TX4927_IRQ_DPRINTK(TX4927_IRQ_PIC_DISABLE, "irq=%d\n", irq);
360
361 tx4927_irq_pic_modify(tx4927_irq_pic_addr(irq),
362 tx4927_irq_pic_mask(irq), 0);
363}
364
365/*
366 * Main init functions
367 */
368void __init tx4927_irq_init(void) 35void __init tx4927_irq_init(void)
369{ 36{
370 TX4927_IRQ_DPRINTK(TX4927_IRQ_INIT, "-\n"); 37 mips_cpu_irq_init();
371 38 txx9_irq_init(TX4927_IRC_REG);
372 TX4927_IRQ_DPRINTK(TX4927_IRQ_INIT, "=Calling tx4927_irq_cp0_init()\n"); 39 set_irq_chained_handler(TX4927_IRQ_NEST_PIC_ON_CP0, handle_simple_irq);
373 tx4927_irq_cp0_init();
374
375 TX4927_IRQ_DPRINTK(TX4927_IRQ_INIT, "=Calling tx4927_irq_pic_init()\n");
376 tx4927_irq_pic_init();
377
378 TX4927_IRQ_DPRINTK(TX4927_IRQ_INIT, "+\n");
379}
380
381static int tx4927_irq_nested(void)
382{
383 int sw_irq = 0;
384 u32 level2;
385
386 TX4927_IRQ_DPRINTK(TX4927_IRQ_NEST1, "-\n");
387
388 level2 = TX4927_RD(0xff1ff6a0);
389 TX4927_IRQ_DPRINTK(TX4927_IRQ_NEST2, "=level2a=0x%x\n", level2);
390
391 if ((level2 & 0x10000) == 0) {
392 level2 &= 0x1f;
393 TX4927_IRQ_DPRINTK(TX4927_IRQ_NEST3, "=level2b=0x%x\n", level2);
394
395 sw_irq = TX4927_IRQ_PIC_BEG + level2;
396 TX4927_IRQ_DPRINTK(TX4927_IRQ_NEST3, "=sw_irq=%d\n", sw_irq);
397
398 if (sw_irq == 27) {
399 TX4927_IRQ_DPRINTK(TX4927_IRQ_NEST4, "=irq-%d\n",
400 sw_irq);
401
402#ifdef CONFIG_TOSHIBA_RBTX4927
403 {
404 sw_irq = toshiba_rbtx4927_irq_nested(sw_irq);
405 }
406#endif
407
408 TX4927_IRQ_DPRINTK(TX4927_IRQ_NEST4, "=irq+%d\n",
409 sw_irq);
410 }
411 }
412
413 TX4927_IRQ_DPRINTK(TX4927_IRQ_NEST2, "=sw_irq=%d\n", sw_irq);
414
415 TX4927_IRQ_DPRINTK(TX4927_IRQ_NEST1, "+\n");
416
417 return (sw_irq);
418} 40}
419 41
420asmlinkage void plat_irq_dispatch(void) 42asmlinkage void plat_irq_dispatch(void)
@@ -424,9 +46,12 @@ asmlinkage void plat_irq_dispatch(void)
424 if (pending & STATUSF_IP7) /* cpu timer */ 46 if (pending & STATUSF_IP7) /* cpu timer */
425 do_IRQ(TX4927_IRQ_CPU_TIMER); 47 do_IRQ(TX4927_IRQ_CPU_TIMER);
426 else if (pending & STATUSF_IP2) { /* tx4927 pic */ 48 else if (pending & STATUSF_IP2) { /* tx4927 pic */
427 unsigned int irq = tx4927_irq_nested(); 49 int irq = txx9_irq();
428 50#ifdef CONFIG_TOSHIBA_RBTX4927
429 if (unlikely(irq == 0)) { 51 if (irq == TX4927_IRQ_NEST_EXT_ON_PIC)
52 irq = toshiba_rbtx4927_irq_nested(irq);
53#endif
54 if (unlikely(irq < 0)) {
430 spurious_interrupt(); 55 spurious_interrupt();
431 return; 56 return;
432 } 57 }
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/Makefile b/arch/mips/tx4927/toshiba_rbtx4927/Makefile
index 8a991f3c1a..13f96725d7 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/Makefile
+++ b/arch/mips/tx4927/toshiba_rbtx4927/Makefile
@@ -1,3 +1,5 @@
1obj-y += toshiba_rbtx4927_prom.o 1obj-y += toshiba_rbtx4927_prom.o
2obj-y += toshiba_rbtx4927_setup.o 2obj-y += toshiba_rbtx4927_setup.o
3obj-y += toshiba_rbtx4927_irq.o 3obj-y += toshiba_rbtx4927_irq.o
4
5EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
index e265fcd31b..9607ad5e73 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
@@ -133,6 +133,7 @@ JP7 is not bus master -- do NOT use -- only 4 pci bus master's allowed -- SouthB
133#include <linux/bootmem.h> 133#include <linux/bootmem.h>
134#include <linux/blkdev.h> 134#include <linux/blkdev.h>
135#ifdef CONFIG_TOSHIBA_FPCIB0 135#ifdef CONFIG_TOSHIBA_FPCIB0
136#include <asm/i8259.h>
136#include <asm/tx4927/smsc_fdc37m81x.h> 137#include <asm/tx4927/smsc_fdc37m81x.h>
137#endif 138#endif
138#include <asm/tx4927/toshiba_rbtx4927.h> 139#include <asm/tx4927/toshiba_rbtx4927.h>
@@ -151,11 +152,6 @@ JP7 is not bus master -- do NOT use -- only 4 pci bus master's allowed -- SouthB
151#define TOSHIBA_RBTX4927_IRQ_IOC_ENABLE ( 1 << 13 ) 152#define TOSHIBA_RBTX4927_IRQ_IOC_ENABLE ( 1 << 13 )
152#define TOSHIBA_RBTX4927_IRQ_IOC_DISABLE ( 1 << 14 ) 153#define TOSHIBA_RBTX4927_IRQ_IOC_DISABLE ( 1 << 14 )
153 154
154#define TOSHIBA_RBTX4927_IRQ_ISA_INIT ( 1 << 20 )
155#define TOSHIBA_RBTX4927_IRQ_ISA_ENABLE ( 1 << 23 )
156#define TOSHIBA_RBTX4927_IRQ_ISA_DISABLE ( 1 << 24 )
157#define TOSHIBA_RBTX4927_IRQ_ISA_MASK ( 1 << 25 )
158
159#define TOSHIBA_RBTX4927_SETUP_ALL 0xffffffff 155#define TOSHIBA_RBTX4927_SETUP_ALL 0xffffffff
160#endif 156#endif
161 157
@@ -167,10 +163,6 @@ static const u32 toshiba_rbtx4927_irq_debug_flag =
167// | TOSHIBA_RBTX4927_IRQ_IOC_INIT 163// | TOSHIBA_RBTX4927_IRQ_IOC_INIT
168// | TOSHIBA_RBTX4927_IRQ_IOC_ENABLE 164// | TOSHIBA_RBTX4927_IRQ_IOC_ENABLE
169// | TOSHIBA_RBTX4927_IRQ_IOC_DISABLE 165// | TOSHIBA_RBTX4927_IRQ_IOC_DISABLE
170// | TOSHIBA_RBTX4927_IRQ_ISA_INIT
171// | TOSHIBA_RBTX4927_IRQ_ISA_ENABLE
172// | TOSHIBA_RBTX4927_IRQ_ISA_DISABLE
173// | TOSHIBA_RBTX4927_IRQ_ISA_MASK
174 ); 166 );
175#endif 167#endif
176 168
@@ -196,33 +188,14 @@ static const u32 toshiba_rbtx4927_irq_debug_flag =
196#define TOSHIBA_RBTX4927_IRQ_IOC_BEG ((TX4927_IRQ_PIC_END+1)+TOSHIBA_RBTX4927_IRQ_IOC_RAW_BEG) /* 56 */ 188#define TOSHIBA_RBTX4927_IRQ_IOC_BEG ((TX4927_IRQ_PIC_END+1)+TOSHIBA_RBTX4927_IRQ_IOC_RAW_BEG) /* 56 */
197#define TOSHIBA_RBTX4927_IRQ_IOC_END ((TX4927_IRQ_PIC_END+1)+TOSHIBA_RBTX4927_IRQ_IOC_RAW_END) /* 63 */ 189#define TOSHIBA_RBTX4927_IRQ_IOC_END ((TX4927_IRQ_PIC_END+1)+TOSHIBA_RBTX4927_IRQ_IOC_RAW_END) /* 63 */
198 190
199
200#define TOSHIBA_RBTX4927_IRQ_ISA_BEG MI8259_IRQ_ISA_BEG
201#define TOSHIBA_RBTX4927_IRQ_ISA_END MI8259_IRQ_ISA_END
202#define TOSHIBA_RBTX4927_IRQ_ISA_MID ((TOSHIBA_RBTX4927_IRQ_ISA_BEG+TOSHIBA_RBTX4927_IRQ_ISA_END+1)/2)
203
204
205#define TOSHIBA_RBTX4927_IRQ_NEST_IOC_ON_PIC TX4927_IRQ_NEST_EXT_ON_PIC 191#define TOSHIBA_RBTX4927_IRQ_NEST_IOC_ON_PIC TX4927_IRQ_NEST_EXT_ON_PIC
206#define TOSHIBA_RBTX4927_IRQ_NEST_ISA_ON_IOC (TOSHIBA_RBTX4927_IRQ_IOC_BEG+2) 192#define TOSHIBA_RBTX4927_IRQ_NEST_ISA_ON_IOC (TOSHIBA_RBTX4927_IRQ_IOC_BEG+2)
207#define TOSHIBA_RBTX4927_IRQ_NEST_ISA_ON_ISA (TOSHIBA_RBTX4927_IRQ_ISA_BEG+2)
208 193
209extern int tx4927_using_backplane; 194extern int tx4927_using_backplane;
210 195
211#ifdef CONFIG_TOSHIBA_FPCIB0
212extern void enable_8259A_irq(unsigned int irq);
213extern void disable_8259A_irq(unsigned int irq);
214extern void mask_and_ack_8259A(unsigned int irq);
215#endif
216
217static void toshiba_rbtx4927_irq_ioc_enable(unsigned int irq); 196static void toshiba_rbtx4927_irq_ioc_enable(unsigned int irq);
218static void toshiba_rbtx4927_irq_ioc_disable(unsigned int irq); 197static void toshiba_rbtx4927_irq_ioc_disable(unsigned int irq);
219 198
220#ifdef CONFIG_TOSHIBA_FPCIB0
221static void toshiba_rbtx4927_irq_isa_enable(unsigned int irq);
222static void toshiba_rbtx4927_irq_isa_disable(unsigned int irq);
223static void toshiba_rbtx4927_irq_isa_mask_and_ack(unsigned int irq);
224#endif
225
226#define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC" 199#define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC"
227static struct irq_chip toshiba_rbtx4927_irq_ioc_type = { 200static struct irq_chip toshiba_rbtx4927_irq_ioc_type = {
228 .name = TOSHIBA_RBTX4927_IOC_NAME, 201 .name = TOSHIBA_RBTX4927_IOC_NAME,
@@ -235,18 +208,6 @@ static struct irq_chip toshiba_rbtx4927_irq_ioc_type = {
235#define TOSHIBA_RBTX4927_IOC_INTR_STAT 0xbc002006 208#define TOSHIBA_RBTX4927_IOC_INTR_STAT 0xbc002006
236 209
237 210
238#ifdef CONFIG_TOSHIBA_FPCIB0
239#define TOSHIBA_RBTX4927_ISA_NAME "RBTX4927-ISA"
240static struct irq_chip toshiba_rbtx4927_irq_isa_type = {
241 .name = TOSHIBA_RBTX4927_ISA_NAME,
242 .ack = toshiba_rbtx4927_irq_isa_mask_and_ack,
243 .mask = toshiba_rbtx4927_irq_isa_disable,
244 .mask_ack = toshiba_rbtx4927_irq_isa_mask_and_ack,
245 .unmask = toshiba_rbtx4927_irq_isa_enable,
246};
247#endif
248
249
250u32 bit2num(u32 num) 211u32 bit2num(u32 num)
251{ 212{
252 u32 i; 213 u32 i;
@@ -271,31 +232,10 @@ int toshiba_rbtx4927_irq_nested(int sw_irq)
271 } 232 }
272 } 233 }
273#ifdef CONFIG_TOSHIBA_FPCIB0 234#ifdef CONFIG_TOSHIBA_FPCIB0
274 { 235 if (tx4927_using_backplane) {
275 if (tx4927_using_backplane) { 236 int irq = i8259_irq();
276 u32 level4; 237 if (irq >= 0)
277 u32 level5; 238 sw_irq = irq;
278 outb(0x0A, 0x20);
279 level4 = inb(0x20) & 0xff;
280 if (level4) {
281 sw_irq =
282 TOSHIBA_RBTX4927_IRQ_ISA_BEG +
283 bit2num(level4);
284 if (sw_irq !=
285 TOSHIBA_RBTX4927_IRQ_NEST_ISA_ON_ISA) {
286 goto RETURN;
287 }
288 }
289
290 outb(0x0A, 0xA0);
291 level5 = inb(0xA0) & 0xff;
292 if (level5) {
293 sw_irq =
294 TOSHIBA_RBTX4927_IRQ_ISA_MID +
295 bit2num(level5);
296 goto RETURN;
297 }
298 }
299 } 239 }
300#endif 240#endif
301 241
@@ -307,12 +247,6 @@ int toshiba_rbtx4927_irq_nested(int sw_irq)
307#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, IRQF_SHARED, CPU_MASK_NONE, s, NULL, NULL } 247#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, IRQF_SHARED, CPU_MASK_NONE, s, NULL, NULL }
308static struct irqaction toshiba_rbtx4927_irq_ioc_action = 248static struct irqaction toshiba_rbtx4927_irq_ioc_action =
309TOSHIBA_RBTX4927_PIC_ACTION(TOSHIBA_RBTX4927_IOC_NAME); 249TOSHIBA_RBTX4927_PIC_ACTION(TOSHIBA_RBTX4927_IOC_NAME);
310#ifdef CONFIG_TOSHIBA_FPCIB0
311static struct irqaction toshiba_rbtx4927_irq_isa_master =
312TOSHIBA_RBTX4927_PIC_ACTION(TOSHIBA_RBTX4927_ISA_NAME "/M");
313static struct irqaction toshiba_rbtx4927_irq_isa_slave =
314TOSHIBA_RBTX4927_PIC_ACTION(TOSHIBA_RBTX4927_ISA_NAME "/S");
315#endif
316 250
317 251
318/**********************************************************************************/ 252/**********************************************************************************/
@@ -378,92 +312,6 @@ static void toshiba_rbtx4927_irq_ioc_disable(unsigned int irq)
378} 312}
379 313
380 314
381/**********************************************************************************/
382/* Functions for isa */
383/**********************************************************************************/
384
385
386#ifdef CONFIG_TOSHIBA_FPCIB0
387static void __init toshiba_rbtx4927_irq_isa_init(void)
388{
389 int i;
390
391 TOSHIBA_RBTX4927_IRQ_DPRINTK(TOSHIBA_RBTX4927_IRQ_ISA_INIT,
392 "beg=%d end=%d\n",
393 TOSHIBA_RBTX4927_IRQ_ISA_BEG,
394 TOSHIBA_RBTX4927_IRQ_ISA_END);
395
396 for (i = TOSHIBA_RBTX4927_IRQ_ISA_BEG;
397 i <= TOSHIBA_RBTX4927_IRQ_ISA_END; i++)
398 set_irq_chip_and_handler(i, &toshiba_rbtx4927_irq_isa_type,
399 handle_level_irq);
400
401 setup_irq(TOSHIBA_RBTX4927_IRQ_NEST_ISA_ON_IOC,
402 &toshiba_rbtx4927_irq_isa_master);
403 setup_irq(TOSHIBA_RBTX4927_IRQ_NEST_ISA_ON_ISA,
404 &toshiba_rbtx4927_irq_isa_slave);
405
406 /* make sure we are looking at IRR (not ISR) */
407 outb(0x0A, 0x20);
408 outb(0x0A, 0xA0);
409}
410#endif
411
412
413#ifdef CONFIG_TOSHIBA_FPCIB0
414static void toshiba_rbtx4927_irq_isa_enable(unsigned int irq)
415{
416 TOSHIBA_RBTX4927_IRQ_DPRINTK(TOSHIBA_RBTX4927_IRQ_ISA_ENABLE,
417 "irq=%d\n", irq);
418
419 if (irq < TOSHIBA_RBTX4927_IRQ_ISA_BEG
420 || irq > TOSHIBA_RBTX4927_IRQ_ISA_END) {
421 TOSHIBA_RBTX4927_IRQ_DPRINTK(TOSHIBA_RBTX4927_IRQ_EROR,
422 "bad irq=%d\n", irq);
423 panic("\n");
424 }
425
426 enable_8259A_irq(irq);
427}
428#endif
429
430
431#ifdef CONFIG_TOSHIBA_FPCIB0
432static void toshiba_rbtx4927_irq_isa_disable(unsigned int irq)
433{
434 TOSHIBA_RBTX4927_IRQ_DPRINTK(TOSHIBA_RBTX4927_IRQ_ISA_DISABLE,
435 "irq=%d\n", irq);
436
437 if (irq < TOSHIBA_RBTX4927_IRQ_ISA_BEG
438 || irq > TOSHIBA_RBTX4927_IRQ_ISA_END) {
439 TOSHIBA_RBTX4927_IRQ_DPRINTK(TOSHIBA_RBTX4927_IRQ_EROR,
440 "bad irq=%d\n", irq);
441 panic("\n");
442 }
443
444 disable_8259A_irq(irq);
445}
446#endif
447
448
449#ifdef CONFIG_TOSHIBA_FPCIB0
450static void toshiba_rbtx4927_irq_isa_mask_and_ack(unsigned int irq)
451{
452 TOSHIBA_RBTX4927_IRQ_DPRINTK(TOSHIBA_RBTX4927_IRQ_ISA_MASK,
453 "irq=%d\n", irq);
454
455 if (irq < TOSHIBA_RBTX4927_IRQ_ISA_BEG
456 || irq > TOSHIBA_RBTX4927_IRQ_ISA_END) {
457 TOSHIBA_RBTX4927_IRQ_DPRINTK(TOSHIBA_RBTX4927_IRQ_EROR,
458 "bad irq=%d\n", irq);
459 panic("\n");
460 }
461
462 mask_and_ack_8259A(irq);
463}
464#endif
465
466
467void __init arch_init_irq(void) 315void __init arch_init_irq(void)
468{ 316{
469 extern void tx4927_irq_init(void); 317 extern void tx4927_irq_init(void);
@@ -471,12 +319,11 @@ void __init arch_init_irq(void)
471 tx4927_irq_init(); 319 tx4927_irq_init();
472 toshiba_rbtx4927_irq_ioc_init(); 320 toshiba_rbtx4927_irq_ioc_init();
473#ifdef CONFIG_TOSHIBA_FPCIB0 321#ifdef CONFIG_TOSHIBA_FPCIB0
474 { 322 if (tx4927_using_backplane)
475 if (tx4927_using_backplane) { 323 init_i8259_irqs();
476 toshiba_rbtx4927_irq_isa_init();
477 }
478 }
479#endif 324#endif
325 /* Onboard 10M Ether: High Active */
326 set_irq_type(RBTX4927_RTL_8019_IRQ, IRQF_TRIGGER_HIGH);
480 327
481 wbflush(); 328 wbflush();
482} 329}
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
index ea5a70b252..3e84237abe 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
@@ -151,7 +151,6 @@ unsigned long mips_memory_upper;
151static int tx4927_ccfg_toeon = 1; 151static int tx4927_ccfg_toeon = 1;
152static int tx4927_pcic_trdyto = 0; /* default: disabled */ 152static int tx4927_pcic_trdyto = 0; /* default: disabled */
153unsigned long tx4927_ce_base[8]; 153unsigned long tx4927_ce_base[8];
154void tx4927_pci_setup(void);
155void tx4927_reset_pci_pcic(void); 154void tx4927_reset_pci_pcic(void);
156int tx4927_pci66 = 0; /* 0:auto */ 155int tx4927_pci66 = 0; /* 0:auto */
157#endif 156#endif
@@ -442,7 +441,7 @@ arch_initcall(tx4927_pcibios_init);
442extern struct resource pci_io_resource; 441extern struct resource pci_io_resource;
443extern struct resource pci_mem_resource; 442extern struct resource pci_mem_resource;
444 443
445void tx4927_pci_setup(void) 444void __init tx4927_pci_setup(void)
446{ 445{
447 static int called = 0; 446 static int called = 0;
448 extern unsigned int tx4927_get_mem_size(void); 447 extern unsigned int tx4927_get_mem_size(void);
@@ -748,12 +747,6 @@ void __init toshiba_rbtx4927_setup(void)
748 } 747 }
749#endif 748#endif
750 749
751 /* setup irq stuff */
752 TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_SETUP,
753 ":Setting up tx4927 pic.\n");
754 TX4927_WR(0xff1ff604, 0x00000400); /* irq trigger */
755 TX4927_WR(0xff1ff608, 0x00000000); /* irq trigger */
756
757 /* setup serial stuff */ 750 /* setup serial stuff */
758 TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_SETUP, 751 TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_SETUP,
759 ":Setting up tx4927 sio.\n"); 752 ":Setting up tx4927 sio.\n");
@@ -915,7 +908,7 @@ void __init toshiba_rbtx4927_setup(void)
915 req.iotype = UPIO_MEM; 908 req.iotype = UPIO_MEM;
916 req.membase = (char *)(0xff1ff300 + i * 0x100); 909 req.membase = (char *)(0xff1ff300 + i * 0x100);
917 req.mapbase = 0xff1ff300 + i * 0x100; 910 req.mapbase = 0xff1ff300 + i * 0x100;
918 req.irq = 32 + i; 911 req.irq = TX4927_IRQ_PIC_BEG + 8 + i;
919 req.flags |= UPF_BUGGY_UART /*HAVE_CTS_LINE*/; 912 req.flags |= UPF_BUGGY_UART /*HAVE_CTS_LINE*/;
920 req.uartclk = 50000000; 913 req.uartclk = 50000000;
921 early_serial_txx9_setup(&req); 914 early_serial_txx9_setup(&req);
diff --git a/arch/mips/tx4938/common/Makefile b/arch/mips/tx4938/common/Makefile
index 83cda518f2..8352eca679 100644
--- a/arch/mips/tx4938/common/Makefile
+++ b/arch/mips/tx4938/common/Makefile
@@ -9,3 +9,4 @@
9obj-y += prom.o setup.o irq.o 9obj-y += prom.o setup.o irq.o
10obj-$(CONFIG_KGDB) += dbgio.o 10obj-$(CONFIG_KGDB) += dbgio.o
11 11
12EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/tx4938/common/irq.c b/arch/mips/tx4938/common/irq.c
index 3a2dbfc250..c059b899d1 100644
--- a/arch/mips/tx4938/common/irq.c
+++ b/arch/mips/tx4938/common/irq.c
@@ -11,284 +11,21 @@
11 * 11 *
12 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) 12 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
13 */ 13 */
14#include <linux/errno.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/kernel_stat.h>
17#include <linux/module.h>
18#include <linux/signal.h>
19#include <linux/sched.h>
20#include <linux/types.h>
21#include <linux/interrupt.h> 15#include <linux/interrupt.h>
22#include <linux/ioport.h> 16#include <asm/irq_cpu.h>
23#include <linux/timex.h>
24#include <linux/slab.h>
25#include <linux/random.h>
26#include <linux/irq.h>
27#include <asm/bitops.h>
28#include <asm/bootinfo.h>
29#include <asm/io.h>
30#include <asm/irq.h>
31#include <asm/mipsregs.h> 17#include <asm/mipsregs.h>
32#include <asm/system.h>
33#include <asm/wbflush.h>
34#include <asm/tx4938/rbtx4938.h> 18#include <asm/tx4938/rbtx4938.h>
35 19
36/**********************************************************************************/
37/* Forwad definitions for all pic's */
38/**********************************************************************************/
39
40static void tx4938_irq_cp0_enable(unsigned int irq);
41static void tx4938_irq_cp0_disable(unsigned int irq);
42
43static void tx4938_irq_pic_enable(unsigned int irq);
44static void tx4938_irq_pic_disable(unsigned int irq);
45
46/**********************************************************************************/
47/* Kernel structs for all pic's */
48/**********************************************************************************/
49
50#define TX4938_CP0_NAME "TX4938-CP0"
51static struct irq_chip tx4938_irq_cp0_type = {
52 .name = TX4938_CP0_NAME,
53 .ack = tx4938_irq_cp0_disable,
54 .mask = tx4938_irq_cp0_disable,
55 .mask_ack = tx4938_irq_cp0_disable,
56 .unmask = tx4938_irq_cp0_enable,
57};
58
59#define TX4938_PIC_NAME "TX4938-PIC"
60static struct irq_chip tx4938_irq_pic_type = {
61 .name = TX4938_PIC_NAME,
62 .ack = tx4938_irq_pic_disable,
63 .mask = tx4938_irq_pic_disable,
64 .mask_ack = tx4938_irq_pic_disable,
65 .unmask = tx4938_irq_pic_enable,
66};
67
68static struct irqaction tx4938_irq_pic_action = {
69 .handler = no_action,
70 .flags = 0,
71 .mask = CPU_MASK_NONE,
72 .name = TX4938_PIC_NAME
73};
74
75/**********************************************************************************/
76/* Functions for cp0 */
77/**********************************************************************************/
78
79#define tx4938_irq_cp0_mask(irq) ( 1 << ( irq-TX4938_IRQ_CP0_BEG+8 ) )
80
81static void __init
82tx4938_irq_cp0_init(void)
83{
84 int i;
85
86 for (i = TX4938_IRQ_CP0_BEG; i <= TX4938_IRQ_CP0_END; i++)
87 set_irq_chip_and_handler(i, &tx4938_irq_cp0_type,
88 handle_level_irq);
89}
90
91static void
92tx4938_irq_cp0_enable(unsigned int irq)
93{
94 set_c0_status(tx4938_irq_cp0_mask(irq));
95}
96
97static void
98tx4938_irq_cp0_disable(unsigned int irq)
99{
100 clear_c0_status(tx4938_irq_cp0_mask(irq));
101}
102
103/**********************************************************************************/
104/* Functions for pic */
105/**********************************************************************************/
106
107u32
108tx4938_irq_pic_addr(int irq)
109{
110 /* MVMCP -- need to formulize this */
111 irq -= TX4938_IRQ_PIC_BEG;
112
113 switch (irq) {
114 case 17:
115 case 16:
116 case 1:
117 case 0:{
118 return (TX4938_MKA(TX4938_IRC_IRLVL0));
119 }
120 case 19:
121 case 18:
122 case 3:
123 case 2:{
124 return (TX4938_MKA(TX4938_IRC_IRLVL1));
125 }
126 case 21:
127 case 20:
128 case 5:
129 case 4:{
130 return (TX4938_MKA(TX4938_IRC_IRLVL2));
131 }
132 case 23:
133 case 22:
134 case 7:
135 case 6:{
136 return (TX4938_MKA(TX4938_IRC_IRLVL3));
137 }
138 case 25:
139 case 24:
140 case 9:
141 case 8:{
142 return (TX4938_MKA(TX4938_IRC_IRLVL4));
143 }
144 case 27:
145 case 26:
146 case 11:
147 case 10:{
148 return (TX4938_MKA(TX4938_IRC_IRLVL5));
149 }
150 case 29:
151 case 28:
152 case 13:
153 case 12:{
154 return (TX4938_MKA(TX4938_IRC_IRLVL6));
155 }
156 case 31:
157 case 30:
158 case 15:
159 case 14:{
160 return (TX4938_MKA(TX4938_IRC_IRLVL7));
161 }
162 }
163
164 return 0;
165}
166
167u32
168tx4938_irq_pic_mask(int irq)
169{
170 /* MVMCP -- need to formulize this */
171 irq -= TX4938_IRQ_PIC_BEG;
172
173 switch (irq) {
174 case 31:
175 case 29:
176 case 27:
177 case 25:
178 case 23:
179 case 21:
180 case 19:
181 case 17:{
182 return (0x07000000);
183 }
184 case 30:
185 case 28:
186 case 26:
187 case 24:
188 case 22:
189 case 20:
190 case 18:
191 case 16:{
192 return (0x00070000);
193 }
194 case 15:
195 case 13:
196 case 11:
197 case 9:
198 case 7:
199 case 5:
200 case 3:
201 case 1:{
202 return (0x00000700);
203 }
204 case 14:
205 case 12:
206 case 10:
207 case 8:
208 case 6:
209 case 4:
210 case 2:
211 case 0:{
212 return (0x00000007);
213 }
214 }
215 return 0x00000000;
216}
217
218static void
219tx4938_irq_pic_modify(unsigned pic_reg, unsigned clr_bits, unsigned set_bits)
220{
221 unsigned long val = 0;
222
223 val = TX4938_RD(pic_reg);
224 val &= (~clr_bits);
225 val |= (set_bits);
226 TX4938_WR(pic_reg, val);
227 mmiowb();
228 TX4938_RD(pic_reg);
229}
230
231static void __init
232tx4938_irq_pic_init(void)
233{
234 int i;
235
236 for (i = TX4938_IRQ_PIC_BEG; i <= TX4938_IRQ_PIC_END; i++)
237 set_irq_chip_and_handler(i, &tx4938_irq_pic_type,
238 handle_level_irq);
239
240 setup_irq(TX4938_IRQ_NEST_PIC_ON_CP0, &tx4938_irq_pic_action);
241
242 TX4938_WR(0xff1ff640, 0x6); /* irq level mask -- only accept hightest */
243 TX4938_WR(0xff1ff600, TX4938_RD(0xff1ff600) | 0x1); /* irq enable */
244}
245
246static void
247tx4938_irq_pic_enable(unsigned int irq)
248{
249 tx4938_irq_pic_modify(tx4938_irq_pic_addr(irq), 0,
250 tx4938_irq_pic_mask(irq));
251}
252
253static void
254tx4938_irq_pic_disable(unsigned int irq)
255{
256 tx4938_irq_pic_modify(tx4938_irq_pic_addr(irq),
257 tx4938_irq_pic_mask(irq), 0);
258}
259
260/**********************************************************************************/
261/* Main init functions */
262/**********************************************************************************/
263
264void __init 20void __init
265tx4938_irq_init(void) 21tx4938_irq_init(void)
266{ 22{
267 tx4938_irq_cp0_init(); 23 mips_cpu_irq_init();
268 tx4938_irq_pic_init(); 24 txx9_irq_init(TX4938_IRC_REG);
25 set_irq_chained_handler(TX4938_IRQ_NEST_PIC_ON_CP0, handle_simple_irq);
269} 26}
270 27
271int 28int toshiba_rbtx4938_irq_nested(int irq);
272tx4938_irq_nested(void)
273{
274 int sw_irq = 0;
275 u32 level2;
276
277 level2 = TX4938_RD(0xff1ff6a0);
278 if ((level2 & 0x10000) == 0) {
279 level2 &= 0x1f;
280 sw_irq = TX4938_IRQ_PIC_BEG + level2;
281 if (sw_irq == 26) {
282 {
283 extern int toshiba_rbtx4938_irq_nested(int sw_irq);
284 sw_irq = toshiba_rbtx4938_irq_nested(sw_irq);
285 }
286 }
287 }
288
289 wbflush();
290 return sw_irq;
291}
292 29
293asmlinkage void plat_irq_dispatch(void) 30asmlinkage void plat_irq_dispatch(void)
294{ 31{
@@ -297,8 +34,10 @@ asmlinkage void plat_irq_dispatch(void)
297 if (pending & STATUSF_IP7) 34 if (pending & STATUSF_IP7)
298 do_IRQ(TX4938_IRQ_CPU_TIMER); 35 do_IRQ(TX4938_IRQ_CPU_TIMER);
299 else if (pending & STATUSF_IP2) { 36 else if (pending & STATUSF_IP2) {
300 int irq = tx4938_irq_nested(); 37 int irq = txx9_irq();
301 if (irq) 38 if (irq == TX4938_IRQ_PIC_BEG + TX4938_IR_INT(0))
39 irq = toshiba_rbtx4938_irq_nested(irq);
40 if (irq >= 0)
302 do_IRQ(irq); 41 do_IRQ(irq);
303 else 42 else
304 spurious_interrupt(); 43 spurious_interrupt();
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/Makefile b/arch/mips/tx4938/toshiba_rbtx4938/Makefile
index 10c94e62bf..675bb1c3e4 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/Makefile
+++ b/arch/mips/tx4938/toshiba_rbtx4938/Makefile
@@ -7,3 +7,5 @@
7# 7#
8 8
9obj-y += prom.o setup.o irq.o spi_eeprom.o 9obj-y += prom.o setup.o irq.o spi_eeprom.o
10
11EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/irq.c b/arch/mips/tx4938/toshiba_rbtx4938/irq.c
index 91aea7aff5..f00185017e 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/irq.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/irq.c
@@ -181,7 +181,7 @@ void __init arch_init_irq(void)
181 tx4938_irq_init(); 181 tx4938_irq_init();
182 toshiba_rbtx4938_irq_ioc_init(); 182 toshiba_rbtx4938_irq_ioc_init();
183 /* Onboard 10M Ether: High Active */ 183 /* Onboard 10M Ether: High Active */
184 TX4938_WR(TX4938_MKA(TX4938_IRC_IRDM0), 0x00000040); 184 set_irq_type(RBTX4938_IRQ_ETHER, IRQF_TRIGGER_HIGH);
185 185
186 wbflush(); 186 wbflush();
187} 187}
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
index f9ad482749..f236b1ff89 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
@@ -773,10 +773,6 @@ void __init tx4938_board_setup(void)
773 txboard_add_phys_region(base, size); 773 txboard_add_phys_region(base, size);
774 } 774 }
775 775
776 /* IRC */
777 /* disable interrupt control */
778 tx4938_ircptr->cer = 0;
779
780 /* TMR */ 776 /* TMR */
781 /* disable all timers */ 777 /* disable all timers */
782 for (i = 0; i < TX4938_NR_TMR; i++) { 778 for (i = 0; i < TX4938_NR_TMR; i++) {
@@ -875,9 +871,6 @@ void __init toshiba_rbtx4938_setup(void)
875 if (txx9_master_clock == 0) 871 if (txx9_master_clock == 0)
876 txx9_master_clock = 25000000; /* 25MHz */ 872 txx9_master_clock = 25000000; /* 25MHz */
877 tx4938_board_setup(); 873 tx4938_board_setup();
878 /* setup irq stuff */
879 TX4938_WR(TX4938_MKA(TX4938_IRC_IRDM0), 0x00000000); /* irq trigger */
880 TX4938_WR(TX4938_MKA(TX4938_IRC_IRDM1), 0x00000000); /* irq trigger */
881 /* setup serial stuff */ 874 /* setup serial stuff */
882 TX4938_WR(0xff1ff314, 0x00000000); /* h/w flow control off */ 875 TX4938_WR(0xff1ff314, 0x00000000); /* h/w flow control off */
883 TX4938_WR(0xff1ff414, 0x00000000); /* h/w flow control off */ 876 TX4938_WR(0xff1ff414, 0x00000000); /* h/w flow control off */
@@ -897,7 +890,7 @@ void __init toshiba_rbtx4938_setup(void)
897 req.iotype = UPIO_MEM; 890 req.iotype = UPIO_MEM;
898 req.membase = (char *)(0xff1ff300 + i * 0x100); 891 req.membase = (char *)(0xff1ff300 + i * 0x100);
899 req.mapbase = 0xff1ff300 + i * 0x100; 892 req.mapbase = 0xff1ff300 + i * 0x100;
900 req.irq = 32 + i; 893 req.irq = RBTX4938_IRQ_IRC_SIO(i);
901 req.flags |= UPF_BUGGY_UART /*HAVE_CTS_LINE*/; 894 req.flags |= UPF_BUGGY_UART /*HAVE_CTS_LINE*/;
902 req.uartclk = 50000000; 895 req.uartclk = 50000000;
903 early_serial_txx9_setup(&req); 896 early_serial_txx9_setup(&req);
@@ -1115,14 +1108,14 @@ static void __init txx9_spi_init(unsigned long base, int irq)
1115 .flags = IORESOURCE_IRQ, 1108 .flags = IORESOURCE_IRQ,
1116 }, 1109 },
1117 }; 1110 };
1118 platform_device_register_simple("txx9spi", 0, 1111 platform_device_register_simple("spi_txx9", 0,
1119 res, ARRAY_SIZE(res)); 1112 res, ARRAY_SIZE(res));
1120} 1113}
1121 1114
1122static int __init rbtx4938_spi_init(void) 1115static int __init rbtx4938_spi_init(void)
1123{ 1116{
1124 struct spi_board_info srtc_info = { 1117 struct spi_board_info srtc_info = {
1125 .modalias = "rs5c348", 1118 .modalias = "rtc-rs5c348",
1126 .max_speed_hz = 1000000, /* 1.0Mbps @ Vdd 2.0V */ 1119 .max_speed_hz = 1000000, /* 1.0Mbps @ Vdd 2.0V */
1127 .bus_num = 0, 1120 .bus_num = 0,
1128 .chip_select = 16 + SRTC_CS, 1121 .chip_select = 16 + SRTC_CS,
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index bb23ff71c2..2989c6682b 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -285,147 +285,6 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf)
285 return err; 285 return err;
286} 286}
287 287
288struct linux32_dirent {
289 u32 d_ino;
290 compat_off_t d_off;
291 u16 d_reclen;
292 char d_name[1];
293};
294
295struct old_linux32_dirent {
296 u32 d_ino;
297 u32 d_offset;
298 u16 d_namlen;
299 char d_name[1];
300};
301
302struct getdents32_callback {
303 struct linux32_dirent __user * current_dir;
304 struct linux32_dirent __user * previous;
305 int count;
306 int error;
307};
308
309struct readdir32_callback {
310 struct old_linux32_dirent __user * dirent;
311 int count;
312};
313
314#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
315static int filldir32 (void *__buf, const char *name, int namlen,
316 loff_t offset, u64 ino, unsigned int d_type)
317{
318 struct linux32_dirent __user * dirent;
319 struct getdents32_callback * buf = (struct getdents32_callback *) __buf;
320 int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, 4);
321 u32 d_ino;
322
323 buf->error = -EINVAL; /* only used if we fail.. */
324 if (reclen > buf->count)
325 return -EINVAL;
326 d_ino = ino;
327 if (sizeof(d_ino) < sizeof(ino) && d_ino != ino)
328 return -EOVERFLOW;
329 dirent = buf->previous;
330 if (dirent)
331 put_user(offset, &dirent->d_off);
332 dirent = buf->current_dir;
333 buf->previous = dirent;
334 put_user(d_ino, &dirent->d_ino);
335 put_user(reclen, &dirent->d_reclen);
336 copy_to_user(dirent->d_name, name, namlen);
337 put_user(0, dirent->d_name + namlen);
338 dirent = ((void __user *)dirent) + reclen;
339 buf->current_dir = dirent;
340 buf->count -= reclen;
341 return 0;
342}
343
344asmlinkage long
345sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count)
346{
347 struct file * file;
348 struct linux32_dirent __user * lastdirent;
349 struct getdents32_callback buf;
350 int error;
351
352 error = -EFAULT;
353 if (!access_ok(VERIFY_WRITE, dirent, count))
354 goto out;
355
356 error = -EBADF;
357 file = fget(fd);
358 if (!file)
359 goto out;
360
361 buf.current_dir = (struct linux32_dirent __user *) dirent;
362 buf.previous = NULL;
363 buf.count = count;
364 buf.error = 0;
365
366 error = vfs_readdir(file, filldir32, &buf);
367 if (error < 0)
368 goto out_putf;
369 error = buf.error;
370 lastdirent = buf.previous;
371 if (lastdirent) {
372 if (put_user(file->f_pos, &lastdirent->d_off))
373 error = -EFAULT;
374 else
375 error = count - buf.count;
376 }
377
378out_putf:
379 fput(file);
380out:
381 return error;
382}
383
384static int fillonedir32(void * __buf, const char * name, int namlen,
385 loff_t offset, u64 ino, unsigned int d_type)
386{
387 struct readdir32_callback * buf = (struct readdir32_callback *) __buf;
388 struct old_linux32_dirent __user * dirent;
389 u32 d_ino;
390
391 if (buf->count)
392 return -EINVAL;
393 d_ino = ino;
394 if (sizeof(d_ino) < sizeof(ino) && d_ino != ino)
395 return -EOVERFLOW;
396 buf->count++;
397 dirent = buf->dirent;
398 put_user(d_ino, &dirent->d_ino);
399 put_user(offset, &dirent->d_offset);
400 put_user(namlen, &dirent->d_namlen);
401 copy_to_user(dirent->d_name, name, namlen);
402 put_user(0, dirent->d_name + namlen);
403 return 0;
404}
405
406asmlinkage long
407sys32_readdir (unsigned int fd, void __user * dirent, unsigned int count)
408{
409 int error;
410 struct file * file;
411 struct readdir32_callback buf;
412
413 error = -EBADF;
414 file = fget(fd);
415 if (!file)
416 goto out;
417
418 buf.count = 0;
419 buf.dirent = dirent;
420
421 error = vfs_readdir(file, fillonedir32, &buf);
422 if (error >= 0)
423 error = buf.count;
424 fput(file);
425out:
426 return error;
427}
428
429/*** copied from mips64 ***/ 288/*** copied from mips64 ***/
430/* 289/*
431 * Ooo, nasty. We need here to frob 32-bit unsigned longs to 290 * Ooo, nasty. We need here to frob 32-bit unsigned longs to
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index 627f3c28ad..2540786a97 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -222,9 +222,7 @@
222 ENTRY_SAME(setfsgid) 222 ENTRY_SAME(setfsgid)
223 /* I think this might work */ 223 /* I think this might work */
224 ENTRY_SAME(llseek) /* 140 */ 224 ENTRY_SAME(llseek) /* 140 */
225 /* struct linux_dirent has longs, like 'unsigned long d_ino' which 225 ENTRY_COMP(getdents)
226 * almost definitely should be 'ino_t d_ino' but it's too late now */
227 ENTRY_DIFF(getdents)
228 /* it is POSSIBLE that select will be OK because even though fd_set 226 /* it is POSSIBLE that select will be OK because even though fd_set
229 * contains longs, the macros and sizes are clever. */ 227 * contains longs, the macros and sizes are clever. */
230 ENTRY_COMP(select) 228 ENTRY_COMP(select)
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index d4e6a93c8d..ee7a16eb6f 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -81,6 +81,8 @@ SECTIONS
81 __ex_table : { *(__ex_table) } 81 __ex_table : { *(__ex_table) }
82 __stop___ex_table = .; 82 __stop___ex_table = .;
83 83
84 NOTES
85
84 __start___unwind = .; /* unwind info */ 86 __start___unwind = .; /* unwind info */
85 .PARISC.unwind : { *(.PARISC.unwind) } 87 .PARISC.unwind : { *(.PARISC.unwind) }
86 __stop___unwind = .; 88 __stop___unwind = .;
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 502f47c017..44c065a6b5 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -99,6 +99,7 @@
99 #size-cells = <0>; 99 #size-cells = <0>;
100 interrupt-parent = < &ipic >; 100 interrupt-parent = < &ipic >;
101 interrupts = <26 8>; 101 interrupts = <26 8>;
102 dr_mode = "peripheral";
102 phy_type = "ulpi"; 103 phy_type = "ulpi";
103 }; 104 };
104 105
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index d9ac24e8de..8b47c84642 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -1,9 +1,23 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc3
4# Tue Jun 26 12:32:34 2007 4# Wed Aug 22 15:19:19 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7
8#
9# Processor support
10#
11# CONFIG_POWER4_ONLY is not set
12CONFIG_POWER3=y
13CONFIG_POWER4=y
14CONFIG_PPC_FPU=y
15CONFIG_ALTIVEC=y
16CONFIG_PPC_STD_MMU=y
17CONFIG_PPC_MM_SLICES=y
18CONFIG_VIRT_CPU_ACCOUNTING=y
19CONFIG_SMP=y
20CONFIG_NR_CPUS=4
7CONFIG_64BIT=y 21CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y 22CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 23CONFIG_MMU=y
@@ -15,6 +29,7 @@ CONFIG_ARCH_HAS_ILOG2_U64=y
15CONFIG_GENERIC_HWEIGHT=y 29CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y 30CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y 31CONFIG_GENERIC_FIND_NEXT_BIT=y
32CONFIG_ARCH_NO_VIRT_TO_BUS=y
18CONFIG_PPC=y 33CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y 34CONFIG_EARLY_PRINTK=y
20CONFIG_COMPAT=y 35CONFIG_COMPAT=y
@@ -22,51 +37,33 @@ CONFIG_SYSVIPC_COMPAT=y
22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
25CONFIG_PPC_UDBG_16550=y 41CONFIG_PPC_UDBG_16550=y
26# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
27CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set 45# CONFIG_DEFAULT_UIMAGE is not set
30
31#
32# Processor support
33#
34# CONFIG_POWER4_ONLY is not set
35CONFIG_POWER3=y
36CONFIG_POWER4=y
37CONFIG_PPC_FPU=y
38# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
39CONFIG_PPC_DCR_MMIO=y 47CONFIG_PPC_DCR_MMIO=y
40CONFIG_PPC_DCR=y 48CONFIG_PPC_DCR=y
41CONFIG_PPC_OF_PLATFORM_PCI=y 49CONFIG_PPC_OF_PLATFORM_PCI=y
42CONFIG_ALTIVEC=y
43CONFIG_PPC_STD_MMU=y
44CONFIG_PPC_MM_SLICES=y
45CONFIG_VIRT_CPU_ACCOUNTING=y
46CONFIG_SMP=y
47CONFIG_NR_CPUS=4
48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
49 51
50# 52#
51# Code maturity level options 53# General setup
52# 54#
53CONFIG_EXPERIMENTAL=y 55CONFIG_EXPERIMENTAL=y
54CONFIG_LOCK_KERNEL=y 56CONFIG_LOCK_KERNEL=y
55CONFIG_INIT_ENV_ARG_LIMIT=32 57CONFIG_INIT_ENV_ARG_LIMIT=32
56
57#
58# General setup
59#
60CONFIG_LOCALVERSION="" 58CONFIG_LOCALVERSION=""
61CONFIG_LOCALVERSION_AUTO=y 59CONFIG_LOCALVERSION_AUTO=y
62CONFIG_SWAP=y 60CONFIG_SWAP=y
63CONFIG_SYSVIPC=y 61CONFIG_SYSVIPC=y
64# CONFIG_IPC_NS is not set
65CONFIG_SYSVIPC_SYSCTL=y 62CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 63# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 64# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 65# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 66# CONFIG_USER_NS is not set
70# CONFIG_AUDIT is not set 67# CONFIG_AUDIT is not set
71CONFIG_IKCONFIG=y 68CONFIG_IKCONFIG=y
72CONFIG_IKCONFIG_PROC=y 69CONFIG_IKCONFIG_PROC=y
@@ -96,16 +93,13 @@ CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y 93CONFIG_EVENTFD=y
97CONFIG_SHMEM=y 94CONFIG_SHMEM=y
98CONFIG_VM_EVENT_COUNTERS=y 95CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y 96CONFIG_SLUB_DEBUG=y
100# CONFIG_SLUB is not set 97# CONFIG_SLAB is not set
98CONFIG_SLUB=y
101# CONFIG_SLOB is not set 99# CONFIG_SLOB is not set
102CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
103# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
104CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
105
106#
107# Loadable module support
108#
109CONFIG_MODULES=y 103CONFIG_MODULES=y
110CONFIG_MODULE_UNLOAD=y 104CONFIG_MODULE_UNLOAD=y
111# CONFIG_MODULE_FORCE_UNLOAD is not set 105# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -113,12 +107,9 @@ CONFIG_MODULE_UNLOAD=y
113# CONFIG_MODULE_SRCVERSION_ALL is not set 107# CONFIG_MODULE_SRCVERSION_ALL is not set
114CONFIG_KMOD=y 108CONFIG_KMOD=y
115CONFIG_STOP_MACHINE=y 109CONFIG_STOP_MACHINE=y
116
117#
118# Block layer
119#
120CONFIG_BLOCK=y 110CONFIG_BLOCK=y
121# CONFIG_BLK_DEV_IO_TRACE is not set 111# CONFIG_BLK_DEV_IO_TRACE is not set
112# CONFIG_BLK_DEV_BSG is not set
122 113
123# 114#
124# IO Schedulers 115# IO Schedulers
@@ -138,7 +129,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
138# 129#
139CONFIG_PPC_MULTIPLATFORM=y 130CONFIG_PPC_MULTIPLATFORM=y
140# CONFIG_EMBEDDED6xx is not set 131# CONFIG_EMBEDDED6xx is not set
141# CONFIG_APUS is not set 132# CONFIG_PPC_82xx is not set
133# CONFIG_PPC_83xx is not set
134# CONFIG_PPC_86xx is not set
142# CONFIG_PPC_PSERIES is not set 135# CONFIG_PPC_PSERIES is not set
143# CONFIG_PPC_ISERIES is not set 136# CONFIG_PPC_ISERIES is not set
144# CONFIG_PPC_MPC52xx is not set 137# CONFIG_PPC_MPC52xx is not set
@@ -158,7 +151,11 @@ CONFIG_PS3_HTAB_SIZE=20
158CONFIG_PS3_USE_LPAR_ADDR=y 151CONFIG_PS3_USE_LPAR_ADDR=y
159CONFIG_PS3_VUART=y 152CONFIG_PS3_VUART=y
160CONFIG_PS3_PS3AV=y 153CONFIG_PS3_PS3AV=y
161CONFIG_PS3_SYS_MANAGER=y 154CONFIG_PS3_SYS_MANAGER=m
155CONFIG_PS3_STORAGE=y
156CONFIG_PS3_DISK=y
157CONFIG_PS3_ROM=m
158CONFIG_PS3_FLASH=m
162CONFIG_PPC_CELL=y 159CONFIG_PPC_CELL=y
163CONFIG_PPC_CELL_NATIVE=y 160CONFIG_PPC_CELL_NATIVE=y
164CONFIG_PPC_IBM_CELL_BLADE=y 161CONFIG_PPC_IBM_CELL_BLADE=y
@@ -171,6 +168,7 @@ CONFIG_SPU_BASE=y
171CONFIG_CBE_RAS=y 168CONFIG_CBE_RAS=y
172CONFIG_CBE_THERM=m 169CONFIG_CBE_THERM=m
173CONFIG_CBE_CPUFREQ=m 170CONFIG_CBE_CPUFREQ=m
171CONFIG_CBE_CPUFREQ_PMI=m
174# CONFIG_PQ2ADS is not set 172# CONFIG_PQ2ADS is not set
175CONFIG_PPC_NATIVE=y 173CONFIG_PPC_NATIVE=y
176CONFIG_UDBG_RTAS_CONSOLE=y 174CONFIG_UDBG_RTAS_CONSOLE=y
@@ -183,7 +181,7 @@ CONFIG_PPC_RTAS=y
183# CONFIG_RTAS_ERROR_LOGGING is not set 181# CONFIG_RTAS_ERROR_LOGGING is not set
184CONFIG_RTAS_PROC=y 182CONFIG_RTAS_PROC=y
185CONFIG_RTAS_FLASH=y 183CONFIG_RTAS_FLASH=y
186# CONFIG_PPC_PMI is not set 184CONFIG_PPC_PMI=m
187CONFIG_MMIO_NVRAM=y 185CONFIG_MMIO_NVRAM=y
188# CONFIG_PPC_MPC106 is not set 186# CONFIG_PPC_MPC106 is not set
189# CONFIG_PPC_970_NAP is not set 187# CONFIG_PPC_970_NAP is not set
@@ -206,6 +204,8 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
206# CPU Frequency drivers 204# CPU Frequency drivers
207# 205#
208# CONFIG_CPM2 is not set 206# CONFIG_CPM2 is not set
207CONFIG_AXON_RAM=m
208# CONFIG_FSL_ULI1575 is not set
209 209
210# 210#
211# Kernel options 211# Kernel options
@@ -248,6 +248,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
248CONFIG_MIGRATION=y 248CONFIG_MIGRATION=y
249CONFIG_RESOURCES_64BIT=y 249CONFIG_RESOURCES_64BIT=y
250CONFIG_ZONE_DMA_FLAG=1 250CONFIG_ZONE_DMA_FLAG=1
251CONFIG_BOUNCE=y
251CONFIG_ARCH_MEMORY_PROBE=y 252CONFIG_ARCH_MEMORY_PROBE=y
252CONFIG_NODES_SPAN_OTHER_NODES=y 253CONFIG_NODES_SPAN_OTHER_NODES=y
253CONFIG_PPC_HAS_HASH_64K=y 254CONFIG_PPC_HAS_HASH_64K=y
@@ -268,7 +269,9 @@ CONFIG_GENERIC_ISA_DMA=y
268# CONFIG_PPC_INDIRECT_PCI is not set 269# CONFIG_PPC_INDIRECT_PCI is not set
269CONFIG_PCI=y 270CONFIG_PCI=y
270CONFIG_PCI_DOMAINS=y 271CONFIG_PCI_DOMAINS=y
272CONFIG_PCI_SYSCALL=y
271CONFIG_PCIEPORTBUS=y 273CONFIG_PCIEPORTBUS=y
274CONFIG_PCIEAER=y
272CONFIG_ARCH_SUPPORTS_MSI=y 275CONFIG_ARCH_SUPPORTS_MSI=y
273# CONFIG_PCI_MSI is not set 276# CONFIG_PCI_MSI is not set
274# CONFIG_PCI_DEBUG is not set 277# CONFIG_PCI_DEBUG is not set
@@ -359,6 +362,7 @@ CONFIG_NETFILTER_XT_TARGET_DSCP=m
359CONFIG_NETFILTER_XT_TARGET_MARK=m 362CONFIG_NETFILTER_XT_TARGET_MARK=m
360CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 363CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
361CONFIG_NETFILTER_XT_TARGET_NFLOG=m 364CONFIG_NETFILTER_XT_TARGET_NFLOG=m
365# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
362CONFIG_NETFILTER_XT_TARGET_TCPMSS=m 366CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
363CONFIG_NETFILTER_XT_MATCH_COMMENT=m 367CONFIG_NETFILTER_XT_MATCH_COMMENT=m
364CONFIG_NETFILTER_XT_MATCH_DCCP=m 368CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -377,6 +381,7 @@ CONFIG_NETFILTER_XT_MATCH_SCTP=m
377CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 381CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
378CONFIG_NETFILTER_XT_MATCH_STRING=m 382CONFIG_NETFILTER_XT_MATCH_STRING=m
379CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 383CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
384CONFIG_NETFILTER_XT_MATCH_U32=m
380CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m 385CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
381 386
382# 387#
@@ -448,6 +453,7 @@ CONFIG_NET_CLS_ROUTE=y
448# CONFIG_MAC80211 is not set 453# CONFIG_MAC80211 is not set
449# CONFIG_IEEE80211 is not set 454# CONFIG_IEEE80211 is not set
450# CONFIG_RFKILL is not set 455# CONFIG_RFKILL is not set
456# CONFIG_NET_9P is not set
451 457
452# 458#
453# Device Drivers 459# Device Drivers
@@ -462,28 +468,12 @@ CONFIG_FW_LOADER=y
462# CONFIG_DEBUG_DRIVER is not set 468# CONFIG_DEBUG_DRIVER is not set
463# CONFIG_DEBUG_DEVRES is not set 469# CONFIG_DEBUG_DEVRES is not set
464# CONFIG_SYS_HYPERVISOR is not set 470# CONFIG_SYS_HYPERVISOR is not set
465
466#
467# Connector - unified userspace <-> kernelspace linker
468#
469# CONFIG_CONNECTOR is not set 471# CONFIG_CONNECTOR is not set
470# CONFIG_MTD is not set 472# CONFIG_MTD is not set
471 473CONFIG_OF_DEVICE=y
472#
473# Parallel port support
474#
475# CONFIG_PARPORT is not set 474# CONFIG_PARPORT is not set
476 475CONFIG_BLK_DEV=y
477#
478# Plug and Play support
479#
480# CONFIG_PNPACPI is not set
481
482#
483# Block devices
484#
485# CONFIG_BLK_DEV_FD is not set 476# CONFIG_BLK_DEV_FD is not set
486# CONFIG_BLK_CPQ_DA is not set
487# CONFIG_BLK_CPQ_CISS_DA is not set 477# CONFIG_BLK_CPQ_CISS_DA is not set
488# CONFIG_BLK_DEV_DAC960 is not set 478# CONFIG_BLK_DEV_DAC960 is not set
489# CONFIG_BLK_DEV_UMEM is not set 479# CONFIG_BLK_DEV_UMEM is not set
@@ -499,14 +489,11 @@ CONFIG_BLK_DEV_RAM_SIZE=131072
499CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 489CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
500# CONFIG_CDROM_PKTCDVD is not set 490# CONFIG_CDROM_PKTCDVD is not set
501# CONFIG_ATA_OVER_ETH is not set 491# CONFIG_ATA_OVER_ETH is not set
502 492CONFIG_MISC_DEVICES=y
503#
504# Misc devices
505#
506# CONFIG_PHANTOM is not set 493# CONFIG_PHANTOM is not set
494# CONFIG_EEPROM_93CX6 is not set
507# CONFIG_SGI_IOC4 is not set 495# CONFIG_SGI_IOC4 is not set
508# CONFIG_TIFM_CORE is not set 496# CONFIG_TIFM_CORE is not set
509# CONFIG_BLINK is not set
510CONFIG_IDE=y 497CONFIG_IDE=y
511CONFIG_BLK_DEV_IDE=y 498CONFIG_BLK_DEV_IDE=y
512 499
@@ -572,6 +559,7 @@ CONFIG_BLK_DEV_IDEDMA=y
572# 559#
573# CONFIG_RAID_ATTRS is not set 560# CONFIG_RAID_ATTRS is not set
574CONFIG_SCSI=y 561CONFIG_SCSI=y
562CONFIG_SCSI_DMA=y
575# CONFIG_SCSI_TGT is not set 563# CONFIG_SCSI_TGT is not set
576# CONFIG_SCSI_NETLINK is not set 564# CONFIG_SCSI_NETLINK is not set
577CONFIG_SCSI_PROC_FS=y 565CONFIG_SCSI_PROC_FS=y
@@ -604,10 +592,7 @@ CONFIG_SCSI_WAIT_SCAN=m
604# CONFIG_SCSI_ISCSI_ATTRS is not set 592# CONFIG_SCSI_ISCSI_ATTRS is not set
605CONFIG_SCSI_SAS_ATTRS=y 593CONFIG_SCSI_SAS_ATTRS=y
606# CONFIG_SCSI_SAS_LIBSAS is not set 594# CONFIG_SCSI_SAS_LIBSAS is not set
607 595CONFIG_SCSI_LOWLEVEL=y
608#
609# SCSI low-level drivers
610#
611# CONFIG_ISCSI_TCP is not set 596# CONFIG_ISCSI_TCP is not set
612# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 597# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
613# CONFIG_SCSI_3W_9XXX is not set 598# CONFIG_SCSI_3W_9XXX is not set
@@ -622,7 +607,6 @@ CONFIG_SCSI_SAS_ATTRS=y
622# CONFIG_MEGARAID_LEGACY is not set 607# CONFIG_MEGARAID_LEGACY is not set
623# CONFIG_MEGARAID_SAS is not set 608# CONFIG_MEGARAID_SAS is not set
624# CONFIG_SCSI_HPTIOP is not set 609# CONFIG_SCSI_HPTIOP is not set
625# CONFIG_SCSI_BUSLOGIC is not set
626# CONFIG_SCSI_DMX3191D is not set 610# CONFIG_SCSI_DMX3191D is not set
627# CONFIG_SCSI_EATA is not set 611# CONFIG_SCSI_EATA is not set
628# CONFIG_SCSI_FUTURE_DOMAIN is not set 612# CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -696,10 +680,6 @@ CONFIG_PATA_PDC2027X=m
696# CONFIG_PATA_VIA is not set 680# CONFIG_PATA_VIA is not set
697# CONFIG_PATA_WINBOND is not set 681# CONFIG_PATA_WINBOND is not set
698# CONFIG_PATA_SCC is not set 682# CONFIG_PATA_SCC is not set
699
700#
701# Multi-device support (RAID and LVM)
702#
703CONFIG_MD=y 683CONFIG_MD=y
704CONFIG_BLK_DEV_MD=m 684CONFIG_BLK_DEV_MD=m
705CONFIG_MD_LINEAR=m 685CONFIG_MD_LINEAR=m
@@ -717,6 +697,7 @@ CONFIG_DM_MIRROR=m
717CONFIG_DM_ZERO=m 697CONFIG_DM_ZERO=m
718CONFIG_DM_MULTIPATH=m 698CONFIG_DM_MULTIPATH=m
719# CONFIG_DM_MULTIPATH_EMC is not set 699# CONFIG_DM_MULTIPATH_EMC is not set
700# CONFIG_DM_MULTIPATH_RDAC is not set
720# CONFIG_DM_DELAY is not set 701# CONFIG_DM_DELAY is not set
721 702
722# 703#
@@ -728,43 +709,30 @@ CONFIG_FUSION=y
728CONFIG_FUSION_SAS=y 709CONFIG_FUSION_SAS=y
729CONFIG_FUSION_MAX_SGE=128 710CONFIG_FUSION_MAX_SGE=128
730# CONFIG_FUSION_CTL is not set 711# CONFIG_FUSION_CTL is not set
712# CONFIG_FUSION_LOGGING is not set
731 713
732# 714#
733# IEEE 1394 (FireWire) support 715# IEEE 1394 (FireWire) support
734# 716#
735# CONFIG_FIREWIRE is not set 717# CONFIG_FIREWIRE is not set
736# CONFIG_IEEE1394 is not set 718# CONFIG_IEEE1394 is not set
737
738#
739# I2O device support
740#
741# CONFIG_I2O is not set 719# CONFIG_I2O is not set
742# CONFIG_MACINTOSH_DRIVERS is not set 720# CONFIG_MACINTOSH_DRIVERS is not set
743
744#
745# Network device support
746#
747CONFIG_NETDEVICES=y 721CONFIG_NETDEVICES=y
722# CONFIG_NETDEVICES_MULTIQUEUE is not set
748# CONFIG_DUMMY is not set 723# CONFIG_DUMMY is not set
749CONFIG_BONDING=m 724CONFIG_BONDING=m
725CONFIG_MACVLAN=m
750# CONFIG_EQUALIZER is not set 726# CONFIG_EQUALIZER is not set
751CONFIG_TUN=y 727CONFIG_TUN=y
752# CONFIG_ARCNET is not set 728# CONFIG_ARCNET is not set
753# CONFIG_PHYLIB is not set 729# CONFIG_PHYLIB is not set
754
755#
756# Ethernet (10 or 100Mbit)
757#
758CONFIG_NET_ETHERNET=y 730CONFIG_NET_ETHERNET=y
759CONFIG_MII=y 731CONFIG_MII=y
760# CONFIG_HAPPYMEAL is not set 732# CONFIG_HAPPYMEAL is not set
761# CONFIG_SUNGEM is not set 733# CONFIG_SUNGEM is not set
762# CONFIG_CASSINI is not set 734# CONFIG_CASSINI is not set
763# CONFIG_NET_VENDOR_3COM is not set 735# CONFIG_NET_VENDOR_3COM is not set
764
765#
766# Tulip family network device support
767#
768# CONFIG_NET_TULIP is not set 736# CONFIG_NET_TULIP is not set
769# CONFIG_HP100 is not set 737# CONFIG_HP100 is not set
770# CONFIG_NET_PCI is not set 738# CONFIG_NET_PCI is not set
@@ -781,11 +749,12 @@ CONFIG_E1000_NAPI=y
781# CONFIG_SIS190 is not set 749# CONFIG_SIS190 is not set
782CONFIG_SKGE=m 750CONFIG_SKGE=m
783CONFIG_SKY2=m 751CONFIG_SKY2=m
784# CONFIG_SK98LIN is not set 752# CONFIG_SKY2_DEBUG is not set
785# CONFIG_VIA_VELOCITY is not set 753# CONFIG_VIA_VELOCITY is not set
786CONFIG_TIGON3=y 754CONFIG_TIGON3=y
787# CONFIG_BNX2 is not set 755# CONFIG_BNX2 is not set
788CONFIG_SPIDER_NET=y 756CONFIG_SPIDER_NET=y
757CONFIG_GELIC_NET=m
789# CONFIG_QLA3XXX is not set 758# CONFIG_QLA3XXX is not set
790# CONFIG_ATL1 is not set 759# CONFIG_ATL1 is not set
791CONFIG_NETDEV_10000=y 760CONFIG_NETDEV_10000=y
@@ -824,15 +793,7 @@ CONFIG_NETDEV_10000=y
824# CONFIG_NETCONSOLE is not set 793# CONFIG_NETCONSOLE is not set
825# CONFIG_NETPOLL is not set 794# CONFIG_NETPOLL is not set
826# CONFIG_NET_POLL_CONTROLLER is not set 795# CONFIG_NET_POLL_CONTROLLER is not set
827
828#
829# ISDN subsystem
830#
831# CONFIG_ISDN is not set 796# CONFIG_ISDN is not set
832
833#
834# Telephony Support
835#
836# CONFIG_PHONE is not set 797# CONFIG_PHONE is not set
837 798
838# 799#
@@ -925,10 +886,6 @@ CONFIG_UNIX98_PTYS=y
925CONFIG_HVC_DRIVER=y 886CONFIG_HVC_DRIVER=y
926CONFIG_HVC_RTAS=y 887CONFIG_HVC_RTAS=y
927CONFIG_HVC_BEAT=y 888CONFIG_HVC_BEAT=y
928
929#
930# IPMI
931#
932CONFIG_IPMI_HANDLER=m 889CONFIG_IPMI_HANDLER=m
933# CONFIG_IPMI_PANIC_EVENT is not set 890# CONFIG_IPMI_PANIC_EVENT is not set
934CONFIG_IPMI_DEVICE_INTERFACE=m 891CONFIG_IPMI_DEVICE_INTERFACE=m
@@ -963,10 +920,6 @@ CONFIG_GEN_RTC=y
963# CONFIG_DRM is not set 920# CONFIG_DRM is not set
964# CONFIG_RAW_DRIVER is not set 921# CONFIG_RAW_DRIVER is not set
965# CONFIG_HANGCHECK_TIMER is not set 922# CONFIG_HANGCHECK_TIMER is not set
966
967#
968# TPM devices
969#
970# CONFIG_TCG_TPM is not set 923# CONFIG_TCG_TPM is not set
971CONFIG_DEVPORT=y 924CONFIG_DEVPORT=y
972CONFIG_I2C=y 925CONFIG_I2C=y
@@ -1000,6 +953,7 @@ CONFIG_I2C_ALGOBIT=y
1000# CONFIG_I2C_SIS5595 is not set 953# CONFIG_I2C_SIS5595 is not set
1001# CONFIG_I2C_SIS630 is not set 954# CONFIG_I2C_SIS630 is not set
1002# CONFIG_I2C_SIS96X is not set 955# CONFIG_I2C_SIS96X is not set
956# CONFIG_I2C_TAOS_EVM is not set
1003# CONFIG_I2C_STUB is not set 957# CONFIG_I2C_STUB is not set
1004# CONFIG_I2C_TINY_USB is not set 958# CONFIG_I2C_TINY_USB is not set
1005# CONFIG_I2C_VIA is not set 959# CONFIG_I2C_VIA is not set
@@ -1011,11 +965,13 @@ CONFIG_I2C_ALGOBIT=y
1011# 965#
1012# CONFIG_SENSORS_DS1337 is not set 966# CONFIG_SENSORS_DS1337 is not set
1013# CONFIG_SENSORS_DS1374 is not set 967# CONFIG_SENSORS_DS1374 is not set
968# CONFIG_DS1682 is not set
1014# CONFIG_SENSORS_EEPROM is not set 969# CONFIG_SENSORS_EEPROM is not set
1015# CONFIG_SENSORS_PCF8574 is not set 970# CONFIG_SENSORS_PCF8574 is not set
1016# CONFIG_SENSORS_PCA9539 is not set 971# CONFIG_SENSORS_PCA9539 is not set
1017# CONFIG_SENSORS_PCF8591 is not set 972# CONFIG_SENSORS_PCF8591 is not set
1018# CONFIG_SENSORS_MAX6875 is not set 973# CONFIG_SENSORS_MAX6875 is not set
974# CONFIG_SENSORS_TSL2550 is not set
1019# CONFIG_I2C_DEBUG_CORE is not set 975# CONFIG_I2C_DEBUG_CORE is not set
1020# CONFIG_I2C_DEBUG_ALGO is not set 976# CONFIG_I2C_DEBUG_ALGO is not set
1021# CONFIG_I2C_DEBUG_BUS is not set 977# CONFIG_I2C_DEBUG_BUS is not set
@@ -1026,11 +982,8 @@ CONFIG_I2C_ALGOBIT=y
1026# 982#
1027# CONFIG_SPI is not set 983# CONFIG_SPI is not set
1028# CONFIG_SPI_MASTER is not set 984# CONFIG_SPI_MASTER is not set
1029
1030#
1031# Dallas's 1-wire bus
1032#
1033# CONFIG_W1 is not set 985# CONFIG_W1 is not set
986# CONFIG_POWER_SUPPLY is not set
1034# CONFIG_HWMON is not set 987# CONFIG_HWMON is not set
1035 988
1036# 989#
@@ -1055,6 +1008,7 @@ CONFIG_I2C_ALGOBIT=y
1055# 1008#
1056# CONFIG_DISPLAY_SUPPORT is not set 1009# CONFIG_DISPLAY_SUPPORT is not set
1057# CONFIG_VGASTATE is not set 1010# CONFIG_VGASTATE is not set
1011CONFIG_VIDEO_OUTPUT_CONTROL=m
1058# CONFIG_FB is not set 1012# CONFIG_FB is not set
1059# CONFIG_FB_IBM_GXT4500 is not set 1013# CONFIG_FB_IBM_GXT4500 is not set
1060 1014
@@ -1068,10 +1022,7 @@ CONFIG_DUMMY_CONSOLE=y
1068# Sound 1022# Sound
1069# 1023#
1070# CONFIG_SOUND is not set 1024# CONFIG_SOUND is not set
1071 1025CONFIG_HID_SUPPORT=y
1072#
1073# HID Devices
1074#
1075CONFIG_HID=m 1026CONFIG_HID=m
1076# CONFIG_HID_DEBUG is not set 1027# CONFIG_HID_DEBUG is not set
1077 1028
@@ -1085,10 +1036,7 @@ CONFIG_HID=m
1085# 1036#
1086# CONFIG_USB_KBD is not set 1037# CONFIG_USB_KBD is not set
1087# CONFIG_USB_MOUSE is not set 1038# CONFIG_USB_MOUSE is not set
1088 1039CONFIG_USB_SUPPORT=y
1089#
1090# USB support
1091#
1092CONFIG_USB_ARCH_HAS_HCD=y 1040CONFIG_USB_ARCH_HAS_HCD=y
1093CONFIG_USB_ARCH_HAS_OHCI=y 1041CONFIG_USB_ARCH_HAS_OHCI=y
1094CONFIG_USB_ARCH_HAS_EHCI=y 1042CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1122,6 +1070,7 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1122CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1070CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1123# CONFIG_USB_UHCI_HCD is not set 1071# CONFIG_USB_UHCI_HCD is not set
1124# CONFIG_USB_SL811_HCD is not set 1072# CONFIG_USB_SL811_HCD is not set
1073# CONFIG_USB_R8A66597_HCD is not set
1125 1074
1126# 1075#
1127# USB Device Class drivers 1076# USB Device Class drivers
@@ -1199,23 +1148,7 @@ CONFIG_USB_MON=y
1199# 1148#
1200# CONFIG_USB_GADGET is not set 1149# CONFIG_USB_GADGET is not set
1201# CONFIG_MMC is not set 1150# CONFIG_MMC is not set
1202
1203#
1204# LED devices
1205#
1206# CONFIG_NEW_LEDS is not set 1151# CONFIG_NEW_LEDS is not set
1207
1208#
1209# LED drivers
1210#
1211
1212#
1213# LED Triggers
1214#
1215
1216#
1217# InfiniBand support
1218#
1219CONFIG_INFINIBAND=m 1152CONFIG_INFINIBAND=m
1220CONFIG_INFINIBAND_USER_MAD=m 1153CONFIG_INFINIBAND_USER_MAD=m
1221CONFIG_INFINIBAND_USER_ACCESS=m 1154CONFIG_INFINIBAND_USER_ACCESS=m
@@ -1231,14 +1164,13 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y
1231CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y 1164CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
1232# CONFIG_INFINIBAND_SRP is not set 1165# CONFIG_INFINIBAND_SRP is not set
1233# CONFIG_INFINIBAND_ISER is not set 1166# CONFIG_INFINIBAND_ISER is not set
1167CONFIG_EDAC=y
1234 1168
1235# 1169#
1236# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 1170# Reporting subsystems
1237#
1238
1239#
1240# Real Time Clock
1241# 1171#
1172# CONFIG_EDAC_DEBUG is not set
1173CONFIG_EDAC_MM_EDAC=y
1242# CONFIG_RTC_CLASS is not set 1174# CONFIG_RTC_CLASS is not set
1243 1175
1244# 1176#
@@ -1255,6 +1187,12 @@ CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
1255# 1187#
1256 1188
1257# 1189#
1190# Userspace I/O
1191#
1192CONFIG_UIO=m
1193# CONFIG_UIO_CIF is not set
1194
1195#
1258# File systems 1196# File systems
1259# 1197#
1260CONFIG_EXT2_FS=y 1198CONFIG_EXT2_FS=y
@@ -1357,7 +1295,6 @@ CONFIG_SUNRPC=y
1357# CONFIG_NCP_FS is not set 1295# CONFIG_NCP_FS is not set
1358# CONFIG_CODA_FS is not set 1296# CONFIG_CODA_FS is not set
1359# CONFIG_AFS_FS is not set 1297# CONFIG_AFS_FS is not set
1360# CONFIG_9P_FS is not set
1361 1298
1362# 1299#
1363# Partition Types 1300# Partition Types
@@ -1439,6 +1376,7 @@ CONFIG_BITREVERSE=y
1439# CONFIG_CRC16 is not set 1376# CONFIG_CRC16 is not set
1440# CONFIG_CRC_ITU_T is not set 1377# CONFIG_CRC_ITU_T is not set
1441CONFIG_CRC32=y 1378CONFIG_CRC32=y
1379# CONFIG_CRC7 is not set
1442# CONFIG_LIBCRC32C is not set 1380# CONFIG_LIBCRC32C is not set
1443CONFIG_ZLIB_INFLATE=m 1381CONFIG_ZLIB_INFLATE=m
1444CONFIG_ZLIB_DEFLATE=m 1382CONFIG_ZLIB_DEFLATE=m
@@ -1471,9 +1409,10 @@ CONFIG_DEBUG_FS=y
1471CONFIG_DEBUG_KERNEL=y 1409CONFIG_DEBUG_KERNEL=y
1472# CONFIG_DEBUG_SHIRQ is not set 1410# CONFIG_DEBUG_SHIRQ is not set
1473# CONFIG_DETECT_SOFTLOCKUP is not set 1411# CONFIG_DETECT_SOFTLOCKUP is not set
1412CONFIG_SCHED_DEBUG=y
1474# CONFIG_SCHEDSTATS is not set 1413# CONFIG_SCHEDSTATS is not set
1475# CONFIG_TIMER_STATS is not set 1414# CONFIG_TIMER_STATS is not set
1476# CONFIG_DEBUG_SLAB is not set 1415# CONFIG_SLUB_DEBUG_ON is not set
1477# CONFIG_DEBUG_RT_MUTEXES is not set 1416# CONFIG_DEBUG_RT_MUTEXES is not set
1478# CONFIG_RT_MUTEX_TESTER is not set 1417# CONFIG_RT_MUTEX_TESTER is not set
1479# CONFIG_DEBUG_SPINLOCK is not set 1418# CONFIG_DEBUG_SPINLOCK is not set
@@ -1504,10 +1443,6 @@ CONFIG_IRQSTACKS=y
1504# 1443#
1505# CONFIG_KEYS is not set 1444# CONFIG_KEYS is not set
1506# CONFIG_SECURITY is not set 1445# CONFIG_SECURITY is not set
1507
1508#
1509# Cryptographic options
1510#
1511CONFIG_CRYPTO=y 1446CONFIG_CRYPTO=y
1512CONFIG_CRYPTO_ALGAPI=y 1447CONFIG_CRYPTO_ALGAPI=y
1513CONFIG_CRYPTO_BLKCIPHER=m 1448CONFIG_CRYPTO_BLKCIPHER=m
@@ -1546,7 +1481,4 @@ CONFIG_CRYPTO_DEFLATE=m
1546# CONFIG_CRYPTO_CRC32C is not set 1481# CONFIG_CRYPTO_CRC32C is not set
1547# CONFIG_CRYPTO_CAMELLIA is not set 1482# CONFIG_CRYPTO_CAMELLIA is not set
1548# CONFIG_CRYPTO_TEST is not set 1483# CONFIG_CRYPTO_TEST is not set
1549 1484CONFIG_CRYPTO_HW=y
1550#
1551# Hardware crypto devices
1552#
diff --git a/arch/powerpc/configs/celleb_defconfig b/arch/powerpc/configs/celleb_defconfig
index 0dc9874b46..b4ac498c3c 100644
--- a/arch/powerpc/configs/celleb_defconfig
+++ b/arch/powerpc/configs/celleb_defconfig
@@ -1,9 +1,23 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 12:33:17 2007 4# Thu Aug 30 16:32:07 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7
8#
9# Processor support
10#
11# CONFIG_POWER4_ONLY is not set
12CONFIG_POWER3=y
13CONFIG_POWER4=y
14CONFIG_PPC_FPU=y
15CONFIG_ALTIVEC=y
16CONFIG_PPC_STD_MMU=y
17CONFIG_PPC_MM_SLICES=y
18CONFIG_VIRT_CPU_ACCOUNTING=y
19CONFIG_SMP=y
20CONFIG_NR_CPUS=4
7CONFIG_64BIT=y 21CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y 22CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 23CONFIG_MMU=y
@@ -15,6 +29,7 @@ CONFIG_ARCH_HAS_ILOG2_U64=y
15CONFIG_GENERIC_HWEIGHT=y 29CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y 30CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y 31CONFIG_GENERIC_FIND_NEXT_BIT=y
32CONFIG_ARCH_NO_VIRT_TO_BUS=y
18CONFIG_PPC=y 33CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y 34CONFIG_EARLY_PRINTK=y
20CONFIG_COMPAT=y 35CONFIG_COMPAT=y
@@ -22,50 +37,32 @@ CONFIG_SYSVIPC_COMPAT=y
22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
25# CONFIG_PPC_UDBG_16550 is not set 41# CONFIG_PPC_UDBG_16550 is not set
26# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
27CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set 45# CONFIG_DEFAULT_UIMAGE is not set
30
31#
32# Processor support
33#
34# CONFIG_POWER4_ONLY is not set
35CONFIG_POWER3=y
36CONFIG_POWER4=y
37CONFIG_PPC_FPU=y
38# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
39# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
40CONFIG_PPC_OF_PLATFORM_PCI=y 48CONFIG_PPC_OF_PLATFORM_PCI=y
41CONFIG_ALTIVEC=y
42CONFIG_PPC_STD_MMU=y
43CONFIG_PPC_MM_SLICES=y
44CONFIG_VIRT_CPU_ACCOUNTING=y
45CONFIG_SMP=y
46CONFIG_NR_CPUS=4
47CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
48 50
49# 51#
50# Code maturity level options 52# General setup
51# 53#
52CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
53CONFIG_LOCK_KERNEL=y 55CONFIG_LOCK_KERNEL=y
54CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
55
56#
57# General setup
58#
59CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
60CONFIG_LOCALVERSION_AUTO=y 58CONFIG_LOCALVERSION_AUTO=y
61CONFIG_SWAP=y 59CONFIG_SWAP=y
62CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
63# CONFIG_IPC_NS is not set
64CONFIG_SYSVIPC_SYSCTL=y 61CONFIG_SYSVIPC_SYSCTL=y
65# CONFIG_POSIX_MQUEUE is not set 62# CONFIG_POSIX_MQUEUE is not set
66# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
67# CONFIG_TASKSTATS is not set 64# CONFIG_TASKSTATS is not set
68# CONFIG_UTS_NS is not set 65# CONFIG_USER_NS is not set
69# CONFIG_AUDIT is not set 66# CONFIG_AUDIT is not set
70CONFIG_IKCONFIG=y 67CONFIG_IKCONFIG=y
71CONFIG_IKCONFIG_PROC=y 68CONFIG_IKCONFIG_PROC=y
@@ -101,10 +98,6 @@ CONFIG_SLAB=y
101CONFIG_RT_MUTEXES=y 98CONFIG_RT_MUTEXES=y
102# CONFIG_TINY_SHMEM is not set 99# CONFIG_TINY_SHMEM is not set
103CONFIG_BASE_SMALL=0 100CONFIG_BASE_SMALL=0
104
105#
106# Loadable module support
107#
108CONFIG_MODULES=y 101CONFIG_MODULES=y
109CONFIG_MODULE_UNLOAD=y 102CONFIG_MODULE_UNLOAD=y
110# CONFIG_MODULE_FORCE_UNLOAD is not set 103# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -112,12 +105,9 @@ CONFIG_MODVERSIONS=y
112CONFIG_MODULE_SRCVERSION_ALL=y 105CONFIG_MODULE_SRCVERSION_ALL=y
113CONFIG_KMOD=y 106CONFIG_KMOD=y
114CONFIG_STOP_MACHINE=y 107CONFIG_STOP_MACHINE=y
115
116#
117# Block layer
118#
119CONFIG_BLOCK=y 108CONFIG_BLOCK=y
120# CONFIG_BLK_DEV_IO_TRACE is not set 109# CONFIG_BLK_DEV_IO_TRACE is not set
110CONFIG_BLK_DEV_BSG=y
121 111
122# 112#
123# IO Schedulers 113# IO Schedulers
@@ -137,7 +127,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
137# 127#
138CONFIG_PPC_MULTIPLATFORM=y 128CONFIG_PPC_MULTIPLATFORM=y
139# CONFIG_EMBEDDED6xx is not set 129# CONFIG_EMBEDDED6xx is not set
140# CONFIG_APUS is not set 130# CONFIG_PPC_82xx is not set
131# CONFIG_PPC_83xx is not set
132# CONFIG_PPC_86xx is not set
141# CONFIG_PPC_PSERIES is not set 133# CONFIG_PPC_PSERIES is not set
142# CONFIG_PPC_ISERIES is not set 134# CONFIG_PPC_ISERIES is not set
143# CONFIG_PPC_MPC52xx is not set 135# CONFIG_PPC_MPC52xx is not set
@@ -171,6 +163,7 @@ CONFIG_PPC_UDBG_BEAT=y
171# CONFIG_GENERIC_IOMAP is not set 163# CONFIG_GENERIC_IOMAP is not set
172# CONFIG_CPU_FREQ is not set 164# CONFIG_CPU_FREQ is not set
173# CONFIG_CPM2 is not set 165# CONFIG_CPM2 is not set
166# CONFIG_FSL_ULI1575 is not set
174 167
175# 168#
176# Kernel options 169# Kernel options
@@ -212,6 +205,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
212CONFIG_MIGRATION=y 205CONFIG_MIGRATION=y
213CONFIG_RESOURCES_64BIT=y 206CONFIG_RESOURCES_64BIT=y
214CONFIG_ZONE_DMA_FLAG=1 207CONFIG_ZONE_DMA_FLAG=1
208CONFIG_BOUNCE=y
215CONFIG_ARCH_MEMORY_PROBE=y 209CONFIG_ARCH_MEMORY_PROBE=y
216CONFIG_NODES_SPAN_OTHER_NODES=y 210CONFIG_NODES_SPAN_OTHER_NODES=y
217CONFIG_PPC_HAS_HASH_64K=y 211CONFIG_PPC_HAS_HASH_64K=y
@@ -232,6 +226,7 @@ CONFIG_GENERIC_ISA_DMA=y
232# CONFIG_PPC_INDIRECT_PCI is not set 226# CONFIG_PPC_INDIRECT_PCI is not set
233CONFIG_PCI=y 227CONFIG_PCI=y
234CONFIG_PCI_DOMAINS=y 228CONFIG_PCI_DOMAINS=y
229CONFIG_PCI_SYSCALL=y
235# CONFIG_PCIEPORTBUS is not set 230# CONFIG_PCIEPORTBUS is not set
236CONFIG_ARCH_SUPPORTS_MSI=y 231CONFIG_ARCH_SUPPORTS_MSI=y
237# CONFIG_PCI_MSI is not set 232# CONFIG_PCI_MSI is not set
@@ -363,6 +358,7 @@ CONFIG_IP_NF_QUEUE=m
363# CONFIG_MAC80211 is not set 358# CONFIG_MAC80211 is not set
364# CONFIG_IEEE80211 is not set 359# CONFIG_IEEE80211 is not set
365# CONFIG_RFKILL is not set 360# CONFIG_RFKILL is not set
361# CONFIG_NET_9P is not set
366 362
367# 363#
368# Device Drivers 364# Device Drivers
@@ -377,28 +373,12 @@ CONFIG_FW_LOADER=y
377# CONFIG_DEBUG_DRIVER is not set 373# CONFIG_DEBUG_DRIVER is not set
378# CONFIG_DEBUG_DEVRES is not set 374# CONFIG_DEBUG_DEVRES is not set
379# CONFIG_SYS_HYPERVISOR is not set 375# CONFIG_SYS_HYPERVISOR is not set
380
381#
382# Connector - unified userspace <-> kernelspace linker
383#
384# CONFIG_CONNECTOR is not set 376# CONFIG_CONNECTOR is not set
385# CONFIG_MTD is not set 377# CONFIG_MTD is not set
386 378CONFIG_OF_DEVICE=y
387#
388# Parallel port support
389#
390# CONFIG_PARPORT is not set 379# CONFIG_PARPORT is not set
391 380CONFIG_BLK_DEV=y
392#
393# Plug and Play support
394#
395# CONFIG_PNPACPI is not set
396
397#
398# Block devices
399#
400# CONFIG_BLK_DEV_FD is not set 381# CONFIG_BLK_DEV_FD is not set
401# CONFIG_BLK_CPQ_DA is not set
402# CONFIG_BLK_CPQ_CISS_DA is not set 382# CONFIG_BLK_CPQ_CISS_DA is not set
403# CONFIG_BLK_DEV_DAC960 is not set 383# CONFIG_BLK_DEV_DAC960 is not set
404# CONFIG_BLK_DEV_UMEM is not set 384# CONFIG_BLK_DEV_UMEM is not set
@@ -414,14 +394,11 @@ CONFIG_BLK_DEV_RAM_SIZE=131072
414CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 394CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
415# CONFIG_CDROM_PKTCDVD is not set 395# CONFIG_CDROM_PKTCDVD is not set
416# CONFIG_ATA_OVER_ETH is not set 396# CONFIG_ATA_OVER_ETH is not set
417 397CONFIG_MISC_DEVICES=y
418#
419# Misc devices
420#
421# CONFIG_PHANTOM is not set 398# CONFIG_PHANTOM is not set
399# CONFIG_EEPROM_93CX6 is not set
422# CONFIG_SGI_IOC4 is not set 400# CONFIG_SGI_IOC4 is not set
423# CONFIG_TIFM_CORE is not set 401# CONFIG_TIFM_CORE is not set
424# CONFIG_BLINK is not set
425CONFIG_IDE=y 402CONFIG_IDE=y
426CONFIG_BLK_DEV_IDE=y 403CONFIG_BLK_DEV_IDE=y
427 404
@@ -487,6 +464,7 @@ CONFIG_BLK_DEV_IDEDMA=y
487# 464#
488# CONFIG_RAID_ATTRS is not set 465# CONFIG_RAID_ATTRS is not set
489CONFIG_SCSI=m 466CONFIG_SCSI=m
467CONFIG_SCSI_DMA=y
490# CONFIG_SCSI_TGT is not set 468# CONFIG_SCSI_TGT is not set
491# CONFIG_SCSI_NETLINK is not set 469# CONFIG_SCSI_NETLINK is not set
492# CONFIG_SCSI_PROC_FS is not set 470# CONFIG_SCSI_PROC_FS is not set
@@ -519,10 +497,7 @@ CONFIG_SCSI_WAIT_SCAN=m
519# CONFIG_SCSI_ISCSI_ATTRS is not set 497# CONFIG_SCSI_ISCSI_ATTRS is not set
520# CONFIG_SCSI_SAS_ATTRS is not set 498# CONFIG_SCSI_SAS_ATTRS is not set
521# CONFIG_SCSI_SAS_LIBSAS is not set 499# CONFIG_SCSI_SAS_LIBSAS is not set
522 500CONFIG_SCSI_LOWLEVEL=y
523#
524# SCSI low-level drivers
525#
526# CONFIG_ISCSI_TCP is not set 501# CONFIG_ISCSI_TCP is not set
527# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 502# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
528# CONFIG_SCSI_3W_9XXX is not set 503# CONFIG_SCSI_3W_9XXX is not set
@@ -537,7 +512,6 @@ CONFIG_SCSI_WAIT_SCAN=m
537# CONFIG_MEGARAID_LEGACY is not set 512# CONFIG_MEGARAID_LEGACY is not set
538# CONFIG_MEGARAID_SAS is not set 513# CONFIG_MEGARAID_SAS is not set
539# CONFIG_SCSI_HPTIOP is not set 514# CONFIG_SCSI_HPTIOP is not set
540# CONFIG_SCSI_BUSLOGIC is not set
541# CONFIG_SCSI_DMX3191D is not set 515# CONFIG_SCSI_DMX3191D is not set
542# CONFIG_SCSI_EATA is not set 516# CONFIG_SCSI_EATA is not set
543# CONFIG_SCSI_FUTURE_DOMAIN is not set 517# CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -556,10 +530,6 @@ CONFIG_SCSI_WAIT_SCAN=m
556# CONFIG_SCSI_DEBUG is not set 530# CONFIG_SCSI_DEBUG is not set
557# CONFIG_SCSI_SRP is not set 531# CONFIG_SCSI_SRP is not set
558# CONFIG_ATA is not set 532# CONFIG_ATA is not set
559
560#
561# Multi-device support (RAID and LVM)
562#
563CONFIG_MD=y 533CONFIG_MD=y
564CONFIG_BLK_DEV_MD=m 534CONFIG_BLK_DEV_MD=m
565CONFIG_MD_LINEAR=m 535CONFIG_MD_LINEAR=m
@@ -577,6 +547,7 @@ CONFIG_DM_MIRROR=m
577CONFIG_DM_ZERO=m 547CONFIG_DM_ZERO=m
578CONFIG_DM_MULTIPATH=m 548CONFIG_DM_MULTIPATH=m
579# CONFIG_DM_MULTIPATH_EMC is not set 549# CONFIG_DM_MULTIPATH_EMC is not set
550# CONFIG_DM_MULTIPATH_RDAC is not set
580# CONFIG_DM_DELAY is not set 551# CONFIG_DM_DELAY is not set
581 552
582# 553#
@@ -592,37 +563,23 @@ CONFIG_DM_MULTIPATH=m
592# 563#
593# CONFIG_FIREWIRE is not set 564# CONFIG_FIREWIRE is not set
594# CONFIG_IEEE1394 is not set 565# CONFIG_IEEE1394 is not set
595
596#
597# I2O device support
598#
599# CONFIG_I2O is not set 566# CONFIG_I2O is not set
600# CONFIG_MACINTOSH_DRIVERS is not set 567# CONFIG_MACINTOSH_DRIVERS is not set
601
602#
603# Network device support
604#
605CONFIG_NETDEVICES=y 568CONFIG_NETDEVICES=y
569# CONFIG_NETDEVICES_MULTIQUEUE is not set
606# CONFIG_DUMMY is not set 570# CONFIG_DUMMY is not set
607# CONFIG_BONDING is not set 571# CONFIG_BONDING is not set
572# CONFIG_MACVLAN is not set
608# CONFIG_EQUALIZER is not set 573# CONFIG_EQUALIZER is not set
609# CONFIG_TUN is not set 574# CONFIG_TUN is not set
610# CONFIG_ARCNET is not set 575# CONFIG_ARCNET is not set
611# CONFIG_PHYLIB is not set 576# CONFIG_PHYLIB is not set
612
613#
614# Ethernet (10 or 100Mbit)
615#
616CONFIG_NET_ETHERNET=y 577CONFIG_NET_ETHERNET=y
617CONFIG_MII=y 578CONFIG_MII=y
618# CONFIG_HAPPYMEAL is not set 579# CONFIG_HAPPYMEAL is not set
619# CONFIG_SUNGEM is not set 580# CONFIG_SUNGEM is not set
620# CONFIG_CASSINI is not set 581# CONFIG_CASSINI is not set
621# CONFIG_NET_VENDOR_3COM is not set 582# CONFIG_NET_VENDOR_3COM is not set
622
623#
624# Tulip family network device support
625#
626# CONFIG_NET_TULIP is not set 583# CONFIG_NET_TULIP is not set
627# CONFIG_HP100 is not set 584# CONFIG_HP100 is not set
628# CONFIG_NET_PCI is not set 585# CONFIG_NET_PCI is not set
@@ -637,7 +594,6 @@ CONFIG_NETDEV_1000=y
637# CONFIG_SIS190 is not set 594# CONFIG_SIS190 is not set
638# CONFIG_SKGE is not set 595# CONFIG_SKGE is not set
639# CONFIG_SKY2 is not set 596# CONFIG_SKY2 is not set
640# CONFIG_SK98LIN is not set
641# CONFIG_VIA_VELOCITY is not set 597# CONFIG_VIA_VELOCITY is not set
642# CONFIG_TIGON3 is not set 598# CONFIG_TIGON3 is not set
643# CONFIG_BNX2 is not set 599# CONFIG_BNX2 is not set
@@ -680,15 +636,7 @@ CONFIG_NETDEV_10000=y
680# CONFIG_NETCONSOLE is not set 636# CONFIG_NETCONSOLE is not set
681# CONFIG_NETPOLL is not set 637# CONFIG_NETPOLL is not set
682# CONFIG_NET_POLL_CONTROLLER is not set 638# CONFIG_NET_POLL_CONTROLLER is not set
683
684#
685# ISDN subsystem
686#
687# CONFIG_ISDN is not set 639# CONFIG_ISDN is not set
688
689#
690# Telephony Support
691#
692# CONFIG_PHONE is not set 640# CONFIG_PHONE is not set
693 641
694# 642#
@@ -775,10 +723,6 @@ CONFIG_UNIX98_PTYS=y
775# CONFIG_LEGACY_PTYS is not set 723# CONFIG_LEGACY_PTYS is not set
776CONFIG_HVC_DRIVER=y 724CONFIG_HVC_DRIVER=y
777CONFIG_HVC_BEAT=y 725CONFIG_HVC_BEAT=y
778
779#
780# IPMI
781#
782# CONFIG_IPMI_HANDLER is not set 726# CONFIG_IPMI_HANDLER is not set
783CONFIG_WATCHDOG=y 727CONFIG_WATCHDOG=y
784# CONFIG_WATCHDOG_NOWAYOUT is not set 728# CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -807,10 +751,6 @@ CONFIG_GEN_RTC=y
807# CONFIG_DRM is not set 751# CONFIG_DRM is not set
808# CONFIG_RAW_DRIVER is not set 752# CONFIG_RAW_DRIVER is not set
809# CONFIG_HANGCHECK_TIMER is not set 753# CONFIG_HANGCHECK_TIMER is not set
810
811#
812# TPM devices
813#
814# CONFIG_TCG_TPM is not set 754# CONFIG_TCG_TPM is not set
815CONFIG_DEVPORT=y 755CONFIG_DEVPORT=y
816CONFIG_I2C=y 756CONFIG_I2C=y
@@ -844,6 +784,7 @@ CONFIG_I2C_ALGOBIT=y
844# CONFIG_I2C_SIS5595 is not set 784# CONFIG_I2C_SIS5595 is not set
845# CONFIG_I2C_SIS630 is not set 785# CONFIG_I2C_SIS630 is not set
846# CONFIG_I2C_SIS96X is not set 786# CONFIG_I2C_SIS96X is not set
787# CONFIG_I2C_TAOS_EVM is not set
847# CONFIG_I2C_STUB is not set 788# CONFIG_I2C_STUB is not set
848# CONFIG_I2C_TINY_USB is not set 789# CONFIG_I2C_TINY_USB is not set
849# CONFIG_I2C_VIA is not set 790# CONFIG_I2C_VIA is not set
@@ -855,11 +796,13 @@ CONFIG_I2C_ALGOBIT=y
855# 796#
856# CONFIG_SENSORS_DS1337 is not set 797# CONFIG_SENSORS_DS1337 is not set
857# CONFIG_SENSORS_DS1374 is not set 798# CONFIG_SENSORS_DS1374 is not set
799# CONFIG_DS1682 is not set
858# CONFIG_SENSORS_EEPROM is not set 800# CONFIG_SENSORS_EEPROM is not set
859# CONFIG_SENSORS_PCF8574 is not set 801# CONFIG_SENSORS_PCF8574 is not set
860# CONFIG_SENSORS_PCA9539 is not set 802# CONFIG_SENSORS_PCA9539 is not set
861# CONFIG_SENSORS_PCF8591 is not set 803# CONFIG_SENSORS_PCF8591 is not set
862# CONFIG_SENSORS_MAX6875 is not set 804# CONFIG_SENSORS_MAX6875 is not set
805# CONFIG_SENSORS_TSL2550 is not set
863# CONFIG_I2C_DEBUG_CORE is not set 806# CONFIG_I2C_DEBUG_CORE is not set
864# CONFIG_I2C_DEBUG_ALGO is not set 807# CONFIG_I2C_DEBUG_ALGO is not set
865# CONFIG_I2C_DEBUG_BUS is not set 808# CONFIG_I2C_DEBUG_BUS is not set
@@ -870,11 +813,8 @@ CONFIG_I2C_ALGOBIT=y
870# 813#
871# CONFIG_SPI is not set 814# CONFIG_SPI is not set
872# CONFIG_SPI_MASTER is not set 815# CONFIG_SPI_MASTER is not set
873
874#
875# Dallas's 1-wire bus
876#
877# CONFIG_W1 is not set 816# CONFIG_W1 is not set
817# CONFIG_POWER_SUPPLY is not set
878# CONFIG_HWMON is not set 818# CONFIG_HWMON is not set
879 819
880# 820#
@@ -899,6 +839,7 @@ CONFIG_I2C_ALGOBIT=y
899# 839#
900# CONFIG_DISPLAY_SUPPORT is not set 840# CONFIG_DISPLAY_SUPPORT is not set
901# CONFIG_VGASTATE is not set 841# CONFIG_VGASTATE is not set
842# CONFIG_VIDEO_OUTPUT_CONTROL is not set
902# CONFIG_FB is not set 843# CONFIG_FB is not set
903# CONFIG_FB_IBM_GXT4500 is not set 844# CONFIG_FB_IBM_GXT4500 is not set
904 845
@@ -912,10 +853,7 @@ CONFIG_DUMMY_CONSOLE=y
912# Sound 853# Sound
913# 854#
914# CONFIG_SOUND is not set 855# CONFIG_SOUND is not set
915 856CONFIG_HID_SUPPORT=y
916#
917# HID Devices
918#
919CONFIG_HID=y 857CONFIG_HID=y
920# CONFIG_HID_DEBUG is not set 858# CONFIG_HID_DEBUG is not set
921 859
@@ -926,10 +864,7 @@ CONFIG_USB_HID=y
926# CONFIG_USB_HIDINPUT_POWERBOOK is not set 864# CONFIG_USB_HIDINPUT_POWERBOOK is not set
927# CONFIG_HID_FF is not set 865# CONFIG_HID_FF is not set
928CONFIG_USB_HIDDEV=y 866CONFIG_USB_HIDDEV=y
929 867CONFIG_USB_SUPPORT=y
930#
931# USB support
932#
933CONFIG_USB_ARCH_HAS_HCD=y 868CONFIG_USB_ARCH_HAS_HCD=y
934CONFIG_USB_ARCH_HAS_OHCI=y 869CONFIG_USB_ARCH_HAS_OHCI=y
935CONFIG_USB_ARCH_HAS_EHCI=y 870CONFIG_USB_ARCH_HAS_EHCI=y
@@ -960,6 +895,7 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
960CONFIG_USB_OHCI_LITTLE_ENDIAN=y 895CONFIG_USB_OHCI_LITTLE_ENDIAN=y
961# CONFIG_USB_UHCI_HCD is not set 896# CONFIG_USB_UHCI_HCD is not set
962# CONFIG_USB_SL811_HCD is not set 897# CONFIG_USB_SL811_HCD is not set
898# CONFIG_USB_R8A66597_HCD is not set
963 899
964# 900#
965# USB Device Class drivers 901# USB Device Class drivers
@@ -1037,32 +973,9 @@ CONFIG_USB_MON=y
1037# 973#
1038# CONFIG_USB_GADGET is not set 974# CONFIG_USB_GADGET is not set
1039# CONFIG_MMC is not set 975# CONFIG_MMC is not set
1040
1041#
1042# LED devices
1043#
1044# CONFIG_NEW_LEDS is not set 976# CONFIG_NEW_LEDS is not set
1045
1046#
1047# LED drivers
1048#
1049
1050#
1051# LED Triggers
1052#
1053
1054#
1055# InfiniBand support
1056#
1057# CONFIG_INFINIBAND is not set 977# CONFIG_INFINIBAND is not set
1058 978# CONFIG_EDAC is not set
1059#
1060# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1061#
1062
1063#
1064# Real Time Clock
1065#
1066# CONFIG_RTC_CLASS is not set 979# CONFIG_RTC_CLASS is not set
1067 980
1068# 981#
@@ -1079,6 +992,11 @@ CONFIG_USB_MON=y
1079# 992#
1080 993
1081# 994#
995# Userspace I/O
996#
997# CONFIG_UIO is not set
998
999#
1082# File systems 1000# File systems
1083# 1001#
1084CONFIG_EXT2_FS=y 1002CONFIG_EXT2_FS=y
@@ -1189,7 +1107,6 @@ CONFIG_SUNRPC=m
1189# CONFIG_NCP_FS is not set 1107# CONFIG_NCP_FS is not set
1190# CONFIG_CODA_FS is not set 1108# CONFIG_CODA_FS is not set
1191# CONFIG_AFS_FS is not set 1109# CONFIG_AFS_FS is not set
1192# CONFIG_9P_FS is not set
1193 1110
1194# 1111#
1195# Partition Types 1112# Partition Types
@@ -1271,6 +1188,7 @@ CONFIG_BITREVERSE=y
1271# CONFIG_CRC16 is not set 1188# CONFIG_CRC16 is not set
1272# CONFIG_CRC_ITU_T is not set 1189# CONFIG_CRC_ITU_T is not set
1273CONFIG_CRC32=y 1190CONFIG_CRC32=y
1191# CONFIG_CRC7 is not set
1274CONFIG_LIBCRC32C=m 1192CONFIG_LIBCRC32C=m
1275CONFIG_ZLIB_INFLATE=m 1193CONFIG_ZLIB_INFLATE=m
1276CONFIG_ZLIB_DEFLATE=m 1194CONFIG_ZLIB_DEFLATE=m
@@ -1297,6 +1215,7 @@ CONFIG_DEBUG_FS=y
1297CONFIG_DEBUG_KERNEL=y 1215CONFIG_DEBUG_KERNEL=y
1298# CONFIG_DEBUG_SHIRQ is not set 1216# CONFIG_DEBUG_SHIRQ is not set
1299CONFIG_DETECT_SOFTLOCKUP=y 1217CONFIG_DETECT_SOFTLOCKUP=y
1218CONFIG_SCHED_DEBUG=y
1300# CONFIG_SCHEDSTATS is not set 1219# CONFIG_SCHEDSTATS is not set
1301# CONFIG_TIMER_STATS is not set 1220# CONFIG_TIMER_STATS is not set
1302# CONFIG_DEBUG_SLAB is not set 1221# CONFIG_DEBUG_SLAB is not set
@@ -1339,10 +1258,6 @@ CONFIG_PPC_EARLY_DEBUG_BEAT=y
1339# 1258#
1340# CONFIG_KEYS is not set 1259# CONFIG_KEYS is not set
1341# CONFIG_SECURITY is not set 1260# CONFIG_SECURITY is not set
1342
1343#
1344# Cryptographic options
1345#
1346CONFIG_CRYPTO=y 1261CONFIG_CRYPTO=y
1347CONFIG_CRYPTO_ALGAPI=y 1262CONFIG_CRYPTO_ALGAPI=y
1348CONFIG_CRYPTO_BLKCIPHER=m 1263CONFIG_CRYPTO_BLKCIPHER=m
@@ -1382,7 +1297,4 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1382CONFIG_CRYPTO_CRC32C=m 1297CONFIG_CRYPTO_CRC32C=m
1383# CONFIG_CRYPTO_CAMELLIA is not set 1298# CONFIG_CRYPTO_CAMELLIA is not set
1384CONFIG_CRYPTO_TEST=m 1299CONFIG_CRYPTO_TEST=m
1385 1300# CONFIG_CRYPTO_HW is not set
1386#
1387# Hardware crypto devices
1388#
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig
index 7a747c4385..c3977e334b 100644
--- a/arch/powerpc/configs/chrp32_defconfig
+++ b/arch/powerpc/configs/chrp32_defconfig
@@ -1,9 +1,26 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 12:36:45 2007 4# Thu Aug 30 16:33:50 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18# CONFIG_ALTIVEC is not set
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22CONFIG_SMP=y
23CONFIG_NR_CPUS=4
7CONFIG_PPC32=y 24CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 25CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 26CONFIG_MMU=y
@@ -14,62 +31,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 31CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 32CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 33CONFIG_GENERIC_FIND_NEXT_BIT=y
34# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 35CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 36CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 37CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 38CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 39CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 40CONFIG_PPC_OF=y
41CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 42CONFIG_PPC_UDBG_16550=y
24CONFIG_GENERIC_TBSYNC=y 43CONFIG_GENERIC_TBSYNC=y
25CONFIG_AUDIT_ARCH=y 44CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 45CONFIG_GENERIC_BUG=y
27# CONFIG_DEFAULT_UIMAGE is not set 46# CONFIG_DEFAULT_UIMAGE is not set
28
29#
30# Processor support
31#
32CONFIG_CLASSIC32=y
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_PPC_FPU=y
43# CONFIG_PPC_DCR_NATIVE is not set 47# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 48# CONFIG_PPC_DCR_MMIO is not set
45# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49CONFIG_SMP=y
50CONFIG_NR_CPUS=4
51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
52 50
53# 51#
54# Code maturity level options 52# General setup
55# 53#
56CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
57CONFIG_LOCK_KERNEL=y 55CONFIG_LOCK_KERNEL=y
58CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
59
60#
61# General setup
62#
63CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
64# CONFIG_LOCALVERSION_AUTO is not set 58# CONFIG_LOCALVERSION_AUTO is not set
65CONFIG_SWAP=y 59CONFIG_SWAP=y
66CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
67# CONFIG_IPC_NS is not set
68CONFIG_SYSVIPC_SYSCTL=y 61CONFIG_SYSVIPC_SYSCTL=y
69CONFIG_POSIX_MQUEUE=y 62CONFIG_POSIX_MQUEUE=y
70# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
71# CONFIG_TASKSTATS is not set 64# CONFIG_TASKSTATS is not set
72# CONFIG_UTS_NS is not set 65# CONFIG_USER_NS is not set
73# CONFIG_AUDIT is not set 66# CONFIG_AUDIT is not set
74CONFIG_IKCONFIG=y 67CONFIG_IKCONFIG=y
75CONFIG_IKCONFIG_PROC=y 68CONFIG_IKCONFIG_PROC=y
@@ -105,10 +98,6 @@ CONFIG_SLAB=y
105CONFIG_RT_MUTEXES=y 98CONFIG_RT_MUTEXES=y
106# CONFIG_TINY_SHMEM is not set 99# CONFIG_TINY_SHMEM is not set
107CONFIG_BASE_SMALL=0 100CONFIG_BASE_SMALL=0
108
109#
110# Loadable module support
111#
112CONFIG_MODULES=y 101CONFIG_MODULES=y
113CONFIG_MODULE_UNLOAD=y 102CONFIG_MODULE_UNLOAD=y
114CONFIG_MODULE_FORCE_UNLOAD=y 103CONFIG_MODULE_FORCE_UNLOAD=y
@@ -116,14 +105,11 @@ CONFIG_MODULE_FORCE_UNLOAD=y
116# CONFIG_MODULE_SRCVERSION_ALL is not set 105# CONFIG_MODULE_SRCVERSION_ALL is not set
117CONFIG_KMOD=y 106CONFIG_KMOD=y
118CONFIG_STOP_MACHINE=y 107CONFIG_STOP_MACHINE=y
119
120#
121# Block layer
122#
123CONFIG_BLOCK=y 108CONFIG_BLOCK=y
124CONFIG_LBD=y 109CONFIG_LBD=y
125# CONFIG_BLK_DEV_IO_TRACE is not set 110# CONFIG_BLK_DEV_IO_TRACE is not set
126# CONFIG_LSF is not set 111# CONFIG_LSF is not set
112# CONFIG_BLK_DEV_BSG is not set
127 113
128# 114#
129# IO Schedulers 115# IO Schedulers
@@ -143,7 +129,10 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
143# 129#
144CONFIG_PPC_MULTIPLATFORM=y 130CONFIG_PPC_MULTIPLATFORM=y
145# CONFIG_EMBEDDED6xx is not set 131# CONFIG_EMBEDDED6xx is not set
146# CONFIG_APUS is not set 132# CONFIG_PPC_82xx is not set
133# CONFIG_PPC_83xx is not set
134# CONFIG_PPC_86xx is not set
135CONFIG_CLASSIC32=y
147CONFIG_PPC_CHRP=y 136CONFIG_PPC_CHRP=y
148# CONFIG_PPC_MPC52xx is not set 137# CONFIG_PPC_MPC52xx is not set
149# CONFIG_PPC_MPC5200 is not set 138# CONFIG_PPC_MPC5200 is not set
@@ -169,6 +158,7 @@ CONFIG_PPC_MPC106=y
169# CONFIG_CPU_FREQ is not set 158# CONFIG_CPU_FREQ is not set
170# CONFIG_TAU is not set 159# CONFIG_TAU is not set
171# CONFIG_CPM2 is not set 160# CONFIG_CPM2 is not set
161# CONFIG_FSL_ULI1575 is not set
172 162
173# 163#
174# Kernel options 164# Kernel options
@@ -200,6 +190,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
200CONFIG_SPLIT_PTLOCK_CPUS=4 190CONFIG_SPLIT_PTLOCK_CPUS=4
201# CONFIG_RESOURCES_64BIT is not set 191# CONFIG_RESOURCES_64BIT is not set
202CONFIG_ZONE_DMA_FLAG=1 192CONFIG_ZONE_DMA_FLAG=1
193CONFIG_BOUNCE=y
194CONFIG_VIRT_TO_BUS=y
203CONFIG_PROC_DEVICETREE=y 195CONFIG_PROC_DEVICETREE=y
204# CONFIG_CMDLINE_BOOL is not set 196# CONFIG_CMDLINE_BOOL is not set
205# CONFIG_PM is not set 197# CONFIG_PM is not set
@@ -214,9 +206,9 @@ CONFIG_ISA=y
214CONFIG_ZONE_DMA=y 206CONFIG_ZONE_DMA=y
215CONFIG_GENERIC_ISA_DMA=y 207CONFIG_GENERIC_ISA_DMA=y
216CONFIG_PPC_INDIRECT_PCI=y 208CONFIG_PPC_INDIRECT_PCI=y
217# CONFIG_PPC_INDIRECT_PCI_BE is not set
218CONFIG_PCI=y 209CONFIG_PCI=y
219CONFIG_PCI_DOMAINS=y 210CONFIG_PCI_DOMAINS=y
211CONFIG_PCI_SYSCALL=y
220# CONFIG_PCIEPORTBUS is not set 212# CONFIG_PCIEPORTBUS is not set
221CONFIG_ARCH_SUPPORTS_MSI=y 213CONFIG_ARCH_SUPPORTS_MSI=y
222# CONFIG_PCI_MSI is not set 214# CONFIG_PCI_MSI is not set
@@ -296,6 +288,7 @@ CONFIG_NF_CONNTRACK=m
296# CONFIG_NF_CONNTRACK_MARK is not set 288# CONFIG_NF_CONNTRACK_MARK is not set
297# CONFIG_NF_CONNTRACK_EVENTS is not set 289# CONFIG_NF_CONNTRACK_EVENTS is not set
298# CONFIG_NF_CT_PROTO_SCTP is not set 290# CONFIG_NF_CT_PROTO_SCTP is not set
291# CONFIG_NF_CT_PROTO_UDPLITE is not set
299# CONFIG_NF_CONNTRACK_AMANDA is not set 292# CONFIG_NF_CONNTRACK_AMANDA is not set
300CONFIG_NF_CONNTRACK_FTP=m 293CONFIG_NF_CONNTRACK_FTP=m
301# CONFIG_NF_CONNTRACK_H323 is not set 294# CONFIG_NF_CONNTRACK_H323 is not set
@@ -313,6 +306,7 @@ CONFIG_NETFILTER_XTABLES=m
313# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set 306# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
314# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set 307# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
315# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set 308# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
309# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
316# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set 310# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
317# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set 311# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
318# CONFIG_NETFILTER_XT_MATCH_DCCP is not set 312# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
@@ -332,6 +326,7 @@ CONFIG_NETFILTER_XTABLES=m
332# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set 326# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
333# CONFIG_NETFILTER_XT_MATCH_STRING is not set 327# CONFIG_NETFILTER_XT_MATCH_STRING is not set
334# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set 328# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
329# CONFIG_NETFILTER_XT_MATCH_U32 is not set
335# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set 330# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
336 331
337# 332#
@@ -407,6 +402,7 @@ CONFIG_NF_NAT_SIP=m
407# CONFIG_MAC80211 is not set 402# CONFIG_MAC80211 is not set
408# CONFIG_IEEE80211 is not set 403# CONFIG_IEEE80211 is not set
409# CONFIG_RFKILL is not set 404# CONFIG_RFKILL is not set
405# CONFIG_NET_9P is not set
410 406
411# 407#
412# Device Drivers 408# Device Drivers
@@ -421,27 +417,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
421# CONFIG_DEBUG_DRIVER is not set 417# CONFIG_DEBUG_DRIVER is not set
422# CONFIG_DEBUG_DEVRES is not set 418# CONFIG_DEBUG_DEVRES is not set
423# CONFIG_SYS_HYPERVISOR is not set 419# CONFIG_SYS_HYPERVISOR is not set
424
425#
426# Connector - unified userspace <-> kernelspace linker
427#
428# CONFIG_CONNECTOR is not set 420# CONFIG_CONNECTOR is not set
429# CONFIG_MTD is not set 421# CONFIG_MTD is not set
430 422CONFIG_OF_DEVICE=y
431#
432# Parallel port support
433#
434# CONFIG_PARPORT is not set 423# CONFIG_PARPORT is not set
435
436#
437# Plug and Play support
438#
439# CONFIG_PNP is not set 424# CONFIG_PNP is not set
440# CONFIG_PNPACPI is not set 425CONFIG_BLK_DEV=y
441
442#
443# Block devices
444#
445CONFIG_BLK_DEV_FD=y 426CONFIG_BLK_DEV_FD=y
446# CONFIG_BLK_DEV_XD is not set 427# CONFIG_BLK_DEV_XD is not set
447# CONFIG_BLK_CPQ_DA is not set 428# CONFIG_BLK_CPQ_DA is not set
@@ -460,14 +441,11 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
460CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 441CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
461# CONFIG_CDROM_PKTCDVD is not set 442# CONFIG_CDROM_PKTCDVD is not set
462# CONFIG_ATA_OVER_ETH is not set 443# CONFIG_ATA_OVER_ETH is not set
463 444CONFIG_MISC_DEVICES=y
464#
465# Misc devices
466#
467# CONFIG_PHANTOM is not set 445# CONFIG_PHANTOM is not set
446# CONFIG_EEPROM_93CX6 is not set
468# CONFIG_SGI_IOC4 is not set 447# CONFIG_SGI_IOC4 is not set
469# CONFIG_TIFM_CORE is not set 448# CONFIG_TIFM_CORE is not set
470# CONFIG_BLINK is not set
471CONFIG_IDE=y 449CONFIG_IDE=y
472CONFIG_BLK_DEV_IDE=y 450CONFIG_BLK_DEV_IDE=y
473 451
@@ -533,6 +511,7 @@ CONFIG_BLK_DEV_IDEDMA=y
533# 511#
534# CONFIG_RAID_ATTRS is not set 512# CONFIG_RAID_ATTRS is not set
535CONFIG_SCSI=y 513CONFIG_SCSI=y
514CONFIG_SCSI_DMA=y
536# CONFIG_SCSI_TGT is not set 515# CONFIG_SCSI_TGT is not set
537# CONFIG_SCSI_NETLINK is not set 516# CONFIG_SCSI_NETLINK is not set
538CONFIG_SCSI_PROC_FS=y 517CONFIG_SCSI_PROC_FS=y
@@ -563,12 +542,8 @@ CONFIG_SCSI_WAIT_SCAN=m
563CONFIG_SCSI_SPI_ATTRS=y 542CONFIG_SCSI_SPI_ATTRS=y
564# CONFIG_SCSI_FC_ATTRS is not set 543# CONFIG_SCSI_FC_ATTRS is not set
565# CONFIG_SCSI_ISCSI_ATTRS is not set 544# CONFIG_SCSI_ISCSI_ATTRS is not set
566# CONFIG_SCSI_SAS_ATTRS is not set
567# CONFIG_SCSI_SAS_LIBSAS is not set 545# CONFIG_SCSI_SAS_LIBSAS is not set
568 546CONFIG_SCSI_LOWLEVEL=y
569#
570# SCSI low-level drivers
571#
572# CONFIG_ISCSI_TCP is not set 547# CONFIG_ISCSI_TCP is not set
573# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 548# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
574# CONFIG_SCSI_3W_9XXX is not set 549# CONFIG_SCSI_3W_9XXX is not set
@@ -622,15 +597,6 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
622# CONFIG_SCSI_DEBUG is not set 597# CONFIG_SCSI_DEBUG is not set
623# CONFIG_SCSI_SRP is not set 598# CONFIG_SCSI_SRP is not set
624# CONFIG_ATA is not set 599# CONFIG_ATA is not set
625
626#
627# Old CD-ROM drivers (not SCSI, not IDE)
628#
629# CONFIG_CD_NO_IDESCSI is not set
630
631#
632# Multi-device support (RAID and LVM)
633#
634# CONFIG_MD is not set 600# CONFIG_MD is not set
635 601
636# 602#
@@ -646,27 +612,17 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
646# 612#
647# CONFIG_FIREWIRE is not set 613# CONFIG_FIREWIRE is not set
648# CONFIG_IEEE1394 is not set 614# CONFIG_IEEE1394 is not set
649
650#
651# I2O device support
652#
653# CONFIG_I2O is not set 615# CONFIG_I2O is not set
654# CONFIG_MACINTOSH_DRIVERS is not set 616# CONFIG_MACINTOSH_DRIVERS is not set
655
656#
657# Network device support
658#
659CONFIG_NETDEVICES=y 617CONFIG_NETDEVICES=y
618# CONFIG_NETDEVICES_MULTIQUEUE is not set
660# CONFIG_DUMMY is not set 619# CONFIG_DUMMY is not set
661# CONFIG_BONDING is not set 620# CONFIG_BONDING is not set
621# CONFIG_MACVLAN is not set
662# CONFIG_EQUALIZER is not set 622# CONFIG_EQUALIZER is not set
663# CONFIG_TUN is not set 623# CONFIG_TUN is not set
664# CONFIG_ARCNET is not set 624# CONFIG_ARCNET is not set
665# CONFIG_PHYLIB is not set 625# CONFIG_PHYLIB is not set
666
667#
668# Ethernet (10 or 100Mbit)
669#
670CONFIG_NET_ETHERNET=y 626CONFIG_NET_ETHERNET=y
671CONFIG_MII=y 627CONFIG_MII=y
672# CONFIG_HAPPYMEAL is not set 628# CONFIG_HAPPYMEAL is not set
@@ -676,10 +632,6 @@ CONFIG_MII=y
676# CONFIG_LANCE is not set 632# CONFIG_LANCE is not set
677# CONFIG_NET_VENDOR_SMC is not set 633# CONFIG_NET_VENDOR_SMC is not set
678# CONFIG_NET_VENDOR_RACAL is not set 634# CONFIG_NET_VENDOR_RACAL is not set
679
680#
681# Tulip family network device support
682#
683CONFIG_NET_TULIP=y 635CONFIG_NET_TULIP=y
684# CONFIG_DE2104X is not set 636# CONFIG_DE2104X is not set
685# CONFIG_TULIP is not set 637# CONFIG_TULIP is not set
@@ -732,7 +684,6 @@ CONFIG_NETDEV_1000=y
732# CONFIG_SIS190 is not set 684# CONFIG_SIS190 is not set
733# CONFIG_SKGE is not set 685# CONFIG_SKGE is not set
734# CONFIG_SKY2 is not set 686# CONFIG_SKY2 is not set
735# CONFIG_SK98LIN is not set
736# CONFIG_VIA_VELOCITY is not set 687# CONFIG_VIA_VELOCITY is not set
737# CONFIG_TIGON3 is not set 688# CONFIG_TIGON3 is not set
738# CONFIG_BNX2 is not set 689# CONFIG_BNX2 is not set
@@ -776,6 +727,7 @@ CONFIG_PPP_DEFLATE=m
776CONFIG_PPP_BSDCOMP=m 727CONFIG_PPP_BSDCOMP=m
777CONFIG_PPP_MPPE=m 728CONFIG_PPP_MPPE=m
778CONFIG_PPPOE=m 729CONFIG_PPPOE=m
730# CONFIG_PPPOL2TP is not set
779# CONFIG_SLIP is not set 731# CONFIG_SLIP is not set
780CONFIG_SLHC=m 732CONFIG_SLHC=m
781# CONFIG_NET_FC is not set 733# CONFIG_NET_FC is not set
@@ -783,15 +735,7 @@ CONFIG_SLHC=m
783# CONFIG_NETCONSOLE is not set 735# CONFIG_NETCONSOLE is not set
784# CONFIG_NETPOLL is not set 736# CONFIG_NETPOLL is not set
785# CONFIG_NET_POLL_CONTROLLER is not set 737# CONFIG_NET_POLL_CONTROLLER is not set
786
787#
788# ISDN subsystem
789#
790# CONFIG_ISDN is not set 738# CONFIG_ISDN is not set
791
792#
793# Telephony Support
794#
795# CONFIG_PHONE is not set 739# CONFIG_PHONE is not set
796 740
797# 741#
@@ -892,10 +836,6 @@ CONFIG_LEGACY_PTYS=y
892CONFIG_LEGACY_PTY_COUNT=256 836CONFIG_LEGACY_PTY_COUNT=256
893CONFIG_BRIQ_PANEL=m 837CONFIG_BRIQ_PANEL=m
894# CONFIG_HVC_RTAS is not set 838# CONFIG_HVC_RTAS is not set
895
896#
897# IPMI
898#
899# CONFIG_IPMI_HANDLER is not set 839# CONFIG_IPMI_HANDLER is not set
900# CONFIG_WATCHDOG is not set 840# CONFIG_WATCHDOG is not set
901# CONFIG_HW_RANDOM is not set 841# CONFIG_HW_RANDOM is not set
@@ -908,10 +848,6 @@ CONFIG_GEN_RTC=y
908# CONFIG_AGP is not set 848# CONFIG_AGP is not set
909# CONFIG_DRM is not set 849# CONFIG_DRM is not set
910# CONFIG_RAW_DRIVER is not set 850# CONFIG_RAW_DRIVER is not set
911
912#
913# TPM devices
914#
915# CONFIG_TCG_TPM is not set 851# CONFIG_TCG_TPM is not set
916CONFIG_DEVPORT=y 852CONFIG_DEVPORT=y
917CONFIG_I2C=y 853CONFIG_I2C=y
@@ -947,6 +883,7 @@ CONFIG_I2C_ALGOBIT=y
947# CONFIG_I2C_SIS5595 is not set 883# CONFIG_I2C_SIS5595 is not set
948# CONFIG_I2C_SIS630 is not set 884# CONFIG_I2C_SIS630 is not set
949# CONFIG_I2C_SIS96X is not set 885# CONFIG_I2C_SIS96X is not set
886# CONFIG_I2C_TAOS_EVM is not set
950# CONFIG_I2C_STUB is not set 887# CONFIG_I2C_STUB is not set
951# CONFIG_I2C_TINY_USB is not set 888# CONFIG_I2C_TINY_USB is not set
952# CONFIG_I2C_VIA is not set 889# CONFIG_I2C_VIA is not set
@@ -959,12 +896,14 @@ CONFIG_I2C_ALGOBIT=y
959# 896#
960# CONFIG_SENSORS_DS1337 is not set 897# CONFIG_SENSORS_DS1337 is not set
961# CONFIG_SENSORS_DS1374 is not set 898# CONFIG_SENSORS_DS1374 is not set
899# CONFIG_DS1682 is not set
962# CONFIG_SENSORS_EEPROM is not set 900# CONFIG_SENSORS_EEPROM is not set
963# CONFIG_SENSORS_PCF8574 is not set 901# CONFIG_SENSORS_PCF8574 is not set
964# CONFIG_SENSORS_PCA9539 is not set 902# CONFIG_SENSORS_PCA9539 is not set
965# CONFIG_SENSORS_PCF8591 is not set 903# CONFIG_SENSORS_PCF8591 is not set
966# CONFIG_SENSORS_M41T00 is not set 904# CONFIG_SENSORS_M41T00 is not set
967# CONFIG_SENSORS_MAX6875 is not set 905# CONFIG_SENSORS_MAX6875 is not set
906# CONFIG_SENSORS_TSL2550 is not set
968# CONFIG_I2C_DEBUG_CORE is not set 907# CONFIG_I2C_DEBUG_CORE is not set
969# CONFIG_I2C_DEBUG_ALGO is not set 908# CONFIG_I2C_DEBUG_ALGO is not set
970# CONFIG_I2C_DEBUG_BUS is not set 909# CONFIG_I2C_DEBUG_BUS is not set
@@ -975,11 +914,8 @@ CONFIG_I2C_ALGOBIT=y
975# 914#
976# CONFIG_SPI is not set 915# CONFIG_SPI is not set
977# CONFIG_SPI_MASTER is not set 916# CONFIG_SPI_MASTER is not set
978
979#
980# Dallas's 1-wire bus
981#
982# CONFIG_W1 is not set 917# CONFIG_W1 is not set
918# CONFIG_POWER_SUPPLY is not set
983# CONFIG_HWMON is not set 919# CONFIG_HWMON is not set
984 920
985# 921#
@@ -998,8 +934,8 @@ CONFIG_I2C_ALGOBIT=y
998# Graphics support 934# Graphics support
999# 935#
1000CONFIG_BACKLIGHT_LCD_SUPPORT=y 936CONFIG_BACKLIGHT_LCD_SUPPORT=y
1001CONFIG_BACKLIGHT_CLASS_DEVICE=y
1002CONFIG_LCD_CLASS_DEVICE=m 937CONFIG_LCD_CLASS_DEVICE=m
938CONFIG_BACKLIGHT_CLASS_DEVICE=y
1003 939
1004# 940#
1005# Display device support 941# Display device support
@@ -1010,6 +946,7 @@ CONFIG_DISPLAY_SUPPORT=m
1010# Display hardware drivers 946# Display hardware drivers
1011# 947#
1012# CONFIG_VGASTATE is not set 948# CONFIG_VGASTATE is not set
949# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1013CONFIG_FB=y 950CONFIG_FB=y
1014CONFIG_FIRMWARE_EDID=y 951CONFIG_FIRMWARE_EDID=y
1015CONFIG_FB_DDC=y 952CONFIG_FB_DDC=y
@@ -1080,6 +1017,7 @@ CONFIG_VGA_CONSOLE=y
1080# CONFIG_MDA_CONSOLE is not set 1017# CONFIG_MDA_CONSOLE is not set
1081CONFIG_DUMMY_CONSOLE=y 1018CONFIG_DUMMY_CONSOLE=y
1082CONFIG_FRAMEBUFFER_CONSOLE=y 1019CONFIG_FRAMEBUFFER_CONSOLE=y
1020# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1083# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 1021# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1084# CONFIG_FONTS is not set 1022# CONFIG_FONTS is not set
1085CONFIG_FONT_8x8=y 1023CONFIG_FONT_8x8=y
@@ -1093,10 +1031,7 @@ CONFIG_LOGO_LINUX_CLUT224=y
1093# Sound 1031# Sound
1094# 1032#
1095# CONFIG_SOUND is not set 1033# CONFIG_SOUND is not set
1096 1034CONFIG_HID_SUPPORT=y
1097#
1098# HID Devices
1099#
1100CONFIG_HID=y 1035CONFIG_HID=y
1101# CONFIG_HID_DEBUG is not set 1036# CONFIG_HID_DEBUG is not set
1102 1037
@@ -1107,10 +1042,7 @@ CONFIG_USB_HID=y
1107# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1042# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1108# CONFIG_HID_FF is not set 1043# CONFIG_HID_FF is not set
1109# CONFIG_USB_HIDDEV is not set 1044# CONFIG_USB_HIDDEV is not set
1110 1045CONFIG_USB_SUPPORT=y
1111#
1112# USB support
1113#
1114CONFIG_USB_ARCH_HAS_HCD=y 1046CONFIG_USB_ARCH_HAS_HCD=y
1115CONFIG_USB_ARCH_HAS_OHCI=y 1047CONFIG_USB_ARCH_HAS_OHCI=y
1116CONFIG_USB_ARCH_HAS_EHCI=y 1048CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1132,7 +1064,6 @@ CONFIG_USB_EHCI_HCD=m
1132# CONFIG_USB_EHCI_SPLIT_ISO is not set 1064# CONFIG_USB_EHCI_SPLIT_ISO is not set
1133# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1065# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1134# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1066# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1135# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1136# CONFIG_USB_ISP116X_HCD is not set 1067# CONFIG_USB_ISP116X_HCD is not set
1137CONFIG_USB_OHCI_HCD=y 1068CONFIG_USB_OHCI_HCD=y
1138# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1069# CONFIG_USB_OHCI_HCD_PPC_OF is not set
@@ -1141,6 +1072,7 @@ CONFIG_USB_OHCI_HCD=y
1141CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1072CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1142CONFIG_USB_UHCI_HCD=y 1073CONFIG_USB_UHCI_HCD=y
1143# CONFIG_USB_SL811_HCD is not set 1074# CONFIG_USB_SL811_HCD is not set
1075# CONFIG_USB_R8A66597_HCD is not set
1144 1076
1145# 1077#
1146# USB Device Class drivers 1078# USB Device Class drivers
@@ -1219,32 +1151,9 @@ CONFIG_USB_MON=y
1219# 1151#
1220# CONFIG_USB_GADGET is not set 1152# CONFIG_USB_GADGET is not set
1221# CONFIG_MMC is not set 1153# CONFIG_MMC is not set
1222
1223#
1224# LED devices
1225#
1226# CONFIG_NEW_LEDS is not set 1154# CONFIG_NEW_LEDS is not set
1227
1228#
1229# LED drivers
1230#
1231
1232#
1233# LED Triggers
1234#
1235
1236#
1237# InfiniBand support
1238#
1239# CONFIG_INFINIBAND is not set 1155# CONFIG_INFINIBAND is not set
1240 1156# CONFIG_EDAC is not set
1241#
1242# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1243#
1244
1245#
1246# Real Time Clock
1247#
1248# CONFIG_RTC_CLASS is not set 1157# CONFIG_RTC_CLASS is not set
1249 1158
1250# 1159#
@@ -1261,6 +1170,11 @@ CONFIG_USB_MON=y
1261# 1170#
1262 1171
1263# 1172#
1173# Userspace I/O
1174#
1175# CONFIG_UIO is not set
1176
1177#
1264# File systems 1178# File systems
1265# 1179#
1266CONFIG_EXT2_FS=y 1180CONFIG_EXT2_FS=y
@@ -1348,7 +1262,6 @@ CONFIG_RAMFS=y
1348# CONFIG_NCP_FS is not set 1262# CONFIG_NCP_FS is not set
1349# CONFIG_CODA_FS is not set 1263# CONFIG_CODA_FS is not set
1350# CONFIG_AFS_FS is not set 1264# CONFIG_AFS_FS is not set
1351# CONFIG_9P_FS is not set
1352 1265
1353# 1266#
1354# Partition Types 1267# Partition Types
@@ -1430,6 +1343,7 @@ CONFIG_CRC_CCITT=m
1430# CONFIG_CRC16 is not set 1343# CONFIG_CRC16 is not set
1431# CONFIG_CRC_ITU_T is not set 1344# CONFIG_CRC_ITU_T is not set
1432CONFIG_CRC32=y 1345CONFIG_CRC32=y
1346# CONFIG_CRC7 is not set
1433# CONFIG_LIBCRC32C is not set 1347# CONFIG_LIBCRC32C is not set
1434CONFIG_ZLIB_INFLATE=m 1348CONFIG_ZLIB_INFLATE=m
1435CONFIG_ZLIB_DEFLATE=m 1349CONFIG_ZLIB_DEFLATE=m
@@ -1456,6 +1370,7 @@ CONFIG_MAGIC_SYSRQ=y
1456CONFIG_DEBUG_KERNEL=y 1370CONFIG_DEBUG_KERNEL=y
1457# CONFIG_DEBUG_SHIRQ is not set 1371# CONFIG_DEBUG_SHIRQ is not set
1458CONFIG_DETECT_SOFTLOCKUP=y 1372CONFIG_DETECT_SOFTLOCKUP=y
1373CONFIG_SCHED_DEBUG=y
1459# CONFIG_SCHEDSTATS is not set 1374# CONFIG_SCHEDSTATS is not set
1460# CONFIG_TIMER_STATS is not set 1375# CONFIG_TIMER_STATS is not set
1461# CONFIG_DEBUG_SLAB is not set 1376# CONFIG_DEBUG_SLAB is not set
@@ -1490,10 +1405,6 @@ CONFIG_XMON_DISASSEMBLY=y
1490# 1405#
1491# CONFIG_KEYS is not set 1406# CONFIG_KEYS is not set
1492# CONFIG_SECURITY is not set 1407# CONFIG_SECURITY is not set
1493
1494#
1495# Cryptographic options
1496#
1497CONFIG_CRYPTO=y 1408CONFIG_CRYPTO=y
1498CONFIG_CRYPTO_ALGAPI=m 1409CONFIG_CRYPTO_ALGAPI=m
1499CONFIG_CRYPTO_BLKCIPHER=m 1410CONFIG_CRYPTO_BLKCIPHER=m
@@ -1531,7 +1442,4 @@ CONFIG_CRYPTO_ARC4=m
1531# CONFIG_CRYPTO_CRC32C is not set 1442# CONFIG_CRYPTO_CRC32C is not set
1532# CONFIG_CRYPTO_CAMELLIA is not set 1443# CONFIG_CRYPTO_CAMELLIA is not set
1533# CONFIG_CRYPTO_TEST is not set 1444# CONFIG_CRYPTO_TEST is not set
1534 1445# CONFIG_CRYPTO_HW is not set
1535#
1536# Hardware crypto devices
1537#
diff --git a/arch/powerpc/configs/ebony_defconfig b/arch/powerpc/configs/ebony_defconfig
index 5762cddfc1..ebb8167608 100644
--- a/arch/powerpc/configs/ebony_defconfig
+++ b/arch/powerpc/configs/ebony_defconfig
@@ -1,9 +1,25 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 12:38:33 2007 4# Thu Aug 30 16:34:11 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15CONFIG_44x=y
16# CONFIG_E200 is not set
17CONFIG_4xx=y
18CONFIG_BOOKE=y
19CONFIG_PTE_64BIT=y
20CONFIG_PHYS_64BIT=y
21# CONFIG_PPC_MM_SLICES is not set
22CONFIG_NOT_COHERENT_CACHE=y
7CONFIG_PPC32=y 23CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 24CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 25CONFIG_MMU=y
@@ -14,61 +30,39 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 30CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 31CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 32CONFIG_GENERIC_FIND_NEXT_BIT=y
33# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 34CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 35CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 36CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
23# CONFIG_PPC_UDBG_16550 is not set 41# CONFIG_PPC_UDBG_16550 is not set
24# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
27# CONFIG_DEFAULT_UIMAGE is not set 45# CONFIG_DEFAULT_UIMAGE is not set
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39CONFIG_44x=y
40# CONFIG_E200 is not set
41CONFIG_PPC_DCR_NATIVE=y 46CONFIG_PPC_DCR_NATIVE=y
42# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
43CONFIG_PPC_DCR=y 48CONFIG_PPC_DCR=y
44CONFIG_4xx=y
45CONFIG_BOOKE=y
46CONFIG_PTE_64BIT=y
47CONFIG_PHYS_64BIT=y
48# CONFIG_PPC_MM_SLICES is not set
49CONFIG_NOT_COHERENT_CACHE=y
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 50
52# 51#
53# Code maturity level options 52# General setup
54# 53#
55CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 55CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 58CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 59CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 61CONFIG_SYSVIPC_SYSCTL=y
68CONFIG_POSIX_MQUEUE=y 62CONFIG_POSIX_MQUEUE=y
69# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 64# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 65# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 66# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 67# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
@@ -102,24 +96,17 @@ CONFIG_SLAB=y
102CONFIG_RT_MUTEXES=y 96CONFIG_RT_MUTEXES=y
103# CONFIG_TINY_SHMEM is not set 97# CONFIG_TINY_SHMEM is not set
104CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
105
106#
107# Loadable module support
108#
109CONFIG_MODULES=y 99CONFIG_MODULES=y
110CONFIG_MODULE_UNLOAD=y 100CONFIG_MODULE_UNLOAD=y
111# CONFIG_MODULE_FORCE_UNLOAD is not set 101# CONFIG_MODULE_FORCE_UNLOAD is not set
112# CONFIG_MODVERSIONS is not set 102# CONFIG_MODVERSIONS is not set
113# CONFIG_MODULE_SRCVERSION_ALL is not set 103# CONFIG_MODULE_SRCVERSION_ALL is not set
114CONFIG_KMOD=y 104CONFIG_KMOD=y
115
116#
117# Block layer
118#
119CONFIG_BLOCK=y 105CONFIG_BLOCK=y
120CONFIG_LBD=y 106CONFIG_LBD=y
121# CONFIG_BLK_DEV_IO_TRACE is not set 107# CONFIG_BLK_DEV_IO_TRACE is not set
122# CONFIG_LSF is not set 108# CONFIG_LSF is not set
109# CONFIG_BLK_DEV_BSG is not set
123 110
124# 111#
125# IO Schedulers 112# IO Schedulers
@@ -155,6 +142,7 @@ CONFIG_440GP=y
155# CONFIG_GENERIC_IOMAP is not set 142# CONFIG_GENERIC_IOMAP is not set
156# CONFIG_CPU_FREQ is not set 143# CONFIG_CPU_FREQ is not set
157# CONFIG_CPM2 is not set 144# CONFIG_CPM2 is not set
145# CONFIG_FSL_ULI1575 is not set
158 146
159# 147#
160# Kernel options 148# Kernel options
@@ -184,6 +172,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
184CONFIG_SPLIT_PTLOCK_CPUS=4 172CONFIG_SPLIT_PTLOCK_CPUS=4
185CONFIG_RESOURCES_64BIT=y 173CONFIG_RESOURCES_64BIT=y
186CONFIG_ZONE_DMA_FLAG=1 174CONFIG_ZONE_DMA_FLAG=1
175CONFIG_BOUNCE=y
176CONFIG_VIRT_TO_BUS=y
187CONFIG_PROC_DEVICETREE=y 177CONFIG_PROC_DEVICETREE=y
188# CONFIG_CMDLINE_BOOL is not set 178# CONFIG_CMDLINE_BOOL is not set
189CONFIG_SECCOMP=y 179CONFIG_SECCOMP=y
@@ -196,9 +186,9 @@ CONFIG_ISA_DMA_API=y
196# 186#
197CONFIG_ZONE_DMA=y 187CONFIG_ZONE_DMA=y
198CONFIG_PPC_INDIRECT_PCI=y 188CONFIG_PPC_INDIRECT_PCI=y
199# CONFIG_PPC_INDIRECT_PCI_BE is not set
200CONFIG_PCI=y 189CONFIG_PCI=y
201CONFIG_PCI_DOMAINS=y 190CONFIG_PCI_DOMAINS=y
191CONFIG_PCI_SYSCALL=y
202# CONFIG_PCIEPORTBUS is not set 192# CONFIG_PCIEPORTBUS is not set
203CONFIG_ARCH_SUPPORTS_MSI=y 193CONFIG_ARCH_SUPPORTS_MSI=y
204# CONFIG_PCI_MSI is not set 194# CONFIG_PCI_MSI is not set
@@ -306,6 +296,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
306# CONFIG_MAC80211 is not set 296# CONFIG_MAC80211 is not set
307# CONFIG_IEEE80211 is not set 297# CONFIG_IEEE80211 is not set
308# CONFIG_RFKILL is not set 298# CONFIG_RFKILL is not set
299# CONFIG_NET_9P is not set
309 300
310# 301#
311# Device Drivers 302# Device Drivers
@@ -320,27 +311,12 @@ CONFIG_FW_LOADER=y
320# CONFIG_DEBUG_DRIVER is not set 311# CONFIG_DEBUG_DRIVER is not set
321# CONFIG_DEBUG_DEVRES is not set 312# CONFIG_DEBUG_DEVRES is not set
322# CONFIG_SYS_HYPERVISOR is not set 313# CONFIG_SYS_HYPERVISOR is not set
323
324#
325# Connector - unified userspace <-> kernelspace linker
326#
327CONFIG_CONNECTOR=y 314CONFIG_CONNECTOR=y
328CONFIG_PROC_EVENTS=y 315CONFIG_PROC_EVENTS=y
329# CONFIG_MTD is not set 316# CONFIG_MTD is not set
330 317CONFIG_OF_DEVICE=y
331#
332# Parallel port support
333#
334# CONFIG_PARPORT is not set 318# CONFIG_PARPORT is not set
335 319CONFIG_BLK_DEV=y
336#
337# Plug and Play support
338#
339# CONFIG_PNPACPI is not set
340
341#
342# Block devices
343#
344# CONFIG_BLK_DEV_FD is not set 320# CONFIG_BLK_DEV_FD is not set
345# CONFIG_BLK_CPQ_DA is not set 321# CONFIG_BLK_CPQ_DA is not set
346# CONFIG_BLK_CPQ_CISS_DA is not set 322# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -356,14 +332,12 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
356CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 332CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
357# CONFIG_CDROM_PKTCDVD is not set 333# CONFIG_CDROM_PKTCDVD is not set
358# CONFIG_ATA_OVER_ETH is not set 334# CONFIG_ATA_OVER_ETH is not set
359 335# CONFIG_XILINX_SYSACE is not set
360# 336CONFIG_MISC_DEVICES=y
361# Misc devices
362#
363# CONFIG_PHANTOM is not set 337# CONFIG_PHANTOM is not set
338# CONFIG_EEPROM_93CX6 is not set
364# CONFIG_SGI_IOC4 is not set 339# CONFIG_SGI_IOC4 is not set
365# CONFIG_TIFM_CORE is not set 340# CONFIG_TIFM_CORE is not set
366# CONFIG_BLINK is not set
367# CONFIG_IDE is not set 341# CONFIG_IDE is not set
368 342
369# 343#
@@ -371,12 +345,9 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
371# 345#
372# CONFIG_RAID_ATTRS is not set 346# CONFIG_RAID_ATTRS is not set
373# CONFIG_SCSI is not set 347# CONFIG_SCSI is not set
348# CONFIG_SCSI_DMA is not set
374# CONFIG_SCSI_NETLINK is not set 349# CONFIG_SCSI_NETLINK is not set
375# CONFIG_ATA is not set 350# CONFIG_ATA is not set
376
377#
378# Multi-device support (RAID and LVM)
379#
380# CONFIG_MD is not set 351# CONFIG_MD is not set
381 352
382# 353#
@@ -389,35 +360,17 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
389# 360#
390# CONFIG_FIREWIRE is not set 361# CONFIG_FIREWIRE is not set
391# CONFIG_IEEE1394 is not set 362# CONFIG_IEEE1394 is not set
392
393#
394# I2O device support
395#
396# CONFIG_I2O is not set 363# CONFIG_I2O is not set
397# CONFIG_MACINTOSH_DRIVERS is not set 364# CONFIG_MACINTOSH_DRIVERS is not set
398
399#
400# Network device support
401#
402CONFIG_NETDEVICES=y 365CONFIG_NETDEVICES=y
366# CONFIG_NETDEVICES_MULTIQUEUE is not set
403# CONFIG_DUMMY is not set 367# CONFIG_DUMMY is not set
404# CONFIG_BONDING is not set 368# CONFIG_BONDING is not set
369# CONFIG_MACVLAN is not set
405# CONFIG_EQUALIZER is not set 370# CONFIG_EQUALIZER is not set
406# CONFIG_TUN is not set 371# CONFIG_TUN is not set
407# CONFIG_ARCNET is not set 372# CONFIG_ARCNET is not set
408
409#
410# Ethernet (10 or 100Mbit)
411#
412# CONFIG_NET_ETHERNET is not set 373# CONFIG_NET_ETHERNET is not set
413CONFIG_IBM_EMAC=y
414CONFIG_IBM_EMAC_RXB=128
415CONFIG_IBM_EMAC_TXB=64
416CONFIG_IBM_EMAC_POLL_WEIGHT=32
417CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256
418CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0
419# CONFIG_IBM_EMAC_DEBUG is not set
420CONFIG_IBM_EMAC_ZMII=y
421CONFIG_NETDEV_1000=y 374CONFIG_NETDEV_1000=y
422# CONFIG_ACENIC is not set 375# CONFIG_ACENIC is not set
423# CONFIG_DL2K is not set 376# CONFIG_DL2K is not set
@@ -429,7 +382,6 @@ CONFIG_NETDEV_1000=y
429# CONFIG_SIS190 is not set 382# CONFIG_SIS190 is not set
430# CONFIG_SKGE is not set 383# CONFIG_SKGE is not set
431# CONFIG_SKY2 is not set 384# CONFIG_SKY2 is not set
432# CONFIG_SK98LIN is not set
433# CONFIG_VIA_VELOCITY is not set 385# CONFIG_VIA_VELOCITY is not set
434# CONFIG_TIGON3 is not set 386# CONFIG_TIGON3 is not set
435# CONFIG_BNX2 is not set 387# CONFIG_BNX2 is not set
@@ -459,15 +411,7 @@ CONFIG_NETDEV_10000=y
459# CONFIG_NETCONSOLE is not set 411# CONFIG_NETCONSOLE is not set
460# CONFIG_NETPOLL is not set 412# CONFIG_NETPOLL is not set
461# CONFIG_NET_POLL_CONTROLLER is not set 413# CONFIG_NET_POLL_CONTROLLER is not set
462
463#
464# ISDN subsystem
465#
466# CONFIG_ISDN is not set 414# CONFIG_ISDN is not set
467
468#
469# Telephony Support
470#
471# CONFIG_PHONE is not set 415# CONFIG_PHONE is not set
472 416
473# 417#
@@ -512,10 +456,6 @@ CONFIG_SERIAL_OF_PLATFORM=y
512CONFIG_UNIX98_PTYS=y 456CONFIG_UNIX98_PTYS=y
513CONFIG_LEGACY_PTYS=y 457CONFIG_LEGACY_PTYS=y
514CONFIG_LEGACY_PTY_COUNT=256 458CONFIG_LEGACY_PTY_COUNT=256
515
516#
517# IPMI
518#
519# CONFIG_IPMI_HANDLER is not set 459# CONFIG_IPMI_HANDLER is not set
520# CONFIG_WATCHDOG is not set 460# CONFIG_WATCHDOG is not set
521# CONFIG_HW_RANDOM is not set 461# CONFIG_HW_RANDOM is not set
@@ -526,10 +466,6 @@ CONFIG_LEGACY_PTY_COUNT=256
526# CONFIG_AGP is not set 466# CONFIG_AGP is not set
527# CONFIG_DRM is not set 467# CONFIG_DRM is not set
528# CONFIG_RAW_DRIVER is not set 468# CONFIG_RAW_DRIVER is not set
529
530#
531# TPM devices
532#
533# CONFIG_TCG_TPM is not set 469# CONFIG_TCG_TPM is not set
534CONFIG_DEVPORT=y 470CONFIG_DEVPORT=y
535# CONFIG_I2C is not set 471# CONFIG_I2C is not set
@@ -539,11 +475,8 @@ CONFIG_DEVPORT=y
539# 475#
540# CONFIG_SPI is not set 476# CONFIG_SPI is not set
541# CONFIG_SPI_MASTER is not set 477# CONFIG_SPI_MASTER is not set
542
543#
544# Dallas's 1-wire bus
545#
546# CONFIG_W1 is not set 478# CONFIG_W1 is not set
479# CONFIG_POWER_SUPPLY is not set
547# CONFIG_HWMON is not set 480# CONFIG_HWMON is not set
548 481
549# 482#
@@ -568,6 +501,7 @@ CONFIG_DEVPORT=y
568# 501#
569# CONFIG_DISPLAY_SUPPORT is not set 502# CONFIG_DISPLAY_SUPPORT is not set
570# CONFIG_VGASTATE is not set 503# CONFIG_VGASTATE is not set
504# CONFIG_VIDEO_OUTPUT_CONTROL is not set
571# CONFIG_FB is not set 505# CONFIG_FB is not set
572# CONFIG_FB_IBM_GXT4500 is not set 506# CONFIG_FB_IBM_GXT4500 is not set
573 507
@@ -575,10 +509,7 @@ CONFIG_DEVPORT=y
575# Sound 509# Sound
576# 510#
577# CONFIG_SOUND is not set 511# CONFIG_SOUND is not set
578 512CONFIG_USB_SUPPORT=y
579#
580# USB support
581#
582CONFIG_USB_ARCH_HAS_HCD=y 513CONFIG_USB_ARCH_HAS_HCD=y
583CONFIG_USB_ARCH_HAS_OHCI=y 514CONFIG_USB_ARCH_HAS_OHCI=y
584CONFIG_USB_ARCH_HAS_EHCI=y 515CONFIG_USB_ARCH_HAS_EHCI=y
@@ -593,32 +524,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
593# 524#
594# CONFIG_USB_GADGET is not set 525# CONFIG_USB_GADGET is not set
595# CONFIG_MMC is not set 526# CONFIG_MMC is not set
596
597#
598# LED devices
599#
600# CONFIG_NEW_LEDS is not set 527# CONFIG_NEW_LEDS is not set
601
602#
603# LED drivers
604#
605
606#
607# LED Triggers
608#
609
610#
611# InfiniBand support
612#
613# CONFIG_INFINIBAND is not set 528# CONFIG_INFINIBAND is not set
614 529# CONFIG_EDAC is not set
615#
616# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
617#
618
619#
620# Real Time Clock
621#
622# CONFIG_RTC_CLASS is not set 530# CONFIG_RTC_CLASS is not set
623 531
624# 532#
@@ -635,6 +543,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
635# 543#
636 544
637# 545#
546# Userspace I/O
547#
548# CONFIG_UIO is not set
549
550#
638# File systems 551# File systems
639# 552#
640CONFIG_EXT2_FS=y 553CONFIG_EXT2_FS=y
@@ -723,7 +636,6 @@ CONFIG_SUNRPC=y
723# CONFIG_NCP_FS is not set 636# CONFIG_NCP_FS is not set
724# CONFIG_CODA_FS is not set 637# CONFIG_CODA_FS is not set
725# CONFIG_AFS_FS is not set 638# CONFIG_AFS_FS is not set
726# CONFIG_9P_FS is not set
727 639
728# 640#
729# Partition Types 641# Partition Types
@@ -750,6 +662,7 @@ CONFIG_BITREVERSE=y
750# CONFIG_CRC16 is not set 662# CONFIG_CRC16 is not set
751# CONFIG_CRC_ITU_T is not set 663# CONFIG_CRC_ITU_T is not set
752CONFIG_CRC32=y 664CONFIG_CRC32=y
665# CONFIG_CRC7 is not set
753# CONFIG_LIBCRC32C is not set 666# CONFIG_LIBCRC32C is not set
754CONFIG_ZLIB_INFLATE=y 667CONFIG_ZLIB_INFLATE=y
755CONFIG_PLIST=y 668CONFIG_PLIST=y
@@ -774,6 +687,7 @@ CONFIG_MAGIC_SYSRQ=y
774CONFIG_DEBUG_KERNEL=y 687CONFIG_DEBUG_KERNEL=y
775# CONFIG_DEBUG_SHIRQ is not set 688# CONFIG_DEBUG_SHIRQ is not set
776CONFIG_DETECT_SOFTLOCKUP=y 689CONFIG_DETECT_SOFTLOCKUP=y
690CONFIG_SCHED_DEBUG=y
777# CONFIG_SCHEDSTATS is not set 691# CONFIG_SCHEDSTATS is not set
778# CONFIG_TIMER_STATS is not set 692# CONFIG_TIMER_STATS is not set
779# CONFIG_DEBUG_SLAB is not set 693# CONFIG_DEBUG_SLAB is not set
@@ -796,7 +710,6 @@ CONFIG_FORCED_INLINING=y
796# CONFIG_DEBUG_PAGEALLOC is not set 710# CONFIG_DEBUG_PAGEALLOC is not set
797# CONFIG_DEBUGGER is not set 711# CONFIG_DEBUGGER is not set
798# CONFIG_BDI_SWITCH is not set 712# CONFIG_BDI_SWITCH is not set
799# CONFIG_BOOTX_TEXT is not set
800# CONFIG_PPC_EARLY_DEBUG is not set 713# CONFIG_PPC_EARLY_DEBUG is not set
801 714
802# 715#
@@ -804,10 +717,6 @@ CONFIG_FORCED_INLINING=y
804# 717#
805# CONFIG_KEYS is not set 718# CONFIG_KEYS is not set
806# CONFIG_SECURITY is not set 719# CONFIG_SECURITY is not set
807
808#
809# Cryptographic options
810#
811CONFIG_CRYPTO=y 720CONFIG_CRYPTO=y
812CONFIG_CRYPTO_ALGAPI=y 721CONFIG_CRYPTO_ALGAPI=y
813CONFIG_CRYPTO_BLKCIPHER=y 722CONFIG_CRYPTO_BLKCIPHER=y
@@ -845,7 +754,4 @@ CONFIG_CRYPTO_DES=y
845# CONFIG_CRYPTO_CRC32C is not set 754# CONFIG_CRYPTO_CRC32C is not set
846# CONFIG_CRYPTO_CAMELLIA is not set 755# CONFIG_CRYPTO_CAMELLIA is not set
847# CONFIG_CRYPTO_TEST is not set 756# CONFIG_CRYPTO_TEST is not set
848 757# CONFIG_CRYPTO_HW is not set
849#
850# Hardware crypto devices
851#
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index a217f4ebcf..a655d87b3f 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -1,9 +1,22 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 12:38:34 2007 4# Thu Aug 30 16:34:59 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7
8#
9# Processor support
10#
11CONFIG_POWER4_ONLY=y
12CONFIG_POWER4=y
13CONFIG_PPC_FPU=y
14CONFIG_ALTIVEC=y
15CONFIG_PPC_STD_MMU=y
16CONFIG_PPC_MM_SLICES=y
17CONFIG_VIRT_CPU_ACCOUNTING=y
18CONFIG_SMP=y
19CONFIG_NR_CPUS=4
7CONFIG_64BIT=y 20CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y 21CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 22CONFIG_MMU=y
@@ -15,6 +28,7 @@ CONFIG_ARCH_HAS_ILOG2_U64=y
15CONFIG_GENERIC_HWEIGHT=y 28CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y 29CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y 30CONFIG_GENERIC_FIND_NEXT_BIT=y
31CONFIG_ARCH_NO_VIRT_TO_BUS=y
18CONFIG_PPC=y 32CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y 33CONFIG_EARLY_PRINTK=y
20CONFIG_COMPAT=y 34CONFIG_COMPAT=y
@@ -22,50 +36,33 @@ CONFIG_SYSVIPC_COMPAT=y
22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 36CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_ARCH_MAY_HAVE_PC_FDC=y 37CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24CONFIG_PPC_OF=y 38CONFIG_PPC_OF=y
39CONFIG_OF=y
25# CONFIG_PPC_UDBG_16550 is not set 40# CONFIG_PPC_UDBG_16550 is not set
26CONFIG_GENERIC_TBSYNC=y 41CONFIG_GENERIC_TBSYNC=y
27CONFIG_AUDIT_ARCH=y 42CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y 43CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set 44# CONFIG_DEFAULT_UIMAGE is not set
30CONFIG_PPC64_SWSUSP=y 45CONFIG_PPC64_SWSUSP=y
31
32#
33# Processor support
34#
35CONFIG_POWER4_ONLY=y
36CONFIG_POWER4=y
37CONFIG_PPC_FPU=y
38# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
39# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
40# CONFIG_PPC_OF_PLATFORM_PCI is not set 48# CONFIG_PPC_OF_PLATFORM_PCI is not set
41CONFIG_ALTIVEC=y
42CONFIG_PPC_STD_MMU=y
43CONFIG_PPC_MM_SLICES=y
44CONFIG_VIRT_CPU_ACCOUNTING=y
45CONFIG_SMP=y
46CONFIG_NR_CPUS=4
47CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
48 50
49# 51#
50# Code maturity level options 52# General setup
51# 53#
52CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
53CONFIG_LOCK_KERNEL=y 55CONFIG_LOCK_KERNEL=y
54CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
55
56#
57# General setup
58#
59CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
60CONFIG_LOCALVERSION_AUTO=y 58CONFIG_LOCALVERSION_AUTO=y
61CONFIG_SWAP=y 59CONFIG_SWAP=y
62CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
63# CONFIG_IPC_NS is not set
64CONFIG_SYSVIPC_SYSCTL=y 61CONFIG_SYSVIPC_SYSCTL=y
65CONFIG_POSIX_MQUEUE=y 62CONFIG_POSIX_MQUEUE=y
66# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
67# CONFIG_TASKSTATS is not set 64# CONFIG_TASKSTATS is not set
68# CONFIG_UTS_NS is not set 65# CONFIG_USER_NS is not set
69# CONFIG_AUDIT is not set 66# CONFIG_AUDIT is not set
70CONFIG_IKCONFIG=y 67CONFIG_IKCONFIG=y
71CONFIG_IKCONFIG_PROC=y 68CONFIG_IKCONFIG_PROC=y
@@ -101,10 +98,6 @@ CONFIG_SLAB=y
101CONFIG_RT_MUTEXES=y 98CONFIG_RT_MUTEXES=y
102# CONFIG_TINY_SHMEM is not set 99# CONFIG_TINY_SHMEM is not set
103CONFIG_BASE_SMALL=0 100CONFIG_BASE_SMALL=0
104
105#
106# Loadable module support
107#
108CONFIG_MODULES=y 101CONFIG_MODULES=y
109CONFIG_MODULE_UNLOAD=y 102CONFIG_MODULE_UNLOAD=y
110# CONFIG_MODULE_FORCE_UNLOAD is not set 103# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -112,12 +105,9 @@ CONFIG_MODVERSIONS=y
112CONFIG_MODULE_SRCVERSION_ALL=y 105CONFIG_MODULE_SRCVERSION_ALL=y
113CONFIG_KMOD=y 106CONFIG_KMOD=y
114CONFIG_STOP_MACHINE=y 107CONFIG_STOP_MACHINE=y
115
116#
117# Block layer
118#
119CONFIG_BLOCK=y 108CONFIG_BLOCK=y
120# CONFIG_BLK_DEV_IO_TRACE is not set 109# CONFIG_BLK_DEV_IO_TRACE is not set
110CONFIG_BLK_DEV_BSG=y
121 111
122# 112#
123# IO Schedulers 113# IO Schedulers
@@ -137,7 +127,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
137# 127#
138CONFIG_PPC_MULTIPLATFORM=y 128CONFIG_PPC_MULTIPLATFORM=y
139# CONFIG_EMBEDDED6xx is not set 129# CONFIG_EMBEDDED6xx is not set
140# CONFIG_APUS is not set 130# CONFIG_PPC_82xx is not set
131# CONFIG_PPC_83xx is not set
132# CONFIG_PPC_86xx is not set
141# CONFIG_PPC_PSERIES is not set 133# CONFIG_PPC_PSERIES is not set
142# CONFIG_PPC_ISERIES is not set 134# CONFIG_PPC_ISERIES is not set
143# CONFIG_PPC_MPC52xx is not set 135# CONFIG_PPC_MPC52xx is not set
@@ -182,6 +174,7 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
182# 174#
183CONFIG_CPU_FREQ_PMAC64=y 175CONFIG_CPU_FREQ_PMAC64=y
184# CONFIG_CPM2 is not set 176# CONFIG_CPM2 is not set
177# CONFIG_FSL_ULI1575 is not set
185 178
186# 179#
187# Kernel options 180# Kernel options
@@ -219,12 +212,14 @@ CONFIG_FLAT_NODE_MEM_MAP=y
219CONFIG_SPLIT_PTLOCK_CPUS=4 212CONFIG_SPLIT_PTLOCK_CPUS=4
220CONFIG_RESOURCES_64BIT=y 213CONFIG_RESOURCES_64BIT=y
221CONFIG_ZONE_DMA_FLAG=1 214CONFIG_ZONE_DMA_FLAG=1
215CONFIG_BOUNCE=y
222# CONFIG_PPC_HAS_HASH_64K is not set 216# CONFIG_PPC_HAS_HASH_64K is not set
223# CONFIG_PPC_64K_PAGES is not set 217# CONFIG_PPC_64K_PAGES is not set
224# CONFIG_SCHED_SMT is not set 218# CONFIG_SCHED_SMT is not set
225CONFIG_PROC_DEVICETREE=y 219CONFIG_PROC_DEVICETREE=y
226# CONFIG_CMDLINE_BOOL is not set 220# CONFIG_CMDLINE_BOOL is not set
227# CONFIG_PM is not set 221# CONFIG_PM is not set
222CONFIG_SUSPEND_SMP_POSSIBLE=y
228CONFIG_SECCOMP=y 223CONFIG_SECCOMP=y
229# CONFIG_WANT_DEVICE_TREE is not set 224# CONFIG_WANT_DEVICE_TREE is not set
230CONFIG_ISA_DMA_API=y 225CONFIG_ISA_DMA_API=y
@@ -237,6 +232,7 @@ CONFIG_GENERIC_ISA_DMA=y
237# CONFIG_PPC_INDIRECT_PCI is not set 232# CONFIG_PPC_INDIRECT_PCI is not set
238CONFIG_PCI=y 233CONFIG_PCI=y
239CONFIG_PCI_DOMAINS=y 234CONFIG_PCI_DOMAINS=y
235CONFIG_PCI_SYSCALL=y
240# CONFIG_PCIEPORTBUS is not set 236# CONFIG_PCIEPORTBUS is not set
241CONFIG_ARCH_SUPPORTS_MSI=y 237CONFIG_ARCH_SUPPORTS_MSI=y
242CONFIG_PCI_MSI=y 238CONFIG_PCI_MSI=y
@@ -308,6 +304,7 @@ CONFIG_NF_CONNTRACK=m
308CONFIG_NF_CONNTRACK_MARK=y 304CONFIG_NF_CONNTRACK_MARK=y
309CONFIG_NF_CONNTRACK_EVENTS=y 305CONFIG_NF_CONNTRACK_EVENTS=y
310# CONFIG_NF_CT_PROTO_SCTP is not set 306# CONFIG_NF_CT_PROTO_SCTP is not set
307# CONFIG_NF_CT_PROTO_UDPLITE is not set
311# CONFIG_NF_CONNTRACK_AMANDA is not set 308# CONFIG_NF_CONNTRACK_AMANDA is not set
312CONFIG_NF_CONNTRACK_FTP=m 309CONFIG_NF_CONNTRACK_FTP=m
313# CONFIG_NF_CONNTRACK_H323 is not set 310# CONFIG_NF_CONNTRACK_H323 is not set
@@ -365,6 +362,7 @@ CONFIG_LLC=y
365# CONFIG_MAC80211 is not set 362# CONFIG_MAC80211 is not set
366# CONFIG_IEEE80211 is not set 363# CONFIG_IEEE80211 is not set
367# CONFIG_RFKILL is not set 364# CONFIG_RFKILL is not set
365# CONFIG_NET_9P is not set
368 366
369# 367#
370# Device Drivers 368# Device Drivers
@@ -379,28 +377,12 @@ CONFIG_FW_LOADER=y
379# CONFIG_DEBUG_DRIVER is not set 377# CONFIG_DEBUG_DRIVER is not set
380# CONFIG_DEBUG_DEVRES is not set 378# CONFIG_DEBUG_DEVRES is not set
381# CONFIG_SYS_HYPERVISOR is not set 379# CONFIG_SYS_HYPERVISOR is not set
382
383#
384# Connector - unified userspace <-> kernelspace linker
385#
386# CONFIG_CONNECTOR is not set 380# CONFIG_CONNECTOR is not set
387# CONFIG_MTD is not set 381# CONFIG_MTD is not set
388 382CONFIG_OF_DEVICE=y
389#
390# Parallel port support
391#
392# CONFIG_PARPORT is not set 383# CONFIG_PARPORT is not set
393 384CONFIG_BLK_DEV=y
394#
395# Plug and Play support
396#
397# CONFIG_PNPACPI is not set
398
399#
400# Block devices
401#
402# CONFIG_BLK_DEV_FD is not set 385# CONFIG_BLK_DEV_FD is not set
403# CONFIG_BLK_CPQ_DA is not set
404# CONFIG_BLK_CPQ_CISS_DA is not set 386# CONFIG_BLK_CPQ_CISS_DA is not set
405# CONFIG_BLK_DEV_DAC960 is not set 387# CONFIG_BLK_DEV_DAC960 is not set
406# CONFIG_BLK_DEV_UMEM is not set 388# CONFIG_BLK_DEV_UMEM is not set
@@ -418,14 +400,11 @@ CONFIG_CDROM_PKTCDVD=m
418CONFIG_CDROM_PKTCDVD_BUFFERS=8 400CONFIG_CDROM_PKTCDVD_BUFFERS=8
419# CONFIG_CDROM_PKTCDVD_WCACHE is not set 401# CONFIG_CDROM_PKTCDVD_WCACHE is not set
420# CONFIG_ATA_OVER_ETH is not set 402# CONFIG_ATA_OVER_ETH is not set
421 403CONFIG_MISC_DEVICES=y
422#
423# Misc devices
424#
425# CONFIG_PHANTOM is not set 404# CONFIG_PHANTOM is not set
405# CONFIG_EEPROM_93CX6 is not set
426# CONFIG_SGI_IOC4 is not set 406# CONFIG_SGI_IOC4 is not set
427# CONFIG_TIFM_CORE is not set 407# CONFIG_TIFM_CORE is not set
428# CONFIG_BLINK is not set
429CONFIG_IDE=y 408CONFIG_IDE=y
430CONFIG_BLK_DEV_IDE=y 409CONFIG_BLK_DEV_IDE=y
431 410
@@ -493,6 +472,7 @@ CONFIG_BLK_DEV_IDEDMA=y
493# 472#
494# CONFIG_RAID_ATTRS is not set 473# CONFIG_RAID_ATTRS is not set
495CONFIG_SCSI=y 474CONFIG_SCSI=y
475CONFIG_SCSI_DMA=y
496# CONFIG_SCSI_TGT is not set 476# CONFIG_SCSI_TGT is not set
497# CONFIG_SCSI_NETLINK is not set 477# CONFIG_SCSI_NETLINK is not set
498CONFIG_SCSI_PROC_FS=y 478CONFIG_SCSI_PROC_FS=y
@@ -525,10 +505,7 @@ CONFIG_SCSI_SPI_ATTRS=y
525# CONFIG_SCSI_ISCSI_ATTRS is not set 505# CONFIG_SCSI_ISCSI_ATTRS is not set
526# CONFIG_SCSI_SAS_ATTRS is not set 506# CONFIG_SCSI_SAS_ATTRS is not set
527# CONFIG_SCSI_SAS_LIBSAS is not set 507# CONFIG_SCSI_SAS_LIBSAS is not set
528 508CONFIG_SCSI_LOWLEVEL=y
529#
530# SCSI low-level drivers
531#
532# CONFIG_ISCSI_TCP is not set 509# CONFIG_ISCSI_TCP is not set
533# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 510# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
534# CONFIG_SCSI_3W_9XXX is not set 511# CONFIG_SCSI_3W_9XXX is not set
@@ -543,7 +520,6 @@ CONFIG_SCSI_SPI_ATTRS=y
543# CONFIG_MEGARAID_LEGACY is not set 520# CONFIG_MEGARAID_LEGACY is not set
544# CONFIG_MEGARAID_SAS is not set 521# CONFIG_MEGARAID_SAS is not set
545# CONFIG_SCSI_HPTIOP is not set 522# CONFIG_SCSI_HPTIOP is not set
546# CONFIG_SCSI_BUSLOGIC is not set
547# CONFIG_SCSI_DMX3191D is not set 523# CONFIG_SCSI_DMX3191D is not set
548# CONFIG_SCSI_EATA is not set 524# CONFIG_SCSI_EATA is not set
549# CONFIG_SCSI_FUTURE_DOMAIN is not set 525# CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -616,10 +592,6 @@ CONFIG_SATA_SVW=y
616# CONFIG_PATA_SIS is not set 592# CONFIG_PATA_SIS is not set
617# CONFIG_PATA_VIA is not set 593# CONFIG_PATA_VIA is not set
618# CONFIG_PATA_WINBOND is not set 594# CONFIG_PATA_WINBOND is not set
619
620#
621# Multi-device support (RAID and LVM)
622#
623CONFIG_MD=y 595CONFIG_MD=y
624CONFIG_BLK_DEV_MD=y 596CONFIG_BLK_DEV_MD=y
625CONFIG_MD_LINEAR=y 597CONFIG_MD_LINEAR=y
@@ -672,10 +644,6 @@ CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y
672CONFIG_IEEE1394_ETH1394=m 644CONFIG_IEEE1394_ETH1394=m
673CONFIG_IEEE1394_DV1394=m 645CONFIG_IEEE1394_DV1394=m
674CONFIG_IEEE1394_RAWIO=y 646CONFIG_IEEE1394_RAWIO=y
675
676#
677# I2O device support
678#
679# CONFIG_I2O is not set 647# CONFIG_I2O is not set
680CONFIG_MACINTOSH_DRIVERS=y 648CONFIG_MACINTOSH_DRIVERS=y
681CONFIG_ADB_PMU=y 649CONFIG_ADB_PMU=y
@@ -688,31 +656,21 @@ CONFIG_WINDFARM_PM81=y
688CONFIG_WINDFARM_PM91=y 656CONFIG_WINDFARM_PM91=y
689CONFIG_WINDFARM_PM112=y 657CONFIG_WINDFARM_PM112=y
690# CONFIG_PMAC_RACKMETER is not set 658# CONFIG_PMAC_RACKMETER is not set
691
692#
693# Network device support
694#
695CONFIG_NETDEVICES=y 659CONFIG_NETDEVICES=y
660# CONFIG_NETDEVICES_MULTIQUEUE is not set
696CONFIG_DUMMY=m 661CONFIG_DUMMY=m
697CONFIG_BONDING=m 662CONFIG_BONDING=m
663# CONFIG_MACVLAN is not set
698# CONFIG_EQUALIZER is not set 664# CONFIG_EQUALIZER is not set
699CONFIG_TUN=m 665CONFIG_TUN=m
700# CONFIG_ARCNET is not set 666# CONFIG_ARCNET is not set
701# CONFIG_PHYLIB is not set 667# CONFIG_PHYLIB is not set
702
703#
704# Ethernet (10 or 100Mbit)
705#
706CONFIG_NET_ETHERNET=y 668CONFIG_NET_ETHERNET=y
707CONFIG_MII=y 669CONFIG_MII=y
708# CONFIG_HAPPYMEAL is not set 670# CONFIG_HAPPYMEAL is not set
709CONFIG_SUNGEM=y 671CONFIG_SUNGEM=y
710# CONFIG_CASSINI is not set 672# CONFIG_CASSINI is not set
711# CONFIG_NET_VENDOR_3COM is not set 673# CONFIG_NET_VENDOR_3COM is not set
712
713#
714# Tulip family network device support
715#
716# CONFIG_NET_TULIP is not set 674# CONFIG_NET_TULIP is not set
717# CONFIG_HP100 is not set 675# CONFIG_HP100 is not set
718# CONFIG_NET_PCI is not set 676# CONFIG_NET_PCI is not set
@@ -730,7 +688,6 @@ CONFIG_E1000=y
730# CONFIG_SIS190 is not set 688# CONFIG_SIS190 is not set
731# CONFIG_SKGE is not set 689# CONFIG_SKGE is not set
732# CONFIG_SKY2 is not set 690# CONFIG_SKY2 is not set
733# CONFIG_SK98LIN is not set
734# CONFIG_VIA_VELOCITY is not set 691# CONFIG_VIA_VELOCITY is not set
735CONFIG_TIGON3=y 692CONFIG_TIGON3=y
736# CONFIG_BNX2 is not set 693# CONFIG_BNX2 is not set
@@ -787,6 +744,7 @@ CONFIG_PPP_DEFLATE=m
787CONFIG_PPP_BSDCOMP=m 744CONFIG_PPP_BSDCOMP=m
788# CONFIG_PPP_MPPE is not set 745# CONFIG_PPP_MPPE is not set
789CONFIG_PPPOE=m 746CONFIG_PPPOE=m
747# CONFIG_PPPOL2TP is not set
790# CONFIG_SLIP is not set 748# CONFIG_SLIP is not set
791CONFIG_SLHC=m 749CONFIG_SLHC=m
792# CONFIG_NET_FC is not set 750# CONFIG_NET_FC is not set
@@ -794,15 +752,7 @@ CONFIG_SLHC=m
794# CONFIG_NETCONSOLE is not set 752# CONFIG_NETCONSOLE is not set
795# CONFIG_NETPOLL is not set 753# CONFIG_NETPOLL is not set
796# CONFIG_NET_POLL_CONTROLLER is not set 754# CONFIG_NET_POLL_CONTROLLER is not set
797
798#
799# ISDN subsystem
800#
801# CONFIG_ISDN is not set 755# CONFIG_ISDN is not set
802
803#
804# Telephony Support
805#
806# CONFIG_PHONE is not set 756# CONFIG_PHONE is not set
807 757
808# 758#
@@ -876,10 +826,6 @@ CONFIG_HW_CONSOLE=y
876CONFIG_UNIX98_PTYS=y 826CONFIG_UNIX98_PTYS=y
877CONFIG_LEGACY_PTYS=y 827CONFIG_LEGACY_PTYS=y
878CONFIG_LEGACY_PTY_COUNT=256 828CONFIG_LEGACY_PTY_COUNT=256
879
880#
881# IPMI
882#
883# CONFIG_IPMI_HANDLER is not set 829# CONFIG_IPMI_HANDLER is not set
884# CONFIG_WATCHDOG is not set 830# CONFIG_WATCHDOG is not set
885# CONFIG_HW_RANDOM is not set 831# CONFIG_HW_RANDOM is not set
@@ -893,10 +839,6 @@ CONFIG_AGP_UNINORTH=m
893CONFIG_RAW_DRIVER=y 839CONFIG_RAW_DRIVER=y
894CONFIG_MAX_RAW_DEVS=256 840CONFIG_MAX_RAW_DEVS=256
895# CONFIG_HANGCHECK_TIMER is not set 841# CONFIG_HANGCHECK_TIMER is not set
896
897#
898# TPM devices
899#
900# CONFIG_TCG_TPM is not set 842# CONFIG_TCG_TPM is not set
901CONFIG_DEVPORT=y 843CONFIG_DEVPORT=y
902CONFIG_I2C=y 844CONFIG_I2C=y
@@ -931,6 +873,7 @@ CONFIG_I2C_POWERMAC=y
931# CONFIG_I2C_SIS5595 is not set 873# CONFIG_I2C_SIS5595 is not set
932# CONFIG_I2C_SIS630 is not set 874# CONFIG_I2C_SIS630 is not set
933# CONFIG_I2C_SIS96X is not set 875# CONFIG_I2C_SIS96X is not set
876# CONFIG_I2C_TAOS_EVM is not set
934# CONFIG_I2C_STUB is not set 877# CONFIG_I2C_STUB is not set
935# CONFIG_I2C_TINY_USB is not set 878# CONFIG_I2C_TINY_USB is not set
936# CONFIG_I2C_VIA is not set 879# CONFIG_I2C_VIA is not set
@@ -942,11 +885,13 @@ CONFIG_I2C_POWERMAC=y
942# 885#
943# CONFIG_SENSORS_DS1337 is not set 886# CONFIG_SENSORS_DS1337 is not set
944# CONFIG_SENSORS_DS1374 is not set 887# CONFIG_SENSORS_DS1374 is not set
888# CONFIG_DS1682 is not set
945# CONFIG_SENSORS_EEPROM is not set 889# CONFIG_SENSORS_EEPROM is not set
946# CONFIG_SENSORS_PCF8574 is not set 890# CONFIG_SENSORS_PCF8574 is not set
947# CONFIG_SENSORS_PCA9539 is not set 891# CONFIG_SENSORS_PCA9539 is not set
948# CONFIG_SENSORS_PCF8591 is not set 892# CONFIG_SENSORS_PCF8591 is not set
949# CONFIG_SENSORS_MAX6875 is not set 893# CONFIG_SENSORS_MAX6875 is not set
894# CONFIG_SENSORS_TSL2550 is not set
950# CONFIG_I2C_DEBUG_CORE is not set 895# CONFIG_I2C_DEBUG_CORE is not set
951# CONFIG_I2C_DEBUG_ALGO is not set 896# CONFIG_I2C_DEBUG_ALGO is not set
952# CONFIG_I2C_DEBUG_BUS is not set 897# CONFIG_I2C_DEBUG_BUS is not set
@@ -957,11 +902,8 @@ CONFIG_I2C_POWERMAC=y
957# 902#
958# CONFIG_SPI is not set 903# CONFIG_SPI is not set
959# CONFIG_SPI_MASTER is not set 904# CONFIG_SPI_MASTER is not set
960
961#
962# Dallas's 1-wire bus
963#
964# CONFIG_W1 is not set 905# CONFIG_W1 is not set
906# CONFIG_POWER_SUPPLY is not set
965# CONFIG_HWMON is not set 907# CONFIG_HWMON is not set
966 908
967# 909#
@@ -981,14 +923,15 @@ CONFIG_DAB=y
981# Graphics support 923# Graphics support
982# 924#
983CONFIG_BACKLIGHT_LCD_SUPPORT=y 925CONFIG_BACKLIGHT_LCD_SUPPORT=y
984CONFIG_BACKLIGHT_CLASS_DEVICE=y
985CONFIG_LCD_CLASS_DEVICE=m 926CONFIG_LCD_CLASS_DEVICE=m
927CONFIG_BACKLIGHT_CLASS_DEVICE=y
986 928
987# 929#
988# Display device support 930# Display device support
989# 931#
990# CONFIG_DISPLAY_SUPPORT is not set 932# CONFIG_DISPLAY_SUPPORT is not set
991CONFIG_VGASTATE=y 933CONFIG_VGASTATE=y
934CONFIG_VIDEO_OUTPUT_CONTROL=m
992CONFIG_FB=y 935CONFIG_FB=y
993CONFIG_FIRMWARE_EDID=y 936CONFIG_FIRMWARE_EDID=y
994CONFIG_FB_DDC=y 937CONFIG_FB_DDC=y
@@ -1049,6 +992,7 @@ CONFIG_FB_RADEON_BACKLIGHT=y
1049# CONFIG_VGA_CONSOLE is not set 992# CONFIG_VGA_CONSOLE is not set
1050CONFIG_DUMMY_CONSOLE=y 993CONFIG_DUMMY_CONSOLE=y
1051CONFIG_FRAMEBUFFER_CONSOLE=y 994CONFIG_FRAMEBUFFER_CONSOLE=y
995# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1052# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 996# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1053# CONFIG_FONTS is not set 997# CONFIG_FONTS is not set
1054CONFIG_FONT_8x8=y 998CONFIG_FONT_8x8=y
@@ -1111,6 +1055,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
1111# CONFIG_SND_CMIPCI is not set 1055# CONFIG_SND_CMIPCI is not set
1112# CONFIG_SND_CS4281 is not set 1056# CONFIG_SND_CS4281 is not set
1113# CONFIG_SND_CS46XX is not set 1057# CONFIG_SND_CS46XX is not set
1058# CONFIG_SND_CS5530 is not set
1114# CONFIG_SND_DARLA20 is not set 1059# CONFIG_SND_DARLA20 is not set
1115# CONFIG_SND_GINA20 is not set 1060# CONFIG_SND_GINA20 is not set
1116# CONFIG_SND_LAYLA20 is not set 1061# CONFIG_SND_LAYLA20 is not set
@@ -1160,6 +1105,10 @@ CONFIG_SND_POWERMAC=m
1160CONFIG_SND_POWERMAC_AUTO_DRC=y 1105CONFIG_SND_POWERMAC_AUTO_DRC=y
1161 1106
1162# 1107#
1108# ALSA PowerPC devices
1109#
1110
1111#
1163# Apple Onboard Audio driver 1112# Apple Onboard Audio driver
1164# 1113#
1165CONFIG_SND_AOA=m 1114CONFIG_SND_AOA=m
@@ -1183,13 +1132,14 @@ CONFIG_SND_USB_AUDIO=m
1183# CONFIG_SND_SOC is not set 1132# CONFIG_SND_SOC is not set
1184 1133
1185# 1134#
1186# Open Sound System 1135# SoC Audio support for SuperH
1187# 1136#
1188# CONFIG_SOUND_PRIME is not set
1189 1137
1190# 1138#
1191# HID Devices 1139# Open Sound System
1192# 1140#
1141# CONFIG_SOUND_PRIME is not set
1142CONFIG_HID_SUPPORT=y
1193CONFIG_HID=y 1143CONFIG_HID=y
1194# CONFIG_HID_DEBUG is not set 1144# CONFIG_HID_DEBUG is not set
1195 1145
@@ -1205,10 +1155,7 @@ CONFIG_LOGITECH_FF=y
1205CONFIG_THRUSTMASTER_FF=y 1155CONFIG_THRUSTMASTER_FF=y
1206# CONFIG_ZEROPLUS_FF is not set 1156# CONFIG_ZEROPLUS_FF is not set
1207CONFIG_USB_HIDDEV=y 1157CONFIG_USB_HIDDEV=y
1208 1158CONFIG_USB_SUPPORT=y
1209#
1210# USB support
1211#
1212CONFIG_USB_ARCH_HAS_HCD=y 1159CONFIG_USB_ARCH_HAS_HCD=y
1213CONFIG_USB_ARCH_HAS_OHCI=y 1160CONFIG_USB_ARCH_HAS_OHCI=y
1214CONFIG_USB_ARCH_HAS_EHCI=y 1161CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1230,7 +1177,6 @@ CONFIG_USB_EHCI_HCD=y
1230# CONFIG_USB_EHCI_SPLIT_ISO is not set 1177# CONFIG_USB_EHCI_SPLIT_ISO is not set
1231# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1178# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1232# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1179# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1233# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1234# CONFIG_USB_ISP116X_HCD is not set 1180# CONFIG_USB_ISP116X_HCD is not set
1235CONFIG_USB_OHCI_HCD=y 1181CONFIG_USB_OHCI_HCD=y
1236CONFIG_USB_OHCI_HCD_PPC_OF=y 1182CONFIG_USB_OHCI_HCD_PPC_OF=y
@@ -1242,6 +1188,7 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1242CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1188CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1243# CONFIG_USB_UHCI_HCD is not set 1189# CONFIG_USB_UHCI_HCD is not set
1244# CONFIG_USB_SL811_HCD is not set 1190# CONFIG_USB_SL811_HCD is not set
1191# CONFIG_USB_R8A66597_HCD is not set
1245 1192
1246# 1193#
1247# USB Device Class drivers 1194# USB Device Class drivers
@@ -1326,6 +1273,7 @@ CONFIG_USB_SERIAL_MCT_U232=m
1326# CONFIG_USB_SERIAL_MOS7840 is not set 1273# CONFIG_USB_SERIAL_MOS7840 is not set
1327# CONFIG_USB_SERIAL_NAVMAN is not set 1274# CONFIG_USB_SERIAL_NAVMAN is not set
1328CONFIG_USB_SERIAL_PL2303=m 1275CONFIG_USB_SERIAL_PL2303=m
1276# CONFIG_USB_SERIAL_OTI6858 is not set
1329# CONFIG_USB_SERIAL_HP4X is not set 1277# CONFIG_USB_SERIAL_HP4X is not set
1330CONFIG_USB_SERIAL_SAFE=m 1278CONFIG_USB_SERIAL_SAFE=m
1331CONFIG_USB_SERIAL_SAFE_PADDED=y 1279CONFIG_USB_SERIAL_SAFE_PADDED=y
@@ -1371,32 +1319,9 @@ CONFIG_USB_APPLEDISPLAY=m
1371# 1319#
1372# CONFIG_USB_GADGET is not set 1320# CONFIG_USB_GADGET is not set
1373# CONFIG_MMC is not set 1321# CONFIG_MMC is not set
1374
1375#
1376# LED devices
1377#
1378# CONFIG_NEW_LEDS is not set 1322# CONFIG_NEW_LEDS is not set
1379
1380#
1381# LED drivers
1382#
1383
1384#
1385# LED Triggers
1386#
1387
1388#
1389# InfiniBand support
1390#
1391# CONFIG_INFINIBAND is not set 1323# CONFIG_INFINIBAND is not set
1392 1324# CONFIG_EDAC is not set
1393#
1394# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1395#
1396
1397#
1398# Real Time Clock
1399#
1400# CONFIG_RTC_CLASS is not set 1325# CONFIG_RTC_CLASS is not set
1401 1326
1402# 1327#
@@ -1413,6 +1338,11 @@ CONFIG_USB_APPLEDISPLAY=m
1413# 1338#
1414 1339
1415# 1340#
1341# Userspace I/O
1342#
1343# CONFIG_UIO is not set
1344
1345#
1416# File systems 1346# File systems
1417# 1347#
1418CONFIG_EXT2_FS=y 1348CONFIG_EXT2_FS=y
@@ -1538,7 +1468,6 @@ CONFIG_CIFS=m
1538# CONFIG_NCP_FS is not set 1468# CONFIG_NCP_FS is not set
1539# CONFIG_CODA_FS is not set 1469# CONFIG_CODA_FS is not set
1540# CONFIG_AFS_FS is not set 1470# CONFIG_AFS_FS is not set
1541# CONFIG_9P_FS is not set
1542 1471
1543# 1472#
1544# Partition Types 1473# Partition Types
@@ -1620,6 +1549,7 @@ CONFIG_CRC_CCITT=m
1620# CONFIG_CRC16 is not set 1549# CONFIG_CRC16 is not set
1621# CONFIG_CRC_ITU_T is not set 1550# CONFIG_CRC_ITU_T is not set
1622CONFIG_CRC32=y 1551CONFIG_CRC32=y
1552# CONFIG_CRC7 is not set
1623CONFIG_LIBCRC32C=m 1553CONFIG_LIBCRC32C=m
1624CONFIG_ZLIB_INFLATE=y 1554CONFIG_ZLIB_INFLATE=y
1625CONFIG_ZLIB_DEFLATE=m 1555CONFIG_ZLIB_DEFLATE=m
@@ -1647,6 +1577,7 @@ CONFIG_DEBUG_FS=y
1647CONFIG_DEBUG_KERNEL=y 1577CONFIG_DEBUG_KERNEL=y
1648# CONFIG_DEBUG_SHIRQ is not set 1578# CONFIG_DEBUG_SHIRQ is not set
1649CONFIG_DETECT_SOFTLOCKUP=y 1579CONFIG_DETECT_SOFTLOCKUP=y
1580CONFIG_SCHED_DEBUG=y
1650# CONFIG_SCHEDSTATS is not set 1581# CONFIG_SCHEDSTATS is not set
1651# CONFIG_TIMER_STATS is not set 1582# CONFIG_TIMER_STATS is not set
1652# CONFIG_DEBUG_SLAB is not set 1583# CONFIG_DEBUG_SLAB is not set
@@ -1677,10 +1608,6 @@ CONFIG_BOOTX_TEXT=y
1677# 1608#
1678# CONFIG_KEYS is not set 1609# CONFIG_KEYS is not set
1679# CONFIG_SECURITY is not set 1610# CONFIG_SECURITY is not set
1680
1681#
1682# Cryptographic options
1683#
1684CONFIG_CRYPTO=y 1611CONFIG_CRYPTO=y
1685CONFIG_CRYPTO_ALGAPI=y 1612CONFIG_CRYPTO_ALGAPI=y
1686CONFIG_CRYPTO_BLKCIPHER=y 1613CONFIG_CRYPTO_BLKCIPHER=y
@@ -1720,7 +1647,4 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1720CONFIG_CRYPTO_CRC32C=m 1647CONFIG_CRYPTO_CRC32C=m
1721# CONFIG_CRYPTO_CAMELLIA is not set 1648# CONFIG_CRYPTO_CAMELLIA is not set
1722CONFIG_CRYPTO_TEST=m 1649CONFIG_CRYPTO_TEST=m
1723 1650# CONFIG_CRYPTO_HW is not set
1724#
1725# Hardware crypto devices
1726#
diff --git a/arch/powerpc/configs/holly_defconfig b/arch/powerpc/configs/holly_defconfig
index 04b94f884a..97d0202a9f 100644
--- a/arch/powerpc/configs/holly_defconfig
+++ b/arch/powerpc/configs/holly_defconfig
@@ -1,9 +1,24 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 13:22:36 2007 4# Thu Aug 30 16:35:41 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18CONFIG_PPC_STD_MMU=y
19CONFIG_PPC_STD_MMU_32=y
20# CONFIG_PPC_MM_SLICES is not set
21# CONFIG_SMP is not set
7CONFIG_PPC32=y 22CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 23CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 24CONFIG_MMU=y
@@ -14,61 +29,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 29CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 30CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 31CONFIG_GENERIC_FIND_NEXT_BIT=y
32# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 33CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 34CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 35CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 36CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 37CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 38CONFIG_PPC_OF=y
39CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 40CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 41# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 42CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 43CONFIG_GENERIC_BUG=y
27# CONFIG_DEFAULT_UIMAGE is not set 44# CONFIG_DEFAULT_UIMAGE is not set
28
29#
30# Processor support
31#
32CONFIG_CLASSIC32=y
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_PPC_FPU=y
43# CONFIG_PPC_DCR_NATIVE is not set 45# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 46# CONFIG_PPC_DCR_MMIO is not set
45# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49# CONFIG_SMP is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 47CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 48
52# 49#
53# Code maturity level options 50# General setup
54# 51#
55CONFIG_EXPERIMENTAL=y 52CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 53CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 54CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 55CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 56CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 57CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 58CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 59CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 60# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 61# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 62# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 63# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 64# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 65# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 66CONFIG_LOG_BUF_SHIFT=14
@@ -102,23 +94,16 @@ CONFIG_SLAB=y
102CONFIG_RT_MUTEXES=y 94CONFIG_RT_MUTEXES=y
103# CONFIG_TINY_SHMEM is not set 95# CONFIG_TINY_SHMEM is not set
104CONFIG_BASE_SMALL=0 96CONFIG_BASE_SMALL=0
105
106#
107# Loadable module support
108#
109CONFIG_MODULES=y 97CONFIG_MODULES=y
110# CONFIG_MODULE_UNLOAD is not set 98# CONFIG_MODULE_UNLOAD is not set
111# CONFIG_MODVERSIONS is not set 99# CONFIG_MODVERSIONS is not set
112# CONFIG_MODULE_SRCVERSION_ALL is not set 100# CONFIG_MODULE_SRCVERSION_ALL is not set
113# CONFIG_KMOD is not set 101# CONFIG_KMOD is not set
114
115#
116# Block layer
117#
118CONFIG_BLOCK=y 102CONFIG_BLOCK=y
119CONFIG_LBD=y 103CONFIG_LBD=y
120# CONFIG_BLK_DEV_IO_TRACE is not set 104# CONFIG_BLK_DEV_IO_TRACE is not set
121# CONFIG_LSF is not set 105# CONFIG_LSF is not set
106# CONFIG_BLK_DEV_BSG is not set
122 107
123# 108#
124# IO Schedulers 109# IO Schedulers
@@ -138,7 +123,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
138# 123#
139# CONFIG_PPC_MULTIPLATFORM is not set 124# CONFIG_PPC_MULTIPLATFORM is not set
140CONFIG_EMBEDDED6xx=y 125CONFIG_EMBEDDED6xx=y
141# CONFIG_APUS is not set 126# CONFIG_PPC_82xx is not set
127# CONFIG_PPC_83xx is not set
128# CONFIG_PPC_86xx is not set
142# CONFIG_PPC_MPC52xx is not set 129# CONFIG_PPC_MPC52xx is not set
143# CONFIG_PPC_MPC5200 is not set 130# CONFIG_PPC_MPC5200 is not set
144# CONFIG_PPC_CELL is not set 131# CONFIG_PPC_CELL is not set
@@ -159,8 +146,8 @@ CONFIG_MPIC_WEIRD=y
159# CONFIG_PPC_INDIRECT_IO is not set 146# CONFIG_PPC_INDIRECT_IO is not set
160# CONFIG_GENERIC_IOMAP is not set 147# CONFIG_GENERIC_IOMAP is not set
161# CONFIG_CPU_FREQ is not set 148# CONFIG_CPU_FREQ is not set
162# CONFIG_TAU is not set
163# CONFIG_CPM2 is not set 149# CONFIG_CPM2 is not set
150# CONFIG_FSL_ULI1575 is not set
164 151
165# 152#
166# Kernel options 153# Kernel options
@@ -189,6 +176,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
189CONFIG_SPLIT_PTLOCK_CPUS=4 176CONFIG_SPLIT_PTLOCK_CPUS=4
190# CONFIG_RESOURCES_64BIT is not set 177# CONFIG_RESOURCES_64BIT is not set
191CONFIG_ZONE_DMA_FLAG=1 178CONFIG_ZONE_DMA_FLAG=1
179CONFIG_BOUNCE=y
180CONFIG_VIRT_TO_BUS=y
192CONFIG_PROC_DEVICETREE=y 181CONFIG_PROC_DEVICETREE=y
193CONFIG_CMDLINE_BOOL=y 182CONFIG_CMDLINE_BOOL=y
194CONFIG_CMDLINE="console=ttyS0,115200" 183CONFIG_CMDLINE="console=ttyS0,115200"
@@ -206,6 +195,7 @@ CONFIG_GENERIC_ISA_DMA=y
206# CONFIG_PPC_INDIRECT_PCI is not set 195# CONFIG_PPC_INDIRECT_PCI is not set
207CONFIG_PCI=y 196CONFIG_PCI=y
208CONFIG_PCI_DOMAINS=y 197CONFIG_PCI_DOMAINS=y
198CONFIG_PCI_SYSCALL=y
209# CONFIG_PCIEPORTBUS is not set 199# CONFIG_PCIEPORTBUS is not set
210CONFIG_ARCH_SUPPORTS_MSI=y 200CONFIG_ARCH_SUPPORTS_MSI=y
211# CONFIG_PCI_MSI is not set 201# CONFIG_PCI_MSI is not set
@@ -316,6 +306,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
316# CONFIG_MAC80211 is not set 306# CONFIG_MAC80211 is not set
317# CONFIG_IEEE80211 is not set 307# CONFIG_IEEE80211 is not set
318# CONFIG_RFKILL is not set 308# CONFIG_RFKILL is not set
309# CONFIG_NET_9P is not set
319 310
320# 311#
321# Device Drivers 312# Device Drivers
@@ -330,26 +321,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
330# CONFIG_DEBUG_DRIVER is not set 321# CONFIG_DEBUG_DRIVER is not set
331# CONFIG_DEBUG_DEVRES is not set 322# CONFIG_DEBUG_DEVRES is not set
332# CONFIG_SYS_HYPERVISOR is not set 323# CONFIG_SYS_HYPERVISOR is not set
333
334#
335# Connector - unified userspace <-> kernelspace linker
336#
337# CONFIG_CONNECTOR is not set 324# CONFIG_CONNECTOR is not set
338# CONFIG_MTD is not set 325# CONFIG_MTD is not set
339 326CONFIG_OF_DEVICE=y
340#
341# Parallel port support
342#
343# CONFIG_PARPORT is not set 327# CONFIG_PARPORT is not set
344 328CONFIG_BLK_DEV=y
345#
346# Plug and Play support
347#
348# CONFIG_PNPACPI is not set
349
350#
351# Block devices
352#
353# CONFIG_BLK_DEV_FD is not set 329# CONFIG_BLK_DEV_FD is not set
354# CONFIG_BLK_CPQ_DA is not set 330# CONFIG_BLK_CPQ_DA is not set
355# CONFIG_BLK_CPQ_CISS_DA is not set 331# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -366,14 +342,11 @@ CONFIG_BLK_DEV_RAM_SIZE=131072
366CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 342CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
367# CONFIG_CDROM_PKTCDVD is not set 343# CONFIG_CDROM_PKTCDVD is not set
368# CONFIG_ATA_OVER_ETH is not set 344# CONFIG_ATA_OVER_ETH is not set
369 345CONFIG_MISC_DEVICES=y
370#
371# Misc devices
372#
373# CONFIG_PHANTOM is not set 346# CONFIG_PHANTOM is not set
347# CONFIG_EEPROM_93CX6 is not set
374# CONFIG_SGI_IOC4 is not set 348# CONFIG_SGI_IOC4 is not set
375# CONFIG_TIFM_CORE is not set 349# CONFIG_TIFM_CORE is not set
376# CONFIG_BLINK is not set
377# CONFIG_IDE is not set 350# CONFIG_IDE is not set
378 351
379# 352#
@@ -381,6 +354,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
381# 354#
382# CONFIG_RAID_ATTRS is not set 355# CONFIG_RAID_ATTRS is not set
383CONFIG_SCSI=y 356CONFIG_SCSI=y
357CONFIG_SCSI_DMA=y
384# CONFIG_SCSI_TGT is not set 358# CONFIG_SCSI_TGT is not set
385# CONFIG_SCSI_NETLINK is not set 359# CONFIG_SCSI_NETLINK is not set
386CONFIG_SCSI_PROC_FS=y 360CONFIG_SCSI_PROC_FS=y
@@ -410,12 +384,8 @@ CONFIG_SCSI_WAIT_SCAN=m
410# CONFIG_SCSI_SPI_ATTRS is not set 384# CONFIG_SCSI_SPI_ATTRS is not set
411# CONFIG_SCSI_FC_ATTRS is not set 385# CONFIG_SCSI_FC_ATTRS is not set
412# CONFIG_SCSI_ISCSI_ATTRS is not set 386# CONFIG_SCSI_ISCSI_ATTRS is not set
413# CONFIG_SCSI_SAS_ATTRS is not set
414# CONFIG_SCSI_SAS_LIBSAS is not set 387# CONFIG_SCSI_SAS_LIBSAS is not set
415 388CONFIG_SCSI_LOWLEVEL=y
416#
417# SCSI low-level drivers
418#
419# CONFIG_ISCSI_TCP is not set 389# CONFIG_ISCSI_TCP is not set
420# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 390# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
421# CONFIG_SCSI_3W_9XXX is not set 391# CONFIG_SCSI_3W_9XXX is not set
@@ -506,10 +476,6 @@ CONFIG_ATA=y
506# CONFIG_PATA_VIA is not set 476# CONFIG_PATA_VIA is not set
507# CONFIG_PATA_WINBOND is not set 477# CONFIG_PATA_WINBOND is not set
508# CONFIG_PATA_PLATFORM is not set 478# CONFIG_PATA_PLATFORM is not set
509
510#
511# Multi-device support (RAID and LVM)
512#
513# CONFIG_MD is not set 479# CONFIG_MD is not set
514 480
515# 481#
@@ -525,19 +491,13 @@ CONFIG_ATA=y
525# 491#
526# CONFIG_FIREWIRE is not set 492# CONFIG_FIREWIRE is not set
527# CONFIG_IEEE1394 is not set 493# CONFIG_IEEE1394 is not set
528
529#
530# I2O device support
531#
532# CONFIG_I2O is not set 494# CONFIG_I2O is not set
533# CONFIG_MACINTOSH_DRIVERS is not set 495# CONFIG_MACINTOSH_DRIVERS is not set
534
535#
536# Network device support
537#
538CONFIG_NETDEVICES=y 496CONFIG_NETDEVICES=y
497# CONFIG_NETDEVICES_MULTIQUEUE is not set
539# CONFIG_DUMMY is not set 498# CONFIG_DUMMY is not set
540# CONFIG_BONDING is not set 499# CONFIG_BONDING is not set
500# CONFIG_MACVLAN is not set
541# CONFIG_EQUALIZER is not set 501# CONFIG_EQUALIZER is not set
542# CONFIG_TUN is not set 502# CONFIG_TUN is not set
543# CONFIG_ARCNET is not set 503# CONFIG_ARCNET is not set
@@ -554,11 +514,8 @@ CONFIG_PHYLIB=y
554# CONFIG_VITESSE_PHY is not set 514# CONFIG_VITESSE_PHY is not set
555# CONFIG_SMSC_PHY is not set 515# CONFIG_SMSC_PHY is not set
556# CONFIG_BROADCOM_PHY is not set 516# CONFIG_BROADCOM_PHY is not set
517# CONFIG_ICPLUS_PHY is not set
557# CONFIG_FIXED_PHY is not set 518# CONFIG_FIXED_PHY is not set
558
559#
560# Ethernet (10 or 100Mbit)
561#
562CONFIG_NET_ETHERNET=y 519CONFIG_NET_ETHERNET=y
563CONFIG_MII=y 520CONFIG_MII=y
564# CONFIG_HAPPYMEAL is not set 521# CONFIG_HAPPYMEAL is not set
@@ -567,10 +524,6 @@ CONFIG_MII=y
567CONFIG_NET_VENDOR_3COM=y 524CONFIG_NET_VENDOR_3COM=y
568CONFIG_VORTEX=y 525CONFIG_VORTEX=y
569# CONFIG_TYPHOON is not set 526# CONFIG_TYPHOON is not set
570
571#
572# Tulip family network device support
573#
574# CONFIG_NET_TULIP is not set 527# CONFIG_NET_TULIP is not set
575# CONFIG_HP100 is not set 528# CONFIG_HP100 is not set
576# CONFIG_NET_PCI is not set 529# CONFIG_NET_PCI is not set
@@ -585,7 +538,6 @@ CONFIG_NETDEV_1000=y
585# CONFIG_SIS190 is not set 538# CONFIG_SIS190 is not set
586# CONFIG_SKGE is not set 539# CONFIG_SKGE is not set
587# CONFIG_SKY2 is not set 540# CONFIG_SKY2 is not set
588# CONFIG_SK98LIN is not set
589# CONFIG_VIA_VELOCITY is not set 541# CONFIG_VIA_VELOCITY is not set
590# CONFIG_TIGON3 is not set 542# CONFIG_TIGON3 is not set
591# CONFIG_BNX2 is not set 543# CONFIG_BNX2 is not set
@@ -617,15 +569,7 @@ CONFIG_NETDEV_10000=y
617# CONFIG_NETCONSOLE is not set 569# CONFIG_NETCONSOLE is not set
618# CONFIG_NETPOLL is not set 570# CONFIG_NETPOLL is not set
619# CONFIG_NET_POLL_CONTROLLER is not set 571# CONFIG_NET_POLL_CONTROLLER is not set
620
621#
622# ISDN subsystem
623#
624# CONFIG_ISDN is not set 572# CONFIG_ISDN is not set
625
626#
627# Telephony Support
628#
629# CONFIG_PHONE is not set 573# CONFIG_PHONE is not set
630 574
631# 575#
@@ -691,10 +635,6 @@ CONFIG_SERIAL_OF_PLATFORM=y
691CONFIG_UNIX98_PTYS=y 635CONFIG_UNIX98_PTYS=y
692CONFIG_LEGACY_PTYS=y 636CONFIG_LEGACY_PTYS=y
693CONFIG_LEGACY_PTY_COUNT=256 637CONFIG_LEGACY_PTY_COUNT=256
694
695#
696# IPMI
697#
698# CONFIG_IPMI_HANDLER is not set 638# CONFIG_IPMI_HANDLER is not set
699# CONFIG_WATCHDOG is not set 639# CONFIG_WATCHDOG is not set
700# CONFIG_HW_RANDOM is not set 640# CONFIG_HW_RANDOM is not set
@@ -706,10 +646,6 @@ CONFIG_GEN_RTC=y
706# CONFIG_AGP is not set 646# CONFIG_AGP is not set
707# CONFIG_DRM is not set 647# CONFIG_DRM is not set
708# CONFIG_RAW_DRIVER is not set 648# CONFIG_RAW_DRIVER is not set
709
710#
711# TPM devices
712#
713# CONFIG_TCG_TPM is not set 649# CONFIG_TCG_TPM is not set
714CONFIG_DEVPORT=y 650CONFIG_DEVPORT=y
715# CONFIG_I2C is not set 651# CONFIG_I2C is not set
@@ -719,20 +655,24 @@ CONFIG_DEVPORT=y
719# 655#
720# CONFIG_SPI is not set 656# CONFIG_SPI is not set
721# CONFIG_SPI_MASTER is not set 657# CONFIG_SPI_MASTER is not set
722
723#
724# Dallas's 1-wire bus
725#
726# CONFIG_W1 is not set 658# CONFIG_W1 is not set
659# CONFIG_POWER_SUPPLY is not set
727CONFIG_HWMON=y 660CONFIG_HWMON=y
728# CONFIG_HWMON_VID is not set 661# CONFIG_HWMON_VID is not set
729# CONFIG_SENSORS_ABITUGURU is not set 662# CONFIG_SENSORS_ABITUGURU is not set
663# CONFIG_SENSORS_ABITUGURU3 is not set
730# CONFIG_SENSORS_F71805F is not set 664# CONFIG_SENSORS_F71805F is not set
665# CONFIG_SENSORS_IT87 is not set
666# CONFIG_SENSORS_PC87360 is not set
731# CONFIG_SENSORS_PC87427 is not set 667# CONFIG_SENSORS_PC87427 is not set
668# CONFIG_SENSORS_SIS5595 is not set
732# CONFIG_SENSORS_SMSC47M1 is not set 669# CONFIG_SENSORS_SMSC47M1 is not set
733# CONFIG_SENSORS_SMSC47B397 is not set 670# CONFIG_SENSORS_SMSC47B397 is not set
671# CONFIG_SENSORS_VIA686A is not set
734# CONFIG_SENSORS_VT1211 is not set 672# CONFIG_SENSORS_VT1211 is not set
673# CONFIG_SENSORS_VT8231 is not set
735# CONFIG_SENSORS_W83627HF is not set 674# CONFIG_SENSORS_W83627HF is not set
675# CONFIG_SENSORS_W83627EHF is not set
736# CONFIG_HWMON_DEBUG_CHIP is not set 676# CONFIG_HWMON_DEBUG_CHIP is not set
737 677
738# 678#
@@ -757,6 +697,7 @@ CONFIG_HWMON=y
757# 697#
758# CONFIG_DISPLAY_SUPPORT is not set 698# CONFIG_DISPLAY_SUPPORT is not set
759# CONFIG_VGASTATE is not set 699# CONFIG_VGASTATE is not set
700# CONFIG_VIDEO_OUTPUT_CONTROL is not set
760# CONFIG_FB is not set 701# CONFIG_FB is not set
761# CONFIG_FB_IBM_GXT4500 is not set 702# CONFIG_FB_IBM_GXT4500 is not set
762 703
@@ -764,16 +705,10 @@ CONFIG_HWMON=y
764# Sound 705# Sound
765# 706#
766# CONFIG_SOUND is not set 707# CONFIG_SOUND is not set
767 708CONFIG_HID_SUPPORT=y
768#
769# HID Devices
770#
771CONFIG_HID=y 709CONFIG_HID=y
772# CONFIG_HID_DEBUG is not set 710# CONFIG_HID_DEBUG is not set
773 711CONFIG_USB_SUPPORT=y
774#
775# USB support
776#
777CONFIG_USB_ARCH_HAS_HCD=y 712CONFIG_USB_ARCH_HAS_HCD=y
778CONFIG_USB_ARCH_HAS_OHCI=y 713CONFIG_USB_ARCH_HAS_OHCI=y
779CONFIG_USB_ARCH_HAS_EHCI=y 714CONFIG_USB_ARCH_HAS_EHCI=y
@@ -788,32 +723,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
788# 723#
789# CONFIG_USB_GADGET is not set 724# CONFIG_USB_GADGET is not set
790# CONFIG_MMC is not set 725# CONFIG_MMC is not set
791
792#
793# LED devices
794#
795# CONFIG_NEW_LEDS is not set 726# CONFIG_NEW_LEDS is not set
796
797#
798# LED drivers
799#
800
801#
802# LED Triggers
803#
804
805#
806# InfiniBand support
807#
808# CONFIG_INFINIBAND is not set 727# CONFIG_INFINIBAND is not set
809 728# CONFIG_EDAC is not set
810#
811# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
812#
813
814#
815# Real Time Clock
816#
817# CONFIG_RTC_CLASS is not set 729# CONFIG_RTC_CLASS is not set
818 730
819# 731#
@@ -830,6 +742,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
830# 742#
831 743
832# 744#
745# Userspace I/O
746#
747# CONFIG_UIO is not set
748
749#
833# File systems 750# File systems
834# 751#
835CONFIG_EXT2_FS=y 752CONFIG_EXT2_FS=y
@@ -922,7 +839,6 @@ CONFIG_SUNRPC=y
922# CONFIG_NCP_FS is not set 839# CONFIG_NCP_FS is not set
923# CONFIG_CODA_FS is not set 840# CONFIG_CODA_FS is not set
924# CONFIG_AFS_FS is not set 841# CONFIG_AFS_FS is not set
925# CONFIG_9P_FS is not set
926 842
927# 843#
928# Partition Types 844# Partition Types
@@ -965,6 +881,7 @@ CONFIG_BITREVERSE=y
965# CONFIG_CRC16 is not set 881# CONFIG_CRC16 is not set
966# CONFIG_CRC_ITU_T is not set 882# CONFIG_CRC_ITU_T is not set
967CONFIG_CRC32=y 883CONFIG_CRC32=y
884# CONFIG_CRC7 is not set
968# CONFIG_LIBCRC32C is not set 885# CONFIG_LIBCRC32C is not set
969CONFIG_PLIST=y 886CONFIG_PLIST=y
970CONFIG_HAS_IOMEM=y 887CONFIG_HAS_IOMEM=y
@@ -989,6 +906,7 @@ CONFIG_MAGIC_SYSRQ=y
989CONFIG_DEBUG_KERNEL=y 906CONFIG_DEBUG_KERNEL=y
990# CONFIG_DEBUG_SHIRQ is not set 907# CONFIG_DEBUG_SHIRQ is not set
991CONFIG_DETECT_SOFTLOCKUP=y 908CONFIG_DETECT_SOFTLOCKUP=y
909# CONFIG_SCHED_DEBUG is not set
992# CONFIG_SCHEDSTATS is not set 910# CONFIG_SCHEDSTATS is not set
993# CONFIG_TIMER_STATS is not set 911# CONFIG_TIMER_STATS is not set
994# CONFIG_DEBUG_SLAB is not set 912# CONFIG_DEBUG_SLAB is not set
@@ -1014,7 +932,6 @@ CONFIG_XMON=y
1014CONFIG_XMON_DEFAULT=y 932CONFIG_XMON_DEFAULT=y
1015CONFIG_XMON_DISASSEMBLY=y 933CONFIG_XMON_DISASSEMBLY=y
1016# CONFIG_BDI_SWITCH is not set 934# CONFIG_BDI_SWITCH is not set
1017# CONFIG_BOOTX_TEXT is not set
1018# CONFIG_PPC_EARLY_DEBUG is not set 935# CONFIG_PPC_EARLY_DEBUG is not set
1019 936
1020# 937#
@@ -1022,8 +939,4 @@ CONFIG_XMON_DISASSEMBLY=y
1022# 939#
1023# CONFIG_KEYS is not set 940# CONFIG_KEYS is not set
1024# CONFIG_SECURITY is not set 941# CONFIG_SECURITY is not set
1025
1026#
1027# Cryptographic options
1028#
1029# CONFIG_CRYPTO is not set 942# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index 8e33674524..3fe1929460 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_defconfig
@@ -1,9 +1,23 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 13:22:39 2007 4# Thu Aug 30 16:37:16 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7
8#
9# Processor support
10#
11# CONFIG_POWER4_ONLY is not set
12CONFIG_POWER3=y
13CONFIG_POWER4=y
14CONFIG_PPC_FPU=y
15# CONFIG_ALTIVEC is not set
16CONFIG_PPC_STD_MMU=y
17# CONFIG_PPC_MM_SLICES is not set
18CONFIG_VIRT_CPU_ACCOUNTING=y
19CONFIG_SMP=y
20CONFIG_NR_CPUS=32
7CONFIG_64BIT=y 21CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y 22CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 23CONFIG_MMU=y
@@ -15,6 +29,7 @@ CONFIG_ARCH_HAS_ILOG2_U64=y
15CONFIG_GENERIC_HWEIGHT=y 29CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y 30CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y 31CONFIG_GENERIC_FIND_NEXT_BIT=y
32CONFIG_ARCH_NO_VIRT_TO_BUS=y
18CONFIG_PPC=y 33CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y 34CONFIG_EARLY_PRINTK=y
20CONFIG_COMPAT=y 35CONFIG_COMPAT=y
@@ -22,50 +37,32 @@ CONFIG_SYSVIPC_COMPAT=y
22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
25# CONFIG_PPC_UDBG_16550 is not set 41# CONFIG_PPC_UDBG_16550 is not set
26# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
27CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set 45# CONFIG_DEFAULT_UIMAGE is not set
30
31#
32# Processor support
33#
34# CONFIG_POWER4_ONLY is not set
35CONFIG_POWER3=y
36CONFIG_POWER4=y
37CONFIG_PPC_FPU=y
38# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
39# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
40# CONFIG_PPC_OF_PLATFORM_PCI is not set 48# CONFIG_PPC_OF_PLATFORM_PCI is not set
41# CONFIG_ALTIVEC is not set
42CONFIG_PPC_STD_MMU=y
43# CONFIG_PPC_MM_SLICES is not set
44CONFIG_VIRT_CPU_ACCOUNTING=y
45CONFIG_SMP=y
46CONFIG_NR_CPUS=32
47CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
48 50
49# 51#
50# Code maturity level options 52# General setup
51# 53#
52CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
53CONFIG_LOCK_KERNEL=y 55CONFIG_LOCK_KERNEL=y
54CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
55
56#
57# General setup
58#
59CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
60CONFIG_LOCALVERSION_AUTO=y 58CONFIG_LOCALVERSION_AUTO=y
61CONFIG_SWAP=y 59CONFIG_SWAP=y
62CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
63# CONFIG_IPC_NS is not set
64CONFIG_SYSVIPC_SYSCTL=y 61CONFIG_SYSVIPC_SYSCTL=y
65CONFIG_POSIX_MQUEUE=y 62CONFIG_POSIX_MQUEUE=y
66# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
67# CONFIG_TASKSTATS is not set 64# CONFIG_TASKSTATS is not set
68# CONFIG_UTS_NS is not set 65# CONFIG_USER_NS is not set
69CONFIG_AUDIT=y 66CONFIG_AUDIT=y
70CONFIG_AUDITSYSCALL=y 67CONFIG_AUDITSYSCALL=y
71CONFIG_IKCONFIG=y 68CONFIG_IKCONFIG=y
@@ -102,10 +99,6 @@ CONFIG_SLAB=y
102CONFIG_RT_MUTEXES=y 99CONFIG_RT_MUTEXES=y
103# CONFIG_TINY_SHMEM is not set 100# CONFIG_TINY_SHMEM is not set
104CONFIG_BASE_SMALL=0 101CONFIG_BASE_SMALL=0
105
106#
107# Loadable module support
108#
109CONFIG_MODULES=y 102CONFIG_MODULES=y
110CONFIG_MODULE_UNLOAD=y 103CONFIG_MODULE_UNLOAD=y
111# CONFIG_MODULE_FORCE_UNLOAD is not set 104# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -113,12 +106,9 @@ CONFIG_MODVERSIONS=y
113CONFIG_MODULE_SRCVERSION_ALL=y 106CONFIG_MODULE_SRCVERSION_ALL=y
114CONFIG_KMOD=y 107CONFIG_KMOD=y
115CONFIG_STOP_MACHINE=y 108CONFIG_STOP_MACHINE=y
116
117#
118# Block layer
119#
120CONFIG_BLOCK=y 109CONFIG_BLOCK=y
121# CONFIG_BLK_DEV_IO_TRACE is not set 110# CONFIG_BLK_DEV_IO_TRACE is not set
111CONFIG_BLK_DEV_BSG=y
122 112
123# 113#
124# IO Schedulers 114# IO Schedulers
@@ -138,7 +128,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
138# 128#
139CONFIG_PPC_MULTIPLATFORM=y 129CONFIG_PPC_MULTIPLATFORM=y
140# CONFIG_EMBEDDED6xx is not set 130# CONFIG_EMBEDDED6xx is not set
141# CONFIG_APUS is not set 131# CONFIG_PPC_82xx is not set
132# CONFIG_PPC_83xx is not set
133# CONFIG_PPC_86xx is not set
142# CONFIG_PPC_PSERIES is not set 134# CONFIG_PPC_PSERIES is not set
143CONFIG_LPARCFG=y 135CONFIG_LPARCFG=y
144CONFIG_PPC_ISERIES=y 136CONFIG_PPC_ISERIES=y
@@ -174,6 +166,7 @@ CONFIG_PPC_INDIRECT_IO=y
174CONFIG_GENERIC_IOMAP=y 166CONFIG_GENERIC_IOMAP=y
175# CONFIG_CPU_FREQ is not set 167# CONFIG_CPU_FREQ is not set
176# CONFIG_CPM2 is not set 168# CONFIG_CPM2 is not set
169# CONFIG_FSL_ULI1575 is not set
177 170
178# 171#
179# Kernel options 172# Kernel options
@@ -210,6 +203,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
210CONFIG_SPLIT_PTLOCK_CPUS=4 203CONFIG_SPLIT_PTLOCK_CPUS=4
211CONFIG_RESOURCES_64BIT=y 204CONFIG_RESOURCES_64BIT=y
212CONFIG_ZONE_DMA_FLAG=1 205CONFIG_ZONE_DMA_FLAG=1
206CONFIG_BOUNCE=y
213# CONFIG_PPC_HAS_HASH_64K is not set 207# CONFIG_PPC_HAS_HASH_64K is not set
214# CONFIG_PPC_64K_PAGES is not set 208# CONFIG_PPC_64K_PAGES is not set
215# CONFIG_SCHED_SMT is not set 209# CONFIG_SCHED_SMT is not set
@@ -228,6 +222,7 @@ CONFIG_GENERIC_ISA_DMA=y
228# CONFIG_PPC_INDIRECT_PCI is not set 222# CONFIG_PPC_INDIRECT_PCI is not set
229CONFIG_PCI=y 223CONFIG_PCI=y
230CONFIG_PCI_DOMAINS=y 224CONFIG_PCI_DOMAINS=y
225CONFIG_PCI_SYSCALL=y
231# CONFIG_PCIEPORTBUS is not set 226# CONFIG_PCIEPORTBUS is not set
232CONFIG_ARCH_SUPPORTS_MSI=y 227CONFIG_ARCH_SUPPORTS_MSI=y
233# CONFIG_PCI_MSI is not set 228# CONFIG_PCI_MSI is not set
@@ -299,6 +294,7 @@ CONFIG_NF_CONNTRACK=m
299CONFIG_NF_CONNTRACK_MARK=y 294CONFIG_NF_CONNTRACK_MARK=y
300CONFIG_NF_CONNTRACK_EVENTS=y 295CONFIG_NF_CONNTRACK_EVENTS=y
301# CONFIG_NF_CT_PROTO_SCTP is not set 296# CONFIG_NF_CT_PROTO_SCTP is not set
297# CONFIG_NF_CT_PROTO_UDPLITE is not set
302# CONFIG_NF_CONNTRACK_AMANDA is not set 298# CONFIG_NF_CONNTRACK_AMANDA is not set
303CONFIG_NF_CONNTRACK_FTP=m 299CONFIG_NF_CONNTRACK_FTP=m
304# CONFIG_NF_CONNTRACK_H323 is not set 300# CONFIG_NF_CONNTRACK_H323 is not set
@@ -316,9 +312,11 @@ CONFIG_NETFILTER_XT_TARGET_MARK=m
316CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 312CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
317# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set 313# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
318# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set 314# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
315# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
319# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set 316# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
320CONFIG_NETFILTER_XT_MATCH_COMMENT=m 317CONFIG_NETFILTER_XT_MATCH_COMMENT=m
321# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set 318# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
319# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
322CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 320CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
323CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 321CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
324# CONFIG_NETFILTER_XT_MATCH_DCCP is not set 322# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
@@ -339,6 +337,7 @@ CONFIG_NETFILTER_XT_MATCH_SCTP=m
339# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set 337# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
340CONFIG_NETFILTER_XT_MATCH_STRING=m 338CONFIG_NETFILTER_XT_MATCH_STRING=m
341CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 339CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
340# CONFIG_NETFILTER_XT_MATCH_U32 is not set
342# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set 341# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
343 342
344# 343#
@@ -427,6 +426,7 @@ CONFIG_NET_CLS_ROUTE=y
427# CONFIG_MAC80211 is not set 426# CONFIG_MAC80211 is not set
428# CONFIG_IEEE80211 is not set 427# CONFIG_IEEE80211 is not set
429# CONFIG_RFKILL is not set 428# CONFIG_RFKILL is not set
429# CONFIG_NET_9P is not set
430 430
431# 431#
432# Device Drivers 432# Device Drivers
@@ -441,28 +441,12 @@ CONFIG_FW_LOADER=m
441# CONFIG_DEBUG_DRIVER is not set 441# CONFIG_DEBUG_DRIVER is not set
442# CONFIG_DEBUG_DEVRES is not set 442# CONFIG_DEBUG_DEVRES is not set
443# CONFIG_SYS_HYPERVISOR is not set 443# CONFIG_SYS_HYPERVISOR is not set
444
445#
446# Connector - unified userspace <-> kernelspace linker
447#
448# CONFIG_CONNECTOR is not set 444# CONFIG_CONNECTOR is not set
449# CONFIG_MTD is not set 445# CONFIG_MTD is not set
450 446CONFIG_OF_DEVICE=y
451#
452# Parallel port support
453#
454# CONFIG_PARPORT is not set 447# CONFIG_PARPORT is not set
455 448CONFIG_BLK_DEV=y
456#
457# Plug and Play support
458#
459# CONFIG_PNPACPI is not set
460
461#
462# Block devices
463#
464# CONFIG_BLK_DEV_FD is not set 449# CONFIG_BLK_DEV_FD is not set
465# CONFIG_BLK_CPQ_DA is not set
466# CONFIG_BLK_CPQ_CISS_DA is not set 450# CONFIG_BLK_CPQ_CISS_DA is not set
467# CONFIG_BLK_DEV_DAC960 is not set 451# CONFIG_BLK_DEV_DAC960 is not set
468# CONFIG_BLK_DEV_UMEM is not set 452# CONFIG_BLK_DEV_UMEM is not set
@@ -477,14 +461,11 @@ CONFIG_BLK_DEV_RAM_SIZE=65536
477CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 461CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
478# CONFIG_CDROM_PKTCDVD is not set 462# CONFIG_CDROM_PKTCDVD is not set
479# CONFIG_ATA_OVER_ETH is not set 463# CONFIG_ATA_OVER_ETH is not set
480 464CONFIG_MISC_DEVICES=y
481#
482# Misc devices
483#
484# CONFIG_PHANTOM is not set 465# CONFIG_PHANTOM is not set
466# CONFIG_EEPROM_93CX6 is not set
485# CONFIG_SGI_IOC4 is not set 467# CONFIG_SGI_IOC4 is not set
486# CONFIG_TIFM_CORE is not set 468# CONFIG_TIFM_CORE is not set
487# CONFIG_BLINK is not set
488# CONFIG_IDE is not set 469# CONFIG_IDE is not set
489 470
490# 471#
@@ -492,6 +473,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
492# 473#
493# CONFIG_RAID_ATTRS is not set 474# CONFIG_RAID_ATTRS is not set
494CONFIG_SCSI=y 475CONFIG_SCSI=y
476CONFIG_SCSI_DMA=y
495# CONFIG_SCSI_TGT is not set 477# CONFIG_SCSI_TGT is not set
496CONFIG_SCSI_NETLINK=y 478CONFIG_SCSI_NETLINK=y
497CONFIG_SCSI_PROC_FS=y 479CONFIG_SCSI_PROC_FS=y
@@ -525,10 +507,7 @@ CONFIG_SCSI_FC_ATTRS=y
525CONFIG_SCSI_SAS_ATTRS=m 507CONFIG_SCSI_SAS_ATTRS=m
526CONFIG_SCSI_SAS_LIBSAS=m 508CONFIG_SCSI_SAS_LIBSAS=m
527CONFIG_SCSI_SAS_LIBSAS_DEBUG=y 509CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
528 510CONFIG_SCSI_LOWLEVEL=y
529#
530# SCSI low-level drivers
531#
532# CONFIG_ISCSI_TCP is not set 511# CONFIG_ISCSI_TCP is not set
533# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 512# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
534# CONFIG_SCSI_3W_9XXX is not set 513# CONFIG_SCSI_3W_9XXX is not set
@@ -543,7 +522,6 @@ CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
543# CONFIG_MEGARAID_LEGACY is not set 522# CONFIG_MEGARAID_LEGACY is not set
544# CONFIG_MEGARAID_SAS is not set 523# CONFIG_MEGARAID_SAS is not set
545# CONFIG_SCSI_HPTIOP is not set 524# CONFIG_SCSI_HPTIOP is not set
546# CONFIG_SCSI_BUSLOGIC is not set
547# CONFIG_SCSI_DMX3191D is not set 525# CONFIG_SCSI_DMX3191D is not set
548# CONFIG_SCSI_EATA is not set 526# CONFIG_SCSI_EATA is not set
549# CONFIG_SCSI_FUTURE_DOMAIN is not set 527# CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -563,10 +541,6 @@ CONFIG_SCSI_IBMVSCSI=m
563# CONFIG_SCSI_DEBUG is not set 541# CONFIG_SCSI_DEBUG is not set
564# CONFIG_SCSI_SRP is not set 542# CONFIG_SCSI_SRP is not set
565# CONFIG_ATA is not set 543# CONFIG_ATA is not set
566
567#
568# Multi-device support (RAID and LVM)
569#
570CONFIG_MD=y 544CONFIG_MD=y
571CONFIG_BLK_DEV_MD=y 545CONFIG_BLK_DEV_MD=y
572CONFIG_MD_LINEAR=y 546CONFIG_MD_LINEAR=y
@@ -598,37 +572,23 @@ CONFIG_DM_ZERO=m
598# 572#
599# CONFIG_FIREWIRE is not set 573# CONFIG_FIREWIRE is not set
600# CONFIG_IEEE1394 is not set 574# CONFIG_IEEE1394 is not set
601
602#
603# I2O device support
604#
605# CONFIG_I2O is not set 575# CONFIG_I2O is not set
606# CONFIG_MACINTOSH_DRIVERS is not set 576# CONFIG_MACINTOSH_DRIVERS is not set
607
608#
609# Network device support
610#
611CONFIG_NETDEVICES=y 577CONFIG_NETDEVICES=y
578# CONFIG_NETDEVICES_MULTIQUEUE is not set
612CONFIG_DUMMY=m 579CONFIG_DUMMY=m
613CONFIG_BONDING=m 580CONFIG_BONDING=m
581# CONFIG_MACVLAN is not set
614# CONFIG_EQUALIZER is not set 582# CONFIG_EQUALIZER is not set
615CONFIG_TUN=m 583CONFIG_TUN=m
616# CONFIG_ARCNET is not set 584# CONFIG_ARCNET is not set
617# CONFIG_PHYLIB is not set 585# CONFIG_PHYLIB is not set
618
619#
620# Ethernet (10 or 100Mbit)
621#
622CONFIG_NET_ETHERNET=y 586CONFIG_NET_ETHERNET=y
623CONFIG_MII=y 587CONFIG_MII=y
624# CONFIG_HAPPYMEAL is not set 588# CONFIG_HAPPYMEAL is not set
625# CONFIG_SUNGEM is not set 589# CONFIG_SUNGEM is not set
626# CONFIG_CASSINI is not set 590# CONFIG_CASSINI is not set
627# CONFIG_NET_VENDOR_3COM is not set 591# CONFIG_NET_VENDOR_3COM is not set
628
629#
630# Tulip family network device support
631#
632# CONFIG_NET_TULIP is not set 592# CONFIG_NET_TULIP is not set
633# CONFIG_HP100 is not set 593# CONFIG_HP100 is not set
634CONFIG_NET_PCI=y 594CONFIG_NET_PCI=y
@@ -665,7 +625,6 @@ CONFIG_E1000=m
665# CONFIG_SIS190 is not set 625# CONFIG_SIS190 is not set
666# CONFIG_SKGE is not set 626# CONFIG_SKGE is not set
667# CONFIG_SKY2 is not set 627# CONFIG_SKY2 is not set
668# CONFIG_SK98LIN is not set
669# CONFIG_VIA_VELOCITY is not set 628# CONFIG_VIA_VELOCITY is not set
670# CONFIG_TIGON3 is not set 629# CONFIG_TIGON3 is not set
671# CONFIG_BNX2 is not set 630# CONFIG_BNX2 is not set
@@ -703,6 +662,7 @@ CONFIG_PPP_DEFLATE=m
703CONFIG_PPP_BSDCOMP=m 662CONFIG_PPP_BSDCOMP=m
704# CONFIG_PPP_MPPE is not set 663# CONFIG_PPP_MPPE is not set
705CONFIG_PPPOE=m 664CONFIG_PPPOE=m
665# CONFIG_PPPOL2TP is not set
706# CONFIG_SLIP is not set 666# CONFIG_SLIP is not set
707CONFIG_SLHC=m 667CONFIG_SLHC=m
708# CONFIG_NET_FC is not set 668# CONFIG_NET_FC is not set
@@ -711,15 +671,7 @@ CONFIG_NETCONSOLE=y
711CONFIG_NETPOLL=y 671CONFIG_NETPOLL=y
712CONFIG_NETPOLL_TRAP=y 672CONFIG_NETPOLL_TRAP=y
713CONFIG_NET_POLL_CONTROLLER=y 673CONFIG_NET_POLL_CONTROLLER=y
714
715#
716# ISDN subsystem
717#
718# CONFIG_ISDN is not set 674# CONFIG_ISDN is not set
719
720#
721# Telephony Support
722#
723# CONFIG_PHONE is not set 675# CONFIG_PHONE is not set
724 676
725# 677#
@@ -782,10 +734,6 @@ CONFIG_LEGACY_PTYS=y
782CONFIG_LEGACY_PTY_COUNT=256 734CONFIG_LEGACY_PTY_COUNT=256
783CONFIG_HVC_DRIVER=y 735CONFIG_HVC_DRIVER=y
784CONFIG_HVC_ISERIES=y 736CONFIG_HVC_ISERIES=y
785
786#
787# IPMI
788#
789# CONFIG_IPMI_HANDLER is not set 737# CONFIG_IPMI_HANDLER is not set
790# CONFIG_WATCHDOG is not set 738# CONFIG_WATCHDOG is not set
791# CONFIG_HW_RANDOM is not set 739# CONFIG_HW_RANDOM is not set
@@ -798,10 +746,6 @@ CONFIG_GEN_RTC=y
798CONFIG_RAW_DRIVER=y 746CONFIG_RAW_DRIVER=y
799CONFIG_MAX_RAW_DEVS=256 747CONFIG_MAX_RAW_DEVS=256
800# CONFIG_HANGCHECK_TIMER is not set 748# CONFIG_HANGCHECK_TIMER is not set
801
802#
803# TPM devices
804#
805# CONFIG_TCG_TPM is not set 749# CONFIG_TCG_TPM is not set
806CONFIG_DEVPORT=y 750CONFIG_DEVPORT=y
807# CONFIG_I2C is not set 751# CONFIG_I2C is not set
@@ -811,11 +755,8 @@ CONFIG_DEVPORT=y
811# 755#
812# CONFIG_SPI is not set 756# CONFIG_SPI is not set
813# CONFIG_SPI_MASTER is not set 757# CONFIG_SPI_MASTER is not set
814
815#
816# Dallas's 1-wire bus
817#
818# CONFIG_W1 is not set 758# CONFIG_W1 is not set
759# CONFIG_POWER_SUPPLY is not set
819# CONFIG_HWMON is not set 760# CONFIG_HWMON is not set
820 761
821# 762#
@@ -840,6 +781,7 @@ CONFIG_DEVPORT=y
840# 781#
841# CONFIG_DISPLAY_SUPPORT is not set 782# CONFIG_DISPLAY_SUPPORT is not set
842# CONFIG_VGASTATE is not set 783# CONFIG_VGASTATE is not set
784# CONFIG_VIDEO_OUTPUT_CONTROL is not set
843# CONFIG_FB is not set 785# CONFIG_FB is not set
844# CONFIG_FB_IBM_GXT4500 is not set 786# CONFIG_FB_IBM_GXT4500 is not set
845 787
@@ -854,55 +796,12 @@ CONFIG_DUMMY_CONSOLE=y
854# Sound 796# Sound
855# 797#
856# CONFIG_SOUND is not set 798# CONFIG_SOUND is not set
857 799# CONFIG_HID_SUPPORT is not set
858# 800# CONFIG_USB_SUPPORT is not set
859# HID Devices
860#
861# CONFIG_HID is not set
862
863#
864# USB support
865#
866CONFIG_USB_ARCH_HAS_HCD=y
867CONFIG_USB_ARCH_HAS_OHCI=y
868CONFIG_USB_ARCH_HAS_EHCI=y
869# CONFIG_USB is not set
870
871#
872# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
873#
874
875#
876# USB Gadget Support
877#
878# CONFIG_USB_GADGET is not set
879# CONFIG_MMC is not set 801# CONFIG_MMC is not set
880
881#
882# LED devices
883#
884# CONFIG_NEW_LEDS is not set 802# CONFIG_NEW_LEDS is not set
885
886#
887# LED drivers
888#
889
890#
891# LED Triggers
892#
893
894#
895# InfiniBand support
896#
897# CONFIG_INFINIBAND is not set 803# CONFIG_INFINIBAND is not set
898 804# CONFIG_EDAC is not set
899#
900# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
901#
902
903#
904# Real Time Clock
905#
906# CONFIG_RTC_CLASS is not set 805# CONFIG_RTC_CLASS is not set
907 806
908# 807#
@@ -919,6 +818,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
919# 818#
920 819
921# 820#
821# Userspace I/O
822#
823# CONFIG_UIO is not set
824
825#
922# File systems 826# File systems
923# 827#
924CONFIG_EXT2_FS=y 828CONFIG_EXT2_FS=y
@@ -1052,7 +956,6 @@ CONFIG_CIFS_POSIX=y
1052# CONFIG_NCP_FS is not set 956# CONFIG_NCP_FS is not set
1053# CONFIG_CODA_FS is not set 957# CONFIG_CODA_FS is not set
1054# CONFIG_AFS_FS is not set 958# CONFIG_AFS_FS is not set
1055# CONFIG_9P_FS is not set
1056 959
1057# 960#
1058# Partition Types 961# Partition Types
@@ -1119,6 +1022,7 @@ CONFIG_CRC_CCITT=m
1119# CONFIG_CRC16 is not set 1022# CONFIG_CRC16 is not set
1120# CONFIG_CRC_ITU_T is not set 1023# CONFIG_CRC_ITU_T is not set
1121CONFIG_CRC32=y 1024CONFIG_CRC32=y
1025# CONFIG_CRC7 is not set
1122CONFIG_LIBCRC32C=m 1026CONFIG_LIBCRC32C=m
1123CONFIG_ZLIB_INFLATE=y 1027CONFIG_ZLIB_INFLATE=y
1124CONFIG_ZLIB_DEFLATE=m 1028CONFIG_ZLIB_DEFLATE=m
@@ -1149,6 +1053,7 @@ CONFIG_DEBUG_FS=y
1149CONFIG_DEBUG_KERNEL=y 1053CONFIG_DEBUG_KERNEL=y
1150# CONFIG_DEBUG_SHIRQ is not set 1054# CONFIG_DEBUG_SHIRQ is not set
1151CONFIG_DETECT_SOFTLOCKUP=y 1055CONFIG_DETECT_SOFTLOCKUP=y
1056CONFIG_SCHED_DEBUG=y
1152# CONFIG_SCHEDSTATS is not set 1057# CONFIG_SCHEDSTATS is not set
1153# CONFIG_TIMER_STATS is not set 1058# CONFIG_TIMER_STATS is not set
1154# CONFIG_DEBUG_SLAB is not set 1059# CONFIG_DEBUG_SLAB is not set
@@ -1179,10 +1084,6 @@ CONFIG_IRQSTACKS=y
1179# 1084#
1180# CONFIG_KEYS is not set 1085# CONFIG_KEYS is not set
1181# CONFIG_SECURITY is not set 1086# CONFIG_SECURITY is not set
1182
1183#
1184# Cryptographic options
1185#
1186CONFIG_CRYPTO=y 1087CONFIG_CRYPTO=y
1187CONFIG_CRYPTO_ALGAPI=y 1088CONFIG_CRYPTO_ALGAPI=y
1188CONFIG_CRYPTO_BLKCIPHER=y 1089CONFIG_CRYPTO_BLKCIPHER=y
@@ -1222,7 +1123,4 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1222CONFIG_CRYPTO_CRC32C=m 1123CONFIG_CRYPTO_CRC32C=m
1223# CONFIG_CRYPTO_CAMELLIA is not set 1124# CONFIG_CRYPTO_CAMELLIA is not set
1224CONFIG_CRYPTO_TEST=m 1125CONFIG_CRYPTO_TEST=m
1225 1126# CONFIG_CRYPTO_HW is not set
1226#
1227# Hardware crypto devices
1228#
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig
index 78fd07c5f4..a4e3ee045a 100644
--- a/arch/powerpc/configs/linkstation_defconfig
+++ b/arch/powerpc/configs/linkstation_defconfig
@@ -1,9 +1,24 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 13:25:19 2007 4# Tue Aug 28 21:24:38 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18CONFIG_PPC_STD_MMU=y
19CONFIG_PPC_STD_MMU_32=y
20# CONFIG_PPC_MM_SLICES is not set
21# CONFIG_SMP is not set
7CONFIG_PPC32=y 22CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 23CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 24CONFIG_MMU=y
@@ -14,61 +29,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 29CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 30CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 31CONFIG_GENERIC_FIND_NEXT_BIT=y
32# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 33CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 34CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 35CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 36CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 37CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 38CONFIG_PPC_OF=y
39CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 40CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 41# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 42CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 43CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 44CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32CONFIG_CLASSIC32=y
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_PPC_FPU=y
43# CONFIG_PPC_DCR_NATIVE is not set 45# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 46# CONFIG_PPC_DCR_MMIO is not set
45# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49# CONFIG_SMP is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 47CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 48
52# 49#
53# Code maturity level options 50# General setup
54# 51#
55CONFIG_EXPERIMENTAL=y 52CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 53CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 54CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 55CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 56CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 57CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 58CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 59CONFIG_SYSVIPC_SYSCTL=y
68CONFIG_POSIX_MQUEUE=y 60CONFIG_POSIX_MQUEUE=y
69# CONFIG_BSD_PROCESS_ACCT is not set 61# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 62# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 63# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 64# CONFIG_AUDIT is not set
73CONFIG_IKCONFIG=y 65CONFIG_IKCONFIG=y
74CONFIG_IKCONFIG_PROC=y 66CONFIG_IKCONFIG_PROC=y
@@ -103,24 +95,17 @@ CONFIG_SLAB=y
103CONFIG_RT_MUTEXES=y 95CONFIG_RT_MUTEXES=y
104# CONFIG_TINY_SHMEM is not set 96# CONFIG_TINY_SHMEM is not set
105CONFIG_BASE_SMALL=0 97CONFIG_BASE_SMALL=0
106
107#
108# Loadable module support
109#
110CONFIG_MODULES=y 98CONFIG_MODULES=y
111CONFIG_MODULE_UNLOAD=y 99CONFIG_MODULE_UNLOAD=y
112# CONFIG_MODULE_FORCE_UNLOAD is not set 100# CONFIG_MODULE_FORCE_UNLOAD is not set
113# CONFIG_MODVERSIONS is not set 101# CONFIG_MODVERSIONS is not set
114# CONFIG_MODULE_SRCVERSION_ALL is not set 102# CONFIG_MODULE_SRCVERSION_ALL is not set
115CONFIG_KMOD=y 103CONFIG_KMOD=y
116
117#
118# Block layer
119#
120CONFIG_BLOCK=y 104CONFIG_BLOCK=y
121# CONFIG_LBD is not set 105# CONFIG_LBD is not set
122# CONFIG_BLK_DEV_IO_TRACE is not set 106# CONFIG_BLK_DEV_IO_TRACE is not set
123# CONFIG_LSF is not set 107# CONFIG_LSF is not set
108# CONFIG_BLK_DEV_BSG is not set
124 109
125# 110#
126# IO Schedulers 111# IO Schedulers
@@ -140,7 +125,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
140# 125#
141# CONFIG_PPC_MULTIPLATFORM is not set 126# CONFIG_PPC_MULTIPLATFORM is not set
142CONFIG_EMBEDDED6xx=y 127CONFIG_EMBEDDED6xx=y
143# CONFIG_APUS is not set 128# CONFIG_PPC_82xx is not set
129# CONFIG_PPC_83xx is not set
130# CONFIG_PPC_86xx is not set
144# CONFIG_PPC_MPC52xx is not set 131# CONFIG_PPC_MPC52xx is not set
145# CONFIG_PPC_MPC5200 is not set 132# CONFIG_PPC_MPC5200 is not set
146# CONFIG_PPC_CELL is not set 133# CONFIG_PPC_CELL is not set
@@ -163,8 +150,8 @@ CONFIG_MPIC=y
163# CONFIG_PPC_INDIRECT_IO is not set 150# CONFIG_PPC_INDIRECT_IO is not set
164# CONFIG_GENERIC_IOMAP is not set 151# CONFIG_GENERIC_IOMAP is not set
165# CONFIG_CPU_FREQ is not set 152# CONFIG_CPU_FREQ is not set
166# CONFIG_TAU is not set
167# CONFIG_CPM2 is not set 153# CONFIG_CPM2 is not set
154# CONFIG_FSL_ULI1575 is not set
168 155
169# 156#
170# Kernel options 157# Kernel options
@@ -193,6 +180,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
193CONFIG_SPLIT_PTLOCK_CPUS=4 180CONFIG_SPLIT_PTLOCK_CPUS=4
194# CONFIG_RESOURCES_64BIT is not set 181# CONFIG_RESOURCES_64BIT is not set
195CONFIG_ZONE_DMA_FLAG=1 182CONFIG_ZONE_DMA_FLAG=1
183CONFIG_BOUNCE=y
184CONFIG_VIRT_TO_BUS=y
196CONFIG_PROC_DEVICETREE=y 185CONFIG_PROC_DEVICETREE=y
197# CONFIG_CMDLINE_BOOL is not set 186# CONFIG_CMDLINE_BOOL is not set
198# CONFIG_PM is not set 187# CONFIG_PM is not set
@@ -206,10 +195,10 @@ CONFIG_ISA_DMA_API=y
206CONFIG_ZONE_DMA=y 195CONFIG_ZONE_DMA=y
207CONFIG_GENERIC_ISA_DMA=y 196CONFIG_GENERIC_ISA_DMA=y
208CONFIG_PPC_INDIRECT_PCI=y 197CONFIG_PPC_INDIRECT_PCI=y
209# CONFIG_PPC_INDIRECT_PCI_BE is not set
210CONFIG_FSL_SOC=y 198CONFIG_FSL_SOC=y
211CONFIG_PCI=y 199CONFIG_PCI=y
212CONFIG_PCI_DOMAINS=y 200CONFIG_PCI_DOMAINS=y
201CONFIG_PCI_SYSCALL=y
213# CONFIG_PCIEPORTBUS is not set 202# CONFIG_PCIEPORTBUS is not set
214CONFIG_ARCH_SUPPORTS_MSI=y 203CONFIG_ARCH_SUPPORTS_MSI=y
215# CONFIG_PCI_MSI is not set 204# CONFIG_PCI_MSI is not set
@@ -297,6 +286,7 @@ CONFIG_NF_CONNTRACK=m
297# CONFIG_NF_CONNTRACK_EVENTS is not set 286# CONFIG_NF_CONNTRACK_EVENTS is not set
298CONFIG_NF_CT_PROTO_GRE=m 287CONFIG_NF_CT_PROTO_GRE=m
299CONFIG_NF_CT_PROTO_SCTP=m 288CONFIG_NF_CT_PROTO_SCTP=m
289# CONFIG_NF_CT_PROTO_UDPLITE is not set
300CONFIG_NF_CONNTRACK_AMANDA=m 290CONFIG_NF_CONNTRACK_AMANDA=m
301CONFIG_NF_CONNTRACK_FTP=m 291CONFIG_NF_CONNTRACK_FTP=m
302CONFIG_NF_CONNTRACK_H323=m 292CONFIG_NF_CONNTRACK_H323=m
@@ -314,9 +304,11 @@ CONFIG_NETFILTER_XTABLES=m
314# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set 304# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
315# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set 305# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
316# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set 306# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
307# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
317# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set 308# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
318# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set 309# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
319# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set 310# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
311# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
320# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set 312# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
321# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set 313# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
322# CONFIG_NETFILTER_XT_MATCH_DCCP is not set 314# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
@@ -337,6 +329,7 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
337# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set 329# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
338# CONFIG_NETFILTER_XT_MATCH_STRING is not set 330# CONFIG_NETFILTER_XT_MATCH_STRING is not set
339# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set 331# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
332# CONFIG_NETFILTER_XT_MATCH_U32 is not set
340# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set 333# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
341 334
342# 335#
@@ -425,6 +418,7 @@ CONFIG_IEEE80211_CRYPT_TKIP=m
425CONFIG_IEEE80211_SOFTMAC=m 418CONFIG_IEEE80211_SOFTMAC=m
426CONFIG_IEEE80211_SOFTMAC_DEBUG=y 419CONFIG_IEEE80211_SOFTMAC_DEBUG=y
427# CONFIG_RFKILL is not set 420# CONFIG_RFKILL is not set
421# CONFIG_NET_9P is not set
428 422
429# 423#
430# Device Drivers 424# Device Drivers
@@ -439,10 +433,6 @@ CONFIG_FW_LOADER=m
439# CONFIG_DEBUG_DRIVER is not set 433# CONFIG_DEBUG_DRIVER is not set
440# CONFIG_DEBUG_DEVRES is not set 434# CONFIG_DEBUG_DEVRES is not set
441# CONFIG_SYS_HYPERVISOR is not set 435# CONFIG_SYS_HYPERVISOR is not set
442
443#
444# Connector - unified userspace <-> kernelspace linker
445#
446# CONFIG_CONNECTOR is not set 436# CONFIG_CONNECTOR is not set
447CONFIG_MTD=y 437CONFIG_MTD=y
448# CONFIG_MTD_DEBUG is not set 438# CONFIG_MTD_DEBUG is not set
@@ -526,20 +516,9 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
526# UBI - Unsorted block images 516# UBI - Unsorted block images
527# 517#
528# CONFIG_MTD_UBI is not set 518# CONFIG_MTD_UBI is not set
529 519CONFIG_OF_DEVICE=y
530#
531# Parallel port support
532#
533# CONFIG_PARPORT is not set 520# CONFIG_PARPORT is not set
534 521CONFIG_BLK_DEV=y
535#
536# Plug and Play support
537#
538# CONFIG_PNPACPI is not set
539
540#
541# Block devices
542#
543# CONFIG_BLK_DEV_FD is not set 522# CONFIG_BLK_DEV_FD is not set
544# CONFIG_BLK_CPQ_DA is not set 523# CONFIG_BLK_CPQ_DA is not set
545# CONFIG_BLK_CPQ_CISS_DA is not set 524# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -557,14 +536,11 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
557CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 536CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
558# CONFIG_CDROM_PKTCDVD is not set 537# CONFIG_CDROM_PKTCDVD is not set
559# CONFIG_ATA_OVER_ETH is not set 538# CONFIG_ATA_OVER_ETH is not set
560 539CONFIG_MISC_DEVICES=y
561#
562# Misc devices
563#
564# CONFIG_PHANTOM is not set 540# CONFIG_PHANTOM is not set
541# CONFIG_EEPROM_93CX6 is not set
565# CONFIG_SGI_IOC4 is not set 542# CONFIG_SGI_IOC4 is not set
566# CONFIG_TIFM_CORE is not set 543# CONFIG_TIFM_CORE is not set
567# CONFIG_BLINK is not set
568# CONFIG_IDE is not set 544# CONFIG_IDE is not set
569 545
570# 546#
@@ -572,6 +548,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
572# 548#
573# CONFIG_RAID_ATTRS is not set 549# CONFIG_RAID_ATTRS is not set
574CONFIG_SCSI=y 550CONFIG_SCSI=y
551CONFIG_SCSI_DMA=y
575# CONFIG_SCSI_TGT is not set 552# CONFIG_SCSI_TGT is not set
576# CONFIG_SCSI_NETLINK is not set 553# CONFIG_SCSI_NETLINK is not set
577CONFIG_SCSI_PROC_FS=y 554CONFIG_SCSI_PROC_FS=y
@@ -601,12 +578,8 @@ CONFIG_SCSI_WAIT_SCAN=m
601# CONFIG_SCSI_SPI_ATTRS is not set 578# CONFIG_SCSI_SPI_ATTRS is not set
602# CONFIG_SCSI_FC_ATTRS is not set 579# CONFIG_SCSI_FC_ATTRS is not set
603# CONFIG_SCSI_ISCSI_ATTRS is not set 580# CONFIG_SCSI_ISCSI_ATTRS is not set
604# CONFIG_SCSI_SAS_ATTRS is not set
605# CONFIG_SCSI_SAS_LIBSAS is not set 581# CONFIG_SCSI_SAS_LIBSAS is not set
606 582CONFIG_SCSI_LOWLEVEL=y
607#
608# SCSI low-level drivers
609#
610# CONFIG_ISCSI_TCP is not set 583# CONFIG_ISCSI_TCP is not set
611# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 584# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
612# CONFIG_SCSI_3W_9XXX is not set 585# CONFIG_SCSI_3W_9XXX is not set
@@ -696,10 +669,6 @@ CONFIG_PATA_SIL680=y
696# CONFIG_PATA_SIS is not set 669# CONFIG_PATA_SIS is not set
697# CONFIG_PATA_VIA is not set 670# CONFIG_PATA_VIA is not set
698# CONFIG_PATA_WINBOND is not set 671# CONFIG_PATA_WINBOND is not set
699
700#
701# Multi-device support (RAID and LVM)
702#
703# CONFIG_MD is not set 672# CONFIG_MD is not set
704 673
705# 674#
@@ -715,37 +684,23 @@ CONFIG_PATA_SIL680=y
715# 684#
716# CONFIG_FIREWIRE is not set 685# CONFIG_FIREWIRE is not set
717# CONFIG_IEEE1394 is not set 686# CONFIG_IEEE1394 is not set
718
719#
720# I2O device support
721#
722# CONFIG_I2O is not set 687# CONFIG_I2O is not set
723# CONFIG_MACINTOSH_DRIVERS is not set 688# CONFIG_MACINTOSH_DRIVERS is not set
724
725#
726# Network device support
727#
728CONFIG_NETDEVICES=y 689CONFIG_NETDEVICES=y
690# CONFIG_NETDEVICES_MULTIQUEUE is not set
729# CONFIG_DUMMY is not set 691# CONFIG_DUMMY is not set
730# CONFIG_BONDING is not set 692# CONFIG_BONDING is not set
693# CONFIG_MACVLAN is not set
731# CONFIG_EQUALIZER is not set 694# CONFIG_EQUALIZER is not set
732CONFIG_TUN=m 695CONFIG_TUN=m
733# CONFIG_ARCNET is not set 696# CONFIG_ARCNET is not set
734# CONFIG_PHYLIB is not set 697# CONFIG_PHYLIB is not set
735
736#
737# Ethernet (10 or 100Mbit)
738#
739CONFIG_NET_ETHERNET=y 698CONFIG_NET_ETHERNET=y
740# CONFIG_MII is not set 699# CONFIG_MII is not set
741# CONFIG_HAPPYMEAL is not set 700# CONFIG_HAPPYMEAL is not set
742# CONFIG_SUNGEM is not set 701# CONFIG_SUNGEM is not set
743# CONFIG_CASSINI is not set 702# CONFIG_CASSINI is not set
744# CONFIG_NET_VENDOR_3COM is not set 703# CONFIG_NET_VENDOR_3COM is not set
745
746#
747# Tulip family network device support
748#
749CONFIG_NET_TULIP=y 704CONFIG_NET_TULIP=y
750# CONFIG_DE2104X is not set 705# CONFIG_DE2104X is not set
751CONFIG_TULIP=y 706CONFIG_TULIP=y
@@ -770,7 +725,6 @@ CONFIG_R8169=y
770# CONFIG_SIS190 is not set 725# CONFIG_SIS190 is not set
771# CONFIG_SKGE is not set 726# CONFIG_SKGE is not set
772# CONFIG_SKY2 is not set 727# CONFIG_SKY2 is not set
773# CONFIG_SK98LIN is not set
774# CONFIG_VIA_VELOCITY is not set 728# CONFIG_VIA_VELOCITY is not set
775# CONFIG_TIGON3 is not set 729# CONFIG_TIGON3 is not set
776# CONFIG_BNX2 is not set 730# CONFIG_BNX2 is not set
@@ -812,15 +766,7 @@ CONFIG_NETCONSOLE=y
812CONFIG_NETPOLL=y 766CONFIG_NETPOLL=y
813# CONFIG_NETPOLL_TRAP is not set 767# CONFIG_NETPOLL_TRAP is not set
814CONFIG_NET_POLL_CONTROLLER=y 768CONFIG_NET_POLL_CONTROLLER=y
815
816#
817# ISDN subsystem
818#
819# CONFIG_ISDN is not set 769# CONFIG_ISDN is not set
820
821#
822# Telephony Support
823#
824# CONFIG_PHONE is not set 770# CONFIG_PHONE is not set
825 771
826# 772#
@@ -898,10 +844,6 @@ CONFIG_SERIAL_OF_PLATFORM=y
898CONFIG_UNIX98_PTYS=y 844CONFIG_UNIX98_PTYS=y
899CONFIG_LEGACY_PTYS=y 845CONFIG_LEGACY_PTYS=y
900CONFIG_LEGACY_PTY_COUNT=256 846CONFIG_LEGACY_PTY_COUNT=256
901
902#
903# IPMI
904#
905# CONFIG_IPMI_HANDLER is not set 847# CONFIG_IPMI_HANDLER is not set
906# CONFIG_WATCHDOG is not set 848# CONFIG_WATCHDOG is not set
907CONFIG_HW_RANDOM=y 849CONFIG_HW_RANDOM=y
@@ -912,10 +854,6 @@ CONFIG_HW_RANDOM=y
912# CONFIG_AGP is not set 854# CONFIG_AGP is not set
913# CONFIG_DRM is not set 855# CONFIG_DRM is not set
914# CONFIG_RAW_DRIVER is not set 856# CONFIG_RAW_DRIVER is not set
915
916#
917# TPM devices
918#
919# CONFIG_TCG_TPM is not set 857# CONFIG_TCG_TPM is not set
920CONFIG_DEVPORT=y 858CONFIG_DEVPORT=y
921CONFIG_I2C=y 859CONFIG_I2C=y
@@ -950,6 +888,7 @@ CONFIG_I2C_MPC=y
950# CONFIG_I2C_SIS5595 is not set 888# CONFIG_I2C_SIS5595 is not set
951# CONFIG_I2C_SIS630 is not set 889# CONFIG_I2C_SIS630 is not set
952# CONFIG_I2C_SIS96X is not set 890# CONFIG_I2C_SIS96X is not set
891# CONFIG_I2C_TAOS_EVM is not set
953# CONFIG_I2C_STUB is not set 892# CONFIG_I2C_STUB is not set
954# CONFIG_I2C_TINY_USB is not set 893# CONFIG_I2C_TINY_USB is not set
955# CONFIG_I2C_VIA is not set 894# CONFIG_I2C_VIA is not set
@@ -961,12 +900,14 @@ CONFIG_I2C_MPC=y
961# 900#
962# CONFIG_SENSORS_DS1337 is not set 901# CONFIG_SENSORS_DS1337 is not set
963# CONFIG_SENSORS_DS1374 is not set 902# CONFIG_SENSORS_DS1374 is not set
903# CONFIG_DS1682 is not set
964CONFIG_SENSORS_EEPROM=m 904CONFIG_SENSORS_EEPROM=m
965# CONFIG_SENSORS_PCF8574 is not set 905# CONFIG_SENSORS_PCF8574 is not set
966# CONFIG_SENSORS_PCA9539 is not set 906# CONFIG_SENSORS_PCA9539 is not set
967# CONFIG_SENSORS_PCF8591 is not set 907# CONFIG_SENSORS_PCF8591 is not set
968# CONFIG_SENSORS_M41T00 is not set 908# CONFIG_SENSORS_M41T00 is not set
969# CONFIG_SENSORS_MAX6875 is not set 909# CONFIG_SENSORS_MAX6875 is not set
910# CONFIG_SENSORS_TSL2550 is not set
970# CONFIG_I2C_DEBUG_CORE is not set 911# CONFIG_I2C_DEBUG_CORE is not set
971# CONFIG_I2C_DEBUG_ALGO is not set 912# CONFIG_I2C_DEBUG_ALGO is not set
972# CONFIG_I2C_DEBUG_BUS is not set 913# CONFIG_I2C_DEBUG_BUS is not set
@@ -977,14 +918,12 @@ CONFIG_SENSORS_EEPROM=m
977# 918#
978# CONFIG_SPI is not set 919# CONFIG_SPI is not set
979# CONFIG_SPI_MASTER is not set 920# CONFIG_SPI_MASTER is not set
980
981#
982# Dallas's 1-wire bus
983#
984# CONFIG_W1 is not set 921# CONFIG_W1 is not set
922# CONFIG_POWER_SUPPLY is not set
985CONFIG_HWMON=y 923CONFIG_HWMON=y
986# CONFIG_HWMON_VID is not set 924# CONFIG_HWMON_VID is not set
987# CONFIG_SENSORS_ABITUGURU is not set 925# CONFIG_SENSORS_ABITUGURU is not set
926# CONFIG_SENSORS_ABITUGURU3 is not set
988# CONFIG_SENSORS_AD7418 is not set 927# CONFIG_SENSORS_AD7418 is not set
989# CONFIG_SENSORS_ADM1021 is not set 928# CONFIG_SENSORS_ADM1021 is not set
990# CONFIG_SENSORS_ADM1025 is not set 929# CONFIG_SENSORS_ADM1025 is not set
@@ -1011,14 +950,17 @@ CONFIG_HWMON=y
1011# CONFIG_SENSORS_LM87 is not set 950# CONFIG_SENSORS_LM87 is not set
1012# CONFIG_SENSORS_LM90 is not set 951# CONFIG_SENSORS_LM90 is not set
1013# CONFIG_SENSORS_LM92 is not set 952# CONFIG_SENSORS_LM92 is not set
953# CONFIG_SENSORS_LM93 is not set
1014# CONFIG_SENSORS_MAX1619 is not set 954# CONFIG_SENSORS_MAX1619 is not set
1015# CONFIG_SENSORS_MAX6650 is not set 955# CONFIG_SENSORS_MAX6650 is not set
1016# CONFIG_SENSORS_PC87360 is not set 956# CONFIG_SENSORS_PC87360 is not set
1017# CONFIG_SENSORS_PC87427 is not set 957# CONFIG_SENSORS_PC87427 is not set
1018# CONFIG_SENSORS_SIS5595 is not set 958# CONFIG_SENSORS_SIS5595 is not set
959# CONFIG_SENSORS_DME1737 is not set
1019# CONFIG_SENSORS_SMSC47M1 is not set 960# CONFIG_SENSORS_SMSC47M1 is not set
1020# CONFIG_SENSORS_SMSC47M192 is not set 961# CONFIG_SENSORS_SMSC47M192 is not set
1021# CONFIG_SENSORS_SMSC47B397 is not set 962# CONFIG_SENSORS_SMSC47B397 is not set
963# CONFIG_SENSORS_THMC50 is not set
1022# CONFIG_SENSORS_VIA686A is not set 964# CONFIG_SENSORS_VIA686A is not set
1023# CONFIG_SENSORS_VT1211 is not set 965# CONFIG_SENSORS_VT1211 is not set
1024# CONFIG_SENSORS_VT8231 is not set 966# CONFIG_SENSORS_VT8231 is not set
@@ -1053,6 +995,7 @@ CONFIG_HWMON=y
1053# 995#
1054# CONFIG_DISPLAY_SUPPORT is not set 996# CONFIG_DISPLAY_SUPPORT is not set
1055# CONFIG_VGASTATE is not set 997# CONFIG_VGASTATE is not set
998CONFIG_VIDEO_OUTPUT_CONTROL=m
1056# CONFIG_FB is not set 999# CONFIG_FB is not set
1057# CONFIG_FB_IBM_GXT4500 is not set 1000# CONFIG_FB_IBM_GXT4500 is not set
1058 1001
@@ -1066,10 +1009,7 @@ CONFIG_DUMMY_CONSOLE=y
1066# Sound 1009# Sound
1067# 1010#
1068# CONFIG_SOUND is not set 1011# CONFIG_SOUND is not set
1069 1012CONFIG_HID_SUPPORT=y
1070#
1071# HID Devices
1072#
1073CONFIG_HID=m 1013CONFIG_HID=m
1074# CONFIG_HID_DEBUG is not set 1014# CONFIG_HID_DEBUG is not set
1075 1015
@@ -1083,10 +1023,7 @@ CONFIG_HID=m
1083# 1023#
1084# CONFIG_USB_KBD is not set 1024# CONFIG_USB_KBD is not set
1085# CONFIG_USB_MOUSE is not set 1025# CONFIG_USB_MOUSE is not set
1086 1026CONFIG_USB_SUPPORT=y
1087#
1088# USB support
1089#
1090CONFIG_USB_ARCH_HAS_HCD=y 1027CONFIG_USB_ARCH_HAS_HCD=y
1091CONFIG_USB_ARCH_HAS_OHCI=y 1028CONFIG_USB_ARCH_HAS_OHCI=y
1092CONFIG_USB_ARCH_HAS_EHCI=y 1029CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1108,7 +1045,6 @@ CONFIG_USB_EHCI_HCD=y
1108# CONFIG_USB_EHCI_SPLIT_ISO is not set 1045# CONFIG_USB_EHCI_SPLIT_ISO is not set
1109# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1046# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1110# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1047# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1111# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1112# CONFIG_USB_ISP116X_HCD is not set 1048# CONFIG_USB_ISP116X_HCD is not set
1113CONFIG_USB_OHCI_HCD=y 1049CONFIG_USB_OHCI_HCD=y
1114CONFIG_USB_OHCI_HCD_PPC_OF=y 1050CONFIG_USB_OHCI_HCD_PPC_OF=y
@@ -1120,6 +1056,7 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1120CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1056CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1121# CONFIG_USB_UHCI_HCD is not set 1057# CONFIG_USB_UHCI_HCD is not set
1122# CONFIG_USB_SL811_HCD is not set 1058# CONFIG_USB_SL811_HCD is not set
1059# CONFIG_USB_R8A66597_HCD is not set
1123 1060
1124# 1061#
1125# USB Device Class drivers 1062# USB Device Class drivers
@@ -1192,6 +1129,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=y
1192# CONFIG_USB_SERIAL_MOS7840 is not set 1129# CONFIG_USB_SERIAL_MOS7840 is not set
1193# CONFIG_USB_SERIAL_NAVMAN is not set 1130# CONFIG_USB_SERIAL_NAVMAN is not set
1194# CONFIG_USB_SERIAL_PL2303 is not set 1131# CONFIG_USB_SERIAL_PL2303 is not set
1132# CONFIG_USB_SERIAL_OTI6858 is not set
1195# CONFIG_USB_SERIAL_HP4X is not set 1133# CONFIG_USB_SERIAL_HP4X is not set
1196# CONFIG_USB_SERIAL_SAFE is not set 1134# CONFIG_USB_SERIAL_SAFE is not set
1197# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set 1135# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
@@ -1235,32 +1173,9 @@ CONFIG_USB_SERIAL_FTDI_SIO=y
1235# 1173#
1236# CONFIG_USB_GADGET is not set 1174# CONFIG_USB_GADGET is not set
1237# CONFIG_MMC is not set 1175# CONFIG_MMC is not set
1238
1239#
1240# LED devices
1241#
1242# CONFIG_NEW_LEDS is not set 1176# CONFIG_NEW_LEDS is not set
1243
1244#
1245# LED drivers
1246#
1247
1248#
1249# LED Triggers
1250#
1251
1252#
1253# InfiniBand support
1254#
1255# CONFIG_INFINIBAND is not set 1177# CONFIG_INFINIBAND is not set
1256 1178# CONFIG_EDAC is not set
1257#
1258# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1259#
1260
1261#
1262# Real Time Clock
1263#
1264CONFIG_RTC_LIB=y 1179CONFIG_RTC_LIB=y
1265CONFIG_RTC_CLASS=y 1180CONFIG_RTC_CLASS=y
1266CONFIG_RTC_HCTOSYS=y 1181CONFIG_RTC_HCTOSYS=y
@@ -1287,6 +1202,7 @@ CONFIG_RTC_DRV_RS5C372=y
1287# CONFIG_RTC_DRV_X1205 is not set 1202# CONFIG_RTC_DRV_X1205 is not set
1288# CONFIG_RTC_DRV_PCF8563 is not set 1203# CONFIG_RTC_DRV_PCF8563 is not set
1289# CONFIG_RTC_DRV_PCF8583 is not set 1204# CONFIG_RTC_DRV_PCF8583 is not set
1205# CONFIG_RTC_DRV_M41T80 is not set
1290 1206
1291# 1207#
1292# SPI RTC drivers 1208# SPI RTC drivers
@@ -1295,9 +1211,12 @@ CONFIG_RTC_DRV_RS5C372=y
1295# 1211#
1296# Platform RTC drivers 1212# Platform RTC drivers
1297# 1213#
1214# CONFIG_RTC_DRV_CMOS is not set
1298# CONFIG_RTC_DRV_DS1553 is not set 1215# CONFIG_RTC_DRV_DS1553 is not set
1216# CONFIG_RTC_DRV_STK17TA8 is not set
1299# CONFIG_RTC_DRV_DS1742 is not set 1217# CONFIG_RTC_DRV_DS1742 is not set
1300# CONFIG_RTC_DRV_M48T86 is not set 1218# CONFIG_RTC_DRV_M48T86 is not set
1219# CONFIG_RTC_DRV_M48T59 is not set
1301# CONFIG_RTC_DRV_V3020 is not set 1220# CONFIG_RTC_DRV_V3020 is not set
1302 1221
1303# 1222#
@@ -1318,6 +1237,11 @@ CONFIG_RTC_DRV_RS5C372=y
1318# 1237#
1319 1238
1320# 1239#
1240# Userspace I/O
1241#
1242# CONFIG_UIO is not set
1243
1244#
1321# File systems 1245# File systems
1322# 1246#
1323CONFIG_EXT2_FS=y 1247CONFIG_EXT2_FS=y
@@ -1437,7 +1361,6 @@ CONFIG_CIFS=m
1437# CONFIG_NCP_FS is not set 1361# CONFIG_NCP_FS is not set
1438# CONFIG_CODA_FS is not set 1362# CONFIG_CODA_FS is not set
1439# CONFIG_AFS_FS is not set 1363# CONFIG_AFS_FS is not set
1440# CONFIG_9P_FS is not set
1441 1364
1442# 1365#
1443# Partition Types 1366# Partition Types
@@ -1503,6 +1426,7 @@ CONFIG_CRC_CCITT=m
1503# CONFIG_CRC16 is not set 1426# CONFIG_CRC16 is not set
1504# CONFIG_CRC_ITU_T is not set 1427# CONFIG_CRC_ITU_T is not set
1505CONFIG_CRC32=y 1428CONFIG_CRC32=y
1429# CONFIG_CRC7 is not set
1506CONFIG_LIBCRC32C=m 1430CONFIG_LIBCRC32C=m
1507CONFIG_ZLIB_INFLATE=m 1431CONFIG_ZLIB_INFLATE=m
1508CONFIG_ZLIB_DEFLATE=m 1432CONFIG_ZLIB_DEFLATE=m
@@ -1532,6 +1456,7 @@ CONFIG_MAGIC_SYSRQ=y
1532CONFIG_DEBUG_KERNEL=y 1456CONFIG_DEBUG_KERNEL=y
1533# CONFIG_DEBUG_SHIRQ is not set 1457# CONFIG_DEBUG_SHIRQ is not set
1534CONFIG_DETECT_SOFTLOCKUP=y 1458CONFIG_DETECT_SOFTLOCKUP=y
1459CONFIG_SCHED_DEBUG=y
1535# CONFIG_SCHEDSTATS is not set 1460# CONFIG_SCHEDSTATS is not set
1536# CONFIG_TIMER_STATS is not set 1461# CONFIG_TIMER_STATS is not set
1537# CONFIG_DEBUG_SLAB is not set 1462# CONFIG_DEBUG_SLAB is not set
@@ -1554,7 +1479,6 @@ CONFIG_FORCED_INLINING=y
1554# CONFIG_DEBUG_PAGEALLOC is not set 1479# CONFIG_DEBUG_PAGEALLOC is not set
1555# CONFIG_DEBUGGER is not set 1480# CONFIG_DEBUGGER is not set
1556# CONFIG_BDI_SWITCH is not set 1481# CONFIG_BDI_SWITCH is not set
1557# CONFIG_BOOTX_TEXT is not set
1558# CONFIG_PPC_EARLY_DEBUG is not set 1482# CONFIG_PPC_EARLY_DEBUG is not set
1559 1483
1560# 1484#
@@ -1562,10 +1486,6 @@ CONFIG_FORCED_INLINING=y
1562# 1486#
1563# CONFIG_KEYS is not set 1487# CONFIG_KEYS is not set
1564# CONFIG_SECURITY is not set 1488# CONFIG_SECURITY is not set
1565
1566#
1567# Cryptographic options
1568#
1569CONFIG_CRYPTO=y 1489CONFIG_CRYPTO=y
1570CONFIG_CRYPTO_ALGAPI=y 1490CONFIG_CRYPTO_ALGAPI=y
1571CONFIG_CRYPTO_BLKCIPHER=y 1491CONFIG_CRYPTO_BLKCIPHER=y
@@ -1604,7 +1524,4 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1604CONFIG_CRYPTO_CRC32C=m 1524CONFIG_CRYPTO_CRC32C=m
1605# CONFIG_CRYPTO_CAMELLIA is not set 1525# CONFIG_CRYPTO_CAMELLIA is not set
1606# CONFIG_CRYPTO_TEST is not set 1526# CONFIG_CRYPTO_TEST is not set
1607 1527CONFIG_CRYPTO_HW=y
1608#
1609# Hardware crypto devices
1610#
diff --git a/arch/powerpc/configs/lite5200_defconfig b/arch/powerpc/configs/lite5200_defconfig
index 9c30ca4516..d42e226d3a 100644
--- a/arch/powerpc/configs/lite5200_defconfig
+++ b/arch/powerpc/configs/lite5200_defconfig
@@ -1,10 +1,25 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 13:26:09 2007 4# Tue Aug 28 21:24:38 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC_PM_NEEDS_RTC_LIB=y 7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18# CONFIG_ALTIVEC is not set
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
8CONFIG_PPC32=y 23CONFIG_PPC32=y
9CONFIG_PPC_MERGE=y 24CONFIG_PPC_MERGE=y
10CONFIG_MMU=y 25CONFIG_MMU=y
@@ -15,61 +30,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
15CONFIG_GENERIC_HWEIGHT=y 30CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y 31CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y 32CONFIG_GENERIC_FIND_NEXT_BIT=y
33# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
18CONFIG_PPC=y 34CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y 35CONFIG_EARLY_PRINTK=y
20CONFIG_GENERIC_NVRAM=y 36CONFIG_GENERIC_NVRAM=y
21CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
22CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
23CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
24# CONFIG_PPC_UDBG_16550 is not set 41# CONFIG_PPC_UDBG_16550 is not set
25# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
26CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
27CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
28# CONFIG_DEFAULT_UIMAGE is not set 45# CONFIG_DEFAULT_UIMAGE is not set
29
30#
31# Processor support
32#
33CONFIG_CLASSIC32=y
34# CONFIG_PPC_82xx is not set
35# CONFIG_PPC_83xx is not set
36# CONFIG_PPC_85xx is not set
37# CONFIG_PPC_86xx is not set
38# CONFIG_PPC_8xx is not set
39# CONFIG_40x is not set
40# CONFIG_44x is not set
41# CONFIG_E200 is not set
42CONFIG_6xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
46# CONFIG_ALTIVEC is not set
47CONFIG_PPC_STD_MMU=y
48CONFIG_PPC_STD_MMU_32=y
49# CONFIG_PPC_MM_SLICES is not set
50# CONFIG_SMP is not set
51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
52 49
53# 50#
54# Code maturity level options 51# General setup
55# 52#
56CONFIG_EXPERIMENTAL=y 53CONFIG_EXPERIMENTAL=y
57CONFIG_BROKEN_ON_SMP=y 54CONFIG_BROKEN_ON_SMP=y
58CONFIG_INIT_ENV_ARG_LIMIT=32 55CONFIG_INIT_ENV_ARG_LIMIT=32
59
60#
61# General setup
62#
63CONFIG_LOCALVERSION="" 56CONFIG_LOCALVERSION=""
64CONFIG_LOCALVERSION_AUTO=y 57CONFIG_LOCALVERSION_AUTO=y
65CONFIG_SWAP=y 58CONFIG_SWAP=y
66CONFIG_SYSVIPC=y 59CONFIG_SYSVIPC=y
67# CONFIG_IPC_NS is not set
68CONFIG_SYSVIPC_SYSCTL=y 60CONFIG_SYSVIPC_SYSCTL=y
69# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
70# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
71# CONFIG_TASKSTATS is not set 63# CONFIG_TASKSTATS is not set
72# CONFIG_UTS_NS is not set 64# CONFIG_USER_NS is not set
73# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
74# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
75CONFIG_LOG_BUF_SHIFT=14 67CONFIG_LOG_BUF_SHIFT=14
@@ -101,24 +93,17 @@ CONFIG_SLAB=y
101CONFIG_RT_MUTEXES=y 93CONFIG_RT_MUTEXES=y
102# CONFIG_TINY_SHMEM is not set 94# CONFIG_TINY_SHMEM is not set
103CONFIG_BASE_SMALL=0 95CONFIG_BASE_SMALL=0
104
105#
106# Loadable module support
107#
108CONFIG_MODULES=y 96CONFIG_MODULES=y
109CONFIG_MODULE_UNLOAD=y 97CONFIG_MODULE_UNLOAD=y
110# CONFIG_MODULE_FORCE_UNLOAD is not set 98# CONFIG_MODULE_FORCE_UNLOAD is not set
111# CONFIG_MODVERSIONS is not set 99# CONFIG_MODVERSIONS is not set
112# CONFIG_MODULE_SRCVERSION_ALL is not set 100# CONFIG_MODULE_SRCVERSION_ALL is not set
113# CONFIG_KMOD is not set 101# CONFIG_KMOD is not set
114
115#
116# Block layer
117#
118CONFIG_BLOCK=y 102CONFIG_BLOCK=y
119# CONFIG_LBD is not set 103# CONFIG_LBD is not set
120# CONFIG_BLK_DEV_IO_TRACE is not set 104# CONFIG_BLK_DEV_IO_TRACE is not set
121# CONFIG_LSF is not set 105# CONFIG_LSF is not set
106# CONFIG_BLK_DEV_BSG is not set
122 107
123# 108#
124# IO Schedulers 109# IO Schedulers
@@ -138,7 +123,10 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
138# 123#
139CONFIG_PPC_MULTIPLATFORM=y 124CONFIG_PPC_MULTIPLATFORM=y
140# CONFIG_EMBEDDED6xx is not set 125# CONFIG_EMBEDDED6xx is not set
141# CONFIG_APUS is not set 126# CONFIG_PPC_82xx is not set
127# CONFIG_PPC_83xx is not set
128# CONFIG_PPC_86xx is not set
129CONFIG_CLASSIC32=y
142# CONFIG_PPC_CHRP is not set 130# CONFIG_PPC_CHRP is not set
143CONFIG_PPC_MPC52xx=y 131CONFIG_PPC_MPC52xx=y
144CONFIG_PPC_MPC5200=y 132CONFIG_PPC_MPC5200=y
@@ -161,6 +149,7 @@ CONFIG_PPC_LITE5200=y
161# CONFIG_CPU_FREQ is not set 149# CONFIG_CPU_FREQ is not set
162# CONFIG_TAU is not set 150# CONFIG_TAU is not set
163# CONFIG_CPM2 is not set 151# CONFIG_CPM2 is not set
152# CONFIG_FSL_ULI1575 is not set
164 153
165# 154#
166# Kernel options 155# Kernel options
@@ -190,12 +179,15 @@ CONFIG_FLAT_NODE_MEM_MAP=y
190CONFIG_SPLIT_PTLOCK_CPUS=4 179CONFIG_SPLIT_PTLOCK_CPUS=4
191# CONFIG_RESOURCES_64BIT is not set 180# CONFIG_RESOURCES_64BIT is not set
192CONFIG_ZONE_DMA_FLAG=1 181CONFIG_ZONE_DMA_FLAG=1
182CONFIG_BOUNCE=y
183CONFIG_VIRT_TO_BUS=y
193CONFIG_PROC_DEVICETREE=y 184CONFIG_PROC_DEVICETREE=y
194# CONFIG_CMDLINE_BOOL is not set 185# CONFIG_CMDLINE_BOOL is not set
195CONFIG_PM=y 186CONFIG_PM=y
196# CONFIG_PM_LEGACY is not set 187# CONFIG_PM_LEGACY is not set
197# CONFIG_PM_DEBUG is not set 188# CONFIG_PM_DEBUG is not set
198# CONFIG_PM_SYSFS_DEPRECATED is not set 189CONFIG_PM_SLEEP=y
190CONFIG_SUSPEND=y
199# CONFIG_HIBERNATION is not set 191# CONFIG_HIBERNATION is not set
200CONFIG_SECCOMP=y 192CONFIG_SECCOMP=y
201# CONFIG_WANT_DEVICE_TREE is not set 193# CONFIG_WANT_DEVICE_TREE is not set
@@ -210,6 +202,7 @@ CONFIG_GENERIC_ISA_DMA=y
210CONFIG_FSL_SOC=y 202CONFIG_FSL_SOC=y
211CONFIG_PCI=y 203CONFIG_PCI=y
212CONFIG_PCI_DOMAINS=y 204CONFIG_PCI_DOMAINS=y
205CONFIG_PCI_SYSCALL=y
213# CONFIG_PCIEPORTBUS is not set 206# CONFIG_PCIEPORTBUS is not set
214CONFIG_ARCH_SUPPORTS_MSI=y 207CONFIG_ARCH_SUPPORTS_MSI=y
215# CONFIG_PCI_MSI is not set 208# CONFIG_PCI_MSI is not set
@@ -320,6 +313,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
320# CONFIG_MAC80211 is not set 313# CONFIG_MAC80211 is not set
321# CONFIG_IEEE80211 is not set 314# CONFIG_IEEE80211 is not set
322# CONFIG_RFKILL is not set 315# CONFIG_RFKILL is not set
316# CONFIG_NET_9P is not set
323 317
324# 318#
325# Device Drivers 319# Device Drivers
@@ -334,26 +328,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
334# CONFIG_DEBUG_DRIVER is not set 328# CONFIG_DEBUG_DRIVER is not set
335# CONFIG_DEBUG_DEVRES is not set 329# CONFIG_DEBUG_DEVRES is not set
336# CONFIG_SYS_HYPERVISOR is not set 330# CONFIG_SYS_HYPERVISOR is not set
337
338#
339# Connector - unified userspace <-> kernelspace linker
340#
341# CONFIG_CONNECTOR is not set 331# CONFIG_CONNECTOR is not set
342# CONFIG_MTD is not set 332# CONFIG_MTD is not set
343 333CONFIG_OF_DEVICE=y
344#
345# Parallel port support
346#
347# CONFIG_PARPORT is not set 334# CONFIG_PARPORT is not set
348 335CONFIG_BLK_DEV=y
349#
350# Plug and Play support
351#
352# CONFIG_PNPACPI is not set
353
354#
355# Block devices
356#
357# CONFIG_BLK_DEV_FD is not set 336# CONFIG_BLK_DEV_FD is not set
358# CONFIG_BLK_CPQ_DA is not set 337# CONFIG_BLK_CPQ_DA is not set
359# CONFIG_BLK_CPQ_CISS_DA is not set 338# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -370,14 +349,11 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
370CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 349CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
371# CONFIG_CDROM_PKTCDVD is not set 350# CONFIG_CDROM_PKTCDVD is not set
372# CONFIG_ATA_OVER_ETH is not set 351# CONFIG_ATA_OVER_ETH is not set
373 352CONFIG_MISC_DEVICES=y
374#
375# Misc devices
376#
377# CONFIG_PHANTOM is not set 353# CONFIG_PHANTOM is not set
354# CONFIG_EEPROM_93CX6 is not set
378# CONFIG_SGI_IOC4 is not set 355# CONFIG_SGI_IOC4 is not set
379# CONFIG_TIFM_CORE is not set 356# CONFIG_TIFM_CORE is not set
380# CONFIG_BLINK is not set
381# CONFIG_IDE is not set 357# CONFIG_IDE is not set
382 358
383# 359#
@@ -385,6 +361,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
385# 361#
386# CONFIG_RAID_ATTRS is not set 362# CONFIG_RAID_ATTRS is not set
387CONFIG_SCSI=y 363CONFIG_SCSI=y
364CONFIG_SCSI_DMA=y
388# CONFIG_SCSI_TGT is not set 365# CONFIG_SCSI_TGT is not set
389# CONFIG_SCSI_NETLINK is not set 366# CONFIG_SCSI_NETLINK is not set
390# CONFIG_SCSI_PROC_FS is not set 367# CONFIG_SCSI_PROC_FS is not set
@@ -414,12 +391,8 @@ CONFIG_SCSI_WAIT_SCAN=m
414# CONFIG_SCSI_SPI_ATTRS is not set 391# CONFIG_SCSI_SPI_ATTRS is not set
415# CONFIG_SCSI_FC_ATTRS is not set 392# CONFIG_SCSI_FC_ATTRS is not set
416# CONFIG_SCSI_ISCSI_ATTRS is not set 393# CONFIG_SCSI_ISCSI_ATTRS is not set
417# CONFIG_SCSI_SAS_ATTRS is not set
418# CONFIG_SCSI_SAS_LIBSAS is not set 394# CONFIG_SCSI_SAS_LIBSAS is not set
419 395CONFIG_SCSI_LOWLEVEL=y
420#
421# SCSI low-level drivers
422#
423# CONFIG_ISCSI_TCP is not set 396# CONFIG_ISCSI_TCP is not set
424# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 397# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
425# CONFIG_SCSI_3W_9XXX is not set 398# CONFIG_SCSI_3W_9XXX is not set
@@ -511,10 +484,6 @@ CONFIG_PATA_MPC52xx=y
511# CONFIG_PATA_VIA is not set 484# CONFIG_PATA_VIA is not set
512# CONFIG_PATA_WINBOND is not set 485# CONFIG_PATA_WINBOND is not set
513# CONFIG_PATA_PLATFORM is not set 486# CONFIG_PATA_PLATFORM is not set
514
515#
516# Multi-device support (RAID and LVM)
517#
518# CONFIG_MD is not set 487# CONFIG_MD is not set
519 488
520# 489#
@@ -530,26 +499,16 @@ CONFIG_PATA_MPC52xx=y
530# 499#
531# CONFIG_FIREWIRE is not set 500# CONFIG_FIREWIRE is not set
532# CONFIG_IEEE1394 is not set 501# CONFIG_IEEE1394 is not set
533
534#
535# I2O device support
536#
537# CONFIG_I2O is not set 502# CONFIG_I2O is not set
538# CONFIG_MACINTOSH_DRIVERS is not set 503# CONFIG_MACINTOSH_DRIVERS is not set
539
540#
541# Network device support
542#
543CONFIG_NETDEVICES=y 504CONFIG_NETDEVICES=y
505# CONFIG_NETDEVICES_MULTIQUEUE is not set
544# CONFIG_DUMMY is not set 506# CONFIG_DUMMY is not set
545# CONFIG_BONDING is not set 507# CONFIG_BONDING is not set
508# CONFIG_MACVLAN is not set
546# CONFIG_EQUALIZER is not set 509# CONFIG_EQUALIZER is not set
547# CONFIG_TUN is not set 510# CONFIG_TUN is not set
548# CONFIG_ARCNET is not set 511# CONFIG_ARCNET is not set
549
550#
551# Ethernet (10 or 100Mbit)
552#
553# CONFIG_NET_ETHERNET is not set 512# CONFIG_NET_ETHERNET is not set
554CONFIG_NETDEV_1000=y 513CONFIG_NETDEV_1000=y
555# CONFIG_ACENIC is not set 514# CONFIG_ACENIC is not set
@@ -562,7 +521,6 @@ CONFIG_NETDEV_1000=y
562# CONFIG_SIS190 is not set 521# CONFIG_SIS190 is not set
563# CONFIG_SKGE is not set 522# CONFIG_SKGE is not set
564# CONFIG_SKY2 is not set 523# CONFIG_SKY2 is not set
565# CONFIG_SK98LIN is not set
566# CONFIG_VIA_VELOCITY is not set 524# CONFIG_VIA_VELOCITY is not set
567# CONFIG_TIGON3 is not set 525# CONFIG_TIGON3 is not set
568# CONFIG_BNX2 is not set 526# CONFIG_BNX2 is not set
@@ -594,15 +552,7 @@ CONFIG_NETDEV_10000=y
594# CONFIG_NETCONSOLE is not set 552# CONFIG_NETCONSOLE is not set
595# CONFIG_NETPOLL is not set 553# CONFIG_NETPOLL is not set
596# CONFIG_NET_POLL_CONTROLLER is not set 554# CONFIG_NET_POLL_CONTROLLER is not set
597
598#
599# ISDN subsystem
600#
601# CONFIG_ISDN is not set 555# CONFIG_ISDN is not set
602
603#
604# Telephony Support
605#
606# CONFIG_PHONE is not set 556# CONFIG_PHONE is not set
607 557
608# 558#
@@ -640,10 +590,6 @@ CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=9600
640CONFIG_UNIX98_PTYS=y 590CONFIG_UNIX98_PTYS=y
641CONFIG_LEGACY_PTYS=y 591CONFIG_LEGACY_PTYS=y
642CONFIG_LEGACY_PTY_COUNT=256 592CONFIG_LEGACY_PTY_COUNT=256
643
644#
645# IPMI
646#
647# CONFIG_IPMI_HANDLER is not set 593# CONFIG_IPMI_HANDLER is not set
648# CONFIG_WATCHDOG is not set 594# CONFIG_WATCHDOG is not set
649# CONFIG_HW_RANDOM is not set 595# CONFIG_HW_RANDOM is not set
@@ -654,10 +600,6 @@ CONFIG_LEGACY_PTY_COUNT=256
654# CONFIG_AGP is not set 600# CONFIG_AGP is not set
655# CONFIG_DRM is not set 601# CONFIG_DRM is not set
656# CONFIG_RAW_DRIVER is not set 602# CONFIG_RAW_DRIVER is not set
657
658#
659# TPM devices
660#
661# CONFIG_TCG_TPM is not set 603# CONFIG_TCG_TPM is not set
662CONFIG_DEVPORT=y 604CONFIG_DEVPORT=y
663# CONFIG_I2C is not set 605# CONFIG_I2C is not set
@@ -667,11 +609,8 @@ CONFIG_DEVPORT=y
667# 609#
668# CONFIG_SPI is not set 610# CONFIG_SPI is not set
669# CONFIG_SPI_MASTER is not set 611# CONFIG_SPI_MASTER is not set
670
671#
672# Dallas's 1-wire bus
673#
674# CONFIG_W1 is not set 612# CONFIG_W1 is not set
613# CONFIG_POWER_SUPPLY is not set
675# CONFIG_HWMON is not set 614# CONFIG_HWMON is not set
676 615
677# 616#
@@ -696,6 +635,7 @@ CONFIG_DEVPORT=y
696# 635#
697# CONFIG_DISPLAY_SUPPORT is not set 636# CONFIG_DISPLAY_SUPPORT is not set
698# CONFIG_VGASTATE is not set 637# CONFIG_VGASTATE is not set
638CONFIG_VIDEO_OUTPUT_CONTROL=m
699# CONFIG_FB is not set 639# CONFIG_FB is not set
700# CONFIG_FB_IBM_GXT4500 is not set 640# CONFIG_FB_IBM_GXT4500 is not set
701 641
@@ -703,10 +643,7 @@ CONFIG_DEVPORT=y
703# Sound 643# Sound
704# 644#
705# CONFIG_SOUND is not set 645# CONFIG_SOUND is not set
706 646CONFIG_USB_SUPPORT=y
707#
708# USB support
709#
710CONFIG_USB_ARCH_HAS_HCD=y 647CONFIG_USB_ARCH_HAS_HCD=y
711CONFIG_USB_ARCH_HAS_OHCI=y 648CONFIG_USB_ARCH_HAS_OHCI=y
712CONFIG_USB_ARCH_HAS_EHCI=y 649CONFIG_USB_ARCH_HAS_EHCI=y
@@ -721,33 +658,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
721# 658#
722# CONFIG_USB_GADGET is not set 659# CONFIG_USB_GADGET is not set
723# CONFIG_MMC is not set 660# CONFIG_MMC is not set
724
725#
726# LED devices
727#
728# CONFIG_NEW_LEDS is not set 661# CONFIG_NEW_LEDS is not set
729
730#
731# LED drivers
732#
733
734#
735# LED Triggers
736#
737
738#
739# InfiniBand support
740#
741# CONFIG_INFINIBAND is not set 662# CONFIG_INFINIBAND is not set
742 663# CONFIG_EDAC is not set
743#
744# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
745#
746
747#
748# Real Time Clock
749#
750CONFIG_RTC_LIB=y
751# CONFIG_RTC_CLASS is not set 664# CONFIG_RTC_CLASS is not set
752 665
753# 666#
@@ -764,6 +677,11 @@ CONFIG_RTC_LIB=y
764# 677#
765 678
766# 679#
680# Userspace I/O
681#
682# CONFIG_UIO is not set
683
684#
767# File systems 685# File systems
768# 686#
769CONFIG_EXT2_FS=y 687CONFIG_EXT2_FS=y
@@ -846,7 +764,6 @@ CONFIG_RAMFS=y
846# CONFIG_NCP_FS is not set 764# CONFIG_NCP_FS is not set
847# CONFIG_CODA_FS is not set 765# CONFIG_CODA_FS is not set
848# CONFIG_AFS_FS is not set 766# CONFIG_AFS_FS is not set
849# CONFIG_9P_FS is not set
850 767
851# 768#
852# Partition Types 769# Partition Types
@@ -872,6 +789,7 @@ CONFIG_MSDOS_PARTITION=y
872# CONFIG_CRC16 is not set 789# CONFIG_CRC16 is not set
873# CONFIG_CRC_ITU_T is not set 790# CONFIG_CRC_ITU_T is not set
874# CONFIG_CRC32 is not set 791# CONFIG_CRC32 is not set
792# CONFIG_CRC7 is not set
875# CONFIG_LIBCRC32C is not set 793# CONFIG_LIBCRC32C is not set
876CONFIG_PLIST=y 794CONFIG_PLIST=y
877CONFIG_HAS_IOMEM=y 795CONFIG_HAS_IOMEM=y
@@ -895,6 +813,7 @@ CONFIG_ENABLE_MUST_CHECK=y
895CONFIG_DEBUG_KERNEL=y 813CONFIG_DEBUG_KERNEL=y
896# CONFIG_DEBUG_SHIRQ is not set 814# CONFIG_DEBUG_SHIRQ is not set
897CONFIG_DETECT_SOFTLOCKUP=y 815CONFIG_DETECT_SOFTLOCKUP=y
816CONFIG_SCHED_DEBUG=y
898# CONFIG_SCHEDSTATS is not set 817# CONFIG_SCHEDSTATS is not set
899# CONFIG_TIMER_STATS is not set 818# CONFIG_TIMER_STATS is not set
900# CONFIG_DEBUG_SLAB is not set 819# CONFIG_DEBUG_SLAB is not set
@@ -925,8 +844,4 @@ CONFIG_FORCED_INLINING=y
925# 844#
926# CONFIG_KEYS is not set 845# CONFIG_KEYS is not set
927# CONFIG_SECURITY is not set 846# CONFIG_SECURITY is not set
928
929#
930# Cryptographic options
931#
932# CONFIG_CRYPTO is not set 847# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
index eb3d9ad655..96b538bc67 100644
--- a/arch/powerpc/configs/maple_defconfig
+++ b/arch/powerpc/configs/maple_defconfig
@@ -1,9 +1,22 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 13:27:35 2007 4# Thu Aug 30 16:38:16 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7
8#
9# Processor support
10#
11CONFIG_POWER4_ONLY=y
12CONFIG_POWER4=y
13CONFIG_PPC_FPU=y
14# CONFIG_ALTIVEC is not set
15CONFIG_PPC_STD_MMU=y
16CONFIG_PPC_MM_SLICES=y
17CONFIG_VIRT_CPU_ACCOUNTING=y
18CONFIG_SMP=y
19CONFIG_NR_CPUS=4
7CONFIG_64BIT=y 20CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y 21CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 22CONFIG_MMU=y
@@ -15,6 +28,7 @@ CONFIG_ARCH_HAS_ILOG2_U64=y
15CONFIG_GENERIC_HWEIGHT=y 28CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y 29CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y 30CONFIG_GENERIC_FIND_NEXT_BIT=y
31CONFIG_ARCH_NO_VIRT_TO_BUS=y
18CONFIG_PPC=y 32CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y 33CONFIG_EARLY_PRINTK=y
20CONFIG_COMPAT=y 34CONFIG_COMPAT=y
@@ -22,49 +36,32 @@ CONFIG_SYSVIPC_COMPAT=y
22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 36CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_ARCH_MAY_HAVE_PC_FDC=y 37CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24CONFIG_PPC_OF=y 38CONFIG_PPC_OF=y
39CONFIG_OF=y
25CONFIG_PPC_UDBG_16550=y 40CONFIG_PPC_UDBG_16550=y
26CONFIG_GENERIC_TBSYNC=y 41CONFIG_GENERIC_TBSYNC=y
27CONFIG_AUDIT_ARCH=y 42CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y 43CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set 44# CONFIG_DEFAULT_UIMAGE is not set
30
31#
32# Processor support
33#
34CONFIG_POWER4_ONLY=y
35CONFIG_POWER4=y
36CONFIG_PPC_FPU=y
37# CONFIG_PPC_DCR_NATIVE is not set 45# CONFIG_PPC_DCR_NATIVE is not set
38# CONFIG_PPC_DCR_MMIO is not set 46# CONFIG_PPC_DCR_MMIO is not set
39# CONFIG_PPC_OF_PLATFORM_PCI is not set 47# CONFIG_PPC_OF_PLATFORM_PCI is not set
40# CONFIG_ALTIVEC is not set
41CONFIG_PPC_STD_MMU=y
42CONFIG_PPC_MM_SLICES=y
43CONFIG_VIRT_CPU_ACCOUNTING=y
44CONFIG_SMP=y
45CONFIG_NR_CPUS=4
46CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
47 49
48# 50#
49# Code maturity level options 51# General setup
50# 52#
51CONFIG_EXPERIMENTAL=y 53CONFIG_EXPERIMENTAL=y
52CONFIG_LOCK_KERNEL=y 54CONFIG_LOCK_KERNEL=y
53CONFIG_INIT_ENV_ARG_LIMIT=32 55CONFIG_INIT_ENV_ARG_LIMIT=32
54
55#
56# General setup
57#
58CONFIG_LOCALVERSION="" 56CONFIG_LOCALVERSION=""
59CONFIG_LOCALVERSION_AUTO=y 57CONFIG_LOCALVERSION_AUTO=y
60CONFIG_SWAP=y 58CONFIG_SWAP=y
61CONFIG_SYSVIPC=y 59CONFIG_SYSVIPC=y
62# CONFIG_IPC_NS is not set
63CONFIG_SYSVIPC_SYSCTL=y 60CONFIG_SYSVIPC_SYSCTL=y
64CONFIG_POSIX_MQUEUE=y 61CONFIG_POSIX_MQUEUE=y
65# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
66# CONFIG_TASKSTATS is not set 63# CONFIG_TASKSTATS is not set
67# CONFIG_UTS_NS is not set 64# CONFIG_USER_NS is not set
68# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
69CONFIG_IKCONFIG=y 66CONFIG_IKCONFIG=y
70CONFIG_IKCONFIG_PROC=y 67CONFIG_IKCONFIG_PROC=y
@@ -99,10 +96,6 @@ CONFIG_SLAB=y
99CONFIG_RT_MUTEXES=y 96CONFIG_RT_MUTEXES=y
100# CONFIG_TINY_SHMEM is not set 97# CONFIG_TINY_SHMEM is not set
101CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
102
103#
104# Loadable module support
105#
106CONFIG_MODULES=y 99CONFIG_MODULES=y
107CONFIG_MODULE_UNLOAD=y 100CONFIG_MODULE_UNLOAD=y
108# CONFIG_MODULE_FORCE_UNLOAD is not set 101# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -110,12 +103,9 @@ CONFIG_MODVERSIONS=y
110CONFIG_MODULE_SRCVERSION_ALL=y 103CONFIG_MODULE_SRCVERSION_ALL=y
111CONFIG_KMOD=y 104CONFIG_KMOD=y
112CONFIG_STOP_MACHINE=y 105CONFIG_STOP_MACHINE=y
113
114#
115# Block layer
116#
117CONFIG_BLOCK=y 106CONFIG_BLOCK=y
118# CONFIG_BLK_DEV_IO_TRACE is not set 107# CONFIG_BLK_DEV_IO_TRACE is not set
108# CONFIG_BLK_DEV_BSG is not set
119 109
120# 110#
121# IO Schedulers 111# IO Schedulers
@@ -135,7 +125,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
135# 125#
136CONFIG_PPC_MULTIPLATFORM=y 126CONFIG_PPC_MULTIPLATFORM=y
137# CONFIG_EMBEDDED6xx is not set 127# CONFIG_EMBEDDED6xx is not set
138# CONFIG_APUS is not set 128# CONFIG_PPC_82xx is not set
129# CONFIG_PPC_83xx is not set
130# CONFIG_PPC_86xx is not set
139# CONFIG_PPC_PSERIES is not set 131# CONFIG_PPC_PSERIES is not set
140# CONFIG_PPC_ISERIES is not set 132# CONFIG_PPC_ISERIES is not set
141# CONFIG_PPC_MPC52xx is not set 133# CONFIG_PPC_MPC52xx is not set
@@ -167,6 +159,7 @@ CONFIG_PPC_970_NAP=y
167# CONFIG_GENERIC_IOMAP is not set 159# CONFIG_GENERIC_IOMAP is not set
168# CONFIG_CPU_FREQ is not set 160# CONFIG_CPU_FREQ is not set
169# CONFIG_CPM2 is not set 161# CONFIG_CPM2 is not set
162# CONFIG_FSL_ULI1575 is not set
170 163
171# 164#
172# Kernel options 165# Kernel options
@@ -203,6 +196,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
203CONFIG_SPLIT_PTLOCK_CPUS=4 196CONFIG_SPLIT_PTLOCK_CPUS=4
204CONFIG_RESOURCES_64BIT=y 197CONFIG_RESOURCES_64BIT=y
205CONFIG_ZONE_DMA_FLAG=1 198CONFIG_ZONE_DMA_FLAG=1
199CONFIG_BOUNCE=y
206# CONFIG_PPC_HAS_HASH_64K is not set 200# CONFIG_PPC_HAS_HASH_64K is not set
207# CONFIG_PPC_64K_PAGES is not set 201# CONFIG_PPC_64K_PAGES is not set
208# CONFIG_SCHED_SMT is not set 202# CONFIG_SCHED_SMT is not set
@@ -221,6 +215,7 @@ CONFIG_GENERIC_ISA_DMA=y
221# CONFIG_PPC_INDIRECT_PCI is not set 215# CONFIG_PPC_INDIRECT_PCI is not set
222CONFIG_PCI=y 216CONFIG_PCI=y
223CONFIG_PCI_DOMAINS=y 217CONFIG_PCI_DOMAINS=y
218CONFIG_PCI_SYSCALL=y
224# CONFIG_PCIEPORTBUS is not set 219# CONFIG_PCIEPORTBUS is not set
225CONFIG_ARCH_SUPPORTS_MSI=y 220CONFIG_ARCH_SUPPORTS_MSI=y
226CONFIG_PCI_MSI=y 221CONFIG_PCI_MSI=y
@@ -318,6 +313,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
318# CONFIG_MAC80211 is not set 313# CONFIG_MAC80211 is not set
319# CONFIG_IEEE80211 is not set 314# CONFIG_IEEE80211 is not set
320# CONFIG_RFKILL is not set 315# CONFIG_RFKILL is not set
316# CONFIG_NET_9P is not set
321 317
322# 318#
323# Device Drivers 319# Device Drivers
@@ -332,28 +328,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
332# CONFIG_DEBUG_DRIVER is not set 328# CONFIG_DEBUG_DRIVER is not set
333# CONFIG_DEBUG_DEVRES is not set 329# CONFIG_DEBUG_DEVRES is not set
334# CONFIG_SYS_HYPERVISOR is not set 330# CONFIG_SYS_HYPERVISOR is not set
335
336#
337# Connector - unified userspace <-> kernelspace linker
338#
339# CONFIG_CONNECTOR is not set 331# CONFIG_CONNECTOR is not set
340# CONFIG_MTD is not set 332# CONFIG_MTD is not set
341 333CONFIG_OF_DEVICE=y
342#
343# Parallel port support
344#
345# CONFIG_PARPORT is not set 334# CONFIG_PARPORT is not set
346 335CONFIG_BLK_DEV=y
347#
348# Plug and Play support
349#
350# CONFIG_PNPACPI is not set
351
352#
353# Block devices
354#
355# CONFIG_BLK_DEV_FD is not set 336# CONFIG_BLK_DEV_FD is not set
356# CONFIG_BLK_CPQ_DA is not set
357# CONFIG_BLK_CPQ_CISS_DA is not set 337# CONFIG_BLK_CPQ_CISS_DA is not set
358# CONFIG_BLK_DEV_DAC960 is not set 338# CONFIG_BLK_DEV_DAC960 is not set
359# CONFIG_BLK_DEV_UMEM is not set 339# CONFIG_BLK_DEV_UMEM is not set
@@ -368,14 +348,11 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
368CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 348CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
369# CONFIG_CDROM_PKTCDVD is not set 349# CONFIG_CDROM_PKTCDVD is not set
370# CONFIG_ATA_OVER_ETH is not set 350# CONFIG_ATA_OVER_ETH is not set
371 351CONFIG_MISC_DEVICES=y
372#
373# Misc devices
374#
375# CONFIG_PHANTOM is not set 352# CONFIG_PHANTOM is not set
353# CONFIG_EEPROM_93CX6 is not set
376# CONFIG_SGI_IOC4 is not set 354# CONFIG_SGI_IOC4 is not set
377# CONFIG_TIFM_CORE is not set 355# CONFIG_TIFM_CORE is not set
378# CONFIG_BLINK is not set
379CONFIG_IDE=y 356CONFIG_IDE=y
380CONFIG_BLK_DEV_IDE=y 357CONFIG_BLK_DEV_IDE=y
381 358
@@ -439,12 +416,9 @@ CONFIG_BLK_DEV_IDEDMA=y
439# 416#
440# CONFIG_RAID_ATTRS is not set 417# CONFIG_RAID_ATTRS is not set
441# CONFIG_SCSI is not set 418# CONFIG_SCSI is not set
419# CONFIG_SCSI_DMA is not set
442# CONFIG_SCSI_NETLINK is not set 420# CONFIG_SCSI_NETLINK is not set
443# CONFIG_ATA is not set 421# CONFIG_ATA is not set
444
445#
446# Multi-device support (RAID and LVM)
447#
448# CONFIG_MD is not set 422# CONFIG_MD is not set
449 423
450# 424#
@@ -457,37 +431,23 @@ CONFIG_BLK_DEV_IDEDMA=y
457# 431#
458# CONFIG_FIREWIRE is not set 432# CONFIG_FIREWIRE is not set
459# CONFIG_IEEE1394 is not set 433# CONFIG_IEEE1394 is not set
460
461#
462# I2O device support
463#
464# CONFIG_I2O is not set 434# CONFIG_I2O is not set
465# CONFIG_MACINTOSH_DRIVERS is not set 435# CONFIG_MACINTOSH_DRIVERS is not set
466
467#
468# Network device support
469#
470CONFIG_NETDEVICES=y 436CONFIG_NETDEVICES=y
437# CONFIG_NETDEVICES_MULTIQUEUE is not set
471# CONFIG_DUMMY is not set 438# CONFIG_DUMMY is not set
472# CONFIG_BONDING is not set 439# CONFIG_BONDING is not set
440# CONFIG_MACVLAN is not set
473# CONFIG_EQUALIZER is not set 441# CONFIG_EQUALIZER is not set
474# CONFIG_TUN is not set 442# CONFIG_TUN is not set
475# CONFIG_ARCNET is not set 443# CONFIG_ARCNET is not set
476# CONFIG_PHYLIB is not set 444# CONFIG_PHYLIB is not set
477
478#
479# Ethernet (10 or 100Mbit)
480#
481CONFIG_NET_ETHERNET=y 445CONFIG_NET_ETHERNET=y
482CONFIG_MII=y 446CONFIG_MII=y
483# CONFIG_HAPPYMEAL is not set 447# CONFIG_HAPPYMEAL is not set
484# CONFIG_SUNGEM is not set 448# CONFIG_SUNGEM is not set
485# CONFIG_CASSINI is not set 449# CONFIG_CASSINI is not set
486# CONFIG_NET_VENDOR_3COM is not set 450# CONFIG_NET_VENDOR_3COM is not set
487
488#
489# Tulip family network device support
490#
491# CONFIG_NET_TULIP is not set 451# CONFIG_NET_TULIP is not set
492# CONFIG_HP100 is not set 452# CONFIG_HP100 is not set
493CONFIG_NET_PCI=y 453CONFIG_NET_PCI=y
@@ -523,7 +483,6 @@ CONFIG_E1000=y
523# CONFIG_SIS190 is not set 483# CONFIG_SIS190 is not set
524# CONFIG_SKGE is not set 484# CONFIG_SKGE is not set
525# CONFIG_SKY2 is not set 485# CONFIG_SKY2 is not set
526# CONFIG_SK98LIN is not set
527# CONFIG_VIA_VELOCITY is not set 486# CONFIG_VIA_VELOCITY is not set
528CONFIG_TIGON3=y 487CONFIG_TIGON3=y
529# CONFIG_BNX2 is not set 488# CONFIG_BNX2 is not set
@@ -564,15 +523,7 @@ CONFIG_USB_PEGASUS=y
564# CONFIG_NETCONSOLE is not set 523# CONFIG_NETCONSOLE is not set
565# CONFIG_NETPOLL is not set 524# CONFIG_NETPOLL is not set
566# CONFIG_NET_POLL_CONTROLLER is not set 525# CONFIG_NET_POLL_CONTROLLER is not set
567
568#
569# ISDN subsystem
570#
571# CONFIG_ISDN is not set 526# CONFIG_ISDN is not set
572
573#
574# Telephony Support
575#
576# CONFIG_PHONE is not set 527# CONFIG_PHONE is not set
577 528
578# 529#
@@ -641,10 +592,6 @@ CONFIG_LEGACY_PTYS=y
641CONFIG_LEGACY_PTY_COUNT=256 592CONFIG_LEGACY_PTY_COUNT=256
642CONFIG_HVC_DRIVER=y 593CONFIG_HVC_DRIVER=y
643CONFIG_HVC_RTAS=y 594CONFIG_HVC_RTAS=y
644
645#
646# IPMI
647#
648# CONFIG_IPMI_HANDLER is not set 595# CONFIG_IPMI_HANDLER is not set
649# CONFIG_WATCHDOG is not set 596# CONFIG_WATCHDOG is not set
650# CONFIG_HW_RANDOM is not set 597# CONFIG_HW_RANDOM is not set
@@ -656,10 +603,6 @@ CONFIG_GEN_RTC=y
656# CONFIG_DRM is not set 603# CONFIG_DRM is not set
657# CONFIG_RAW_DRIVER is not set 604# CONFIG_RAW_DRIVER is not set
658# CONFIG_HANGCHECK_TIMER is not set 605# CONFIG_HANGCHECK_TIMER is not set
659
660#
661# TPM devices
662#
663# CONFIG_TCG_TPM is not set 606# CONFIG_TCG_TPM is not set
664CONFIG_DEVPORT=y 607CONFIG_DEVPORT=y
665CONFIG_I2C=y 608CONFIG_I2C=y
@@ -693,6 +636,7 @@ CONFIG_I2C_AMD8111=y
693# CONFIG_I2C_SIS5595 is not set 636# CONFIG_I2C_SIS5595 is not set
694# CONFIG_I2C_SIS630 is not set 637# CONFIG_I2C_SIS630 is not set
695# CONFIG_I2C_SIS96X is not set 638# CONFIG_I2C_SIS96X is not set
639# CONFIG_I2C_TAOS_EVM is not set
696# CONFIG_I2C_STUB is not set 640# CONFIG_I2C_STUB is not set
697# CONFIG_I2C_TINY_USB is not set 641# CONFIG_I2C_TINY_USB is not set
698# CONFIG_I2C_VIA is not set 642# CONFIG_I2C_VIA is not set
@@ -704,11 +648,13 @@ CONFIG_I2C_AMD8111=y
704# 648#
705# CONFIG_SENSORS_DS1337 is not set 649# CONFIG_SENSORS_DS1337 is not set
706# CONFIG_SENSORS_DS1374 is not set 650# CONFIG_SENSORS_DS1374 is not set
651# CONFIG_DS1682 is not set
707# CONFIG_SENSORS_EEPROM is not set 652# CONFIG_SENSORS_EEPROM is not set
708# CONFIG_SENSORS_PCF8574 is not set 653# CONFIG_SENSORS_PCF8574 is not set
709# CONFIG_SENSORS_PCA9539 is not set 654# CONFIG_SENSORS_PCA9539 is not set
710# CONFIG_SENSORS_PCF8591 is not set 655# CONFIG_SENSORS_PCF8591 is not set
711# CONFIG_SENSORS_MAX6875 is not set 656# CONFIG_SENSORS_MAX6875 is not set
657# CONFIG_SENSORS_TSL2550 is not set
712# CONFIG_I2C_DEBUG_CORE is not set 658# CONFIG_I2C_DEBUG_CORE is not set
713# CONFIG_I2C_DEBUG_ALGO is not set 659# CONFIG_I2C_DEBUG_ALGO is not set
714# CONFIG_I2C_DEBUG_BUS is not set 660# CONFIG_I2C_DEBUG_BUS is not set
@@ -719,11 +665,8 @@ CONFIG_I2C_AMD8111=y
719# 665#
720# CONFIG_SPI is not set 666# CONFIG_SPI is not set
721# CONFIG_SPI_MASTER is not set 667# CONFIG_SPI_MASTER is not set
722
723#
724# Dallas's 1-wire bus
725#
726# CONFIG_W1 is not set 668# CONFIG_W1 is not set
669# CONFIG_POWER_SUPPLY is not set
727# CONFIG_HWMON is not set 670# CONFIG_HWMON is not set
728 671
729# 672#
@@ -748,6 +691,7 @@ CONFIG_I2C_AMD8111=y
748# 691#
749# CONFIG_DISPLAY_SUPPORT is not set 692# CONFIG_DISPLAY_SUPPORT is not set
750# CONFIG_VGASTATE is not set 693# CONFIG_VGASTATE is not set
694# CONFIG_VIDEO_OUTPUT_CONTROL is not set
751# CONFIG_FB is not set 695# CONFIG_FB is not set
752# CONFIG_FB_IBM_GXT4500 is not set 696# CONFIG_FB_IBM_GXT4500 is not set
753 697
@@ -761,10 +705,7 @@ CONFIG_DUMMY_CONSOLE=y
761# Sound 705# Sound
762# 706#
763# CONFIG_SOUND is not set 707# CONFIG_SOUND is not set
764 708CONFIG_HID_SUPPORT=y
765#
766# HID Devices
767#
768CONFIG_HID=y 709CONFIG_HID=y
769# CONFIG_HID_DEBUG is not set 710# CONFIG_HID_DEBUG is not set
770 711
@@ -775,10 +716,7 @@ CONFIG_USB_HID=y
775# CONFIG_USB_HIDINPUT_POWERBOOK is not set 716# CONFIG_USB_HIDINPUT_POWERBOOK is not set
776# CONFIG_HID_FF is not set 717# CONFIG_HID_FF is not set
777# CONFIG_USB_HIDDEV is not set 718# CONFIG_USB_HIDDEV is not set
778 719CONFIG_USB_SUPPORT=y
779#
780# USB support
781#
782CONFIG_USB_ARCH_HAS_HCD=y 720CONFIG_USB_ARCH_HAS_HCD=y
783CONFIG_USB_ARCH_HAS_OHCI=y 721CONFIG_USB_ARCH_HAS_OHCI=y
784CONFIG_USB_ARCH_HAS_EHCI=y 722CONFIG_USB_ARCH_HAS_EHCI=y
@@ -800,7 +738,6 @@ CONFIG_USB_EHCI_HCD=y
800CONFIG_USB_EHCI_SPLIT_ISO=y 738CONFIG_USB_EHCI_SPLIT_ISO=y
801CONFIG_USB_EHCI_ROOT_HUB_TT=y 739CONFIG_USB_EHCI_ROOT_HUB_TT=y
802# CONFIG_USB_EHCI_TT_NEWSCHED is not set 740# CONFIG_USB_EHCI_TT_NEWSCHED is not set
803# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
804# CONFIG_USB_ISP116X_HCD is not set 741# CONFIG_USB_ISP116X_HCD is not set
805CONFIG_USB_OHCI_HCD=y 742CONFIG_USB_OHCI_HCD=y
806# CONFIG_USB_OHCI_HCD_PPC_OF is not set 743# CONFIG_USB_OHCI_HCD_PPC_OF is not set
@@ -809,6 +746,7 @@ CONFIG_USB_OHCI_HCD=y
809CONFIG_USB_OHCI_LITTLE_ENDIAN=y 746CONFIG_USB_OHCI_LITTLE_ENDIAN=y
810CONFIG_USB_UHCI_HCD=y 747CONFIG_USB_UHCI_HCD=y
811# CONFIG_USB_SL811_HCD is not set 748# CONFIG_USB_SL811_HCD is not set
749# CONFIG_USB_R8A66597_HCD is not set
812 750
813# 751#
814# USB Device Class drivers 752# USB Device Class drivers
@@ -880,6 +818,7 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
880# CONFIG_USB_SERIAL_MOS7840 is not set 818# CONFIG_USB_SERIAL_MOS7840 is not set
881# CONFIG_USB_SERIAL_NAVMAN is not set 819# CONFIG_USB_SERIAL_NAVMAN is not set
882# CONFIG_USB_SERIAL_PL2303 is not set 820# CONFIG_USB_SERIAL_PL2303 is not set
821# CONFIG_USB_SERIAL_OTI6858 is not set
883# CONFIG_USB_SERIAL_HP4X is not set 822# CONFIG_USB_SERIAL_HP4X is not set
884# CONFIG_USB_SERIAL_SAFE is not set 823# CONFIG_USB_SERIAL_SAFE is not set
885# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set 824# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
@@ -924,32 +863,9 @@ CONFIG_USB_EZUSB=y
924# 863#
925# CONFIG_USB_GADGET is not set 864# CONFIG_USB_GADGET is not set
926# CONFIG_MMC is not set 865# CONFIG_MMC is not set
927
928#
929# LED devices
930#
931# CONFIG_NEW_LEDS is not set 866# CONFIG_NEW_LEDS is not set
932
933#
934# LED drivers
935#
936
937#
938# LED Triggers
939#
940
941#
942# InfiniBand support
943#
944# CONFIG_INFINIBAND is not set 867# CONFIG_INFINIBAND is not set
945 868# CONFIG_EDAC is not set
946#
947# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
948#
949
950#
951# Real Time Clock
952#
953# CONFIG_RTC_CLASS is not set 869# CONFIG_RTC_CLASS is not set
954 870
955# 871#
@@ -966,6 +882,11 @@ CONFIG_USB_EZUSB=y
966# 882#
967 883
968# 884#
885# Userspace I/O
886#
887# CONFIG_UIO is not set
888
889#
969# File systems 890# File systems
970# 891#
971CONFIG_EXT2_FS=y 892CONFIG_EXT2_FS=y
@@ -1064,7 +985,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
1064# CONFIG_NCP_FS is not set 985# CONFIG_NCP_FS is not set
1065# CONFIG_CODA_FS is not set 986# CONFIG_CODA_FS is not set
1066# CONFIG_AFS_FS is not set 987# CONFIG_AFS_FS is not set
1067# CONFIG_9P_FS is not set
1068 988
1069# 989#
1070# Partition Types 990# Partition Types
@@ -1146,6 +1066,7 @@ CONFIG_CRC_CCITT=y
1146# CONFIG_CRC16 is not set 1066# CONFIG_CRC16 is not set
1147# CONFIG_CRC_ITU_T is not set 1067# CONFIG_CRC_ITU_T is not set
1148CONFIG_CRC32=y 1068CONFIG_CRC32=y
1069# CONFIG_CRC7 is not set
1149# CONFIG_LIBCRC32C is not set 1070# CONFIG_LIBCRC32C is not set
1150CONFIG_ZLIB_INFLATE=y 1071CONFIG_ZLIB_INFLATE=y
1151CONFIG_PLIST=y 1072CONFIG_PLIST=y
@@ -1171,6 +1092,7 @@ CONFIG_DEBUG_FS=y
1171CONFIG_DEBUG_KERNEL=y 1092CONFIG_DEBUG_KERNEL=y
1172# CONFIG_DEBUG_SHIRQ is not set 1093# CONFIG_DEBUG_SHIRQ is not set
1173CONFIG_DETECT_SOFTLOCKUP=y 1094CONFIG_DETECT_SOFTLOCKUP=y
1095CONFIG_SCHED_DEBUG=y
1174# CONFIG_SCHEDSTATS is not set 1096# CONFIG_SCHEDSTATS is not set
1175# CONFIG_TIMER_STATS is not set 1097# CONFIG_TIMER_STATS is not set
1176CONFIG_DEBUG_SLAB=y 1098CONFIG_DEBUG_SLAB=y
@@ -1205,10 +1127,6 @@ CONFIG_BOOTX_TEXT=y
1205# 1127#
1206# CONFIG_KEYS is not set 1128# CONFIG_KEYS is not set
1207# CONFIG_SECURITY is not set 1129# CONFIG_SECURITY is not set
1208
1209#
1210# Cryptographic options
1211#
1212CONFIG_CRYPTO=y 1130CONFIG_CRYPTO=y
1213CONFIG_CRYPTO_ALGAPI=y 1131CONFIG_CRYPTO_ALGAPI=y
1214CONFIG_CRYPTO_BLKCIPHER=y 1132CONFIG_CRYPTO_BLKCIPHER=y
@@ -1246,7 +1164,4 @@ CONFIG_CRYPTO_DES=y
1246# CONFIG_CRYPTO_CRC32C is not set 1164# CONFIG_CRYPTO_CRC32C is not set
1247# CONFIG_CRYPTO_CAMELLIA is not set 1165# CONFIG_CRYPTO_CAMELLIA is not set
1248# CONFIG_CRYPTO_TEST is not set 1166# CONFIG_CRYPTO_TEST is not set
1249 1167# CONFIG_CRYPTO_HW is not set
1250#
1251# Hardware crypto devices
1252#
diff --git a/arch/powerpc/configs/mpc7448_hpc2_defconfig b/arch/powerpc/configs/mpc7448_hpc2_defconfig
index 174a290ee7..05814a3b0e 100644
--- a/arch/powerpc/configs/mpc7448_hpc2_defconfig
+++ b/arch/powerpc/configs/mpc7448_hpc2_defconfig
@@ -1,9 +1,24 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:56:54 2007 4# Tue Aug 28 21:24:39 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18CONFIG_PPC_STD_MMU=y
19CONFIG_PPC_STD_MMU_32=y
20# CONFIG_PPC_MM_SLICES is not set
21# CONFIG_SMP is not set
7CONFIG_PPC32=y 22CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 23CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 24CONFIG_MMU=y
@@ -14,61 +29,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 29CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 30CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 31CONFIG_GENERIC_FIND_NEXT_BIT=y
32# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 33CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 34CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 35CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 36CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 37CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 38CONFIG_PPC_OF=y
39CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 40CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 41# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 42CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 43CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 44CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32CONFIG_CLASSIC32=y
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_PPC_FPU=y
43# CONFIG_PPC_DCR_NATIVE is not set 45# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 46# CONFIG_PPC_DCR_MMIO is not set
45# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49# CONFIG_SMP is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 47CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 48
52# 49#
53# Code maturity level options 50# General setup
54# 51#
55CONFIG_EXPERIMENTAL=y 52CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 53CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 54CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 55CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 56CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 57CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 58CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 59CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 60# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 61# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 62# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 63# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 64# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 65# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 66CONFIG_LOG_BUF_SHIFT=14
@@ -101,19 +93,12 @@ CONFIG_SLAB=y
101CONFIG_RT_MUTEXES=y 93CONFIG_RT_MUTEXES=y
102# CONFIG_TINY_SHMEM is not set 94# CONFIG_TINY_SHMEM is not set
103CONFIG_BASE_SMALL=0 95CONFIG_BASE_SMALL=0
104
105#
106# Loadable module support
107#
108# CONFIG_MODULES is not set 96# CONFIG_MODULES is not set
109
110#
111# Block layer
112#
113CONFIG_BLOCK=y 97CONFIG_BLOCK=y
114CONFIG_LBD=y 98CONFIG_LBD=y
115# CONFIG_BLK_DEV_IO_TRACE is not set 99# CONFIG_BLK_DEV_IO_TRACE is not set
116# CONFIG_LSF is not set 100# CONFIG_LSF is not set
101# CONFIG_BLK_DEV_BSG is not set
117 102
118# 103#
119# IO Schedulers 104# IO Schedulers
@@ -133,7 +118,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
133# 118#
134# CONFIG_PPC_MULTIPLATFORM is not set 119# CONFIG_PPC_MULTIPLATFORM is not set
135CONFIG_EMBEDDED6xx=y 120CONFIG_EMBEDDED6xx=y
136# CONFIG_APUS is not set 121# CONFIG_PPC_82xx is not set
122# CONFIG_PPC_83xx is not set
123# CONFIG_PPC_86xx is not set
137# CONFIG_PPC_MPC52xx is not set 124# CONFIG_PPC_MPC52xx is not set
138# CONFIG_PPC_MPC5200 is not set 125# CONFIG_PPC_MPC5200 is not set
139# CONFIG_PPC_CELL is not set 126# CONFIG_PPC_CELL is not set
@@ -154,8 +141,8 @@ CONFIG_MPIC_WEIRD=y
154# CONFIG_PPC_INDIRECT_IO is not set 141# CONFIG_PPC_INDIRECT_IO is not set
155# CONFIG_GENERIC_IOMAP is not set 142# CONFIG_GENERIC_IOMAP is not set
156# CONFIG_CPU_FREQ is not set 143# CONFIG_CPU_FREQ is not set
157# CONFIG_TAU is not set
158# CONFIG_CPM2 is not set 144# CONFIG_CPM2 is not set
145# CONFIG_FSL_ULI1575 is not set
159 146
160# 147#
161# Kernel options 148# Kernel options
@@ -184,6 +171,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
184CONFIG_SPLIT_PTLOCK_CPUS=4 171CONFIG_SPLIT_PTLOCK_CPUS=4
185# CONFIG_RESOURCES_64BIT is not set 172# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=1 173CONFIG_ZONE_DMA_FLAG=1
174CONFIG_BOUNCE=y
175CONFIG_VIRT_TO_BUS=y
187CONFIG_PROC_DEVICETREE=y 176CONFIG_PROC_DEVICETREE=y
188# CONFIG_CMDLINE_BOOL is not set 177# CONFIG_CMDLINE_BOOL is not set
189# CONFIG_PM is not set 178# CONFIG_PM is not set
@@ -199,6 +188,7 @@ CONFIG_GENERIC_ISA_DMA=y
199# CONFIG_PPC_INDIRECT_PCI is not set 188# CONFIG_PPC_INDIRECT_PCI is not set
200CONFIG_PCI=y 189CONFIG_PCI=y
201CONFIG_PCI_DOMAINS=y 190CONFIG_PCI_DOMAINS=y
191CONFIG_PCI_SYSCALL=y
202# CONFIG_PCIEPORTBUS is not set 192# CONFIG_PCIEPORTBUS is not set
203CONFIG_ARCH_SUPPORTS_MSI=y 193CONFIG_ARCH_SUPPORTS_MSI=y
204# CONFIG_PCI_MSI is not set 194# CONFIG_PCI_MSI is not set
@@ -308,6 +298,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
308# CONFIG_MAC80211 is not set 298# CONFIG_MAC80211 is not set
309# CONFIG_IEEE80211 is not set 299# CONFIG_IEEE80211 is not set
310# CONFIG_RFKILL is not set 300# CONFIG_RFKILL is not set
301# CONFIG_NET_9P is not set
311 302
312# 303#
313# Device Drivers 304# Device Drivers
@@ -320,26 +311,11 @@ CONFIG_STANDALONE=y
320CONFIG_PREVENT_FIRMWARE_BUILD=y 311CONFIG_PREVENT_FIRMWARE_BUILD=y
321# CONFIG_FW_LOADER is not set 312# CONFIG_FW_LOADER is not set
322# CONFIG_SYS_HYPERVISOR is not set 313# CONFIG_SYS_HYPERVISOR is not set
323
324#
325# Connector - unified userspace <-> kernelspace linker
326#
327# CONFIG_CONNECTOR is not set 314# CONFIG_CONNECTOR is not set
328# CONFIG_MTD is not set 315# CONFIG_MTD is not set
329 316CONFIG_OF_DEVICE=y
330#
331# Parallel port support
332#
333# CONFIG_PARPORT is not set 317# CONFIG_PARPORT is not set
334 318CONFIG_BLK_DEV=y
335#
336# Plug and Play support
337#
338# CONFIG_PNPACPI is not set
339
340#
341# Block devices
342#
343# CONFIG_BLK_DEV_FD is not set 319# CONFIG_BLK_DEV_FD is not set
344# CONFIG_BLK_CPQ_DA is not set 320# CONFIG_BLK_CPQ_DA is not set
345# CONFIG_BLK_CPQ_CISS_DA is not set 321# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -356,14 +332,11 @@ CONFIG_BLK_DEV_RAM_SIZE=131072
356CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 332CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
357# CONFIG_CDROM_PKTCDVD is not set 333# CONFIG_CDROM_PKTCDVD is not set
358# CONFIG_ATA_OVER_ETH is not set 334# CONFIG_ATA_OVER_ETH is not set
359 335CONFIG_MISC_DEVICES=y
360#
361# Misc devices
362#
363# CONFIG_PHANTOM is not set 336# CONFIG_PHANTOM is not set
337# CONFIG_EEPROM_93CX6 is not set
364# CONFIG_SGI_IOC4 is not set 338# CONFIG_SGI_IOC4 is not set
365# CONFIG_TIFM_CORE is not set 339# CONFIG_TIFM_CORE is not set
366# CONFIG_BLINK is not set
367# CONFIG_IDE is not set 340# CONFIG_IDE is not set
368 341
369# 342#
@@ -371,6 +344,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
371# 344#
372# CONFIG_RAID_ATTRS is not set 345# CONFIG_RAID_ATTRS is not set
373CONFIG_SCSI=y 346CONFIG_SCSI=y
347CONFIG_SCSI_DMA=y
374# CONFIG_SCSI_TGT is not set 348# CONFIG_SCSI_TGT is not set
375# CONFIG_SCSI_NETLINK is not set 349# CONFIG_SCSI_NETLINK is not set
376CONFIG_SCSI_PROC_FS=y 350CONFIG_SCSI_PROC_FS=y
@@ -399,12 +373,8 @@ CONFIG_BLK_DEV_SD=y
399# CONFIG_SCSI_SPI_ATTRS is not set 373# CONFIG_SCSI_SPI_ATTRS is not set
400# CONFIG_SCSI_FC_ATTRS is not set 374# CONFIG_SCSI_FC_ATTRS is not set
401# CONFIG_SCSI_ISCSI_ATTRS is not set 375# CONFIG_SCSI_ISCSI_ATTRS is not set
402# CONFIG_SCSI_SAS_ATTRS is not set
403# CONFIG_SCSI_SAS_LIBSAS is not set 376# CONFIG_SCSI_SAS_LIBSAS is not set
404 377CONFIG_SCSI_LOWLEVEL=y
405#
406# SCSI low-level drivers
407#
408# CONFIG_ISCSI_TCP is not set 378# CONFIG_ISCSI_TCP is not set
409# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 379# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
410# CONFIG_SCSI_3W_9XXX is not set 380# CONFIG_SCSI_3W_9XXX is not set
@@ -495,10 +465,6 @@ CONFIG_SATA_MV=y
495# CONFIG_PATA_VIA is not set 465# CONFIG_PATA_VIA is not set
496# CONFIG_PATA_WINBOND is not set 466# CONFIG_PATA_WINBOND is not set
497# CONFIG_PATA_PLATFORM is not set 467# CONFIG_PATA_PLATFORM is not set
498
499#
500# Multi-device support (RAID and LVM)
501#
502# CONFIG_MD is not set 468# CONFIG_MD is not set
503 469
504# 470#
@@ -514,19 +480,13 @@ CONFIG_SATA_MV=y
514# 480#
515# CONFIG_FIREWIRE is not set 481# CONFIG_FIREWIRE is not set
516# CONFIG_IEEE1394 is not set 482# CONFIG_IEEE1394 is not set
517
518#
519# I2O device support
520#
521# CONFIG_I2O is not set 483# CONFIG_I2O is not set
522# CONFIG_MACINTOSH_DRIVERS is not set 484# CONFIG_MACINTOSH_DRIVERS is not set
523
524#
525# Network device support
526#
527CONFIG_NETDEVICES=y 485CONFIG_NETDEVICES=y
486# CONFIG_NETDEVICES_MULTIQUEUE is not set
528# CONFIG_DUMMY is not set 487# CONFIG_DUMMY is not set
529# CONFIG_BONDING is not set 488# CONFIG_BONDING is not set
489# CONFIG_MACVLAN is not set
530# CONFIG_EQUALIZER is not set 490# CONFIG_EQUALIZER is not set
531# CONFIG_TUN is not set 491# CONFIG_TUN is not set
532# CONFIG_ARCNET is not set 492# CONFIG_ARCNET is not set
@@ -543,21 +503,14 @@ CONFIG_PHYLIB=y
543# CONFIG_VITESSE_PHY is not set 503# CONFIG_VITESSE_PHY is not set
544# CONFIG_SMSC_PHY is not set 504# CONFIG_SMSC_PHY is not set
545# CONFIG_BROADCOM_PHY is not set 505# CONFIG_BROADCOM_PHY is not set
506# CONFIG_ICPLUS_PHY is not set
546# CONFIG_FIXED_PHY is not set 507# CONFIG_FIXED_PHY is not set
547
548#
549# Ethernet (10 or 100Mbit)
550#
551CONFIG_NET_ETHERNET=y 508CONFIG_NET_ETHERNET=y
552CONFIG_MII=y 509CONFIG_MII=y
553# CONFIG_HAPPYMEAL is not set 510# CONFIG_HAPPYMEAL is not set
554# CONFIG_SUNGEM is not set 511# CONFIG_SUNGEM is not set
555# CONFIG_CASSINI is not set 512# CONFIG_CASSINI is not set
556# CONFIG_NET_VENDOR_3COM is not set 513# CONFIG_NET_VENDOR_3COM is not set
557
558#
559# Tulip family network device support
560#
561# CONFIG_NET_TULIP is not set 514# CONFIG_NET_TULIP is not set
562# CONFIG_HP100 is not set 515# CONFIG_HP100 is not set
563CONFIG_NET_PCI=y 516CONFIG_NET_PCI=y
@@ -595,7 +548,6 @@ CONFIG_NETDEV_1000=y
595# CONFIG_SIS190 is not set 548# CONFIG_SIS190 is not set
596# CONFIG_SKGE is not set 549# CONFIG_SKGE is not set
597# CONFIG_SKY2 is not set 550# CONFIG_SKY2 is not set
598# CONFIG_SK98LIN is not set
599# CONFIG_VIA_VELOCITY is not set 551# CONFIG_VIA_VELOCITY is not set
600# CONFIG_TIGON3 is not set 552# CONFIG_TIGON3 is not set
601# CONFIG_BNX2 is not set 553# CONFIG_BNX2 is not set
@@ -627,15 +579,7 @@ CONFIG_NETDEV_10000=y
627# CONFIG_NETCONSOLE is not set 579# CONFIG_NETCONSOLE is not set
628# CONFIG_NETPOLL is not set 580# CONFIG_NETPOLL is not set
629# CONFIG_NET_POLL_CONTROLLER is not set 581# CONFIG_NET_POLL_CONTROLLER is not set
630
631#
632# ISDN subsystem
633#
634# CONFIG_ISDN is not set 582# CONFIG_ISDN is not set
635
636#
637# Telephony Support
638#
639# CONFIG_PHONE is not set 583# CONFIG_PHONE is not set
640 584
641# 585#
@@ -697,10 +641,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
697CONFIG_UNIX98_PTYS=y 641CONFIG_UNIX98_PTYS=y
698CONFIG_LEGACY_PTYS=y 642CONFIG_LEGACY_PTYS=y
699CONFIG_LEGACY_PTY_COUNT=256 643CONFIG_LEGACY_PTY_COUNT=256
700
701#
702# IPMI
703#
704# CONFIG_IPMI_HANDLER is not set 644# CONFIG_IPMI_HANDLER is not set
705# CONFIG_WATCHDOG is not set 645# CONFIG_WATCHDOG is not set
706# CONFIG_HW_RANDOM is not set 646# CONFIG_HW_RANDOM is not set
@@ -712,10 +652,6 @@ CONFIG_GEN_RTC=y
712# CONFIG_AGP is not set 652# CONFIG_AGP is not set
713# CONFIG_DRM is not set 653# CONFIG_DRM is not set
714# CONFIG_RAW_DRIVER is not set 654# CONFIG_RAW_DRIVER is not set
715
716#
717# TPM devices
718#
719# CONFIG_TCG_TPM is not set 655# CONFIG_TCG_TPM is not set
720CONFIG_DEVPORT=y 656CONFIG_DEVPORT=y
721# CONFIG_I2C is not set 657# CONFIG_I2C is not set
@@ -725,20 +661,24 @@ CONFIG_DEVPORT=y
725# 661#
726# CONFIG_SPI is not set 662# CONFIG_SPI is not set
727# CONFIG_SPI_MASTER is not set 663# CONFIG_SPI_MASTER is not set
728
729#
730# Dallas's 1-wire bus
731#
732# CONFIG_W1 is not set 664# CONFIG_W1 is not set
665# CONFIG_POWER_SUPPLY is not set
733CONFIG_HWMON=y 666CONFIG_HWMON=y
734# CONFIG_HWMON_VID is not set 667# CONFIG_HWMON_VID is not set
735# CONFIG_SENSORS_ABITUGURU is not set 668# CONFIG_SENSORS_ABITUGURU is not set
669# CONFIG_SENSORS_ABITUGURU3 is not set
736# CONFIG_SENSORS_F71805F is not set 670# CONFIG_SENSORS_F71805F is not set
671# CONFIG_SENSORS_IT87 is not set
672# CONFIG_SENSORS_PC87360 is not set
737# CONFIG_SENSORS_PC87427 is not set 673# CONFIG_SENSORS_PC87427 is not set
674# CONFIG_SENSORS_SIS5595 is not set
738# CONFIG_SENSORS_SMSC47M1 is not set 675# CONFIG_SENSORS_SMSC47M1 is not set
739# CONFIG_SENSORS_SMSC47B397 is not set 676# CONFIG_SENSORS_SMSC47B397 is not set
677# CONFIG_SENSORS_VIA686A is not set
740# CONFIG_SENSORS_VT1211 is not set 678# CONFIG_SENSORS_VT1211 is not set
679# CONFIG_SENSORS_VT8231 is not set
741# CONFIG_SENSORS_W83627HF is not set 680# CONFIG_SENSORS_W83627HF is not set
681# CONFIG_SENSORS_W83627EHF is not set
742# CONFIG_HWMON_DEBUG_CHIP is not set 682# CONFIG_HWMON_DEBUG_CHIP is not set
743 683
744# 684#
@@ -763,6 +703,7 @@ CONFIG_DAB=y
763# 703#
764# CONFIG_DISPLAY_SUPPORT is not set 704# CONFIG_DISPLAY_SUPPORT is not set
765# CONFIG_VGASTATE is not set 705# CONFIG_VGASTATE is not set
706CONFIG_VIDEO_OUTPUT_CONTROL=y
766# CONFIG_FB is not set 707# CONFIG_FB is not set
767# CONFIG_FB_IBM_GXT4500 is not set 708# CONFIG_FB_IBM_GXT4500 is not set
768 709
@@ -770,16 +711,10 @@ CONFIG_DAB=y
770# Sound 711# Sound
771# 712#
772# CONFIG_SOUND is not set 713# CONFIG_SOUND is not set
773 714CONFIG_HID_SUPPORT=y
774#
775# HID Devices
776#
777CONFIG_HID=y 715CONFIG_HID=y
778# CONFIG_HID_DEBUG is not set 716# CONFIG_HID_DEBUG is not set
779 717CONFIG_USB_SUPPORT=y
780#
781# USB support
782#
783CONFIG_USB_ARCH_HAS_HCD=y 718CONFIG_USB_ARCH_HAS_HCD=y
784CONFIG_USB_ARCH_HAS_OHCI=y 719CONFIG_USB_ARCH_HAS_OHCI=y
785CONFIG_USB_ARCH_HAS_EHCI=y 720CONFIG_USB_ARCH_HAS_EHCI=y
@@ -794,32 +729,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
794# 729#
795# CONFIG_USB_GADGET is not set 730# CONFIG_USB_GADGET is not set
796# CONFIG_MMC is not set 731# CONFIG_MMC is not set
797
798#
799# LED devices
800#
801# CONFIG_NEW_LEDS is not set 732# CONFIG_NEW_LEDS is not set
802
803#
804# LED drivers
805#
806
807#
808# LED Triggers
809#
810
811#
812# InfiniBand support
813#
814# CONFIG_INFINIBAND is not set 733# CONFIG_INFINIBAND is not set
815 734# CONFIG_EDAC is not set
816#
817# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
818#
819
820#
821# Real Time Clock
822#
823# CONFIG_RTC_CLASS is not set 735# CONFIG_RTC_CLASS is not set
824 736
825# 737#
@@ -836,6 +748,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
836# 748#
837 749
838# 750#
751# Userspace I/O
752#
753# CONFIG_UIO is not set
754
755#
839# File systems 756# File systems
840# 757#
841CONFIG_EXT2_FS=y 758CONFIG_EXT2_FS=y
@@ -928,7 +845,6 @@ CONFIG_SUNRPC=y
928# CONFIG_NCP_FS is not set 845# CONFIG_NCP_FS is not set
929# CONFIG_CODA_FS is not set 846# CONFIG_CODA_FS is not set
930# CONFIG_AFS_FS is not set 847# CONFIG_AFS_FS is not set
931# CONFIG_9P_FS is not set
932 848
933# 849#
934# Partition Types 850# Partition Types
@@ -971,6 +887,7 @@ CONFIG_BITREVERSE=y
971# CONFIG_CRC16 is not set 887# CONFIG_CRC16 is not set
972# CONFIG_CRC_ITU_T is not set 888# CONFIG_CRC_ITU_T is not set
973CONFIG_CRC32=y 889CONFIG_CRC32=y
890# CONFIG_CRC7 is not set
974# CONFIG_LIBCRC32C is not set 891# CONFIG_LIBCRC32C is not set
975CONFIG_PLIST=y 892CONFIG_PLIST=y
976CONFIG_HAS_IOMEM=y 893CONFIG_HAS_IOMEM=y
@@ -993,7 +910,6 @@ CONFIG_ENABLE_MUST_CHECK=y
993# CONFIG_HEADERS_CHECK is not set 910# CONFIG_HEADERS_CHECK is not set
994# CONFIG_DEBUG_KERNEL is not set 911# CONFIG_DEBUG_KERNEL is not set
995# CONFIG_DEBUG_BUGVERBOSE is not set 912# CONFIG_DEBUG_BUGVERBOSE is not set
996# CONFIG_BOOTX_TEXT is not set
997# CONFIG_PPC_EARLY_DEBUG is not set 913# CONFIG_PPC_EARLY_DEBUG is not set
998 914
999# 915#
@@ -1001,8 +917,4 @@ CONFIG_ENABLE_MUST_CHECK=y
1001# 917#
1002# CONFIG_KEYS is not set 918# CONFIG_KEYS is not set
1003# CONFIG_SECURITY is not set 919# CONFIG_SECURITY is not set
1004
1005#
1006# Cryptographic options
1007#
1008# CONFIG_CRYPTO is not set 920# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/mpc8272_ads_defconfig b/arch/powerpc/configs/mpc8272_ads_defconfig
index 4a429294e4..4b68032588 100644
--- a/arch/powerpc/configs/mpc8272_ads_defconfig
+++ b/arch/powerpc/configs/mpc8272_ads_defconfig
@@ -1,9 +1,24 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:56:55 2007 4# Tue Aug 28 21:24:39 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18CONFIG_PPC_STD_MMU=y
19CONFIG_PPC_STD_MMU_32=y
20# CONFIG_PPC_MM_SLICES is not set
21# CONFIG_SMP is not set
7CONFIG_PPC32=y 22CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 23CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 24CONFIG_MMU=y
@@ -14,59 +29,36 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 29CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 30CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 31CONFIG_GENERIC_FIND_NEXT_BIT=y
32# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 33CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 34CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 35CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 36CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 37CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 38CONFIG_PPC_OF=y
39CONFIG_OF=y
23# CONFIG_PPC_UDBG_16550 is not set 40# CONFIG_PPC_UDBG_16550 is not set
24# CONFIG_GENERIC_TBSYNC is not set 41# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 42CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 43CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 44CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33CONFIG_PPC_82xx=y
34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_PPC_FPU=y
43# CONFIG_PPC_DCR_NATIVE is not set 45# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 46# CONFIG_PPC_DCR_MMIO is not set
45CONFIG_PPC_STD_MMU=y
46CONFIG_PPC_STD_MMU_32=y
47# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 47CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 48
51# 49#
52# Code maturity level options 50# General setup
53# 51#
54# CONFIG_EXPERIMENTAL is not set 52# CONFIG_EXPERIMENTAL is not set
55CONFIG_BROKEN_ON_SMP=y 53CONFIG_BROKEN_ON_SMP=y
56CONFIG_INIT_ENV_ARG_LIMIT=32 54CONFIG_INIT_ENV_ARG_LIMIT=32
57
58#
59# General setup
60#
61CONFIG_LOCALVERSION="powerpc8272" 55CONFIG_LOCALVERSION="powerpc8272"
62CONFIG_LOCALVERSION_AUTO=y 56CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 57CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 58CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set
66CONFIG_SYSVIPC_SYSCTL=y 59CONFIG_SYSVIPC_SYSCTL=y
67# CONFIG_BSD_PROCESS_ACCT is not set 60# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 61# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 62# CONFIG_AUDIT is not set
71CONFIG_IKCONFIG=y 63CONFIG_IKCONFIG=y
72CONFIG_IKCONFIG_PROC=y 64CONFIG_IKCONFIG_PROC=y
@@ -99,15 +91,7 @@ CONFIG_SLAB=y
99CONFIG_RT_MUTEXES=y 91CONFIG_RT_MUTEXES=y
100# CONFIG_TINY_SHMEM is not set 92# CONFIG_TINY_SHMEM is not set
101CONFIG_BASE_SMALL=0 93CONFIG_BASE_SMALL=0
102
103#
104# Loadable module support
105#
106# CONFIG_MODULES is not set 94# CONFIG_MODULES is not set
107
108#
109# Block layer
110#
111CONFIG_BLOCK=y 95CONFIG_BLOCK=y
112# CONFIG_LBD is not set 96# CONFIG_LBD is not set
113# CONFIG_BLK_DEV_IO_TRACE is not set 97# CONFIG_BLK_DEV_IO_TRACE is not set
@@ -129,6 +113,11 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
129# 113#
130# Platform support 114# Platform support
131# 115#
116# CONFIG_PPC_MULTIPLATFORM is not set
117# CONFIG_EMBEDDED6xx is not set
118CONFIG_PPC_82xx=y
119# CONFIG_PPC_83xx is not set
120# CONFIG_PPC_86xx is not set
132# CONFIG_PPC_MPC52xx is not set 121# CONFIG_PPC_MPC52xx is not set
133# CONFIG_PPC_MPC5200 is not set 122# CONFIG_PPC_MPC5200 is not set
134# CONFIG_PPC_CELL is not set 123# CONFIG_PPC_CELL is not set
@@ -148,6 +137,7 @@ CONFIG_8272=y
148# CONFIG_GENERIC_IOMAP is not set 137# CONFIG_GENERIC_IOMAP is not set
149# CONFIG_CPU_FREQ is not set 138# CONFIG_CPU_FREQ is not set
150CONFIG_CPM2=y 139CONFIG_CPM2=y
140# CONFIG_FSL_ULI1575 is not set
151 141
152# 142#
153# Kernel options 143# Kernel options
@@ -172,6 +162,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
172CONFIG_SPLIT_PTLOCK_CPUS=4 162CONFIG_SPLIT_PTLOCK_CPUS=4
173# CONFIG_RESOURCES_64BIT is not set 163# CONFIG_RESOURCES_64BIT is not set
174CONFIG_ZONE_DMA_FLAG=1 164CONFIG_ZONE_DMA_FLAG=1
165CONFIG_BOUNCE=y
166CONFIG_VIRT_TO_BUS=y
175CONFIG_PROC_DEVICETREE=y 167CONFIG_PROC_DEVICETREE=y
176# CONFIG_CMDLINE_BOOL is not set 168# CONFIG_CMDLINE_BOOL is not set
177# CONFIG_PM is not set 169# CONFIG_PM is not set
@@ -186,6 +178,7 @@ CONFIG_ZONE_DMA=y
186CONFIG_FSL_SOC=y 178CONFIG_FSL_SOC=y
187# CONFIG_PCI is not set 179# CONFIG_PCI is not set
188# CONFIG_PCI_DOMAINS is not set 180# CONFIG_PCI_DOMAINS is not set
181# CONFIG_PCI_SYSCALL is not set
189# CONFIG_ARCH_SUPPORTS_MSI is not set 182# CONFIG_ARCH_SUPPORTS_MSI is not set
190 183
191# 184#
@@ -319,26 +312,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
319# CONFIG_DEBUG_DRIVER is not set 312# CONFIG_DEBUG_DRIVER is not set
320# CONFIG_DEBUG_DEVRES is not set 313# CONFIG_DEBUG_DEVRES is not set
321# CONFIG_SYS_HYPERVISOR is not set 314# CONFIG_SYS_HYPERVISOR is not set
322
323#
324# Connector - unified userspace <-> kernelspace linker
325#
326# CONFIG_CONNECTOR is not set 315# CONFIG_CONNECTOR is not set
327# CONFIG_MTD is not set 316# CONFIG_MTD is not set
328 317CONFIG_OF_DEVICE=y
329#
330# Parallel port support
331#
332# CONFIG_PARPORT is not set 318# CONFIG_PARPORT is not set
333 319CONFIG_BLK_DEV=y
334#
335# Plug and Play support
336#
337# CONFIG_PNPACPI is not set
338
339#
340# Block devices
341#
342# CONFIG_BLK_DEV_FD is not set 320# CONFIG_BLK_DEV_FD is not set
343# CONFIG_BLK_DEV_COW_COMMON is not set 321# CONFIG_BLK_DEV_COW_COMMON is not set
344CONFIG_BLK_DEV_LOOP=y 322CONFIG_BLK_DEV_LOOP=y
@@ -347,11 +325,8 @@ CONFIG_BLK_DEV_LOOP=y
347# CONFIG_BLK_DEV_RAM is not set 325# CONFIG_BLK_DEV_RAM is not set
348# CONFIG_CDROM_PKTCDVD is not set 326# CONFIG_CDROM_PKTCDVD is not set
349# CONFIG_ATA_OVER_ETH is not set 327# CONFIG_ATA_OVER_ETH is not set
350 328CONFIG_MISC_DEVICES=y
351# 329# CONFIG_EEPROM_93CX6 is not set
352# Misc devices
353#
354# CONFIG_BLINK is not set
355CONFIG_IDE=y 330CONFIG_IDE=y
356CONFIG_IDE_MAX_HWIFS=4 331CONFIG_IDE_MAX_HWIFS=4
357CONFIG_BLK_DEV_IDE=y 332CONFIG_BLK_DEV_IDE=y
@@ -381,19 +356,13 @@ CONFIG_IDE_PROC_FS=y
381# 356#
382# CONFIG_RAID_ATTRS is not set 357# CONFIG_RAID_ATTRS is not set
383# CONFIG_SCSI is not set 358# CONFIG_SCSI is not set
359# CONFIG_SCSI_DMA is not set
384# CONFIG_SCSI_NETLINK is not set 360# CONFIG_SCSI_NETLINK is not set
385# CONFIG_ATA is not set 361# CONFIG_ATA is not set
386
387#
388# Multi-device support (RAID and LVM)
389#
390# CONFIG_MD is not set 362# CONFIG_MD is not set
391# CONFIG_MACINTOSH_DRIVERS is not set 363# CONFIG_MACINTOSH_DRIVERS is not set
392
393#
394# Network device support
395#
396CONFIG_NETDEVICES=y 364CONFIG_NETDEVICES=y
365# CONFIG_NETDEVICES_MULTIQUEUE is not set
397# CONFIG_DUMMY is not set 366# CONFIG_DUMMY is not set
398# CONFIG_BONDING is not set 367# CONFIG_BONDING is not set
399# CONFIG_EQUALIZER is not set 368# CONFIG_EQUALIZER is not set
@@ -411,11 +380,8 @@ CONFIG_DAVICOM_PHY=y
411# CONFIG_VITESSE_PHY is not set 380# CONFIG_VITESSE_PHY is not set
412# CONFIG_SMSC_PHY is not set 381# CONFIG_SMSC_PHY is not set
413# CONFIG_BROADCOM_PHY is not set 382# CONFIG_BROADCOM_PHY is not set
383# CONFIG_ICPLUS_PHY is not set
414# CONFIG_FIXED_PHY is not set 384# CONFIG_FIXED_PHY is not set
415
416#
417# Ethernet (10 or 100Mbit)
418#
419CONFIG_NET_ETHERNET=y 385CONFIG_NET_ETHERNET=y
420CONFIG_MII=y 386CONFIG_MII=y
421CONFIG_FS_ENET=y 387CONFIG_FS_ENET=y
@@ -440,15 +406,7 @@ CONFIG_PPP_DEFLATE=y
440CONFIG_SLHC=y 406CONFIG_SLHC=y
441# CONFIG_NETPOLL is not set 407# CONFIG_NETPOLL is not set
442# CONFIG_NET_POLL_CONTROLLER is not set 408# CONFIG_NET_POLL_CONTROLLER is not set
443
444#
445# ISDN subsystem
446#
447# CONFIG_ISDN is not set 409# CONFIG_ISDN is not set
448
449#
450# Telephony Support
451#
452# CONFIG_PHONE is not set 410# CONFIG_PHONE is not set
453 411
454# 412#
@@ -533,10 +491,6 @@ CONFIG_SERIAL_CPM_SCC4=y
533CONFIG_UNIX98_PTYS=y 491CONFIG_UNIX98_PTYS=y
534CONFIG_LEGACY_PTYS=y 492CONFIG_LEGACY_PTYS=y
535CONFIG_LEGACY_PTY_COUNT=256 493CONFIG_LEGACY_PTY_COUNT=256
536
537#
538# IPMI
539#
540# CONFIG_IPMI_HANDLER is not set 494# CONFIG_IPMI_HANDLER is not set
541# CONFIG_WATCHDOG is not set 495# CONFIG_WATCHDOG is not set
542CONFIG_HW_RANDOM=y 496CONFIG_HW_RANDOM=y
@@ -544,10 +498,6 @@ CONFIG_HW_RANDOM=y
544# CONFIG_GEN_RTC is not set 498# CONFIG_GEN_RTC is not set
545# CONFIG_R3964 is not set 499# CONFIG_R3964 is not set
546# CONFIG_RAW_DRIVER is not set 500# CONFIG_RAW_DRIVER is not set
547
548#
549# TPM devices
550#
551# CONFIG_I2C is not set 501# CONFIG_I2C is not set
552 502
553# 503#
@@ -555,11 +505,8 @@ CONFIG_HW_RANDOM=y
555# 505#
556# CONFIG_SPI is not set 506# CONFIG_SPI is not set
557# CONFIG_SPI_MASTER is not set 507# CONFIG_SPI_MASTER is not set
558
559#
560# Dallas's 1-wire bus
561#
562# CONFIG_W1 is not set 508# CONFIG_W1 is not set
509# CONFIG_POWER_SUPPLY is not set
563# CONFIG_HWMON is not set 510# CONFIG_HWMON is not set
564 511
565# 512#
@@ -584,6 +531,7 @@ CONFIG_DAB=y
584# 531#
585# CONFIG_DISPLAY_SUPPORT is not set 532# CONFIG_DISPLAY_SUPPORT is not set
586# CONFIG_VGASTATE is not set 533# CONFIG_VGASTATE is not set
534CONFIG_VIDEO_OUTPUT_CONTROL=y
587# CONFIG_FB is not set 535# CONFIG_FB is not set
588# CONFIG_FB_IBM_GXT4500 is not set 536# CONFIG_FB_IBM_GXT4500 is not set
589 537
@@ -591,16 +539,10 @@ CONFIG_DAB=y
591# Sound 539# Sound
592# 540#
593# CONFIG_SOUND is not set 541# CONFIG_SOUND is not set
594 542CONFIG_HID_SUPPORT=y
595#
596# HID Devices
597#
598CONFIG_HID=y 543CONFIG_HID=y
599# CONFIG_HID_DEBUG is not set 544# CONFIG_HID_DEBUG is not set
600 545CONFIG_USB_SUPPORT=y
601#
602# USB support
603#
604# CONFIG_USB_ARCH_HAS_HCD is not set 546# CONFIG_USB_ARCH_HAS_HCD is not set
605# CONFIG_USB_ARCH_HAS_OHCI is not set 547# CONFIG_USB_ARCH_HAS_OHCI is not set
606# CONFIG_USB_ARCH_HAS_EHCI is not set 548# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -614,41 +556,29 @@ CONFIG_HID=y
614# 556#
615CONFIG_USB_GADGET=y 557CONFIG_USB_GADGET=y
616# CONFIG_USB_GADGET_DEBUG_FILES is not set 558# CONFIG_USB_GADGET_DEBUG_FILES is not set
559CONFIG_USB_GADGET_SELECTED=y
560# CONFIG_USB_GADGET_AMD5536UDC is not set
617# CONFIG_USB_GADGET_FSL_USB2 is not set 561# CONFIG_USB_GADGET_FSL_USB2 is not set
618# CONFIG_USB_GADGET_NET2280 is not set 562# CONFIG_USB_GADGET_NET2280 is not set
619# CONFIG_USB_GADGET_PXA2XX is not set 563# CONFIG_USB_GADGET_PXA2XX is not set
564CONFIG_USB_GADGET_M66592=y
565CONFIG_USB_M66592=y
620# CONFIG_USB_GADGET_GOKU is not set 566# CONFIG_USB_GADGET_GOKU is not set
621# CONFIG_USB_GADGET_LH7A40X is not set 567# CONFIG_USB_GADGET_LH7A40X is not set
622# CONFIG_USB_GADGET_OMAP is not set 568# CONFIG_USB_GADGET_OMAP is not set
569# CONFIG_USB_GADGET_S3C2410 is not set
623# CONFIG_USB_GADGET_AT91 is not set 570# CONFIG_USB_GADGET_AT91 is not set
624# CONFIG_USB_GADGET_DUMMY_HCD is not set 571# CONFIG_USB_GADGET_DUMMY_HCD is not set
625# CONFIG_USB_GADGET_DUALSPEED is not set 572CONFIG_USB_GADGET_DUALSPEED=y
573# CONFIG_USB_ZERO is not set
574CONFIG_USB_ETH=y
575# CONFIG_USB_GADGETFS is not set
576# CONFIG_USB_FILE_STORAGE is not set
577# CONFIG_USB_G_SERIAL is not set
578# CONFIG_USB_MIDI_GADGET is not set
626# CONFIG_MMC is not set 579# CONFIG_MMC is not set
627
628#
629# LED devices
630#
631# CONFIG_NEW_LEDS is not set 580# CONFIG_NEW_LEDS is not set
632 581# CONFIG_RTC_CLASS is not set
633#
634# LED drivers
635#
636
637#
638# LED Triggers
639#
640
641#
642# InfiniBand support
643#
644
645#
646# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
647#
648
649#
650# Real Time Clock
651#
652 582
653# 583#
654# DMA Engine support 584# DMA Engine support
@@ -664,6 +594,11 @@ CONFIG_USB_GADGET=y
664# 594#
665 595
666# 596#
597# Userspace I/O
598#
599# CONFIG_UIO is not set
600
601#
667# File systems 602# File systems
668# 603#
669CONFIG_EXT2_FS=y 604CONFIG_EXT2_FS=y
@@ -826,6 +761,7 @@ CONFIG_CRC_CCITT=y
826# CONFIG_CRC16 is not set 761# CONFIG_CRC16 is not set
827# CONFIG_CRC_ITU_T is not set 762# CONFIG_CRC_ITU_T is not set
828CONFIG_CRC32=y 763CONFIG_CRC32=y
764# CONFIG_CRC7 is not set
829# CONFIG_LIBCRC32C is not set 765# CONFIG_LIBCRC32C is not set
830CONFIG_ZLIB_INFLATE=y 766CONFIG_ZLIB_INFLATE=y
831CONFIG_ZLIB_DEFLATE=y 767CONFIG_ZLIB_DEFLATE=y
@@ -846,6 +782,7 @@ CONFIG_ENABLE_MUST_CHECK=y
846CONFIG_DEBUG_KERNEL=y 782CONFIG_DEBUG_KERNEL=y
847# CONFIG_DEBUG_SHIRQ is not set 783# CONFIG_DEBUG_SHIRQ is not set
848CONFIG_DETECT_SOFTLOCKUP=y 784CONFIG_DETECT_SOFTLOCKUP=y
785CONFIG_SCHED_DEBUG=y
849# CONFIG_SCHEDSTATS is not set 786# CONFIG_SCHEDSTATS is not set
850# CONFIG_TIMER_STATS is not set 787# CONFIG_TIMER_STATS is not set
851# CONFIG_DEBUG_SLAB is not set 788# CONFIG_DEBUG_SLAB is not set
@@ -868,7 +805,6 @@ CONFIG_FORCED_INLINING=y
868# CONFIG_DEBUGGER is not set 805# CONFIG_DEBUGGER is not set
869# CONFIG_KGDB_CONSOLE is not set 806# CONFIG_KGDB_CONSOLE is not set
870CONFIG_BDI_SWITCH=y 807CONFIG_BDI_SWITCH=y
871# CONFIG_BOOTX_TEXT is not set
872# CONFIG_PPC_EARLY_DEBUG is not set 808# CONFIG_PPC_EARLY_DEBUG is not set
873 809
874# 810#
@@ -876,10 +812,6 @@ CONFIG_BDI_SWITCH=y
876# 812#
877# CONFIG_KEYS is not set 813# CONFIG_KEYS is not set
878# CONFIG_SECURITY is not set 814# CONFIG_SECURITY is not set
879
880#
881# Cryptographic options
882#
883CONFIG_CRYPTO=y 815CONFIG_CRYPTO=y
884CONFIG_CRYPTO_ALGAPI=y 816CONFIG_CRYPTO_ALGAPI=y
885CONFIG_CRYPTO_BLKCIPHER=y 817CONFIG_CRYPTO_BLKCIPHER=y
@@ -913,7 +845,4 @@ CONFIG_CRYPTO_DES=y
913# CONFIG_CRYPTO_MICHAEL_MIC is not set 845# CONFIG_CRYPTO_MICHAEL_MIC is not set
914# CONFIG_CRYPTO_CRC32C is not set 846# CONFIG_CRYPTO_CRC32C is not set
915# CONFIG_CRYPTO_CAMELLIA is not set 847# CONFIG_CRYPTO_CAMELLIA is not set
916 848CONFIG_CRYPTO_HW=y
917#
918# Hardware crypto devices
919#
diff --git a/arch/powerpc/configs/mpc8313_rdb_defconfig b/arch/powerpc/configs/mpc8313_rdb_defconfig
index b7d3dffc98..f387dac69d 100644
--- a/arch/powerpc/configs/mpc8313_rdb_defconfig
+++ b/arch/powerpc/configs/mpc8313_rdb_defconfig
@@ -1,9 +1,25 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:56:55 2007 4# Tue Aug 28 21:24:39 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_83xx=y
18CONFIG_PPC_FPU=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
7CONFIG_PPC32=y 23CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 24CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 25CONFIG_MMU=y
@@ -14,61 +30,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 30CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 31CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 32CONFIG_GENERIC_FIND_NEXT_BIT=y
33# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 34CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 35CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 36CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 41CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 45CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49# CONFIG_SMP is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 49
52# 50#
53# Code maturity level options 51# General setup
54# 52#
55CONFIG_EXPERIMENTAL=y 53CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 54CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 55CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 56CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 57CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 58CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 59CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 60CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 63# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 64# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 67CONFIG_LOG_BUF_SHIFT=14
@@ -100,24 +93,17 @@ CONFIG_SLAB=y
100CONFIG_RT_MUTEXES=y 93CONFIG_RT_MUTEXES=y
101# CONFIG_TINY_SHMEM is not set 94# CONFIG_TINY_SHMEM is not set
102CONFIG_BASE_SMALL=0 95CONFIG_BASE_SMALL=0
103
104#
105# Loadable module support
106#
107CONFIG_MODULES=y 96CONFIG_MODULES=y
108CONFIG_MODULE_UNLOAD=y 97CONFIG_MODULE_UNLOAD=y
109# CONFIG_MODULE_FORCE_UNLOAD is not set 98# CONFIG_MODULE_FORCE_UNLOAD is not set
110# CONFIG_MODVERSIONS is not set 99# CONFIG_MODVERSIONS is not set
111# CONFIG_MODULE_SRCVERSION_ALL is not set 100# CONFIG_MODULE_SRCVERSION_ALL is not set
112# CONFIG_KMOD is not set 101# CONFIG_KMOD is not set
113
114#
115# Block layer
116#
117CONFIG_BLOCK=y 102CONFIG_BLOCK=y
118# CONFIG_LBD is not set 103# CONFIG_LBD is not set
119# CONFIG_BLK_DEV_IO_TRACE is not set 104# CONFIG_BLK_DEV_IO_TRACE is not set
120# CONFIG_LSF is not set 105# CONFIG_LSF is not set
106# CONFIG_BLK_DEV_BSG is not set
121 107
122# 108#
123# IO Schedulers 109# IO Schedulers
@@ -135,6 +121,11 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
135# 121#
136# Platform support 122# Platform support
137# 123#
124# CONFIG_PPC_MULTIPLATFORM is not set
125# CONFIG_EMBEDDED6xx is not set
126# CONFIG_PPC_82xx is not set
127CONFIG_PPC_83xx=y
128# CONFIG_PPC_86xx is not set
138# CONFIG_PPC_MPC52xx is not set 129# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set 130# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set 131# CONFIG_PPC_CELL is not set
@@ -158,6 +149,7 @@ CONFIG_PPC_MPC831x=y
158# CONFIG_GENERIC_IOMAP is not set 149# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set 150# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set 151# CONFIG_CPM2 is not set
152# CONFIG_FSL_ULI1575 is not set
161 153
162# 154#
163# Kernel options 155# Kernel options
@@ -186,6 +178,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
186CONFIG_SPLIT_PTLOCK_CPUS=4 178CONFIG_SPLIT_PTLOCK_CPUS=4
187# CONFIG_RESOURCES_64BIT is not set 179# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1 180CONFIG_ZONE_DMA_FLAG=1
181CONFIG_BOUNCE=y
182CONFIG_VIRT_TO_BUS=y
189CONFIG_PROC_DEVICETREE=y 183CONFIG_PROC_DEVICETREE=y
190# CONFIG_CMDLINE_BOOL is not set 184# CONFIG_CMDLINE_BOOL is not set
191# CONFIG_PM is not set 185# CONFIG_PM is not set
@@ -200,10 +194,10 @@ CONFIG_ISA_DMA_API=y
200CONFIG_ZONE_DMA=y 194CONFIG_ZONE_DMA=y
201CONFIG_GENERIC_ISA_DMA=y 195CONFIG_GENERIC_ISA_DMA=y
202CONFIG_PPC_INDIRECT_PCI=y 196CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PPC_INDIRECT_PCI_BE is not set
204CONFIG_FSL_SOC=y 197CONFIG_FSL_SOC=y
205CONFIG_PCI=y 198CONFIG_PCI=y
206CONFIG_PCI_DOMAINS=y 199CONFIG_PCI_DOMAINS=y
200CONFIG_PCI_SYSCALL=y
207# CONFIG_PCIEPORTBUS is not set 201# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y 202CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set 203# CONFIG_PCI_MSI is not set
@@ -314,6 +308,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
314# CONFIG_MAC80211 is not set 308# CONFIG_MAC80211 is not set
315# CONFIG_IEEE80211 is not set 309# CONFIG_IEEE80211 is not set
316# CONFIG_RFKILL is not set 310# CONFIG_RFKILL is not set
311# CONFIG_NET_9P is not set
317 312
318# 313#
319# Device Drivers 314# Device Drivers
@@ -328,10 +323,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
328# CONFIG_DEBUG_DRIVER is not set 323# CONFIG_DEBUG_DRIVER is not set
329# CONFIG_DEBUG_DEVRES is not set 324# CONFIG_DEBUG_DEVRES is not set
330# CONFIG_SYS_HYPERVISOR is not set 325# CONFIG_SYS_HYPERVISOR is not set
331
332#
333# Connector - unified userspace <-> kernelspace linker
334#
335# CONFIG_CONNECTOR is not set 326# CONFIG_CONNECTOR is not set
336CONFIG_MTD=y 327CONFIG_MTD=y
337# CONFIG_MTD_DEBUG is not set 328# CONFIG_MTD_DEBUG is not set
@@ -411,20 +402,9 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
411# UBI - Unsorted block images 402# UBI - Unsorted block images
412# 403#
413# CONFIG_MTD_UBI is not set 404# CONFIG_MTD_UBI is not set
414 405CONFIG_OF_DEVICE=y
415#
416# Parallel port support
417#
418# CONFIG_PARPORT is not set 406# CONFIG_PARPORT is not set
419 407CONFIG_BLK_DEV=y
420#
421# Plug and Play support
422#
423# CONFIG_PNPACPI is not set
424
425#
426# Block devices
427#
428# CONFIG_BLK_DEV_FD is not set 408# CONFIG_BLK_DEV_FD is not set
429# CONFIG_BLK_CPQ_DA is not set 409# CONFIG_BLK_CPQ_DA is not set
430# CONFIG_BLK_CPQ_CISS_DA is not set 410# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -442,14 +422,11 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
442CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 422CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
443# CONFIG_CDROM_PKTCDVD is not set 423# CONFIG_CDROM_PKTCDVD is not set
444# CONFIG_ATA_OVER_ETH is not set 424# CONFIG_ATA_OVER_ETH is not set
445 425CONFIG_MISC_DEVICES=y
446#
447# Misc devices
448#
449# CONFIG_PHANTOM is not set 426# CONFIG_PHANTOM is not set
427# CONFIG_EEPROM_93CX6 is not set
450# CONFIG_SGI_IOC4 is not set 428# CONFIG_SGI_IOC4 is not set
451# CONFIG_TIFM_CORE is not set 429# CONFIG_TIFM_CORE is not set
452# CONFIG_BLINK is not set
453# CONFIG_IDE is not set 430# CONFIG_IDE is not set
454 431
455# 432#
@@ -457,6 +434,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
457# 434#
458# CONFIG_RAID_ATTRS is not set 435# CONFIG_RAID_ATTRS is not set
459CONFIG_SCSI=y 436CONFIG_SCSI=y
437CONFIG_SCSI_DMA=y
460# CONFIG_SCSI_TGT is not set 438# CONFIG_SCSI_TGT is not set
461# CONFIG_SCSI_NETLINK is not set 439# CONFIG_SCSI_NETLINK is not set
462CONFIG_SCSI_PROC_FS=y 440CONFIG_SCSI_PROC_FS=y
@@ -486,12 +464,8 @@ CONFIG_SCSI_WAIT_SCAN=m
486CONFIG_SCSI_SPI_ATTRS=y 464CONFIG_SCSI_SPI_ATTRS=y
487# CONFIG_SCSI_FC_ATTRS is not set 465# CONFIG_SCSI_FC_ATTRS is not set
488# CONFIG_SCSI_ISCSI_ATTRS is not set 466# CONFIG_SCSI_ISCSI_ATTRS is not set
489# CONFIG_SCSI_SAS_ATTRS is not set
490# CONFIG_SCSI_SAS_LIBSAS is not set 467# CONFIG_SCSI_SAS_LIBSAS is not set
491 468CONFIG_SCSI_LOWLEVEL=y
492#
493# SCSI low-level drivers
494#
495# CONFIG_ISCSI_TCP is not set 469# CONFIG_ISCSI_TCP is not set
496# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 470# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
497# CONFIG_SCSI_3W_9XXX is not set 471# CONFIG_SCSI_3W_9XXX is not set
@@ -527,10 +501,6 @@ CONFIG_SCSI_SPI_ATTRS=y
527# CONFIG_SCSI_DEBUG is not set 501# CONFIG_SCSI_DEBUG is not set
528# CONFIG_SCSI_SRP is not set 502# CONFIG_SCSI_SRP is not set
529# CONFIG_ATA is not set 503# CONFIG_ATA is not set
530
531#
532# Multi-device support (RAID and LVM)
533#
534CONFIG_MD=y 504CONFIG_MD=y
535CONFIG_BLK_DEV_MD=y 505CONFIG_BLK_DEV_MD=y
536CONFIG_MD_LINEAR=y 506CONFIG_MD_LINEAR=y
@@ -555,19 +525,13 @@ CONFIG_MD_RAID1=y
555# 525#
556# CONFIG_FIREWIRE is not set 526# CONFIG_FIREWIRE is not set
557# CONFIG_IEEE1394 is not set 527# CONFIG_IEEE1394 is not set
558
559#
560# I2O device support
561#
562# CONFIG_I2O is not set 528# CONFIG_I2O is not set
563# CONFIG_MACINTOSH_DRIVERS is not set 529# CONFIG_MACINTOSH_DRIVERS is not set
564
565#
566# Network device support
567#
568CONFIG_NETDEVICES=y 530CONFIG_NETDEVICES=y
531# CONFIG_NETDEVICES_MULTIQUEUE is not set
569# CONFIG_DUMMY is not set 532# CONFIG_DUMMY is not set
570# CONFIG_BONDING is not set 533# CONFIG_BONDING is not set
534# CONFIG_MACVLAN is not set
571# CONFIG_EQUALIZER is not set 535# CONFIG_EQUALIZER is not set
572# CONFIG_TUN is not set 536# CONFIG_TUN is not set
573# CONFIG_ARCNET is not set 537# CONFIG_ARCNET is not set
@@ -584,21 +548,14 @@ CONFIG_CICADA_PHY=y
584# CONFIG_VITESSE_PHY is not set 548# CONFIG_VITESSE_PHY is not set
585# CONFIG_SMSC_PHY is not set 549# CONFIG_SMSC_PHY is not set
586# CONFIG_BROADCOM_PHY is not set 550# CONFIG_BROADCOM_PHY is not set
551# CONFIG_ICPLUS_PHY is not set
587# CONFIG_FIXED_PHY is not set 552# CONFIG_FIXED_PHY is not set
588
589#
590# Ethernet (10 or 100Mbit)
591#
592CONFIG_NET_ETHERNET=y 553CONFIG_NET_ETHERNET=y
593CONFIG_MII=y 554CONFIG_MII=y
594# CONFIG_HAPPYMEAL is not set 555# CONFIG_HAPPYMEAL is not set
595# CONFIG_SUNGEM is not set 556# CONFIG_SUNGEM is not set
596# CONFIG_CASSINI is not set 557# CONFIG_CASSINI is not set
597# CONFIG_NET_VENDOR_3COM is not set 558# CONFIG_NET_VENDOR_3COM is not set
598
599#
600# Tulip family network device support
601#
602# CONFIG_NET_TULIP is not set 559# CONFIG_NET_TULIP is not set
603# CONFIG_HP100 is not set 560# CONFIG_HP100 is not set
604CONFIG_NET_PCI=y 561CONFIG_NET_PCI=y
@@ -632,7 +589,6 @@ CONFIG_NETDEV_1000=y
632# CONFIG_SIS190 is not set 589# CONFIG_SIS190 is not set
633# CONFIG_SKGE is not set 590# CONFIG_SKGE is not set
634# CONFIG_SKY2 is not set 591# CONFIG_SKY2 is not set
635# CONFIG_SK98LIN is not set
636# CONFIG_VIA_VELOCITY is not set 592# CONFIG_VIA_VELOCITY is not set
637# CONFIG_TIGON3 is not set 593# CONFIG_TIGON3 is not set
638# CONFIG_BNX2 is not set 594# CONFIG_BNX2 is not set
@@ -675,15 +631,7 @@ CONFIG_NETDEV_10000=y
675# CONFIG_NETCONSOLE is not set 631# CONFIG_NETCONSOLE is not set
676# CONFIG_NETPOLL is not set 632# CONFIG_NETPOLL is not set
677# CONFIG_NET_POLL_CONTROLLER is not set 633# CONFIG_NET_POLL_CONTROLLER is not set
678
679#
680# ISDN subsystem
681#
682# CONFIG_ISDN is not set 634# CONFIG_ISDN is not set
683
684#
685# Telephony Support
686#
687# CONFIG_PHONE is not set 635# CONFIG_PHONE is not set
688 636
689# 637#
@@ -745,10 +693,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
745CONFIG_UNIX98_PTYS=y 693CONFIG_UNIX98_PTYS=y
746CONFIG_LEGACY_PTYS=y 694CONFIG_LEGACY_PTYS=y
747CONFIG_LEGACY_PTY_COUNT=256 695CONFIG_LEGACY_PTY_COUNT=256
748
749#
750# IPMI
751#
752# CONFIG_IPMI_HANDLER is not set 696# CONFIG_IPMI_HANDLER is not set
753CONFIG_WATCHDOG=y 697CONFIG_WATCHDOG=y
754# CONFIG_WATCHDOG_NOWAYOUT is not set 698# CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -777,10 +721,6 @@ CONFIG_HW_RANDOM=y
777# CONFIG_AGP is not set 721# CONFIG_AGP is not set
778# CONFIG_DRM is not set 722# CONFIG_DRM is not set
779# CONFIG_RAW_DRIVER is not set 723# CONFIG_RAW_DRIVER is not set
780
781#
782# TPM devices
783#
784# CONFIG_TCG_TPM is not set 724# CONFIG_TCG_TPM is not set
785CONFIG_DEVPORT=y 725CONFIG_DEVPORT=y
786CONFIG_I2C=y 726CONFIG_I2C=y
@@ -815,6 +755,7 @@ CONFIG_I2C_MPC=y
815# CONFIG_I2C_SIS5595 is not set 755# CONFIG_I2C_SIS5595 is not set
816# CONFIG_I2C_SIS630 is not set 756# CONFIG_I2C_SIS630 is not set
817# CONFIG_I2C_SIS96X is not set 757# CONFIG_I2C_SIS96X is not set
758# CONFIG_I2C_TAOS_EVM is not set
818# CONFIG_I2C_STUB is not set 759# CONFIG_I2C_STUB is not set
819# CONFIG_I2C_TINY_USB is not set 760# CONFIG_I2C_TINY_USB is not set
820# CONFIG_I2C_VIA is not set 761# CONFIG_I2C_VIA is not set
@@ -826,12 +767,14 @@ CONFIG_I2C_MPC=y
826# 767#
827# CONFIG_SENSORS_DS1337 is not set 768# CONFIG_SENSORS_DS1337 is not set
828# CONFIG_SENSORS_DS1374 is not set 769# CONFIG_SENSORS_DS1374 is not set
770# CONFIG_DS1682 is not set
829# CONFIG_SENSORS_EEPROM is not set 771# CONFIG_SENSORS_EEPROM is not set
830# CONFIG_SENSORS_PCF8574 is not set 772# CONFIG_SENSORS_PCF8574 is not set
831# CONFIG_SENSORS_PCA9539 is not set 773# CONFIG_SENSORS_PCA9539 is not set
832# CONFIG_SENSORS_PCF8591 is not set 774# CONFIG_SENSORS_PCF8591 is not set
833# CONFIG_SENSORS_M41T00 is not set 775# CONFIG_SENSORS_M41T00 is not set
834# CONFIG_SENSORS_MAX6875 is not set 776# CONFIG_SENSORS_MAX6875 is not set
777# CONFIG_SENSORS_TSL2550 is not set
835# CONFIG_I2C_DEBUG_CORE is not set 778# CONFIG_I2C_DEBUG_CORE is not set
836# CONFIG_I2C_DEBUG_ALGO is not set 779# CONFIG_I2C_DEBUG_ALGO is not set
837# CONFIG_I2C_DEBUG_BUS is not set 780# CONFIG_I2C_DEBUG_BUS is not set
@@ -855,14 +798,13 @@ CONFIG_SPI_MPC83xx=y
855# 798#
856# CONFIG_SPI_AT25 is not set 799# CONFIG_SPI_AT25 is not set
857# CONFIG_SPI_SPIDEV is not set 800# CONFIG_SPI_SPIDEV is not set
858 801# CONFIG_SPI_TLE62X0 is not set
859#
860# Dallas's 1-wire bus
861#
862# CONFIG_W1 is not set 802# CONFIG_W1 is not set
803# CONFIG_POWER_SUPPLY is not set
863CONFIG_HWMON=y 804CONFIG_HWMON=y
864# CONFIG_HWMON_VID is not set 805# CONFIG_HWMON_VID is not set
865# CONFIG_SENSORS_ABITUGURU is not set 806# CONFIG_SENSORS_ABITUGURU is not set
807# CONFIG_SENSORS_ABITUGURU3 is not set
866# CONFIG_SENSORS_AD7418 is not set 808# CONFIG_SENSORS_AD7418 is not set
867# CONFIG_SENSORS_ADM1021 is not set 809# CONFIG_SENSORS_ADM1021 is not set
868# CONFIG_SENSORS_ADM1025 is not set 810# CONFIG_SENSORS_ADM1025 is not set
@@ -890,14 +832,17 @@ CONFIG_HWMON=y
890# CONFIG_SENSORS_LM87 is not set 832# CONFIG_SENSORS_LM87 is not set
891# CONFIG_SENSORS_LM90 is not set 833# CONFIG_SENSORS_LM90 is not set
892# CONFIG_SENSORS_LM92 is not set 834# CONFIG_SENSORS_LM92 is not set
835# CONFIG_SENSORS_LM93 is not set
893# CONFIG_SENSORS_MAX1619 is not set 836# CONFIG_SENSORS_MAX1619 is not set
894# CONFIG_SENSORS_MAX6650 is not set 837# CONFIG_SENSORS_MAX6650 is not set
895# CONFIG_SENSORS_PC87360 is not set 838# CONFIG_SENSORS_PC87360 is not set
896# CONFIG_SENSORS_PC87427 is not set 839# CONFIG_SENSORS_PC87427 is not set
897# CONFIG_SENSORS_SIS5595 is not set 840# CONFIG_SENSORS_SIS5595 is not set
841# CONFIG_SENSORS_DME1737 is not set
898# CONFIG_SENSORS_SMSC47M1 is not set 842# CONFIG_SENSORS_SMSC47M1 is not set
899# CONFIG_SENSORS_SMSC47M192 is not set 843# CONFIG_SENSORS_SMSC47M192 is not set
900# CONFIG_SENSORS_SMSC47B397 is not set 844# CONFIG_SENSORS_SMSC47B397 is not set
845# CONFIG_SENSORS_THMC50 is not set
901# CONFIG_SENSORS_VIA686A is not set 846# CONFIG_SENSORS_VIA686A is not set
902# CONFIG_SENSORS_VT1211 is not set 847# CONFIG_SENSORS_VT1211 is not set
903# CONFIG_SENSORS_VT8231 is not set 848# CONFIG_SENSORS_VT8231 is not set
@@ -933,6 +878,7 @@ CONFIG_DAB=y
933# 878#
934# CONFIG_DISPLAY_SUPPORT is not set 879# CONFIG_DISPLAY_SUPPORT is not set
935# CONFIG_VGASTATE is not set 880# CONFIG_VGASTATE is not set
881CONFIG_VIDEO_OUTPUT_CONTROL=m
936# CONFIG_FB is not set 882# CONFIG_FB is not set
937# CONFIG_FB_IBM_GXT4500 is not set 883# CONFIG_FB_IBM_GXT4500 is not set
938 884
@@ -940,10 +886,7 @@ CONFIG_DAB=y
940# Sound 886# Sound
941# 887#
942# CONFIG_SOUND is not set 888# CONFIG_SOUND is not set
943 889CONFIG_HID_SUPPORT=y
944#
945# HID Devices
946#
947CONFIG_HID=y 890CONFIG_HID=y
948# CONFIG_HID_DEBUG is not set 891# CONFIG_HID_DEBUG is not set
949 892
@@ -957,10 +900,7 @@ CONFIG_HID=y
957# 900#
958# CONFIG_USB_KBD is not set 901# CONFIG_USB_KBD is not set
959# CONFIG_USB_MOUSE is not set 902# CONFIG_USB_MOUSE is not set
960 903CONFIG_USB_SUPPORT=y
961#
962# USB support
963#
964CONFIG_USB_ARCH_HAS_HCD=y 904CONFIG_USB_ARCH_HAS_HCD=y
965CONFIG_USB_ARCH_HAS_OHCI=y 905CONFIG_USB_ARCH_HAS_OHCI=y
966CONFIG_USB_ARCH_HAS_EHCI=y 906CONFIG_USB_ARCH_HAS_EHCI=y
@@ -980,9 +920,9 @@ CONFIG_USB_DEVICE_CLASS=y
980# 920#
981CONFIG_USB_EHCI_HCD=y 921CONFIG_USB_EHCI_HCD=y
982# CONFIG_USB_EHCI_SPLIT_ISO is not set 922# CONFIG_USB_EHCI_SPLIT_ISO is not set
983# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 923CONFIG_USB_EHCI_ROOT_HUB_TT=y
984# CONFIG_USB_EHCI_TT_NEWSCHED is not set 924# CONFIG_USB_EHCI_TT_NEWSCHED is not set
985# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set 925CONFIG_USB_EHCI_FSL=y
986# CONFIG_USB_ISP116X_HCD is not set 926# CONFIG_USB_ISP116X_HCD is not set
987CONFIG_USB_OHCI_HCD=y 927CONFIG_USB_OHCI_HCD=y
988CONFIG_USB_OHCI_HCD_PPC_OF=y 928CONFIG_USB_OHCI_HCD_PPC_OF=y
@@ -994,6 +934,7 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
994CONFIG_USB_OHCI_LITTLE_ENDIAN=y 934CONFIG_USB_OHCI_LITTLE_ENDIAN=y
995CONFIG_USB_UHCI_HCD=y 935CONFIG_USB_UHCI_HCD=y
996# CONFIG_USB_SL811_HCD is not set 936# CONFIG_USB_SL811_HCD is not set
937# CONFIG_USB_R8A66597_HCD is not set
997 938
998# 939#
999# USB Device Class drivers 940# USB Device Class drivers
@@ -1069,15 +1010,19 @@ CONFIG_USB_MON=y
1069# USB Gadget Support 1010# USB Gadget Support
1070# 1011#
1071CONFIG_USB_GADGET=y 1012CONFIG_USB_GADGET=y
1013# CONFIG_USB_GADGET_DEBUG is not set
1072# CONFIG_USB_GADGET_DEBUG_FILES is not set 1014# CONFIG_USB_GADGET_DEBUG_FILES is not set
1073CONFIG_USB_GADGET_SELECTED=y 1015CONFIG_USB_GADGET_SELECTED=y
1016# CONFIG_USB_GADGET_AMD5536UDC is not set
1074# CONFIG_USB_GADGET_FSL_USB2 is not set 1017# CONFIG_USB_GADGET_FSL_USB2 is not set
1075CONFIG_USB_GADGET_NET2280=y 1018CONFIG_USB_GADGET_NET2280=y
1076CONFIG_USB_NET2280=y 1019CONFIG_USB_NET2280=y
1077# CONFIG_USB_GADGET_PXA2XX is not set 1020# CONFIG_USB_GADGET_PXA2XX is not set
1021# CONFIG_USB_GADGET_M66592 is not set
1078# CONFIG_USB_GADGET_GOKU is not set 1022# CONFIG_USB_GADGET_GOKU is not set
1079# CONFIG_USB_GADGET_LH7A40X is not set 1023# CONFIG_USB_GADGET_LH7A40X is not set
1080# CONFIG_USB_GADGET_OMAP is not set 1024# CONFIG_USB_GADGET_OMAP is not set
1025# CONFIG_USB_GADGET_S3C2410 is not set
1081# CONFIG_USB_GADGET_AT91 is not set 1026# CONFIG_USB_GADGET_AT91 is not set
1082# CONFIG_USB_GADGET_DUMMY_HCD is not set 1027# CONFIG_USB_GADGET_DUMMY_HCD is not set
1083CONFIG_USB_GADGET_DUALSPEED=y 1028CONFIG_USB_GADGET_DUALSPEED=y
@@ -1089,32 +1034,9 @@ CONFIG_USB_ETH_RNDIS=y
1089# CONFIG_USB_G_SERIAL is not set 1034# CONFIG_USB_G_SERIAL is not set
1090# CONFIG_USB_MIDI_GADGET is not set 1035# CONFIG_USB_MIDI_GADGET is not set
1091# CONFIG_MMC is not set 1036# CONFIG_MMC is not set
1092
1093#
1094# LED devices
1095#
1096# CONFIG_NEW_LEDS is not set 1037# CONFIG_NEW_LEDS is not set
1097
1098#
1099# LED drivers
1100#
1101
1102#
1103# LED Triggers
1104#
1105
1106#
1107# InfiniBand support
1108#
1109# CONFIG_INFINIBAND is not set 1038# CONFIG_INFINIBAND is not set
1110 1039# CONFIG_EDAC is not set
1111#
1112# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1113#
1114
1115#
1116# Real Time Clock
1117#
1118CONFIG_RTC_LIB=y 1040CONFIG_RTC_LIB=y
1119CONFIG_RTC_CLASS=y 1041CONFIG_RTC_CLASS=y
1120CONFIG_RTC_HCTOSYS=y 1042CONFIG_RTC_HCTOSYS=y
@@ -1141,6 +1063,7 @@ CONFIG_RTC_DRV_DS1307=y
1141# CONFIG_RTC_DRV_X1205 is not set 1063# CONFIG_RTC_DRV_X1205 is not set
1142# CONFIG_RTC_DRV_PCF8563 is not set 1064# CONFIG_RTC_DRV_PCF8563 is not set
1143# CONFIG_RTC_DRV_PCF8583 is not set 1065# CONFIG_RTC_DRV_PCF8583 is not set
1066# CONFIG_RTC_DRV_M41T80 is not set
1144 1067
1145# 1068#
1146# SPI RTC drivers 1069# SPI RTC drivers
@@ -1151,9 +1074,12 @@ CONFIG_RTC_DRV_DS1307=y
1151# 1074#
1152# Platform RTC drivers 1075# Platform RTC drivers
1153# 1076#
1077# CONFIG_RTC_DRV_CMOS is not set
1154# CONFIG_RTC_DRV_DS1553 is not set 1078# CONFIG_RTC_DRV_DS1553 is not set
1079# CONFIG_RTC_DRV_STK17TA8 is not set
1155# CONFIG_RTC_DRV_DS1742 is not set 1080# CONFIG_RTC_DRV_DS1742 is not set
1156# CONFIG_RTC_DRV_M48T86 is not set 1081# CONFIG_RTC_DRV_M48T86 is not set
1082# CONFIG_RTC_DRV_M48T59 is not set
1157# CONFIG_RTC_DRV_V3020 is not set 1083# CONFIG_RTC_DRV_V3020 is not set
1158 1084
1159# 1085#
@@ -1176,6 +1102,11 @@ CONFIG_NET_DMA=y
1176CONFIG_INTEL_IOATDMA=y 1102CONFIG_INTEL_IOATDMA=y
1177 1103
1178# 1104#
1105# Userspace I/O
1106#
1107# CONFIG_UIO is not set
1108
1109#
1179# File systems 1110# File systems
1180# 1111#
1181CONFIG_EXT2_FS=y 1112CONFIG_EXT2_FS=y
@@ -1272,7 +1203,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
1272# CONFIG_NCP_FS is not set 1203# CONFIG_NCP_FS is not set
1273# CONFIG_CODA_FS is not set 1204# CONFIG_CODA_FS is not set
1274# CONFIG_AFS_FS is not set 1205# CONFIG_AFS_FS is not set
1275# CONFIG_9P_FS is not set
1276 1206
1277# 1207#
1278# Partition Types 1208# Partition Types
@@ -1315,6 +1245,7 @@ CONFIG_BITREVERSE=y
1315# CONFIG_CRC16 is not set 1245# CONFIG_CRC16 is not set
1316# CONFIG_CRC_ITU_T is not set 1246# CONFIG_CRC_ITU_T is not set
1317CONFIG_CRC32=y 1247CONFIG_CRC32=y
1248# CONFIG_CRC7 is not set
1318# CONFIG_LIBCRC32C is not set 1249# CONFIG_LIBCRC32C is not set
1319CONFIG_PLIST=y 1250CONFIG_PLIST=y
1320CONFIG_HAS_IOMEM=y 1251CONFIG_HAS_IOMEM=y
@@ -1338,6 +1269,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1338CONFIG_DEBUG_KERNEL=y 1269CONFIG_DEBUG_KERNEL=y
1339# CONFIG_DEBUG_SHIRQ is not set 1270# CONFIG_DEBUG_SHIRQ is not set
1340CONFIG_DETECT_SOFTLOCKUP=y 1271CONFIG_DETECT_SOFTLOCKUP=y
1272CONFIG_SCHED_DEBUG=y
1341# CONFIG_SCHEDSTATS is not set 1273# CONFIG_SCHEDSTATS is not set
1342# CONFIG_TIMER_STATS is not set 1274# CONFIG_TIMER_STATS is not set
1343# CONFIG_DEBUG_SLAB is not set 1275# CONFIG_DEBUG_SLAB is not set
@@ -1360,7 +1292,6 @@ CONFIG_FORCED_INLINING=y
1360# CONFIG_DEBUG_PAGEALLOC is not set 1292# CONFIG_DEBUG_PAGEALLOC is not set
1361# CONFIG_DEBUGGER is not set 1293# CONFIG_DEBUGGER is not set
1362# CONFIG_BDI_SWITCH is not set 1294# CONFIG_BDI_SWITCH is not set
1363# CONFIG_BOOTX_TEXT is not set
1364# CONFIG_PPC_EARLY_DEBUG is not set 1295# CONFIG_PPC_EARLY_DEBUG is not set
1365 1296
1366# 1297#
@@ -1368,10 +1299,6 @@ CONFIG_FORCED_INLINING=y
1368# 1299#
1369# CONFIG_KEYS is not set 1300# CONFIG_KEYS is not set
1370# CONFIG_SECURITY is not set 1301# CONFIG_SECURITY is not set
1371
1372#
1373# Cryptographic options
1374#
1375CONFIG_CRYPTO=y 1302CONFIG_CRYPTO=y
1376CONFIG_CRYPTO_ALGAPI=y 1303CONFIG_CRYPTO_ALGAPI=y
1377CONFIG_CRYPTO_BLKCIPHER=y 1304CONFIG_CRYPTO_BLKCIPHER=y
@@ -1409,7 +1336,4 @@ CONFIG_CRYPTO_DES=y
1409# CONFIG_CRYPTO_CRC32C is not set 1336# CONFIG_CRYPTO_CRC32C is not set
1410# CONFIG_CRYPTO_CAMELLIA is not set 1337# CONFIG_CRYPTO_CAMELLIA is not set
1411# CONFIG_CRYPTO_TEST is not set 1338# CONFIG_CRYPTO_TEST is not set
1412 1339CONFIG_CRYPTO_HW=y
1413#
1414# Hardware crypto devices
1415#
diff --git a/arch/powerpc/configs/mpc832x_mds_defconfig b/arch/powerpc/configs/mpc832x_mds_defconfig
index 75ce78139a..fc6695302c 100644
--- a/arch/powerpc/configs/mpc832x_mds_defconfig
+++ b/arch/powerpc/configs/mpc832x_mds_defconfig
@@ -1,9 +1,25 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:56:55 2007 4# Tue Aug 28 21:24:40 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_83xx=y
18CONFIG_PPC_FPU=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
7CONFIG_PPC32=y 23CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 24CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 25CONFIG_MMU=y
@@ -14,61 +30,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 30CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 31CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 32CONFIG_GENERIC_FIND_NEXT_BIT=y
33# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 34CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 35CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 36CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 41CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 45CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49# CONFIG_SMP is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 49
52# 50#
53# Code maturity level options 51# General setup
54# 52#
55CONFIG_EXPERIMENTAL=y 53CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 54CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 55CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 56CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 57CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 58CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 59CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 60CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 63# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 64# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 67CONFIG_LOG_BUF_SHIFT=14
@@ -100,24 +93,17 @@ CONFIG_SLAB=y
100CONFIG_RT_MUTEXES=y 93CONFIG_RT_MUTEXES=y
101# CONFIG_TINY_SHMEM is not set 94# CONFIG_TINY_SHMEM is not set
102CONFIG_BASE_SMALL=0 95CONFIG_BASE_SMALL=0
103
104#
105# Loadable module support
106#
107CONFIG_MODULES=y 96CONFIG_MODULES=y
108CONFIG_MODULE_UNLOAD=y 97CONFIG_MODULE_UNLOAD=y
109# CONFIG_MODULE_FORCE_UNLOAD is not set 98# CONFIG_MODULE_FORCE_UNLOAD is not set
110# CONFIG_MODVERSIONS is not set 99# CONFIG_MODVERSIONS is not set
111# CONFIG_MODULE_SRCVERSION_ALL is not set 100# CONFIG_MODULE_SRCVERSION_ALL is not set
112# CONFIG_KMOD is not set 101# CONFIG_KMOD is not set
113
114#
115# Block layer
116#
117CONFIG_BLOCK=y 102CONFIG_BLOCK=y
118# CONFIG_LBD is not set 103# CONFIG_LBD is not set
119# CONFIG_BLK_DEV_IO_TRACE is not set 104# CONFIG_BLK_DEV_IO_TRACE is not set
120# CONFIG_LSF is not set 105# CONFIG_LSF is not set
106# CONFIG_BLK_DEV_BSG is not set
121 107
122# 108#
123# IO Schedulers 109# IO Schedulers
@@ -135,6 +121,11 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
135# 121#
136# Platform support 122# Platform support
137# 123#
124# CONFIG_PPC_MULTIPLATFORM is not set
125# CONFIG_EMBEDDED6xx is not set
126# CONFIG_PPC_82xx is not set
127CONFIG_PPC_83xx=y
128# CONFIG_PPC_86xx is not set
138# CONFIG_PPC_MPC52xx is not set 129# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set 130# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set 131# CONFIG_PPC_CELL is not set
@@ -159,6 +150,7 @@ CONFIG_PPC_MPC832x=y
159# CONFIG_CPU_FREQ is not set 150# CONFIG_CPU_FREQ is not set
160CONFIG_QUICC_ENGINE=y 151CONFIG_QUICC_ENGINE=y
161# CONFIG_CPM2 is not set 152# CONFIG_CPM2 is not set
153# CONFIG_FSL_ULI1575 is not set
162 154
163# 155#
164# Kernel options 156# Kernel options
@@ -188,6 +180,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
188CONFIG_SPLIT_PTLOCK_CPUS=4 180CONFIG_SPLIT_PTLOCK_CPUS=4
189# CONFIG_RESOURCES_64BIT is not set 181# CONFIG_RESOURCES_64BIT is not set
190CONFIG_ZONE_DMA_FLAG=1 182CONFIG_ZONE_DMA_FLAG=1
183CONFIG_BOUNCE=y
184CONFIG_VIRT_TO_BUS=y
191CONFIG_PROC_DEVICETREE=y 185CONFIG_PROC_DEVICETREE=y
192# CONFIG_CMDLINE_BOOL is not set 186# CONFIG_CMDLINE_BOOL is not set
193# CONFIG_PM is not set 187# CONFIG_PM is not set
@@ -202,10 +196,10 @@ CONFIG_ISA_DMA_API=y
202CONFIG_ZONE_DMA=y 196CONFIG_ZONE_DMA=y
203CONFIG_GENERIC_ISA_DMA=y 197CONFIG_GENERIC_ISA_DMA=y
204CONFIG_PPC_INDIRECT_PCI=y 198CONFIG_PPC_INDIRECT_PCI=y
205# CONFIG_PPC_INDIRECT_PCI_BE is not set
206CONFIG_FSL_SOC=y 199CONFIG_FSL_SOC=y
207CONFIG_PCI=y 200CONFIG_PCI=y
208CONFIG_PCI_DOMAINS=y 201CONFIG_PCI_DOMAINS=y
202CONFIG_PCI_SYSCALL=y
209# CONFIG_PCIEPORTBUS is not set 203# CONFIG_PCIEPORTBUS is not set
210CONFIG_ARCH_SUPPORTS_MSI=y 204CONFIG_ARCH_SUPPORTS_MSI=y
211# CONFIG_PCI_MSI is not set 205# CONFIG_PCI_MSI is not set
@@ -315,6 +309,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
315# CONFIG_MAC80211 is not set 309# CONFIG_MAC80211 is not set
316# CONFIG_IEEE80211 is not set 310# CONFIG_IEEE80211 is not set
317# CONFIG_RFKILL is not set 311# CONFIG_RFKILL is not set
312# CONFIG_NET_9P is not set
318 313
319# 314#
320# Device Drivers 315# Device Drivers
@@ -327,26 +322,11 @@ CONFIG_STANDALONE=y
327CONFIG_PREVENT_FIRMWARE_BUILD=y 322CONFIG_PREVENT_FIRMWARE_BUILD=y
328# CONFIG_FW_LOADER is not set 323# CONFIG_FW_LOADER is not set
329# CONFIG_SYS_HYPERVISOR is not set 324# CONFIG_SYS_HYPERVISOR is not set
330
331#
332# Connector - unified userspace <-> kernelspace linker
333#
334# CONFIG_CONNECTOR is not set 325# CONFIG_CONNECTOR is not set
335# CONFIG_MTD is not set 326# CONFIG_MTD is not set
336 327CONFIG_OF_DEVICE=y
337#
338# Parallel port support
339#
340# CONFIG_PARPORT is not set 328# CONFIG_PARPORT is not set
341 329CONFIG_BLK_DEV=y
342#
343# Plug and Play support
344#
345# CONFIG_PNPACPI is not set
346
347#
348# Block devices
349#
350# CONFIG_BLK_DEV_FD is not set 330# CONFIG_BLK_DEV_FD is not set
351# CONFIG_BLK_CPQ_DA is not set 331# CONFIG_BLK_CPQ_DA is not set
352# CONFIG_BLK_CPQ_CISS_DA is not set 332# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -363,14 +343,11 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
363CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 343CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
364# CONFIG_CDROM_PKTCDVD is not set 344# CONFIG_CDROM_PKTCDVD is not set
365# CONFIG_ATA_OVER_ETH is not set 345# CONFIG_ATA_OVER_ETH is not set
366 346CONFIG_MISC_DEVICES=y
367#
368# Misc devices
369#
370# CONFIG_PHANTOM is not set 347# CONFIG_PHANTOM is not set
348# CONFIG_EEPROM_93CX6 is not set
371# CONFIG_SGI_IOC4 is not set 349# CONFIG_SGI_IOC4 is not set
372# CONFIG_TIFM_CORE is not set 350# CONFIG_TIFM_CORE is not set
373# CONFIG_BLINK is not set
374# CONFIG_IDE is not set 351# CONFIG_IDE is not set
375 352
376# 353#
@@ -378,6 +355,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
378# 355#
379# CONFIG_RAID_ATTRS is not set 356# CONFIG_RAID_ATTRS is not set
380CONFIG_SCSI=y 357CONFIG_SCSI=y
358CONFIG_SCSI_DMA=y
381# CONFIG_SCSI_TGT is not set 359# CONFIG_SCSI_TGT is not set
382# CONFIG_SCSI_NETLINK is not set 360# CONFIG_SCSI_NETLINK is not set
383CONFIG_SCSI_PROC_FS=y 361CONFIG_SCSI_PROC_FS=y
@@ -407,12 +385,8 @@ CONFIG_SCSI_WAIT_SCAN=m
407# CONFIG_SCSI_SPI_ATTRS is not set 385# CONFIG_SCSI_SPI_ATTRS is not set
408# CONFIG_SCSI_FC_ATTRS is not set 386# CONFIG_SCSI_FC_ATTRS is not set
409# CONFIG_SCSI_ISCSI_ATTRS is not set 387# CONFIG_SCSI_ISCSI_ATTRS is not set
410# CONFIG_SCSI_SAS_ATTRS is not set
411# CONFIG_SCSI_SAS_LIBSAS is not set 388# CONFIG_SCSI_SAS_LIBSAS is not set
412 389CONFIG_SCSI_LOWLEVEL=y
413#
414# SCSI low-level drivers
415#
416# CONFIG_ISCSI_TCP is not set 390# CONFIG_ISCSI_TCP is not set
417# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 391# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
418# CONFIG_SCSI_3W_9XXX is not set 392# CONFIG_SCSI_3W_9XXX is not set
@@ -448,10 +422,6 @@ CONFIG_SCSI_WAIT_SCAN=m
448# CONFIG_SCSI_DEBUG is not set 422# CONFIG_SCSI_DEBUG is not set
449# CONFIG_SCSI_SRP is not set 423# CONFIG_SCSI_SRP is not set
450# CONFIG_ATA is not set 424# CONFIG_ATA is not set
451
452#
453# Multi-device support (RAID and LVM)
454#
455# CONFIG_MD is not set 425# CONFIG_MD is not set
456 426
457# 427#
@@ -467,19 +437,13 @@ CONFIG_SCSI_WAIT_SCAN=m
467# 437#
468# CONFIG_FIREWIRE is not set 438# CONFIG_FIREWIRE is not set
469# CONFIG_IEEE1394 is not set 439# CONFIG_IEEE1394 is not set
470
471#
472# I2O device support
473#
474# CONFIG_I2O is not set 440# CONFIG_I2O is not set
475# CONFIG_MACINTOSH_DRIVERS is not set 441# CONFIG_MACINTOSH_DRIVERS is not set
476
477#
478# Network device support
479#
480CONFIG_NETDEVICES=y 442CONFIG_NETDEVICES=y
443# CONFIG_NETDEVICES_MULTIQUEUE is not set
481# CONFIG_DUMMY is not set 444# CONFIG_DUMMY is not set
482# CONFIG_BONDING is not set 445# CONFIG_BONDING is not set
446# CONFIG_MACVLAN is not set
483# CONFIG_EQUALIZER is not set 447# CONFIG_EQUALIZER is not set
484# CONFIG_TUN is not set 448# CONFIG_TUN is not set
485# CONFIG_ARCNET is not set 449# CONFIG_ARCNET is not set
@@ -496,21 +460,14 @@ CONFIG_DAVICOM_PHY=y
496# CONFIG_VITESSE_PHY is not set 460# CONFIG_VITESSE_PHY is not set
497# CONFIG_SMSC_PHY is not set 461# CONFIG_SMSC_PHY is not set
498# CONFIG_BROADCOM_PHY is not set 462# CONFIG_BROADCOM_PHY is not set
463# CONFIG_ICPLUS_PHY is not set
499# CONFIG_FIXED_PHY is not set 464# CONFIG_FIXED_PHY is not set
500
501#
502# Ethernet (10 or 100Mbit)
503#
504CONFIG_NET_ETHERNET=y 465CONFIG_NET_ETHERNET=y
505CONFIG_MII=y 466CONFIG_MII=y
506# CONFIG_HAPPYMEAL is not set 467# CONFIG_HAPPYMEAL is not set
507# CONFIG_SUNGEM is not set 468# CONFIG_SUNGEM is not set
508# CONFIG_CASSINI is not set 469# CONFIG_CASSINI is not set
509# CONFIG_NET_VENDOR_3COM is not set 470# CONFIG_NET_VENDOR_3COM is not set
510
511#
512# Tulip family network device support
513#
514# CONFIG_NET_TULIP is not set 471# CONFIG_NET_TULIP is not set
515# CONFIG_HP100 is not set 472# CONFIG_HP100 is not set
516# CONFIG_NET_PCI is not set 473# CONFIG_NET_PCI is not set
@@ -525,7 +482,6 @@ CONFIG_NETDEV_1000=y
525# CONFIG_SIS190 is not set 482# CONFIG_SIS190 is not set
526# CONFIG_SKGE is not set 483# CONFIG_SKGE is not set
527# CONFIG_SKY2 is not set 484# CONFIG_SKY2 is not set
528# CONFIG_SK98LIN is not set
529# CONFIG_VIA_VELOCITY is not set 485# CONFIG_VIA_VELOCITY is not set
530# CONFIG_TIGON3 is not set 486# CONFIG_TIGON3 is not set
531# CONFIG_BNX2 is not set 487# CONFIG_BNX2 is not set
@@ -562,15 +518,7 @@ CONFIG_NETDEV_10000=y
562# CONFIG_NETCONSOLE is not set 518# CONFIG_NETCONSOLE is not set
563# CONFIG_NETPOLL is not set 519# CONFIG_NETPOLL is not set
564# CONFIG_NET_POLL_CONTROLLER is not set 520# CONFIG_NET_POLL_CONTROLLER is not set
565
566#
567# ISDN subsystem
568#
569# CONFIG_ISDN is not set 521# CONFIG_ISDN is not set
570
571#
572# Telephony Support
573#
574# CONFIG_PHONE is not set 522# CONFIG_PHONE is not set
575 523
576# 524#
@@ -632,10 +580,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
632CONFIG_UNIX98_PTYS=y 580CONFIG_UNIX98_PTYS=y
633CONFIG_LEGACY_PTYS=y 581CONFIG_LEGACY_PTYS=y
634CONFIG_LEGACY_PTY_COUNT=256 582CONFIG_LEGACY_PTY_COUNT=256
635
636#
637# IPMI
638#
639# CONFIG_IPMI_HANDLER is not set 583# CONFIG_IPMI_HANDLER is not set
640CONFIG_WATCHDOG=y 584CONFIG_WATCHDOG=y
641# CONFIG_WATCHDOG_NOWAYOUT is not set 585# CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -660,10 +604,6 @@ CONFIG_GEN_RTC=y
660# CONFIG_AGP is not set 604# CONFIG_AGP is not set
661# CONFIG_DRM is not set 605# CONFIG_DRM is not set
662# CONFIG_RAW_DRIVER is not set 606# CONFIG_RAW_DRIVER is not set
663
664#
665# TPM devices
666#
667# CONFIG_TCG_TPM is not set 607# CONFIG_TCG_TPM is not set
668CONFIG_DEVPORT=y 608CONFIG_DEVPORT=y
669CONFIG_I2C=y 609CONFIG_I2C=y
@@ -698,6 +638,7 @@ CONFIG_I2C_MPC=y
698# CONFIG_I2C_SIS5595 is not set 638# CONFIG_I2C_SIS5595 is not set
699# CONFIG_I2C_SIS630 is not set 639# CONFIG_I2C_SIS630 is not set
700# CONFIG_I2C_SIS96X is not set 640# CONFIG_I2C_SIS96X is not set
641# CONFIG_I2C_TAOS_EVM is not set
701# CONFIG_I2C_STUB is not set 642# CONFIG_I2C_STUB is not set
702# CONFIG_I2C_VIA is not set 643# CONFIG_I2C_VIA is not set
703# CONFIG_I2C_VIAPRO is not set 644# CONFIG_I2C_VIAPRO is not set
@@ -708,12 +649,14 @@ CONFIG_I2C_MPC=y
708# 649#
709# CONFIG_SENSORS_DS1337 is not set 650# CONFIG_SENSORS_DS1337 is not set
710# CONFIG_SENSORS_DS1374 is not set 651# CONFIG_SENSORS_DS1374 is not set
652# CONFIG_DS1682 is not set
711# CONFIG_SENSORS_EEPROM is not set 653# CONFIG_SENSORS_EEPROM is not set
712# CONFIG_SENSORS_PCF8574 is not set 654# CONFIG_SENSORS_PCF8574 is not set
713# CONFIG_SENSORS_PCA9539 is not set 655# CONFIG_SENSORS_PCA9539 is not set
714# CONFIG_SENSORS_PCF8591 is not set 656# CONFIG_SENSORS_PCF8591 is not set
715# CONFIG_SENSORS_M41T00 is not set 657# CONFIG_SENSORS_M41T00 is not set
716# CONFIG_SENSORS_MAX6875 is not set 658# CONFIG_SENSORS_MAX6875 is not set
659# CONFIG_SENSORS_TSL2550 is not set
717# CONFIG_I2C_DEBUG_CORE is not set 660# CONFIG_I2C_DEBUG_CORE is not set
718# CONFIG_I2C_DEBUG_ALGO is not set 661# CONFIG_I2C_DEBUG_ALGO is not set
719# CONFIG_I2C_DEBUG_BUS is not set 662# CONFIG_I2C_DEBUG_BUS is not set
@@ -724,14 +667,12 @@ CONFIG_I2C_MPC=y
724# 667#
725# CONFIG_SPI is not set 668# CONFIG_SPI is not set
726# CONFIG_SPI_MASTER is not set 669# CONFIG_SPI_MASTER is not set
727
728#
729# Dallas's 1-wire bus
730#
731# CONFIG_W1 is not set 670# CONFIG_W1 is not set
671# CONFIG_POWER_SUPPLY is not set
732CONFIG_HWMON=y 672CONFIG_HWMON=y
733# CONFIG_HWMON_VID is not set 673# CONFIG_HWMON_VID is not set
734# CONFIG_SENSORS_ABITUGURU is not set 674# CONFIG_SENSORS_ABITUGURU is not set
675# CONFIG_SENSORS_ABITUGURU3 is not set
735# CONFIG_SENSORS_AD7418 is not set 676# CONFIG_SENSORS_AD7418 is not set
736# CONFIG_SENSORS_ADM1021 is not set 677# CONFIG_SENSORS_ADM1021 is not set
737# CONFIG_SENSORS_ADM1025 is not set 678# CONFIG_SENSORS_ADM1025 is not set
@@ -758,14 +699,17 @@ CONFIG_HWMON=y
758# CONFIG_SENSORS_LM87 is not set 699# CONFIG_SENSORS_LM87 is not set
759# CONFIG_SENSORS_LM90 is not set 700# CONFIG_SENSORS_LM90 is not set
760# CONFIG_SENSORS_LM92 is not set 701# CONFIG_SENSORS_LM92 is not set
702# CONFIG_SENSORS_LM93 is not set
761# CONFIG_SENSORS_MAX1619 is not set 703# CONFIG_SENSORS_MAX1619 is not set
762# CONFIG_SENSORS_MAX6650 is not set 704# CONFIG_SENSORS_MAX6650 is not set
763# CONFIG_SENSORS_PC87360 is not set 705# CONFIG_SENSORS_PC87360 is not set
764# CONFIG_SENSORS_PC87427 is not set 706# CONFIG_SENSORS_PC87427 is not set
765# CONFIG_SENSORS_SIS5595 is not set 707# CONFIG_SENSORS_SIS5595 is not set
708# CONFIG_SENSORS_DME1737 is not set
766# CONFIG_SENSORS_SMSC47M1 is not set 709# CONFIG_SENSORS_SMSC47M1 is not set
767# CONFIG_SENSORS_SMSC47M192 is not set 710# CONFIG_SENSORS_SMSC47M192 is not set
768# CONFIG_SENSORS_SMSC47B397 is not set 711# CONFIG_SENSORS_SMSC47B397 is not set
712# CONFIG_SENSORS_THMC50 is not set
769# CONFIG_SENSORS_VIA686A is not set 713# CONFIG_SENSORS_VIA686A is not set
770# CONFIG_SENSORS_VT1211 is not set 714# CONFIG_SENSORS_VT1211 is not set
771# CONFIG_SENSORS_VT8231 is not set 715# CONFIG_SENSORS_VT8231 is not set
@@ -800,6 +744,7 @@ CONFIG_DAB=y
800# 744#
801# CONFIG_DISPLAY_SUPPORT is not set 745# CONFIG_DISPLAY_SUPPORT is not set
802# CONFIG_VGASTATE is not set 746# CONFIG_VGASTATE is not set
747CONFIG_VIDEO_OUTPUT_CONTROL=m
803# CONFIG_FB is not set 748# CONFIG_FB is not set
804# CONFIG_FB_IBM_GXT4500 is not set 749# CONFIG_FB_IBM_GXT4500 is not set
805 750
@@ -807,16 +752,10 @@ CONFIG_DAB=y
807# Sound 752# Sound
808# 753#
809# CONFIG_SOUND is not set 754# CONFIG_SOUND is not set
810 755CONFIG_HID_SUPPORT=y
811#
812# HID Devices
813#
814CONFIG_HID=y 756CONFIG_HID=y
815# CONFIG_HID_DEBUG is not set 757# CONFIG_HID_DEBUG is not set
816 758CONFIG_USB_SUPPORT=y
817#
818# USB support
819#
820CONFIG_USB_ARCH_HAS_HCD=y 759CONFIG_USB_ARCH_HAS_HCD=y
821CONFIG_USB_ARCH_HAS_OHCI=y 760CONFIG_USB_ARCH_HAS_OHCI=y
822CONFIG_USB_ARCH_HAS_EHCI=y 761CONFIG_USB_ARCH_HAS_EHCI=y
@@ -831,32 +770,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
831# 770#
832# CONFIG_USB_GADGET is not set 771# CONFIG_USB_GADGET is not set
833# CONFIG_MMC is not set 772# CONFIG_MMC is not set
834
835#
836# LED devices
837#
838# CONFIG_NEW_LEDS is not set 773# CONFIG_NEW_LEDS is not set
839
840#
841# LED drivers
842#
843
844#
845# LED Triggers
846#
847
848#
849# InfiniBand support
850#
851# CONFIG_INFINIBAND is not set 774# CONFIG_INFINIBAND is not set
852 775# CONFIG_EDAC is not set
853#
854# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
855#
856
857#
858# Real Time Clock
859#
860# CONFIG_RTC_CLASS is not set 776# CONFIG_RTC_CLASS is not set
861 777
862# 778#
@@ -873,6 +789,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
873# 789#
874 790
875# 791#
792# Userspace I/O
793#
794# CONFIG_UIO is not set
795
796#
876# File systems 797# File systems
877# 798#
878CONFIG_EXT2_FS=y 799CONFIG_EXT2_FS=y
@@ -968,7 +889,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
968# CONFIG_NCP_FS is not set 889# CONFIG_NCP_FS is not set
969# CONFIG_CODA_FS is not set 890# CONFIG_CODA_FS is not set
970# CONFIG_AFS_FS is not set 891# CONFIG_AFS_FS is not set
971# CONFIG_9P_FS is not set
972 892
973# 893#
974# Partition Types 894# Partition Types
@@ -1009,6 +929,7 @@ CONFIG_BITREVERSE=y
1009# CONFIG_CRC16 is not set 929# CONFIG_CRC16 is not set
1010# CONFIG_CRC_ITU_T is not set 930# CONFIG_CRC_ITU_T is not set
1011CONFIG_CRC32=y 931CONFIG_CRC32=y
932# CONFIG_CRC7 is not set
1012# CONFIG_LIBCRC32C is not set 933# CONFIG_LIBCRC32C is not set
1013CONFIG_PLIST=y 934CONFIG_PLIST=y
1014CONFIG_HAS_IOMEM=y 935CONFIG_HAS_IOMEM=y
@@ -1031,7 +952,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1031# CONFIG_HEADERS_CHECK is not set 952# CONFIG_HEADERS_CHECK is not set
1032# CONFIG_DEBUG_KERNEL is not set 953# CONFIG_DEBUG_KERNEL is not set
1033# CONFIG_DEBUG_BUGVERBOSE is not set 954# CONFIG_DEBUG_BUGVERBOSE is not set
1034# CONFIG_BOOTX_TEXT is not set
1035# CONFIG_PPC_EARLY_DEBUG is not set 955# CONFIG_PPC_EARLY_DEBUG is not set
1036 956
1037# 957#
@@ -1039,10 +959,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1039# 959#
1040# CONFIG_KEYS is not set 960# CONFIG_KEYS is not set
1041# CONFIG_SECURITY is not set 961# CONFIG_SECURITY is not set
1042
1043#
1044# Cryptographic options
1045#
1046CONFIG_CRYPTO=y 962CONFIG_CRYPTO=y
1047CONFIG_CRYPTO_ALGAPI=y 963CONFIG_CRYPTO_ALGAPI=y
1048CONFIG_CRYPTO_BLKCIPHER=y 964CONFIG_CRYPTO_BLKCIPHER=y
@@ -1080,7 +996,4 @@ CONFIG_CRYPTO_DES=y
1080# CONFIG_CRYPTO_CRC32C is not set 996# CONFIG_CRYPTO_CRC32C is not set
1081# CONFIG_CRYPTO_CAMELLIA is not set 997# CONFIG_CRYPTO_CAMELLIA is not set
1082# CONFIG_CRYPTO_TEST is not set 998# CONFIG_CRYPTO_TEST is not set
1083 999CONFIG_CRYPTO_HW=y
1084#
1085# Hardware crypto devices
1086#
diff --git a/arch/powerpc/configs/mpc832x_rdb_defconfig b/arch/powerpc/configs/mpc832x_rdb_defconfig
index 6a83b66dd9..6d1c3e8420 100644
--- a/arch/powerpc/configs/mpc832x_rdb_defconfig
+++ b/arch/powerpc/configs/mpc832x_rdb_defconfig
@@ -1,9 +1,25 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:56:56 2007 4# Tue Aug 28 21:27:19 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_83xx=y
18CONFIG_PPC_FPU=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
7CONFIG_PPC32=y 23CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 24CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 25CONFIG_MMU=y
@@ -14,61 +30,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 30CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 31CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 32CONFIG_GENERIC_FIND_NEXT_BIT=y
33# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 34CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 35CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 36CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 41CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 45CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49# CONFIG_SMP is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 49
52# 50#
53# Code maturity level options 51# General setup
54# 52#
55CONFIG_EXPERIMENTAL=y 53CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 54CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 55CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 56CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 57CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 58CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 59CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 60CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 63# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 64# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 67CONFIG_LOG_BUF_SHIFT=14
@@ -100,24 +93,17 @@ CONFIG_SLAB=y
100CONFIG_RT_MUTEXES=y 93CONFIG_RT_MUTEXES=y
101# CONFIG_TINY_SHMEM is not set 94# CONFIG_TINY_SHMEM is not set
102CONFIG_BASE_SMALL=0 95CONFIG_BASE_SMALL=0
103
104#
105# Loadable module support
106#
107CONFIG_MODULES=y 96CONFIG_MODULES=y
108CONFIG_MODULE_UNLOAD=y 97CONFIG_MODULE_UNLOAD=y
109# CONFIG_MODULE_FORCE_UNLOAD is not set 98# CONFIG_MODULE_FORCE_UNLOAD is not set
110# CONFIG_MODVERSIONS is not set 99# CONFIG_MODVERSIONS is not set
111# CONFIG_MODULE_SRCVERSION_ALL is not set 100# CONFIG_MODULE_SRCVERSION_ALL is not set
112# CONFIG_KMOD is not set 101# CONFIG_KMOD is not set
113
114#
115# Block layer
116#
117CONFIG_BLOCK=y 102CONFIG_BLOCK=y
118# CONFIG_LBD is not set 103# CONFIG_LBD is not set
119# CONFIG_BLK_DEV_IO_TRACE is not set 104# CONFIG_BLK_DEV_IO_TRACE is not set
120# CONFIG_LSF is not set 105# CONFIG_LSF is not set
106# CONFIG_BLK_DEV_BSG is not set
121 107
122# 108#
123# IO Schedulers 109# IO Schedulers
@@ -135,6 +121,11 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
135# 121#
136# Platform support 122# Platform support
137# 123#
124# CONFIG_PPC_MULTIPLATFORM is not set
125# CONFIG_EMBEDDED6xx is not set
126# CONFIG_PPC_82xx is not set
127CONFIG_PPC_83xx=y
128# CONFIG_PPC_86xx is not set
138# CONFIG_PPC_MPC52xx is not set 129# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set 130# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set 131# CONFIG_PPC_CELL is not set
@@ -159,6 +150,7 @@ CONFIG_PPC_MPC832x=y
159# CONFIG_CPU_FREQ is not set 150# CONFIG_CPU_FREQ is not set
160CONFIG_QUICC_ENGINE=y 151CONFIG_QUICC_ENGINE=y
161# CONFIG_CPM2 is not set 152# CONFIG_CPM2 is not set
153# CONFIG_FSL_ULI1575 is not set
162 154
163# 155#
164# Kernel options 156# Kernel options
@@ -188,6 +180,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
188CONFIG_SPLIT_PTLOCK_CPUS=4 180CONFIG_SPLIT_PTLOCK_CPUS=4
189# CONFIG_RESOURCES_64BIT is not set 181# CONFIG_RESOURCES_64BIT is not set
190CONFIG_ZONE_DMA_FLAG=1 182CONFIG_ZONE_DMA_FLAG=1
183CONFIG_BOUNCE=y
184CONFIG_VIRT_TO_BUS=y
191CONFIG_PROC_DEVICETREE=y 185CONFIG_PROC_DEVICETREE=y
192# CONFIG_CMDLINE_BOOL is not set 186# CONFIG_CMDLINE_BOOL is not set
193# CONFIG_PM is not set 187# CONFIG_PM is not set
@@ -202,10 +196,10 @@ CONFIG_ISA_DMA_API=y
202CONFIG_ZONE_DMA=y 196CONFIG_ZONE_DMA=y
203CONFIG_GENERIC_ISA_DMA=y 197CONFIG_GENERIC_ISA_DMA=y
204CONFIG_PPC_INDIRECT_PCI=y 198CONFIG_PPC_INDIRECT_PCI=y
205# CONFIG_PPC_INDIRECT_PCI_BE is not set
206CONFIG_FSL_SOC=y 199CONFIG_FSL_SOC=y
207CONFIG_PCI=y 200CONFIG_PCI=y
208CONFIG_PCI_DOMAINS=y 201CONFIG_PCI_DOMAINS=y
202CONFIG_PCI_SYSCALL=y
209# CONFIG_PCIEPORTBUS is not set 203# CONFIG_PCIEPORTBUS is not set
210CONFIG_ARCH_SUPPORTS_MSI=y 204CONFIG_ARCH_SUPPORTS_MSI=y
211# CONFIG_PCI_MSI is not set 205# CONFIG_PCI_MSI is not set
@@ -315,6 +309,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
315# CONFIG_MAC80211 is not set 309# CONFIG_MAC80211 is not set
316# CONFIG_IEEE80211 is not set 310# CONFIG_IEEE80211 is not set
317# CONFIG_RFKILL is not set 311# CONFIG_RFKILL is not set
312# CONFIG_NET_9P is not set
318 313
319# 314#
320# Device Drivers 315# Device Drivers
@@ -327,26 +322,11 @@ CONFIG_STANDALONE=y
327CONFIG_PREVENT_FIRMWARE_BUILD=y 322CONFIG_PREVENT_FIRMWARE_BUILD=y
328# CONFIG_FW_LOADER is not set 323# CONFIG_FW_LOADER is not set
329# CONFIG_SYS_HYPERVISOR is not set 324# CONFIG_SYS_HYPERVISOR is not set
330
331#
332# Connector - unified userspace <-> kernelspace linker
333#
334# CONFIG_CONNECTOR is not set 325# CONFIG_CONNECTOR is not set
335# CONFIG_MTD is not set 326# CONFIG_MTD is not set
336 327CONFIG_OF_DEVICE=y
337#
338# Parallel port support
339#
340# CONFIG_PARPORT is not set 328# CONFIG_PARPORT is not set
341 329CONFIG_BLK_DEV=y
342#
343# Plug and Play support
344#
345# CONFIG_PNPACPI is not set
346
347#
348# Block devices
349#
350# CONFIG_BLK_DEV_FD is not set 330# CONFIG_BLK_DEV_FD is not set
351# CONFIG_BLK_CPQ_DA is not set 331# CONFIG_BLK_CPQ_DA is not set
352# CONFIG_BLK_CPQ_CISS_DA is not set 332# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -364,14 +344,11 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
364CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 344CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
365# CONFIG_CDROM_PKTCDVD is not set 345# CONFIG_CDROM_PKTCDVD is not set
366# CONFIG_ATA_OVER_ETH is not set 346# CONFIG_ATA_OVER_ETH is not set
367 347CONFIG_MISC_DEVICES=y
368#
369# Misc devices
370#
371# CONFIG_PHANTOM is not set 348# CONFIG_PHANTOM is not set
349# CONFIG_EEPROM_93CX6 is not set
372# CONFIG_SGI_IOC4 is not set 350# CONFIG_SGI_IOC4 is not set
373# CONFIG_TIFM_CORE is not set 351# CONFIG_TIFM_CORE is not set
374# CONFIG_BLINK is not set
375# CONFIG_IDE is not set 352# CONFIG_IDE is not set
376 353
377# 354#
@@ -379,6 +356,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
379# 356#
380# CONFIG_RAID_ATTRS is not set 357# CONFIG_RAID_ATTRS is not set
381CONFIG_SCSI=y 358CONFIG_SCSI=y
359CONFIG_SCSI_DMA=y
382# CONFIG_SCSI_TGT is not set 360# CONFIG_SCSI_TGT is not set
383# CONFIG_SCSI_NETLINK is not set 361# CONFIG_SCSI_NETLINK is not set
384CONFIG_SCSI_PROC_FS=y 362CONFIG_SCSI_PROC_FS=y
@@ -408,12 +386,8 @@ CONFIG_SCSI_WAIT_SCAN=m
408# CONFIG_SCSI_SPI_ATTRS is not set 386# CONFIG_SCSI_SPI_ATTRS is not set
409# CONFIG_SCSI_FC_ATTRS is not set 387# CONFIG_SCSI_FC_ATTRS is not set
410# CONFIG_SCSI_ISCSI_ATTRS is not set 388# CONFIG_SCSI_ISCSI_ATTRS is not set
411# CONFIG_SCSI_SAS_ATTRS is not set
412# CONFIG_SCSI_SAS_LIBSAS is not set 389# CONFIG_SCSI_SAS_LIBSAS is not set
413 390CONFIG_SCSI_LOWLEVEL=y
414#
415# SCSI low-level drivers
416#
417# CONFIG_ISCSI_TCP is not set 391# CONFIG_ISCSI_TCP is not set
418# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 392# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
419# CONFIG_SCSI_3W_9XXX is not set 393# CONFIG_SCSI_3W_9XXX is not set
@@ -449,10 +423,6 @@ CONFIG_SCSI_WAIT_SCAN=m
449# CONFIG_SCSI_DEBUG is not set 423# CONFIG_SCSI_DEBUG is not set
450# CONFIG_SCSI_SRP is not set 424# CONFIG_SCSI_SRP is not set
451# CONFIG_ATA is not set 425# CONFIG_ATA is not set
452
453#
454# Multi-device support (RAID and LVM)
455#
456# CONFIG_MD is not set 426# CONFIG_MD is not set
457 427
458# 428#
@@ -468,19 +438,13 @@ CONFIG_SCSI_WAIT_SCAN=m
468# 438#
469# CONFIG_FIREWIRE is not set 439# CONFIG_FIREWIRE is not set
470# CONFIG_IEEE1394 is not set 440# CONFIG_IEEE1394 is not set
471
472#
473# I2O device support
474#
475# CONFIG_I2O is not set 441# CONFIG_I2O is not set
476# CONFIG_MACINTOSH_DRIVERS is not set 442# CONFIG_MACINTOSH_DRIVERS is not set
477
478#
479# Network device support
480#
481CONFIG_NETDEVICES=y 443CONFIG_NETDEVICES=y
444# CONFIG_NETDEVICES_MULTIQUEUE is not set
482# CONFIG_DUMMY is not set 445# CONFIG_DUMMY is not set
483# CONFIG_BONDING is not set 446# CONFIG_BONDING is not set
447# CONFIG_MACVLAN is not set
484# CONFIG_EQUALIZER is not set 448# CONFIG_EQUALIZER is not set
485# CONFIG_TUN is not set 449# CONFIG_TUN is not set
486# CONFIG_ARCNET is not set 450# CONFIG_ARCNET is not set
@@ -497,21 +461,14 @@ CONFIG_PHYLIB=y
497# CONFIG_VITESSE_PHY is not set 461# CONFIG_VITESSE_PHY is not set
498# CONFIG_SMSC_PHY is not set 462# CONFIG_SMSC_PHY is not set
499# CONFIG_BROADCOM_PHY is not set 463# CONFIG_BROADCOM_PHY is not set
464CONFIG_ICPLUS_PHY=y
500# CONFIG_FIXED_PHY is not set 465# CONFIG_FIXED_PHY is not set
501
502#
503# Ethernet (10 or 100Mbit)
504#
505CONFIG_NET_ETHERNET=y 466CONFIG_NET_ETHERNET=y
506CONFIG_MII=y 467CONFIG_MII=y
507# CONFIG_HAPPYMEAL is not set 468# CONFIG_HAPPYMEAL is not set
508# CONFIG_SUNGEM is not set 469# CONFIG_SUNGEM is not set
509# CONFIG_CASSINI is not set 470# CONFIG_CASSINI is not set
510# CONFIG_NET_VENDOR_3COM is not set 471# CONFIG_NET_VENDOR_3COM is not set
511
512#
513# Tulip family network device support
514#
515# CONFIG_NET_TULIP is not set 472# CONFIG_NET_TULIP is not set
516# CONFIG_HP100 is not set 473# CONFIG_HP100 is not set
517# CONFIG_NET_PCI is not set 474# CONFIG_NET_PCI is not set
@@ -528,7 +485,6 @@ CONFIG_E1000=y
528# CONFIG_SIS190 is not set 485# CONFIG_SIS190 is not set
529# CONFIG_SKGE is not set 486# CONFIG_SKGE is not set
530# CONFIG_SKY2 is not set 487# CONFIG_SKY2 is not set
531# CONFIG_SK98LIN is not set
532# CONFIG_VIA_VELOCITY is not set 488# CONFIG_VIA_VELOCITY is not set
533# CONFIG_TIGON3 is not set 489# CONFIG_TIGON3 is not set
534# CONFIG_BNX2 is not set 490# CONFIG_BNX2 is not set
@@ -575,15 +531,7 @@ CONFIG_NETDEV_10000=y
575# CONFIG_NETCONSOLE is not set 531# CONFIG_NETCONSOLE is not set
576# CONFIG_NETPOLL is not set 532# CONFIG_NETPOLL is not set
577# CONFIG_NET_POLL_CONTROLLER is not set 533# CONFIG_NET_POLL_CONTROLLER is not set
578
579#
580# ISDN subsystem
581#
582# CONFIG_ISDN is not set 534# CONFIG_ISDN is not set
583
584#
585# Telephony Support
586#
587# CONFIG_PHONE is not set 535# CONFIG_PHONE is not set
588 536
589# 537#
@@ -645,10 +593,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
645CONFIG_UNIX98_PTYS=y 593CONFIG_UNIX98_PTYS=y
646CONFIG_LEGACY_PTYS=y 594CONFIG_LEGACY_PTYS=y
647CONFIG_LEGACY_PTY_COUNT=256 595CONFIG_LEGACY_PTY_COUNT=256
648
649#
650# IPMI
651#
652# CONFIG_IPMI_HANDLER is not set 596# CONFIG_IPMI_HANDLER is not set
653CONFIG_WATCHDOG=y 597CONFIG_WATCHDOG=y
654# CONFIG_WATCHDOG_NOWAYOUT is not set 598# CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -678,10 +622,6 @@ CONFIG_GEN_RTC=y
678# CONFIG_AGP is not set 622# CONFIG_AGP is not set
679# CONFIG_DRM is not set 623# CONFIG_DRM is not set
680# CONFIG_RAW_DRIVER is not set 624# CONFIG_RAW_DRIVER is not set
681
682#
683# TPM devices
684#
685# CONFIG_TCG_TPM is not set 625# CONFIG_TCG_TPM is not set
686CONFIG_DEVPORT=y 626CONFIG_DEVPORT=y
687CONFIG_I2C=y 627CONFIG_I2C=y
@@ -716,6 +656,7 @@ CONFIG_I2C_MPC=y
716# CONFIG_I2C_SIS5595 is not set 656# CONFIG_I2C_SIS5595 is not set
717# CONFIG_I2C_SIS630 is not set 657# CONFIG_I2C_SIS630 is not set
718# CONFIG_I2C_SIS96X is not set 658# CONFIG_I2C_SIS96X is not set
659# CONFIG_I2C_TAOS_EVM is not set
719# CONFIG_I2C_STUB is not set 660# CONFIG_I2C_STUB is not set
720# CONFIG_I2C_TINY_USB is not set 661# CONFIG_I2C_TINY_USB is not set
721# CONFIG_I2C_VIA is not set 662# CONFIG_I2C_VIA is not set
@@ -727,12 +668,14 @@ CONFIG_I2C_MPC=y
727# 668#
728# CONFIG_SENSORS_DS1337 is not set 669# CONFIG_SENSORS_DS1337 is not set
729# CONFIG_SENSORS_DS1374 is not set 670# CONFIG_SENSORS_DS1374 is not set
671# CONFIG_DS1682 is not set
730# CONFIG_SENSORS_EEPROM is not set 672# CONFIG_SENSORS_EEPROM is not set
731# CONFIG_SENSORS_PCF8574 is not set 673# CONFIG_SENSORS_PCF8574 is not set
732# CONFIG_SENSORS_PCA9539 is not set 674# CONFIG_SENSORS_PCA9539 is not set
733# CONFIG_SENSORS_PCF8591 is not set 675# CONFIG_SENSORS_PCF8591 is not set
734# CONFIG_SENSORS_M41T00 is not set 676# CONFIG_SENSORS_M41T00 is not set
735# CONFIG_SENSORS_MAX6875 is not set 677# CONFIG_SENSORS_MAX6875 is not set
678# CONFIG_SENSORS_TSL2550 is not set
736# CONFIG_I2C_DEBUG_CORE is not set 679# CONFIG_I2C_DEBUG_CORE is not set
737# CONFIG_I2C_DEBUG_ALGO is not set 680# CONFIG_I2C_DEBUG_ALGO is not set
738# CONFIG_I2C_DEBUG_BUS is not set 681# CONFIG_I2C_DEBUG_BUS is not set
@@ -743,14 +686,12 @@ CONFIG_I2C_MPC=y
743# 686#
744# CONFIG_SPI is not set 687# CONFIG_SPI is not set
745# CONFIG_SPI_MASTER is not set 688# CONFIG_SPI_MASTER is not set
746
747#
748# Dallas's 1-wire bus
749#
750# CONFIG_W1 is not set 689# CONFIG_W1 is not set
690# CONFIG_POWER_SUPPLY is not set
751CONFIG_HWMON=y 691CONFIG_HWMON=y
752# CONFIG_HWMON_VID is not set 692# CONFIG_HWMON_VID is not set
753# CONFIG_SENSORS_ABITUGURU is not set 693# CONFIG_SENSORS_ABITUGURU is not set
694# CONFIG_SENSORS_ABITUGURU3 is not set
754# CONFIG_SENSORS_AD7418 is not set 695# CONFIG_SENSORS_AD7418 is not set
755# CONFIG_SENSORS_ADM1021 is not set 696# CONFIG_SENSORS_ADM1021 is not set
756# CONFIG_SENSORS_ADM1025 is not set 697# CONFIG_SENSORS_ADM1025 is not set
@@ -777,14 +718,17 @@ CONFIG_HWMON=y
777# CONFIG_SENSORS_LM87 is not set 718# CONFIG_SENSORS_LM87 is not set
778# CONFIG_SENSORS_LM90 is not set 719# CONFIG_SENSORS_LM90 is not set
779# CONFIG_SENSORS_LM92 is not set 720# CONFIG_SENSORS_LM92 is not set
721# CONFIG_SENSORS_LM93 is not set
780# CONFIG_SENSORS_MAX1619 is not set 722# CONFIG_SENSORS_MAX1619 is not set
781# CONFIG_SENSORS_MAX6650 is not set 723# CONFIG_SENSORS_MAX6650 is not set
782# CONFIG_SENSORS_PC87360 is not set 724# CONFIG_SENSORS_PC87360 is not set
783# CONFIG_SENSORS_PC87427 is not set 725# CONFIG_SENSORS_PC87427 is not set
784# CONFIG_SENSORS_SIS5595 is not set 726# CONFIG_SENSORS_SIS5595 is not set
727# CONFIG_SENSORS_DME1737 is not set
785# CONFIG_SENSORS_SMSC47M1 is not set 728# CONFIG_SENSORS_SMSC47M1 is not set
786# CONFIG_SENSORS_SMSC47M192 is not set 729# CONFIG_SENSORS_SMSC47M192 is not set
787# CONFIG_SENSORS_SMSC47B397 is not set 730# CONFIG_SENSORS_SMSC47B397 is not set
731# CONFIG_SENSORS_THMC50 is not set
788# CONFIG_SENSORS_VIA686A is not set 732# CONFIG_SENSORS_VIA686A is not set
789# CONFIG_SENSORS_VT1211 is not set 733# CONFIG_SENSORS_VT1211 is not set
790# CONFIG_SENSORS_VT8231 is not set 734# CONFIG_SENSORS_VT8231 is not set
@@ -820,6 +764,7 @@ CONFIG_DAB=y
820# 764#
821# CONFIG_DISPLAY_SUPPORT is not set 765# CONFIG_DISPLAY_SUPPORT is not set
822# CONFIG_VGASTATE is not set 766# CONFIG_VGASTATE is not set
767CONFIG_VIDEO_OUTPUT_CONTROL=m
823# CONFIG_FB is not set 768# CONFIG_FB is not set
824# CONFIG_FB_IBM_GXT4500 is not set 769# CONFIG_FB_IBM_GXT4500 is not set
825 770
@@ -827,10 +772,7 @@ CONFIG_DAB=y
827# Sound 772# Sound
828# 773#
829# CONFIG_SOUND is not set 774# CONFIG_SOUND is not set
830 775CONFIG_HID_SUPPORT=y
831#
832# HID Devices
833#
834CONFIG_HID=y 776CONFIG_HID=y
835# CONFIG_HID_DEBUG is not set 777# CONFIG_HID_DEBUG is not set
836 778
@@ -844,10 +786,7 @@ CONFIG_HID=y
844# 786#
845# CONFIG_USB_KBD is not set 787# CONFIG_USB_KBD is not set
846# CONFIG_USB_MOUSE is not set 788# CONFIG_USB_MOUSE is not set
847 789CONFIG_USB_SUPPORT=y
848#
849# USB support
850#
851CONFIG_USB_ARCH_HAS_HCD=y 790CONFIG_USB_ARCH_HAS_HCD=y
852CONFIG_USB_ARCH_HAS_OHCI=y 791CONFIG_USB_ARCH_HAS_OHCI=y
853CONFIG_USB_ARCH_HAS_EHCI=y 792CONFIG_USB_ARCH_HAS_EHCI=y
@@ -869,7 +808,6 @@ CONFIG_USB_EHCI_HCD=y
869# CONFIG_USB_EHCI_SPLIT_ISO is not set 808# CONFIG_USB_EHCI_SPLIT_ISO is not set
870# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 809# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
871# CONFIG_USB_EHCI_TT_NEWSCHED is not set 810# CONFIG_USB_EHCI_TT_NEWSCHED is not set
872# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
873# CONFIG_USB_ISP116X_HCD is not set 811# CONFIG_USB_ISP116X_HCD is not set
874CONFIG_USB_OHCI_HCD=y 812CONFIG_USB_OHCI_HCD=y
875CONFIG_USB_OHCI_HCD_PPC_OF=y 813CONFIG_USB_OHCI_HCD_PPC_OF=y
@@ -881,6 +819,7 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
881CONFIG_USB_OHCI_LITTLE_ENDIAN=y 819CONFIG_USB_OHCI_LITTLE_ENDIAN=y
882# CONFIG_USB_UHCI_HCD is not set 820# CONFIG_USB_UHCI_HCD is not set
883# CONFIG_USB_SL811_HCD is not set 821# CONFIG_USB_SL811_HCD is not set
822# CONFIG_USB_R8A66597_HCD is not set
884 823
885# 824#
886# USB Device Class drivers 825# USB Device Class drivers
@@ -957,32 +896,9 @@ CONFIG_USB_MON=y
957# 896#
958# CONFIG_USB_GADGET is not set 897# CONFIG_USB_GADGET is not set
959# CONFIG_MMC is not set 898# CONFIG_MMC is not set
960
961#
962# LED devices
963#
964# CONFIG_NEW_LEDS is not set 899# CONFIG_NEW_LEDS is not set
965
966#
967# LED drivers
968#
969
970#
971# LED Triggers
972#
973
974#
975# InfiniBand support
976#
977# CONFIG_INFINIBAND is not set 900# CONFIG_INFINIBAND is not set
978 901# CONFIG_EDAC is not set
979#
980# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
981#
982
983#
984# Real Time Clock
985#
986# CONFIG_RTC_CLASS is not set 902# CONFIG_RTC_CLASS is not set
987 903
988# 904#
@@ -999,6 +915,11 @@ CONFIG_USB_MON=y
999# 915#
1000 916
1001# 917#
918# Userspace I/O
919#
920# CONFIG_UIO is not set
921
922#
1002# File systems 923# File systems
1003# 924#
1004CONFIG_EXT2_FS=y 925CONFIG_EXT2_FS=y
@@ -1097,7 +1018,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
1097# CONFIG_NCP_FS is not set 1018# CONFIG_NCP_FS is not set
1098# CONFIG_CODA_FS is not set 1019# CONFIG_CODA_FS is not set
1099# CONFIG_AFS_FS is not set 1020# CONFIG_AFS_FS is not set
1100# CONFIG_9P_FS is not set
1101 1021
1102# 1022#
1103# Partition Types 1023# Partition Types
@@ -1182,6 +1102,7 @@ CONFIG_BITREVERSE=y
1182# CONFIG_CRC16 is not set 1102# CONFIG_CRC16 is not set
1183# CONFIG_CRC_ITU_T is not set 1103# CONFIG_CRC_ITU_T is not set
1184CONFIG_CRC32=y 1104CONFIG_CRC32=y
1105# CONFIG_CRC7 is not set
1185# CONFIG_LIBCRC32C is not set 1106# CONFIG_LIBCRC32C is not set
1186CONFIG_PLIST=y 1107CONFIG_PLIST=y
1187CONFIG_HAS_IOMEM=y 1108CONFIG_HAS_IOMEM=y
@@ -1204,7 +1125,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1204# CONFIG_HEADERS_CHECK is not set 1125# CONFIG_HEADERS_CHECK is not set
1205# CONFIG_DEBUG_KERNEL is not set 1126# CONFIG_DEBUG_KERNEL is not set
1206# CONFIG_DEBUG_BUGVERBOSE is not set 1127# CONFIG_DEBUG_BUGVERBOSE is not set
1207# CONFIG_BOOTX_TEXT is not set
1208# CONFIG_PPC_EARLY_DEBUG is not set 1128# CONFIG_PPC_EARLY_DEBUG is not set
1209 1129
1210# 1130#
@@ -1212,10 +1132,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1212# 1132#
1213# CONFIG_KEYS is not set 1133# CONFIG_KEYS is not set
1214# CONFIG_SECURITY is not set 1134# CONFIG_SECURITY is not set
1215
1216#
1217# Cryptographic options
1218#
1219CONFIG_CRYPTO=y 1135CONFIG_CRYPTO=y
1220CONFIG_CRYPTO_ALGAPI=y 1136CONFIG_CRYPTO_ALGAPI=y
1221CONFIG_CRYPTO_BLKCIPHER=y 1137CONFIG_CRYPTO_BLKCIPHER=y
@@ -1253,7 +1169,4 @@ CONFIG_CRYPTO_DES=y
1253# CONFIG_CRYPTO_CRC32C is not set 1169# CONFIG_CRYPTO_CRC32C is not set
1254# CONFIG_CRYPTO_CAMELLIA is not set 1170# CONFIG_CRYPTO_CAMELLIA is not set
1255# CONFIG_CRYPTO_TEST is not set 1171# CONFIG_CRYPTO_TEST is not set
1256 1172CONFIG_CRYPTO_HW=y
1257#
1258# Hardware crypto devices
1259#
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig
index 85470b8cae..ddafa6b9af 100644
--- a/arch/powerpc/configs/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/mpc834x_itx_defconfig
@@ -1,9 +1,25 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:56:56 2007 4# Tue Aug 28 21:24:41 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_83xx=y
18CONFIG_PPC_FPU=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
7CONFIG_PPC32=y 23CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 24CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 25CONFIG_MMU=y
@@ -14,61 +30,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 30CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 31CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 32CONFIG_GENERIC_FIND_NEXT_BIT=y
33# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 34CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 35CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 36CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 41CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 45CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49# CONFIG_SMP is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 49
52# 50#
53# Code maturity level options 51# General setup
54# 52#
55CONFIG_EXPERIMENTAL=y 53CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 54CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 55CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 56CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 57CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 58CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 59CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 60CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 63# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 64# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 67CONFIG_LOG_BUF_SHIFT=14
@@ -100,24 +93,17 @@ CONFIG_SLAB=y
100CONFIG_RT_MUTEXES=y 93CONFIG_RT_MUTEXES=y
101# CONFIG_TINY_SHMEM is not set 94# CONFIG_TINY_SHMEM is not set
102CONFIG_BASE_SMALL=0 95CONFIG_BASE_SMALL=0
103
104#
105# Loadable module support
106#
107CONFIG_MODULES=y 96CONFIG_MODULES=y
108CONFIG_MODULE_UNLOAD=y 97CONFIG_MODULE_UNLOAD=y
109# CONFIG_MODULE_FORCE_UNLOAD is not set 98# CONFIG_MODULE_FORCE_UNLOAD is not set
110# CONFIG_MODVERSIONS is not set 99# CONFIG_MODVERSIONS is not set
111# CONFIG_MODULE_SRCVERSION_ALL is not set 100# CONFIG_MODULE_SRCVERSION_ALL is not set
112# CONFIG_KMOD is not set 101# CONFIG_KMOD is not set
113
114#
115# Block layer
116#
117CONFIG_BLOCK=y 102CONFIG_BLOCK=y
118# CONFIG_LBD is not set 103# CONFIG_LBD is not set
119# CONFIG_BLK_DEV_IO_TRACE is not set 104# CONFIG_BLK_DEV_IO_TRACE is not set
120# CONFIG_LSF is not set 105# CONFIG_LSF is not set
106# CONFIG_BLK_DEV_BSG is not set
121 107
122# 108#
123# IO Schedulers 109# IO Schedulers
@@ -135,6 +121,11 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
135# 121#
136# Platform support 122# Platform support
137# 123#
124# CONFIG_PPC_MULTIPLATFORM is not set
125# CONFIG_EMBEDDED6xx is not set
126# CONFIG_PPC_82xx is not set
127CONFIG_PPC_83xx=y
128# CONFIG_PPC_86xx is not set
138# CONFIG_PPC_MPC52xx is not set 129# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set 130# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set 131# CONFIG_PPC_CELL is not set
@@ -158,6 +149,7 @@ CONFIG_MPC834x=y
158# CONFIG_GENERIC_IOMAP is not set 149# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set 150# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set 151# CONFIG_CPM2 is not set
152# CONFIG_FSL_ULI1575 is not set
161 153
162# 154#
163# Kernel options 155# Kernel options
@@ -186,6 +178,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
186CONFIG_SPLIT_PTLOCK_CPUS=4 178CONFIG_SPLIT_PTLOCK_CPUS=4
187# CONFIG_RESOURCES_64BIT is not set 179# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1 180CONFIG_ZONE_DMA_FLAG=1
181CONFIG_BOUNCE=y
182CONFIG_VIRT_TO_BUS=y
189CONFIG_PROC_DEVICETREE=y 183CONFIG_PROC_DEVICETREE=y
190# CONFIG_CMDLINE_BOOL is not set 184# CONFIG_CMDLINE_BOOL is not set
191# CONFIG_PM is not set 185# CONFIG_PM is not set
@@ -200,10 +194,10 @@ CONFIG_ISA_DMA_API=y
200CONFIG_ZONE_DMA=y 194CONFIG_ZONE_DMA=y
201CONFIG_GENERIC_ISA_DMA=y 195CONFIG_GENERIC_ISA_DMA=y
202CONFIG_PPC_INDIRECT_PCI=y 196CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PPC_INDIRECT_PCI_BE is not set
204CONFIG_FSL_SOC=y 197CONFIG_FSL_SOC=y
205CONFIG_PCI=y 198CONFIG_PCI=y
206CONFIG_PCI_DOMAINS=y 199CONFIG_PCI_DOMAINS=y
200CONFIG_PCI_SYSCALL=y
207# CONFIG_PCIEPORTBUS is not set 201# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y 202CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set 203# CONFIG_PCI_MSI is not set
@@ -313,6 +307,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
313# CONFIG_MAC80211 is not set 307# CONFIG_MAC80211 is not set
314# CONFIG_IEEE80211 is not set 308# CONFIG_IEEE80211 is not set
315# CONFIG_RFKILL is not set 309# CONFIG_RFKILL is not set
310# CONFIG_NET_9P is not set
316 311
317# 312#
318# Device Drivers 313# Device Drivers
@@ -325,10 +320,6 @@ CONFIG_STANDALONE=y
325CONFIG_PREVENT_FIRMWARE_BUILD=y 320CONFIG_PREVENT_FIRMWARE_BUILD=y
326# CONFIG_FW_LOADER is not set 321# CONFIG_FW_LOADER is not set
327# CONFIG_SYS_HYPERVISOR is not set 322# CONFIG_SYS_HYPERVISOR is not set
328
329#
330# Connector - unified userspace <-> kernelspace linker
331#
332# CONFIG_CONNECTOR is not set 323# CONFIG_CONNECTOR is not set
333CONFIG_MTD=y 324CONFIG_MTD=y
334# CONFIG_MTD_DEBUG is not set 325# CONFIG_MTD_DEBUG is not set
@@ -408,20 +399,9 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
408# UBI - Unsorted block images 399# UBI - Unsorted block images
409# 400#
410# CONFIG_MTD_UBI is not set 401# CONFIG_MTD_UBI is not set
411 402CONFIG_OF_DEVICE=y
412#
413# Parallel port support
414#
415# CONFIG_PARPORT is not set 403# CONFIG_PARPORT is not set
416 404CONFIG_BLK_DEV=y
417#
418# Plug and Play support
419#
420# CONFIG_PNPACPI is not set
421
422#
423# Block devices
424#
425# CONFIG_BLK_DEV_FD is not set 405# CONFIG_BLK_DEV_FD is not set
426# CONFIG_BLK_CPQ_DA is not set 406# CONFIG_BLK_CPQ_DA is not set
427# CONFIG_BLK_CPQ_CISS_DA is not set 407# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -439,14 +419,11 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
439CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 419CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
440# CONFIG_CDROM_PKTCDVD is not set 420# CONFIG_CDROM_PKTCDVD is not set
441# CONFIG_ATA_OVER_ETH is not set 421# CONFIG_ATA_OVER_ETH is not set
442 422CONFIG_MISC_DEVICES=y
443#
444# Misc devices
445#
446# CONFIG_PHANTOM is not set 423# CONFIG_PHANTOM is not set
424# CONFIG_EEPROM_93CX6 is not set
447# CONFIG_SGI_IOC4 is not set 425# CONFIG_SGI_IOC4 is not set
448# CONFIG_TIFM_CORE is not set 426# CONFIG_TIFM_CORE is not set
449# CONFIG_BLINK is not set
450CONFIG_IDE=y 427CONFIG_IDE=y
451CONFIG_IDE_MAX_HWIFS=4 428CONFIG_IDE_MAX_HWIFS=4
452# CONFIG_BLK_DEV_IDE is not set 429# CONFIG_BLK_DEV_IDE is not set
@@ -458,6 +435,7 @@ CONFIG_IDE_MAX_HWIFS=4
458# 435#
459# CONFIG_RAID_ATTRS is not set 436# CONFIG_RAID_ATTRS is not set
460CONFIG_SCSI=y 437CONFIG_SCSI=y
438CONFIG_SCSI_DMA=y
461# CONFIG_SCSI_TGT is not set 439# CONFIG_SCSI_TGT is not set
462# CONFIG_SCSI_NETLINK is not set 440# CONFIG_SCSI_NETLINK is not set
463CONFIG_SCSI_PROC_FS=y 441CONFIG_SCSI_PROC_FS=y
@@ -487,12 +465,8 @@ CONFIG_SCSI_WAIT_SCAN=m
487CONFIG_SCSI_SPI_ATTRS=y 465CONFIG_SCSI_SPI_ATTRS=y
488# CONFIG_SCSI_FC_ATTRS is not set 466# CONFIG_SCSI_FC_ATTRS is not set
489# CONFIG_SCSI_ISCSI_ATTRS is not set 467# CONFIG_SCSI_ISCSI_ATTRS is not set
490# CONFIG_SCSI_SAS_ATTRS is not set
491# CONFIG_SCSI_SAS_LIBSAS is not set 468# CONFIG_SCSI_SAS_LIBSAS is not set
492 469CONFIG_SCSI_LOWLEVEL=y
493#
494# SCSI low-level drivers
495#
496# CONFIG_ISCSI_TCP is not set 470# CONFIG_ISCSI_TCP is not set
497# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 471# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
498# CONFIG_SCSI_3W_9XXX is not set 472# CONFIG_SCSI_3W_9XXX is not set
@@ -583,10 +557,6 @@ CONFIG_SATA_SIL=y
583# CONFIG_PATA_VIA is not set 557# CONFIG_PATA_VIA is not set
584# CONFIG_PATA_WINBOND is not set 558# CONFIG_PATA_WINBOND is not set
585# CONFIG_PATA_PLATFORM is not set 559# CONFIG_PATA_PLATFORM is not set
586
587#
588# Multi-device support (RAID and LVM)
589#
590CONFIG_MD=y 560CONFIG_MD=y
591CONFIG_BLK_DEV_MD=y 561CONFIG_BLK_DEV_MD=y
592CONFIG_MD_LINEAR=y 562CONFIG_MD_LINEAR=y
@@ -611,19 +581,13 @@ CONFIG_MD_RAID1=y
611# 581#
612# CONFIG_FIREWIRE is not set 582# CONFIG_FIREWIRE is not set
613# CONFIG_IEEE1394 is not set 583# CONFIG_IEEE1394 is not set
614
615#
616# I2O device support
617#
618# CONFIG_I2O is not set 584# CONFIG_I2O is not set
619# CONFIG_MACINTOSH_DRIVERS is not set 585# CONFIG_MACINTOSH_DRIVERS is not set
620
621#
622# Network device support
623#
624CONFIG_NETDEVICES=y 586CONFIG_NETDEVICES=y
587# CONFIG_NETDEVICES_MULTIQUEUE is not set
625# CONFIG_DUMMY is not set 588# CONFIG_DUMMY is not set
626# CONFIG_BONDING is not set 589# CONFIG_BONDING is not set
590# CONFIG_MACVLAN is not set
627# CONFIG_EQUALIZER is not set 591# CONFIG_EQUALIZER is not set
628# CONFIG_TUN is not set 592# CONFIG_TUN is not set
629# CONFIG_ARCNET is not set 593# CONFIG_ARCNET is not set
@@ -640,11 +604,8 @@ CONFIG_CICADA_PHY=y
640# CONFIG_VITESSE_PHY is not set 604# CONFIG_VITESSE_PHY is not set
641# CONFIG_SMSC_PHY is not set 605# CONFIG_SMSC_PHY is not set
642# CONFIG_BROADCOM_PHY is not set 606# CONFIG_BROADCOM_PHY is not set
607# CONFIG_ICPLUS_PHY is not set
643# CONFIG_FIXED_PHY is not set 608# CONFIG_FIXED_PHY is not set
644
645#
646# Ethernet (10 or 100Mbit)
647#
648# CONFIG_NET_ETHERNET is not set 609# CONFIG_NET_ETHERNET is not set
649CONFIG_NETDEV_1000=y 610CONFIG_NETDEV_1000=y
650# CONFIG_ACENIC is not set 611# CONFIG_ACENIC is not set
@@ -657,7 +618,6 @@ CONFIG_NETDEV_1000=y
657# CONFIG_SIS190 is not set 618# CONFIG_SIS190 is not set
658# CONFIG_SKGE is not set 619# CONFIG_SKGE is not set
659# CONFIG_SKY2 is not set 620# CONFIG_SKY2 is not set
660# CONFIG_SK98LIN is not set
661# CONFIG_VIA_VELOCITY is not set 621# CONFIG_VIA_VELOCITY is not set
662# CONFIG_TIGON3 is not set 622# CONFIG_TIGON3 is not set
663# CONFIG_BNX2 is not set 623# CONFIG_BNX2 is not set
@@ -700,15 +660,7 @@ CONFIG_NETDEV_10000=y
700# CONFIG_NETCONSOLE is not set 660# CONFIG_NETCONSOLE is not set
701# CONFIG_NETPOLL is not set 661# CONFIG_NETPOLL is not set
702# CONFIG_NET_POLL_CONTROLLER is not set 662# CONFIG_NET_POLL_CONTROLLER is not set
703
704#
705# ISDN subsystem
706#
707# CONFIG_ISDN is not set 663# CONFIG_ISDN is not set
708
709#
710# Telephony Support
711#
712# CONFIG_PHONE is not set 664# CONFIG_PHONE is not set
713 665
714# 666#
@@ -749,10 +701,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
749CONFIG_UNIX98_PTYS=y 701CONFIG_UNIX98_PTYS=y
750CONFIG_LEGACY_PTYS=y 702CONFIG_LEGACY_PTYS=y
751CONFIG_LEGACY_PTY_COUNT=256 703CONFIG_LEGACY_PTY_COUNT=256
752
753#
754# IPMI
755#
756# CONFIG_IPMI_HANDLER is not set 704# CONFIG_IPMI_HANDLER is not set
757CONFIG_WATCHDOG=y 705CONFIG_WATCHDOG=y
758# CONFIG_WATCHDOG_NOWAYOUT is not set 706# CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -781,10 +729,6 @@ CONFIG_HW_RANDOM=y
781# CONFIG_AGP is not set 729# CONFIG_AGP is not set
782# CONFIG_DRM is not set 730# CONFIG_DRM is not set
783# CONFIG_RAW_DRIVER is not set 731# CONFIG_RAW_DRIVER is not set
784
785#
786# TPM devices
787#
788# CONFIG_TCG_TPM is not set 732# CONFIG_TCG_TPM is not set
789CONFIG_DEVPORT=y 733CONFIG_DEVPORT=y
790CONFIG_I2C=y 734CONFIG_I2C=y
@@ -819,6 +763,7 @@ CONFIG_I2C_MPC=y
819# CONFIG_I2C_SIS5595 is not set 763# CONFIG_I2C_SIS5595 is not set
820# CONFIG_I2C_SIS630 is not set 764# CONFIG_I2C_SIS630 is not set
821# CONFIG_I2C_SIS96X is not set 765# CONFIG_I2C_SIS96X is not set
766# CONFIG_I2C_TAOS_EVM is not set
822# CONFIG_I2C_STUB is not set 767# CONFIG_I2C_STUB is not set
823# CONFIG_I2C_TINY_USB is not set 768# CONFIG_I2C_TINY_USB is not set
824# CONFIG_I2C_VIA is not set 769# CONFIG_I2C_VIA is not set
@@ -830,12 +775,14 @@ CONFIG_I2C_MPC=y
830# 775#
831# CONFIG_SENSORS_DS1337 is not set 776# CONFIG_SENSORS_DS1337 is not set
832# CONFIG_SENSORS_DS1374 is not set 777# CONFIG_SENSORS_DS1374 is not set
778# CONFIG_DS1682 is not set
833# CONFIG_SENSORS_EEPROM is not set 779# CONFIG_SENSORS_EEPROM is not set
834CONFIG_SENSORS_PCF8574=y 780CONFIG_SENSORS_PCF8574=y
835# CONFIG_SENSORS_PCA9539 is not set 781# CONFIG_SENSORS_PCA9539 is not set
836# CONFIG_SENSORS_PCF8591 is not set 782# CONFIG_SENSORS_PCF8591 is not set
837# CONFIG_SENSORS_M41T00 is not set 783# CONFIG_SENSORS_M41T00 is not set
838# CONFIG_SENSORS_MAX6875 is not set 784# CONFIG_SENSORS_MAX6875 is not set
785# CONFIG_SENSORS_TSL2550 is not set
839# CONFIG_I2C_DEBUG_CORE is not set 786# CONFIG_I2C_DEBUG_CORE is not set
840# CONFIG_I2C_DEBUG_ALGO is not set 787# CONFIG_I2C_DEBUG_ALGO is not set
841# CONFIG_I2C_DEBUG_BUS is not set 788# CONFIG_I2C_DEBUG_BUS is not set
@@ -858,11 +805,9 @@ CONFIG_SPI_MPC83xx=y
858# 805#
859# CONFIG_SPI_AT25 is not set 806# CONFIG_SPI_AT25 is not set
860# CONFIG_SPI_SPIDEV is not set 807# CONFIG_SPI_SPIDEV is not set
861 808# CONFIG_SPI_TLE62X0 is not set
862#
863# Dallas's 1-wire bus
864#
865# CONFIG_W1 is not set 809# CONFIG_W1 is not set
810# CONFIG_POWER_SUPPLY is not set
866# CONFIG_HWMON is not set 811# CONFIG_HWMON is not set
867 812
868# 813#
@@ -888,6 +833,7 @@ CONFIG_DAB=y
888# 833#
889# CONFIG_DISPLAY_SUPPORT is not set 834# CONFIG_DISPLAY_SUPPORT is not set
890# CONFIG_VGASTATE is not set 835# CONFIG_VGASTATE is not set
836CONFIG_VIDEO_OUTPUT_CONTROL=m
891# CONFIG_FB is not set 837# CONFIG_FB is not set
892# CONFIG_FB_IBM_GXT4500 is not set 838# CONFIG_FB_IBM_GXT4500 is not set
893 839
@@ -895,10 +841,7 @@ CONFIG_DAB=y
895# Sound 841# Sound
896# 842#
897# CONFIG_SOUND is not set 843# CONFIG_SOUND is not set
898 844CONFIG_USB_SUPPORT=y
899#
900# USB support
901#
902CONFIG_USB_ARCH_HAS_HCD=y 845CONFIG_USB_ARCH_HAS_HCD=y
903CONFIG_USB_ARCH_HAS_OHCI=y 846CONFIG_USB_ARCH_HAS_OHCI=y
904CONFIG_USB_ARCH_HAS_EHCI=y 847CONFIG_USB_ARCH_HAS_EHCI=y
@@ -918,13 +861,14 @@ CONFIG_USB_DEVICE_CLASS=y
918# 861#
919CONFIG_USB_EHCI_HCD=y 862CONFIG_USB_EHCI_HCD=y
920# CONFIG_USB_EHCI_SPLIT_ISO is not set 863# CONFIG_USB_EHCI_SPLIT_ISO is not set
921# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 864CONFIG_USB_EHCI_ROOT_HUB_TT=y
922# CONFIG_USB_EHCI_TT_NEWSCHED is not set 865# CONFIG_USB_EHCI_TT_NEWSCHED is not set
923# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set 866CONFIG_USB_EHCI_FSL=y
924# CONFIG_USB_ISP116X_HCD is not set 867# CONFIG_USB_ISP116X_HCD is not set
925# CONFIG_USB_OHCI_HCD is not set 868# CONFIG_USB_OHCI_HCD is not set
926# CONFIG_USB_UHCI_HCD is not set 869# CONFIG_USB_UHCI_HCD is not set
927# CONFIG_USB_SL811_HCD is not set 870# CONFIG_USB_SL811_HCD is not set
871# CONFIG_USB_R8A66597_HCD is not set
928 872
929# 873#
930# USB Device Class drivers 874# USB Device Class drivers
@@ -1001,32 +945,9 @@ CONFIG_USB_MON=y
1001# 945#
1002# CONFIG_USB_GADGET is not set 946# CONFIG_USB_GADGET is not set
1003# CONFIG_MMC is not set 947# CONFIG_MMC is not set
1004
1005#
1006# LED devices
1007#
1008# CONFIG_NEW_LEDS is not set 948# CONFIG_NEW_LEDS is not set
1009
1010#
1011# LED drivers
1012#
1013
1014#
1015# LED Triggers
1016#
1017
1018#
1019# InfiniBand support
1020#
1021# CONFIG_INFINIBAND is not set 949# CONFIG_INFINIBAND is not set
1022 950# CONFIG_EDAC is not set
1023#
1024# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1025#
1026
1027#
1028# Real Time Clock
1029#
1030CONFIG_RTC_LIB=y 951CONFIG_RTC_LIB=y
1031CONFIG_RTC_CLASS=y 952CONFIG_RTC_CLASS=y
1032CONFIG_RTC_HCTOSYS=y 953CONFIG_RTC_HCTOSYS=y
@@ -1053,6 +974,7 @@ CONFIG_RTC_DRV_DS1307=y
1053# CONFIG_RTC_DRV_X1205 is not set 974# CONFIG_RTC_DRV_X1205 is not set
1054# CONFIG_RTC_DRV_PCF8563 is not set 975# CONFIG_RTC_DRV_PCF8563 is not set
1055# CONFIG_RTC_DRV_PCF8583 is not set 976# CONFIG_RTC_DRV_PCF8583 is not set
977# CONFIG_RTC_DRV_M41T80 is not set
1056 978
1057# 979#
1058# SPI RTC drivers 980# SPI RTC drivers
@@ -1063,9 +985,12 @@ CONFIG_RTC_DRV_DS1307=y
1063# 985#
1064# Platform RTC drivers 986# Platform RTC drivers
1065# 987#
988# CONFIG_RTC_DRV_CMOS is not set
1066# CONFIG_RTC_DRV_DS1553 is not set 989# CONFIG_RTC_DRV_DS1553 is not set
990# CONFIG_RTC_DRV_STK17TA8 is not set
1067# CONFIG_RTC_DRV_DS1742 is not set 991# CONFIG_RTC_DRV_DS1742 is not set
1068# CONFIG_RTC_DRV_M48T86 is not set 992# CONFIG_RTC_DRV_M48T86 is not set
993# CONFIG_RTC_DRV_M48T59 is not set
1069# CONFIG_RTC_DRV_V3020 is not set 994# CONFIG_RTC_DRV_V3020 is not set
1070 995
1071# 996#
@@ -1088,6 +1013,11 @@ CONFIG_NET_DMA=y
1088CONFIG_INTEL_IOATDMA=y 1013CONFIG_INTEL_IOATDMA=y
1089 1014
1090# 1015#
1016# Userspace I/O
1017#
1018# CONFIG_UIO is not set
1019
1020#
1091# File systems 1021# File systems
1092# 1022#
1093CONFIG_EXT2_FS=y 1023CONFIG_EXT2_FS=y
@@ -1187,7 +1117,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
1187# CONFIG_NCP_FS is not set 1117# CONFIG_NCP_FS is not set
1188# CONFIG_CODA_FS is not set 1118# CONFIG_CODA_FS is not set
1189# CONFIG_AFS_FS is not set 1119# CONFIG_AFS_FS is not set
1190# CONFIG_9P_FS is not set
1191 1120
1192# 1121#
1193# Partition Types 1122# Partition Types
@@ -1269,6 +1198,7 @@ CONFIG_BITREVERSE=y
1269# CONFIG_CRC16 is not set 1198# CONFIG_CRC16 is not set
1270# CONFIG_CRC_ITU_T is not set 1199# CONFIG_CRC_ITU_T is not set
1271CONFIG_CRC32=y 1200CONFIG_CRC32=y
1201# CONFIG_CRC7 is not set
1272# CONFIG_LIBCRC32C is not set 1202# CONFIG_LIBCRC32C is not set
1273CONFIG_PLIST=y 1203CONFIG_PLIST=y
1274CONFIG_HAS_IOMEM=y 1204CONFIG_HAS_IOMEM=y
@@ -1291,7 +1221,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1291# CONFIG_HEADERS_CHECK is not set 1221# CONFIG_HEADERS_CHECK is not set
1292# CONFIG_DEBUG_KERNEL is not set 1222# CONFIG_DEBUG_KERNEL is not set
1293# CONFIG_DEBUG_BUGVERBOSE is not set 1223# CONFIG_DEBUG_BUGVERBOSE is not set
1294# CONFIG_BOOTX_TEXT is not set
1295# CONFIG_PPC_EARLY_DEBUG is not set 1224# CONFIG_PPC_EARLY_DEBUG is not set
1296 1225
1297# 1226#
@@ -1299,10 +1228,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1299# 1228#
1300# CONFIG_KEYS is not set 1229# CONFIG_KEYS is not set
1301# CONFIG_SECURITY is not set 1230# CONFIG_SECURITY is not set
1302
1303#
1304# Cryptographic options
1305#
1306CONFIG_CRYPTO=y 1231CONFIG_CRYPTO=y
1307CONFIG_CRYPTO_ALGAPI=y 1232CONFIG_CRYPTO_ALGAPI=y
1308CONFIG_CRYPTO_BLKCIPHER=y 1233CONFIG_CRYPTO_BLKCIPHER=y
@@ -1340,7 +1265,4 @@ CONFIG_CRYPTO_DES=y
1340# CONFIG_CRYPTO_CRC32C is not set 1265# CONFIG_CRYPTO_CRC32C is not set
1341# CONFIG_CRYPTO_CAMELLIA is not set 1266# CONFIG_CRYPTO_CAMELLIA is not set
1342# CONFIG_CRYPTO_TEST is not set 1267# CONFIG_CRYPTO_TEST is not set
1343 1268CONFIG_CRYPTO_HW=y
1344#
1345# Hardware crypto devices
1346#
diff --git a/arch/powerpc/configs/mpc834x_itxgp_defconfig b/arch/powerpc/configs/mpc834x_itxgp_defconfig
index 704ee8b285..8241c69858 100644
--- a/arch/powerpc/configs/mpc834x_itxgp_defconfig
+++ b/arch/powerpc/configs/mpc834x_itxgp_defconfig
@@ -1,9 +1,25 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:56:56 2007 4# Tue Aug 28 21:24:41 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_83xx=y
18CONFIG_PPC_FPU=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
7CONFIG_PPC32=y 23CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 24CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 25CONFIG_MMU=y
@@ -14,61 +30,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 30CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 31CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 32CONFIG_GENERIC_FIND_NEXT_BIT=y
33# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 34CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 35CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 36CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 41CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 45CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49# CONFIG_SMP is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 49
52# 50#
53# Code maturity level options 51# General setup
54# 52#
55CONFIG_EXPERIMENTAL=y 53CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 54CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 55CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 56CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 57CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 58CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 59CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 60CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 63# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 64# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 67CONFIG_LOG_BUF_SHIFT=14
@@ -100,24 +93,17 @@ CONFIG_SLAB=y
100CONFIG_RT_MUTEXES=y 93CONFIG_RT_MUTEXES=y
101# CONFIG_TINY_SHMEM is not set 94# CONFIG_TINY_SHMEM is not set
102CONFIG_BASE_SMALL=0 95CONFIG_BASE_SMALL=0
103
104#
105# Loadable module support
106#
107CONFIG_MODULES=y 96CONFIG_MODULES=y
108CONFIG_MODULE_UNLOAD=y 97CONFIG_MODULE_UNLOAD=y
109# CONFIG_MODULE_FORCE_UNLOAD is not set 98# CONFIG_MODULE_FORCE_UNLOAD is not set
110# CONFIG_MODVERSIONS is not set 99# CONFIG_MODVERSIONS is not set
111# CONFIG_MODULE_SRCVERSION_ALL is not set 100# CONFIG_MODULE_SRCVERSION_ALL is not set
112# CONFIG_KMOD is not set 101# CONFIG_KMOD is not set
113
114#
115# Block layer
116#
117CONFIG_BLOCK=y 102CONFIG_BLOCK=y
118# CONFIG_LBD is not set 103# CONFIG_LBD is not set
119# CONFIG_BLK_DEV_IO_TRACE is not set 104# CONFIG_BLK_DEV_IO_TRACE is not set
120# CONFIG_LSF is not set 105# CONFIG_LSF is not set
106# CONFIG_BLK_DEV_BSG is not set
121 107
122# 108#
123# IO Schedulers 109# IO Schedulers
@@ -135,6 +121,11 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
135# 121#
136# Platform support 122# Platform support
137# 123#
124# CONFIG_PPC_MULTIPLATFORM is not set
125# CONFIG_EMBEDDED6xx is not set
126# CONFIG_PPC_82xx is not set
127CONFIG_PPC_83xx=y
128# CONFIG_PPC_86xx is not set
138# CONFIG_PPC_MPC52xx is not set 129# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set 130# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set 131# CONFIG_PPC_CELL is not set
@@ -158,6 +149,7 @@ CONFIG_MPC834x=y
158# CONFIG_GENERIC_IOMAP is not set 149# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set 150# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set 151# CONFIG_CPM2 is not set
152# CONFIG_FSL_ULI1575 is not set
161 153
162# 154#
163# Kernel options 155# Kernel options
@@ -186,6 +178,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
186CONFIG_SPLIT_PTLOCK_CPUS=4 178CONFIG_SPLIT_PTLOCK_CPUS=4
187# CONFIG_RESOURCES_64BIT is not set 179# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1 180CONFIG_ZONE_DMA_FLAG=1
181CONFIG_BOUNCE=y
182CONFIG_VIRT_TO_BUS=y
189CONFIG_PROC_DEVICETREE=y 183CONFIG_PROC_DEVICETREE=y
190# CONFIG_CMDLINE_BOOL is not set 184# CONFIG_CMDLINE_BOOL is not set
191# CONFIG_PM is not set 185# CONFIG_PM is not set
@@ -200,10 +194,10 @@ CONFIG_ISA_DMA_API=y
200CONFIG_ZONE_DMA=y 194CONFIG_ZONE_DMA=y
201CONFIG_GENERIC_ISA_DMA=y 195CONFIG_GENERIC_ISA_DMA=y
202CONFIG_PPC_INDIRECT_PCI=y 196CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PPC_INDIRECT_PCI_BE is not set
204CONFIG_FSL_SOC=y 197CONFIG_FSL_SOC=y
205CONFIG_PCI=y 198CONFIG_PCI=y
206CONFIG_PCI_DOMAINS=y 199CONFIG_PCI_DOMAINS=y
200CONFIG_PCI_SYSCALL=y
207# CONFIG_PCIEPORTBUS is not set 201# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y 202CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set 203# CONFIG_PCI_MSI is not set
@@ -313,6 +307,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
313# CONFIG_MAC80211 is not set 307# CONFIG_MAC80211 is not set
314# CONFIG_IEEE80211 is not set 308# CONFIG_IEEE80211 is not set
315# CONFIG_RFKILL is not set 309# CONFIG_RFKILL is not set
310# CONFIG_NET_9P is not set
316 311
317# 312#
318# Device Drivers 313# Device Drivers
@@ -325,10 +320,6 @@ CONFIG_STANDALONE=y
325CONFIG_PREVENT_FIRMWARE_BUILD=y 320CONFIG_PREVENT_FIRMWARE_BUILD=y
326# CONFIG_FW_LOADER is not set 321# CONFIG_FW_LOADER is not set
327# CONFIG_SYS_HYPERVISOR is not set 322# CONFIG_SYS_HYPERVISOR is not set
328
329#
330# Connector - unified userspace <-> kernelspace linker
331#
332# CONFIG_CONNECTOR is not set 323# CONFIG_CONNECTOR is not set
333CONFIG_MTD=y 324CONFIG_MTD=y
334# CONFIG_MTD_DEBUG is not set 325# CONFIG_MTD_DEBUG is not set
@@ -408,20 +399,9 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
408# UBI - Unsorted block images 399# UBI - Unsorted block images
409# 400#
410# CONFIG_MTD_UBI is not set 401# CONFIG_MTD_UBI is not set
411 402CONFIG_OF_DEVICE=y
412#
413# Parallel port support
414#
415# CONFIG_PARPORT is not set 403# CONFIG_PARPORT is not set
416 404CONFIG_BLK_DEV=y
417#
418# Plug and Play support
419#
420# CONFIG_PNPACPI is not set
421
422#
423# Block devices
424#
425# CONFIG_BLK_DEV_FD is not set 405# CONFIG_BLK_DEV_FD is not set
426# CONFIG_BLK_CPQ_DA is not set 406# CONFIG_BLK_CPQ_DA is not set
427# CONFIG_BLK_CPQ_CISS_DA is not set 407# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -438,14 +418,11 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
438CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 418CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
439# CONFIG_CDROM_PKTCDVD is not set 419# CONFIG_CDROM_PKTCDVD is not set
440# CONFIG_ATA_OVER_ETH is not set 420# CONFIG_ATA_OVER_ETH is not set
441 421CONFIG_MISC_DEVICES=y
442#
443# Misc devices
444#
445# CONFIG_PHANTOM is not set 422# CONFIG_PHANTOM is not set
423# CONFIG_EEPROM_93CX6 is not set
446# CONFIG_SGI_IOC4 is not set 424# CONFIG_SGI_IOC4 is not set
447# CONFIG_TIFM_CORE is not set 425# CONFIG_TIFM_CORE is not set
448# CONFIG_BLINK is not set
449# CONFIG_IDE is not set 426# CONFIG_IDE is not set
450 427
451# 428#
@@ -453,6 +430,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
453# 430#
454# CONFIG_RAID_ATTRS is not set 431# CONFIG_RAID_ATTRS is not set
455CONFIG_SCSI=y 432CONFIG_SCSI=y
433CONFIG_SCSI_DMA=y
456# CONFIG_SCSI_TGT is not set 434# CONFIG_SCSI_TGT is not set
457# CONFIG_SCSI_NETLINK is not set 435# CONFIG_SCSI_NETLINK is not set
458CONFIG_SCSI_PROC_FS=y 436CONFIG_SCSI_PROC_FS=y
@@ -482,12 +460,8 @@ CONFIG_SCSI_WAIT_SCAN=m
482CONFIG_SCSI_SPI_ATTRS=y 460CONFIG_SCSI_SPI_ATTRS=y
483# CONFIG_SCSI_FC_ATTRS is not set 461# CONFIG_SCSI_FC_ATTRS is not set
484# CONFIG_SCSI_ISCSI_ATTRS is not set 462# CONFIG_SCSI_ISCSI_ATTRS is not set
485# CONFIG_SCSI_SAS_ATTRS is not set
486# CONFIG_SCSI_SAS_LIBSAS is not set 463# CONFIG_SCSI_SAS_LIBSAS is not set
487 464CONFIG_SCSI_LOWLEVEL=y
488#
489# SCSI low-level drivers
490#
491# CONFIG_ISCSI_TCP is not set 465# CONFIG_ISCSI_TCP is not set
492# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 466# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
493# CONFIG_SCSI_3W_9XXX is not set 467# CONFIG_SCSI_3W_9XXX is not set
@@ -523,10 +497,6 @@ CONFIG_SCSI_SPI_ATTRS=y
523# CONFIG_SCSI_DEBUG is not set 497# CONFIG_SCSI_DEBUG is not set
524# CONFIG_SCSI_SRP is not set 498# CONFIG_SCSI_SRP is not set
525# CONFIG_ATA is not set 499# CONFIG_ATA is not set
526
527#
528# Multi-device support (RAID and LVM)
529#
530# CONFIG_MD is not set 500# CONFIG_MD is not set
531 501
532# 502#
@@ -542,19 +512,13 @@ CONFIG_SCSI_SPI_ATTRS=y
542# 512#
543# CONFIG_FIREWIRE is not set 513# CONFIG_FIREWIRE is not set
544# CONFIG_IEEE1394 is not set 514# CONFIG_IEEE1394 is not set
545
546#
547# I2O device support
548#
549# CONFIG_I2O is not set 515# CONFIG_I2O is not set
550# CONFIG_MACINTOSH_DRIVERS is not set 516# CONFIG_MACINTOSH_DRIVERS is not set
551
552#
553# Network device support
554#
555CONFIG_NETDEVICES=y 517CONFIG_NETDEVICES=y
518# CONFIG_NETDEVICES_MULTIQUEUE is not set
556# CONFIG_DUMMY is not set 519# CONFIG_DUMMY is not set
557# CONFIG_BONDING is not set 520# CONFIG_BONDING is not set
521# CONFIG_MACVLAN is not set
558# CONFIG_EQUALIZER is not set 522# CONFIG_EQUALIZER is not set
559# CONFIG_TUN is not set 523# CONFIG_TUN is not set
560# CONFIG_ARCNET is not set 524# CONFIG_ARCNET is not set
@@ -571,11 +535,8 @@ CONFIG_CICADA_PHY=y
571# CONFIG_VITESSE_PHY is not set 535# CONFIG_VITESSE_PHY is not set
572# CONFIG_SMSC_PHY is not set 536# CONFIG_SMSC_PHY is not set
573# CONFIG_BROADCOM_PHY is not set 537# CONFIG_BROADCOM_PHY is not set
538# CONFIG_ICPLUS_PHY is not set
574# CONFIG_FIXED_PHY is not set 539# CONFIG_FIXED_PHY is not set
575
576#
577# Ethernet (10 or 100Mbit)
578#
579# CONFIG_NET_ETHERNET is not set 540# CONFIG_NET_ETHERNET is not set
580CONFIG_NETDEV_1000=y 541CONFIG_NETDEV_1000=y
581# CONFIG_ACENIC is not set 542# CONFIG_ACENIC is not set
@@ -588,7 +549,6 @@ CONFIG_NETDEV_1000=y
588# CONFIG_SIS190 is not set 549# CONFIG_SIS190 is not set
589# CONFIG_SKGE is not set 550# CONFIG_SKGE is not set
590# CONFIG_SKY2 is not set 551# CONFIG_SKY2 is not set
591# CONFIG_SK98LIN is not set
592# CONFIG_VIA_VELOCITY is not set 552# CONFIG_VIA_VELOCITY is not set
593# CONFIG_TIGON3 is not set 553# CONFIG_TIGON3 is not set
594# CONFIG_BNX2 is not set 554# CONFIG_BNX2 is not set
@@ -621,15 +581,7 @@ CONFIG_NETDEV_10000=y
621# CONFIG_NETCONSOLE is not set 581# CONFIG_NETCONSOLE is not set
622# CONFIG_NETPOLL is not set 582# CONFIG_NETPOLL is not set
623# CONFIG_NET_POLL_CONTROLLER is not set 583# CONFIG_NET_POLL_CONTROLLER is not set
624
625#
626# ISDN subsystem
627#
628# CONFIG_ISDN is not set 584# CONFIG_ISDN is not set
629
630#
631# Telephony Support
632#
633# CONFIG_PHONE is not set 585# CONFIG_PHONE is not set
634 586
635# 587#
@@ -670,10 +622,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
670CONFIG_UNIX98_PTYS=y 622CONFIG_UNIX98_PTYS=y
671CONFIG_LEGACY_PTYS=y 623CONFIG_LEGACY_PTYS=y
672CONFIG_LEGACY_PTY_COUNT=256 624CONFIG_LEGACY_PTY_COUNT=256
673
674#
675# IPMI
676#
677# CONFIG_IPMI_HANDLER is not set 625# CONFIG_IPMI_HANDLER is not set
678CONFIG_WATCHDOG=y 626CONFIG_WATCHDOG=y
679# CONFIG_WATCHDOG_NOWAYOUT is not set 627# CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -697,10 +645,6 @@ CONFIG_HW_RANDOM=y
697# CONFIG_AGP is not set 645# CONFIG_AGP is not set
698# CONFIG_DRM is not set 646# CONFIG_DRM is not set
699# CONFIG_RAW_DRIVER is not set 647# CONFIG_RAW_DRIVER is not set
700
701#
702# TPM devices
703#
704# CONFIG_TCG_TPM is not set 648# CONFIG_TCG_TPM is not set
705CONFIG_DEVPORT=y 649CONFIG_DEVPORT=y
706CONFIG_I2C=y 650CONFIG_I2C=y
@@ -735,6 +679,7 @@ CONFIG_I2C_MPC=y
735# CONFIG_I2C_SIS5595 is not set 679# CONFIG_I2C_SIS5595 is not set
736# CONFIG_I2C_SIS630 is not set 680# CONFIG_I2C_SIS630 is not set
737# CONFIG_I2C_SIS96X is not set 681# CONFIG_I2C_SIS96X is not set
682# CONFIG_I2C_TAOS_EVM is not set
738# CONFIG_I2C_STUB is not set 683# CONFIG_I2C_STUB is not set
739# CONFIG_I2C_VIA is not set 684# CONFIG_I2C_VIA is not set
740# CONFIG_I2C_VIAPRO is not set 685# CONFIG_I2C_VIAPRO is not set
@@ -745,12 +690,14 @@ CONFIG_I2C_MPC=y
745# 690#
746# CONFIG_SENSORS_DS1337 is not set 691# CONFIG_SENSORS_DS1337 is not set
747# CONFIG_SENSORS_DS1374 is not set 692# CONFIG_SENSORS_DS1374 is not set
693# CONFIG_DS1682 is not set
748# CONFIG_SENSORS_EEPROM is not set 694# CONFIG_SENSORS_EEPROM is not set
749CONFIG_SENSORS_PCF8574=y 695CONFIG_SENSORS_PCF8574=y
750# CONFIG_SENSORS_PCA9539 is not set 696# CONFIG_SENSORS_PCA9539 is not set
751# CONFIG_SENSORS_PCF8591 is not set 697# CONFIG_SENSORS_PCF8591 is not set
752# CONFIG_SENSORS_M41T00 is not set 698# CONFIG_SENSORS_M41T00 is not set
753# CONFIG_SENSORS_MAX6875 is not set 699# CONFIG_SENSORS_MAX6875 is not set
700# CONFIG_SENSORS_TSL2550 is not set
754# CONFIG_I2C_DEBUG_CORE is not set 701# CONFIG_I2C_DEBUG_CORE is not set
755# CONFIG_I2C_DEBUG_ALGO is not set 702# CONFIG_I2C_DEBUG_ALGO is not set
756# CONFIG_I2C_DEBUG_BUS is not set 703# CONFIG_I2C_DEBUG_BUS is not set
@@ -773,11 +720,9 @@ CONFIG_SPI_MPC83xx=y
773# 720#
774# CONFIG_SPI_AT25 is not set 721# CONFIG_SPI_AT25 is not set
775# CONFIG_SPI_SPIDEV is not set 722# CONFIG_SPI_SPIDEV is not set
776 723# CONFIG_SPI_TLE62X0 is not set
777#
778# Dallas's 1-wire bus
779#
780# CONFIG_W1 is not set 724# CONFIG_W1 is not set
725# CONFIG_POWER_SUPPLY is not set
781# CONFIG_HWMON is not set 726# CONFIG_HWMON is not set
782 727
783# 728#
@@ -802,6 +747,7 @@ CONFIG_DAB=y
802# 747#
803# CONFIG_DISPLAY_SUPPORT is not set 748# CONFIG_DISPLAY_SUPPORT is not set
804# CONFIG_VGASTATE is not set 749# CONFIG_VGASTATE is not set
750CONFIG_VIDEO_OUTPUT_CONTROL=m
805# CONFIG_FB is not set 751# CONFIG_FB is not set
806# CONFIG_FB_IBM_GXT4500 is not set 752# CONFIG_FB_IBM_GXT4500 is not set
807 753
@@ -809,14 +755,13 @@ CONFIG_DAB=y
809# Sound 755# Sound
810# 756#
811# CONFIG_SOUND is not set 757# CONFIG_SOUND is not set
812 758CONFIG_USB_SUPPORT=y
813#
814# USB support
815#
816CONFIG_USB_ARCH_HAS_HCD=y 759CONFIG_USB_ARCH_HAS_HCD=y
817CONFIG_USB_ARCH_HAS_OHCI=y 760CONFIG_USB_ARCH_HAS_OHCI=y
818CONFIG_USB_ARCH_HAS_EHCI=y 761CONFIG_USB_ARCH_HAS_EHCI=y
819# CONFIG_USB is not set 762# CONFIG_USB is not set
763CONFIG_USB_EHCI_ROOT_HUB_TT=y
764CONFIG_USB_EHCI_FSL=y
820 765
821# 766#
822# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 767# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -827,32 +772,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
827# 772#
828# CONFIG_USB_GADGET is not set 773# CONFIG_USB_GADGET is not set
829# CONFIG_MMC is not set 774# CONFIG_MMC is not set
830
831#
832# LED devices
833#
834# CONFIG_NEW_LEDS is not set 775# CONFIG_NEW_LEDS is not set
835
836#
837# LED drivers
838#
839
840#
841# LED Triggers
842#
843
844#
845# InfiniBand support
846#
847# CONFIG_INFINIBAND is not set 776# CONFIG_INFINIBAND is not set
848 777# CONFIG_EDAC is not set
849#
850# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
851#
852
853#
854# Real Time Clock
855#
856CONFIG_RTC_LIB=y 778CONFIG_RTC_LIB=y
857CONFIG_RTC_CLASS=y 779CONFIG_RTC_CLASS=y
858CONFIG_RTC_HCTOSYS=y 780CONFIG_RTC_HCTOSYS=y
@@ -879,6 +801,7 @@ CONFIG_RTC_DRV_DS1307=y
879# CONFIG_RTC_DRV_X1205 is not set 801# CONFIG_RTC_DRV_X1205 is not set
880# CONFIG_RTC_DRV_PCF8563 is not set 802# CONFIG_RTC_DRV_PCF8563 is not set
881# CONFIG_RTC_DRV_PCF8583 is not set 803# CONFIG_RTC_DRV_PCF8583 is not set
804# CONFIG_RTC_DRV_M41T80 is not set
882 805
883# 806#
884# SPI RTC drivers 807# SPI RTC drivers
@@ -889,9 +812,12 @@ CONFIG_RTC_DRV_DS1307=y
889# 812#
890# Platform RTC drivers 813# Platform RTC drivers
891# 814#
815# CONFIG_RTC_DRV_CMOS is not set
892# CONFIG_RTC_DRV_DS1553 is not set 816# CONFIG_RTC_DRV_DS1553 is not set
817# CONFIG_RTC_DRV_STK17TA8 is not set
893# CONFIG_RTC_DRV_DS1742 is not set 818# CONFIG_RTC_DRV_DS1742 is not set
894# CONFIG_RTC_DRV_M48T86 is not set 819# CONFIG_RTC_DRV_M48T86 is not set
820# CONFIG_RTC_DRV_M48T59 is not set
895# CONFIG_RTC_DRV_V3020 is not set 821# CONFIG_RTC_DRV_V3020 is not set
896 822
897# 823#
@@ -914,6 +840,11 @@ CONFIG_NET_DMA=y
914CONFIG_INTEL_IOATDMA=y 840CONFIG_INTEL_IOATDMA=y
915 841
916# 842#
843# Userspace I/O
844#
845# CONFIG_UIO is not set
846
847#
917# File systems 848# File systems
918# 849#
919CONFIG_EXT2_FS=y 850CONFIG_EXT2_FS=y
@@ -1013,7 +944,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
1013# CONFIG_NCP_FS is not set 944# CONFIG_NCP_FS is not set
1014# CONFIG_CODA_FS is not set 945# CONFIG_CODA_FS is not set
1015# CONFIG_AFS_FS is not set 946# CONFIG_AFS_FS is not set
1016# CONFIG_9P_FS is not set
1017 947
1018# 948#
1019# Partition Types 949# Partition Types
@@ -1095,6 +1025,7 @@ CONFIG_BITREVERSE=y
1095# CONFIG_CRC16 is not set 1025# CONFIG_CRC16 is not set
1096# CONFIG_CRC_ITU_T is not set 1026# CONFIG_CRC_ITU_T is not set
1097CONFIG_CRC32=y 1027CONFIG_CRC32=y
1028# CONFIG_CRC7 is not set
1098# CONFIG_LIBCRC32C is not set 1029# CONFIG_LIBCRC32C is not set
1099CONFIG_PLIST=y 1030CONFIG_PLIST=y
1100CONFIG_HAS_IOMEM=y 1031CONFIG_HAS_IOMEM=y
@@ -1117,7 +1048,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1117# CONFIG_HEADERS_CHECK is not set 1048# CONFIG_HEADERS_CHECK is not set
1118# CONFIG_DEBUG_KERNEL is not set 1049# CONFIG_DEBUG_KERNEL is not set
1119# CONFIG_DEBUG_BUGVERBOSE is not set 1050# CONFIG_DEBUG_BUGVERBOSE is not set
1120# CONFIG_BOOTX_TEXT is not set
1121# CONFIG_PPC_EARLY_DEBUG is not set 1051# CONFIG_PPC_EARLY_DEBUG is not set
1122 1052
1123# 1053#
@@ -1125,10 +1055,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1125# 1055#
1126# CONFIG_KEYS is not set 1056# CONFIG_KEYS is not set
1127# CONFIG_SECURITY is not set 1057# CONFIG_SECURITY is not set
1128
1129#
1130# Cryptographic options
1131#
1132CONFIG_CRYPTO=y 1058CONFIG_CRYPTO=y
1133CONFIG_CRYPTO_ALGAPI=y 1059CONFIG_CRYPTO_ALGAPI=y
1134CONFIG_CRYPTO_BLKCIPHER=y 1060CONFIG_CRYPTO_BLKCIPHER=y
@@ -1166,7 +1092,4 @@ CONFIG_CRYPTO_DES=y
1166# CONFIG_CRYPTO_CRC32C is not set 1092# CONFIG_CRYPTO_CRC32C is not set
1167# CONFIG_CRYPTO_CAMELLIA is not set 1093# CONFIG_CRYPTO_CAMELLIA is not set
1168# CONFIG_CRYPTO_TEST is not set 1094# CONFIG_CRYPTO_TEST is not set
1169 1095CONFIG_CRYPTO_HW=y
1170#
1171# Hardware crypto devices
1172#
diff --git a/arch/powerpc/configs/mpc834x_mds_defconfig b/arch/powerpc/configs/mpc834x_mds_defconfig
index c28b3ee3cb..06233b1a94 100644
--- a/arch/powerpc/configs/mpc834x_mds_defconfig
+++ b/arch/powerpc/configs/mpc834x_mds_defconfig
@@ -1,9 +1,25 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:56:57 2007 4# Tue Aug 28 21:24:41 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_83xx=y
18CONFIG_PPC_FPU=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
7CONFIG_PPC32=y 23CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 24CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 25CONFIG_MMU=y
@@ -14,61 +30,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 30CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 31CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 32CONFIG_GENERIC_FIND_NEXT_BIT=y
33# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 34CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 35CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 36CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 41CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 45CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49# CONFIG_SMP is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 49
52# 50#
53# Code maturity level options 51# General setup
54# 52#
55CONFIG_EXPERIMENTAL=y 53CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 54CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 55CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 56CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 57CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 58CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 59CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 60CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 63# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 64# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 67CONFIG_LOG_BUF_SHIFT=14
@@ -100,24 +93,17 @@ CONFIG_SLAB=y
100CONFIG_RT_MUTEXES=y 93CONFIG_RT_MUTEXES=y
101# CONFIG_TINY_SHMEM is not set 94# CONFIG_TINY_SHMEM is not set
102CONFIG_BASE_SMALL=0 95CONFIG_BASE_SMALL=0
103
104#
105# Loadable module support
106#
107CONFIG_MODULES=y 96CONFIG_MODULES=y
108CONFIG_MODULE_UNLOAD=y 97CONFIG_MODULE_UNLOAD=y
109# CONFIG_MODULE_FORCE_UNLOAD is not set 98# CONFIG_MODULE_FORCE_UNLOAD is not set
110# CONFIG_MODVERSIONS is not set 99# CONFIG_MODVERSIONS is not set
111# CONFIG_MODULE_SRCVERSION_ALL is not set 100# CONFIG_MODULE_SRCVERSION_ALL is not set
112# CONFIG_KMOD is not set 101# CONFIG_KMOD is not set
113
114#
115# Block layer
116#
117CONFIG_BLOCK=y 102CONFIG_BLOCK=y
118# CONFIG_LBD is not set 103# CONFIG_LBD is not set
119# CONFIG_BLK_DEV_IO_TRACE is not set 104# CONFIG_BLK_DEV_IO_TRACE is not set
120# CONFIG_LSF is not set 105# CONFIG_LSF is not set
106# CONFIG_BLK_DEV_BSG is not set
121 107
122# 108#
123# IO Schedulers 109# IO Schedulers
@@ -135,6 +121,11 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
135# 121#
136# Platform support 122# Platform support
137# 123#
124# CONFIG_PPC_MULTIPLATFORM is not set
125# CONFIG_EMBEDDED6xx is not set
126# CONFIG_PPC_82xx is not set
127CONFIG_PPC_83xx=y
128# CONFIG_PPC_86xx is not set
138# CONFIG_PPC_MPC52xx is not set 129# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set 130# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set 131# CONFIG_PPC_CELL is not set
@@ -158,6 +149,7 @@ CONFIG_MPC834x=y
158# CONFIG_GENERIC_IOMAP is not set 149# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set 150# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set 151# CONFIG_CPM2 is not set
152# CONFIG_FSL_ULI1575 is not set
161 153
162# 154#
163# Kernel options 155# Kernel options
@@ -186,6 +178,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
186CONFIG_SPLIT_PTLOCK_CPUS=4 178CONFIG_SPLIT_PTLOCK_CPUS=4
187# CONFIG_RESOURCES_64BIT is not set 179# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1 180CONFIG_ZONE_DMA_FLAG=1
181CONFIG_BOUNCE=y
182CONFIG_VIRT_TO_BUS=y
189CONFIG_PROC_DEVICETREE=y 183CONFIG_PROC_DEVICETREE=y
190# CONFIG_CMDLINE_BOOL is not set 184# CONFIG_CMDLINE_BOOL is not set
191# CONFIG_PM is not set 185# CONFIG_PM is not set
@@ -200,10 +194,10 @@ CONFIG_ISA_DMA_API=y
200CONFIG_ZONE_DMA=y 194CONFIG_ZONE_DMA=y
201CONFIG_GENERIC_ISA_DMA=y 195CONFIG_GENERIC_ISA_DMA=y
202CONFIG_PPC_INDIRECT_PCI=y 196CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PPC_INDIRECT_PCI_BE is not set
204CONFIG_FSL_SOC=y 197CONFIG_FSL_SOC=y
205CONFIG_PCI=y 198CONFIG_PCI=y
206CONFIG_PCI_DOMAINS=y 199CONFIG_PCI_DOMAINS=y
200CONFIG_PCI_SYSCALL=y
207# CONFIG_PCIEPORTBUS is not set 201# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y 202CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set 203# CONFIG_PCI_MSI is not set
@@ -313,6 +307,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
313# CONFIG_MAC80211 is not set 307# CONFIG_MAC80211 is not set
314# CONFIG_IEEE80211 is not set 308# CONFIG_IEEE80211 is not set
315# CONFIG_RFKILL is not set 309# CONFIG_RFKILL is not set
310# CONFIG_NET_9P is not set
316 311
317# 312#
318# Device Drivers 313# Device Drivers
@@ -325,26 +320,11 @@ CONFIG_STANDALONE=y
325CONFIG_PREVENT_FIRMWARE_BUILD=y 320CONFIG_PREVENT_FIRMWARE_BUILD=y
326# CONFIG_FW_LOADER is not set 321# CONFIG_FW_LOADER is not set
327# CONFIG_SYS_HYPERVISOR is not set 322# CONFIG_SYS_HYPERVISOR is not set
328
329#
330# Connector - unified userspace <-> kernelspace linker
331#
332# CONFIG_CONNECTOR is not set 323# CONFIG_CONNECTOR is not set
333# CONFIG_MTD is not set 324# CONFIG_MTD is not set
334 325CONFIG_OF_DEVICE=y
335#
336# Parallel port support
337#
338# CONFIG_PARPORT is not set 326# CONFIG_PARPORT is not set
339 327CONFIG_BLK_DEV=y
340#
341# Plug and Play support
342#
343# CONFIG_PNPACPI is not set
344
345#
346# Block devices
347#
348# CONFIG_BLK_DEV_FD is not set 328# CONFIG_BLK_DEV_FD is not set
349# CONFIG_BLK_CPQ_DA is not set 329# CONFIG_BLK_CPQ_DA is not set
350# CONFIG_BLK_CPQ_CISS_DA is not set 330# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -361,14 +341,11 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
361CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 341CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
362# CONFIG_CDROM_PKTCDVD is not set 342# CONFIG_CDROM_PKTCDVD is not set
363# CONFIG_ATA_OVER_ETH is not set 343# CONFIG_ATA_OVER_ETH is not set
364 344CONFIG_MISC_DEVICES=y
365#
366# Misc devices
367#
368# CONFIG_PHANTOM is not set 345# CONFIG_PHANTOM is not set
346# CONFIG_EEPROM_93CX6 is not set
369# CONFIG_SGI_IOC4 is not set 347# CONFIG_SGI_IOC4 is not set
370# CONFIG_TIFM_CORE is not set 348# CONFIG_TIFM_CORE is not set
371# CONFIG_BLINK is not set
372# CONFIG_IDE is not set 349# CONFIG_IDE is not set
373 350
374# 351#
@@ -376,12 +353,9 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
376# 353#
377# CONFIG_RAID_ATTRS is not set 354# CONFIG_RAID_ATTRS is not set
378# CONFIG_SCSI is not set 355# CONFIG_SCSI is not set
356# CONFIG_SCSI_DMA is not set
379# CONFIG_SCSI_NETLINK is not set 357# CONFIG_SCSI_NETLINK is not set
380# CONFIG_ATA is not set 358# CONFIG_ATA is not set
381
382#
383# Multi-device support (RAID and LVM)
384#
385# CONFIG_MD is not set 359# CONFIG_MD is not set
386 360
387# 361#
@@ -394,19 +368,13 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
394# 368#
395# CONFIG_FIREWIRE is not set 369# CONFIG_FIREWIRE is not set
396# CONFIG_IEEE1394 is not set 370# CONFIG_IEEE1394 is not set
397
398#
399# I2O device support
400#
401# CONFIG_I2O is not set 371# CONFIG_I2O is not set
402# CONFIG_MACINTOSH_DRIVERS is not set 372# CONFIG_MACINTOSH_DRIVERS is not set
403
404#
405# Network device support
406#
407CONFIG_NETDEVICES=y 373CONFIG_NETDEVICES=y
374# CONFIG_NETDEVICES_MULTIQUEUE is not set
408# CONFIG_DUMMY is not set 375# CONFIG_DUMMY is not set
409# CONFIG_BONDING is not set 376# CONFIG_BONDING is not set
377# CONFIG_MACVLAN is not set
410# CONFIG_EQUALIZER is not set 378# CONFIG_EQUALIZER is not set
411# CONFIG_TUN is not set 379# CONFIG_TUN is not set
412# CONFIG_ARCNET is not set 380# CONFIG_ARCNET is not set
@@ -423,21 +391,14 @@ CONFIG_MARVELL_PHY=y
423# CONFIG_VITESSE_PHY is not set 391# CONFIG_VITESSE_PHY is not set
424# CONFIG_SMSC_PHY is not set 392# CONFIG_SMSC_PHY is not set
425# CONFIG_BROADCOM_PHY is not set 393# CONFIG_BROADCOM_PHY is not set
394# CONFIG_ICPLUS_PHY is not set
426# CONFIG_FIXED_PHY is not set 395# CONFIG_FIXED_PHY is not set
427
428#
429# Ethernet (10 or 100Mbit)
430#
431CONFIG_NET_ETHERNET=y 396CONFIG_NET_ETHERNET=y
432CONFIG_MII=y 397CONFIG_MII=y
433# CONFIG_HAPPYMEAL is not set 398# CONFIG_HAPPYMEAL is not set
434# CONFIG_SUNGEM is not set 399# CONFIG_SUNGEM is not set
435# CONFIG_CASSINI is not set 400# CONFIG_CASSINI is not set
436# CONFIG_NET_VENDOR_3COM is not set 401# CONFIG_NET_VENDOR_3COM is not set
437
438#
439# Tulip family network device support
440#
441# CONFIG_NET_TULIP is not set 402# CONFIG_NET_TULIP is not set
442# CONFIG_HP100 is not set 403# CONFIG_HP100 is not set
443CONFIG_NET_PCI=y 404CONFIG_NET_PCI=y
@@ -471,7 +432,6 @@ CONFIG_NETDEV_1000=y
471# CONFIG_SIS190 is not set 432# CONFIG_SIS190 is not set
472# CONFIG_SKGE is not set 433# CONFIG_SKGE is not set
473# CONFIG_SKY2 is not set 434# CONFIG_SKY2 is not set
474# CONFIG_SK98LIN is not set
475# CONFIG_VIA_VELOCITY is not set 435# CONFIG_VIA_VELOCITY is not set
476# CONFIG_TIGON3 is not set 436# CONFIG_TIGON3 is not set
477# CONFIG_BNX2 is not set 437# CONFIG_BNX2 is not set
@@ -503,15 +463,7 @@ CONFIG_NETDEV_10000=y
503# CONFIG_NETCONSOLE is not set 463# CONFIG_NETCONSOLE is not set
504# CONFIG_NETPOLL is not set 464# CONFIG_NETPOLL is not set
505# CONFIG_NET_POLL_CONTROLLER is not set 465# CONFIG_NET_POLL_CONTROLLER is not set
506
507#
508# ISDN subsystem
509#
510# CONFIG_ISDN is not set 466# CONFIG_ISDN is not set
511
512#
513# Telephony Support
514#
515# CONFIG_PHONE is not set 467# CONFIG_PHONE is not set
516 468
517# 469#
@@ -573,10 +525,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
573CONFIG_UNIX98_PTYS=y 525CONFIG_UNIX98_PTYS=y
574CONFIG_LEGACY_PTYS=y 526CONFIG_LEGACY_PTYS=y
575CONFIG_LEGACY_PTY_COUNT=256 527CONFIG_LEGACY_PTY_COUNT=256
576
577#
578# IPMI
579#
580# CONFIG_IPMI_HANDLER is not set 528# CONFIG_IPMI_HANDLER is not set
581CONFIG_WATCHDOG=y 529CONFIG_WATCHDOG=y
582# CONFIG_WATCHDOG_NOWAYOUT is not set 530# CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -601,10 +549,6 @@ CONFIG_GEN_RTC=y
601# CONFIG_AGP is not set 549# CONFIG_AGP is not set
602# CONFIG_DRM is not set 550# CONFIG_DRM is not set
603# CONFIG_RAW_DRIVER is not set 551# CONFIG_RAW_DRIVER is not set
604
605#
606# TPM devices
607#
608# CONFIG_TCG_TPM is not set 552# CONFIG_TCG_TPM is not set
609CONFIG_DEVPORT=y 553CONFIG_DEVPORT=y
610CONFIG_I2C=y 554CONFIG_I2C=y
@@ -639,6 +583,7 @@ CONFIG_I2C_MPC=y
639# CONFIG_I2C_SIS5595 is not set 583# CONFIG_I2C_SIS5595 is not set
640# CONFIG_I2C_SIS630 is not set 584# CONFIG_I2C_SIS630 is not set
641# CONFIG_I2C_SIS96X is not set 585# CONFIG_I2C_SIS96X is not set
586# CONFIG_I2C_TAOS_EVM is not set
642# CONFIG_I2C_STUB is not set 587# CONFIG_I2C_STUB is not set
643# CONFIG_I2C_VIA is not set 588# CONFIG_I2C_VIA is not set
644# CONFIG_I2C_VIAPRO is not set 589# CONFIG_I2C_VIAPRO is not set
@@ -649,12 +594,14 @@ CONFIG_I2C_MPC=y
649# 594#
650# CONFIG_SENSORS_DS1337 is not set 595# CONFIG_SENSORS_DS1337 is not set
651# CONFIG_SENSORS_DS1374 is not set 596# CONFIG_SENSORS_DS1374 is not set
597# CONFIG_DS1682 is not set
652# CONFIG_SENSORS_EEPROM is not set 598# CONFIG_SENSORS_EEPROM is not set
653# CONFIG_SENSORS_PCF8574 is not set 599# CONFIG_SENSORS_PCF8574 is not set
654# CONFIG_SENSORS_PCA9539 is not set 600# CONFIG_SENSORS_PCA9539 is not set
655# CONFIG_SENSORS_PCF8591 is not set 601# CONFIG_SENSORS_PCF8591 is not set
656# CONFIG_SENSORS_M41T00 is not set 602# CONFIG_SENSORS_M41T00 is not set
657# CONFIG_SENSORS_MAX6875 is not set 603# CONFIG_SENSORS_MAX6875 is not set
604# CONFIG_SENSORS_TSL2550 is not set
658# CONFIG_I2C_DEBUG_CORE is not set 605# CONFIG_I2C_DEBUG_CORE is not set
659# CONFIG_I2C_DEBUG_ALGO is not set 606# CONFIG_I2C_DEBUG_ALGO is not set
660# CONFIG_I2C_DEBUG_BUS is not set 607# CONFIG_I2C_DEBUG_BUS is not set
@@ -665,14 +612,12 @@ CONFIG_I2C_MPC=y
665# 612#
666# CONFIG_SPI is not set 613# CONFIG_SPI is not set
667# CONFIG_SPI_MASTER is not set 614# CONFIG_SPI_MASTER is not set
668
669#
670# Dallas's 1-wire bus
671#
672# CONFIG_W1 is not set 615# CONFIG_W1 is not set
616# CONFIG_POWER_SUPPLY is not set
673CONFIG_HWMON=y 617CONFIG_HWMON=y
674# CONFIG_HWMON_VID is not set 618# CONFIG_HWMON_VID is not set
675# CONFIG_SENSORS_ABITUGURU is not set 619# CONFIG_SENSORS_ABITUGURU is not set
620# CONFIG_SENSORS_ABITUGURU3 is not set
676# CONFIG_SENSORS_AD7418 is not set 621# CONFIG_SENSORS_AD7418 is not set
677# CONFIG_SENSORS_ADM1021 is not set 622# CONFIG_SENSORS_ADM1021 is not set
678# CONFIG_SENSORS_ADM1025 is not set 623# CONFIG_SENSORS_ADM1025 is not set
@@ -699,14 +644,17 @@ CONFIG_HWMON=y
699# CONFIG_SENSORS_LM87 is not set 644# CONFIG_SENSORS_LM87 is not set
700# CONFIG_SENSORS_LM90 is not set 645# CONFIG_SENSORS_LM90 is not set
701# CONFIG_SENSORS_LM92 is not set 646# CONFIG_SENSORS_LM92 is not set
647# CONFIG_SENSORS_LM93 is not set
702# CONFIG_SENSORS_MAX1619 is not set 648# CONFIG_SENSORS_MAX1619 is not set
703# CONFIG_SENSORS_MAX6650 is not set 649# CONFIG_SENSORS_MAX6650 is not set
704# CONFIG_SENSORS_PC87360 is not set 650# CONFIG_SENSORS_PC87360 is not set
705# CONFIG_SENSORS_PC87427 is not set 651# CONFIG_SENSORS_PC87427 is not set
706# CONFIG_SENSORS_SIS5595 is not set 652# CONFIG_SENSORS_SIS5595 is not set
653# CONFIG_SENSORS_DME1737 is not set
707# CONFIG_SENSORS_SMSC47M1 is not set 654# CONFIG_SENSORS_SMSC47M1 is not set
708# CONFIG_SENSORS_SMSC47M192 is not set 655# CONFIG_SENSORS_SMSC47M192 is not set
709# CONFIG_SENSORS_SMSC47B397 is not set 656# CONFIG_SENSORS_SMSC47B397 is not set
657# CONFIG_SENSORS_THMC50 is not set
710# CONFIG_SENSORS_VIA686A is not set 658# CONFIG_SENSORS_VIA686A is not set
711# CONFIG_SENSORS_VT1211 is not set 659# CONFIG_SENSORS_VT1211 is not set
712# CONFIG_SENSORS_VT8231 is not set 660# CONFIG_SENSORS_VT8231 is not set
@@ -741,6 +689,7 @@ CONFIG_DAB=y
741# 689#
742# CONFIG_DISPLAY_SUPPORT is not set 690# CONFIG_DISPLAY_SUPPORT is not set
743# CONFIG_VGASTATE is not set 691# CONFIG_VGASTATE is not set
692CONFIG_VIDEO_OUTPUT_CONTROL=m
744# CONFIG_FB is not set 693# CONFIG_FB is not set
745# CONFIG_FB_IBM_GXT4500 is not set 694# CONFIG_FB_IBM_GXT4500 is not set
746 695
@@ -748,20 +697,16 @@ CONFIG_DAB=y
748# Sound 697# Sound
749# 698#
750# CONFIG_SOUND is not set 699# CONFIG_SOUND is not set
751 700CONFIG_HID_SUPPORT=y
752#
753# HID Devices
754#
755CONFIG_HID=y 701CONFIG_HID=y
756# CONFIG_HID_DEBUG is not set 702# CONFIG_HID_DEBUG is not set
757 703CONFIG_USB_SUPPORT=y
758#
759# USB support
760#
761CONFIG_USB_ARCH_HAS_HCD=y 704CONFIG_USB_ARCH_HAS_HCD=y
762CONFIG_USB_ARCH_HAS_OHCI=y 705CONFIG_USB_ARCH_HAS_OHCI=y
763CONFIG_USB_ARCH_HAS_EHCI=y 706CONFIG_USB_ARCH_HAS_EHCI=y
764# CONFIG_USB is not set 707# CONFIG_USB is not set
708CONFIG_USB_EHCI_ROOT_HUB_TT=y
709CONFIG_USB_EHCI_FSL=y
765 710
766# 711#
767# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 712# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -772,32 +717,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
772# 717#
773# CONFIG_USB_GADGET is not set 718# CONFIG_USB_GADGET is not set
774# CONFIG_MMC is not set 719# CONFIG_MMC is not set
775
776#
777# LED devices
778#
779# CONFIG_NEW_LEDS is not set 720# CONFIG_NEW_LEDS is not set
780
781#
782# LED drivers
783#
784
785#
786# LED Triggers
787#
788
789#
790# InfiniBand support
791#
792# CONFIG_INFINIBAND is not set 721# CONFIG_INFINIBAND is not set
793 722# CONFIG_EDAC is not set
794#
795# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
796#
797
798#
799# Real Time Clock
800#
801# CONFIG_RTC_CLASS is not set 723# CONFIG_RTC_CLASS is not set
802 724
803# 725#
@@ -814,6 +736,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
814# 736#
815 737
816# 738#
739# Userspace I/O
740#
741# CONFIG_UIO is not set
742
743#
817# File systems 744# File systems
818# 745#
819CONFIG_EXT2_FS=y 746CONFIG_EXT2_FS=y
@@ -909,7 +836,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
909# CONFIG_NCP_FS is not set 836# CONFIG_NCP_FS is not set
910# CONFIG_CODA_FS is not set 837# CONFIG_CODA_FS is not set
911# CONFIG_AFS_FS is not set 838# CONFIG_AFS_FS is not set
912# CONFIG_9P_FS is not set
913 839
914# 840#
915# Partition Types 841# Partition Types
@@ -948,6 +874,7 @@ CONFIG_BITREVERSE=y
948# CONFIG_CRC16 is not set 874# CONFIG_CRC16 is not set
949# CONFIG_CRC_ITU_T is not set 875# CONFIG_CRC_ITU_T is not set
950CONFIG_CRC32=y 876CONFIG_CRC32=y
877# CONFIG_CRC7 is not set
951# CONFIG_LIBCRC32C is not set 878# CONFIG_LIBCRC32C is not set
952CONFIG_PLIST=y 879CONFIG_PLIST=y
953CONFIG_HAS_IOMEM=y 880CONFIG_HAS_IOMEM=y
@@ -970,7 +897,6 @@ CONFIG_ENABLE_MUST_CHECK=y
970# CONFIG_HEADERS_CHECK is not set 897# CONFIG_HEADERS_CHECK is not set
971# CONFIG_DEBUG_KERNEL is not set 898# CONFIG_DEBUG_KERNEL is not set
972# CONFIG_DEBUG_BUGVERBOSE is not set 899# CONFIG_DEBUG_BUGVERBOSE is not set
973# CONFIG_BOOTX_TEXT is not set
974# CONFIG_PPC_EARLY_DEBUG is not set 900# CONFIG_PPC_EARLY_DEBUG is not set
975 901
976# 902#
@@ -978,10 +904,6 @@ CONFIG_ENABLE_MUST_CHECK=y
978# 904#
979# CONFIG_KEYS is not set 905# CONFIG_KEYS is not set
980# CONFIG_SECURITY is not set 906# CONFIG_SECURITY is not set
981
982#
983# Cryptographic options
984#
985CONFIG_CRYPTO=y 907CONFIG_CRYPTO=y
986CONFIG_CRYPTO_ALGAPI=y 908CONFIG_CRYPTO_ALGAPI=y
987CONFIG_CRYPTO_BLKCIPHER=y 909CONFIG_CRYPTO_BLKCIPHER=y
@@ -1019,7 +941,4 @@ CONFIG_CRYPTO_DES=y
1019# CONFIG_CRYPTO_CRC32C is not set 941# CONFIG_CRYPTO_CRC32C is not set
1020# CONFIG_CRYPTO_CAMELLIA is not set 942# CONFIG_CRYPTO_CAMELLIA is not set
1021# CONFIG_CRYPTO_TEST is not set 943# CONFIG_CRYPTO_TEST is not set
1022 944CONFIG_CRYPTO_HW=y
1023#
1024# Hardware crypto devices
1025#
diff --git a/arch/powerpc/configs/mpc836x_mds_defconfig b/arch/powerpc/configs/mpc836x_mds_defconfig
index bcbbc167f9..3045749d62 100644
--- a/arch/powerpc/configs/mpc836x_mds_defconfig
+++ b/arch/powerpc/configs/mpc836x_mds_defconfig
@@ -1,9 +1,25 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:56:57 2007 4# Tue Aug 28 21:24:42 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_83xx=y
18CONFIG_PPC_FPU=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
7CONFIG_PPC32=y 23CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 24CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 25CONFIG_MMU=y
@@ -14,61 +30,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 30CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 31CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 32CONFIG_GENERIC_FIND_NEXT_BIT=y
33# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 34CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 35CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 36CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 41CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 45CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49# CONFIG_SMP is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 49
52# 50#
53# Code maturity level options 51# General setup
54# 52#
55CONFIG_EXPERIMENTAL=y 53CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 54CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 55CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 56CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 57CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 58CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 59CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 60CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 63# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 64# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 67CONFIG_LOG_BUF_SHIFT=14
@@ -100,24 +93,17 @@ CONFIG_SLAB=y
100CONFIG_RT_MUTEXES=y 93CONFIG_RT_MUTEXES=y
101# CONFIG_TINY_SHMEM is not set 94# CONFIG_TINY_SHMEM is not set
102CONFIG_BASE_SMALL=0 95CONFIG_BASE_SMALL=0
103
104#
105# Loadable module support
106#
107CONFIG_MODULES=y 96CONFIG_MODULES=y
108CONFIG_MODULE_UNLOAD=y 97CONFIG_MODULE_UNLOAD=y
109# CONFIG_MODULE_FORCE_UNLOAD is not set 98# CONFIG_MODULE_FORCE_UNLOAD is not set
110# CONFIG_MODVERSIONS is not set 99# CONFIG_MODVERSIONS is not set
111# CONFIG_MODULE_SRCVERSION_ALL is not set 100# CONFIG_MODULE_SRCVERSION_ALL is not set
112# CONFIG_KMOD is not set 101# CONFIG_KMOD is not set
113
114#
115# Block layer
116#
117CONFIG_BLOCK=y 102CONFIG_BLOCK=y
118# CONFIG_LBD is not set 103# CONFIG_LBD is not set
119# CONFIG_BLK_DEV_IO_TRACE is not set 104# CONFIG_BLK_DEV_IO_TRACE is not set
120# CONFIG_LSF is not set 105# CONFIG_LSF is not set
106# CONFIG_BLK_DEV_BSG is not set
121 107
122# 108#
123# IO Schedulers 109# IO Schedulers
@@ -135,6 +121,11 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
135# 121#
136# Platform support 122# Platform support
137# 123#
124# CONFIG_PPC_MULTIPLATFORM is not set
125# CONFIG_EMBEDDED6xx is not set
126# CONFIG_PPC_82xx is not set
127CONFIG_PPC_83xx=y
128# CONFIG_PPC_86xx is not set
138# CONFIG_PPC_MPC52xx is not set 129# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set 130# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set 131# CONFIG_PPC_CELL is not set
@@ -159,6 +150,7 @@ CONFIG_PPC_MPC836x=y
159# CONFIG_CPU_FREQ is not set 150# CONFIG_CPU_FREQ is not set
160CONFIG_QUICC_ENGINE=y 151CONFIG_QUICC_ENGINE=y
161# CONFIG_CPM2 is not set 152# CONFIG_CPM2 is not set
153# CONFIG_FSL_ULI1575 is not set
162 154
163# 155#
164# Kernel options 156# Kernel options
@@ -187,6 +179,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
187CONFIG_SPLIT_PTLOCK_CPUS=4 179CONFIG_SPLIT_PTLOCK_CPUS=4
188# CONFIG_RESOURCES_64BIT is not set 180# CONFIG_RESOURCES_64BIT is not set
189CONFIG_ZONE_DMA_FLAG=1 181CONFIG_ZONE_DMA_FLAG=1
182CONFIG_BOUNCE=y
183CONFIG_VIRT_TO_BUS=y
190CONFIG_PROC_DEVICETREE=y 184CONFIG_PROC_DEVICETREE=y
191# CONFIG_CMDLINE_BOOL is not set 185# CONFIG_CMDLINE_BOOL is not set
192# CONFIG_PM is not set 186# CONFIG_PM is not set
@@ -201,10 +195,10 @@ CONFIG_ISA_DMA_API=y
201CONFIG_ZONE_DMA=y 195CONFIG_ZONE_DMA=y
202CONFIG_GENERIC_ISA_DMA=y 196CONFIG_GENERIC_ISA_DMA=y
203CONFIG_PPC_INDIRECT_PCI=y 197CONFIG_PPC_INDIRECT_PCI=y
204# CONFIG_PPC_INDIRECT_PCI_BE is not set
205CONFIG_FSL_SOC=y 198CONFIG_FSL_SOC=y
206CONFIG_PCI=y 199CONFIG_PCI=y
207CONFIG_PCI_DOMAINS=y 200CONFIG_PCI_DOMAINS=y
201CONFIG_PCI_SYSCALL=y
208# CONFIG_PCIEPORTBUS is not set 202# CONFIG_PCIEPORTBUS is not set
209CONFIG_ARCH_SUPPORTS_MSI=y 203CONFIG_ARCH_SUPPORTS_MSI=y
210# CONFIG_PCI_MSI is not set 204# CONFIG_PCI_MSI is not set
@@ -314,6 +308,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
314# CONFIG_MAC80211 is not set 308# CONFIG_MAC80211 is not set
315# CONFIG_IEEE80211 is not set 309# CONFIG_IEEE80211 is not set
316# CONFIG_RFKILL is not set 310# CONFIG_RFKILL is not set
311# CONFIG_NET_9P is not set
317 312
318# 313#
319# Device Drivers 314# Device Drivers
@@ -326,26 +321,11 @@ CONFIG_STANDALONE=y
326CONFIG_PREVENT_FIRMWARE_BUILD=y 321CONFIG_PREVENT_FIRMWARE_BUILD=y
327# CONFIG_FW_LOADER is not set 322# CONFIG_FW_LOADER is not set
328# CONFIG_SYS_HYPERVISOR is not set 323# CONFIG_SYS_HYPERVISOR is not set
329
330#
331# Connector - unified userspace <-> kernelspace linker
332#
333# CONFIG_CONNECTOR is not set 324# CONFIG_CONNECTOR is not set
334# CONFIG_MTD is not set 325# CONFIG_MTD is not set
335 326CONFIG_OF_DEVICE=y
336#
337# Parallel port support
338#
339# CONFIG_PARPORT is not set 327# CONFIG_PARPORT is not set
340 328CONFIG_BLK_DEV=y
341#
342# Plug and Play support
343#
344# CONFIG_PNPACPI is not set
345
346#
347# Block devices
348#
349# CONFIG_BLK_DEV_FD is not set 329# CONFIG_BLK_DEV_FD is not set
350# CONFIG_BLK_CPQ_DA is not set 330# CONFIG_BLK_CPQ_DA is not set
351# CONFIG_BLK_CPQ_CISS_DA is not set 331# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -362,14 +342,11 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
362CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 342CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
363# CONFIG_CDROM_PKTCDVD is not set 343# CONFIG_CDROM_PKTCDVD is not set
364# CONFIG_ATA_OVER_ETH is not set 344# CONFIG_ATA_OVER_ETH is not set
365 345CONFIG_MISC_DEVICES=y
366#
367# Misc devices
368#
369# CONFIG_PHANTOM is not set 346# CONFIG_PHANTOM is not set
347# CONFIG_EEPROM_93CX6 is not set
370# CONFIG_SGI_IOC4 is not set 348# CONFIG_SGI_IOC4 is not set
371# CONFIG_TIFM_CORE is not set 349# CONFIG_TIFM_CORE is not set
372# CONFIG_BLINK is not set
373# CONFIG_IDE is not set 350# CONFIG_IDE is not set
374 351
375# 352#
@@ -377,6 +354,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
377# 354#
378# CONFIG_RAID_ATTRS is not set 355# CONFIG_RAID_ATTRS is not set
379CONFIG_SCSI=y 356CONFIG_SCSI=y
357CONFIG_SCSI_DMA=y
380# CONFIG_SCSI_TGT is not set 358# CONFIG_SCSI_TGT is not set
381# CONFIG_SCSI_NETLINK is not set 359# CONFIG_SCSI_NETLINK is not set
382CONFIG_SCSI_PROC_FS=y 360CONFIG_SCSI_PROC_FS=y
@@ -406,12 +384,8 @@ CONFIG_SCSI_WAIT_SCAN=m
406# CONFIG_SCSI_SPI_ATTRS is not set 384# CONFIG_SCSI_SPI_ATTRS is not set
407# CONFIG_SCSI_FC_ATTRS is not set 385# CONFIG_SCSI_FC_ATTRS is not set
408# CONFIG_SCSI_ISCSI_ATTRS is not set 386# CONFIG_SCSI_ISCSI_ATTRS is not set
409# CONFIG_SCSI_SAS_ATTRS is not set
410# CONFIG_SCSI_SAS_LIBSAS is not set 387# CONFIG_SCSI_SAS_LIBSAS is not set
411 388CONFIG_SCSI_LOWLEVEL=y
412#
413# SCSI low-level drivers
414#
415# CONFIG_ISCSI_TCP is not set 389# CONFIG_ISCSI_TCP is not set
416# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 390# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
417# CONFIG_SCSI_3W_9XXX is not set 391# CONFIG_SCSI_3W_9XXX is not set
@@ -447,10 +421,6 @@ CONFIG_SCSI_WAIT_SCAN=m
447# CONFIG_SCSI_DEBUG is not set 421# CONFIG_SCSI_DEBUG is not set
448# CONFIG_SCSI_SRP is not set 422# CONFIG_SCSI_SRP is not set
449# CONFIG_ATA is not set 423# CONFIG_ATA is not set
450
451#
452# Multi-device support (RAID and LVM)
453#
454# CONFIG_MD is not set 424# CONFIG_MD is not set
455 425
456# 426#
@@ -466,19 +436,13 @@ CONFIG_SCSI_WAIT_SCAN=m
466# 436#
467# CONFIG_FIREWIRE is not set 437# CONFIG_FIREWIRE is not set
468# CONFIG_IEEE1394 is not set 438# CONFIG_IEEE1394 is not set
469
470#
471# I2O device support
472#
473# CONFIG_I2O is not set 439# CONFIG_I2O is not set
474# CONFIG_MACINTOSH_DRIVERS is not set 440# CONFIG_MACINTOSH_DRIVERS is not set
475
476#
477# Network device support
478#
479CONFIG_NETDEVICES=y 441CONFIG_NETDEVICES=y
442# CONFIG_NETDEVICES_MULTIQUEUE is not set
480# CONFIG_DUMMY is not set 443# CONFIG_DUMMY is not set
481# CONFIG_BONDING is not set 444# CONFIG_BONDING is not set
445# CONFIG_MACVLAN is not set
482# CONFIG_EQUALIZER is not set 446# CONFIG_EQUALIZER is not set
483# CONFIG_TUN is not set 447# CONFIG_TUN is not set
484# CONFIG_ARCNET is not set 448# CONFIG_ARCNET is not set
@@ -495,21 +459,14 @@ CONFIG_MARVELL_PHY=y
495# CONFIG_VITESSE_PHY is not set 459# CONFIG_VITESSE_PHY is not set
496# CONFIG_SMSC_PHY is not set 460# CONFIG_SMSC_PHY is not set
497# CONFIG_BROADCOM_PHY is not set 461# CONFIG_BROADCOM_PHY is not set
462# CONFIG_ICPLUS_PHY is not set
498# CONFIG_FIXED_PHY is not set 463# CONFIG_FIXED_PHY is not set
499
500#
501# Ethernet (10 or 100Mbit)
502#
503CONFIG_NET_ETHERNET=y 464CONFIG_NET_ETHERNET=y
504CONFIG_MII=y 465CONFIG_MII=y
505# CONFIG_HAPPYMEAL is not set 466# CONFIG_HAPPYMEAL is not set
506# CONFIG_SUNGEM is not set 467# CONFIG_SUNGEM is not set
507# CONFIG_CASSINI is not set 468# CONFIG_CASSINI is not set
508# CONFIG_NET_VENDOR_3COM is not set 469# CONFIG_NET_VENDOR_3COM is not set
509
510#
511# Tulip family network device support
512#
513# CONFIG_NET_TULIP is not set 470# CONFIG_NET_TULIP is not set
514# CONFIG_HP100 is not set 471# CONFIG_HP100 is not set
515# CONFIG_NET_PCI is not set 472# CONFIG_NET_PCI is not set
@@ -524,7 +481,6 @@ CONFIG_NETDEV_1000=y
524# CONFIG_SIS190 is not set 481# CONFIG_SIS190 is not set
525# CONFIG_SKGE is not set 482# CONFIG_SKGE is not set
526# CONFIG_SKY2 is not set 483# CONFIG_SKY2 is not set
527# CONFIG_SK98LIN is not set
528# CONFIG_VIA_VELOCITY is not set 484# CONFIG_VIA_VELOCITY is not set
529# CONFIG_TIGON3 is not set 485# CONFIG_TIGON3 is not set
530# CONFIG_BNX2 is not set 486# CONFIG_BNX2 is not set
@@ -561,15 +517,7 @@ CONFIG_NETDEV_10000=y
561# CONFIG_NETCONSOLE is not set 517# CONFIG_NETCONSOLE is not set
562# CONFIG_NETPOLL is not set 518# CONFIG_NETPOLL is not set
563# CONFIG_NET_POLL_CONTROLLER is not set 519# CONFIG_NET_POLL_CONTROLLER is not set
564
565#
566# ISDN subsystem
567#
568# CONFIG_ISDN is not set 520# CONFIG_ISDN is not set
569
570#
571# Telephony Support
572#
573# CONFIG_PHONE is not set 521# CONFIG_PHONE is not set
574 522
575# 523#
@@ -631,10 +579,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
631CONFIG_UNIX98_PTYS=y 579CONFIG_UNIX98_PTYS=y
632CONFIG_LEGACY_PTYS=y 580CONFIG_LEGACY_PTYS=y
633CONFIG_LEGACY_PTY_COUNT=256 581CONFIG_LEGACY_PTY_COUNT=256
634
635#
636# IPMI
637#
638# CONFIG_IPMI_HANDLER is not set 582# CONFIG_IPMI_HANDLER is not set
639CONFIG_WATCHDOG=y 583CONFIG_WATCHDOG=y
640# CONFIG_WATCHDOG_NOWAYOUT is not set 584# CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -659,10 +603,6 @@ CONFIG_GEN_RTC=y
659# CONFIG_AGP is not set 603# CONFIG_AGP is not set
660# CONFIG_DRM is not set 604# CONFIG_DRM is not set
661# CONFIG_RAW_DRIVER is not set 605# CONFIG_RAW_DRIVER is not set
662
663#
664# TPM devices
665#
666# CONFIG_TCG_TPM is not set 606# CONFIG_TCG_TPM is not set
667CONFIG_DEVPORT=y 607CONFIG_DEVPORT=y
668CONFIG_I2C=y 608CONFIG_I2C=y
@@ -697,6 +637,7 @@ CONFIG_I2C_MPC=y
697# CONFIG_I2C_SIS5595 is not set 637# CONFIG_I2C_SIS5595 is not set
698# CONFIG_I2C_SIS630 is not set 638# CONFIG_I2C_SIS630 is not set
699# CONFIG_I2C_SIS96X is not set 639# CONFIG_I2C_SIS96X is not set
640# CONFIG_I2C_TAOS_EVM is not set
700# CONFIG_I2C_STUB is not set 641# CONFIG_I2C_STUB is not set
701# CONFIG_I2C_VIA is not set 642# CONFIG_I2C_VIA is not set
702# CONFIG_I2C_VIAPRO is not set 643# CONFIG_I2C_VIAPRO is not set
@@ -707,12 +648,14 @@ CONFIG_I2C_MPC=y
707# 648#
708# CONFIG_SENSORS_DS1337 is not set 649# CONFIG_SENSORS_DS1337 is not set
709# CONFIG_SENSORS_DS1374 is not set 650# CONFIG_SENSORS_DS1374 is not set
651# CONFIG_DS1682 is not set
710# CONFIG_SENSORS_EEPROM is not set 652# CONFIG_SENSORS_EEPROM is not set
711# CONFIG_SENSORS_PCF8574 is not set 653# CONFIG_SENSORS_PCF8574 is not set
712# CONFIG_SENSORS_PCA9539 is not set 654# CONFIG_SENSORS_PCA9539 is not set
713# CONFIG_SENSORS_PCF8591 is not set 655# CONFIG_SENSORS_PCF8591 is not set
714# CONFIG_SENSORS_M41T00 is not set 656# CONFIG_SENSORS_M41T00 is not set
715# CONFIG_SENSORS_MAX6875 is not set 657# CONFIG_SENSORS_MAX6875 is not set
658# CONFIG_SENSORS_TSL2550 is not set
716# CONFIG_I2C_DEBUG_CORE is not set 659# CONFIG_I2C_DEBUG_CORE is not set
717# CONFIG_I2C_DEBUG_ALGO is not set 660# CONFIG_I2C_DEBUG_ALGO is not set
718# CONFIG_I2C_DEBUG_BUS is not set 661# CONFIG_I2C_DEBUG_BUS is not set
@@ -723,14 +666,12 @@ CONFIG_I2C_MPC=y
723# 666#
724# CONFIG_SPI is not set 667# CONFIG_SPI is not set
725# CONFIG_SPI_MASTER is not set 668# CONFIG_SPI_MASTER is not set
726
727#
728# Dallas's 1-wire bus
729#
730# CONFIG_W1 is not set 669# CONFIG_W1 is not set
670# CONFIG_POWER_SUPPLY is not set
731CONFIG_HWMON=y 671CONFIG_HWMON=y
732# CONFIG_HWMON_VID is not set 672# CONFIG_HWMON_VID is not set
733# CONFIG_SENSORS_ABITUGURU is not set 673# CONFIG_SENSORS_ABITUGURU is not set
674# CONFIG_SENSORS_ABITUGURU3 is not set
734# CONFIG_SENSORS_AD7418 is not set 675# CONFIG_SENSORS_AD7418 is not set
735# CONFIG_SENSORS_ADM1021 is not set 676# CONFIG_SENSORS_ADM1021 is not set
736# CONFIG_SENSORS_ADM1025 is not set 677# CONFIG_SENSORS_ADM1025 is not set
@@ -757,14 +698,17 @@ CONFIG_HWMON=y
757# CONFIG_SENSORS_LM87 is not set 698# CONFIG_SENSORS_LM87 is not set
758# CONFIG_SENSORS_LM90 is not set 699# CONFIG_SENSORS_LM90 is not set
759# CONFIG_SENSORS_LM92 is not set 700# CONFIG_SENSORS_LM92 is not set
701# CONFIG_SENSORS_LM93 is not set
760# CONFIG_SENSORS_MAX1619 is not set 702# CONFIG_SENSORS_MAX1619 is not set
761# CONFIG_SENSORS_MAX6650 is not set 703# CONFIG_SENSORS_MAX6650 is not set
762# CONFIG_SENSORS_PC87360 is not set 704# CONFIG_SENSORS_PC87360 is not set
763# CONFIG_SENSORS_PC87427 is not set 705# CONFIG_SENSORS_PC87427 is not set
764# CONFIG_SENSORS_SIS5595 is not set 706# CONFIG_SENSORS_SIS5595 is not set
707# CONFIG_SENSORS_DME1737 is not set
765# CONFIG_SENSORS_SMSC47M1 is not set 708# CONFIG_SENSORS_SMSC47M1 is not set
766# CONFIG_SENSORS_SMSC47M192 is not set 709# CONFIG_SENSORS_SMSC47M192 is not set
767# CONFIG_SENSORS_SMSC47B397 is not set 710# CONFIG_SENSORS_SMSC47B397 is not set
711# CONFIG_SENSORS_THMC50 is not set
768# CONFIG_SENSORS_VIA686A is not set 712# CONFIG_SENSORS_VIA686A is not set
769# CONFIG_SENSORS_VT1211 is not set 713# CONFIG_SENSORS_VT1211 is not set
770# CONFIG_SENSORS_VT8231 is not set 714# CONFIG_SENSORS_VT8231 is not set
@@ -799,6 +743,7 @@ CONFIG_DAB=y
799# 743#
800# CONFIG_DISPLAY_SUPPORT is not set 744# CONFIG_DISPLAY_SUPPORT is not set
801# CONFIG_VGASTATE is not set 745# CONFIG_VGASTATE is not set
746CONFIG_VIDEO_OUTPUT_CONTROL=m
802# CONFIG_FB is not set 747# CONFIG_FB is not set
803# CONFIG_FB_IBM_GXT4500 is not set 748# CONFIG_FB_IBM_GXT4500 is not set
804 749
@@ -806,16 +751,10 @@ CONFIG_DAB=y
806# Sound 751# Sound
807# 752#
808# CONFIG_SOUND is not set 753# CONFIG_SOUND is not set
809 754CONFIG_HID_SUPPORT=y
810#
811# HID Devices
812#
813CONFIG_HID=y 755CONFIG_HID=y
814# CONFIG_HID_DEBUG is not set 756# CONFIG_HID_DEBUG is not set
815 757CONFIG_USB_SUPPORT=y
816#
817# USB support
818#
819CONFIG_USB_ARCH_HAS_HCD=y 758CONFIG_USB_ARCH_HAS_HCD=y
820CONFIG_USB_ARCH_HAS_OHCI=y 759CONFIG_USB_ARCH_HAS_OHCI=y
821CONFIG_USB_ARCH_HAS_EHCI=y 760CONFIG_USB_ARCH_HAS_EHCI=y
@@ -830,32 +769,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
830# 769#
831# CONFIG_USB_GADGET is not set 770# CONFIG_USB_GADGET is not set
832# CONFIG_MMC is not set 771# CONFIG_MMC is not set
833
834#
835# LED devices
836#
837# CONFIG_NEW_LEDS is not set 772# CONFIG_NEW_LEDS is not set
838
839#
840# LED drivers
841#
842
843#
844# LED Triggers
845#
846
847#
848# InfiniBand support
849#
850# CONFIG_INFINIBAND is not set 773# CONFIG_INFINIBAND is not set
851 774# CONFIG_EDAC is not set
852#
853# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
854#
855
856#
857# Real Time Clock
858#
859# CONFIG_RTC_CLASS is not set 775# CONFIG_RTC_CLASS is not set
860 776
861# 777#
@@ -872,6 +788,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
872# 788#
873 789
874# 790#
791# Userspace I/O
792#
793# CONFIG_UIO is not set
794
795#
875# File systems 796# File systems
876# 797#
877CONFIG_EXT2_FS=y 798CONFIG_EXT2_FS=y
@@ -967,7 +888,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
967# CONFIG_NCP_FS is not set 888# CONFIG_NCP_FS is not set
968# CONFIG_CODA_FS is not set 889# CONFIG_CODA_FS is not set
969# CONFIG_AFS_FS is not set 890# CONFIG_AFS_FS is not set
970# CONFIG_9P_FS is not set
971 891
972# 892#
973# Partition Types 893# Partition Types
@@ -1008,6 +928,7 @@ CONFIG_BITREVERSE=y
1008# CONFIG_CRC16 is not set 928# CONFIG_CRC16 is not set
1009# CONFIG_CRC_ITU_T is not set 929# CONFIG_CRC_ITU_T is not set
1010CONFIG_CRC32=y 930CONFIG_CRC32=y
931# CONFIG_CRC7 is not set
1011# CONFIG_LIBCRC32C is not set 932# CONFIG_LIBCRC32C is not set
1012CONFIG_PLIST=y 933CONFIG_PLIST=y
1013CONFIG_HAS_IOMEM=y 934CONFIG_HAS_IOMEM=y
@@ -1030,7 +951,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1030# CONFIG_HEADERS_CHECK is not set 951# CONFIG_HEADERS_CHECK is not set
1031# CONFIG_DEBUG_KERNEL is not set 952# CONFIG_DEBUG_KERNEL is not set
1032# CONFIG_DEBUG_BUGVERBOSE is not set 953# CONFIG_DEBUG_BUGVERBOSE is not set
1033# CONFIG_BOOTX_TEXT is not set
1034# CONFIG_PPC_EARLY_DEBUG is not set 954# CONFIG_PPC_EARLY_DEBUG is not set
1035 955
1036# 956#
@@ -1038,10 +958,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1038# 958#
1039# CONFIG_KEYS is not set 959# CONFIG_KEYS is not set
1040# CONFIG_SECURITY is not set 960# CONFIG_SECURITY is not set
1041
1042#
1043# Cryptographic options
1044#
1045CONFIG_CRYPTO=y 961CONFIG_CRYPTO=y
1046CONFIG_CRYPTO_ALGAPI=y 962CONFIG_CRYPTO_ALGAPI=y
1047CONFIG_CRYPTO_BLKCIPHER=y 963CONFIG_CRYPTO_BLKCIPHER=y
@@ -1079,7 +995,4 @@ CONFIG_CRYPTO_DES=y
1079# CONFIG_CRYPTO_CRC32C is not set 995# CONFIG_CRYPTO_CRC32C is not set
1080# CONFIG_CRYPTO_CAMELLIA is not set 996# CONFIG_CRYPTO_CAMELLIA is not set
1081# CONFIG_CRYPTO_TEST is not set 997# CONFIG_CRYPTO_TEST is not set
1082 998CONFIG_CRYPTO_HW=y
1083#
1084# Hardware crypto devices
1085#
diff --git a/arch/powerpc/configs/mpc8540_ads_defconfig b/arch/powerpc/configs/mpc8540_ads_defconfig
index faedcf8d64..b282c3521d 100644
--- a/arch/powerpc/configs/mpc8540_ads_defconfig
+++ b/arch/powerpc/configs/mpc8540_ads_defconfig
@@ -1,9 +1,26 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:56:58 2007 4# Tue Aug 28 21:24:42 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
7CONFIG_PPC32=y 24CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 25CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 26CONFIG_MMU=y
@@ -14,61 +31,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 31CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 32CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 33CONFIG_GENERIC_FIND_NEXT_BIT=y
34# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 35CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 36CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 37CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 38CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 39CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 40CONFIG_PPC_OF=y
41CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 42CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 43# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 44CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 45CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 46CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_85xx=y
42CONFIG_E500=y
43# CONFIG_PPC_DCR_NATIVE is not set 47# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 48# CONFIG_PPC_DCR_MMIO is not set
45CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y
49# CONFIG_PPC_MM_SLICES is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 50
52# 51#
53# Code maturity level options 52# General setup
54# 53#
55CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 55CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 58CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 59CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 61CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 62# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 64# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 65# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 66# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 67# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
@@ -102,19 +96,12 @@ CONFIG_SLAB=y
102CONFIG_RT_MUTEXES=y 96CONFIG_RT_MUTEXES=y
103# CONFIG_TINY_SHMEM is not set 97# CONFIG_TINY_SHMEM is not set
104CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
105
106#
107# Loadable module support
108#
109# CONFIG_MODULES is not set 99# CONFIG_MODULES is not set
110
111#
112# Block layer
113#
114CONFIG_BLOCK=y 100CONFIG_BLOCK=y
115# CONFIG_LBD is not set 101# CONFIG_LBD is not set
116# CONFIG_BLK_DEV_IO_TRACE is not set 102# CONFIG_BLK_DEV_IO_TRACE is not set
117# CONFIG_LSF is not set 103# CONFIG_LSF is not set
104# CONFIG_BLK_DEV_BSG is not set
118 105
119# 106#
120# IO Schedulers 107# IO Schedulers
@@ -155,6 +142,7 @@ CONFIG_MPIC=y
155# CONFIG_GENERIC_IOMAP is not set 142# CONFIG_GENERIC_IOMAP is not set
156# CONFIG_CPU_FREQ is not set 143# CONFIG_CPU_FREQ is not set
157# CONFIG_CPM2 is not set 144# CONFIG_CPM2 is not set
145# CONFIG_FSL_ULI1575 is not set
158 146
159# 147#
160# Kernel options 148# Kernel options
@@ -184,6 +172,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
184CONFIG_SPLIT_PTLOCK_CPUS=4 172CONFIG_SPLIT_PTLOCK_CPUS=4
185# CONFIG_RESOURCES_64BIT is not set 173# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=1 174CONFIG_ZONE_DMA_FLAG=1
175CONFIG_BOUNCE=y
176CONFIG_VIRT_TO_BUS=y
187CONFIG_PROC_DEVICETREE=y 177CONFIG_PROC_DEVICETREE=y
188# CONFIG_CMDLINE_BOOL is not set 178# CONFIG_CMDLINE_BOOL is not set
189# CONFIG_PM is not set 179# CONFIG_PM is not set
@@ -197,10 +187,10 @@ CONFIG_ISA_DMA_API=y
197# 187#
198CONFIG_ZONE_DMA=y 188CONFIG_ZONE_DMA=y
199CONFIG_PPC_INDIRECT_PCI=y 189CONFIG_PPC_INDIRECT_PCI=y
200CONFIG_PPC_INDIRECT_PCI_BE=y
201CONFIG_FSL_SOC=y 190CONFIG_FSL_SOC=y
202# CONFIG_PCI is not set 191# CONFIG_PCI is not set
203# CONFIG_PCI_DOMAINS is not set 192# CONFIG_PCI_DOMAINS is not set
193# CONFIG_PCI_SYSCALL is not set
204# CONFIG_ARCH_SUPPORTS_MSI is not set 194# CONFIG_ARCH_SUPPORTS_MSI is not set
205 195
206# 196#
@@ -307,6 +297,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
307# CONFIG_MAC80211 is not set 297# CONFIG_MAC80211 is not set
308# CONFIG_IEEE80211 is not set 298# CONFIG_IEEE80211 is not set
309# CONFIG_RFKILL is not set 299# CONFIG_RFKILL is not set
300# CONFIG_NET_9P is not set
310 301
311# 302#
312# Device Drivers 303# Device Drivers
@@ -321,26 +312,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
321# CONFIG_DEBUG_DRIVER is not set 312# CONFIG_DEBUG_DRIVER is not set
322# CONFIG_DEBUG_DEVRES is not set 313# CONFIG_DEBUG_DEVRES is not set
323# CONFIG_SYS_HYPERVISOR is not set 314# CONFIG_SYS_HYPERVISOR is not set
324
325#
326# Connector - unified userspace <-> kernelspace linker
327#
328# CONFIG_CONNECTOR is not set 315# CONFIG_CONNECTOR is not set
329# CONFIG_MTD is not set 316# CONFIG_MTD is not set
330 317CONFIG_OF_DEVICE=y
331#
332# Parallel port support
333#
334# CONFIG_PARPORT is not set 318# CONFIG_PARPORT is not set
335 319CONFIG_BLK_DEV=y
336#
337# Plug and Play support
338#
339# CONFIG_PNPACPI is not set
340
341#
342# Block devices
343#
344# CONFIG_BLK_DEV_FD is not set 320# CONFIG_BLK_DEV_FD is not set
345# CONFIG_BLK_DEV_COW_COMMON is not set 321# CONFIG_BLK_DEV_COW_COMMON is not set
346CONFIG_BLK_DEV_LOOP=y 322CONFIG_BLK_DEV_LOOP=y
@@ -352,11 +328,8 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
352CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 328CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
353# CONFIG_CDROM_PKTCDVD is not set 329# CONFIG_CDROM_PKTCDVD is not set
354# CONFIG_ATA_OVER_ETH is not set 330# CONFIG_ATA_OVER_ETH is not set
355 331CONFIG_MISC_DEVICES=y
356# 332# CONFIG_EEPROM_93CX6 is not set
357# Misc devices
358#
359# CONFIG_BLINK is not set
360# CONFIG_IDE is not set 333# CONFIG_IDE is not set
361 334
362# 335#
@@ -364,21 +337,16 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
364# 337#
365# CONFIG_RAID_ATTRS is not set 338# CONFIG_RAID_ATTRS is not set
366# CONFIG_SCSI is not set 339# CONFIG_SCSI is not set
340# CONFIG_SCSI_DMA is not set
367# CONFIG_SCSI_NETLINK is not set 341# CONFIG_SCSI_NETLINK is not set
368# CONFIG_ATA is not set 342# CONFIG_ATA is not set
369
370#
371# Multi-device support (RAID and LVM)
372#
373# CONFIG_MD is not set 343# CONFIG_MD is not set
374# CONFIG_MACINTOSH_DRIVERS is not set 344# CONFIG_MACINTOSH_DRIVERS is not set
375
376#
377# Network device support
378#
379CONFIG_NETDEVICES=y 345CONFIG_NETDEVICES=y
346# CONFIG_NETDEVICES_MULTIQUEUE is not set
380# CONFIG_DUMMY is not set 347# CONFIG_DUMMY is not set
381# CONFIG_BONDING is not set 348# CONFIG_BONDING is not set
349# CONFIG_MACVLAN is not set
382# CONFIG_EQUALIZER is not set 350# CONFIG_EQUALIZER is not set
383# CONFIG_TUN is not set 351# CONFIG_TUN is not set
384CONFIG_PHYLIB=y 352CONFIG_PHYLIB=y
@@ -394,11 +362,8 @@ CONFIG_PHYLIB=y
394# CONFIG_VITESSE_PHY is not set 362# CONFIG_VITESSE_PHY is not set
395# CONFIG_SMSC_PHY is not set 363# CONFIG_SMSC_PHY is not set
396# CONFIG_BROADCOM_PHY is not set 364# CONFIG_BROADCOM_PHY is not set
365# CONFIG_ICPLUS_PHY is not set
397# CONFIG_FIXED_PHY is not set 366# CONFIG_FIXED_PHY is not set
398
399#
400# Ethernet (10 or 100Mbit)
401#
402CONFIG_NET_ETHERNET=y 367CONFIG_NET_ETHERNET=y
403CONFIG_MII=y 368CONFIG_MII=y
404CONFIG_NETDEV_1000=y 369CONFIG_NETDEV_1000=y
@@ -418,15 +383,7 @@ CONFIG_NETDEV_10000=y
418# CONFIG_NETCONSOLE is not set 383# CONFIG_NETCONSOLE is not set
419# CONFIG_NETPOLL is not set 384# CONFIG_NETPOLL is not set
420# CONFIG_NET_POLL_CONTROLLER is not set 385# CONFIG_NET_POLL_CONTROLLER is not set
421
422#
423# ISDN subsystem
424#
425# CONFIG_ISDN is not set 386# CONFIG_ISDN is not set
426
427#
428# Telephony Support
429#
430# CONFIG_PHONE is not set 387# CONFIG_PHONE is not set
431 388
432# 389#
@@ -487,10 +444,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
487CONFIG_UNIX98_PTYS=y 444CONFIG_UNIX98_PTYS=y
488CONFIG_LEGACY_PTYS=y 445CONFIG_LEGACY_PTYS=y
489CONFIG_LEGACY_PTY_COUNT=256 446CONFIG_LEGACY_PTY_COUNT=256
490
491#
492# IPMI
493#
494# CONFIG_IPMI_HANDLER is not set 447# CONFIG_IPMI_HANDLER is not set
495# CONFIG_WATCHDOG is not set 448# CONFIG_WATCHDOG is not set
496# CONFIG_HW_RANDOM is not set 449# CONFIG_HW_RANDOM is not set
@@ -499,10 +452,6 @@ CONFIG_GEN_RTC=y
499# CONFIG_GEN_RTC_X is not set 452# CONFIG_GEN_RTC_X is not set
500# CONFIG_R3964 is not set 453# CONFIG_R3964 is not set
501# CONFIG_RAW_DRIVER is not set 454# CONFIG_RAW_DRIVER is not set
502
503#
504# TPM devices
505#
506# CONFIG_TCG_TPM is not set 455# CONFIG_TCG_TPM is not set
507# CONFIG_I2C is not set 456# CONFIG_I2C is not set
508 457
@@ -511,20 +460,21 @@ CONFIG_GEN_RTC=y
511# 460#
512# CONFIG_SPI is not set 461# CONFIG_SPI is not set
513# CONFIG_SPI_MASTER is not set 462# CONFIG_SPI_MASTER is not set
514
515#
516# Dallas's 1-wire bus
517#
518# CONFIG_W1 is not set 463# CONFIG_W1 is not set
464# CONFIG_POWER_SUPPLY is not set
519CONFIG_HWMON=y 465CONFIG_HWMON=y
520# CONFIG_HWMON_VID is not set 466# CONFIG_HWMON_VID is not set
521# CONFIG_SENSORS_ABITUGURU is not set 467# CONFIG_SENSORS_ABITUGURU is not set
468# CONFIG_SENSORS_ABITUGURU3 is not set
522# CONFIG_SENSORS_F71805F is not set 469# CONFIG_SENSORS_F71805F is not set
470# CONFIG_SENSORS_IT87 is not set
471# CONFIG_SENSORS_PC87360 is not set
523# CONFIG_SENSORS_PC87427 is not set 472# CONFIG_SENSORS_PC87427 is not set
524# CONFIG_SENSORS_SMSC47M1 is not set 473# CONFIG_SENSORS_SMSC47M1 is not set
525# CONFIG_SENSORS_SMSC47B397 is not set 474# CONFIG_SENSORS_SMSC47B397 is not set
526# CONFIG_SENSORS_VT1211 is not set 475# CONFIG_SENSORS_VT1211 is not set
527# CONFIG_SENSORS_W83627HF is not set 476# CONFIG_SENSORS_W83627HF is not set
477# CONFIG_SENSORS_W83627EHF is not set
528# CONFIG_HWMON_DEBUG_CHIP is not set 478# CONFIG_HWMON_DEBUG_CHIP is not set
529 479
530# 480#
@@ -549,6 +499,7 @@ CONFIG_DAB=y
549# 499#
550# CONFIG_DISPLAY_SUPPORT is not set 500# CONFIG_DISPLAY_SUPPORT is not set
551# CONFIG_VGASTATE is not set 501# CONFIG_VGASTATE is not set
502CONFIG_VIDEO_OUTPUT_CONTROL=y
552# CONFIG_FB is not set 503# CONFIG_FB is not set
553# CONFIG_FB_IBM_GXT4500 is not set 504# CONFIG_FB_IBM_GXT4500 is not set
554 505
@@ -556,16 +507,10 @@ CONFIG_DAB=y
556# Sound 507# Sound
557# 508#
558# CONFIG_SOUND is not set 509# CONFIG_SOUND is not set
559 510CONFIG_HID_SUPPORT=y
560#
561# HID Devices
562#
563CONFIG_HID=y 511CONFIG_HID=y
564# CONFIG_HID_DEBUG is not set 512# CONFIG_HID_DEBUG is not set
565 513CONFIG_USB_SUPPORT=y
566#
567# USB support
568#
569# CONFIG_USB_ARCH_HAS_HCD is not set 514# CONFIG_USB_ARCH_HAS_HCD is not set
570# CONFIG_USB_ARCH_HAS_OHCI is not set 515# CONFIG_USB_ARCH_HAS_OHCI is not set
571# CONFIG_USB_ARCH_HAS_EHCI is not set 516# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -579,31 +524,8 @@ CONFIG_HID=y
579# 524#
580# CONFIG_USB_GADGET is not set 525# CONFIG_USB_GADGET is not set
581# CONFIG_MMC is not set 526# CONFIG_MMC is not set
582
583#
584# LED devices
585#
586# CONFIG_NEW_LEDS is not set 527# CONFIG_NEW_LEDS is not set
587 528# CONFIG_EDAC is not set
588#
589# LED drivers
590#
591
592#
593# LED Triggers
594#
595
596#
597# InfiniBand support
598#
599
600#
601# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
602#
603
604#
605# Real Time Clock
606#
607# CONFIG_RTC_CLASS is not set 529# CONFIG_RTC_CLASS is not set
608 530
609# 531#
@@ -620,6 +542,11 @@ CONFIG_HID=y
620# 542#
621 543
622# 544#
545# Userspace I/O
546#
547# CONFIG_UIO is not set
548
549#
623# File systems 550# File systems
624# 551#
625CONFIG_EXT2_FS=y 552CONFIG_EXT2_FS=y
@@ -712,7 +639,6 @@ CONFIG_SUNRPC=y
712# CONFIG_NCP_FS is not set 639# CONFIG_NCP_FS is not set
713# CONFIG_CODA_FS is not set 640# CONFIG_CODA_FS is not set
714# CONFIG_AFS_FS is not set 641# CONFIG_AFS_FS is not set
715# CONFIG_9P_FS is not set
716 642
717# 643#
718# Partition Types 644# Partition Types
@@ -751,6 +677,7 @@ CONFIG_BITREVERSE=y
751# CONFIG_CRC16 is not set 677# CONFIG_CRC16 is not set
752# CONFIG_CRC_ITU_T is not set 678# CONFIG_CRC_ITU_T is not set
753CONFIG_CRC32=y 679CONFIG_CRC32=y
680# CONFIG_CRC7 is not set
754# CONFIG_LIBCRC32C is not set 681# CONFIG_LIBCRC32C is not set
755CONFIG_PLIST=y 682CONFIG_PLIST=y
756CONFIG_HAS_IOMEM=y 683CONFIG_HAS_IOMEM=y
@@ -774,6 +701,7 @@ CONFIG_ENABLE_MUST_CHECK=y
774CONFIG_DEBUG_KERNEL=y 701CONFIG_DEBUG_KERNEL=y
775# CONFIG_DEBUG_SHIRQ is not set 702# CONFIG_DEBUG_SHIRQ is not set
776CONFIG_DETECT_SOFTLOCKUP=y 703CONFIG_DETECT_SOFTLOCKUP=y
704CONFIG_SCHED_DEBUG=y
777# CONFIG_SCHEDSTATS is not set 705# CONFIG_SCHEDSTATS is not set
778# CONFIG_TIMER_STATS is not set 706# CONFIG_TIMER_STATS is not set
779# CONFIG_DEBUG_SLAB is not set 707# CONFIG_DEBUG_SLAB is not set
@@ -795,7 +723,6 @@ CONFIG_FORCED_INLINING=y
795# CONFIG_DEBUG_PAGEALLOC is not set 723# CONFIG_DEBUG_PAGEALLOC is not set
796# CONFIG_DEBUGGER is not set 724# CONFIG_DEBUGGER is not set
797# CONFIG_BDI_SWITCH is not set 725# CONFIG_BDI_SWITCH is not set
798# CONFIG_BOOTX_TEXT is not set
799# CONFIG_PPC_EARLY_DEBUG is not set 726# CONFIG_PPC_EARLY_DEBUG is not set
800 727
801# 728#
@@ -803,8 +730,4 @@ CONFIG_FORCED_INLINING=y
803# 730#
804# CONFIG_KEYS is not set 731# CONFIG_KEYS is not set
805# CONFIG_SECURITY is not set 732# CONFIG_SECURITY is not set
806
807#
808# Cryptographic options
809#
810# CONFIG_CRYPTO is not set 733# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/mpc8544_ds_defconfig b/arch/powerpc/configs/mpc8544_ds_defconfig
index 7995231def..86582aefab 100644
--- a/arch/powerpc/configs/mpc8544_ds_defconfig
+++ b/arch/powerpc/configs/mpc8544_ds_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22 3# Linux kernel version: 2.6.23-rc4
4# Fri Jul 20 14:09:13 2007 4# Wed Aug 29 16:41:04 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -19,7 +19,7 @@ CONFIG_E500=y
19CONFIG_BOOKE=y 19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y 20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set 21# CONFIG_PHYS_64BIT is not set
22# CONFIG_SPE is not set 22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set 23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC32=y 24CONFIG_PPC32=y
25CONFIG_PPC_MERGE=y 25CONFIG_PPC_MERGE=y
@@ -38,6 +38,7 @@ CONFIG_GENERIC_NVRAM=y
38CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 38CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
39CONFIG_ARCH_MAY_HAVE_PC_FDC=y 39CONFIG_ARCH_MAY_HAVE_PC_FDC=y
40CONFIG_PPC_OF=y 40CONFIG_PPC_OF=y
41CONFIG_OF=y
41CONFIG_PPC_UDBG_16550=y 42CONFIG_PPC_UDBG_16550=y
42# CONFIG_GENERIC_TBSYNC is not set 43# CONFIG_GENERIC_TBSYNC is not set
43CONFIG_AUDIT_ARCH=y 44CONFIG_AUDIT_ARCH=y
@@ -48,15 +49,11 @@ CONFIG_DEFAULT_UIMAGE=y
48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
49 50
50# 51#
51# Code maturity level options 52# General setup
52# 53#
53CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
54CONFIG_BROKEN_ON_SMP=y 55CONFIG_BROKEN_ON_SMP=y
55CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
56
57#
58# General setup
59#
60CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
61CONFIG_LOCALVERSION_AUTO=y 58CONFIG_LOCALVERSION_AUTO=y
62CONFIG_SWAP=y 59CONFIG_SWAP=y
@@ -82,7 +79,7 @@ CONFIG_EMBEDDED=y
82CONFIG_SYSCTL_SYSCALL=y 79CONFIG_SYSCTL_SYSCALL=y
83CONFIG_KALLSYMS=y 80CONFIG_KALLSYMS=y
84CONFIG_KALLSYMS_ALL=y 81CONFIG_KALLSYMS_ALL=y
85# CONFIG_KALLSYMS_EXTRA_PASS is not set 82CONFIG_KALLSYMS_EXTRA_PASS=y
86CONFIG_HOTPLUG=y 83CONFIG_HOTPLUG=y
87CONFIG_PRINTK=y 84CONFIG_PRINTK=y
88CONFIG_BUG=y 85CONFIG_BUG=y
@@ -152,6 +149,7 @@ CONFIG_PPC_I8259=y
152# CONFIG_GENERIC_IOMAP is not set 149# CONFIG_GENERIC_IOMAP is not set
153# CONFIG_CPU_FREQ is not set 150# CONFIG_CPU_FREQ is not set
154# CONFIG_CPM2 is not set 151# CONFIG_CPM2 is not set
152CONFIG_FSL_ULI1575=y
155 153
156# 154#
157# Kernel options 155# Kernel options
@@ -184,8 +182,7 @@ CONFIG_ZONE_DMA_FLAG=1
184CONFIG_BOUNCE=y 182CONFIG_BOUNCE=y
185CONFIG_VIRT_TO_BUS=y 183CONFIG_VIRT_TO_BUS=y
186CONFIG_PROC_DEVICETREE=y 184CONFIG_PROC_DEVICETREE=y
187CONFIG_CMDLINE_BOOL=y 185# CONFIG_CMDLINE_BOOL is not set
188CONFIG_CMDLINE="root=/dev/sda3 rw console=ttyS0,115200"
189# CONFIG_PM is not set 186# CONFIG_PM is not set
190CONFIG_SECCOMP=y 187CONFIG_SECCOMP=y
191CONFIG_WANT_DEVICE_TREE=y 188CONFIG_WANT_DEVICE_TREE=y
@@ -239,7 +236,7 @@ CONFIG_PACKET=y
239# CONFIG_PACKET_MMAP is not set 236# CONFIG_PACKET_MMAP is not set
240CONFIG_UNIX=y 237CONFIG_UNIX=y
241CONFIG_XFRM=y 238CONFIG_XFRM=y
242CONFIG_XFRM_USER=m 239CONFIG_XFRM_USER=y
243# CONFIG_XFRM_SUB_POLICY is not set 240# CONFIG_XFRM_SUB_POLICY is not set
244# CONFIG_XFRM_MIGRATE is not set 241# CONFIG_XFRM_MIGRATE is not set
245CONFIG_NET_KEY=m 242CONFIG_NET_KEY=m
@@ -279,9 +276,23 @@ CONFIG_INET_TCP_DIAG=y
279CONFIG_TCP_CONG_CUBIC=y 276CONFIG_TCP_CONG_CUBIC=y
280CONFIG_DEFAULT_TCP_CONG="cubic" 277CONFIG_DEFAULT_TCP_CONG="cubic"
281# CONFIG_TCP_MD5SIG is not set 278# CONFIG_TCP_MD5SIG is not set
282# CONFIG_IPV6 is not set 279CONFIG_IPV6=y
280# CONFIG_IPV6_PRIVACY is not set
281# CONFIG_IPV6_ROUTER_PREF is not set
282# CONFIG_IPV6_OPTIMISTIC_DAD is not set
283# CONFIG_INET6_AH is not set
284# CONFIG_INET6_ESP is not set
285# CONFIG_INET6_IPCOMP is not set
286# CONFIG_IPV6_MIP6 is not set
283# CONFIG_INET6_XFRM_TUNNEL is not set 287# CONFIG_INET6_XFRM_TUNNEL is not set
284# CONFIG_INET6_TUNNEL is not set 288# CONFIG_INET6_TUNNEL is not set
289CONFIG_INET6_XFRM_MODE_TRANSPORT=y
290CONFIG_INET6_XFRM_MODE_TUNNEL=y
291CONFIG_INET6_XFRM_MODE_BEET=y
292# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
293CONFIG_IPV6_SIT=y
294# CONFIG_IPV6_TUNNEL is not set
295# CONFIG_IPV6_MULTIPLE_TABLES is not set
285# CONFIG_NETWORK_SECMARK is not set 296# CONFIG_NETWORK_SECMARK is not set
286# CONFIG_NETFILTER is not set 297# CONFIG_NETFILTER is not set
287# CONFIG_IP_DCCP is not set 298# CONFIG_IP_DCCP is not set
@@ -338,12 +349,13 @@ CONFIG_FIB_RULES=y
338# 349#
339CONFIG_STANDALONE=y 350CONFIG_STANDALONE=y
340CONFIG_PREVENT_FIRMWARE_BUILD=y 351CONFIG_PREVENT_FIRMWARE_BUILD=y
341# CONFIG_FW_LOADER is not set 352CONFIG_FW_LOADER=y
342# CONFIG_DEBUG_DRIVER is not set 353# CONFIG_DEBUG_DRIVER is not set
343# CONFIG_DEBUG_DEVRES is not set 354# CONFIG_DEBUG_DEVRES is not set
344# CONFIG_SYS_HYPERVISOR is not set 355# CONFIG_SYS_HYPERVISOR is not set
345# CONFIG_CONNECTOR is not set 356# CONFIG_CONNECTOR is not set
346# CONFIG_MTD is not set 357# CONFIG_MTD is not set
358CONFIG_OF_DEVICE=y
347# CONFIG_PARPORT is not set 359# CONFIG_PARPORT is not set
348CONFIG_BLK_DEV=y 360CONFIG_BLK_DEV=y
349# CONFIG_BLK_DEV_FD is not set 361# CONFIG_BLK_DEV_FD is not set
@@ -356,9 +368,10 @@ CONFIG_BLK_DEV_LOOP=y
356# CONFIG_BLK_DEV_CRYPTOLOOP is not set 368# CONFIG_BLK_DEV_CRYPTOLOOP is not set
357CONFIG_BLK_DEV_NBD=y 369CONFIG_BLK_DEV_NBD=y
358# CONFIG_BLK_DEV_SX8 is not set 370# CONFIG_BLK_DEV_SX8 is not set
371# CONFIG_BLK_DEV_UB is not set
359CONFIG_BLK_DEV_RAM=y 372CONFIG_BLK_DEV_RAM=y
360CONFIG_BLK_DEV_RAM_COUNT=2 373CONFIG_BLK_DEV_RAM_COUNT=16
361CONFIG_BLK_DEV_RAM_SIZE=16384 374CONFIG_BLK_DEV_RAM_SIZE=131072
362CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 375CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
363# CONFIG_CDROM_PKTCDVD is not set 376# CONFIG_CDROM_PKTCDVD is not set
364# CONFIG_ATA_OVER_ETH is not set 377# CONFIG_ATA_OVER_ETH is not set
@@ -385,7 +398,8 @@ CONFIG_SCSI_PROC_FS=y
385CONFIG_BLK_DEV_SD=y 398CONFIG_BLK_DEV_SD=y
386CONFIG_CHR_DEV_ST=y 399CONFIG_CHR_DEV_ST=y
387# CONFIG_CHR_DEV_OSST is not set 400# CONFIG_CHR_DEV_OSST is not set
388# CONFIG_BLK_DEV_SR is not set 401CONFIG_BLK_DEV_SR=y
402# CONFIG_BLK_DEV_SR_VENDOR is not set
389CONFIG_CHR_DEV_SG=y 403CONFIG_CHR_DEV_SG=y
390# CONFIG_CHR_DEV_SCH is not set 404# CONFIG_CHR_DEV_SCH is not set
391 405
@@ -404,12 +418,8 @@ CONFIG_SCSI_WAIT_SCAN=m
404# CONFIG_SCSI_SPI_ATTRS is not set 418# CONFIG_SCSI_SPI_ATTRS is not set
405# CONFIG_SCSI_FC_ATTRS is not set 419# CONFIG_SCSI_FC_ATTRS is not set
406# CONFIG_SCSI_ISCSI_ATTRS is not set 420# CONFIG_SCSI_ISCSI_ATTRS is not set
407# CONFIG_SCSI_SAS_ATTRS is not set
408# CONFIG_SCSI_SAS_LIBSAS is not set 421# CONFIG_SCSI_SAS_LIBSAS is not set
409 422CONFIG_SCSI_LOWLEVEL=y
410#
411# SCSI low-level drivers
412#
413# CONFIG_ISCSI_TCP is not set 423# CONFIG_ISCSI_TCP is not set
414# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 424# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
415# CONFIG_SCSI_3W_9XXX is not set 425# CONFIG_SCSI_3W_9XXX is not set
@@ -447,7 +457,7 @@ CONFIG_SCSI_WAIT_SCAN=m
447# CONFIG_SCSI_SRP is not set 457# CONFIG_SCSI_SRP is not set
448CONFIG_ATA=y 458CONFIG_ATA=y
449# CONFIG_ATA_NONSTANDARD is not set 459# CONFIG_ATA_NONSTANDARD is not set
450# CONFIG_SATA_AHCI is not set 460CONFIG_SATA_AHCI=y
451# CONFIG_SATA_SVW is not set 461# CONFIG_SATA_SVW is not set
452# CONFIG_ATA_PIIX is not set 462# CONFIG_ATA_PIIX is not set
453# CONFIG_SATA_MV is not set 463# CONFIG_SATA_MV is not set
@@ -463,7 +473,7 @@ CONFIG_ATA=y
463# CONFIG_SATA_VIA is not set 473# CONFIG_SATA_VIA is not set
464# CONFIG_SATA_VITESSE is not set 474# CONFIG_SATA_VITESSE is not set
465# CONFIG_SATA_INIC162X is not set 475# CONFIG_SATA_INIC162X is not set
466# CONFIG_PATA_ALI is not set 476CONFIG_PATA_ALI=y
467# CONFIG_PATA_AMD is not set 477# CONFIG_PATA_AMD is not set
468# CONFIG_PATA_ARTOP is not set 478# CONFIG_PATA_ARTOP is not set
469# CONFIG_PATA_ATIIXP is not set 479# CONFIG_PATA_ATIIXP is not set
@@ -519,7 +529,7 @@ CONFIG_ATA=y
519# CONFIG_MACINTOSH_DRIVERS is not set 529# CONFIG_MACINTOSH_DRIVERS is not set
520CONFIG_NETDEVICES=y 530CONFIG_NETDEVICES=y
521# CONFIG_NETDEVICES_MULTIQUEUE is not set 531# CONFIG_NETDEVICES_MULTIQUEUE is not set
522# CONFIG_DUMMY is not set 532CONFIG_DUMMY=y
523# CONFIG_BONDING is not set 533# CONFIG_BONDING is not set
524# CONFIG_MACVLAN is not set 534# CONFIG_MACVLAN is not set
525# CONFIG_EQUALIZER is not set 535# CONFIG_EQUALIZER is not set
@@ -582,6 +592,16 @@ CONFIG_NETDEV_10000=y
582# 592#
583# CONFIG_WLAN_PRE80211 is not set 593# CONFIG_WLAN_PRE80211 is not set
584# CONFIG_WLAN_80211 is not set 594# CONFIG_WLAN_80211 is not set
595
596#
597# USB Network Adapters
598#
599# CONFIG_USB_CATC is not set
600# CONFIG_USB_KAWETH is not set
601# CONFIG_USB_PEGASUS is not set
602# CONFIG_USB_RTL8150 is not set
603# CONFIG_USB_USBNET_MII is not set
604# CONFIG_USB_USBNET is not set
585# CONFIG_WAN is not set 605# CONFIG_WAN is not set
586# CONFIG_FDDI is not set 606# CONFIG_FDDI is not set
587# CONFIG_HIPPI is not set 607# CONFIG_HIPPI is not set
@@ -647,10 +667,13 @@ CONFIG_HW_CONSOLE=y
647CONFIG_SERIAL_8250=y 667CONFIG_SERIAL_8250=y
648CONFIG_SERIAL_8250_CONSOLE=y 668CONFIG_SERIAL_8250_CONSOLE=y
649CONFIG_SERIAL_8250_PCI=y 669CONFIG_SERIAL_8250_PCI=y
650CONFIG_SERIAL_8250_NR_UARTS=4 670CONFIG_SERIAL_8250_NR_UARTS=2
651CONFIG_SERIAL_8250_RUNTIME_UARTS=4 671CONFIG_SERIAL_8250_RUNTIME_UARTS=2
652# CONFIG_SERIAL_8250_EXTENDED is not set 672CONFIG_SERIAL_8250_EXTENDED=y
673CONFIG_SERIAL_8250_MANY_PORTS=y
653CONFIG_SERIAL_8250_SHARE_IRQ=y 674CONFIG_SERIAL_8250_SHARE_IRQ=y
675CONFIG_SERIAL_8250_DETECT_IRQ=y
676CONFIG_SERIAL_8250_RSA=y
654 677
655# 678#
656# Non-8250 serial port support 679# Non-8250 serial port support
@@ -676,7 +699,62 @@ CONFIG_GEN_RTC_X=y
676# CONFIG_RAW_DRIVER is not set 699# CONFIG_RAW_DRIVER is not set
677# CONFIG_TCG_TPM is not set 700# CONFIG_TCG_TPM is not set
678CONFIG_DEVPORT=y 701CONFIG_DEVPORT=y
679# CONFIG_I2C is not set 702CONFIG_I2C=y
703CONFIG_I2C_BOARDINFO=y
704# CONFIG_I2C_CHARDEV is not set
705
706#
707# I2C Algorithms
708#
709# CONFIG_I2C_ALGOBIT is not set
710# CONFIG_I2C_ALGOPCF is not set
711# CONFIG_I2C_ALGOPCA is not set
712
713#
714# I2C Hardware Bus support
715#
716# CONFIG_I2C_ALI1535 is not set
717# CONFIG_I2C_ALI1563 is not set
718# CONFIG_I2C_ALI15X3 is not set
719# CONFIG_I2C_AMD756 is not set
720# CONFIG_I2C_AMD8111 is not set
721# CONFIG_I2C_I801 is not set
722# CONFIG_I2C_I810 is not set
723# CONFIG_I2C_PIIX4 is not set
724CONFIG_I2C_MPC=y
725# CONFIG_I2C_NFORCE2 is not set
726# CONFIG_I2C_OCORES is not set
727# CONFIG_I2C_PARPORT_LIGHT is not set
728# CONFIG_I2C_PROSAVAGE is not set
729# CONFIG_I2C_SAVAGE4 is not set
730# CONFIG_I2C_SIMTEC is not set
731# CONFIG_I2C_SIS5595 is not set
732# CONFIG_I2C_SIS630 is not set
733# CONFIG_I2C_SIS96X is not set
734# CONFIG_I2C_TAOS_EVM is not set
735# CONFIG_I2C_STUB is not set
736# CONFIG_I2C_TINY_USB is not set
737# CONFIG_I2C_VIA is not set
738# CONFIG_I2C_VIAPRO is not set
739# CONFIG_I2C_VOODOO3 is not set
740
741#
742# Miscellaneous I2C Chip support
743#
744# CONFIG_SENSORS_DS1337 is not set
745# CONFIG_SENSORS_DS1374 is not set
746# CONFIG_DS1682 is not set
747CONFIG_SENSORS_EEPROM=y
748# CONFIG_SENSORS_PCF8574 is not set
749# CONFIG_SENSORS_PCA9539 is not set
750# CONFIG_SENSORS_PCF8591 is not set
751# CONFIG_SENSORS_M41T00 is not set
752# CONFIG_SENSORS_MAX6875 is not set
753# CONFIG_SENSORS_TSL2550 is not set
754# CONFIG_I2C_DEBUG_CORE is not set
755# CONFIG_I2C_DEBUG_ALGO is not set
756# CONFIG_I2C_DEBUG_BUS is not set
757# CONFIG_I2C_DEBUG_CHIP is not set
680 758
681# 759#
682# SPI support 760# SPI support
@@ -701,6 +779,32 @@ CONFIG_DVB_CORE=m
701CONFIG_DVB_CAPTURE_DRIVERS=y 779CONFIG_DVB_CAPTURE_DRIVERS=y
702 780
703# 781#
782# Supported SAA7146 based PCI Adapters
783#
784
785#
786# Supported USB Adapters
787#
788# CONFIG_DVB_USB is not set
789# CONFIG_DVB_TTUSB_BUDGET is not set
790# CONFIG_DVB_TTUSB_DEC is not set
791# CONFIG_DVB_CINERGYT2 is not set
792
793#
794# Supported FlexCopII (B2C2) Adapters
795#
796# CONFIG_DVB_B2C2_FLEXCOP is not set
797
798#
799# Supported BT878 Adapters
800#
801
802#
803# Supported Pluto2 Adapters
804#
805# CONFIG_DVB_PLUTO2 is not set
806
807#
704# Supported DVB Frontends 808# Supported DVB Frontends
705# 809#
706 810
@@ -712,27 +816,66 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
712# 816#
713# DVB-S (satellite) frontends 817# DVB-S (satellite) frontends
714# 818#
819# CONFIG_DVB_STV0299 is not set
820# CONFIG_DVB_CX24110 is not set
821# CONFIG_DVB_CX24123 is not set
822# CONFIG_DVB_TDA8083 is not set
823# CONFIG_DVB_MT312 is not set
824# CONFIG_DVB_VES1X93 is not set
825# CONFIG_DVB_S5H1420 is not set
826# CONFIG_DVB_TDA10086 is not set
715 827
716# 828#
717# DVB-T (terrestrial) frontends 829# DVB-T (terrestrial) frontends
718# 830#
831# CONFIG_DVB_SP8870 is not set
832# CONFIG_DVB_SP887X is not set
833# CONFIG_DVB_CX22700 is not set
834# CONFIG_DVB_CX22702 is not set
835# CONFIG_DVB_L64781 is not set
836# CONFIG_DVB_TDA1004X is not set
837# CONFIG_DVB_NXT6000 is not set
838# CONFIG_DVB_MT352 is not set
839# CONFIG_DVB_ZL10353 is not set
840# CONFIG_DVB_DIB3000MB is not set
841# CONFIG_DVB_DIB3000MC is not set
842# CONFIG_DVB_DIB7000M is not set
843# CONFIG_DVB_DIB7000P is not set
719 844
720# 845#
721# DVB-C (cable) frontends 846# DVB-C (cable) frontends
722# 847#
848# CONFIG_DVB_VES1820 is not set
849# CONFIG_DVB_TDA10021 is not set
850# CONFIG_DVB_TDA10023 is not set
851# CONFIG_DVB_STV0297 is not set
723 852
724# 853#
725# ATSC (North American/Korean Terrestrial/Cable DTV) frontends 854# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
726# 855#
856# CONFIG_DVB_NXT200X is not set
857# CONFIG_DVB_OR51211 is not set
858# CONFIG_DVB_OR51132 is not set
859# CONFIG_DVB_BCM3510 is not set
860# CONFIG_DVB_LGDT330X is not set
727 861
728# 862#
729# Tuners/PLL support 863# Tuners/PLL support
730# 864#
865# CONFIG_DVB_PLL is not set
866# CONFIG_DVB_TDA826X is not set
867# CONFIG_DVB_TDA827X is not set
868# CONFIG_DVB_TUNER_QT1010 is not set
869# CONFIG_DVB_TUNER_MT2060 is not set
731 870
732# 871#
733# Miscellaneous devices 872# Miscellaneous devices
734# 873#
874# CONFIG_DVB_LNBP21 is not set
875# CONFIG_DVB_ISL6421 is not set
876# CONFIG_DVB_TUA6100 is not set
735CONFIG_DAB=y 877CONFIG_DAB=y
878# CONFIG_USB_DABUSB is not set
736 879
737# 880#
738# Graphics support 881# Graphics support
@@ -744,55 +887,261 @@ CONFIG_DAB=y
744# 887#
745# CONFIG_DISPLAY_SUPPORT is not set 888# CONFIG_DISPLAY_SUPPORT is not set
746# CONFIG_VGASTATE is not set 889# CONFIG_VGASTATE is not set
890CONFIG_VIDEO_OUTPUT_CONTROL=y
747# CONFIG_FB is not set 891# CONFIG_FB is not set
748# CONFIG_FB_IBM_GXT4500 is not set 892# CONFIG_FB_IBM_GXT4500 is not set
749 893
750# 894#
751# Console display driver support 895# Console display driver support
752# 896#
753# CONFIG_VGA_CONSOLE is not set 897CONFIG_VGA_CONSOLE=y
898# CONFIG_VGACON_SOFT_SCROLLBACK is not set
754CONFIG_DUMMY_CONSOLE=y 899CONFIG_DUMMY_CONSOLE=y
755 900
756# 901#
757# Sound 902# Sound
758# 903#
759# CONFIG_SOUND is not set 904CONFIG_SOUND=y
905
906#
907# Advanced Linux Sound Architecture
908#
909CONFIG_SND=y
910CONFIG_SND_TIMER=y
911CONFIG_SND_PCM=y
912# CONFIG_SND_SEQUENCER is not set
913# CONFIG_SND_MIXER_OSS is not set
914# CONFIG_SND_PCM_OSS is not set
915# CONFIG_SND_DYNAMIC_MINORS is not set
916CONFIG_SND_SUPPORT_OLD_API=y
917CONFIG_SND_VERBOSE_PROCFS=y
918# CONFIG_SND_VERBOSE_PRINTK is not set
919# CONFIG_SND_DEBUG is not set
920
921#
922# Generic devices
923#
924CONFIG_SND_AC97_CODEC=y
925# CONFIG_SND_DUMMY is not set
926# CONFIG_SND_MTPAV is not set
927# CONFIG_SND_SERIAL_U16550 is not set
928# CONFIG_SND_MPU401 is not set
929
930#
931# PCI devices
932#
933# CONFIG_SND_AD1889 is not set
934# CONFIG_SND_ALS300 is not set
935# CONFIG_SND_ALS4000 is not set
936# CONFIG_SND_ALI5451 is not set
937# CONFIG_SND_ATIIXP is not set
938# CONFIG_SND_ATIIXP_MODEM is not set
939# CONFIG_SND_AU8810 is not set
940# CONFIG_SND_AU8820 is not set
941# CONFIG_SND_AU8830 is not set
942# CONFIG_SND_AZT3328 is not set
943# CONFIG_SND_BT87X is not set
944# CONFIG_SND_CA0106 is not set
945# CONFIG_SND_CMIPCI is not set
946# CONFIG_SND_CS4281 is not set
947# CONFIG_SND_CS46XX is not set
948# CONFIG_SND_CS5530 is not set
949# CONFIG_SND_DARLA20 is not set
950# CONFIG_SND_GINA20 is not set
951# CONFIG_SND_LAYLA20 is not set
952# CONFIG_SND_DARLA24 is not set
953# CONFIG_SND_GINA24 is not set
954# CONFIG_SND_LAYLA24 is not set
955# CONFIG_SND_MONA is not set
956# CONFIG_SND_MIA is not set
957# CONFIG_SND_ECHO3G is not set
958# CONFIG_SND_INDIGO is not set
959# CONFIG_SND_INDIGOIO is not set
960# CONFIG_SND_INDIGODJ is not set
961# CONFIG_SND_EMU10K1 is not set
962# CONFIG_SND_EMU10K1X is not set
963# CONFIG_SND_ENS1370 is not set
964# CONFIG_SND_ENS1371 is not set
965# CONFIG_SND_ES1938 is not set
966# CONFIG_SND_ES1968 is not set
967# CONFIG_SND_FM801 is not set
968# CONFIG_SND_HDA_INTEL is not set
969# CONFIG_SND_HDSP is not set
970# CONFIG_SND_HDSPM is not set
971# CONFIG_SND_ICE1712 is not set
972# CONFIG_SND_ICE1724 is not set
973CONFIG_SND_INTEL8X0=y
974# CONFIG_SND_INTEL8X0M is not set
975# CONFIG_SND_KORG1212 is not set
976# CONFIG_SND_MAESTRO3 is not set
977# CONFIG_SND_MIXART is not set
978# CONFIG_SND_NM256 is not set
979# CONFIG_SND_PCXHR is not set
980# CONFIG_SND_RIPTIDE is not set
981# CONFIG_SND_RME32 is not set
982# CONFIG_SND_RME96 is not set
983# CONFIG_SND_RME9652 is not set
984# CONFIG_SND_SONICVIBES is not set
985# CONFIG_SND_TRIDENT is not set
986# CONFIG_SND_VIA82XX is not set
987# CONFIG_SND_VIA82XX_MODEM is not set
988# CONFIG_SND_VX222 is not set
989# CONFIG_SND_YMFPCI is not set
990# CONFIG_SND_AC97_POWER_SAVE is not set
991
992#
993# ALSA PowerMac devices
994#
995
996#
997# ALSA PowerPC devices
998#
999
1000#
1001# USB devices
1002#
1003# CONFIG_SND_USB_AUDIO is not set
1004# CONFIG_SND_USB_USX2Y is not set
1005# CONFIG_SND_USB_CAIAQ is not set
1006
1007#
1008# System on Chip audio support
1009#
1010# CONFIG_SND_SOC is not set
1011
1012#
1013# SoC Audio support for SuperH
1014#
1015
1016#
1017# Open Sound System
1018#
1019# CONFIG_SOUND_PRIME is not set
1020CONFIG_AC97_BUS=y
760CONFIG_HID_SUPPORT=y 1021CONFIG_HID_SUPPORT=y
761CONFIG_HID=y 1022CONFIG_HID=y
762# CONFIG_HID_DEBUG is not set 1023# CONFIG_HID_DEBUG is not set
1024
1025#
1026# USB Input Devices
1027#
1028CONFIG_USB_HID=y
1029# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1030# CONFIG_HID_FF is not set
1031# CONFIG_USB_HIDDEV is not set
763CONFIG_USB_SUPPORT=y 1032CONFIG_USB_SUPPORT=y
764CONFIG_USB_ARCH_HAS_HCD=y 1033CONFIG_USB_ARCH_HAS_HCD=y
765CONFIG_USB_ARCH_HAS_OHCI=y 1034CONFIG_USB_ARCH_HAS_OHCI=y
766CONFIG_USB_ARCH_HAS_EHCI=y 1035CONFIG_USB_ARCH_HAS_EHCI=y
767# CONFIG_USB is not set 1036CONFIG_USB=y
1037# CONFIG_USB_DEBUG is not set
1038
1039#
1040# Miscellaneous USB options
1041#
1042CONFIG_USB_DEVICEFS=y
1043CONFIG_USB_DEVICE_CLASS=y
1044# CONFIG_USB_DYNAMIC_MINORS is not set
1045# CONFIG_USB_OTG is not set
1046
1047#
1048# USB Host Controller Drivers
1049#
1050CONFIG_USB_EHCI_HCD=y
1051# CONFIG_USB_EHCI_SPLIT_ISO is not set
1052# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1053# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1054# CONFIG_USB_ISP116X_HCD is not set
1055CONFIG_USB_OHCI_HCD=y
1056CONFIG_USB_OHCI_HCD_PPC_OF=y
1057CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1058CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
1059CONFIG_USB_OHCI_HCD_PCI=y
1060CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1061CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1062CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1063# CONFIG_USB_UHCI_HCD is not set
1064# CONFIG_USB_SL811_HCD is not set
1065# CONFIG_USB_R8A66597_HCD is not set
1066
1067#
1068# USB Device Class drivers
1069#
1070# CONFIG_USB_ACM is not set
1071# CONFIG_USB_PRINTER is not set
768 1072
769# 1073#
770# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1074# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
771# 1075#
772 1076
773# 1077#
774# USB Gadget Support 1078# may also be needed; see USB_STORAGE Help for more information
775# 1079#
776# CONFIG_USB_GADGET is not set 1080CONFIG_USB_STORAGE=y
777# CONFIG_MMC is not set 1081# CONFIG_USB_STORAGE_DEBUG is not set
1082# CONFIG_USB_STORAGE_DATAFAB is not set
1083# CONFIG_USB_STORAGE_FREECOM is not set
1084# CONFIG_USB_STORAGE_DPCM is not set
1085# CONFIG_USB_STORAGE_USBAT is not set
1086# CONFIG_USB_STORAGE_SDDR09 is not set
1087# CONFIG_USB_STORAGE_SDDR55 is not set
1088# CONFIG_USB_STORAGE_JUMPSHOT is not set
1089# CONFIG_USB_STORAGE_ALAUDA is not set
1090# CONFIG_USB_STORAGE_KARMA is not set
1091# CONFIG_USB_LIBUSUAL is not set
778 1092
779# 1093#
780# LED devices 1094# USB Imaging devices
781# 1095#
782# CONFIG_NEW_LEDS is not set 1096# CONFIG_USB_MDC800 is not set
1097# CONFIG_USB_MICROTEK is not set
1098CONFIG_USB_MON=y
783 1099
784# 1100#
785# LED drivers 1101# USB port drivers
786# 1102#
787 1103
788# 1104#
789# LED Triggers 1105# USB Serial Converter support
1106#
1107# CONFIG_USB_SERIAL is not set
1108
1109#
1110# USB Miscellaneous drivers
1111#
1112# CONFIG_USB_EMI62 is not set
1113# CONFIG_USB_EMI26 is not set
1114# CONFIG_USB_ADUTUX is not set
1115# CONFIG_USB_AUERSWALD is not set
1116# CONFIG_USB_RIO500 is not set
1117# CONFIG_USB_LEGOTOWER is not set
1118# CONFIG_USB_LCD is not set
1119# CONFIG_USB_BERRY_CHARGE is not set
1120# CONFIG_USB_LED is not set
1121# CONFIG_USB_CYPRESS_CY7C63 is not set
1122# CONFIG_USB_CYTHERM is not set
1123# CONFIG_USB_PHIDGET is not set
1124# CONFIG_USB_IDMOUSE is not set
1125# CONFIG_USB_FTDI_ELAN is not set
1126# CONFIG_USB_APPLEDISPLAY is not set
1127# CONFIG_USB_SISUSBVGA is not set
1128# CONFIG_USB_LD is not set
1129# CONFIG_USB_TRANCEVIBRATOR is not set
1130# CONFIG_USB_IOWARRIOR is not set
1131# CONFIG_USB_TEST is not set
1132
1133#
1134# USB DSL modem support
790# 1135#
791# CONFIG_INFINIBAND is not set
792 1136
793# 1137#
794# Real Time Clock 1138# USB Gadget Support
795# 1139#
1140# CONFIG_USB_GADGET is not set
1141# CONFIG_MMC is not set
1142# CONFIG_NEW_LEDS is not set
1143# CONFIG_INFINIBAND is not set
1144# CONFIG_EDAC is not set
796CONFIG_RTC_LIB=y 1145CONFIG_RTC_LIB=y
797CONFIG_RTC_CLASS=y 1146CONFIG_RTC_CLASS=y
798CONFIG_RTC_HCTOSYS=y 1147CONFIG_RTC_HCTOSYS=y
@@ -809,10 +1158,28 @@ CONFIG_RTC_INTF_DEV=y
809# CONFIG_RTC_DRV_TEST is not set 1158# CONFIG_RTC_DRV_TEST is not set
810 1159
811# 1160#
1161# I2C RTC drivers
1162#
1163# CONFIG_RTC_DRV_DS1307 is not set
1164# CONFIG_RTC_DRV_DS1672 is not set
1165# CONFIG_RTC_DRV_MAX6900 is not set
1166# CONFIG_RTC_DRV_RS5C372 is not set
1167# CONFIG_RTC_DRV_ISL1208 is not set
1168# CONFIG_RTC_DRV_X1205 is not set
1169# CONFIG_RTC_DRV_PCF8563 is not set
1170# CONFIG_RTC_DRV_PCF8583 is not set
1171# CONFIG_RTC_DRV_M41T80 is not set
1172
1173#
1174# SPI RTC drivers
1175#
1176
1177#
812# Platform RTC drivers 1178# Platform RTC drivers
813# 1179#
814# CONFIG_RTC_DRV_CMOS is not set 1180CONFIG_RTC_DRV_CMOS=y
815# CONFIG_RTC_DRV_DS1553 is not set 1181# CONFIG_RTC_DRV_DS1553 is not set
1182# CONFIG_RTC_DRV_STK17TA8 is not set
816# CONFIG_RTC_DRV_DS1742 is not set 1183# CONFIG_RTC_DRV_DS1742 is not set
817# CONFIG_RTC_DRV_M48T86 is not set 1184# CONFIG_RTC_DRV_M48T86 is not set
818# CONFIG_RTC_DRV_M48T59 is not set 1185# CONFIG_RTC_DRV_M48T59 is not set
@@ -933,10 +1300,13 @@ CONFIG_NFS_V3=y
933# CONFIG_NFS_V3_ACL is not set 1300# CONFIG_NFS_V3_ACL is not set
934CONFIG_NFS_V4=y 1301CONFIG_NFS_V4=y
935# CONFIG_NFS_DIRECTIO is not set 1302# CONFIG_NFS_DIRECTIO is not set
936# CONFIG_NFSD is not set 1303CONFIG_NFSD=y
1304# CONFIG_NFSD_V3 is not set
1305CONFIG_NFSD_TCP=y
937CONFIG_ROOT_NFS=y 1306CONFIG_ROOT_NFS=y
938CONFIG_LOCKD=y 1307CONFIG_LOCKD=y
939CONFIG_LOCKD_V4=y 1308CONFIG_LOCKD_V4=y
1309CONFIG_EXPORTFS=y
940CONFIG_NFS_COMMON=y 1310CONFIG_NFS_COMMON=y
941CONFIG_SUNRPC=y 1311CONFIG_SUNRPC=y
942CONFIG_SUNRPC_GSS=y 1312CONFIG_SUNRPC_GSS=y
@@ -957,7 +1327,7 @@ CONFIG_PARTITION_ADVANCED=y
957# CONFIG_OSF_PARTITION is not set 1327# CONFIG_OSF_PARTITION is not set
958# CONFIG_AMIGA_PARTITION is not set 1328# CONFIG_AMIGA_PARTITION is not set
959# CONFIG_ATARI_PARTITION is not set 1329# CONFIG_ATARI_PARTITION is not set
960# CONFIG_MAC_PARTITION is not set 1330CONFIG_MAC_PARTITION=y
961CONFIG_MSDOS_PARTITION=y 1331CONFIG_MSDOS_PARTITION=y
962# CONFIG_BSD_DISKLABEL is not set 1332# CONFIG_BSD_DISKLABEL is not set
963# CONFIG_MINIX_SUBPARTITION is not set 1333# CONFIG_MINIX_SUBPARTITION is not set
@@ -1078,7 +1448,6 @@ CONFIG_FORCED_INLINING=y
1078# CONFIG_DEBUG_PAGEALLOC is not set 1448# CONFIG_DEBUG_PAGEALLOC is not set
1079# CONFIG_DEBUGGER is not set 1449# CONFIG_DEBUGGER is not set
1080# CONFIG_BDI_SWITCH is not set 1450# CONFIG_BDI_SWITCH is not set
1081# CONFIG_BOOTX_TEXT is not set
1082# CONFIG_PPC_EARLY_DEBUG is not set 1451# CONFIG_PPC_EARLY_DEBUG is not set
1083 1452
1084# 1453#
diff --git a/arch/powerpc/configs/mpc8560_ads_defconfig b/arch/powerpc/configs/mpc8560_ads_defconfig
index a30bc6f621..0fb54c775c 100644
--- a/arch/powerpc/configs/mpc8560_ads_defconfig
+++ b/arch/powerpc/configs/mpc8560_ads_defconfig
@@ -1,9 +1,26 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:56:58 2007 4# Tue Aug 28 21:24:43 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
7CONFIG_PPC32=y 24CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 25CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 26CONFIG_MMU=y
@@ -14,61 +31,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 31CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 32CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 33CONFIG_GENERIC_FIND_NEXT_BIT=y
34# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 35CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 36CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 37CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 38CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 39CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 40CONFIG_PPC_OF=y
41CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 42CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 43# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 44CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 45CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 46CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_85xx=y
42CONFIG_E500=y
43# CONFIG_PPC_DCR_NATIVE is not set 47# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 48# CONFIG_PPC_DCR_MMIO is not set
45CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y
49# CONFIG_PPC_MM_SLICES is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 50
52# 51#
53# Code maturity level options 52# General setup
54# 53#
55CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 55CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 58CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 59CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 61CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 62# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 64# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 65# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 66# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 67# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
@@ -102,19 +96,12 @@ CONFIG_SLAB=y
102CONFIG_RT_MUTEXES=y 96CONFIG_RT_MUTEXES=y
103# CONFIG_TINY_SHMEM is not set 97# CONFIG_TINY_SHMEM is not set
104CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
105
106#
107# Loadable module support
108#
109# CONFIG_MODULES is not set 99# CONFIG_MODULES is not set
110
111#
112# Block layer
113#
114CONFIG_BLOCK=y 100CONFIG_BLOCK=y
115# CONFIG_LBD is not set 101# CONFIG_LBD is not set
116# CONFIG_BLK_DEV_IO_TRACE is not set 102# CONFIG_BLK_DEV_IO_TRACE is not set
117# CONFIG_LSF is not set 103# CONFIG_LSF is not set
104# CONFIG_BLK_DEV_BSG is not set
118 105
119# 106#
120# IO Schedulers 107# IO Schedulers
@@ -155,6 +142,7 @@ CONFIG_MPIC=y
155# CONFIG_GENERIC_IOMAP is not set 142# CONFIG_GENERIC_IOMAP is not set
156# CONFIG_CPU_FREQ is not set 143# CONFIG_CPU_FREQ is not set
157CONFIG_CPM2=y 144CONFIG_CPM2=y
145# CONFIG_FSL_ULI1575 is not set
158 146
159# 147#
160# Kernel options 148# Kernel options
@@ -184,6 +172,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
184CONFIG_SPLIT_PTLOCK_CPUS=4 172CONFIG_SPLIT_PTLOCK_CPUS=4
185# CONFIG_RESOURCES_64BIT is not set 173# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=1 174CONFIG_ZONE_DMA_FLAG=1
175CONFIG_BOUNCE=y
176CONFIG_VIRT_TO_BUS=y
187# CONFIG_PROC_DEVICETREE is not set 177# CONFIG_PROC_DEVICETREE is not set
188# CONFIG_CMDLINE_BOOL is not set 178# CONFIG_CMDLINE_BOOL is not set
189# CONFIG_PM is not set 179# CONFIG_PM is not set
@@ -197,10 +187,11 @@ CONFIG_ISA_DMA_API=y
197# 187#
198CONFIG_ZONE_DMA=y 188CONFIG_ZONE_DMA=y
199CONFIG_PPC_INDIRECT_PCI=y 189CONFIG_PPC_INDIRECT_PCI=y
200CONFIG_PPC_INDIRECT_PCI_BE=y
201CONFIG_FSL_SOC=y 190CONFIG_FSL_SOC=y
191CONFIG_FSL_PCI=y
202CONFIG_PCI=y 192CONFIG_PCI=y
203CONFIG_PCI_DOMAINS=y 193CONFIG_PCI_DOMAINS=y
194CONFIG_PCI_SYSCALL=y
204# CONFIG_PCIEPORTBUS is not set 195# CONFIG_PCIEPORTBUS is not set
205CONFIG_ARCH_SUPPORTS_MSI=y 196CONFIG_ARCH_SUPPORTS_MSI=y
206# CONFIG_PCI_MSI is not set 197# CONFIG_PCI_MSI is not set
@@ -311,6 +302,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
311# CONFIG_MAC80211 is not set 302# CONFIG_MAC80211 is not set
312# CONFIG_IEEE80211 is not set 303# CONFIG_IEEE80211 is not set
313# CONFIG_RFKILL is not set 304# CONFIG_RFKILL is not set
305# CONFIG_NET_9P is not set
314 306
315# 307#
316# Device Drivers 308# Device Drivers
@@ -325,26 +317,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
325# CONFIG_DEBUG_DRIVER is not set 317# CONFIG_DEBUG_DRIVER is not set
326# CONFIG_DEBUG_DEVRES is not set 318# CONFIG_DEBUG_DEVRES is not set
327# CONFIG_SYS_HYPERVISOR is not set 319# CONFIG_SYS_HYPERVISOR is not set
328
329#
330# Connector - unified userspace <-> kernelspace linker
331#
332# CONFIG_CONNECTOR is not set 320# CONFIG_CONNECTOR is not set
333# CONFIG_MTD is not set 321# CONFIG_MTD is not set
334 322CONFIG_OF_DEVICE=y
335#
336# Parallel port support
337#
338# CONFIG_PARPORT is not set 323# CONFIG_PARPORT is not set
339 324CONFIG_BLK_DEV=y
340#
341# Plug and Play support
342#
343# CONFIG_PNPACPI is not set
344
345#
346# Block devices
347#
348# CONFIG_BLK_DEV_FD is not set 325# CONFIG_BLK_DEV_FD is not set
349# CONFIG_BLK_CPQ_DA is not set 326# CONFIG_BLK_CPQ_DA is not set
350# CONFIG_BLK_CPQ_CISS_DA is not set 327# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -361,14 +338,11 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
361CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 338CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
362# CONFIG_CDROM_PKTCDVD is not set 339# CONFIG_CDROM_PKTCDVD is not set
363# CONFIG_ATA_OVER_ETH is not set 340# CONFIG_ATA_OVER_ETH is not set
364 341CONFIG_MISC_DEVICES=y
365#
366# Misc devices
367#
368# CONFIG_PHANTOM is not set 342# CONFIG_PHANTOM is not set
343# CONFIG_EEPROM_93CX6 is not set
369# CONFIG_SGI_IOC4 is not set 344# CONFIG_SGI_IOC4 is not set
370# CONFIG_TIFM_CORE is not set 345# CONFIG_TIFM_CORE is not set
371# CONFIG_BLINK is not set
372# CONFIG_IDE is not set 346# CONFIG_IDE is not set
373 347
374# 348#
@@ -376,12 +350,9 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
376# 350#
377# CONFIG_RAID_ATTRS is not set 351# CONFIG_RAID_ATTRS is not set
378# CONFIG_SCSI is not set 352# CONFIG_SCSI is not set
353# CONFIG_SCSI_DMA is not set
379# CONFIG_SCSI_NETLINK is not set 354# CONFIG_SCSI_NETLINK is not set
380# CONFIG_ATA is not set 355# CONFIG_ATA is not set
381
382#
383# Multi-device support (RAID and LVM)
384#
385# CONFIG_MD is not set 356# CONFIG_MD is not set
386 357
387# 358#
@@ -394,19 +365,13 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
394# 365#
395# CONFIG_FIREWIRE is not set 366# CONFIG_FIREWIRE is not set
396# CONFIG_IEEE1394 is not set 367# CONFIG_IEEE1394 is not set
397
398#
399# I2O device support
400#
401# CONFIG_I2O is not set 368# CONFIG_I2O is not set
402# CONFIG_MACINTOSH_DRIVERS is not set 369# CONFIG_MACINTOSH_DRIVERS is not set
403
404#
405# Network device support
406#
407CONFIG_NETDEVICES=y 370CONFIG_NETDEVICES=y
371# CONFIG_NETDEVICES_MULTIQUEUE is not set
408# CONFIG_DUMMY is not set 372# CONFIG_DUMMY is not set
409# CONFIG_BONDING is not set 373# CONFIG_BONDING is not set
374# CONFIG_MACVLAN is not set
410# CONFIG_EQUALIZER is not set 375# CONFIG_EQUALIZER is not set
411# CONFIG_TUN is not set 376# CONFIG_TUN is not set
412# CONFIG_ARCNET is not set 377# CONFIG_ARCNET is not set
@@ -423,21 +388,14 @@ CONFIG_DAVICOM_PHY=y
423# CONFIG_VITESSE_PHY is not set 388# CONFIG_VITESSE_PHY is not set
424# CONFIG_SMSC_PHY is not set 389# CONFIG_SMSC_PHY is not set
425# CONFIG_BROADCOM_PHY is not set 390# CONFIG_BROADCOM_PHY is not set
391# CONFIG_ICPLUS_PHY is not set
426# CONFIG_FIXED_PHY is not set 392# CONFIG_FIXED_PHY is not set
427
428#
429# Ethernet (10 or 100Mbit)
430#
431CONFIG_NET_ETHERNET=y 393CONFIG_NET_ETHERNET=y
432CONFIG_MII=y 394CONFIG_MII=y
433# CONFIG_HAPPYMEAL is not set 395# CONFIG_HAPPYMEAL is not set
434# CONFIG_SUNGEM is not set 396# CONFIG_SUNGEM is not set
435# CONFIG_CASSINI is not set 397# CONFIG_CASSINI is not set
436# CONFIG_NET_VENDOR_3COM is not set 398# CONFIG_NET_VENDOR_3COM is not set
437
438#
439# Tulip family network device support
440#
441# CONFIG_NET_TULIP is not set 399# CONFIG_NET_TULIP is not set
442# CONFIG_HP100 is not set 400# CONFIG_HP100 is not set
443# CONFIG_NET_PCI is not set 401# CONFIG_NET_PCI is not set
@@ -457,7 +415,6 @@ CONFIG_E1000_NAPI=y
457# CONFIG_SIS190 is not set 415# CONFIG_SIS190 is not set
458# CONFIG_SKGE is not set 416# CONFIG_SKGE is not set
459# CONFIG_SKY2 is not set 417# CONFIG_SKY2 is not set
460# CONFIG_SK98LIN is not set
461# CONFIG_VIA_VELOCITY is not set 418# CONFIG_VIA_VELOCITY is not set
462# CONFIG_TIGON3 is not set 419# CONFIG_TIGON3 is not set
463# CONFIG_BNX2 is not set 420# CONFIG_BNX2 is not set
@@ -489,15 +446,7 @@ CONFIG_NETDEV_10000=y
489# CONFIG_NETCONSOLE is not set 446# CONFIG_NETCONSOLE is not set
490# CONFIG_NETPOLL is not set 447# CONFIG_NETPOLL is not set
491# CONFIG_NET_POLL_CONTROLLER is not set 448# CONFIG_NET_POLL_CONTROLLER is not set
492
493#
494# ISDN subsystem
495#
496# CONFIG_ISDN is not set 449# CONFIG_ISDN is not set
497
498#
499# Telephony Support
500#
501# CONFIG_PHONE is not set 450# CONFIG_PHONE is not set
502 451
503# 452#
@@ -561,10 +510,6 @@ CONFIG_SERIAL_CPM_SCC2=y
561CONFIG_UNIX98_PTYS=y 510CONFIG_UNIX98_PTYS=y
562CONFIG_LEGACY_PTYS=y 511CONFIG_LEGACY_PTYS=y
563CONFIG_LEGACY_PTY_COUNT=256 512CONFIG_LEGACY_PTY_COUNT=256
564
565#
566# IPMI
567#
568# CONFIG_IPMI_HANDLER is not set 513# CONFIG_IPMI_HANDLER is not set
569# CONFIG_WATCHDOG is not set 514# CONFIG_WATCHDOG is not set
570CONFIG_HW_RANDOM=y 515CONFIG_HW_RANDOM=y
@@ -576,10 +521,6 @@ CONFIG_GEN_RTC=y
576# CONFIG_AGP is not set 521# CONFIG_AGP is not set
577# CONFIG_DRM is not set 522# CONFIG_DRM is not set
578# CONFIG_RAW_DRIVER is not set 523# CONFIG_RAW_DRIVER is not set
579
580#
581# TPM devices
582#
583# CONFIG_TCG_TPM is not set 524# CONFIG_TCG_TPM is not set
584CONFIG_DEVPORT=y 525CONFIG_DEVPORT=y
585# CONFIG_I2C is not set 526# CONFIG_I2C is not set
@@ -589,20 +530,24 @@ CONFIG_DEVPORT=y
589# 530#
590# CONFIG_SPI is not set 531# CONFIG_SPI is not set
591# CONFIG_SPI_MASTER is not set 532# CONFIG_SPI_MASTER is not set
592
593#
594# Dallas's 1-wire bus
595#
596# CONFIG_W1 is not set 533# CONFIG_W1 is not set
534# CONFIG_POWER_SUPPLY is not set
597CONFIG_HWMON=y 535CONFIG_HWMON=y
598# CONFIG_HWMON_VID is not set 536# CONFIG_HWMON_VID is not set
599# CONFIG_SENSORS_ABITUGURU is not set 537# CONFIG_SENSORS_ABITUGURU is not set
538# CONFIG_SENSORS_ABITUGURU3 is not set
600# CONFIG_SENSORS_F71805F is not set 539# CONFIG_SENSORS_F71805F is not set
540# CONFIG_SENSORS_IT87 is not set
541# CONFIG_SENSORS_PC87360 is not set
601# CONFIG_SENSORS_PC87427 is not set 542# CONFIG_SENSORS_PC87427 is not set
543# CONFIG_SENSORS_SIS5595 is not set
602# CONFIG_SENSORS_SMSC47M1 is not set 544# CONFIG_SENSORS_SMSC47M1 is not set
603# CONFIG_SENSORS_SMSC47B397 is not set 545# CONFIG_SENSORS_SMSC47B397 is not set
546# CONFIG_SENSORS_VIA686A is not set
604# CONFIG_SENSORS_VT1211 is not set 547# CONFIG_SENSORS_VT1211 is not set
548# CONFIG_SENSORS_VT8231 is not set
605# CONFIG_SENSORS_W83627HF is not set 549# CONFIG_SENSORS_W83627HF is not set
550# CONFIG_SENSORS_W83627EHF is not set
606# CONFIG_HWMON_DEBUG_CHIP is not set 551# CONFIG_HWMON_DEBUG_CHIP is not set
607 552
608# 553#
@@ -627,6 +572,7 @@ CONFIG_DAB=y
627# 572#
628# CONFIG_DISPLAY_SUPPORT is not set 573# CONFIG_DISPLAY_SUPPORT is not set
629# CONFIG_VGASTATE is not set 574# CONFIG_VGASTATE is not set
575CONFIG_VIDEO_OUTPUT_CONTROL=y
630# CONFIG_FB is not set 576# CONFIG_FB is not set
631# CONFIG_FB_IBM_GXT4500 is not set 577# CONFIG_FB_IBM_GXT4500 is not set
632 578
@@ -634,16 +580,10 @@ CONFIG_DAB=y
634# Sound 580# Sound
635# 581#
636# CONFIG_SOUND is not set 582# CONFIG_SOUND is not set
637 583CONFIG_HID_SUPPORT=y
638#
639# HID Devices
640#
641CONFIG_HID=y 584CONFIG_HID=y
642# CONFIG_HID_DEBUG is not set 585# CONFIG_HID_DEBUG is not set
643 586CONFIG_USB_SUPPORT=y
644#
645# USB support
646#
647CONFIG_USB_ARCH_HAS_HCD=y 587CONFIG_USB_ARCH_HAS_HCD=y
648CONFIG_USB_ARCH_HAS_OHCI=y 588CONFIG_USB_ARCH_HAS_OHCI=y
649CONFIG_USB_ARCH_HAS_EHCI=y 589CONFIG_USB_ARCH_HAS_EHCI=y
@@ -658,32 +598,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
658# 598#
659# CONFIG_USB_GADGET is not set 599# CONFIG_USB_GADGET is not set
660# CONFIG_MMC is not set 600# CONFIG_MMC is not set
661
662#
663# LED devices
664#
665# CONFIG_NEW_LEDS is not set 601# CONFIG_NEW_LEDS is not set
666
667#
668# LED drivers
669#
670
671#
672# LED Triggers
673#
674
675#
676# InfiniBand support
677#
678# CONFIG_INFINIBAND is not set 602# CONFIG_INFINIBAND is not set
679 603# CONFIG_EDAC is not set
680#
681# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
682#
683
684#
685# Real Time Clock
686#
687# CONFIG_RTC_CLASS is not set 604# CONFIG_RTC_CLASS is not set
688 605
689# 606#
@@ -700,6 +617,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
700# 617#
701 618
702# 619#
620# Userspace I/O
621#
622# CONFIG_UIO is not set
623
624#
703# File systems 625# File systems
704# 626#
705CONFIG_EXT2_FS=y 627CONFIG_EXT2_FS=y
@@ -792,7 +714,6 @@ CONFIG_SUNRPC=y
792# CONFIG_NCP_FS is not set 714# CONFIG_NCP_FS is not set
793# CONFIG_CODA_FS is not set 715# CONFIG_CODA_FS is not set
794# CONFIG_AFS_FS is not set 716# CONFIG_AFS_FS is not set
795# CONFIG_9P_FS is not set
796 717
797# 718#
798# Partition Types 719# Partition Types
@@ -831,6 +752,7 @@ CONFIG_BITREVERSE=y
831# CONFIG_CRC16 is not set 752# CONFIG_CRC16 is not set
832# CONFIG_CRC_ITU_T is not set 753# CONFIG_CRC_ITU_T is not set
833CONFIG_CRC32=y 754CONFIG_CRC32=y
755# CONFIG_CRC7 is not set
834# CONFIG_LIBCRC32C is not set 756# CONFIG_LIBCRC32C is not set
835CONFIG_PLIST=y 757CONFIG_PLIST=y
836CONFIG_HAS_IOMEM=y 758CONFIG_HAS_IOMEM=y
@@ -854,6 +776,7 @@ CONFIG_ENABLE_MUST_CHECK=y
854CONFIG_DEBUG_KERNEL=y 776CONFIG_DEBUG_KERNEL=y
855# CONFIG_DEBUG_SHIRQ is not set 777# CONFIG_DEBUG_SHIRQ is not set
856CONFIG_DETECT_SOFTLOCKUP=y 778CONFIG_DETECT_SOFTLOCKUP=y
779CONFIG_SCHED_DEBUG=y
857# CONFIG_SCHEDSTATS is not set 780# CONFIG_SCHEDSTATS is not set
858# CONFIG_TIMER_STATS is not set 781# CONFIG_TIMER_STATS is not set
859# CONFIG_DEBUG_SLAB is not set 782# CONFIG_DEBUG_SLAB is not set
@@ -876,7 +799,6 @@ CONFIG_FORCED_INLINING=y
876# CONFIG_DEBUGGER is not set 799# CONFIG_DEBUGGER is not set
877# CONFIG_KGDB_CONSOLE is not set 800# CONFIG_KGDB_CONSOLE is not set
878# CONFIG_BDI_SWITCH is not set 801# CONFIG_BDI_SWITCH is not set
879# CONFIG_BOOTX_TEXT is not set
880# CONFIG_PPC_EARLY_DEBUG is not set 802# CONFIG_PPC_EARLY_DEBUG is not set
881 803
882# 804#
@@ -884,8 +806,4 @@ CONFIG_FORCED_INLINING=y
884# 806#
885# CONFIG_KEYS is not set 807# CONFIG_KEYS is not set
886# CONFIG_SECURITY is not set 808# CONFIG_SECURITY is not set
887
888#
889# Cryptographic options
890#
891# CONFIG_CRYPTO is not set 809# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/mpc8568mds_defconfig b/arch/powerpc/configs/mpc8568mds_defconfig
index 417d3e6abc..0307fe7b04 100644
--- a/arch/powerpc/configs/mpc8568mds_defconfig
+++ b/arch/powerpc/configs/mpc8568mds_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22 3# Linux kernel version: 2.6.23-rc4
4# Fri Jul 20 13:55:04 2007 4# Tue Aug 28 21:24:43 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -38,6 +38,7 @@ CONFIG_GENERIC_NVRAM=y
38CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 38CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
39CONFIG_ARCH_MAY_HAVE_PC_FDC=y 39CONFIG_ARCH_MAY_HAVE_PC_FDC=y
40CONFIG_PPC_OF=y 40CONFIG_PPC_OF=y
41CONFIG_OF=y
41CONFIG_PPC_UDBG_16550=y 42CONFIG_PPC_UDBG_16550=y
42# CONFIG_GENERIC_TBSYNC is not set 43# CONFIG_GENERIC_TBSYNC is not set
43CONFIG_AUDIT_ARCH=y 44CONFIG_AUDIT_ARCH=y
@@ -48,15 +49,11 @@ CONFIG_DEFAULT_UIMAGE=y
48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
49 50
50# 51#
51# Code maturity level options 52# General setup
52# 53#
53CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
54CONFIG_BROKEN_ON_SMP=y 55CONFIG_BROKEN_ON_SMP=y
55CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
56
57#
58# General setup
59#
60CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
61CONFIG_LOCALVERSION_AUTO=y 58CONFIG_LOCALVERSION_AUTO=y
62CONFIG_SWAP=y 59CONFIG_SWAP=y
@@ -147,6 +144,7 @@ CONFIG_MPIC=y
147# CONFIG_GENERIC_IOMAP is not set 144# CONFIG_GENERIC_IOMAP is not set
148# CONFIG_CPU_FREQ is not set 145# CONFIG_CPU_FREQ is not set
149# CONFIG_CPM2 is not set 146# CONFIG_CPM2 is not set
147# CONFIG_FSL_ULI1575 is not set
150 148
151# 149#
152# Kernel options 150# Kernel options
@@ -191,7 +189,6 @@ CONFIG_ISA_DMA_API=y
191# 189#
192CONFIG_ZONE_DMA=y 190CONFIG_ZONE_DMA=y
193CONFIG_PPC_INDIRECT_PCI=y 191CONFIG_PPC_INDIRECT_PCI=y
194CONFIG_PPC_INDIRECT_PCI_BE=y
195CONFIG_FSL_SOC=y 192CONFIG_FSL_SOC=y
196CONFIG_FSL_PCI=y 193CONFIG_FSL_PCI=y
197CONFIG_PCI=y 194CONFIG_PCI=y
@@ -324,6 +321,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
324# CONFIG_SYS_HYPERVISOR is not set 321# CONFIG_SYS_HYPERVISOR is not set
325# CONFIG_CONNECTOR is not set 322# CONFIG_CONNECTOR is not set
326# CONFIG_MTD is not set 323# CONFIG_MTD is not set
324CONFIG_OF_DEVICE=y
327# CONFIG_PARPORT is not set 325# CONFIG_PARPORT is not set
328CONFIG_BLK_DEV=y 326CONFIG_BLK_DEV=y
329# CONFIG_BLK_DEV_FD is not set 327# CONFIG_BLK_DEV_FD is not set
@@ -384,12 +382,8 @@ CONFIG_SCSI_WAIT_SCAN=m
384# CONFIG_SCSI_SPI_ATTRS is not set 382# CONFIG_SCSI_SPI_ATTRS is not set
385# CONFIG_SCSI_FC_ATTRS is not set 383# CONFIG_SCSI_FC_ATTRS is not set
386# CONFIG_SCSI_ISCSI_ATTRS is not set 384# CONFIG_SCSI_ISCSI_ATTRS is not set
387# CONFIG_SCSI_SAS_ATTRS is not set
388# CONFIG_SCSI_SAS_LIBSAS is not set 385# CONFIG_SCSI_SAS_LIBSAS is not set
389 386CONFIG_SCSI_LOWLEVEL=y
390#
391# SCSI low-level drivers
392#
393# CONFIG_ISCSI_TCP is not set 387# CONFIG_ISCSI_TCP is not set
394# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 388# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
395# CONFIG_SCSI_3W_9XXX is not set 389# CONFIG_SCSI_3W_9XXX is not set
@@ -672,6 +666,7 @@ CONFIG_I2C_MPC=y
672CONFIG_HWMON=y 666CONFIG_HWMON=y
673# CONFIG_HWMON_VID is not set 667# CONFIG_HWMON_VID is not set
674# CONFIG_SENSORS_ABITUGURU is not set 668# CONFIG_SENSORS_ABITUGURU is not set
669# CONFIG_SENSORS_ABITUGURU3 is not set
675# CONFIG_SENSORS_AD7418 is not set 670# CONFIG_SENSORS_AD7418 is not set
676# CONFIG_SENSORS_ADM1021 is not set 671# CONFIG_SENSORS_ADM1021 is not set
677# CONFIG_SENSORS_ADM1025 is not set 672# CONFIG_SENSORS_ADM1025 is not set
@@ -698,14 +693,17 @@ CONFIG_HWMON=y
698# CONFIG_SENSORS_LM87 is not set 693# CONFIG_SENSORS_LM87 is not set
699# CONFIG_SENSORS_LM90 is not set 694# CONFIG_SENSORS_LM90 is not set
700# CONFIG_SENSORS_LM92 is not set 695# CONFIG_SENSORS_LM92 is not set
696# CONFIG_SENSORS_LM93 is not set
701# CONFIG_SENSORS_MAX1619 is not set 697# CONFIG_SENSORS_MAX1619 is not set
702# CONFIG_SENSORS_MAX6650 is not set 698# CONFIG_SENSORS_MAX6650 is not set
703# CONFIG_SENSORS_PC87360 is not set 699# CONFIG_SENSORS_PC87360 is not set
704# CONFIG_SENSORS_PC87427 is not set 700# CONFIG_SENSORS_PC87427 is not set
705# CONFIG_SENSORS_SIS5595 is not set 701# CONFIG_SENSORS_SIS5595 is not set
702# CONFIG_SENSORS_DME1737 is not set
706# CONFIG_SENSORS_SMSC47M1 is not set 703# CONFIG_SENSORS_SMSC47M1 is not set
707# CONFIG_SENSORS_SMSC47M192 is not set 704# CONFIG_SENSORS_SMSC47M192 is not set
708# CONFIG_SENSORS_SMSC47B397 is not set 705# CONFIG_SENSORS_SMSC47B397 is not set
706# CONFIG_SENSORS_THMC50 is not set
709# CONFIG_SENSORS_VIA686A is not set 707# CONFIG_SENSORS_VIA686A is not set
710# CONFIG_SENSORS_VT1211 is not set 708# CONFIG_SENSORS_VT1211 is not set
711# CONFIG_SENSORS_VT8231 is not set 709# CONFIG_SENSORS_VT8231 is not set
@@ -740,6 +738,7 @@ CONFIG_DAB=y
740# 738#
741# CONFIG_DISPLAY_SUPPORT is not set 739# CONFIG_DISPLAY_SUPPORT is not set
742# CONFIG_VGASTATE is not set 740# CONFIG_VGASTATE is not set
741CONFIG_VIDEO_OUTPUT_CONTROL=m
743# CONFIG_FB is not set 742# CONFIG_FB is not set
744# CONFIG_FB_IBM_GXT4500 is not set 743# CONFIG_FB_IBM_GXT4500 is not set
745 744
@@ -765,24 +764,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
765# 764#
766# CONFIG_USB_GADGET is not set 765# CONFIG_USB_GADGET is not set
767# CONFIG_MMC is not set 766# CONFIG_MMC is not set
768
769#
770# LED devices
771#
772# CONFIG_NEW_LEDS is not set 767# CONFIG_NEW_LEDS is not set
773
774#
775# LED drivers
776#
777
778#
779# LED Triggers
780#
781# CONFIG_INFINIBAND is not set 768# CONFIG_INFINIBAND is not set
782 769# CONFIG_EDAC is not set
783#
784# Real Time Clock
785#
786# CONFIG_RTC_CLASS is not set 770# CONFIG_RTC_CLASS is not set
787 771
788# 772#
@@ -986,7 +970,6 @@ CONFIG_FORCED_INLINING=y
986CONFIG_DEBUGGER=y 970CONFIG_DEBUGGER=y
987# CONFIG_XMON is not set 971# CONFIG_XMON is not set
988# CONFIG_BDI_SWITCH is not set 972# CONFIG_BDI_SWITCH is not set
989# CONFIG_BOOTX_TEXT is not set
990CONFIG_PPC_EARLY_DEBUG=y 973CONFIG_PPC_EARLY_DEBUG=y
991# CONFIG_PPC_EARLY_DEBUG_LPAR is not set 974# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
992# CONFIG_PPC_EARLY_DEBUG_G5 is not set 975# CONFIG_PPC_EARLY_DEBUG_G5 is not set
diff --git a/arch/powerpc/configs/mpc85xx_cds_defconfig b/arch/powerpc/configs/mpc85xx_cds_defconfig
index d9afe7009d..e6850c619f 100644
--- a/arch/powerpc/configs/mpc85xx_cds_defconfig
+++ b/arch/powerpc/configs/mpc85xx_cds_defconfig
@@ -1,9 +1,26 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:56:59 2007 4# Tue Aug 28 21:24:43 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
7CONFIG_PPC32=y 24CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 25CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 26CONFIG_MMU=y
@@ -14,61 +31,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 31CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 32CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 33CONFIG_GENERIC_FIND_NEXT_BIT=y
34# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 35CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 36CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 37CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 38CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 39CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 40CONFIG_PPC_OF=y
41CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 42CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 43# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 44CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 45CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 46CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_85xx=y
42CONFIG_E500=y
43# CONFIG_PPC_DCR_NATIVE is not set 47# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 48# CONFIG_PPC_DCR_MMIO is not set
45CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y
49# CONFIG_PPC_MM_SLICES is not set
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
51 50
52# 51#
53# Code maturity level options 52# General setup
54# 53#
55CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
56CONFIG_BROKEN_ON_SMP=y 55CONFIG_BROKEN_ON_SMP=y
57CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
58
59#
60# General setup
61#
62CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y 58CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y 59CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y 61CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 62# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 64# CONFIG_TASKSTATS is not set
71# CONFIG_UTS_NS is not set 65# CONFIG_USER_NS is not set
72# CONFIG_AUDIT is not set 66# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 67# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
@@ -102,19 +96,12 @@ CONFIG_SLAB=y
102CONFIG_RT_MUTEXES=y 96CONFIG_RT_MUTEXES=y
103# CONFIG_TINY_SHMEM is not set 97# CONFIG_TINY_SHMEM is not set
104CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
105
106#
107# Loadable module support
108#
109# CONFIG_MODULES is not set 99# CONFIG_MODULES is not set
110
111#
112# Block layer
113#
114CONFIG_BLOCK=y 100CONFIG_BLOCK=y
115# CONFIG_LBD is not set 101# CONFIG_LBD is not set
116# CONFIG_BLK_DEV_IO_TRACE is not set 102# CONFIG_BLK_DEV_IO_TRACE is not set
117# CONFIG_LSF is not set 103# CONFIG_LSF is not set
104# CONFIG_BLK_DEV_BSG is not set
118 105
119# 106#
120# IO Schedulers 107# IO Schedulers
@@ -146,7 +133,7 @@ CONFIG_MPC8540=y
146CONFIG_MPC85xx=y 133CONFIG_MPC85xx=y
147CONFIG_MPIC=y 134CONFIG_MPIC=y
148# CONFIG_MPIC_WEIRD is not set 135# CONFIG_MPIC_WEIRD is not set
149# CONFIG_PPC_I8259 is not set 136CONFIG_PPC_I8259=y
150# CONFIG_PPC_RTAS is not set 137# CONFIG_PPC_RTAS is not set
151# CONFIG_MMIO_NVRAM is not set 138# CONFIG_MMIO_NVRAM is not set
152# CONFIG_PPC_MPC106 is not set 139# CONFIG_PPC_MPC106 is not set
@@ -155,6 +142,7 @@ CONFIG_MPIC=y
155# CONFIG_GENERIC_IOMAP is not set 142# CONFIG_GENERIC_IOMAP is not set
156# CONFIG_CPU_FREQ is not set 143# CONFIG_CPU_FREQ is not set
157# CONFIG_CPM2 is not set 144# CONFIG_CPM2 is not set
145# CONFIG_FSL_ULI1575 is not set
158 146
159# 147#
160# Kernel options 148# Kernel options
@@ -184,6 +172,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
184CONFIG_SPLIT_PTLOCK_CPUS=4 172CONFIG_SPLIT_PTLOCK_CPUS=4
185# CONFIG_RESOURCES_64BIT is not set 173# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=1 174CONFIG_ZONE_DMA_FLAG=1
175CONFIG_BOUNCE=y
176CONFIG_VIRT_TO_BUS=y
187CONFIG_PROC_DEVICETREE=y 177CONFIG_PROC_DEVICETREE=y
188# CONFIG_CMDLINE_BOOL is not set 178# CONFIG_CMDLINE_BOOL is not set
189# CONFIG_PM is not set 179# CONFIG_PM is not set
@@ -197,10 +187,11 @@ CONFIG_ISA_DMA_API=y
197# 187#
198CONFIG_ZONE_DMA=y 188CONFIG_ZONE_DMA=y
199CONFIG_PPC_INDIRECT_PCI=y 189CONFIG_PPC_INDIRECT_PCI=y
200CONFIG_PPC_INDIRECT_PCI_BE=y
201CONFIG_FSL_SOC=y 190CONFIG_FSL_SOC=y
191CONFIG_FSL_PCI=y
202CONFIG_PCI=y 192CONFIG_PCI=y
203CONFIG_PCI_DOMAINS=y 193CONFIG_PCI_DOMAINS=y
194CONFIG_PCI_SYSCALL=y
204# CONFIG_PCIEPORTBUS is not set 195# CONFIG_PCIEPORTBUS is not set
205CONFIG_ARCH_SUPPORTS_MSI=y 196CONFIG_ARCH_SUPPORTS_MSI=y
206# CONFIG_PCI_MSI is not set 197# CONFIG_PCI_MSI is not set
@@ -311,6 +302,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
311# CONFIG_MAC80211 is not set 302# CONFIG_MAC80211 is not set
312# CONFIG_IEEE80211 is not set 303# CONFIG_IEEE80211 is not set
313# CONFIG_RFKILL is not set 304# CONFIG_RFKILL is not set
305# CONFIG_NET_9P is not set
314 306
315# 307#
316# Device Drivers 308# Device Drivers
@@ -325,26 +317,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
325# CONFIG_DEBUG_DRIVER is not set 317# CONFIG_DEBUG_DRIVER is not set
326# CONFIG_DEBUG_DEVRES is not set 318# CONFIG_DEBUG_DEVRES is not set
327# CONFIG_SYS_HYPERVISOR is not set 319# CONFIG_SYS_HYPERVISOR is not set
328
329#
330# Connector - unified userspace <-> kernelspace linker
331#
332# CONFIG_CONNECTOR is not set 320# CONFIG_CONNECTOR is not set
333# CONFIG_MTD is not set 321# CONFIG_MTD is not set
334 322CONFIG_OF_DEVICE=y
335#
336# Parallel port support
337#
338# CONFIG_PARPORT is not set 323# CONFIG_PARPORT is not set
339 324CONFIG_BLK_DEV=y
340#
341# Plug and Play support
342#
343# CONFIG_PNPACPI is not set
344
345#
346# Block devices
347#
348# CONFIG_BLK_DEV_FD is not set 325# CONFIG_BLK_DEV_FD is not set
349# CONFIG_BLK_CPQ_DA is not set 326# CONFIG_BLK_CPQ_DA is not set
350# CONFIG_BLK_CPQ_CISS_DA is not set 327# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -361,14 +338,11 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
361CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 338CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
362# CONFIG_CDROM_PKTCDVD is not set 339# CONFIG_CDROM_PKTCDVD is not set
363# CONFIG_ATA_OVER_ETH is not set 340# CONFIG_ATA_OVER_ETH is not set
364 341CONFIG_MISC_DEVICES=y
365#
366# Misc devices
367#
368# CONFIG_PHANTOM is not set 342# CONFIG_PHANTOM is not set
343# CONFIG_EEPROM_93CX6 is not set
369# CONFIG_SGI_IOC4 is not set 344# CONFIG_SGI_IOC4 is not set
370# CONFIG_TIFM_CORE is not set 345# CONFIG_TIFM_CORE is not set
371# CONFIG_BLINK is not set
372CONFIG_IDE=y 346CONFIG_IDE=y
373CONFIG_IDE_MAX_HWIFS=4 347CONFIG_IDE_MAX_HWIFS=4
374CONFIG_BLK_DEV_IDE=y 348CONFIG_BLK_DEV_IDE=y
@@ -433,12 +407,9 @@ CONFIG_BLK_DEV_IDEDMA=y
433# 407#
434# CONFIG_RAID_ATTRS is not set 408# CONFIG_RAID_ATTRS is not set
435# CONFIG_SCSI is not set 409# CONFIG_SCSI is not set
410# CONFIG_SCSI_DMA is not set
436# CONFIG_SCSI_NETLINK is not set 411# CONFIG_SCSI_NETLINK is not set
437# CONFIG_ATA is not set 412# CONFIG_ATA is not set
438
439#
440# Multi-device support (RAID and LVM)
441#
442# CONFIG_MD is not set 413# CONFIG_MD is not set
443 414
444# 415#
@@ -451,19 +422,13 @@ CONFIG_BLK_DEV_IDEDMA=y
451# 422#
452# CONFIG_FIREWIRE is not set 423# CONFIG_FIREWIRE is not set
453# CONFIG_IEEE1394 is not set 424# CONFIG_IEEE1394 is not set
454
455#
456# I2O device support
457#
458# CONFIG_I2O is not set 425# CONFIG_I2O is not set
459# CONFIG_MACINTOSH_DRIVERS is not set 426# CONFIG_MACINTOSH_DRIVERS is not set
460
461#
462# Network device support
463#
464CONFIG_NETDEVICES=y 427CONFIG_NETDEVICES=y
428# CONFIG_NETDEVICES_MULTIQUEUE is not set
465# CONFIG_DUMMY is not set 429# CONFIG_DUMMY is not set
466# CONFIG_BONDING is not set 430# CONFIG_BONDING is not set
431# CONFIG_MACVLAN is not set
467# CONFIG_EQUALIZER is not set 432# CONFIG_EQUALIZER is not set
468# CONFIG_TUN is not set 433# CONFIG_TUN is not set
469# CONFIG_ARCNET is not set 434# CONFIG_ARCNET is not set
@@ -480,21 +445,14 @@ CONFIG_PHYLIB=y
480# CONFIG_VITESSE_PHY is not set 445# CONFIG_VITESSE_PHY is not set
481# CONFIG_SMSC_PHY is not set 446# CONFIG_SMSC_PHY is not set
482# CONFIG_BROADCOM_PHY is not set 447# CONFIG_BROADCOM_PHY is not set
448# CONFIG_ICPLUS_PHY is not set
483# CONFIG_FIXED_PHY is not set 449# CONFIG_FIXED_PHY is not set
484
485#
486# Ethernet (10 or 100Mbit)
487#
488CONFIG_NET_ETHERNET=y 450CONFIG_NET_ETHERNET=y
489CONFIG_MII=y 451CONFIG_MII=y
490# CONFIG_HAPPYMEAL is not set 452# CONFIG_HAPPYMEAL is not set
491# CONFIG_SUNGEM is not set 453# CONFIG_SUNGEM is not set
492# CONFIG_CASSINI is not set 454# CONFIG_CASSINI is not set
493# CONFIG_NET_VENDOR_3COM is not set 455# CONFIG_NET_VENDOR_3COM is not set
494
495#
496# Tulip family network device support
497#
498# CONFIG_NET_TULIP is not set 456# CONFIG_NET_TULIP is not set
499# CONFIG_HP100 is not set 457# CONFIG_HP100 is not set
500# CONFIG_NET_PCI is not set 458# CONFIG_NET_PCI is not set
@@ -511,7 +469,6 @@ CONFIG_E1000_NAPI=y
511# CONFIG_SIS190 is not set 469# CONFIG_SIS190 is not set
512# CONFIG_SKGE is not set 470# CONFIG_SKGE is not set
513# CONFIG_SKY2 is not set 471# CONFIG_SKY2 is not set
514# CONFIG_SK98LIN is not set
515# CONFIG_VIA_VELOCITY is not set 472# CONFIG_VIA_VELOCITY is not set
516# CONFIG_TIGON3 is not set 473# CONFIG_TIGON3 is not set
517# CONFIG_BNX2 is not set 474# CONFIG_BNX2 is not set
@@ -543,15 +500,7 @@ CONFIG_NETDEV_10000=y
543# CONFIG_NETCONSOLE is not set 500# CONFIG_NETCONSOLE is not set
544# CONFIG_NETPOLL is not set 501# CONFIG_NETPOLL is not set
545# CONFIG_NET_POLL_CONTROLLER is not set 502# CONFIG_NET_POLL_CONTROLLER is not set
546
547#
548# ISDN subsystem
549#
550# CONFIG_ISDN is not set 503# CONFIG_ISDN is not set
551
552#
553# Telephony Support
554#
555# CONFIG_PHONE is not set 504# CONFIG_PHONE is not set
556 505
557# 506#
@@ -614,10 +563,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
614CONFIG_UNIX98_PTYS=y 563CONFIG_UNIX98_PTYS=y
615CONFIG_LEGACY_PTYS=y 564CONFIG_LEGACY_PTYS=y
616CONFIG_LEGACY_PTY_COUNT=256 565CONFIG_LEGACY_PTY_COUNT=256
617
618#
619# IPMI
620#
621# CONFIG_IPMI_HANDLER is not set 566# CONFIG_IPMI_HANDLER is not set
622# CONFIG_WATCHDOG is not set 567# CONFIG_WATCHDOG is not set
623# CONFIG_HW_RANDOM is not set 568# CONFIG_HW_RANDOM is not set
@@ -629,10 +574,6 @@ CONFIG_GEN_RTC=y
629# CONFIG_AGP is not set 574# CONFIG_AGP is not set
630# CONFIG_DRM is not set 575# CONFIG_DRM is not set
631# CONFIG_RAW_DRIVER is not set 576# CONFIG_RAW_DRIVER is not set
632
633#
634# TPM devices
635#
636# CONFIG_TCG_TPM is not set 577# CONFIG_TCG_TPM is not set
637CONFIG_DEVPORT=y 578CONFIG_DEVPORT=y
638# CONFIG_I2C is not set 579# CONFIG_I2C is not set
@@ -642,20 +583,24 @@ CONFIG_DEVPORT=y
642# 583#
643# CONFIG_SPI is not set 584# CONFIG_SPI is not set
644# CONFIG_SPI_MASTER is not set 585# CONFIG_SPI_MASTER is not set
645
646#
647# Dallas's 1-wire bus
648#
649# CONFIG_W1 is not set 586# CONFIG_W1 is not set
587# CONFIG_POWER_SUPPLY is not set
650CONFIG_HWMON=y 588CONFIG_HWMON=y
651# CONFIG_HWMON_VID is not set 589# CONFIG_HWMON_VID is not set
652# CONFIG_SENSORS_ABITUGURU is not set 590# CONFIG_SENSORS_ABITUGURU is not set
591# CONFIG_SENSORS_ABITUGURU3 is not set
653# CONFIG_SENSORS_F71805F is not set 592# CONFIG_SENSORS_F71805F is not set
593# CONFIG_SENSORS_IT87 is not set
594# CONFIG_SENSORS_PC87360 is not set
654# CONFIG_SENSORS_PC87427 is not set 595# CONFIG_SENSORS_PC87427 is not set
596# CONFIG_SENSORS_SIS5595 is not set
655# CONFIG_SENSORS_SMSC47M1 is not set 597# CONFIG_SENSORS_SMSC47M1 is not set
656# CONFIG_SENSORS_SMSC47B397 is not set 598# CONFIG_SENSORS_SMSC47B397 is not set
599# CONFIG_SENSORS_VIA686A is not set
657# CONFIG_SENSORS_VT1211 is not set 600# CONFIG_SENSORS_VT1211 is not set
601# CONFIG_SENSORS_VT8231 is not set
658# CONFIG_SENSORS_W83627HF is not set 602# CONFIG_SENSORS_W83627HF is not set
603# CONFIG_SENSORS_W83627EHF is not set
659# CONFIG_HWMON_DEBUG_CHIP is not set 604# CONFIG_HWMON_DEBUG_CHIP is not set
660 605
661# 606#
@@ -680,6 +625,7 @@ CONFIG_DAB=y
680# 625#
681# CONFIG_DISPLAY_SUPPORT is not set 626# CONFIG_DISPLAY_SUPPORT is not set
682# CONFIG_VGASTATE is not set 627# CONFIG_VGASTATE is not set
628CONFIG_VIDEO_OUTPUT_CONTROL=y
683# CONFIG_FB is not set 629# CONFIG_FB is not set
684# CONFIG_FB_IBM_GXT4500 is not set 630# CONFIG_FB_IBM_GXT4500 is not set
685 631
@@ -687,16 +633,10 @@ CONFIG_DAB=y
687# Sound 633# Sound
688# 634#
689# CONFIG_SOUND is not set 635# CONFIG_SOUND is not set
690 636CONFIG_HID_SUPPORT=y
691#
692# HID Devices
693#
694CONFIG_HID=y 637CONFIG_HID=y
695# CONFIG_HID_DEBUG is not set 638# CONFIG_HID_DEBUG is not set
696 639CONFIG_USB_SUPPORT=y
697#
698# USB support
699#
700CONFIG_USB_ARCH_HAS_HCD=y 640CONFIG_USB_ARCH_HAS_HCD=y
701CONFIG_USB_ARCH_HAS_OHCI=y 641CONFIG_USB_ARCH_HAS_OHCI=y
702CONFIG_USB_ARCH_HAS_EHCI=y 642CONFIG_USB_ARCH_HAS_EHCI=y
@@ -711,32 +651,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
711# 651#
712# CONFIG_USB_GADGET is not set 652# CONFIG_USB_GADGET is not set
713# CONFIG_MMC is not set 653# CONFIG_MMC is not set
714
715#
716# LED devices
717#
718# CONFIG_NEW_LEDS is not set 654# CONFIG_NEW_LEDS is not set
719
720#
721# LED drivers
722#
723
724#
725# LED Triggers
726#
727
728#
729# InfiniBand support
730#
731# CONFIG_INFINIBAND is not set 655# CONFIG_INFINIBAND is not set
732 656# CONFIG_EDAC is not set
733#
734# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
735#
736
737#
738# Real Time Clock
739#
740# CONFIG_RTC_CLASS is not set 657# CONFIG_RTC_CLASS is not set
741 658
742# 659#
@@ -753,6 +670,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
753# 670#
754 671
755# 672#
673# Userspace I/O
674#
675# CONFIG_UIO is not set
676
677#
756# File systems 678# File systems
757# 679#
758CONFIG_EXT2_FS=y 680CONFIG_EXT2_FS=y
@@ -845,7 +767,6 @@ CONFIG_SUNRPC=y
845# CONFIG_NCP_FS is not set 767# CONFIG_NCP_FS is not set
846# CONFIG_CODA_FS is not set 768# CONFIG_CODA_FS is not set
847# CONFIG_AFS_FS is not set 769# CONFIG_AFS_FS is not set
848# CONFIG_9P_FS is not set
849 770
850# 771#
851# Partition Types 772# Partition Types
@@ -884,6 +805,7 @@ CONFIG_BITREVERSE=y
884# CONFIG_CRC16 is not set 805# CONFIG_CRC16 is not set
885# CONFIG_CRC_ITU_T is not set 806# CONFIG_CRC_ITU_T is not set
886CONFIG_CRC32=y 807CONFIG_CRC32=y
808# CONFIG_CRC7 is not set
887# CONFIG_LIBCRC32C is not set 809# CONFIG_LIBCRC32C is not set
888CONFIG_PLIST=y 810CONFIG_PLIST=y
889CONFIG_HAS_IOMEM=y 811CONFIG_HAS_IOMEM=y
@@ -907,6 +829,7 @@ CONFIG_ENABLE_MUST_CHECK=y
907CONFIG_DEBUG_KERNEL=y 829CONFIG_DEBUG_KERNEL=y
908# CONFIG_DEBUG_SHIRQ is not set 830# CONFIG_DEBUG_SHIRQ is not set
909CONFIG_DETECT_SOFTLOCKUP=y 831CONFIG_DETECT_SOFTLOCKUP=y
832CONFIG_SCHED_DEBUG=y
910# CONFIG_SCHEDSTATS is not set 833# CONFIG_SCHEDSTATS is not set
911# CONFIG_TIMER_STATS is not set 834# CONFIG_TIMER_STATS is not set
912# CONFIG_DEBUG_SLAB is not set 835# CONFIG_DEBUG_SLAB is not set
@@ -928,7 +851,6 @@ CONFIG_FORCED_INLINING=y
928# CONFIG_DEBUG_PAGEALLOC is not set 851# CONFIG_DEBUG_PAGEALLOC is not set
929# CONFIG_DEBUGGER is not set 852# CONFIG_DEBUGGER is not set
930# CONFIG_BDI_SWITCH is not set 853# CONFIG_BDI_SWITCH is not set
931# CONFIG_BOOTX_TEXT is not set
932# CONFIG_PPC_EARLY_DEBUG is not set 854# CONFIG_PPC_EARLY_DEBUG is not set
933 855
934# 856#
@@ -936,8 +858,4 @@ CONFIG_FORCED_INLINING=y
936# 858#
937# CONFIG_KEYS is not set 859# CONFIG_KEYS is not set
938# CONFIG_SECURITY is not set 860# CONFIG_SECURITY is not set
939
940#
941# Cryptographic options
942#
943# CONFIG_CRYPTO is not set 861# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/mpc8641_hpcn_defconfig b/arch/powerpc/configs/mpc8641_hpcn_defconfig
index 1ac94a605b..b2f389dcad 100644
--- a/arch/powerpc/configs/mpc8641_hpcn_defconfig
+++ b/arch/powerpc/configs/mpc8641_hpcn_defconfig
@@ -1,9 +1,26 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:57:00 2007 4# Wed Aug 29 16:16:23 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18CONFIG_ALTIVEC=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22CONFIG_SMP=y
23CONFIG_NR_CPUS=2
7CONFIG_PPC32=y 24CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 25CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 26CONFIG_MMU=y
@@ -14,61 +31,41 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 31CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 32CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 33CONFIG_GENERIC_FIND_NEXT_BIT=y
34# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 35CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 36CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 37CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 38CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 39CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 40CONFIG_PPC_OF=y
41CONFIG_OF=y
23CONFIG_PPC_UDBG_16550=y 42CONFIG_PPC_UDBG_16550=y
24CONFIG_GENERIC_TBSYNC=y 43CONFIG_GENERIC_TBSYNC=y
25CONFIG_AUDIT_ARCH=y 44CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 45CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y 46CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set
36CONFIG_PPC_86xx=y
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_PPC_FPU=y
43# CONFIG_PPC_DCR_NATIVE is not set 47# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 48# CONFIG_PPC_DCR_MMIO is not set
45CONFIG_ALTIVEC=y
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49CONFIG_SMP=y
50CONFIG_NR_CPUS=2
51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
52 50
53# 51#
54# Code maturity level options 52# General setup
55# 53#
56CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
57CONFIG_LOCK_KERNEL=y 55CONFIG_LOCK_KERNEL=y
58CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
59
60#
61# General setup
62#
63CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
64# CONFIG_LOCALVERSION_AUTO is not set 58CONFIG_LOCALVERSION_AUTO=y
65# CONFIG_SWAP is not set 59CONFIG_SWAP=y
66# CONFIG_SYSVIPC is not set 60CONFIG_SYSVIPC=y
67# CONFIG_POSIX_MQUEUE is not set 61CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_BSD_PROCESS_ACCT is not set 62CONFIG_POSIX_MQUEUE=y
63CONFIG_BSD_PROCESS_ACCT=y
64# CONFIG_BSD_PROCESS_ACCT_V3 is not set
69# CONFIG_TASKSTATS is not set 65# CONFIG_TASKSTATS is not set
70# CONFIG_UTS_NS is not set 66# CONFIG_USER_NS is not set
71# CONFIG_AUDIT is not set 67CONFIG_AUDIT=y
68# CONFIG_AUDITSYSCALL is not set
72CONFIG_IKCONFIG=y 69CONFIG_IKCONFIG=y
73CONFIG_IKCONFIG_PROC=y 70CONFIG_IKCONFIG_PROC=y
74CONFIG_LOG_BUF_SHIFT=14 71CONFIG_LOG_BUF_SHIFT=14
@@ -82,12 +79,12 @@ CONFIG_SYSCTL=y
82CONFIG_EMBEDDED=y 79CONFIG_EMBEDDED=y
83CONFIG_SYSCTL_SYSCALL=y 80CONFIG_SYSCTL_SYSCALL=y
84CONFIG_KALLSYMS=y 81CONFIG_KALLSYMS=y
85# CONFIG_KALLSYMS_ALL is not set 82CONFIG_KALLSYMS_ALL=y
86CONFIG_KALLSYMS_EXTRA_PASS=y 83CONFIG_KALLSYMS_EXTRA_PASS=y
87CONFIG_HOTPLUG=y 84CONFIG_HOTPLUG=y
88CONFIG_PRINTK=y 85CONFIG_PRINTK=y
89CONFIG_BUG=y 86CONFIG_BUG=y
90# CONFIG_ELF_CORE is not set 87CONFIG_ELF_CORE=y
91CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
92CONFIG_FUTEX=y 89CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y 90CONFIG_ANON_INODES=y
@@ -103,36 +100,40 @@ CONFIG_SLAB=y
103CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
104# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
105CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
106 103CONFIG_MODULES=y
107# 104CONFIG_MODULE_UNLOAD=y
108# Loadable module support 105CONFIG_MODULE_FORCE_UNLOAD=y
109# 106CONFIG_MODVERSIONS=y
110# CONFIG_MODULES is not set 107# CONFIG_MODULE_SRCVERSION_ALL is not set
111 108CONFIG_KMOD=y
112# 109CONFIG_STOP_MACHINE=y
113# Block layer
114#
115CONFIG_BLOCK=y 110CONFIG_BLOCK=y
116# CONFIG_LBD is not set 111CONFIG_LBD=y
117# CONFIG_BLK_DEV_IO_TRACE is not set 112# CONFIG_BLK_DEV_IO_TRACE is not set
118# CONFIG_LSF is not set 113# CONFIG_LSF is not set
114# CONFIG_BLK_DEV_BSG is not set
119 115
120# 116#
121# IO Schedulers 117# IO Schedulers
122# 118#
123CONFIG_IOSCHED_NOOP=y 119CONFIG_IOSCHED_NOOP=y
124# CONFIG_IOSCHED_AS is not set 120CONFIG_IOSCHED_AS=y
125CONFIG_IOSCHED_DEADLINE=y 121CONFIG_IOSCHED_DEADLINE=y
126# CONFIG_IOSCHED_CFQ is not set 122CONFIG_IOSCHED_CFQ=y
127# CONFIG_DEFAULT_AS is not set 123# CONFIG_DEFAULT_AS is not set
128CONFIG_DEFAULT_DEADLINE=y 124# CONFIG_DEFAULT_DEADLINE is not set
129# CONFIG_DEFAULT_CFQ is not set 125CONFIG_DEFAULT_CFQ=y
130# CONFIG_DEFAULT_NOOP is not set 126# CONFIG_DEFAULT_NOOP is not set
131CONFIG_DEFAULT_IOSCHED="deadline" 127CONFIG_DEFAULT_IOSCHED="cfq"
132 128
133# 129#
134# Platform support 130# Platform support
135# 131#
132# CONFIG_PPC_MULTIPLATFORM is not set
133# CONFIG_EMBEDDED6xx is not set
134# CONFIG_PPC_82xx is not set
135# CONFIG_PPC_83xx is not set
136CONFIG_PPC_86xx=y
136# CONFIG_PPC_MPC52xx is not set 137# CONFIG_PPC_MPC52xx is not set
137# CONFIG_PPC_MPC5200 is not set 138# CONFIG_PPC_MPC5200 is not set
138# CONFIG_PPC_CELL is not set 139# CONFIG_PPC_CELL is not set
@@ -151,6 +152,7 @@ CONFIG_PPC_I8259=y
151# CONFIG_GENERIC_IOMAP is not set 152# CONFIG_GENERIC_IOMAP is not set
152# CONFIG_CPU_FREQ is not set 153# CONFIG_CPU_FREQ is not set
153# CONFIG_CPM2 is not set 154# CONFIG_CPM2 is not set
155CONFIG_FSL_ULI1575=y
154 156
155# 157#
156# Kernel options 158# Kernel options
@@ -166,7 +168,7 @@ CONFIG_PREEMPT_NONE=y
166# CONFIG_PREEMPT is not set 168# CONFIG_PREEMPT is not set
167CONFIG_PREEMPT_BKL=y 169CONFIG_PREEMPT_BKL=y
168CONFIG_BINFMT_ELF=y 170CONFIG_BINFMT_ELF=y
169# CONFIG_BINFMT_MISC is not set 171CONFIG_BINFMT_MISC=m
170CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 172CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
171# CONFIG_IRQ_ALL_CPUS is not set 173# CONFIG_IRQ_ALL_CPUS is not set
172CONFIG_ARCH_FLATMEM_ENABLE=y 174CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -181,10 +183,12 @@ CONFIG_FLAT_NODE_MEM_MAP=y
181CONFIG_SPLIT_PTLOCK_CPUS=4 183CONFIG_SPLIT_PTLOCK_CPUS=4
182# CONFIG_RESOURCES_64BIT is not set 184# CONFIG_RESOURCES_64BIT is not set
183CONFIG_ZONE_DMA_FLAG=1 185CONFIG_ZONE_DMA_FLAG=1
186CONFIG_BOUNCE=y
187CONFIG_VIRT_TO_BUS=y
184CONFIG_PROC_DEVICETREE=y 188CONFIG_PROC_DEVICETREE=y
185# CONFIG_CMDLINE_BOOL is not set 189# CONFIG_CMDLINE_BOOL is not set
186# CONFIG_PM is not set 190# CONFIG_PM is not set
187# CONFIG_SECCOMP is not set 191CONFIG_SECCOMP=y
188# CONFIG_WANT_DEVICE_TREE is not set 192# CONFIG_WANT_DEVICE_TREE is not set
189CONFIG_ISA_DMA_API=y 193CONFIG_ISA_DMA_API=y
190 194
@@ -194,11 +198,11 @@ CONFIG_ISA_DMA_API=y
194CONFIG_ZONE_DMA=y 198CONFIG_ZONE_DMA=y
195CONFIG_GENERIC_ISA_DMA=y 199CONFIG_GENERIC_ISA_DMA=y
196CONFIG_PPC_INDIRECT_PCI=y 200CONFIG_PPC_INDIRECT_PCI=y
197CONFIG_PPC_INDIRECT_PCI_BE=y
198CONFIG_FSL_SOC=y 201CONFIG_FSL_SOC=y
199CONFIG_FSL_PCIE=y 202CONFIG_FSL_PCI=y
200CONFIG_PCI=y 203CONFIG_PCI=y
201CONFIG_PCI_DOMAINS=y 204CONFIG_PCI_DOMAINS=y
205CONFIG_PCI_SYSCALL=y
202# CONFIG_PCIEPORTBUS is not set 206# CONFIG_PCIEPORTBUS is not set
203CONFIG_ARCH_SUPPORTS_MSI=y 207CONFIG_ARCH_SUPPORTS_MSI=y
204# CONFIG_PCI_MSI is not set 208# CONFIG_PCI_MSI is not set
@@ -239,27 +243,37 @@ CONFIG_XFRM=y
239CONFIG_XFRM_USER=y 243CONFIG_XFRM_USER=y
240# CONFIG_XFRM_SUB_POLICY is not set 244# CONFIG_XFRM_SUB_POLICY is not set
241# CONFIG_XFRM_MIGRATE is not set 245# CONFIG_XFRM_MIGRATE is not set
242# CONFIG_NET_KEY is not set 246CONFIG_NET_KEY=m
247# CONFIG_NET_KEY_MIGRATE is not set
243CONFIG_INET=y 248CONFIG_INET=y
244# CONFIG_IP_MULTICAST is not set 249CONFIG_IP_MULTICAST=y
245# CONFIG_IP_ADVANCED_ROUTER is not set 250CONFIG_IP_ADVANCED_ROUTER=y
251CONFIG_ASK_IP_FIB_HASH=y
252# CONFIG_IP_FIB_TRIE is not set
246CONFIG_IP_FIB_HASH=y 253CONFIG_IP_FIB_HASH=y
254CONFIG_IP_MULTIPLE_TABLES=y
255CONFIG_IP_ROUTE_MULTIPATH=y
256CONFIG_IP_ROUTE_VERBOSE=y
247CONFIG_IP_PNP=y 257CONFIG_IP_PNP=y
248CONFIG_IP_PNP_DHCP=y 258CONFIG_IP_PNP_DHCP=y
249CONFIG_IP_PNP_BOOTP=y 259CONFIG_IP_PNP_BOOTP=y
250CONFIG_IP_PNP_RARP=y 260CONFIG_IP_PNP_RARP=y
251# CONFIG_NET_IPIP is not set 261CONFIG_NET_IPIP=y
252# CONFIG_NET_IPGRE is not set 262CONFIG_NET_IPGRE=y
253# CONFIG_ARPD is not set 263CONFIG_NET_IPGRE_BROADCAST=y
264CONFIG_IP_MROUTE=y
265CONFIG_IP_PIMSM_V1=y
266CONFIG_IP_PIMSM_V2=y
267CONFIG_ARPD=y
254# CONFIG_SYN_COOKIES is not set 268# CONFIG_SYN_COOKIES is not set
255# CONFIG_INET_AH is not set 269# CONFIG_INET_AH is not set
256# CONFIG_INET_ESP is not set 270# CONFIG_INET_ESP is not set
257# CONFIG_INET_IPCOMP is not set 271# CONFIG_INET_IPCOMP is not set
258# CONFIG_INET_XFRM_TUNNEL is not set 272# CONFIG_INET_XFRM_TUNNEL is not set
259CONFIG_INET_TUNNEL=y 273CONFIG_INET_TUNNEL=y
260CONFIG_INET_XFRM_MODE_TRANSPORT=y 274# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
261CONFIG_INET_XFRM_MODE_TUNNEL=y 275# CONFIG_INET_XFRM_MODE_TUNNEL is not set
262CONFIG_INET_XFRM_MODE_BEET=y 276# CONFIG_INET_XFRM_MODE_BEET is not set
263CONFIG_INET_DIAG=y 277CONFIG_INET_DIAG=y
264CONFIG_INET_TCP_DIAG=y 278CONFIG_INET_TCP_DIAG=y
265# CONFIG_TCP_CONG_ADVANCED is not set 279# CONFIG_TCP_CONG_ADVANCED is not set
@@ -286,7 +300,12 @@ CONFIG_IPV6_SIT=y
286# CONFIG_NETWORK_SECMARK is not set 300# CONFIG_NETWORK_SECMARK is not set
287# CONFIG_NETFILTER is not set 301# CONFIG_NETFILTER is not set
288# CONFIG_IP_DCCP is not set 302# CONFIG_IP_DCCP is not set
289# CONFIG_IP_SCTP is not set 303CONFIG_IP_SCTP=m
304# CONFIG_SCTP_DBG_MSG is not set
305# CONFIG_SCTP_DBG_OBJCNT is not set
306# CONFIG_SCTP_HMAC_NONE is not set
307# CONFIG_SCTP_HMAC_SHA1 is not set
308CONFIG_SCTP_HMAC_MD5=y
290# CONFIG_TIPC is not set 309# CONFIG_TIPC is not set
291# CONFIG_ATM is not set 310# CONFIG_ATM is not set
292# CONFIG_BRIDGE is not set 311# CONFIG_BRIDGE is not set
@@ -313,6 +332,7 @@ CONFIG_IPV6_SIT=y
313# CONFIG_IRDA is not set 332# CONFIG_IRDA is not set
314# CONFIG_BT is not set 333# CONFIG_BT is not set
315# CONFIG_AF_RXRPC is not set 334# CONFIG_AF_RXRPC is not set
335CONFIG_FIB_RULES=y
316 336
317# 337#
318# Wireless 338# Wireless
@@ -322,6 +342,7 @@ CONFIG_IPV6_SIT=y
322# CONFIG_MAC80211 is not set 342# CONFIG_MAC80211 is not set
323# CONFIG_IEEE80211 is not set 343# CONFIG_IEEE80211 is not set
324# CONFIG_RFKILL is not set 344# CONFIG_RFKILL is not set
345# CONFIG_NET_9P is not set
325 346
326# 347#
327# Device Drivers 348# Device Drivers
@@ -336,26 +357,11 @@ CONFIG_FW_LOADER=y
336# CONFIG_DEBUG_DRIVER is not set 357# CONFIG_DEBUG_DRIVER is not set
337# CONFIG_DEBUG_DEVRES is not set 358# CONFIG_DEBUG_DEVRES is not set
338# CONFIG_SYS_HYPERVISOR is not set 359# CONFIG_SYS_HYPERVISOR is not set
339
340#
341# Connector - unified userspace <-> kernelspace linker
342#
343# CONFIG_CONNECTOR is not set 360# CONFIG_CONNECTOR is not set
344# CONFIG_MTD is not set 361# CONFIG_MTD is not set
345 362CONFIG_OF_DEVICE=y
346#
347# Parallel port support
348#
349# CONFIG_PARPORT is not set 363# CONFIG_PARPORT is not set
350 364CONFIG_BLK_DEV=y
351#
352# Plug and Play support
353#
354# CONFIG_PNPACPI is not set
355
356#
357# Block devices
358#
359# CONFIG_BLK_DEV_FD is not set 365# CONFIG_BLK_DEV_FD is not set
360# CONFIG_BLK_CPQ_DA is not set 366# CONFIG_BLK_CPQ_DA is not set
361# CONFIG_BLK_CPQ_CISS_DA is not set 367# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -364,60 +370,172 @@ CONFIG_FW_LOADER=y
364# CONFIG_BLK_DEV_COW_COMMON is not set 370# CONFIG_BLK_DEV_COW_COMMON is not set
365CONFIG_BLK_DEV_LOOP=y 371CONFIG_BLK_DEV_LOOP=y
366# CONFIG_BLK_DEV_CRYPTOLOOP is not set 372# CONFIG_BLK_DEV_CRYPTOLOOP is not set
367# CONFIG_BLK_DEV_NBD is not set 373CONFIG_BLK_DEV_NBD=y
368# CONFIG_BLK_DEV_SX8 is not set 374# CONFIG_BLK_DEV_SX8 is not set
375# CONFIG_BLK_DEV_UB is not set
369CONFIG_BLK_DEV_RAM=y 376CONFIG_BLK_DEV_RAM=y
370CONFIG_BLK_DEV_RAM_COUNT=16 377CONFIG_BLK_DEV_RAM_COUNT=16
371CONFIG_BLK_DEV_RAM_SIZE=131072 378CONFIG_BLK_DEV_RAM_SIZE=131072
372CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 379CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
373# CONFIG_CDROM_PKTCDVD is not set 380# CONFIG_CDROM_PKTCDVD is not set
374# CONFIG_ATA_OVER_ETH is not set 381# CONFIG_ATA_OVER_ETH is not set
375 382CONFIG_MISC_DEVICES=y
376#
377# Misc devices
378#
379# CONFIG_PHANTOM is not set 383# CONFIG_PHANTOM is not set
384# CONFIG_EEPROM_93CX6 is not set
380# CONFIG_SGI_IOC4 is not set 385# CONFIG_SGI_IOC4 is not set
381# CONFIG_TIFM_CORE is not set 386# CONFIG_TIFM_CORE is not set
382# CONFIG_BLINK is not set
383# CONFIG_IDE is not set 387# CONFIG_IDE is not set
384 388
385# 389#
386# SCSI device support 390# SCSI device support
387# 391#
388# CONFIG_RAID_ATTRS is not set 392# CONFIG_RAID_ATTRS is not set
389# CONFIG_SCSI is not set 393CONFIG_SCSI=y
394CONFIG_SCSI_DMA=y
395# CONFIG_SCSI_TGT is not set
390# CONFIG_SCSI_NETLINK is not set 396# CONFIG_SCSI_NETLINK is not set
391# CONFIG_ATA is not set 397CONFIG_SCSI_PROC_FS=y
392 398
393# 399#
394# Multi-device support (RAID and LVM) 400# SCSI support type (disk, tape, CD-ROM)
395# 401#
402CONFIG_BLK_DEV_SD=y
403CONFIG_CHR_DEV_ST=y
404# CONFIG_CHR_DEV_OSST is not set
405CONFIG_BLK_DEV_SR=y
406# CONFIG_BLK_DEV_SR_VENDOR is not set
407CONFIG_CHR_DEV_SG=y
408# CONFIG_CHR_DEV_SCH is not set
409
410#
411# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
412#
413CONFIG_SCSI_MULTI_LUN=y
414# CONFIG_SCSI_CONSTANTS is not set
415CONFIG_SCSI_LOGGING=y
416# CONFIG_SCSI_SCAN_ASYNC is not set
417CONFIG_SCSI_WAIT_SCAN=m
418
419#
420# SCSI Transports
421#
422# CONFIG_SCSI_SPI_ATTRS is not set
423# CONFIG_SCSI_FC_ATTRS is not set
424# CONFIG_SCSI_ISCSI_ATTRS is not set
425# CONFIG_SCSI_SAS_LIBSAS is not set
426CONFIG_SCSI_LOWLEVEL=y
427# CONFIG_ISCSI_TCP is not set
428# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
429# CONFIG_SCSI_3W_9XXX is not set
430# CONFIG_SCSI_ACARD is not set
431# CONFIG_SCSI_AACRAID is not set
432# CONFIG_SCSI_AIC7XXX is not set
433# CONFIG_SCSI_AIC7XXX_OLD is not set
434# CONFIG_SCSI_AIC79XX is not set
435# CONFIG_SCSI_AIC94XX is not set
436# CONFIG_SCSI_DPT_I2O is not set
437# CONFIG_SCSI_ARCMSR is not set
438# CONFIG_MEGARAID_NEWGEN is not set
439# CONFIG_MEGARAID_LEGACY is not set
440# CONFIG_MEGARAID_SAS is not set
441# CONFIG_SCSI_HPTIOP is not set
442# CONFIG_SCSI_BUSLOGIC is not set
443# CONFIG_SCSI_DMX3191D is not set
444# CONFIG_SCSI_EATA is not set
445# CONFIG_SCSI_FUTURE_DOMAIN is not set
446# CONFIG_SCSI_GDTH is not set
447# CONFIG_SCSI_IPS is not set
448# CONFIG_SCSI_INITIO is not set
449# CONFIG_SCSI_INIA100 is not set
450# CONFIG_SCSI_STEX is not set
451# CONFIG_SCSI_SYM53C8XX_2 is not set
452# CONFIG_SCSI_IPR is not set
453# CONFIG_SCSI_QLOGIC_1280 is not set
454# CONFIG_SCSI_QLA_FC is not set
455# CONFIG_SCSI_QLA_ISCSI is not set
456# CONFIG_SCSI_LPFC is not set
457# CONFIG_SCSI_DC395x is not set
458# CONFIG_SCSI_DC390T is not set
459# CONFIG_SCSI_NSP32 is not set
460# CONFIG_SCSI_DEBUG is not set
461# CONFIG_SCSI_SRP is not set
462CONFIG_ATA=y
463# CONFIG_ATA_NONSTANDARD is not set
464CONFIG_SATA_AHCI=y
465# CONFIG_SATA_SVW is not set
466# CONFIG_ATA_PIIX is not set
467# CONFIG_SATA_MV is not set
468# CONFIG_SATA_NV is not set
469# CONFIG_PDC_ADMA is not set
470# CONFIG_SATA_QSTOR is not set
471# CONFIG_SATA_PROMISE is not set
472# CONFIG_SATA_SX4 is not set
473# CONFIG_SATA_SIL is not set
474# CONFIG_SATA_SIL24 is not set
475# CONFIG_SATA_SIS is not set
476# CONFIG_SATA_ULI is not set
477# CONFIG_SATA_VIA is not set
478# CONFIG_SATA_VITESSE is not set
479# CONFIG_SATA_INIC162X is not set
480CONFIG_PATA_ALI=y
481# CONFIG_PATA_AMD is not set
482# CONFIG_PATA_ARTOP is not set
483# CONFIG_PATA_ATIIXP is not set
484# CONFIG_PATA_CMD640_PCI is not set
485# CONFIG_PATA_CMD64X is not set
486# CONFIG_PATA_CS5520 is not set
487# CONFIG_PATA_CS5530 is not set
488# CONFIG_PATA_CYPRESS is not set
489# CONFIG_PATA_EFAR is not set
490# CONFIG_ATA_GENERIC is not set
491# CONFIG_PATA_HPT366 is not set
492# CONFIG_PATA_HPT37X is not set
493# CONFIG_PATA_HPT3X2N is not set
494# CONFIG_PATA_HPT3X3 is not set
495# CONFIG_PATA_IT821X is not set
496# CONFIG_PATA_IT8213 is not set
497# CONFIG_PATA_JMICRON is not set
498# CONFIG_PATA_TRIFLEX is not set
499# CONFIG_PATA_MARVELL is not set
500# CONFIG_PATA_MPIIX is not set
501# CONFIG_PATA_OLDPIIX is not set
502# CONFIG_PATA_NETCELL is not set
503# CONFIG_PATA_NS87410 is not set
504# CONFIG_PATA_OPTI is not set
505# CONFIG_PATA_OPTIDMA is not set
506# CONFIG_PATA_PDC_OLD is not set
507# CONFIG_PATA_RADISYS is not set
508# CONFIG_PATA_RZ1000 is not set
509# CONFIG_PATA_SC1200 is not set
510# CONFIG_PATA_SERVERWORKS is not set
511# CONFIG_PATA_PDC2027X is not set
512# CONFIG_PATA_SIL680 is not set
513# CONFIG_PATA_SIS is not set
514# CONFIG_PATA_VIA is not set
515# CONFIG_PATA_WINBOND is not set
516# CONFIG_PATA_PLATFORM is not set
396# CONFIG_MD is not set 517# CONFIG_MD is not set
397 518
398# 519#
399# Fusion MPT device support 520# Fusion MPT device support
400# 521#
401# CONFIG_FUSION is not set 522# CONFIG_FUSION is not set
523# CONFIG_FUSION_SPI is not set
524# CONFIG_FUSION_FC is not set
525# CONFIG_FUSION_SAS is not set
402 526
403# 527#
404# IEEE 1394 (FireWire) support 528# IEEE 1394 (FireWire) support
405# 529#
406# CONFIG_FIREWIRE is not set 530# CONFIG_FIREWIRE is not set
407# CONFIG_IEEE1394 is not set 531# CONFIG_IEEE1394 is not set
408
409#
410# I2O device support
411#
412# CONFIG_I2O is not set 532# CONFIG_I2O is not set
413# CONFIG_MACINTOSH_DRIVERS is not set 533# CONFIG_MACINTOSH_DRIVERS is not set
414
415#
416# Network device support
417#
418CONFIG_NETDEVICES=y 534CONFIG_NETDEVICES=y
535# CONFIG_NETDEVICES_MULTIQUEUE is not set
419CONFIG_DUMMY=y 536CONFIG_DUMMY=y
420# CONFIG_BONDING is not set 537# CONFIG_BONDING is not set
538# CONFIG_MACVLAN is not set
421# CONFIG_EQUALIZER is not set 539# CONFIG_EQUALIZER is not set
422# CONFIG_TUN is not set 540# CONFIG_TUN is not set
423# CONFIG_ARCNET is not set 541# CONFIG_ARCNET is not set
@@ -434,21 +552,14 @@ CONFIG_PHYLIB=y
434CONFIG_VITESSE_PHY=y 552CONFIG_VITESSE_PHY=y
435# CONFIG_SMSC_PHY is not set 553# CONFIG_SMSC_PHY is not set
436# CONFIG_BROADCOM_PHY is not set 554# CONFIG_BROADCOM_PHY is not set
555# CONFIG_ICPLUS_PHY is not set
437# CONFIG_FIXED_PHY is not set 556# CONFIG_FIXED_PHY is not set
438
439#
440# Ethernet (10 or 100Mbit)
441#
442CONFIG_NET_ETHERNET=y 557CONFIG_NET_ETHERNET=y
443CONFIG_MII=y 558CONFIG_MII=y
444# CONFIG_HAPPYMEAL is not set 559# CONFIG_HAPPYMEAL is not set
445# CONFIG_SUNGEM is not set 560# CONFIG_SUNGEM is not set
446# CONFIG_CASSINI is not set 561# CONFIG_CASSINI is not set
447# CONFIG_NET_VENDOR_3COM is not set 562# CONFIG_NET_VENDOR_3COM is not set
448
449#
450# Tulip family network device support
451#
452# CONFIG_NET_TULIP is not set 563# CONFIG_NET_TULIP is not set
453# CONFIG_HP100 is not set 564# CONFIG_HP100 is not set
454# CONFIG_NET_PCI is not set 565# CONFIG_NET_PCI is not set
@@ -463,12 +574,11 @@ CONFIG_NETDEV_1000=y
463# CONFIG_SIS190 is not set 574# CONFIG_SIS190 is not set
464# CONFIG_SKGE is not set 575# CONFIG_SKGE is not set
465# CONFIG_SKY2 is not set 576# CONFIG_SKY2 is not set
466# CONFIG_SK98LIN is not set
467# CONFIG_VIA_VELOCITY is not set 577# CONFIG_VIA_VELOCITY is not set
468# CONFIG_TIGON3 is not set 578# CONFIG_TIGON3 is not set
469# CONFIG_BNX2 is not set 579# CONFIG_BNX2 is not set
470CONFIG_GIANFAR=y 580CONFIG_GIANFAR=y
471# CONFIG_GFAR_NAPI is not set 581CONFIG_GFAR_NAPI=y
472# CONFIG_QLA3XXX is not set 582# CONFIG_QLA3XXX is not set
473# CONFIG_ATL1 is not set 583# CONFIG_ATL1 is not set
474CONFIG_NETDEV_10000=y 584CONFIG_NETDEV_10000=y
@@ -486,24 +596,27 @@ CONFIG_NETDEV_10000=y
486# 596#
487# CONFIG_WLAN_PRE80211 is not set 597# CONFIG_WLAN_PRE80211 is not set
488# CONFIG_WLAN_80211 is not set 598# CONFIG_WLAN_80211 is not set
599
600#
601# USB Network Adapters
602#
603# CONFIG_USB_CATC is not set
604# CONFIG_USB_KAWETH is not set
605# CONFIG_USB_PEGASUS is not set
606# CONFIG_USB_RTL8150 is not set
607# CONFIG_USB_USBNET_MII is not set
608# CONFIG_USB_USBNET is not set
489# CONFIG_WAN is not set 609# CONFIG_WAN is not set
490# CONFIG_FDDI is not set 610# CONFIG_FDDI is not set
491# CONFIG_HIPPI is not set 611# CONFIG_HIPPI is not set
492# CONFIG_PPP is not set 612# CONFIG_PPP is not set
493# CONFIG_SLIP is not set 613# CONFIG_SLIP is not set
614# CONFIG_NET_FC is not set
494# CONFIG_SHAPER is not set 615# CONFIG_SHAPER is not set
495# CONFIG_NETCONSOLE is not set 616# CONFIG_NETCONSOLE is not set
496# CONFIG_NETPOLL is not set 617# CONFIG_NETPOLL is not set
497# CONFIG_NET_POLL_CONTROLLER is not set 618# CONFIG_NET_POLL_CONTROLLER is not set
498
499#
500# ISDN subsystem
501#
502# CONFIG_ISDN is not set 619# CONFIG_ISDN is not set
503
504#
505# Telephony Support
506#
507# CONFIG_PHONE is not set 620# CONFIG_PHONE is not set
508 621
509# 622#
@@ -575,25 +688,19 @@ CONFIG_SERIAL_CORE_CONSOLE=y
575# CONFIG_SERIAL_JSM is not set 688# CONFIG_SERIAL_JSM is not set
576# CONFIG_SERIAL_OF_PLATFORM is not set 689# CONFIG_SERIAL_OF_PLATFORM is not set
577CONFIG_UNIX98_PTYS=y 690CONFIG_UNIX98_PTYS=y
578# CONFIG_LEGACY_PTYS is not set 691CONFIG_LEGACY_PTYS=y
579 692CONFIG_LEGACY_PTY_COUNT=256
580#
581# IPMI
582#
583# CONFIG_IPMI_HANDLER is not set 693# CONFIG_IPMI_HANDLER is not set
584# CONFIG_WATCHDOG is not set 694# CONFIG_WATCHDOG is not set
585# CONFIG_HW_RANDOM is not set 695# CONFIG_HW_RANDOM is not set
586# CONFIG_NVRAM is not set 696CONFIG_NVRAM=y
587# CONFIG_GEN_RTC is not set 697CONFIG_GEN_RTC=y
698CONFIG_GEN_RTC_X=y
588# CONFIG_R3964 is not set 699# CONFIG_R3964 is not set
589# CONFIG_APPLICOM is not set 700# CONFIG_APPLICOM is not set
590# CONFIG_AGP is not set 701# CONFIG_AGP is not set
591# CONFIG_DRM is not set 702# CONFIG_DRM is not set
592# CONFIG_RAW_DRIVER is not set 703# CONFIG_RAW_DRIVER is not set
593
594#
595# TPM devices
596#
597# CONFIG_TCG_TPM is not set 704# CONFIG_TCG_TPM is not set
598CONFIG_DEVPORT=y 705CONFIG_DEVPORT=y
599CONFIG_I2C=y 706CONFIG_I2C=y
@@ -628,6 +735,9 @@ CONFIG_I2C_MPC=y
628# CONFIG_I2C_SIS5595 is not set 735# CONFIG_I2C_SIS5595 is not set
629# CONFIG_I2C_SIS630 is not set 736# CONFIG_I2C_SIS630 is not set
630# CONFIG_I2C_SIS96X is not set 737# CONFIG_I2C_SIS96X is not set
738# CONFIG_I2C_TAOS_EVM is not set
739# CONFIG_I2C_STUB is not set
740# CONFIG_I2C_TINY_USB is not set
631# CONFIG_I2C_VIA is not set 741# CONFIG_I2C_VIA is not set
632# CONFIG_I2C_VIAPRO is not set 742# CONFIG_I2C_VIAPRO is not set
633# CONFIG_I2C_VOODOO3 is not set 743# CONFIG_I2C_VOODOO3 is not set
@@ -637,12 +747,14 @@ CONFIG_I2C_MPC=y
637# 747#
638# CONFIG_SENSORS_DS1337 is not set 748# CONFIG_SENSORS_DS1337 is not set
639# CONFIG_SENSORS_DS1374 is not set 749# CONFIG_SENSORS_DS1374 is not set
750# CONFIG_DS1682 is not set
640CONFIG_SENSORS_EEPROM=y 751CONFIG_SENSORS_EEPROM=y
641# CONFIG_SENSORS_PCF8574 is not set 752# CONFIG_SENSORS_PCF8574 is not set
642# CONFIG_SENSORS_PCA9539 is not set 753# CONFIG_SENSORS_PCA9539 is not set
643# CONFIG_SENSORS_PCF8591 is not set 754# CONFIG_SENSORS_PCF8591 is not set
644# CONFIG_SENSORS_M41T00 is not set 755# CONFIG_SENSORS_M41T00 is not set
645# CONFIG_SENSORS_MAX6875 is not set 756# CONFIG_SENSORS_MAX6875 is not set
757# CONFIG_SENSORS_TSL2550 is not set
646# CONFIG_I2C_DEBUG_CORE is not set 758# CONFIG_I2C_DEBUG_CORE is not set
647# CONFIG_I2C_DEBUG_ALGO is not set 759# CONFIG_I2C_DEBUG_ALGO is not set
648# CONFIG_I2C_DEBUG_BUS is not set 760# CONFIG_I2C_DEBUG_BUS is not set
@@ -653,11 +765,8 @@ CONFIG_SENSORS_EEPROM=y
653# 765#
654# CONFIG_SPI is not set 766# CONFIG_SPI is not set
655# CONFIG_SPI_MASTER is not set 767# CONFIG_SPI_MASTER is not set
656
657#
658# Dallas's 1-wire bus
659#
660# CONFIG_W1 is not set 768# CONFIG_W1 is not set
769# CONFIG_POWER_SUPPLY is not set
661# CONFIG_HWMON is not set 770# CONFIG_HWMON is not set
662 771
663# 772#
@@ -669,8 +778,108 @@ CONFIG_SENSORS_EEPROM=y
669# Multimedia devices 778# Multimedia devices
670# 779#
671# CONFIG_VIDEO_DEV is not set 780# CONFIG_VIDEO_DEV is not set
672# CONFIG_DVB_CORE is not set 781CONFIG_DVB_CORE=m
782# CONFIG_DVB_CORE_ATTACH is not set
783CONFIG_DVB_CAPTURE_DRIVERS=y
784
785#
786# Supported SAA7146 based PCI Adapters
787#
788
789#
790# Supported USB Adapters
791#
792# CONFIG_DVB_USB is not set
793# CONFIG_DVB_TTUSB_BUDGET is not set
794# CONFIG_DVB_TTUSB_DEC is not set
795# CONFIG_DVB_CINERGYT2 is not set
796
797#
798# Supported FlexCopII (B2C2) Adapters
799#
800# CONFIG_DVB_B2C2_FLEXCOP is not set
801
802#
803# Supported BT878 Adapters
804#
805
806#
807# Supported Pluto2 Adapters
808#
809# CONFIG_DVB_PLUTO2 is not set
810
811#
812# Supported DVB Frontends
813#
814
815#
816# Customise DVB Frontends
817#
818# CONFIG_DVB_FE_CUSTOMISE is not set
819
820#
821# DVB-S (satellite) frontends
822#
823# CONFIG_DVB_STV0299 is not set
824# CONFIG_DVB_CX24110 is not set
825# CONFIG_DVB_CX24123 is not set
826# CONFIG_DVB_TDA8083 is not set
827# CONFIG_DVB_MT312 is not set
828# CONFIG_DVB_VES1X93 is not set
829# CONFIG_DVB_S5H1420 is not set
830# CONFIG_DVB_TDA10086 is not set
831
832#
833# DVB-T (terrestrial) frontends
834#
835# CONFIG_DVB_SP8870 is not set
836# CONFIG_DVB_SP887X is not set
837# CONFIG_DVB_CX22700 is not set
838# CONFIG_DVB_CX22702 is not set
839# CONFIG_DVB_L64781 is not set
840# CONFIG_DVB_TDA1004X is not set
841# CONFIG_DVB_NXT6000 is not set
842# CONFIG_DVB_MT352 is not set
843# CONFIG_DVB_ZL10353 is not set
844# CONFIG_DVB_DIB3000MB is not set
845# CONFIG_DVB_DIB3000MC is not set
846# CONFIG_DVB_DIB7000M is not set
847# CONFIG_DVB_DIB7000P is not set
848
849#
850# DVB-C (cable) frontends
851#
852# CONFIG_DVB_VES1820 is not set
853# CONFIG_DVB_TDA10021 is not set
854# CONFIG_DVB_TDA10023 is not set
855# CONFIG_DVB_STV0297 is not set
856
857#
858# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
859#
860# CONFIG_DVB_NXT200X is not set
861# CONFIG_DVB_OR51211 is not set
862# CONFIG_DVB_OR51132 is not set
863# CONFIG_DVB_BCM3510 is not set
864# CONFIG_DVB_LGDT330X is not set
865
866#
867# Tuners/PLL support
868#
869# CONFIG_DVB_PLL is not set
870# CONFIG_DVB_TDA826X is not set
871# CONFIG_DVB_TDA827X is not set
872# CONFIG_DVB_TUNER_QT1010 is not set
873# CONFIG_DVB_TUNER_MT2060 is not set
874
875#
876# Miscellaneous devices
877#
878# CONFIG_DVB_LNBP21 is not set
879# CONFIG_DVB_ISL6421 is not set
880# CONFIG_DVB_TUA6100 is not set
673CONFIG_DAB=y 881CONFIG_DAB=y
882# CONFIG_USB_DABUSB is not set
674 883
675# 884#
676# Graphics support 885# Graphics support
@@ -682,6 +891,7 @@ CONFIG_DAB=y
682# 891#
683# CONFIG_DISPLAY_SUPPORT is not set 892# CONFIG_DISPLAY_SUPPORT is not set
684# CONFIG_VGASTATE is not set 893# CONFIG_VGASTATE is not set
894CONFIG_VIDEO_OUTPUT_CONTROL=y
685# CONFIG_FB is not set 895# CONFIG_FB is not set
686# CONFIG_FB_IBM_GXT4500 is not set 896# CONFIG_FB_IBM_GXT4500 is not set
687 897
@@ -695,58 +905,293 @@ CONFIG_DUMMY_CONSOLE=y
695# 905#
696# Sound 906# Sound
697# 907#
698# CONFIG_SOUND is not set 908CONFIG_SOUND=y
699 909
700# 910#
701# HID Devices 911# Advanced Linux Sound Architecture
702# 912#
913CONFIG_SND=y
914CONFIG_SND_TIMER=y
915CONFIG_SND_PCM=y
916# CONFIG_SND_SEQUENCER is not set
917# CONFIG_SND_MIXER_OSS is not set
918# CONFIG_SND_PCM_OSS is not set
919# CONFIG_SND_DYNAMIC_MINORS is not set
920CONFIG_SND_SUPPORT_OLD_API=y
921CONFIG_SND_VERBOSE_PROCFS=y
922# CONFIG_SND_VERBOSE_PRINTK is not set
923# CONFIG_SND_DEBUG is not set
924
925#
926# Generic devices
927#
928CONFIG_SND_AC97_CODEC=y
929# CONFIG_SND_DUMMY is not set
930# CONFIG_SND_MTPAV is not set
931# CONFIG_SND_SERIAL_U16550 is not set
932# CONFIG_SND_MPU401 is not set
933
934#
935# PCI devices
936#
937# CONFIG_SND_AD1889 is not set
938# CONFIG_SND_ALS300 is not set
939# CONFIG_SND_ALS4000 is not set
940# CONFIG_SND_ALI5451 is not set
941# CONFIG_SND_ATIIXP is not set
942# CONFIG_SND_ATIIXP_MODEM is not set
943# CONFIG_SND_AU8810 is not set
944# CONFIG_SND_AU8820 is not set
945# CONFIG_SND_AU8830 is not set
946# CONFIG_SND_AZT3328 is not set
947# CONFIG_SND_BT87X is not set
948# CONFIG_SND_CA0106 is not set
949# CONFIG_SND_CMIPCI is not set
950# CONFIG_SND_CS4281 is not set
951# CONFIG_SND_CS46XX is not set
952# CONFIG_SND_CS5530 is not set
953# CONFIG_SND_DARLA20 is not set
954# CONFIG_SND_GINA20 is not set
955# CONFIG_SND_LAYLA20 is not set
956# CONFIG_SND_DARLA24 is not set
957# CONFIG_SND_GINA24 is not set
958# CONFIG_SND_LAYLA24 is not set
959# CONFIG_SND_MONA is not set
960# CONFIG_SND_MIA is not set
961# CONFIG_SND_ECHO3G is not set
962# CONFIG_SND_INDIGO is not set
963# CONFIG_SND_INDIGOIO is not set
964# CONFIG_SND_INDIGODJ is not set
965# CONFIG_SND_EMU10K1 is not set
966# CONFIG_SND_EMU10K1X is not set
967# CONFIG_SND_ENS1370 is not set
968# CONFIG_SND_ENS1371 is not set
969# CONFIG_SND_ES1938 is not set
970# CONFIG_SND_ES1968 is not set
971# CONFIG_SND_FM801 is not set
972# CONFIG_SND_HDA_INTEL is not set
973# CONFIG_SND_HDSP is not set
974# CONFIG_SND_HDSPM is not set
975# CONFIG_SND_ICE1712 is not set
976# CONFIG_SND_ICE1724 is not set
977CONFIG_SND_INTEL8X0=y
978# CONFIG_SND_INTEL8X0M is not set
979# CONFIG_SND_KORG1212 is not set
980# CONFIG_SND_MAESTRO3 is not set
981# CONFIG_SND_MIXART is not set
982# CONFIG_SND_NM256 is not set
983# CONFIG_SND_PCXHR is not set
984# CONFIG_SND_RIPTIDE is not set
985# CONFIG_SND_RME32 is not set
986# CONFIG_SND_RME96 is not set
987# CONFIG_SND_RME9652 is not set
988# CONFIG_SND_SONICVIBES is not set
989# CONFIG_SND_TRIDENT is not set
990# CONFIG_SND_VIA82XX is not set
991# CONFIG_SND_VIA82XX_MODEM is not set
992# CONFIG_SND_VX222 is not set
993# CONFIG_SND_YMFPCI is not set
994# CONFIG_SND_AC97_POWER_SAVE is not set
995
996#
997# ALSA PowerMac devices
998#
999
1000#
1001# ALSA PowerPC devices
1002#
1003
1004#
1005# USB devices
1006#
1007# CONFIG_SND_USB_AUDIO is not set
1008# CONFIG_SND_USB_USX2Y is not set
1009# CONFIG_SND_USB_CAIAQ is not set
1010
1011#
1012# System on Chip audio support
1013#
1014# CONFIG_SND_SOC is not set
1015
1016#
1017# SoC Audio support for SuperH
1018#
1019
1020#
1021# Open Sound System
1022#
1023# CONFIG_SOUND_PRIME is not set
1024CONFIG_AC97_BUS=y
1025CONFIG_HID_SUPPORT=y
703CONFIG_HID=y 1026CONFIG_HID=y
704# CONFIG_HID_DEBUG is not set 1027# CONFIG_HID_DEBUG is not set
705 1028
706# 1029#
707# USB support 1030# USB Input Devices
708# 1031#
1032CONFIG_USB_HID=y
1033# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1034# CONFIG_HID_FF is not set
1035# CONFIG_USB_HIDDEV is not set
1036CONFIG_USB_SUPPORT=y
709CONFIG_USB_ARCH_HAS_HCD=y 1037CONFIG_USB_ARCH_HAS_HCD=y
710CONFIG_USB_ARCH_HAS_OHCI=y 1038CONFIG_USB_ARCH_HAS_OHCI=y
711CONFIG_USB_ARCH_HAS_EHCI=y 1039CONFIG_USB_ARCH_HAS_EHCI=y
712# CONFIG_USB is not set 1040CONFIG_USB=y
1041# CONFIG_USB_DEBUG is not set
1042
1043#
1044# Miscellaneous USB options
1045#
1046CONFIG_USB_DEVICEFS=y
1047CONFIG_USB_DEVICE_CLASS=y
1048# CONFIG_USB_DYNAMIC_MINORS is not set
1049# CONFIG_USB_OTG is not set
1050
1051#
1052# USB Host Controller Drivers
1053#
1054CONFIG_USB_EHCI_HCD=y
1055# CONFIG_USB_EHCI_SPLIT_ISO is not set
1056# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1057# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1058# CONFIG_USB_ISP116X_HCD is not set
1059CONFIG_USB_OHCI_HCD=y
1060CONFIG_USB_OHCI_HCD_PPC_OF=y
1061CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1062CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
1063CONFIG_USB_OHCI_HCD_PCI=y
1064CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1065CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1066CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1067# CONFIG_USB_UHCI_HCD is not set
1068# CONFIG_USB_SL811_HCD is not set
1069# CONFIG_USB_R8A66597_HCD is not set
1070
1071#
1072# USB Device Class drivers
1073#
1074# CONFIG_USB_ACM is not set
1075# CONFIG_USB_PRINTER is not set
713 1076
714# 1077#
715# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1078# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
716# 1079#
717 1080
718# 1081#
719# USB Gadget Support 1082# may also be needed; see USB_STORAGE Help for more information
720# 1083#
721# CONFIG_USB_GADGET is not set 1084CONFIG_USB_STORAGE=y
722# CONFIG_MMC is not set 1085# CONFIG_USB_STORAGE_DEBUG is not set
1086# CONFIG_USB_STORAGE_DATAFAB is not set
1087# CONFIG_USB_STORAGE_FREECOM is not set
1088# CONFIG_USB_STORAGE_DPCM is not set
1089# CONFIG_USB_STORAGE_USBAT is not set
1090# CONFIG_USB_STORAGE_SDDR09 is not set
1091# CONFIG_USB_STORAGE_SDDR55 is not set
1092# CONFIG_USB_STORAGE_JUMPSHOT is not set
1093# CONFIG_USB_STORAGE_ALAUDA is not set
1094# CONFIG_USB_STORAGE_KARMA is not set
1095# CONFIG_USB_LIBUSUAL is not set
723 1096
724# 1097#
725# LED devices 1098# USB Imaging devices
1099#
1100# CONFIG_USB_MDC800 is not set
1101# CONFIG_USB_MICROTEK is not set
1102CONFIG_USB_MON=y
1103
1104#
1105# USB port drivers
726# 1106#
727# CONFIG_NEW_LEDS is not set
728 1107
729# 1108#
730# LED drivers 1109# USB Serial Converter support
731# 1110#
1111# CONFIG_USB_SERIAL is not set
732 1112
733# 1113#
734# LED Triggers 1114# USB Miscellaneous drivers
735# 1115#
1116# CONFIG_USB_EMI62 is not set
1117# CONFIG_USB_EMI26 is not set
1118# CONFIG_USB_ADUTUX is not set
1119# CONFIG_USB_AUERSWALD is not set
1120# CONFIG_USB_RIO500 is not set
1121# CONFIG_USB_LEGOTOWER is not set
1122# CONFIG_USB_LCD is not set
1123# CONFIG_USB_BERRY_CHARGE is not set
1124# CONFIG_USB_LED is not set
1125# CONFIG_USB_CYPRESS_CY7C63 is not set
1126# CONFIG_USB_CYTHERM is not set
1127# CONFIG_USB_PHIDGET is not set
1128# CONFIG_USB_IDMOUSE is not set
1129# CONFIG_USB_FTDI_ELAN is not set
1130# CONFIG_USB_APPLEDISPLAY is not set
1131# CONFIG_USB_SISUSBVGA is not set
1132# CONFIG_USB_LD is not set
1133# CONFIG_USB_TRANCEVIBRATOR is not set
1134# CONFIG_USB_IOWARRIOR is not set
1135# CONFIG_USB_TEST is not set
736 1136
737# 1137#
738# InfiniBand support 1138# USB DSL modem support
739# 1139#
1140
1141#
1142# USB Gadget Support
1143#
1144# CONFIG_USB_GADGET is not set
1145# CONFIG_MMC is not set
1146# CONFIG_NEW_LEDS is not set
740# CONFIG_INFINIBAND is not set 1147# CONFIG_INFINIBAND is not set
1148# CONFIG_EDAC is not set
1149CONFIG_RTC_LIB=y
1150CONFIG_RTC_CLASS=y
1151CONFIG_RTC_HCTOSYS=y
1152CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1153# CONFIG_RTC_DEBUG is not set
1154
1155#
1156# RTC interfaces
1157#
1158CONFIG_RTC_INTF_SYSFS=y
1159CONFIG_RTC_INTF_PROC=y
1160CONFIG_RTC_INTF_DEV=y
1161# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1162# CONFIG_RTC_DRV_TEST is not set
1163
1164#
1165# I2C RTC drivers
1166#
1167# CONFIG_RTC_DRV_DS1307 is not set
1168# CONFIG_RTC_DRV_DS1672 is not set
1169# CONFIG_RTC_DRV_MAX6900 is not set
1170# CONFIG_RTC_DRV_RS5C372 is not set
1171# CONFIG_RTC_DRV_ISL1208 is not set
1172# CONFIG_RTC_DRV_X1205 is not set
1173# CONFIG_RTC_DRV_PCF8563 is not set
1174# CONFIG_RTC_DRV_PCF8583 is not set
1175# CONFIG_RTC_DRV_M41T80 is not set
1176
1177#
1178# SPI RTC drivers
1179#
741 1180
742# 1181#
743# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 1182# Platform RTC drivers
744# 1183#
1184CONFIG_RTC_DRV_CMOS=y
1185# CONFIG_RTC_DRV_DS1553 is not set
1186# CONFIG_RTC_DRV_STK17TA8 is not set
1187# CONFIG_RTC_DRV_DS1742 is not set
1188# CONFIG_RTC_DRV_M48T86 is not set
1189# CONFIG_RTC_DRV_M48T59 is not set
1190# CONFIG_RTC_DRV_V3020 is not set
745 1191
746# 1192#
747# Real Time Clock 1193# on-CPU RTC drivers
748# 1194#
749# CONFIG_RTC_CLASS is not set
750 1195
751# 1196#
752# DMA Engine support 1197# DMA Engine support
@@ -762,6 +1207,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
762# 1207#
763 1208
764# 1209#
1210# Userspace I/O
1211#
1212# CONFIG_UIO is not set
1213
1214#
765# File systems 1215# File systems
766# 1216#
767CONFIG_EXT2_FS=y 1217CONFIG_EXT2_FS=y
@@ -783,9 +1233,10 @@ CONFIG_FS_MBCACHE=y
783# CONFIG_OCFS2_FS is not set 1233# CONFIG_OCFS2_FS is not set
784# CONFIG_MINIX_FS is not set 1234# CONFIG_MINIX_FS is not set
785# CONFIG_ROMFS_FS is not set 1235# CONFIG_ROMFS_FS is not set
786# CONFIG_INOTIFY is not set 1236CONFIG_INOTIFY=y
1237CONFIG_INOTIFY_USER=y
787# CONFIG_QUOTA is not set 1238# CONFIG_QUOTA is not set
788# CONFIG_DNOTIFY is not set 1239CONFIG_DNOTIFY=y
789# CONFIG_AUTOFS_FS is not set 1240# CONFIG_AUTOFS_FS is not set
790# CONFIG_AUTOFS4_FS is not set 1241# CONFIG_AUTOFS4_FS is not set
791# CONFIG_FUSE_FS is not set 1242# CONFIG_FUSE_FS is not set
@@ -793,15 +1244,23 @@ CONFIG_FS_MBCACHE=y
793# 1244#
794# CD-ROM/DVD Filesystems 1245# CD-ROM/DVD Filesystems
795# 1246#
796# CONFIG_ISO9660_FS is not set 1247CONFIG_ISO9660_FS=m
797# CONFIG_UDF_FS is not set 1248CONFIG_JOLIET=y
1249CONFIG_ZISOFS=y
1250CONFIG_UDF_FS=m
1251CONFIG_UDF_NLS=y
798 1252
799# 1253#
800# DOS/FAT/NT Filesystems 1254# DOS/FAT/NT Filesystems
801# 1255#
802# CONFIG_MSDOS_FS is not set 1256CONFIG_FAT_FS=y
803# CONFIG_VFAT_FS is not set 1257CONFIG_MSDOS_FS=m
804# CONFIG_NTFS_FS is not set 1258CONFIG_VFAT_FS=y
1259CONFIG_FAT_DEFAULT_CODEPAGE=437
1260CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1261CONFIG_NTFS_FS=y
1262# CONFIG_NTFS_DEBUG is not set
1263# CONFIG_NTFS_RW is not set
805 1264
806# 1265#
807# Pseudo filesystems 1266# Pseudo filesystems
@@ -819,19 +1278,23 @@ CONFIG_RAMFS=y
819# 1278#
820# Miscellaneous filesystems 1279# Miscellaneous filesystems
821# 1280#
822# CONFIG_ADFS_FS is not set 1281CONFIG_ADFS_FS=m
823# CONFIG_AFFS_FS is not set 1282# CONFIG_ADFS_FS_RW is not set
824# CONFIG_HFS_FS is not set 1283CONFIG_AFFS_FS=m
825# CONFIG_HFSPLUS_FS is not set 1284CONFIG_HFS_FS=m
826# CONFIG_BEFS_FS is not set 1285CONFIG_HFSPLUS_FS=m
827# CONFIG_BFS_FS is not set 1286CONFIG_BEFS_FS=m
828# CONFIG_EFS_FS is not set 1287# CONFIG_BEFS_DEBUG is not set
829# CONFIG_CRAMFS is not set 1288CONFIG_BFS_FS=m
830# CONFIG_VXFS_FS is not set 1289CONFIG_EFS_FS=m
831# CONFIG_HPFS_FS is not set 1290CONFIG_CRAMFS=y
832# CONFIG_QNX4FS_FS is not set 1291CONFIG_VXFS_FS=m
833# CONFIG_SYSV_FS is not set 1292CONFIG_HPFS_FS=m
834# CONFIG_UFS_FS is not set 1293CONFIG_QNX4FS_FS=m
1294CONFIG_SYSV_FS=m
1295CONFIG_UFS_FS=m
1296# CONFIG_UFS_FS_WRITE is not set
1297# CONFIG_UFS_DEBUG is not set
835 1298
836# 1299#
837# Network File Systems 1300# Network File Systems
@@ -839,7 +1302,7 @@ CONFIG_RAMFS=y
839CONFIG_NFS_FS=y 1302CONFIG_NFS_FS=y
840CONFIG_NFS_V3=y 1303CONFIG_NFS_V3=y
841# CONFIG_NFS_V3_ACL is not set 1304# CONFIG_NFS_V3_ACL is not set
842# CONFIG_NFS_V4 is not set 1305CONFIG_NFS_V4=y
843# CONFIG_NFS_DIRECTIO is not set 1306# CONFIG_NFS_DIRECTIO is not set
844CONFIG_NFSD=y 1307CONFIG_NFSD=y
845# CONFIG_NFSD_V3 is not set 1308# CONFIG_NFSD_V3 is not set
@@ -850,15 +1313,15 @@ CONFIG_LOCKD_V4=y
850CONFIG_EXPORTFS=y 1313CONFIG_EXPORTFS=y
851CONFIG_NFS_COMMON=y 1314CONFIG_NFS_COMMON=y
852CONFIG_SUNRPC=y 1315CONFIG_SUNRPC=y
1316CONFIG_SUNRPC_GSS=y
853# CONFIG_SUNRPC_BIND34 is not set 1317# CONFIG_SUNRPC_BIND34 is not set
854# CONFIG_RPCSEC_GSS_KRB5 is not set 1318CONFIG_RPCSEC_GSS_KRB5=y
855# CONFIG_RPCSEC_GSS_SPKM3 is not set 1319# CONFIG_RPCSEC_GSS_SPKM3 is not set
856# CONFIG_SMB_FS is not set 1320# CONFIG_SMB_FS is not set
857# CONFIG_CIFS is not set 1321# CONFIG_CIFS is not set
858# CONFIG_NCP_FS is not set 1322# CONFIG_NCP_FS is not set
859# CONFIG_CODA_FS is not set 1323# CONFIG_CODA_FS is not set
860# CONFIG_AFS_FS is not set 1324# CONFIG_AFS_FS is not set
861# CONFIG_9P_FS is not set
862 1325
863# 1326#
864# Partition Types 1327# Partition Types
@@ -868,14 +1331,13 @@ CONFIG_PARTITION_ADVANCED=y
868# CONFIG_OSF_PARTITION is not set 1331# CONFIG_OSF_PARTITION is not set
869# CONFIG_AMIGA_PARTITION is not set 1332# CONFIG_AMIGA_PARTITION is not set
870# CONFIG_ATARI_PARTITION is not set 1333# CONFIG_ATARI_PARTITION is not set
871# CONFIG_MAC_PARTITION is not set 1334CONFIG_MAC_PARTITION=y
872CONFIG_MSDOS_PARTITION=y 1335CONFIG_MSDOS_PARTITION=y
873# CONFIG_BSD_DISKLABEL is not set 1336# CONFIG_BSD_DISKLABEL is not set
874# CONFIG_MINIX_SUBPARTITION is not set 1337# CONFIG_MINIX_SUBPARTITION is not set
875# CONFIG_SOLARIS_X86_PARTITION is not set 1338# CONFIG_SOLARIS_X86_PARTITION is not set
876# CONFIG_UNIXWARE_DISKLABEL is not set 1339# CONFIG_UNIXWARE_DISKLABEL is not set
877CONFIG_LDM_PARTITION=y 1340# CONFIG_LDM_PARTITION is not set
878# CONFIG_LDM_DEBUG is not set
879# CONFIG_SGI_PARTITION is not set 1341# CONFIG_SGI_PARTITION is not set
880# CONFIG_ULTRIX_PARTITION is not set 1342# CONFIG_ULTRIX_PARTITION is not set
881# CONFIG_SUN_PARTITION is not set 1343# CONFIG_SUN_PARTITION is not set
@@ -925,7 +1387,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
925# CONFIG_NLS_ISO8859_15 is not set 1387# CONFIG_NLS_ISO8859_15 is not set
926# CONFIG_NLS_KOI8_R is not set 1388# CONFIG_NLS_KOI8_R is not set
927# CONFIG_NLS_KOI8_U is not set 1389# CONFIG_NLS_KOI8_U is not set
928# CONFIG_NLS_UTF8 is not set 1390CONFIG_NLS_UTF8=m
929 1391
930# 1392#
931# Distributed Lock Manager 1393# Distributed Lock Manager
@@ -941,7 +1403,9 @@ CONFIG_BITREVERSE=y
941# CONFIG_CRC16 is not set 1403# CONFIG_CRC16 is not set
942# CONFIG_CRC_ITU_T is not set 1404# CONFIG_CRC_ITU_T is not set
943CONFIG_CRC32=y 1405CONFIG_CRC32=y
944# CONFIG_LIBCRC32C is not set 1406# CONFIG_CRC7 is not set
1407CONFIG_LIBCRC32C=m
1408CONFIG_ZLIB_INFLATE=y
945CONFIG_PLIST=y 1409CONFIG_PLIST=y
946CONFIG_HAS_IOMEM=y 1410CONFIG_HAS_IOMEM=y
947CONFIG_HAS_IOPORT=y 1411CONFIG_HAS_IOPORT=y
@@ -951,6 +1415,7 @@ CONFIG_HAS_DMA=y
951# Instrumentation Support 1415# Instrumentation Support
952# 1416#
953# CONFIG_PROFILING is not set 1417# CONFIG_PROFILING is not set
1418# CONFIG_KPROBES is not set
954 1419
955# 1420#
956# Kernel hacking 1421# Kernel hacking
@@ -964,6 +1429,7 @@ CONFIG_ENABLE_MUST_CHECK=y
964CONFIG_DEBUG_KERNEL=y 1429CONFIG_DEBUG_KERNEL=y
965# CONFIG_DEBUG_SHIRQ is not set 1430# CONFIG_DEBUG_SHIRQ is not set
966CONFIG_DETECT_SOFTLOCKUP=y 1431CONFIG_DETECT_SOFTLOCKUP=y
1432CONFIG_SCHED_DEBUG=y
967# CONFIG_SCHEDSTATS is not set 1433# CONFIG_SCHEDSTATS is not set
968# CONFIG_TIMER_STATS is not set 1434# CONFIG_TIMER_STATS is not set
969# CONFIG_DEBUG_SLAB is not set 1435# CONFIG_DEBUG_SLAB is not set
@@ -976,17 +1442,17 @@ CONFIG_DETECT_SOFTLOCKUP=y
976# CONFIG_DEBUG_KOBJECT is not set 1442# CONFIG_DEBUG_KOBJECT is not set
977# CONFIG_DEBUG_HIGHMEM is not set 1443# CONFIG_DEBUG_HIGHMEM is not set
978# CONFIG_DEBUG_BUGVERBOSE is not set 1444# CONFIG_DEBUG_BUGVERBOSE is not set
979# CONFIG_DEBUG_INFO is not set 1445CONFIG_DEBUG_INFO=y
980# CONFIG_DEBUG_VM is not set 1446# CONFIG_DEBUG_VM is not set
981# CONFIG_DEBUG_LIST is not set 1447# CONFIG_DEBUG_LIST is not set
982CONFIG_FORCED_INLINING=y 1448CONFIG_FORCED_INLINING=y
1449# CONFIG_RCU_TORTURE_TEST is not set
983# CONFIG_FAULT_INJECTION is not set 1450# CONFIG_FAULT_INJECTION is not set
984# CONFIG_DEBUG_STACKOVERFLOW is not set 1451# CONFIG_DEBUG_STACKOVERFLOW is not set
985# CONFIG_DEBUG_STACK_USAGE is not set 1452# CONFIG_DEBUG_STACK_USAGE is not set
986# CONFIG_DEBUG_PAGEALLOC is not set 1453# CONFIG_DEBUG_PAGEALLOC is not set
987# CONFIG_DEBUGGER is not set 1454# CONFIG_DEBUGGER is not set
988# CONFIG_BDI_SWITCH is not set 1455# CONFIG_BDI_SWITCH is not set
989# CONFIG_BOOTX_TEXT is not set
990# CONFIG_PPC_EARLY_DEBUG is not set 1456# CONFIG_PPC_EARLY_DEBUG is not set
991 1457
992# 1458#
@@ -994,8 +1460,42 @@ CONFIG_FORCED_INLINING=y
994# 1460#
995# CONFIG_KEYS is not set 1461# CONFIG_KEYS is not set
996# CONFIG_SECURITY is not set 1462# CONFIG_SECURITY is not set
997 1463CONFIG_CRYPTO=y
998# 1464CONFIG_CRYPTO_ALGAPI=y
999# Cryptographic options 1465CONFIG_CRYPTO_BLKCIPHER=y
1000# 1466CONFIG_CRYPTO_HASH=y
1001# CONFIG_CRYPTO is not set 1467CONFIG_CRYPTO_MANAGER=y
1468CONFIG_CRYPTO_HMAC=y
1469# CONFIG_CRYPTO_XCBC is not set
1470# CONFIG_CRYPTO_NULL is not set
1471# CONFIG_CRYPTO_MD4 is not set
1472CONFIG_CRYPTO_MD5=y
1473# CONFIG_CRYPTO_SHA1 is not set
1474# CONFIG_CRYPTO_SHA256 is not set
1475# CONFIG_CRYPTO_SHA512 is not set
1476# CONFIG_CRYPTO_WP512 is not set
1477# CONFIG_CRYPTO_TGR192 is not set
1478# CONFIG_CRYPTO_GF128MUL is not set
1479# CONFIG_CRYPTO_ECB is not set
1480CONFIG_CRYPTO_CBC=y
1481CONFIG_CRYPTO_PCBC=m
1482# CONFIG_CRYPTO_LRW is not set
1483# CONFIG_CRYPTO_CRYPTD is not set
1484CONFIG_CRYPTO_DES=y
1485# CONFIG_CRYPTO_FCRYPT is not set
1486# CONFIG_CRYPTO_BLOWFISH is not set
1487# CONFIG_CRYPTO_TWOFISH is not set
1488# CONFIG_CRYPTO_SERPENT is not set
1489# CONFIG_CRYPTO_AES is not set
1490# CONFIG_CRYPTO_CAST5 is not set
1491# CONFIG_CRYPTO_CAST6 is not set
1492# CONFIG_CRYPTO_TEA is not set
1493# CONFIG_CRYPTO_ARC4 is not set
1494# CONFIG_CRYPTO_KHAZAD is not set
1495# CONFIG_CRYPTO_ANUBIS is not set
1496# CONFIG_CRYPTO_DEFLATE is not set
1497# CONFIG_CRYPTO_MICHAEL_MIC is not set
1498# CONFIG_CRYPTO_CRC32C is not set
1499# CONFIG_CRYPTO_CAMELLIA is not set
1500# CONFIG_CRYPTO_TEST is not set
1501CONFIG_CRYPTO_HW=y
diff --git a/arch/powerpc/configs/mpc866_ads_defconfig b/arch/powerpc/configs/mpc866_ads_defconfig
index e6b18ea8f6..143a0cd833 100644
--- a/arch/powerpc/configs/mpc866_ads_defconfig
+++ b/arch/powerpc/configs/mpc866_ads_defconfig
@@ -1,9 +1,22 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:57:00 2007 4# Tue Aug 28 21:24:44 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13CONFIG_PPC_8xx=y
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_8xx=y
18# CONFIG_PPC_MM_SLICES is not set
19CONFIG_NOT_COHERENT_CACHE=y
7CONFIG_PPC32=y 20CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 21CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 22CONFIG_MMU=y
@@ -14,56 +27,37 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 27CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 28CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 29CONFIG_GENERIC_FIND_NEXT_BIT=y
30# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 31CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 32CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 33CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 34CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 35CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 36CONFIG_PPC_OF=y
37CONFIG_OF=y
23# CONFIG_PPC_UDBG_16550 is not set 38# CONFIG_PPC_UDBG_16550 is not set
24# CONFIG_GENERIC_TBSYNC is not set 39# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 40CONFIG_AUDIT_ARCH=y
26# CONFIG_DEFAULT_UIMAGE is not set 41# CONFIG_DEFAULT_UIMAGE is not set
27
28#
29# Processor support
30#
31# CONFIG_CLASSIC32 is not set
32# CONFIG_PPC_82xx is not set
33# CONFIG_PPC_83xx is not set
34# CONFIG_PPC_85xx is not set
35# CONFIG_PPC_86xx is not set
36CONFIG_PPC_8xx=y
37# CONFIG_40x is not set
38# CONFIG_44x is not set
39# CONFIG_E200 is not set
40CONFIG_8xx=y
41# CONFIG_PPC_DCR_NATIVE is not set 42# CONFIG_PPC_DCR_NATIVE is not set
42# CONFIG_PPC_DCR_MMIO is not set 43# CONFIG_PPC_DCR_MMIO is not set
43# CONFIG_PPC_MM_SLICES is not set
44CONFIG_NOT_COHERENT_CACHE=y
45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 44CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
46 45
47# 46#
48# Code maturity level options 47# General setup
49# 48#
50CONFIG_EXPERIMENTAL=y 49CONFIG_EXPERIMENTAL=y
51CONFIG_BROKEN_ON_SMP=y 50CONFIG_BROKEN_ON_SMP=y
52CONFIG_INIT_ENV_ARG_LIMIT=32 51CONFIG_INIT_ENV_ARG_LIMIT=32
53
54#
55# General setup
56#
57CONFIG_LOCALVERSION="" 52CONFIG_LOCALVERSION=""
58CONFIG_LOCALVERSION_AUTO=y 53CONFIG_LOCALVERSION_AUTO=y
59# CONFIG_SWAP is not set 54# CONFIG_SWAP is not set
60CONFIG_SYSVIPC=y 55CONFIG_SYSVIPC=y
61# CONFIG_IPC_NS is not set
62CONFIG_SYSVIPC_SYSCTL=y 56CONFIG_SYSVIPC_SYSCTL=y
63# CONFIG_POSIX_MQUEUE is not set 57# CONFIG_POSIX_MQUEUE is not set
64# CONFIG_BSD_PROCESS_ACCT is not set 58# CONFIG_BSD_PROCESS_ACCT is not set
65# CONFIG_TASKSTATS is not set 59# CONFIG_TASKSTATS is not set
66# CONFIG_UTS_NS is not set 60# CONFIG_USER_NS is not set
67# CONFIG_AUDIT is not set 61# CONFIG_AUDIT is not set
68# CONFIG_IKCONFIG is not set 62# CONFIG_IKCONFIG is not set
69CONFIG_LOG_BUF_SHIFT=14 63CONFIG_LOG_BUF_SHIFT=14
@@ -95,19 +89,12 @@ CONFIG_SLAB=y
95CONFIG_RT_MUTEXES=y 89CONFIG_RT_MUTEXES=y
96# CONFIG_TINY_SHMEM is not set 90# CONFIG_TINY_SHMEM is not set
97CONFIG_BASE_SMALL=1 91CONFIG_BASE_SMALL=1
98
99#
100# Loadable module support
101#
102# CONFIG_MODULES is not set 92# CONFIG_MODULES is not set
103
104#
105# Block layer
106#
107CONFIG_BLOCK=y 93CONFIG_BLOCK=y
108# CONFIG_LBD is not set 94# CONFIG_LBD is not set
109# CONFIG_BLK_DEV_IO_TRACE is not set 95# CONFIG_BLK_DEV_IO_TRACE is not set
110# CONFIG_LSF is not set 96# CONFIG_LSF is not set
97# CONFIG_BLK_DEV_BSG is not set
111 98
112# 99#
113# IO Schedulers 100# IO Schedulers
@@ -159,6 +146,7 @@ CONFIG_NO_UCODE_PATCH=y
159# CONFIG_GENERIC_IOMAP is not set 146# CONFIG_GENERIC_IOMAP is not set
160# CONFIG_CPU_FREQ is not set 147# CONFIG_CPU_FREQ is not set
161# CONFIG_CPM2 is not set 148# CONFIG_CPM2 is not set
149# CONFIG_FSL_ULI1575 is not set
162 150
163# 151#
164# Kernel options 152# Kernel options
@@ -188,6 +176,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
188CONFIG_SPLIT_PTLOCK_CPUS=4 176CONFIG_SPLIT_PTLOCK_CPUS=4
189# CONFIG_RESOURCES_64BIT is not set 177# CONFIG_RESOURCES_64BIT is not set
190CONFIG_ZONE_DMA_FLAG=1 178CONFIG_ZONE_DMA_FLAG=1
179CONFIG_BOUNCE=y
180CONFIG_VIRT_TO_BUS=y
191# CONFIG_PROC_DEVICETREE is not set 181# CONFIG_PROC_DEVICETREE is not set
192# CONFIG_CMDLINE_BOOL is not set 182# CONFIG_CMDLINE_BOOL is not set
193# CONFIG_PM is not set 183# CONFIG_PM is not set
@@ -202,6 +192,7 @@ CONFIG_ZONE_DMA=y
202CONFIG_FSL_SOC=y 192CONFIG_FSL_SOC=y
203# CONFIG_PCI is not set 193# CONFIG_PCI is not set
204# CONFIG_PCI_DOMAINS is not set 194# CONFIG_PCI_DOMAINS is not set
195# CONFIG_PCI_SYSCALL is not set
205# CONFIG_PCI_QSPAN is not set 196# CONFIG_PCI_QSPAN is not set
206# CONFIG_ARCH_SUPPORTS_MSI is not set 197# CONFIG_ARCH_SUPPORTS_MSI is not set
207 198
@@ -310,6 +301,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
310# CONFIG_MAC80211 is not set 301# CONFIG_MAC80211 is not set
311# CONFIG_IEEE80211 is not set 302# CONFIG_IEEE80211 is not set
312# CONFIG_RFKILL is not set 303# CONFIG_RFKILL is not set
304# CONFIG_NET_9P is not set
313 305
314# 306#
315# Device Drivers 307# Device Drivers
@@ -321,26 +313,11 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
321CONFIG_STANDALONE=y 313CONFIG_STANDALONE=y
322CONFIG_PREVENT_FIRMWARE_BUILD=y 314CONFIG_PREVENT_FIRMWARE_BUILD=y
323# CONFIG_SYS_HYPERVISOR is not set 315# CONFIG_SYS_HYPERVISOR is not set
324
325#
326# Connector - unified userspace <-> kernelspace linker
327#
328# CONFIG_CONNECTOR is not set 316# CONFIG_CONNECTOR is not set
329# CONFIG_MTD is not set 317# CONFIG_MTD is not set
330 318CONFIG_OF_DEVICE=y
331#
332# Parallel port support
333#
334# CONFIG_PARPORT is not set 319# CONFIG_PARPORT is not set
335 320CONFIG_BLK_DEV=y
336#
337# Plug and Play support
338#
339# CONFIG_PNPACPI is not set
340
341#
342# Block devices
343#
344# CONFIG_BLK_DEV_FD is not set 321# CONFIG_BLK_DEV_FD is not set
345# CONFIG_BLK_DEV_COW_COMMON is not set 322# CONFIG_BLK_DEV_COW_COMMON is not set
346CONFIG_BLK_DEV_LOOP=y 323CONFIG_BLK_DEV_LOOP=y
@@ -349,11 +326,8 @@ CONFIG_BLK_DEV_LOOP=y
349# CONFIG_BLK_DEV_RAM is not set 326# CONFIG_BLK_DEV_RAM is not set
350# CONFIG_CDROM_PKTCDVD is not set 327# CONFIG_CDROM_PKTCDVD is not set
351# CONFIG_ATA_OVER_ETH is not set 328# CONFIG_ATA_OVER_ETH is not set
352 329CONFIG_MISC_DEVICES=y
353# 330# CONFIG_EEPROM_93CX6 is not set
354# Misc devices
355#
356# CONFIG_BLINK is not set
357# CONFIG_IDE is not set 331# CONFIG_IDE is not set
358 332
359# 333#
@@ -361,21 +335,16 @@ CONFIG_BLK_DEV_LOOP=y
361# 335#
362# CONFIG_RAID_ATTRS is not set 336# CONFIG_RAID_ATTRS is not set
363# CONFIG_SCSI is not set 337# CONFIG_SCSI is not set
338# CONFIG_SCSI_DMA is not set
364# CONFIG_SCSI_NETLINK is not set 339# CONFIG_SCSI_NETLINK is not set
365# CONFIG_ATA is not set 340# CONFIG_ATA is not set
366
367#
368# Multi-device support (RAID and LVM)
369#
370# CONFIG_MD is not set 341# CONFIG_MD is not set
371# CONFIG_MACINTOSH_DRIVERS is not set 342# CONFIG_MACINTOSH_DRIVERS is not set
372
373#
374# Network device support
375#
376CONFIG_NETDEVICES=y 343CONFIG_NETDEVICES=y
344# CONFIG_NETDEVICES_MULTIQUEUE is not set
377# CONFIG_DUMMY is not set 345# CONFIG_DUMMY is not set
378# CONFIG_BONDING is not set 346# CONFIG_BONDING is not set
347# CONFIG_MACVLAN is not set
379# CONFIG_EQUALIZER is not set 348# CONFIG_EQUALIZER is not set
380# CONFIG_TUN is not set 349# CONFIG_TUN is not set
381CONFIG_PHYLIB=y 350CONFIG_PHYLIB=y
@@ -391,16 +360,12 @@ CONFIG_PHYLIB=y
391# CONFIG_VITESSE_PHY is not set 360# CONFIG_VITESSE_PHY is not set
392# CONFIG_SMSC_PHY is not set 361# CONFIG_SMSC_PHY is not set
393# CONFIG_BROADCOM_PHY is not set 362# CONFIG_BROADCOM_PHY is not set
363# CONFIG_ICPLUS_PHY is not set
394CONFIG_FIXED_PHY=y 364CONFIG_FIXED_PHY=y
395CONFIG_FIXED_MII_10_FDX=y 365CONFIG_FIXED_MII_10_FDX=y
396CONFIG_FIXED_MII_100_FDX=y 366CONFIG_FIXED_MII_100_FDX=y
397
398#
399# Ethernet (10 or 100Mbit)
400#
401CONFIG_NET_ETHERNET=y 367CONFIG_NET_ETHERNET=y
402CONFIG_MII=y 368CONFIG_MII=y
403# CONFIG_FEC_8XX is not set
404CONFIG_FS_ENET=y 369CONFIG_FS_ENET=y
405CONFIG_FS_ENET_HAS_SCC=y 370CONFIG_FS_ENET_HAS_SCC=y
406CONFIG_FS_ENET_HAS_FEC=y 371CONFIG_FS_ENET_HAS_FEC=y
@@ -419,15 +384,7 @@ CONFIG_NETDEV_10000=y
419# CONFIG_NETCONSOLE is not set 384# CONFIG_NETCONSOLE is not set
420# CONFIG_NETPOLL is not set 385# CONFIG_NETPOLL is not set
421# CONFIG_NET_POLL_CONTROLLER is not set 386# CONFIG_NET_POLL_CONTROLLER is not set
422
423#
424# ISDN subsystem
425#
426# CONFIG_ISDN is not set 387# CONFIG_ISDN is not set
427
428#
429# Telephony Support
430#
431# CONFIG_PHONE is not set 388# CONFIG_PHONE is not set
432 389
433# 390#
@@ -511,10 +468,6 @@ CONFIG_SERIAL_CPM_SMC1=y
511CONFIG_SERIAL_CPM_SMC2=y 468CONFIG_SERIAL_CPM_SMC2=y
512CONFIG_UNIX98_PTYS=y 469CONFIG_UNIX98_PTYS=y
513# CONFIG_LEGACY_PTYS is not set 470# CONFIG_LEGACY_PTYS is not set
514
515#
516# IPMI
517#
518# CONFIG_IPMI_HANDLER is not set 471# CONFIG_IPMI_HANDLER is not set
519# CONFIG_WATCHDOG is not set 472# CONFIG_WATCHDOG is not set
520CONFIG_HW_RANDOM=y 473CONFIG_HW_RANDOM=y
@@ -523,10 +476,6 @@ CONFIG_GEN_RTC=y
523# CONFIG_GEN_RTC_X is not set 476# CONFIG_GEN_RTC_X is not set
524# CONFIG_R3964 is not set 477# CONFIG_R3964 is not set
525# CONFIG_RAW_DRIVER is not set 478# CONFIG_RAW_DRIVER is not set
526
527#
528# TPM devices
529#
530# CONFIG_TCG_TPM is not set 479# CONFIG_TCG_TPM is not set
531# CONFIG_I2C is not set 480# CONFIG_I2C is not set
532 481
@@ -535,20 +484,21 @@ CONFIG_GEN_RTC=y
535# 484#
536# CONFIG_SPI is not set 485# CONFIG_SPI is not set
537# CONFIG_SPI_MASTER is not set 486# CONFIG_SPI_MASTER is not set
538
539#
540# Dallas's 1-wire bus
541#
542# CONFIG_W1 is not set 487# CONFIG_W1 is not set
488# CONFIG_POWER_SUPPLY is not set
543CONFIG_HWMON=y 489CONFIG_HWMON=y
544# CONFIG_HWMON_VID is not set 490# CONFIG_HWMON_VID is not set
545# CONFIG_SENSORS_ABITUGURU is not set 491# CONFIG_SENSORS_ABITUGURU is not set
492# CONFIG_SENSORS_ABITUGURU3 is not set
546# CONFIG_SENSORS_F71805F is not set 493# CONFIG_SENSORS_F71805F is not set
494# CONFIG_SENSORS_IT87 is not set
495# CONFIG_SENSORS_PC87360 is not set
547# CONFIG_SENSORS_PC87427 is not set 496# CONFIG_SENSORS_PC87427 is not set
548# CONFIG_SENSORS_SMSC47M1 is not set 497# CONFIG_SENSORS_SMSC47M1 is not set
549# CONFIG_SENSORS_SMSC47B397 is not set 498# CONFIG_SENSORS_SMSC47B397 is not set
550# CONFIG_SENSORS_VT1211 is not set 499# CONFIG_SENSORS_VT1211 is not set
551# CONFIG_SENSORS_W83627HF is not set 500# CONFIG_SENSORS_W83627HF is not set
501# CONFIG_SENSORS_W83627EHF is not set
552# CONFIG_HWMON_DEBUG_CHIP is not set 502# CONFIG_HWMON_DEBUG_CHIP is not set
553 503
554# 504#
@@ -573,6 +523,7 @@ CONFIG_DAB=y
573# 523#
574# CONFIG_DISPLAY_SUPPORT is not set 524# CONFIG_DISPLAY_SUPPORT is not set
575# CONFIG_VGASTATE is not set 525# CONFIG_VGASTATE is not set
526CONFIG_VIDEO_OUTPUT_CONTROL=y
576# CONFIG_FB is not set 527# CONFIG_FB is not set
577# CONFIG_FB_IBM_GXT4500 is not set 528# CONFIG_FB_IBM_GXT4500 is not set
578 529
@@ -580,16 +531,10 @@ CONFIG_DAB=y
580# Sound 531# Sound
581# 532#
582# CONFIG_SOUND is not set 533# CONFIG_SOUND is not set
583 534CONFIG_HID_SUPPORT=y
584#
585# HID Devices
586#
587CONFIG_HID=y 535CONFIG_HID=y
588# CONFIG_HID_DEBUG is not set 536# CONFIG_HID_DEBUG is not set
589 537CONFIG_USB_SUPPORT=y
590#
591# USB support
592#
593# CONFIG_USB_ARCH_HAS_HCD is not set 538# CONFIG_USB_ARCH_HAS_HCD is not set
594# CONFIG_USB_ARCH_HAS_OHCI is not set 539# CONFIG_USB_ARCH_HAS_OHCI is not set
595# CONFIG_USB_ARCH_HAS_EHCI is not set 540# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -603,31 +548,8 @@ CONFIG_HID=y
603# 548#
604# CONFIG_USB_GADGET is not set 549# CONFIG_USB_GADGET is not set
605# CONFIG_MMC is not set 550# CONFIG_MMC is not set
606
607#
608# LED devices
609#
610# CONFIG_NEW_LEDS is not set 551# CONFIG_NEW_LEDS is not set
611 552# CONFIG_EDAC is not set
612#
613# LED drivers
614#
615
616#
617# LED Triggers
618#
619
620#
621# InfiniBand support
622#
623
624#
625# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
626#
627
628#
629# Real Time Clock
630#
631# CONFIG_RTC_CLASS is not set 553# CONFIG_RTC_CLASS is not set
632 554
633# 555#
@@ -644,6 +566,11 @@ CONFIG_HID=y
644# 566#
645 567
646# 568#
569# Userspace I/O
570#
571# CONFIG_UIO is not set
572
573#
647# File systems 574# File systems
648# 575#
649CONFIG_EXT2_FS=y 576CONFIG_EXT2_FS=y
@@ -740,7 +667,6 @@ CONFIG_SUNRPC=y
740# CONFIG_NCP_FS is not set 667# CONFIG_NCP_FS is not set
741# CONFIG_CODA_FS is not set 668# CONFIG_CODA_FS is not set
742# CONFIG_AFS_FS is not set 669# CONFIG_AFS_FS is not set
743# CONFIG_9P_FS is not set
744 670
745# 671#
746# Partition Types 672# Partition Types
@@ -783,6 +709,7 @@ CONFIG_CRC_CCITT=y
783# CONFIG_CRC16 is not set 709# CONFIG_CRC16 is not set
784# CONFIG_CRC_ITU_T is not set 710# CONFIG_CRC_ITU_T is not set
785CONFIG_CRC32=y 711CONFIG_CRC32=y
712# CONFIG_CRC7 is not set
786# CONFIG_LIBCRC32C is not set 713# CONFIG_LIBCRC32C is not set
787CONFIG_ZLIB_INFLATE=y 714CONFIG_ZLIB_INFLATE=y
788CONFIG_PLIST=y 715CONFIG_PLIST=y
@@ -805,7 +732,6 @@ CONFIG_ENABLE_MUST_CHECK=y
805# CONFIG_DEBUG_FS is not set 732# CONFIG_DEBUG_FS is not set
806# CONFIG_HEADERS_CHECK is not set 733# CONFIG_HEADERS_CHECK is not set
807# CONFIG_DEBUG_KERNEL is not set 734# CONFIG_DEBUG_KERNEL is not set
808# CONFIG_BOOTX_TEXT is not set
809# CONFIG_PPC_EARLY_DEBUG is not set 735# CONFIG_PPC_EARLY_DEBUG is not set
810 736
811# 737#
@@ -813,8 +739,4 @@ CONFIG_ENABLE_MUST_CHECK=y
813# 739#
814# CONFIG_KEYS is not set 740# CONFIG_KEYS is not set
815# CONFIG_SECURITY is not set 741# CONFIG_SECURITY is not set
816
817#
818# Cryptographic options
819#
820# CONFIG_CRYPTO is not set 742# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/mpc885_ads_defconfig b/arch/powerpc/configs/mpc885_ads_defconfig
index fc4f9b766a..d27e1f8c38 100644
--- a/arch/powerpc/configs/mpc885_ads_defconfig
+++ b/arch/powerpc/configs/mpc885_ads_defconfig
@@ -1,9 +1,22 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc7 3# Linux kernel version: 2.6.23-rc4
4# Sun Jul 1 23:57:01 2007 4# Tue Aug 28 21:24:45 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13CONFIG_PPC_8xx=y
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_8xx=y
18# CONFIG_PPC_MM_SLICES is not set
19CONFIG_NOT_COHERENT_CACHE=y
7CONFIG_PPC32=y 20CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 21CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 22CONFIG_MMU=y
@@ -14,56 +27,37 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 27CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 28CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 29CONFIG_GENERIC_FIND_NEXT_BIT=y
30# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 31CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 32CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 33CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 34CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 35CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 36CONFIG_PPC_OF=y
37CONFIG_OF=y
23# CONFIG_PPC_UDBG_16550 is not set 38# CONFIG_PPC_UDBG_16550 is not set
24# CONFIG_GENERIC_TBSYNC is not set 39# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 40CONFIG_AUDIT_ARCH=y
26# CONFIG_DEFAULT_UIMAGE is not set 41# CONFIG_DEFAULT_UIMAGE is not set
27
28#
29# Processor support
30#
31# CONFIG_CLASSIC32 is not set
32# CONFIG_PPC_82xx is not set
33# CONFIG_PPC_83xx is not set
34# CONFIG_PPC_85xx is not set
35# CONFIG_PPC_86xx is not set
36CONFIG_PPC_8xx=y
37# CONFIG_40x is not set
38# CONFIG_44x is not set
39# CONFIG_E200 is not set
40CONFIG_8xx=y
41# CONFIG_PPC_DCR_NATIVE is not set 42# CONFIG_PPC_DCR_NATIVE is not set
42# CONFIG_PPC_DCR_MMIO is not set 43# CONFIG_PPC_DCR_MMIO is not set
43# CONFIG_PPC_MM_SLICES is not set
44CONFIG_NOT_COHERENT_CACHE=y
45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 44CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
46 45
47# 46#
48# Code maturity level options 47# General setup
49# 48#
50CONFIG_EXPERIMENTAL=y 49CONFIG_EXPERIMENTAL=y
51CONFIG_BROKEN_ON_SMP=y 50CONFIG_BROKEN_ON_SMP=y
52CONFIG_INIT_ENV_ARG_LIMIT=32 51CONFIG_INIT_ENV_ARG_LIMIT=32
53
54#
55# General setup
56#
57CONFIG_LOCALVERSION="" 52CONFIG_LOCALVERSION=""
58CONFIG_LOCALVERSION_AUTO=y 53CONFIG_LOCALVERSION_AUTO=y
59# CONFIG_SWAP is not set 54# CONFIG_SWAP is not set
60CONFIG_SYSVIPC=y 55CONFIG_SYSVIPC=y
61# CONFIG_IPC_NS is not set
62CONFIG_SYSVIPC_SYSCTL=y 56CONFIG_SYSVIPC_SYSCTL=y
63# CONFIG_POSIX_MQUEUE is not set 57# CONFIG_POSIX_MQUEUE is not set
64# CONFIG_BSD_PROCESS_ACCT is not set 58# CONFIG_BSD_PROCESS_ACCT is not set
65# CONFIG_TASKSTATS is not set 59# CONFIG_TASKSTATS is not set
66# CONFIG_UTS_NS is not set 60# CONFIG_USER_NS is not set
67# CONFIG_AUDIT is not set 61# CONFIG_AUDIT is not set
68# CONFIG_IKCONFIG is not set 62# CONFIG_IKCONFIG is not set
69CONFIG_LOG_BUF_SHIFT=14 63CONFIG_LOG_BUF_SHIFT=14
@@ -95,19 +89,12 @@ CONFIG_SLAB=y
95CONFIG_RT_MUTEXES=y 89CONFIG_RT_MUTEXES=y
96# CONFIG_TINY_SHMEM is not set 90# CONFIG_TINY_SHMEM is not set
97CONFIG_BASE_SMALL=1 91CONFIG_BASE_SMALL=1
98
99#
100# Loadable module support
101#
102# CONFIG_MODULES is not set 92# CONFIG_MODULES is not set
103
104#
105# Block layer
106#
107CONFIG_BLOCK=y 93CONFIG_BLOCK=y
108# CONFIG_LBD is not set 94# CONFIG_LBD is not set
109# CONFIG_BLK_DEV_IO_TRACE is not set 95# CONFIG_BLK_DEV_IO_TRACE is not set
110# CONFIG_LSF is not set 96# CONFIG_LSF is not set
97# CONFIG_BLK_DEV_BSG is not set
111 98
112# 99#
113# IO Schedulers 100# IO Schedulers
@@ -166,6 +153,7 @@ CONFIG_NO_UCODE_PATCH=y
166# CONFIG_GENERIC_IOMAP is not set 153# CONFIG_GENERIC_IOMAP is not set
167# CONFIG_CPU_FREQ is not set 154# CONFIG_CPU_FREQ is not set
168# CONFIG_CPM2 is not set 155# CONFIG_CPM2 is not set
156# CONFIG_FSL_ULI1575 is not set
169 157
170# 158#
171# Kernel options 159# Kernel options
@@ -195,6 +183,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
195CONFIG_SPLIT_PTLOCK_CPUS=4 183CONFIG_SPLIT_PTLOCK_CPUS=4
196# CONFIG_RESOURCES_64BIT is not set 184# CONFIG_RESOURCES_64BIT is not set
197CONFIG_ZONE_DMA_FLAG=1 185CONFIG_ZONE_DMA_FLAG=1
186CONFIG_BOUNCE=y
187CONFIG_VIRT_TO_BUS=y
198# CONFIG_PROC_DEVICETREE is not set 188# CONFIG_PROC_DEVICETREE is not set
199# CONFIG_CMDLINE_BOOL is not set 189# CONFIG_CMDLINE_BOOL is not set
200# CONFIG_PM is not set 190# CONFIG_PM is not set
@@ -209,6 +199,7 @@ CONFIG_ZONE_DMA=y
209CONFIG_FSL_SOC=y 199CONFIG_FSL_SOC=y
210# CONFIG_PCI is not set 200# CONFIG_PCI is not set
211# CONFIG_PCI_DOMAINS is not set 201# CONFIG_PCI_DOMAINS is not set
202# CONFIG_PCI_SYSCALL is not set
212# CONFIG_PCI_QSPAN is not set 203# CONFIG_PCI_QSPAN is not set
213# CONFIG_ARCH_SUPPORTS_MSI is not set 204# CONFIG_ARCH_SUPPORTS_MSI is not set
214 205
@@ -317,6 +308,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
317# CONFIG_MAC80211 is not set 308# CONFIG_MAC80211 is not set
318# CONFIG_IEEE80211 is not set 309# CONFIG_IEEE80211 is not set
319# CONFIG_RFKILL is not set 310# CONFIG_RFKILL is not set
311# CONFIG_NET_9P is not set
320 312
321# 313#
322# Device Drivers 314# Device Drivers
@@ -328,26 +320,11 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
328CONFIG_STANDALONE=y 320CONFIG_STANDALONE=y
329CONFIG_PREVENT_FIRMWARE_BUILD=y 321CONFIG_PREVENT_FIRMWARE_BUILD=y
330# CONFIG_SYS_HYPERVISOR is not set 322# CONFIG_SYS_HYPERVISOR is not set
331
332#
333# Connector - unified userspace <-> kernelspace linker
334#
335# CONFIG_CONNECTOR is not set 323# CONFIG_CONNECTOR is not set
336# CONFIG_MTD is not set 324# CONFIG_MTD is not set
337 325CONFIG_OF_DEVICE=y
338#
339# Parallel port support
340#
341# CONFIG_PARPORT is not set 326# CONFIG_PARPORT is not set
342 327CONFIG_BLK_DEV=y
343#
344# Plug and Play support
345#
346# CONFIG_PNPACPI is not set
347
348#
349# Block devices
350#
351# CONFIG_BLK_DEV_FD is not set 328# CONFIG_BLK_DEV_FD is not set
352# CONFIG_BLK_DEV_COW_COMMON is not set 329# CONFIG_BLK_DEV_COW_COMMON is not set
353CONFIG_BLK_DEV_LOOP=y 330CONFIG_BLK_DEV_LOOP=y
@@ -356,11 +333,8 @@ CONFIG_BLK_DEV_LOOP=y
356# CONFIG_BLK_DEV_RAM is not set 333# CONFIG_BLK_DEV_RAM is not set
357# CONFIG_CDROM_PKTCDVD is not set 334# CONFIG_CDROM_PKTCDVD is not set
358# CONFIG_ATA_OVER_ETH is not set 335# CONFIG_ATA_OVER_ETH is not set
359 336CONFIG_MISC_DEVICES=y
360# 337# CONFIG_EEPROM_93CX6 is not set
361# Misc devices
362#
363# CONFIG_BLINK is not set
364# CONFIG_IDE is not set 338# CONFIG_IDE is not set
365 339
366# 340#
@@ -368,21 +342,16 @@ CONFIG_BLK_DEV_LOOP=y
368# 342#
369# CONFIG_RAID_ATTRS is not set 343# CONFIG_RAID_ATTRS is not set
370# CONFIG_SCSI is not set 344# CONFIG_SCSI is not set
345# CONFIG_SCSI_DMA is not set
371# CONFIG_SCSI_NETLINK is not set 346# CONFIG_SCSI_NETLINK is not set
372# CONFIG_ATA is not set 347# CONFIG_ATA is not set
373
374#
375# Multi-device support (RAID and LVM)
376#
377# CONFIG_MD is not set 348# CONFIG_MD is not set
378# CONFIG_MACINTOSH_DRIVERS is not set 349# CONFIG_MACINTOSH_DRIVERS is not set
379
380#
381# Network device support
382#
383CONFIG_NETDEVICES=y 350CONFIG_NETDEVICES=y
351# CONFIG_NETDEVICES_MULTIQUEUE is not set
384# CONFIG_DUMMY is not set 352# CONFIG_DUMMY is not set
385# CONFIG_BONDING is not set 353# CONFIG_BONDING is not set
354# CONFIG_MACVLAN is not set
386# CONFIG_EQUALIZER is not set 355# CONFIG_EQUALIZER is not set
387# CONFIG_TUN is not set 356# CONFIG_TUN is not set
388CONFIG_PHYLIB=y 357CONFIG_PHYLIB=y
@@ -398,16 +367,12 @@ CONFIG_DAVICOM_PHY=y
398# CONFIG_VITESSE_PHY is not set 367# CONFIG_VITESSE_PHY is not set
399# CONFIG_SMSC_PHY is not set 368# CONFIG_SMSC_PHY is not set
400# CONFIG_BROADCOM_PHY is not set 369# CONFIG_BROADCOM_PHY is not set
370# CONFIG_ICPLUS_PHY is not set
401CONFIG_FIXED_PHY=y 371CONFIG_FIXED_PHY=y
402CONFIG_FIXED_MII_10_FDX=y 372CONFIG_FIXED_MII_10_FDX=y
403# CONFIG_FIXED_MII_100_FDX is not set 373# CONFIG_FIXED_MII_100_FDX is not set
404
405#
406# Ethernet (10 or 100Mbit)
407#
408CONFIG_NET_ETHERNET=y 374CONFIG_NET_ETHERNET=y
409CONFIG_MII=y 375CONFIG_MII=y
410# CONFIG_FEC_8XX is not set
411CONFIG_FS_ENET=y 376CONFIG_FS_ENET=y
412CONFIG_FS_ENET_HAS_SCC=y 377CONFIG_FS_ENET_HAS_SCC=y
413CONFIG_FS_ENET_HAS_FEC=y 378CONFIG_FS_ENET_HAS_FEC=y
@@ -426,15 +391,7 @@ CONFIG_NETDEV_10000=y
426# CONFIG_NETCONSOLE is not set 391# CONFIG_NETCONSOLE is not set
427# CONFIG_NETPOLL is not set 392# CONFIG_NETPOLL is not set
428# CONFIG_NET_POLL_CONTROLLER is not set 393# CONFIG_NET_POLL_CONTROLLER is not set
429
430#
431# ISDN subsystem
432#
433# CONFIG_ISDN is not set 394# CONFIG_ISDN is not set
434
435#
436# Telephony Support
437#
438# CONFIG_PHONE is not set 395# CONFIG_PHONE is not set
439 396
440# 397#
@@ -518,10 +475,6 @@ CONFIG_SERIAL_CPM_SMC1=y
518CONFIG_SERIAL_CPM_SMC2=y 475CONFIG_SERIAL_CPM_SMC2=y
519CONFIG_UNIX98_PTYS=y 476CONFIG_UNIX98_PTYS=y
520# CONFIG_LEGACY_PTYS is not set 477# CONFIG_LEGACY_PTYS is not set
521
522#
523# IPMI
524#
525# CONFIG_IPMI_HANDLER is not set 478# CONFIG_IPMI_HANDLER is not set
526# CONFIG_WATCHDOG is not set 479# CONFIG_WATCHDOG is not set
527CONFIG_HW_RANDOM=y 480CONFIG_HW_RANDOM=y
@@ -530,10 +483,6 @@ CONFIG_GEN_RTC=y
530# CONFIG_GEN_RTC_X is not set 483# CONFIG_GEN_RTC_X is not set
531# CONFIG_R3964 is not set 484# CONFIG_R3964 is not set
532# CONFIG_RAW_DRIVER is not set 485# CONFIG_RAW_DRIVER is not set
533
534#
535# TPM devices
536#
537# CONFIG_TCG_TPM is not set 486# CONFIG_TCG_TPM is not set
538# CONFIG_I2C is not set 487# CONFIG_I2C is not set
539 488
@@ -542,20 +491,21 @@ CONFIG_GEN_RTC=y
542# 491#
543# CONFIG_SPI is not set 492# CONFIG_SPI is not set
544# CONFIG_SPI_MASTER is not set 493# CONFIG_SPI_MASTER is not set
545
546#
547# Dallas's 1-wire bus
548#
549# CONFIG_W1 is not set 494# CONFIG_W1 is not set
495# CONFIG_POWER_SUPPLY is not set
550CONFIG_HWMON=y 496CONFIG_HWMON=y
551# CONFIG_HWMON_VID is not set 497# CONFIG_HWMON_VID is not set
552# CONFIG_SENSORS_ABITUGURU is not set 498# CONFIG_SENSORS_ABITUGURU is not set
499# CONFIG_SENSORS_ABITUGURU3 is not set
553# CONFIG_SENSORS_F71805F is not set 500# CONFIG_SENSORS_F71805F is not set
501# CONFIG_SENSORS_IT87 is not set
502# CONFIG_SENSORS_PC87360 is not set
554# CONFIG_SENSORS_PC87427 is not set 503# CONFIG_SENSORS_PC87427 is not set
555# CONFIG_SENSORS_SMSC47M1 is not set 504# CONFIG_SENSORS_SMSC47M1 is not set
556# CONFIG_SENSORS_SMSC47B397 is not set 505# CONFIG_SENSORS_SMSC47B397 is not set
557# CONFIG_SENSORS_VT1211 is not set 506# CONFIG_SENSORS_VT1211 is not set
558# CONFIG_SENSORS_W83627HF is not set 507# CONFIG_SENSORS_W83627HF is not set
508# CONFIG_SENSORS_W83627EHF is not set
559# CONFIG_HWMON_DEBUG_CHIP is not set 509# CONFIG_HWMON_DEBUG_CHIP is not set
560 510
561# 511#
@@ -580,6 +530,7 @@ CONFIG_DAB=y
580# 530#
581# CONFIG_DISPLAY_SUPPORT is not set 531# CONFIG_DISPLAY_SUPPORT is not set
582# CONFIG_VGASTATE is not set 532# CONFIG_VGASTATE is not set
533CONFIG_VIDEO_OUTPUT_CONTROL=y
583# CONFIG_FB is not set 534# CONFIG_FB is not set
584# CONFIG_FB_IBM_GXT4500 is not set 535# CONFIG_FB_IBM_GXT4500 is not set
585 536
@@ -587,16 +538,10 @@ CONFIG_DAB=y
587# Sound 538# Sound
588# 539#
589# CONFIG_SOUND is not set 540# CONFIG_SOUND is not set
590 541CONFIG_HID_SUPPORT=y
591#
592# HID Devices
593#
594CONFIG_HID=y 542CONFIG_HID=y
595# CONFIG_HID_DEBUG is not set 543# CONFIG_HID_DEBUG is not set
596 544CONFIG_USB_SUPPORT=y
597#
598# USB support
599#
600# CONFIG_USB_ARCH_HAS_HCD is not set 545# CONFIG_USB_ARCH_HAS_HCD is not set
601# CONFIG_USB_ARCH_HAS_OHCI is not set 546# CONFIG_USB_ARCH_HAS_OHCI is not set
602# CONFIG_USB_ARCH_HAS_EHCI is not set 547# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -610,31 +555,8 @@ CONFIG_HID=y
610# 555#
611# CONFIG_USB_GADGET is not set 556# CONFIG_USB_GADGET is not set
612# CONFIG_MMC is not set 557# CONFIG_MMC is not set
613
614#
615# LED devices
616#
617# CONFIG_NEW_LEDS is not set 558# CONFIG_NEW_LEDS is not set
618 559# CONFIG_EDAC is not set
619#
620# LED drivers
621#
622
623#
624# LED Triggers
625#
626
627#
628# InfiniBand support
629#
630
631#
632# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
633#
634
635#
636# Real Time Clock
637#
638# CONFIG_RTC_CLASS is not set 560# CONFIG_RTC_CLASS is not set
639 561
640# 562#
@@ -651,6 +573,11 @@ CONFIG_HID=y
651# 573#
652 574
653# 575#
576# Userspace I/O
577#
578# CONFIG_UIO is not set
579
580#
654# File systems 581# File systems
655# 582#
656CONFIG_EXT2_FS=y 583CONFIG_EXT2_FS=y
@@ -747,7 +674,6 @@ CONFIG_SUNRPC=y
747# CONFIG_NCP_FS is not set 674# CONFIG_NCP_FS is not set
748# CONFIG_CODA_FS is not set 675# CONFIG_CODA_FS is not set
749# CONFIG_AFS_FS is not set 676# CONFIG_AFS_FS is not set
750# CONFIG_9P_FS is not set
751 677
752# 678#
753# Partition Types 679# Partition Types
@@ -790,6 +716,7 @@ CONFIG_CRC_CCITT=y
790# CONFIG_CRC16 is not set 716# CONFIG_CRC16 is not set
791# CONFIG_CRC_ITU_T is not set 717# CONFIG_CRC_ITU_T is not set
792CONFIG_CRC32=y 718CONFIG_CRC32=y
719# CONFIG_CRC7 is not set
793# CONFIG_LIBCRC32C is not set 720# CONFIG_LIBCRC32C is not set
794CONFIG_ZLIB_INFLATE=y 721CONFIG_ZLIB_INFLATE=y
795CONFIG_PLIST=y 722CONFIG_PLIST=y
@@ -812,7 +739,6 @@ CONFIG_ENABLE_MUST_CHECK=y
812# CONFIG_DEBUG_FS is not set 739# CONFIG_DEBUG_FS is not set
813# CONFIG_HEADERS_CHECK is not set 740# CONFIG_HEADERS_CHECK is not set
814# CONFIG_DEBUG_KERNEL is not set 741# CONFIG_DEBUG_KERNEL is not set
815# CONFIG_BOOTX_TEXT is not set
816# CONFIG_PPC_EARLY_DEBUG is not set 742# CONFIG_PPC_EARLY_DEBUG is not set
817 743
818# 744#
@@ -820,8 +746,4 @@ CONFIG_ENABLE_MUST_CHECK=y
820# 746#
821# CONFIG_KEYS is not set 747# CONFIG_KEYS is not set
822# CONFIG_SECURITY is not set 748# CONFIG_SECURITY is not set
823
824#
825# Cryptographic options
826#
827# CONFIG_CRYPTO is not set 749# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
index 905998b925..295207030c 100644
--- a/arch/powerpc/configs/pasemi_defconfig
+++ b/arch/powerpc/configs/pasemi_defconfig
@@ -1,9 +1,22 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 13:51:39 2007 4# Thu Aug 30 16:40:47 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7
8#
9# Processor support
10#
11CONFIG_POWER4_ONLY=y
12CONFIG_POWER4=y
13CONFIG_PPC_FPU=y
14CONFIG_ALTIVEC=y
15CONFIG_PPC_STD_MMU=y
16CONFIG_PPC_MM_SLICES=y
17# CONFIG_VIRT_CPU_ACCOUNTING is not set
18CONFIG_SMP=y
19CONFIG_NR_CPUS=2
7CONFIG_64BIT=y 20CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y 21CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 22CONFIG_MMU=y
@@ -15,6 +28,7 @@ CONFIG_ARCH_HAS_ILOG2_U64=y
15CONFIG_GENERIC_HWEIGHT=y 28CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y 29CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y 30CONFIG_GENERIC_FIND_NEXT_BIT=y
31CONFIG_ARCH_NO_VIRT_TO_BUS=y
18CONFIG_PPC=y 32CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y 33CONFIG_EARLY_PRINTK=y
20CONFIG_COMPAT=y 34CONFIG_COMPAT=y
@@ -22,49 +36,32 @@ CONFIG_SYSVIPC_COMPAT=y
22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 36CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_ARCH_MAY_HAVE_PC_FDC=y 37CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24CONFIG_PPC_OF=y 38CONFIG_PPC_OF=y
39CONFIG_OF=y
25CONFIG_PPC_UDBG_16550=y 40CONFIG_PPC_UDBG_16550=y
26# CONFIG_GENERIC_TBSYNC is not set 41# CONFIG_GENERIC_TBSYNC is not set
27CONFIG_AUDIT_ARCH=y 42CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y 43CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set 44# CONFIG_DEFAULT_UIMAGE is not set
30
31#
32# Processor support
33#
34CONFIG_POWER4_ONLY=y
35CONFIG_POWER4=y
36CONFIG_PPC_FPU=y
37# CONFIG_PPC_DCR_NATIVE is not set 45# CONFIG_PPC_DCR_NATIVE is not set
38# CONFIG_PPC_DCR_MMIO is not set 46# CONFIG_PPC_DCR_MMIO is not set
39# CONFIG_PPC_OF_PLATFORM_PCI is not set 47# CONFIG_PPC_OF_PLATFORM_PCI is not set
40CONFIG_ALTIVEC=y
41CONFIG_PPC_STD_MMU=y
42CONFIG_PPC_MM_SLICES=y
43# CONFIG_VIRT_CPU_ACCOUNTING is not set
44CONFIG_SMP=y
45CONFIG_NR_CPUS=2
46CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
47 49
48# 50#
49# Code maturity level options 51# General setup
50# 52#
51CONFIG_EXPERIMENTAL=y 53CONFIG_EXPERIMENTAL=y
52CONFIG_LOCK_KERNEL=y 54CONFIG_LOCK_KERNEL=y
53CONFIG_INIT_ENV_ARG_LIMIT=32 55CONFIG_INIT_ENV_ARG_LIMIT=32
54
55#
56# General setup
57#
58CONFIG_LOCALVERSION="" 56CONFIG_LOCALVERSION=""
59CONFIG_LOCALVERSION_AUTO=y 57CONFIG_LOCALVERSION_AUTO=y
60CONFIG_SWAP=y 58CONFIG_SWAP=y
61CONFIG_SYSVIPC=y 59CONFIG_SYSVIPC=y
62# CONFIG_IPC_NS is not set
63CONFIG_SYSVIPC_SYSCTL=y 60CONFIG_SYSVIPC_SYSCTL=y
64# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
65# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
66# CONFIG_TASKSTATS is not set 63# CONFIG_TASKSTATS is not set
67# CONFIG_UTS_NS is not set 64# CONFIG_USER_NS is not set
68# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
69# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
70CONFIG_LOG_BUF_SHIFT=17 67CONFIG_LOG_BUF_SHIFT=17
@@ -99,10 +96,6 @@ CONFIG_SLAB=y
99CONFIG_RT_MUTEXES=y 96CONFIG_RT_MUTEXES=y
100# CONFIG_TINY_SHMEM is not set 97# CONFIG_TINY_SHMEM is not set
101CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
102
103#
104# Loadable module support
105#
106CONFIG_MODULES=y 99CONFIG_MODULES=y
107CONFIG_MODULE_UNLOAD=y 100CONFIG_MODULE_UNLOAD=y
108# CONFIG_MODULE_FORCE_UNLOAD is not set 101# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -110,12 +103,9 @@ CONFIG_MODULE_UNLOAD=y
110# CONFIG_MODULE_SRCVERSION_ALL is not set 103# CONFIG_MODULE_SRCVERSION_ALL is not set
111# CONFIG_KMOD is not set 104# CONFIG_KMOD is not set
112CONFIG_STOP_MACHINE=y 105CONFIG_STOP_MACHINE=y
113
114#
115# Block layer
116#
117CONFIG_BLOCK=y 106CONFIG_BLOCK=y
118# CONFIG_BLK_DEV_IO_TRACE is not set 107# CONFIG_BLK_DEV_IO_TRACE is not set
108# CONFIG_BLK_DEV_BSG is not set
119 109
120# 110#
121# IO Schedulers 111# IO Schedulers
@@ -135,7 +125,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
135# 125#
136CONFIG_PPC_MULTIPLATFORM=y 126CONFIG_PPC_MULTIPLATFORM=y
137# CONFIG_EMBEDDED6xx is not set 127# CONFIG_EMBEDDED6xx is not set
138# CONFIG_APUS is not set 128# CONFIG_PPC_82xx is not set
129# CONFIG_PPC_83xx is not set
130# CONFIG_PPC_86xx is not set
139# CONFIG_PPC_PSERIES is not set 131# CONFIG_PPC_PSERIES is not set
140# CONFIG_PPC_ISERIES is not set 132# CONFIG_PPC_ISERIES is not set
141# CONFIG_PPC_MPC52xx is not set 133# CONFIG_PPC_MPC52xx is not set
@@ -149,6 +141,7 @@ CONFIG_PPC_PASEMI=y
149# 141#
150CONFIG_PPC_PASEMI_IOMMU=y 142CONFIG_PPC_PASEMI_IOMMU=y
151CONFIG_PPC_PASEMI_MDIO=y 143CONFIG_PPC_PASEMI_MDIO=y
144CONFIG_ELECTRA_IDE=y
152# CONFIG_PPC_CELLEB is not set 145# CONFIG_PPC_CELLEB is not set
153# CONFIG_PPC_PS3 is not set 146# CONFIG_PPC_PS3 is not set
154# CONFIG_PPC_CELL is not set 147# CONFIG_PPC_CELL is not set
@@ -168,6 +161,7 @@ CONFIG_MPIC=y
168# CONFIG_GENERIC_IOMAP is not set 161# CONFIG_GENERIC_IOMAP is not set
169# CONFIG_CPU_FREQ is not set 162# CONFIG_CPU_FREQ is not set
170# CONFIG_CPM2 is not set 163# CONFIG_CPM2 is not set
164# CONFIG_FSL_ULI1575 is not set
171 165
172# 166#
173# Kernel options 167# Kernel options
@@ -204,6 +198,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
204CONFIG_SPLIT_PTLOCK_CPUS=4 198CONFIG_SPLIT_PTLOCK_CPUS=4
205CONFIG_RESOURCES_64BIT=y 199CONFIG_RESOURCES_64BIT=y
206CONFIG_ZONE_DMA_FLAG=1 200CONFIG_ZONE_DMA_FLAG=1
201CONFIG_BOUNCE=y
207# CONFIG_PPC_HAS_HASH_64K is not set 202# CONFIG_PPC_HAS_HASH_64K is not set
208# CONFIG_PPC_64K_PAGES is not set 203# CONFIG_PPC_64K_PAGES is not set
209# CONFIG_SCHED_SMT is not set 204# CONFIG_SCHED_SMT is not set
@@ -222,6 +217,7 @@ CONFIG_GENERIC_ISA_DMA=y
222# CONFIG_PPC_INDIRECT_PCI is not set 217# CONFIG_PPC_INDIRECT_PCI is not set
223CONFIG_PCI=y 218CONFIG_PCI=y
224CONFIG_PCI_DOMAINS=y 219CONFIG_PCI_DOMAINS=y
220CONFIG_PCI_SYSCALL=y
225# CONFIG_PCIEPORTBUS is not set 221# CONFIG_PCIEPORTBUS is not set
226CONFIG_ARCH_SUPPORTS_MSI=y 222CONFIG_ARCH_SUPPORTS_MSI=y
227# CONFIG_PCI_MSI is not set 223# CONFIG_PCI_MSI is not set
@@ -332,6 +328,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
332# CONFIG_MAC80211 is not set 328# CONFIG_MAC80211 is not set
333# CONFIG_IEEE80211 is not set 329# CONFIG_IEEE80211 is not set
334# CONFIG_RFKILL is not set 330# CONFIG_RFKILL is not set
331# CONFIG_NET_9P is not set
335 332
336# 333#
337# Device Drivers 334# Device Drivers
@@ -346,10 +343,6 @@ CONFIG_FW_LOADER=y
346# CONFIG_DEBUG_DRIVER is not set 343# CONFIG_DEBUG_DRIVER is not set
347# CONFIG_DEBUG_DEVRES is not set 344# CONFIG_DEBUG_DEVRES is not set
348# CONFIG_SYS_HYPERVISOR is not set 345# CONFIG_SYS_HYPERVISOR is not set
349
350#
351# Connector - unified userspace <-> kernelspace linker
352#
353# CONFIG_CONNECTOR is not set 346# CONFIG_CONNECTOR is not set
354CONFIG_MTD=y 347CONFIG_MTD=y
355# CONFIG_MTD_DEBUG is not set 348# CONFIG_MTD_DEBUG is not set
@@ -415,22 +408,10 @@ CONFIG_MTD_PHRAM=y
415# UBI - Unsorted block images 408# UBI - Unsorted block images
416# 409#
417# CONFIG_MTD_UBI is not set 410# CONFIG_MTD_UBI is not set
418 411CONFIG_OF_DEVICE=y
419#
420# Parallel port support
421#
422# CONFIG_PARPORT is not set 412# CONFIG_PARPORT is not set
423 413CONFIG_BLK_DEV=y
424#
425# Plug and Play support
426#
427# CONFIG_PNPACPI is not set
428
429#
430# Block devices
431#
432# CONFIG_BLK_DEV_FD is not set 414# CONFIG_BLK_DEV_FD is not set
433# CONFIG_BLK_CPQ_DA is not set
434# CONFIG_BLK_CPQ_CISS_DA is not set 415# CONFIG_BLK_CPQ_CISS_DA is not set
435# CONFIG_BLK_DEV_DAC960 is not set 416# CONFIG_BLK_DEV_DAC960 is not set
436# CONFIG_BLK_DEV_UMEM is not set 417# CONFIG_BLK_DEV_UMEM is not set
@@ -446,14 +427,11 @@ CONFIG_BLK_DEV_RAM_SIZE=16384
446CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 427CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
447# CONFIG_CDROM_PKTCDVD is not set 428# CONFIG_CDROM_PKTCDVD is not set
448# CONFIG_ATA_OVER_ETH is not set 429# CONFIG_ATA_OVER_ETH is not set
449 430CONFIG_MISC_DEVICES=y
450#
451# Misc devices
452#
453# CONFIG_PHANTOM is not set 431# CONFIG_PHANTOM is not set
432# CONFIG_EEPROM_93CX6 is not set
454# CONFIG_SGI_IOC4 is not set 433# CONFIG_SGI_IOC4 is not set
455# CONFIG_TIFM_CORE is not set 434# CONFIG_TIFM_CORE is not set
456# CONFIG_BLINK is not set
457CONFIG_IDE=y 435CONFIG_IDE=y
458CONFIG_BLK_DEV_IDE=y 436CONFIG_BLK_DEV_IDE=y
459 437
@@ -487,6 +465,7 @@ CONFIG_IDE_PROC_FS=y
487# 465#
488# CONFIG_RAID_ATTRS is not set 466# CONFIG_RAID_ATTRS is not set
489CONFIG_SCSI=y 467CONFIG_SCSI=y
468CONFIG_SCSI_DMA=y
490# CONFIG_SCSI_TGT is not set 469# CONFIG_SCSI_TGT is not set
491# CONFIG_SCSI_NETLINK is not set 470# CONFIG_SCSI_NETLINK is not set
492CONFIG_SCSI_PROC_FS=y 471CONFIG_SCSI_PROC_FS=y
@@ -517,12 +496,8 @@ CONFIG_SCSI_WAIT_SCAN=m
517# CONFIG_SCSI_SPI_ATTRS is not set 496# CONFIG_SCSI_SPI_ATTRS is not set
518# CONFIG_SCSI_FC_ATTRS is not set 497# CONFIG_SCSI_FC_ATTRS is not set
519# CONFIG_SCSI_ISCSI_ATTRS is not set 498# CONFIG_SCSI_ISCSI_ATTRS is not set
520# CONFIG_SCSI_SAS_ATTRS is not set
521# CONFIG_SCSI_SAS_LIBSAS is not set 499# CONFIG_SCSI_SAS_LIBSAS is not set
522 500CONFIG_SCSI_LOWLEVEL=y
523#
524# SCSI low-level drivers
525#
526# CONFIG_ISCSI_TCP is not set 501# CONFIG_ISCSI_TCP is not set
527CONFIG_BLK_DEV_3W_XXXX_RAID=y 502CONFIG_BLK_DEV_3W_XXXX_RAID=y
528CONFIG_SCSI_3W_9XXX=y 503CONFIG_SCSI_3W_9XXX=y
@@ -537,7 +512,6 @@ CONFIG_SCSI_3W_9XXX=y
537# CONFIG_MEGARAID_LEGACY is not set 512# CONFIG_MEGARAID_LEGACY is not set
538# CONFIG_MEGARAID_SAS is not set 513# CONFIG_MEGARAID_SAS is not set
539# CONFIG_SCSI_HPTIOP is not set 514# CONFIG_SCSI_HPTIOP is not set
540# CONFIG_SCSI_BUSLOGIC is not set
541# CONFIG_SCSI_DMX3191D is not set 515# CONFIG_SCSI_DMX3191D is not set
542# CONFIG_SCSI_EATA is not set 516# CONFIG_SCSI_EATA is not set
543# CONFIG_SCSI_FUTURE_DOMAIN is not set 517# CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -556,13 +530,7 @@ CONFIG_SCSI_3W_9XXX=y
556# CONFIG_SCSI_DC390T is not set 530# CONFIG_SCSI_DC390T is not set
557# CONFIG_SCSI_DEBUG is not set 531# CONFIG_SCSI_DEBUG is not set
558# CONFIG_SCSI_SRP is not set 532# CONFIG_SCSI_SRP is not set
559 533# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
560#
561# PCMCIA SCSI adapter support
562#
563# CONFIG_PCMCIA_FDOMAIN is not set
564# CONFIG_PCMCIA_QLOGIC is not set
565# CONFIG_PCMCIA_SYM53C500 is not set
566CONFIG_ATA=y 534CONFIG_ATA=y
567# CONFIG_ATA_NONSTANDARD is not set 535# CONFIG_ATA_NONSTANDARD is not set
568# CONFIG_SATA_AHCI is not set 536# CONFIG_SATA_AHCI is not set
@@ -618,10 +586,7 @@ CONFIG_ATA_GENERIC=y
618# CONFIG_PATA_SIS is not set 586# CONFIG_PATA_SIS is not set
619# CONFIG_PATA_VIA is not set 587# CONFIG_PATA_VIA is not set
620# CONFIG_PATA_WINBOND is not set 588# CONFIG_PATA_WINBOND is not set
621 589CONFIG_PATA_PLATFORM=y
622#
623# Multi-device support (RAID and LVM)
624#
625# CONFIG_MD is not set 590# CONFIG_MD is not set
626 591
627# 592#
@@ -658,19 +623,13 @@ CONFIG_IEEE1394_SBP2=y
658# CONFIG_IEEE1394_ETH1394 is not set 623# CONFIG_IEEE1394_ETH1394 is not set
659# CONFIG_IEEE1394_DV1394 is not set 624# CONFIG_IEEE1394_DV1394 is not set
660CONFIG_IEEE1394_RAWIO=y 625CONFIG_IEEE1394_RAWIO=y
661
662#
663# I2O device support
664#
665# CONFIG_I2O is not set 626# CONFIG_I2O is not set
666# CONFIG_MACINTOSH_DRIVERS is not set 627# CONFIG_MACINTOSH_DRIVERS is not set
667
668#
669# Network device support
670#
671CONFIG_NETDEVICES=y 628CONFIG_NETDEVICES=y
629# CONFIG_NETDEVICES_MULTIQUEUE is not set
672CONFIG_DUMMY=y 630CONFIG_DUMMY=y
673# CONFIG_BONDING is not set 631# CONFIG_BONDING is not set
632# CONFIG_MACVLAN is not set
674# CONFIG_EQUALIZER is not set 633# CONFIG_EQUALIZER is not set
675# CONFIG_TUN is not set 634# CONFIG_TUN is not set
676# CONFIG_ARCNET is not set 635# CONFIG_ARCNET is not set
@@ -687,21 +646,14 @@ CONFIG_MARVELL_PHY=y
687# CONFIG_VITESSE_PHY is not set 646# CONFIG_VITESSE_PHY is not set
688# CONFIG_SMSC_PHY is not set 647# CONFIG_SMSC_PHY is not set
689# CONFIG_BROADCOM_PHY is not set 648# CONFIG_BROADCOM_PHY is not set
649# CONFIG_ICPLUS_PHY is not set
690# CONFIG_FIXED_PHY is not set 650# CONFIG_FIXED_PHY is not set
691
692#
693# Ethernet (10 or 100Mbit)
694#
695CONFIG_NET_ETHERNET=y 651CONFIG_NET_ETHERNET=y
696CONFIG_MII=y 652CONFIG_MII=y
697# CONFIG_HAPPYMEAL is not set 653# CONFIG_HAPPYMEAL is not set
698# CONFIG_SUNGEM is not set 654# CONFIG_SUNGEM is not set
699# CONFIG_CASSINI is not set 655# CONFIG_CASSINI is not set
700# CONFIG_NET_VENDOR_3COM is not set 656# CONFIG_NET_VENDOR_3COM is not set
701
702#
703# Tulip family network device support
704#
705# CONFIG_NET_TULIP is not set 657# CONFIG_NET_TULIP is not set
706# CONFIG_HP100 is not set 658# CONFIG_HP100 is not set
707CONFIG_NET_PCI=y 659CONFIG_NET_PCI=y
@@ -736,7 +688,6 @@ CONFIG_E1000_NAPI=y
736# CONFIG_SIS190 is not set 688# CONFIG_SIS190 is not set
737# CONFIG_SKGE is not set 689# CONFIG_SKGE is not set
738# CONFIG_SKY2 is not set 690# CONFIG_SKY2 is not set
739# CONFIG_SK98LIN is not set
740# CONFIG_VIA_VELOCITY is not set 691# CONFIG_VIA_VELOCITY is not set
741CONFIG_TIGON3=y 692CONFIG_TIGON3=y
742# CONFIG_BNX2 is not set 693# CONFIG_BNX2 is not set
@@ -779,15 +730,7 @@ CONFIG_PASEMI_MAC=y
779# CONFIG_NETCONSOLE is not set 730# CONFIG_NETCONSOLE is not set
780# CONFIG_NETPOLL is not set 731# CONFIG_NETPOLL is not set
781# CONFIG_NET_POLL_CONTROLLER is not set 732# CONFIG_NET_POLL_CONTROLLER is not set
782
783#
784# ISDN subsystem
785#
786# CONFIG_ISDN is not set 733# CONFIG_ISDN is not set
787
788#
789# Telephony Support
790#
791# CONFIG_PHONE is not set 734# CONFIG_PHONE is not set
792 735
793# 736#
@@ -865,10 +808,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
865CONFIG_UNIX98_PTYS=y 808CONFIG_UNIX98_PTYS=y
866CONFIG_LEGACY_PTYS=y 809CONFIG_LEGACY_PTYS=y
867CONFIG_LEGACY_PTY_COUNT=4 810CONFIG_LEGACY_PTY_COUNT=4
868
869#
870# IPMI
871#
872# CONFIG_IPMI_HANDLER is not set 811# CONFIG_IPMI_HANDLER is not set
873# CONFIG_WATCHDOG is not set 812# CONFIG_WATCHDOG is not set
874CONFIG_HW_RANDOM=y 813CONFIG_HW_RANDOM=y
@@ -889,10 +828,6 @@ CONFIG_GEN_RTC_X=y
889CONFIG_RAW_DRIVER=y 828CONFIG_RAW_DRIVER=y
890CONFIG_MAX_RAW_DEVS=256 829CONFIG_MAX_RAW_DEVS=256
891# CONFIG_HANGCHECK_TIMER is not set 830# CONFIG_HANGCHECK_TIMER is not set
892
893#
894# TPM devices
895#
896# CONFIG_TCG_TPM is not set 831# CONFIG_TCG_TPM is not set
897CONFIG_DEVPORT=y 832CONFIG_DEVPORT=y
898CONFIG_I2C=y 833CONFIG_I2C=y
@@ -927,6 +862,7 @@ CONFIG_I2C_PASEMI=y
927# CONFIG_I2C_SIS5595 is not set 862# CONFIG_I2C_SIS5595 is not set
928# CONFIG_I2C_SIS630 is not set 863# CONFIG_I2C_SIS630 is not set
929# CONFIG_I2C_SIS96X is not set 864# CONFIG_I2C_SIS96X is not set
865# CONFIG_I2C_TAOS_EVM is not set
930# CONFIG_I2C_STUB is not set 866# CONFIG_I2C_STUB is not set
931# CONFIG_I2C_TINY_USB is not set 867# CONFIG_I2C_TINY_USB is not set
932# CONFIG_I2C_VIA is not set 868# CONFIG_I2C_VIA is not set
@@ -938,11 +874,13 @@ CONFIG_I2C_PASEMI=y
938# 874#
939# CONFIG_SENSORS_DS1337 is not set 875# CONFIG_SENSORS_DS1337 is not set
940# CONFIG_SENSORS_DS1374 is not set 876# CONFIG_SENSORS_DS1374 is not set
877# CONFIG_DS1682 is not set
941CONFIG_SENSORS_EEPROM=y 878CONFIG_SENSORS_EEPROM=y
942# CONFIG_SENSORS_PCF8574 is not set 879# CONFIG_SENSORS_PCF8574 is not set
943# CONFIG_SENSORS_PCA9539 is not set 880# CONFIG_SENSORS_PCA9539 is not set
944# CONFIG_SENSORS_PCF8591 is not set 881# CONFIG_SENSORS_PCF8591 is not set
945# CONFIG_SENSORS_MAX6875 is not set 882# CONFIG_SENSORS_MAX6875 is not set
883# CONFIG_SENSORS_TSL2550 is not set
946# CONFIG_I2C_DEBUG_CORE is not set 884# CONFIG_I2C_DEBUG_CORE is not set
947# CONFIG_I2C_DEBUG_ALGO is not set 885# CONFIG_I2C_DEBUG_ALGO is not set
948# CONFIG_I2C_DEBUG_BUS is not set 886# CONFIG_I2C_DEBUG_BUS is not set
@@ -953,14 +891,12 @@ CONFIG_SENSORS_EEPROM=y
953# 891#
954# CONFIG_SPI is not set 892# CONFIG_SPI is not set
955# CONFIG_SPI_MASTER is not set 893# CONFIG_SPI_MASTER is not set
956
957#
958# Dallas's 1-wire bus
959#
960# CONFIG_W1 is not set 894# CONFIG_W1 is not set
895# CONFIG_POWER_SUPPLY is not set
961CONFIG_HWMON=y 896CONFIG_HWMON=y
962CONFIG_HWMON_VID=y 897CONFIG_HWMON_VID=y
963# CONFIG_SENSORS_ABITUGURU is not set 898# CONFIG_SENSORS_ABITUGURU is not set
899# CONFIG_SENSORS_ABITUGURU3 is not set
964# CONFIG_SENSORS_AD7418 is not set 900# CONFIG_SENSORS_AD7418 is not set
965# CONFIG_SENSORS_ADM1021 is not set 901# CONFIG_SENSORS_ADM1021 is not set
966# CONFIG_SENSORS_ADM1025 is not set 902# CONFIG_SENSORS_ADM1025 is not set
@@ -987,14 +923,17 @@ CONFIG_SENSORS_LM85=y
987# CONFIG_SENSORS_LM87 is not set 923# CONFIG_SENSORS_LM87 is not set
988CONFIG_SENSORS_LM90=y 924CONFIG_SENSORS_LM90=y
989# CONFIG_SENSORS_LM92 is not set 925# CONFIG_SENSORS_LM92 is not set
926# CONFIG_SENSORS_LM93 is not set
990# CONFIG_SENSORS_MAX1619 is not set 927# CONFIG_SENSORS_MAX1619 is not set
991# CONFIG_SENSORS_MAX6650 is not set 928# CONFIG_SENSORS_MAX6650 is not set
992# CONFIG_SENSORS_PC87360 is not set 929# CONFIG_SENSORS_PC87360 is not set
993# CONFIG_SENSORS_PC87427 is not set 930# CONFIG_SENSORS_PC87427 is not set
994# CONFIG_SENSORS_SIS5595 is not set 931# CONFIG_SENSORS_SIS5595 is not set
932# CONFIG_SENSORS_DME1737 is not set
995# CONFIG_SENSORS_SMSC47M1 is not set 933# CONFIG_SENSORS_SMSC47M1 is not set
996# CONFIG_SENSORS_SMSC47M192 is not set 934# CONFIG_SENSORS_SMSC47M192 is not set
997# CONFIG_SENSORS_SMSC47B397 is not set 935# CONFIG_SENSORS_SMSC47B397 is not set
936# CONFIG_SENSORS_THMC50 is not set
998# CONFIG_SENSORS_VIA686A is not set 937# CONFIG_SENSORS_VIA686A is not set
999# CONFIG_SENSORS_VT1211 is not set 938# CONFIG_SENSORS_VT1211 is not set
1000# CONFIG_SENSORS_VT8231 is not set 939# CONFIG_SENSORS_VT8231 is not set
@@ -1024,14 +963,15 @@ CONFIG_DAB=y
1024# Graphics support 963# Graphics support
1025# 964#
1026CONFIG_BACKLIGHT_LCD_SUPPORT=y 965CONFIG_BACKLIGHT_LCD_SUPPORT=y
1027CONFIG_BACKLIGHT_CLASS_DEVICE=y
1028CONFIG_LCD_CLASS_DEVICE=m 966CONFIG_LCD_CLASS_DEVICE=m
967CONFIG_BACKLIGHT_CLASS_DEVICE=y
1029 968
1030# 969#
1031# Display device support 970# Display device support
1032# 971#
1033# CONFIG_DISPLAY_SUPPORT is not set 972# CONFIG_DISPLAY_SUPPORT is not set
1034CONFIG_VGASTATE=y 973CONFIG_VGASTATE=y
974# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1035CONFIG_FB=y 975CONFIG_FB=y
1036CONFIG_FIRMWARE_EDID=y 976CONFIG_FIRMWARE_EDID=y
1037CONFIG_FB_DDC=y 977CONFIG_FB_DDC=y
@@ -1094,6 +1034,7 @@ CONFIG_VGACON_SOFT_SCROLLBACK=y
1094CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 1034CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
1095CONFIG_DUMMY_CONSOLE=y 1035CONFIG_DUMMY_CONSOLE=y
1096CONFIG_FRAMEBUFFER_CONSOLE=y 1036CONFIG_FRAMEBUFFER_CONSOLE=y
1037# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1097# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 1038# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1098# CONFIG_FONTS is not set 1039# CONFIG_FONTS is not set
1099CONFIG_FONT_8x8=y 1040CONFIG_FONT_8x8=y
@@ -1156,6 +1097,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
1156# CONFIG_SND_CMIPCI is not set 1097# CONFIG_SND_CMIPCI is not set
1157# CONFIG_SND_CS4281 is not set 1098# CONFIG_SND_CS4281 is not set
1158# CONFIG_SND_CS46XX is not set 1099# CONFIG_SND_CS46XX is not set
1100# CONFIG_SND_CS5530 is not set
1159# CONFIG_SND_DARLA20 is not set 1101# CONFIG_SND_DARLA20 is not set
1160# CONFIG_SND_GINA20 is not set 1102# CONFIG_SND_GINA20 is not set
1161# CONFIG_SND_LAYLA20 is not set 1103# CONFIG_SND_LAYLA20 is not set
@@ -1203,6 +1145,10 @@ CONFIG_SND_VERBOSE_PROCFS=y
1203# 1145#
1204 1146
1205# 1147#
1148# ALSA PowerPC devices
1149#
1150
1151#
1206# USB devices 1152# USB devices
1207# 1153#
1208CONFIG_SND_USB_AUDIO=y 1154CONFIG_SND_USB_AUDIO=y
@@ -1221,13 +1167,14 @@ CONFIG_SND_USB_USX2Y=y
1221# CONFIG_SND_SOC is not set 1167# CONFIG_SND_SOC is not set
1222 1168
1223# 1169#
1224# Open Sound System 1170# SoC Audio support for SuperH
1225# 1171#
1226# CONFIG_SOUND_PRIME is not set
1227 1172
1228# 1173#
1229# HID Devices 1174# Open Sound System
1230# 1175#
1176# CONFIG_SOUND_PRIME is not set
1177CONFIG_HID_SUPPORT=y
1231CONFIG_HID=y 1178CONFIG_HID=y
1232# CONFIG_HID_DEBUG is not set 1179# CONFIG_HID_DEBUG is not set
1233 1180
@@ -1238,10 +1185,7 @@ CONFIG_USB_HID=y
1238# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1185# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1239# CONFIG_HID_FF is not set 1186# CONFIG_HID_FF is not set
1240# CONFIG_USB_HIDDEV is not set 1187# CONFIG_USB_HIDDEV is not set
1241 1188CONFIG_USB_SUPPORT=y
1242#
1243# USB support
1244#
1245CONFIG_USB_ARCH_HAS_HCD=y 1189CONFIG_USB_ARCH_HAS_HCD=y
1246CONFIG_USB_ARCH_HAS_OHCI=y 1190CONFIG_USB_ARCH_HAS_OHCI=y
1247CONFIG_USB_ARCH_HAS_EHCI=y 1191CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1263,7 +1207,6 @@ CONFIG_USB_EHCI_HCD=y
1263# CONFIG_USB_EHCI_SPLIT_ISO is not set 1207# CONFIG_USB_EHCI_SPLIT_ISO is not set
1264# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1208# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1265# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1209# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1266# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1267# CONFIG_USB_ISP116X_HCD is not set 1210# CONFIG_USB_ISP116X_HCD is not set
1268CONFIG_USB_OHCI_HCD=y 1211CONFIG_USB_OHCI_HCD=y
1269CONFIG_USB_OHCI_HCD_PPC_OF=y 1212CONFIG_USB_OHCI_HCD_PPC_OF=y
@@ -1276,6 +1219,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1276CONFIG_USB_UHCI_HCD=y 1219CONFIG_USB_UHCI_HCD=y
1277CONFIG_USB_SL811_HCD=y 1220CONFIG_USB_SL811_HCD=y
1278# CONFIG_USB_SL811_CS is not set 1221# CONFIG_USB_SL811_CS is not set
1222# CONFIG_USB_R8A66597_HCD is not set
1279 1223
1280# 1224#
1281# USB Device Class drivers 1225# USB Device Class drivers
@@ -1354,32 +1298,16 @@ CONFIG_USB_LIBUSUAL=y
1354# 1298#
1355# CONFIG_USB_GADGET is not set 1299# CONFIG_USB_GADGET is not set
1356# CONFIG_MMC is not set 1300# CONFIG_MMC is not set
1357
1358#
1359# LED devices
1360#
1361# CONFIG_NEW_LEDS is not set 1301# CONFIG_NEW_LEDS is not set
1362
1363#
1364# LED drivers
1365#
1366
1367#
1368# LED Triggers
1369#
1370
1371#
1372# InfiniBand support
1373#
1374# CONFIG_INFINIBAND is not set 1302# CONFIG_INFINIBAND is not set
1303CONFIG_EDAC=y
1375 1304
1376# 1305#
1377# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 1306# Reporting subsystems
1378#
1379
1380#
1381# Real Time Clock
1382# 1307#
1308# CONFIG_EDAC_DEBUG is not set
1309CONFIG_EDAC_MM_EDAC=y
1310CONFIG_EDAC_PASEMI=y
1383CONFIG_RTC_LIB=y 1311CONFIG_RTC_LIB=y
1384CONFIG_RTC_CLASS=y 1312CONFIG_RTC_CLASS=y
1385CONFIG_RTC_HCTOSYS=y 1313CONFIG_RTC_HCTOSYS=y
@@ -1406,6 +1334,7 @@ CONFIG_RTC_DRV_DS1307=y
1406# CONFIG_RTC_DRV_X1205 is not set 1334# CONFIG_RTC_DRV_X1205 is not set
1407# CONFIG_RTC_DRV_PCF8563 is not set 1335# CONFIG_RTC_DRV_PCF8563 is not set
1408# CONFIG_RTC_DRV_PCF8583 is not set 1336# CONFIG_RTC_DRV_PCF8583 is not set
1337# CONFIG_RTC_DRV_M41T80 is not set
1409 1338
1410# 1339#
1411# SPI RTC drivers 1340# SPI RTC drivers
@@ -1414,9 +1343,12 @@ CONFIG_RTC_DRV_DS1307=y
1414# 1343#
1415# Platform RTC drivers 1344# Platform RTC drivers
1416# 1345#
1346# CONFIG_RTC_DRV_CMOS is not set
1417# CONFIG_RTC_DRV_DS1553 is not set 1347# CONFIG_RTC_DRV_DS1553 is not set
1348# CONFIG_RTC_DRV_STK17TA8 is not set
1418# CONFIG_RTC_DRV_DS1742 is not set 1349# CONFIG_RTC_DRV_DS1742 is not set
1419# CONFIG_RTC_DRV_M48T86 is not set 1350# CONFIG_RTC_DRV_M48T86 is not set
1351# CONFIG_RTC_DRV_M48T59 is not set
1420# CONFIG_RTC_DRV_V3020 is not set 1352# CONFIG_RTC_DRV_V3020 is not set
1421 1353
1422# 1354#
@@ -1437,6 +1369,11 @@ CONFIG_RTC_DRV_DS1307=y
1437# 1369#
1438 1370
1439# 1371#
1372# Userspace I/O
1373#
1374# CONFIG_UIO is not set
1375
1376#
1440# File systems 1377# File systems
1441# 1378#
1442CONFIG_EXT2_FS=y 1379CONFIG_EXT2_FS=y
@@ -1541,7 +1478,6 @@ CONFIG_SUNRPC=y
1541# CONFIG_NCP_FS is not set 1478# CONFIG_NCP_FS is not set
1542# CONFIG_CODA_FS is not set 1479# CONFIG_CODA_FS is not set
1543# CONFIG_AFS_FS is not set 1480# CONFIG_AFS_FS is not set
1544# CONFIG_9P_FS is not set
1545 1481
1546# 1482#
1547# Partition Types 1483# Partition Types
@@ -1623,6 +1559,7 @@ CONFIG_CRC_CCITT=y
1623# CONFIG_CRC16 is not set 1559# CONFIG_CRC16 is not set
1624# CONFIG_CRC_ITU_T is not set 1560# CONFIG_CRC_ITU_T is not set
1625CONFIG_CRC32=y 1561CONFIG_CRC32=y
1562# CONFIG_CRC7 is not set
1626# CONFIG_LIBCRC32C is not set 1563# CONFIG_LIBCRC32C is not set
1627CONFIG_PLIST=y 1564CONFIG_PLIST=y
1628CONFIG_HAS_IOMEM=y 1565CONFIG_HAS_IOMEM=y
@@ -1648,6 +1585,7 @@ CONFIG_MAGIC_SYSRQ=y
1648CONFIG_DEBUG_KERNEL=y 1585CONFIG_DEBUG_KERNEL=y
1649# CONFIG_DEBUG_SHIRQ is not set 1586# CONFIG_DEBUG_SHIRQ is not set
1650CONFIG_DETECT_SOFTLOCKUP=y 1587CONFIG_DETECT_SOFTLOCKUP=y
1588CONFIG_SCHED_DEBUG=y
1651# CONFIG_SCHEDSTATS is not set 1589# CONFIG_SCHEDSTATS is not set
1652# CONFIG_TIMER_STATS is not set 1590# CONFIG_TIMER_STATS is not set
1653# CONFIG_DEBUG_SLAB is not set 1591# CONFIG_DEBUG_SLAB is not set
@@ -1681,10 +1619,6 @@ CONFIG_XMON_DISASSEMBLY=y
1681# 1619#
1682# CONFIG_KEYS is not set 1620# CONFIG_KEYS is not set
1683# CONFIG_SECURITY is not set 1621# CONFIG_SECURITY is not set
1684
1685#
1686# Cryptographic options
1687#
1688CONFIG_CRYPTO=y 1622CONFIG_CRYPTO=y
1689CONFIG_CRYPTO_ALGAPI=y 1623CONFIG_CRYPTO_ALGAPI=y
1690CONFIG_CRYPTO_BLKCIPHER=y 1624CONFIG_CRYPTO_BLKCIPHER=y
@@ -1723,7 +1657,4 @@ CONFIG_CRYPTO_DES=y
1723# CONFIG_CRYPTO_CRC32C is not set 1657# CONFIG_CRYPTO_CRC32C is not set
1724# CONFIG_CRYPTO_CAMELLIA is not set 1658# CONFIG_CRYPTO_CAMELLIA is not set
1725# CONFIG_CRYPTO_TEST is not set 1659# CONFIG_CRYPTO_TEST is not set
1726 1660# CONFIG_CRYPTO_HW is not set
1727#
1728# Hardware crypto devices
1729#
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index 08525d6fb1..cfc9c6573a 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -1,10 +1,25 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 14:11:36 2007 4# Thu Aug 30 16:44:46 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC_PM_NEEDS_RTC_LIB=y 7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18CONFIG_ALTIVEC=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
8CONFIG_PPC32=y 23CONFIG_PPC32=y
9CONFIG_PPC_MERGE=y 24CONFIG_PPC_MERGE=y
10CONFIG_MMU=y 25CONFIG_MMU=y
@@ -15,62 +30,39 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
15CONFIG_GENERIC_HWEIGHT=y 30CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y 31CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y 32CONFIG_GENERIC_FIND_NEXT_BIT=y
33# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
18CONFIG_PPC=y 34CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y 35CONFIG_EARLY_PRINTK=y
20CONFIG_GENERIC_NVRAM=y 36CONFIG_GENERIC_NVRAM=y
21CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
22CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
23CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
24# CONFIG_PPC_UDBG_16550 is not set 41# CONFIG_PPC_UDBG_16550 is not set
25# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
26CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
27CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
28CONFIG_SYS_SUPPORTS_APM_EMULATION=y 45CONFIG_SYS_SUPPORTS_APM_EMULATION=y
29# CONFIG_DEFAULT_UIMAGE is not set 46# CONFIG_DEFAULT_UIMAGE is not set
30
31#
32# Processor support
33#
34CONFIG_CLASSIC32=y
35# CONFIG_PPC_82xx is not set
36# CONFIG_PPC_83xx is not set
37# CONFIG_PPC_85xx is not set
38# CONFIG_PPC_86xx is not set
39# CONFIG_PPC_8xx is not set
40# CONFIG_40x is not set
41# CONFIG_44x is not set
42# CONFIG_E200 is not set
43CONFIG_6xx=y
44CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_NATIVE is not set 47# CONFIG_PPC_DCR_NATIVE is not set
46# CONFIG_PPC_DCR_MMIO is not set 48# CONFIG_PPC_DCR_MMIO is not set
47CONFIG_ALTIVEC=y
48CONFIG_PPC_STD_MMU=y
49CONFIG_PPC_STD_MMU_32=y
50# CONFIG_PPC_MM_SLICES is not set
51# CONFIG_SMP is not set
52CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
53 50
54# 51#
55# Code maturity level options 52# General setup
56# 53#
57CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
58CONFIG_BROKEN_ON_SMP=y 55CONFIG_BROKEN_ON_SMP=y
59CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
60
61#
62# General setup
63#
64CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
65# CONFIG_LOCALVERSION_AUTO is not set 58# CONFIG_LOCALVERSION_AUTO is not set
66CONFIG_SWAP=y 59CONFIG_SWAP=y
67CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
68# CONFIG_IPC_NS is not set
69CONFIG_SYSVIPC_SYSCTL=y 61CONFIG_SYSVIPC_SYSCTL=y
70CONFIG_POSIX_MQUEUE=y 62CONFIG_POSIX_MQUEUE=y
71# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
72# CONFIG_TASKSTATS is not set 64# CONFIG_TASKSTATS is not set
73# CONFIG_UTS_NS is not set 65# CONFIG_USER_NS is not set
74# CONFIG_AUDIT is not set 66# CONFIG_AUDIT is not set
75CONFIG_IKCONFIG=y 67CONFIG_IKCONFIG=y
76CONFIG_IKCONFIG_PROC=y 68CONFIG_IKCONFIG_PROC=y
@@ -105,24 +97,17 @@ CONFIG_SLAB=y
105CONFIG_RT_MUTEXES=y 97CONFIG_RT_MUTEXES=y
106# CONFIG_TINY_SHMEM is not set 98# CONFIG_TINY_SHMEM is not set
107CONFIG_BASE_SMALL=0 99CONFIG_BASE_SMALL=0
108
109#
110# Loadable module support
111#
112CONFIG_MODULES=y 100CONFIG_MODULES=y
113CONFIG_MODULE_UNLOAD=y 101CONFIG_MODULE_UNLOAD=y
114CONFIG_MODULE_FORCE_UNLOAD=y 102CONFIG_MODULE_FORCE_UNLOAD=y
115# CONFIG_MODVERSIONS is not set 103# CONFIG_MODVERSIONS is not set
116# CONFIG_MODULE_SRCVERSION_ALL is not set 104# CONFIG_MODULE_SRCVERSION_ALL is not set
117CONFIG_KMOD=y 105CONFIG_KMOD=y
118
119#
120# Block layer
121#
122CONFIG_BLOCK=y 106CONFIG_BLOCK=y
123CONFIG_LBD=y 107CONFIG_LBD=y
124# CONFIG_BLK_DEV_IO_TRACE is not set 108# CONFIG_BLK_DEV_IO_TRACE is not set
125CONFIG_LSF=y 109CONFIG_LSF=y
110CONFIG_BLK_DEV_BSG=y
126 111
127# 112#
128# IO Schedulers 113# IO Schedulers
@@ -142,7 +127,10 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
142# 127#
143CONFIG_PPC_MULTIPLATFORM=y 128CONFIG_PPC_MULTIPLATFORM=y
144# CONFIG_EMBEDDED6xx is not set 129# CONFIG_EMBEDDED6xx is not set
145# CONFIG_APUS is not set 130# CONFIG_PPC_82xx is not set
131# CONFIG_PPC_83xx is not set
132# CONFIG_PPC_86xx is not set
133CONFIG_CLASSIC32=y
146# CONFIG_PPC_CHRP is not set 134# CONFIG_PPC_CHRP is not set
147# CONFIG_PPC_MPC52xx is not set 135# CONFIG_PPC_MPC52xx is not set
148# CONFIG_PPC_MPC5200 is not set 136# CONFIG_PPC_MPC5200 is not set
@@ -182,6 +170,7 @@ CONFIG_CPU_FREQ_PMAC=y
182CONFIG_PPC601_SYNC_FIX=y 170CONFIG_PPC601_SYNC_FIX=y
183# CONFIG_TAU is not set 171# CONFIG_TAU is not set
184# CONFIG_CPM2 is not set 172# CONFIG_CPM2 is not set
173# CONFIG_FSL_ULI1575 is not set
185 174
186# 175#
187# Kernel options 176# Kernel options
@@ -211,13 +200,17 @@ CONFIG_FLAT_NODE_MEM_MAP=y
211CONFIG_SPLIT_PTLOCK_CPUS=4 200CONFIG_SPLIT_PTLOCK_CPUS=4
212# CONFIG_RESOURCES_64BIT is not set 201# CONFIG_RESOURCES_64BIT is not set
213CONFIG_ZONE_DMA_FLAG=1 202CONFIG_ZONE_DMA_FLAG=1
203CONFIG_BOUNCE=y
204CONFIG_VIRT_TO_BUS=y
214CONFIG_PROC_DEVICETREE=y 205CONFIG_PROC_DEVICETREE=y
215# CONFIG_CMDLINE_BOOL is not set 206# CONFIG_CMDLINE_BOOL is not set
216CONFIG_PM=y 207CONFIG_PM=y
217# CONFIG_PM_LEGACY is not set 208# CONFIG_PM_LEGACY is not set
218CONFIG_PM_DEBUG=y 209CONFIG_PM_DEBUG=y
210# CONFIG_PM_VERBOSE is not set
219# CONFIG_DISABLE_CONSOLE_SUSPEND is not set 211# CONFIG_DISABLE_CONSOLE_SUSPEND is not set
220CONFIG_PM_SYSFS_DEPRECATED=y 212CONFIG_PM_SLEEP=y
213CONFIG_SUSPEND=y
221CONFIG_HIBERNATION=y 214CONFIG_HIBERNATION=y
222CONFIG_PM_STD_PARTITION="" 215CONFIG_PM_STD_PARTITION=""
223CONFIG_APM_EMULATION=y 216CONFIG_APM_EMULATION=y
@@ -231,9 +224,9 @@ CONFIG_ISA_DMA_API=y
231CONFIG_ZONE_DMA=y 224CONFIG_ZONE_DMA=y
232CONFIG_GENERIC_ISA_DMA=y 225CONFIG_GENERIC_ISA_DMA=y
233CONFIG_PPC_INDIRECT_PCI=y 226CONFIG_PPC_INDIRECT_PCI=y
234# CONFIG_PPC_INDIRECT_PCI_BE is not set
235CONFIG_PCI=y 227CONFIG_PCI=y
236CONFIG_PCI_DOMAINS=y 228CONFIG_PCI_DOMAINS=y
229CONFIG_PCI_SYSCALL=y
237# CONFIG_PCIEPORTBUS is not set 230# CONFIG_PCIEPORTBUS is not set
238CONFIG_ARCH_SUPPORTS_MSI=y 231CONFIG_ARCH_SUPPORTS_MSI=y
239# CONFIG_PCI_MSI is not set 232# CONFIG_PCI_MSI is not set
@@ -336,6 +329,7 @@ CONFIG_NF_CONNTRACK=m
336# CONFIG_NF_CONNTRACK_MARK is not set 329# CONFIG_NF_CONNTRACK_MARK is not set
337# CONFIG_NF_CONNTRACK_EVENTS is not set 330# CONFIG_NF_CONNTRACK_EVENTS is not set
338# CONFIG_NF_CT_PROTO_SCTP is not set 331# CONFIG_NF_CT_PROTO_SCTP is not set
332# CONFIG_NF_CT_PROTO_UDPLITE is not set
339# CONFIG_NF_CONNTRACK_AMANDA is not set 333# CONFIG_NF_CONNTRACK_AMANDA is not set
340CONFIG_NF_CONNTRACK_FTP=m 334CONFIG_NF_CONNTRACK_FTP=m
341# CONFIG_NF_CONNTRACK_H323 is not set 335# CONFIG_NF_CONNTRACK_H323 is not set
@@ -353,9 +347,11 @@ CONFIG_NETFILTER_XT_TARGET_MARK=m
353CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 347CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
354CONFIG_NETFILTER_XT_TARGET_NFLOG=m 348CONFIG_NETFILTER_XT_TARGET_NFLOG=m
355CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 349CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
350CONFIG_NETFILTER_XT_TARGET_TRACE=m
356CONFIG_NETFILTER_XT_TARGET_TCPMSS=m 351CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
357CONFIG_NETFILTER_XT_MATCH_COMMENT=m 352CONFIG_NETFILTER_XT_MATCH_COMMENT=m
358# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set 353# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
354CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
359# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set 355# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
360CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 356CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
361CONFIG_NETFILTER_XT_MATCH_DCCP=m 357CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -376,6 +372,7 @@ CONFIG_NETFILTER_XT_MATCH_SCTP=m
376# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set 372# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
377CONFIG_NETFILTER_XT_MATCH_STRING=m 373CONFIG_NETFILTER_XT_MATCH_STRING=m
378CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 374CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
375CONFIG_NETFILTER_XT_MATCH_U32=m
379# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set 376# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
380 377
381# 378#
@@ -559,6 +556,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m
559CONFIG_IEEE80211_CRYPT_TKIP=m 556CONFIG_IEEE80211_CRYPT_TKIP=m
560# CONFIG_IEEE80211_SOFTMAC is not set 557# CONFIG_IEEE80211_SOFTMAC is not set
561# CONFIG_RFKILL is not set 558# CONFIG_RFKILL is not set
559# CONFIG_NET_9P is not set
562 560
563# 561#
564# Device Drivers 562# Device Drivers
@@ -573,27 +571,12 @@ CONFIG_FW_LOADER=y
573# CONFIG_DEBUG_DRIVER is not set 571# CONFIG_DEBUG_DRIVER is not set
574# CONFIG_DEBUG_DEVRES is not set 572# CONFIG_DEBUG_DEVRES is not set
575# CONFIG_SYS_HYPERVISOR is not set 573# CONFIG_SYS_HYPERVISOR is not set
576
577#
578# Connector - unified userspace <-> kernelspace linker
579#
580CONFIG_CONNECTOR=y 574CONFIG_CONNECTOR=y
581CONFIG_PROC_EVENTS=y 575CONFIG_PROC_EVENTS=y
582# CONFIG_MTD is not set 576# CONFIG_MTD is not set
583 577CONFIG_OF_DEVICE=y
584#
585# Parallel port support
586#
587# CONFIG_PARPORT is not set 578# CONFIG_PARPORT is not set
588 579CONFIG_BLK_DEV=y
589#
590# Plug and Play support
591#
592# CONFIG_PNPACPI is not set
593
594#
595# Block devices
596#
597# CONFIG_BLK_DEV_FD is not set 580# CONFIG_BLK_DEV_FD is not set
598CONFIG_MAC_FLOPPY=m 581CONFIG_MAC_FLOPPY=m
599# CONFIG_BLK_CPQ_DA is not set 582# CONFIG_BLK_CPQ_DA is not set
@@ -612,14 +595,11 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
612CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 595CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
613# CONFIG_CDROM_PKTCDVD is not set 596# CONFIG_CDROM_PKTCDVD is not set
614# CONFIG_ATA_OVER_ETH is not set 597# CONFIG_ATA_OVER_ETH is not set
615 598CONFIG_MISC_DEVICES=y
616#
617# Misc devices
618#
619# CONFIG_PHANTOM is not set 599# CONFIG_PHANTOM is not set
600# CONFIG_EEPROM_93CX6 is not set
620# CONFIG_SGI_IOC4 is not set 601# CONFIG_SGI_IOC4 is not set
621# CONFIG_TIFM_CORE is not set 602# CONFIG_TIFM_CORE is not set
622# CONFIG_BLINK is not set
623CONFIG_IDE=y 603CONFIG_IDE=y
624CONFIG_BLK_DEV_IDE=y 604CONFIG_BLK_DEV_IDE=y
625 605
@@ -689,6 +669,7 @@ CONFIG_BLK_DEV_IDEDMA=y
689# 669#
690# CONFIG_RAID_ATTRS is not set 670# CONFIG_RAID_ATTRS is not set
691CONFIG_SCSI=y 671CONFIG_SCSI=y
672CONFIG_SCSI_DMA=y
692# CONFIG_SCSI_TGT is not set 673# CONFIG_SCSI_TGT is not set
693CONFIG_SCSI_NETLINK=y 674CONFIG_SCSI_NETLINK=y
694CONFIG_SCSI_PROC_FS=y 675CONFIG_SCSI_PROC_FS=y
@@ -721,10 +702,7 @@ CONFIG_SCSI_FC_ATTRS=y
721# CONFIG_SCSI_ISCSI_ATTRS is not set 702# CONFIG_SCSI_ISCSI_ATTRS is not set
722# CONFIG_SCSI_SAS_ATTRS is not set 703# CONFIG_SCSI_SAS_ATTRS is not set
723# CONFIG_SCSI_SAS_LIBSAS is not set 704# CONFIG_SCSI_SAS_LIBSAS is not set
724 705CONFIG_SCSI_LOWLEVEL=y
725#
726# SCSI low-level drivers
727#
728# CONFIG_ISCSI_TCP is not set 706# CONFIG_ISCSI_TCP is not set
729# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 707# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
730# CONFIG_SCSI_3W_9XXX is not set 708# CONFIG_SCSI_3W_9XXX is not set
@@ -772,20 +750,8 @@ CONFIG_SCSI_MESH_SYNC_RATE=5
772CONFIG_SCSI_MESH_RESET_DELAY_MS=4000 750CONFIG_SCSI_MESH_RESET_DELAY_MS=4000
773CONFIG_SCSI_MAC53C94=y 751CONFIG_SCSI_MAC53C94=y
774# CONFIG_SCSI_SRP is not set 752# CONFIG_SCSI_SRP is not set
775 753# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
776#
777# PCMCIA SCSI adapter support
778#
779# CONFIG_PCMCIA_AHA152X is not set
780# CONFIG_PCMCIA_FDOMAIN is not set
781# CONFIG_PCMCIA_NINJA_SCSI is not set
782# CONFIG_PCMCIA_QLOGIC is not set
783# CONFIG_PCMCIA_SYM53C500 is not set
784# CONFIG_ATA is not set 754# CONFIG_ATA is not set
785
786#
787# Multi-device support (RAID and LVM)
788#
789CONFIG_MD=y 755CONFIG_MD=y
790CONFIG_BLK_DEV_MD=m 756CONFIG_BLK_DEV_MD=m
791CONFIG_MD_LINEAR=m 757CONFIG_MD_LINEAR=m
@@ -834,14 +800,11 @@ CONFIG_IEEE1394_OHCI1394=m
834# 800#
835CONFIG_IEEE1394_VIDEO1394=m 801CONFIG_IEEE1394_VIDEO1394=m
836CONFIG_IEEE1394_SBP2=m 802CONFIG_IEEE1394_SBP2=m
803# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
837# CONFIG_IEEE1394_ETH1394_ROM_ENTRY is not set 804# CONFIG_IEEE1394_ETH1394_ROM_ENTRY is not set
838# CONFIG_IEEE1394_ETH1394 is not set 805# CONFIG_IEEE1394_ETH1394 is not set
839CONFIG_IEEE1394_DV1394=m 806CONFIG_IEEE1394_DV1394=m
840CONFIG_IEEE1394_RAWIO=m 807CONFIG_IEEE1394_RAWIO=m
841
842#
843# I2O device support
844#
845# CONFIG_I2O is not set 808# CONFIG_I2O is not set
846CONFIG_MACINTOSH_DRIVERS=y 809CONFIG_MACINTOSH_DRIVERS=y
847CONFIG_ADB=y 810CONFIG_ADB=y
@@ -860,21 +823,15 @@ CONFIG_THERM_ADT746X=m
860# CONFIG_WINDFARM is not set 823# CONFIG_WINDFARM is not set
861# CONFIG_ANSLCD is not set 824# CONFIG_ANSLCD is not set
862CONFIG_PMAC_RACKMETER=m 825CONFIG_PMAC_RACKMETER=m
863
864#
865# Network device support
866#
867CONFIG_NETDEVICES=y 826CONFIG_NETDEVICES=y
827# CONFIG_NETDEVICES_MULTIQUEUE is not set
868CONFIG_DUMMY=m 828CONFIG_DUMMY=m
869# CONFIG_BONDING is not set 829# CONFIG_BONDING is not set
830# CONFIG_MACVLAN is not set
870# CONFIG_EQUALIZER is not set 831# CONFIG_EQUALIZER is not set
871CONFIG_TUN=m 832CONFIG_TUN=m
872# CONFIG_ARCNET is not set 833# CONFIG_ARCNET is not set
873# CONFIG_PHYLIB is not set 834# CONFIG_PHYLIB is not set
874
875#
876# Ethernet (10 or 100Mbit)
877#
878CONFIG_NET_ETHERNET=y 835CONFIG_NET_ETHERNET=y
879CONFIG_MII=y 836CONFIG_MII=y
880CONFIG_MACE=y 837CONFIG_MACE=y
@@ -884,10 +841,6 @@ CONFIG_BMAC=y
884CONFIG_SUNGEM=y 841CONFIG_SUNGEM=y
885# CONFIG_CASSINI is not set 842# CONFIG_CASSINI is not set
886# CONFIG_NET_VENDOR_3COM is not set 843# CONFIG_NET_VENDOR_3COM is not set
887
888#
889# Tulip family network device support
890#
891# CONFIG_NET_TULIP is not set 844# CONFIG_NET_TULIP is not set
892# CONFIG_HP100 is not set 845# CONFIG_HP100 is not set
893CONFIG_NET_PCI=y 846CONFIG_NET_PCI=y
@@ -922,7 +875,6 @@ CONFIG_NETDEV_1000=y
922# CONFIG_SIS190 is not set 875# CONFIG_SIS190 is not set
923# CONFIG_SKGE is not set 876# CONFIG_SKGE is not set
924# CONFIG_SKY2 is not set 877# CONFIG_SKY2 is not set
925# CONFIG_SK98LIN is not set
926# CONFIG_VIA_VELOCITY is not set 878# CONFIG_VIA_VELOCITY is not set
927# CONFIG_TIGON3 is not set 879# CONFIG_TIGON3 is not set
928# CONFIG_BNX2 is not set 880# CONFIG_BNX2 is not set
@@ -962,6 +914,7 @@ CONFIG_PCMCIA_HERMES=m
962# CONFIG_PCMCIA_WL3501 is not set 914# CONFIG_PCMCIA_WL3501 is not set
963CONFIG_PRISM54=m 915CONFIG_PRISM54=m
964# CONFIG_USB_ZD1201 is not set 916# CONFIG_USB_ZD1201 is not set
917# CONFIG_RTL8187 is not set
965# CONFIG_HOSTAP is not set 918# CONFIG_HOSTAP is not set
966 919
967# 920#
@@ -996,6 +949,7 @@ CONFIG_PPP_DEFLATE=y
996CONFIG_PPP_BSDCOMP=m 949CONFIG_PPP_BSDCOMP=m
997# CONFIG_PPP_MPPE is not set 950# CONFIG_PPP_MPPE is not set
998# CONFIG_PPPOE is not set 951# CONFIG_PPPOE is not set
952# CONFIG_PPPOL2TP is not set
999# CONFIG_SLIP is not set 953# CONFIG_SLIP is not set
1000CONFIG_SLHC=y 954CONFIG_SLHC=y
1001# CONFIG_NET_FC is not set 955# CONFIG_NET_FC is not set
@@ -1003,15 +957,7 @@ CONFIG_SLHC=y
1003# CONFIG_NETCONSOLE is not set 957# CONFIG_NETCONSOLE is not set
1004# CONFIG_NETPOLL is not set 958# CONFIG_NETPOLL is not set
1005# CONFIG_NET_POLL_CONTROLLER is not set 959# CONFIG_NET_POLL_CONTROLLER is not set
1006
1007#
1008# ISDN subsystem
1009#
1010# CONFIG_ISDN is not set 960# CONFIG_ISDN is not set
1011
1012#
1013# Telephony Support
1014#
1015# CONFIG_PHONE is not set 961# CONFIG_PHONE is not set
1016 962
1017# 963#
@@ -1093,10 +1039,6 @@ CONFIG_SERIAL_PMACZILOG=m
1093CONFIG_UNIX98_PTYS=y 1039CONFIG_UNIX98_PTYS=y
1094CONFIG_LEGACY_PTYS=y 1040CONFIG_LEGACY_PTYS=y
1095CONFIG_LEGACY_PTY_COUNT=256 1041CONFIG_LEGACY_PTY_COUNT=256
1096
1097#
1098# IPMI
1099#
1100# CONFIG_IPMI_HANDLER is not set 1042# CONFIG_IPMI_HANDLER is not set
1101# CONFIG_WATCHDOG is not set 1043# CONFIG_WATCHDOG is not set
1102# CONFIG_HW_RANDOM is not set 1044# CONFIG_HW_RANDOM is not set
@@ -1123,10 +1065,6 @@ CONFIG_DRM_RADEON=m
1123# CONFIG_CARDMAN_4000 is not set 1065# CONFIG_CARDMAN_4000 is not set
1124# CONFIG_CARDMAN_4040 is not set 1066# CONFIG_CARDMAN_4040 is not set
1125# CONFIG_RAW_DRIVER is not set 1067# CONFIG_RAW_DRIVER is not set
1126
1127#
1128# TPM devices
1129#
1130# CONFIG_TCG_TPM is not set 1068# CONFIG_TCG_TPM is not set
1131CONFIG_DEVPORT=y 1069CONFIG_DEVPORT=y
1132CONFIG_I2C=y 1070CONFIG_I2C=y
@@ -1162,6 +1100,7 @@ CONFIG_I2C_POWERMAC=y
1162# CONFIG_I2C_SIS5595 is not set 1100# CONFIG_I2C_SIS5595 is not set
1163# CONFIG_I2C_SIS630 is not set 1101# CONFIG_I2C_SIS630 is not set
1164# CONFIG_I2C_SIS96X is not set 1102# CONFIG_I2C_SIS96X is not set
1103# CONFIG_I2C_TAOS_EVM is not set
1165# CONFIG_I2C_STUB is not set 1104# CONFIG_I2C_STUB is not set
1166# CONFIG_I2C_TINY_USB is not set 1105# CONFIG_I2C_TINY_USB is not set
1167# CONFIG_I2C_VIA is not set 1106# CONFIG_I2C_VIA is not set
@@ -1173,12 +1112,14 @@ CONFIG_I2C_POWERMAC=y
1173# 1112#
1174# CONFIG_SENSORS_DS1337 is not set 1113# CONFIG_SENSORS_DS1337 is not set
1175# CONFIG_SENSORS_DS1374 is not set 1114# CONFIG_SENSORS_DS1374 is not set
1115# CONFIG_DS1682 is not set
1176# CONFIG_SENSORS_EEPROM is not set 1116# CONFIG_SENSORS_EEPROM is not set
1177# CONFIG_SENSORS_PCF8574 is not set 1117# CONFIG_SENSORS_PCF8574 is not set
1178# CONFIG_SENSORS_PCA9539 is not set 1118# CONFIG_SENSORS_PCA9539 is not set
1179# CONFIG_SENSORS_PCF8591 is not set 1119# CONFIG_SENSORS_PCF8591 is not set
1180# CONFIG_SENSORS_M41T00 is not set 1120# CONFIG_SENSORS_M41T00 is not set
1181# CONFIG_SENSORS_MAX6875 is not set 1121# CONFIG_SENSORS_MAX6875 is not set
1122# CONFIG_SENSORS_TSL2550 is not set
1182# CONFIG_I2C_DEBUG_CORE is not set 1123# CONFIG_I2C_DEBUG_CORE is not set
1183# CONFIG_I2C_DEBUG_ALGO is not set 1124# CONFIG_I2C_DEBUG_ALGO is not set
1184# CONFIG_I2C_DEBUG_BUS is not set 1125# CONFIG_I2C_DEBUG_BUS is not set
@@ -1189,11 +1130,13 @@ CONFIG_I2C_POWERMAC=y
1189# 1130#
1190# CONFIG_SPI is not set 1131# CONFIG_SPI is not set
1191# CONFIG_SPI_MASTER is not set 1132# CONFIG_SPI_MASTER is not set
1192
1193#
1194# Dallas's 1-wire bus
1195#
1196# CONFIG_W1 is not set 1133# CONFIG_W1 is not set
1134CONFIG_POWER_SUPPLY=y
1135# CONFIG_POWER_SUPPLY_DEBUG is not set
1136# CONFIG_PDA_POWER is not set
1137CONFIG_APM_POWER=y
1138# CONFIG_BATTERY_DS2760 is not set
1139CONFIG_BATTERY_PMU=y
1197# CONFIG_HWMON is not set 1140# CONFIG_HWMON is not set
1198 1141
1199# 1142#
@@ -1212,8 +1155,8 @@ CONFIG_I2C_POWERMAC=y
1212# Graphics support 1155# Graphics support
1213# 1156#
1214CONFIG_BACKLIGHT_LCD_SUPPORT=y 1157CONFIG_BACKLIGHT_LCD_SUPPORT=y
1215CONFIG_BACKLIGHT_CLASS_DEVICE=y
1216CONFIG_LCD_CLASS_DEVICE=m 1158CONFIG_LCD_CLASS_DEVICE=m
1159CONFIG_BACKLIGHT_CLASS_DEVICE=y
1217 1160
1218# 1161#
1219# Display device support 1162# Display device support
@@ -1224,6 +1167,7 @@ CONFIG_DISPLAY_SUPPORT=y
1224# Display hardware drivers 1167# Display hardware drivers
1225# 1168#
1226CONFIG_VGASTATE=y 1169CONFIG_VGASTATE=y
1170# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1227CONFIG_FB=y 1171CONFIG_FB=y
1228# CONFIG_FIRMWARE_EDID is not set 1172# CONFIG_FIRMWARE_EDID is not set
1229CONFIG_FB_DDC=y 1173CONFIG_FB_DDC=y
@@ -1299,6 +1243,7 @@ CONFIG_FB_3DFX=y
1299# CONFIG_VGA_CONSOLE is not set 1243# CONFIG_VGA_CONSOLE is not set
1300CONFIG_DUMMY_CONSOLE=y 1244CONFIG_DUMMY_CONSOLE=y
1301CONFIG_FRAMEBUFFER_CONSOLE=y 1245CONFIG_FRAMEBUFFER_CONSOLE=y
1246# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1302# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 1247# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1303# CONFIG_FONTS is not set 1248# CONFIG_FONTS is not set
1304CONFIG_FONT_8x8=y 1249CONFIG_FONT_8x8=y
@@ -1361,6 +1306,7 @@ CONFIG_SND_DUMMY=m
1361# CONFIG_SND_CMIPCI is not set 1306# CONFIG_SND_CMIPCI is not set
1362# CONFIG_SND_CS4281 is not set 1307# CONFIG_SND_CS4281 is not set
1363# CONFIG_SND_CS46XX is not set 1308# CONFIG_SND_CS46XX is not set
1309# CONFIG_SND_CS5530 is not set
1364# CONFIG_SND_DARLA20 is not set 1310# CONFIG_SND_DARLA20 is not set
1365# CONFIG_SND_GINA20 is not set 1311# CONFIG_SND_GINA20 is not set
1366# CONFIG_SND_LAYLA20 is not set 1312# CONFIG_SND_LAYLA20 is not set
@@ -1410,6 +1356,10 @@ CONFIG_SND_POWERMAC=m
1410CONFIG_SND_POWERMAC_AUTO_DRC=y 1356CONFIG_SND_POWERMAC_AUTO_DRC=y
1411 1357
1412# 1358#
1359# ALSA PowerPC devices
1360#
1361
1362#
1413# Apple Onboard Audio driver 1363# Apple Onboard Audio driver
1414# 1364#
1415CONFIG_SND_AOA=m 1365CONFIG_SND_AOA=m
@@ -1439,13 +1389,14 @@ CONFIG_SND_USB_AUDIO=m
1439# CONFIG_SND_SOC is not set 1389# CONFIG_SND_SOC is not set
1440 1390
1441# 1391#
1442# Open Sound System 1392# SoC Audio support for SuperH
1443# 1393#
1444# CONFIG_SOUND_PRIME is not set
1445 1394
1446# 1395#
1447# HID Devices 1396# Open Sound System
1448# 1397#
1398# CONFIG_SOUND_PRIME is not set
1399CONFIG_HID_SUPPORT=y
1449CONFIG_HID=y 1400CONFIG_HID=y
1450# CONFIG_HID_DEBUG is not set 1401# CONFIG_HID_DEBUG is not set
1451 1402
@@ -1456,10 +1407,7 @@ CONFIG_USB_HID=y
1456CONFIG_USB_HIDINPUT_POWERBOOK=y 1407CONFIG_USB_HIDINPUT_POWERBOOK=y
1457# CONFIG_HID_FF is not set 1408# CONFIG_HID_FF is not set
1458# CONFIG_USB_HIDDEV is not set 1409# CONFIG_USB_HIDDEV is not set
1459 1410CONFIG_USB_SUPPORT=y
1460#
1461# USB support
1462#
1463CONFIG_USB_ARCH_HAS_HCD=y 1411CONFIG_USB_ARCH_HAS_HCD=y
1464CONFIG_USB_ARCH_HAS_OHCI=y 1412CONFIG_USB_ARCH_HAS_OHCI=y
1465CONFIG_USB_ARCH_HAS_EHCI=y 1413CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1473,6 +1421,7 @@ CONFIG_USB_DEVICEFS=y
1473CONFIG_USB_DEVICE_CLASS=y 1421CONFIG_USB_DEVICE_CLASS=y
1474CONFIG_USB_DYNAMIC_MINORS=y 1422CONFIG_USB_DYNAMIC_MINORS=y
1475# CONFIG_USB_SUSPEND is not set 1423# CONFIG_USB_SUSPEND is not set
1424# CONFIG_USB_PERSIST is not set
1476# CONFIG_USB_OTG is not set 1425# CONFIG_USB_OTG is not set
1477 1426
1478# 1427#
@@ -1482,7 +1431,6 @@ CONFIG_USB_EHCI_HCD=m
1482CONFIG_USB_EHCI_SPLIT_ISO=y 1431CONFIG_USB_EHCI_SPLIT_ISO=y
1483CONFIG_USB_EHCI_ROOT_HUB_TT=y 1432CONFIG_USB_EHCI_ROOT_HUB_TT=y
1484# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1433# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1485# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1486# CONFIG_USB_ISP116X_HCD is not set 1434# CONFIG_USB_ISP116X_HCD is not set
1487CONFIG_USB_OHCI_HCD=y 1435CONFIG_USB_OHCI_HCD=y
1488# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1436# CONFIG_USB_OHCI_HCD_PPC_OF is not set
@@ -1491,6 +1439,7 @@ CONFIG_USB_OHCI_HCD=y
1491CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1439CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1492# CONFIG_USB_UHCI_HCD is not set 1440# CONFIG_USB_UHCI_HCD is not set
1493# CONFIG_USB_SL811_HCD is not set 1441# CONFIG_USB_SL811_HCD is not set
1442# CONFIG_USB_R8A66597_HCD is not set
1494 1443
1495# 1444#
1496# USB Device Class drivers 1445# USB Device Class drivers
@@ -1574,6 +1523,7 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
1574# CONFIG_USB_SERIAL_MOS7840 is not set 1523# CONFIG_USB_SERIAL_MOS7840 is not set
1575# CONFIG_USB_SERIAL_NAVMAN is not set 1524# CONFIG_USB_SERIAL_NAVMAN is not set
1576# CONFIG_USB_SERIAL_PL2303 is not set 1525# CONFIG_USB_SERIAL_PL2303 is not set
1526# CONFIG_USB_SERIAL_OTI6858 is not set
1577# CONFIG_USB_SERIAL_HP4X is not set 1527# CONFIG_USB_SERIAL_HP4X is not set
1578# CONFIG_USB_SERIAL_SAFE is not set 1528# CONFIG_USB_SERIAL_SAFE is not set
1579# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set 1529# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
@@ -1618,10 +1568,6 @@ CONFIG_USB_APPLEDISPLAY=m
1618# 1568#
1619# CONFIG_USB_GADGET is not set 1569# CONFIG_USB_GADGET is not set
1620# CONFIG_MMC is not set 1570# CONFIG_MMC is not set
1621
1622#
1623# LED devices
1624#
1625CONFIG_NEW_LEDS=y 1571CONFIG_NEW_LEDS=y
1626CONFIG_LEDS_CLASS=y 1572CONFIG_LEDS_CLASS=y
1627 1573
@@ -1636,20 +1582,8 @@ CONFIG_LEDS_TRIGGERS=y
1636# CONFIG_LEDS_TRIGGER_TIMER is not set 1582# CONFIG_LEDS_TRIGGER_TIMER is not set
1637CONFIG_LEDS_TRIGGER_IDE_DISK=y 1583CONFIG_LEDS_TRIGGER_IDE_DISK=y
1638# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set 1584# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
1639
1640#
1641# InfiniBand support
1642#
1643# CONFIG_INFINIBAND is not set 1585# CONFIG_INFINIBAND is not set
1644 1586# CONFIG_EDAC is not set
1645#
1646# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1647#
1648
1649#
1650# Real Time Clock
1651#
1652CONFIG_RTC_LIB=y
1653# CONFIG_RTC_CLASS is not set 1587# CONFIG_RTC_CLASS is not set
1654 1588
1655# 1589#
@@ -1666,6 +1600,11 @@ CONFIG_RTC_LIB=y
1666# 1600#
1667 1601
1668# 1602#
1603# Userspace I/O
1604#
1605# CONFIG_UIO is not set
1606
1607#
1669# File systems 1608# File systems
1670# 1609#
1671CONFIG_EXT2_FS=y 1610CONFIG_EXT2_FS=y
@@ -1774,7 +1713,6 @@ CONFIG_SMB_FS=m
1774# CONFIG_NCP_FS is not set 1713# CONFIG_NCP_FS is not set
1775# CONFIG_CODA_FS is not set 1714# CONFIG_CODA_FS is not set
1776# CONFIG_AFS_FS is not set 1715# CONFIG_AFS_FS is not set
1777# CONFIG_9P_FS is not set
1778 1716
1779# 1717#
1780# Partition Types 1718# Partition Types
@@ -1856,6 +1794,7 @@ CONFIG_CRC_CCITT=y
1856CONFIG_CRC16=y 1794CONFIG_CRC16=y
1857# CONFIG_CRC_ITU_T is not set 1795# CONFIG_CRC_ITU_T is not set
1858CONFIG_CRC32=y 1796CONFIG_CRC32=y
1797# CONFIG_CRC7 is not set
1859CONFIG_LIBCRC32C=m 1798CONFIG_LIBCRC32C=m
1860CONFIG_ZLIB_INFLATE=y 1799CONFIG_ZLIB_INFLATE=y
1861CONFIG_ZLIB_DEFLATE=y 1800CONFIG_ZLIB_DEFLATE=y
@@ -1887,6 +1826,7 @@ CONFIG_MAGIC_SYSRQ=y
1887CONFIG_DEBUG_KERNEL=y 1826CONFIG_DEBUG_KERNEL=y
1888# CONFIG_DEBUG_SHIRQ is not set 1827# CONFIG_DEBUG_SHIRQ is not set
1889CONFIG_DETECT_SOFTLOCKUP=y 1828CONFIG_DETECT_SOFTLOCKUP=y
1829CONFIG_SCHED_DEBUG=y
1890# CONFIG_SCHEDSTATS is not set 1830# CONFIG_SCHEDSTATS is not set
1891# CONFIG_TIMER_STATS is not set 1831# CONFIG_TIMER_STATS is not set
1892# CONFIG_DEBUG_SLAB is not set 1832# CONFIG_DEBUG_SLAB is not set
@@ -1919,10 +1859,6 @@ CONFIG_BOOTX_TEXT=y
1919# 1859#
1920# CONFIG_KEYS is not set 1860# CONFIG_KEYS is not set
1921# CONFIG_SECURITY is not set 1861# CONFIG_SECURITY is not set
1922
1923#
1924# Cryptographic options
1925#
1926CONFIG_CRYPTO=y 1862CONFIG_CRYPTO=y
1927CONFIG_CRYPTO_ALGAPI=y 1863CONFIG_CRYPTO_ALGAPI=y
1928CONFIG_CRYPTO_BLKCIPHER=y 1864CONFIG_CRYPTO_BLKCIPHER=y
@@ -1962,7 +1898,4 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1962CONFIG_CRYPTO_CRC32C=m 1898CONFIG_CRYPTO_CRC32C=m
1963# CONFIG_CRYPTO_CAMELLIA is not set 1899# CONFIG_CRYPTO_CAMELLIA is not set
1964# CONFIG_CRYPTO_TEST is not set 1900# CONFIG_CRYPTO_TEST is not set
1965 1901CONFIG_CRYPTO_HW=y
1966#
1967# Hardware crypto devices
1968#
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 6e503d98da..5f6224a1fe 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -1,9 +1,23 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 14:15:02 2007 4# Thu Aug 30 16:47:09 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7
8#
9# Processor support
10#
11# CONFIG_POWER4_ONLY is not set
12CONFIG_POWER3=y
13CONFIG_POWER4=y
14CONFIG_PPC_FPU=y
15CONFIG_ALTIVEC=y
16CONFIG_PPC_STD_MMU=y
17CONFIG_PPC_MM_SLICES=y
18CONFIG_VIRT_CPU_ACCOUNTING=y
19CONFIG_SMP=y
20CONFIG_NR_CPUS=32
7CONFIG_64BIT=y 21CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y 22CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 23CONFIG_MMU=y
@@ -15,6 +29,7 @@ CONFIG_ARCH_HAS_ILOG2_U64=y
15CONFIG_GENERIC_HWEIGHT=y 29CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y 30CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y 31CONFIG_GENERIC_FIND_NEXT_BIT=y
32CONFIG_ARCH_NO_VIRT_TO_BUS=y
18CONFIG_PPC=y 33CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y 34CONFIG_EARLY_PRINTK=y
20CONFIG_COMPAT=y 35CONFIG_COMPAT=y
@@ -22,54 +37,36 @@ CONFIG_SYSVIPC_COMPAT=y
22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
25CONFIG_PPC_UDBG_16550=y 41CONFIG_PPC_UDBG_16550=y
26CONFIG_GENERIC_TBSYNC=y 42CONFIG_GENERIC_TBSYNC=y
27CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set 45# CONFIG_DEFAULT_UIMAGE is not set
30CONFIG_PPC64_SWSUSP=y 46CONFIG_PPC64_SWSUSP=y
31
32#
33# Processor support
34#
35# CONFIG_POWER4_ONLY is not set
36CONFIG_POWER3=y
37CONFIG_POWER4=y
38CONFIG_PPC_FPU=y
39# CONFIG_PPC_DCR_NATIVE is not set 47# CONFIG_PPC_DCR_NATIVE is not set
40CONFIG_PPC_DCR_MMIO=y 48CONFIG_PPC_DCR_MMIO=y
41CONFIG_PPC_DCR=y 49CONFIG_PPC_DCR=y
42CONFIG_PPC_OF_PLATFORM_PCI=y 50CONFIG_PPC_OF_PLATFORM_PCI=y
43CONFIG_ALTIVEC=y
44CONFIG_PPC_STD_MMU=y
45CONFIG_PPC_MM_SLICES=y
46CONFIG_VIRT_CPU_ACCOUNTING=y
47CONFIG_SMP=y
48CONFIG_NR_CPUS=32
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 52
51# 53#
52# Code maturity level options 54# General setup
53# 55#
54CONFIG_EXPERIMENTAL=y 56CONFIG_EXPERIMENTAL=y
55CONFIG_LOCK_KERNEL=y 57CONFIG_LOCK_KERNEL=y
56CONFIG_INIT_ENV_ARG_LIMIT=32 58CONFIG_INIT_ENV_ARG_LIMIT=32
57
58#
59# General setup
60#
61CONFIG_LOCALVERSION="" 59CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y 60CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 61CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 62CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set
66CONFIG_SYSVIPC_SYSCTL=y 63CONFIG_SYSVIPC_SYSCTL=y
67CONFIG_POSIX_MQUEUE=y 64CONFIG_POSIX_MQUEUE=y
68# CONFIG_BSD_PROCESS_ACCT is not set 65# CONFIG_BSD_PROCESS_ACCT is not set
69CONFIG_TASKSTATS=y 66CONFIG_TASKSTATS=y
70CONFIG_TASK_DELAY_ACCT=y 67CONFIG_TASK_DELAY_ACCT=y
71# CONFIG_TASK_XACCT is not set 68# CONFIG_TASK_XACCT is not set
72# CONFIG_UTS_NS is not set 69# CONFIG_USER_NS is not set
73# CONFIG_AUDIT is not set 70# CONFIG_AUDIT is not set
74CONFIG_IKCONFIG=y 71CONFIG_IKCONFIG=y
75CONFIG_IKCONFIG_PROC=y 72CONFIG_IKCONFIG_PROC=y
@@ -105,10 +102,6 @@ CONFIG_SLAB=y
105CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
106# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
107CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
108
109#
110# Loadable module support
111#
112CONFIG_MODULES=y 105CONFIG_MODULES=y
113CONFIG_MODULE_UNLOAD=y 106CONFIG_MODULE_UNLOAD=y
114# CONFIG_MODULE_FORCE_UNLOAD is not set 107# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -116,12 +109,9 @@ CONFIG_MODVERSIONS=y
116CONFIG_MODULE_SRCVERSION_ALL=y 109CONFIG_MODULE_SRCVERSION_ALL=y
117CONFIG_KMOD=y 110CONFIG_KMOD=y
118CONFIG_STOP_MACHINE=y 111CONFIG_STOP_MACHINE=y
119
120#
121# Block layer
122#
123CONFIG_BLOCK=y 112CONFIG_BLOCK=y
124CONFIG_BLK_DEV_IO_TRACE=y 113CONFIG_BLK_DEV_IO_TRACE=y
114CONFIG_BLK_DEV_BSG=y
125 115
126# 116#
127# IO Schedulers 117# IO Schedulers
@@ -141,7 +131,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
141# 131#
142CONFIG_PPC_MULTIPLATFORM=y 132CONFIG_PPC_MULTIPLATFORM=y
143# CONFIG_EMBEDDED6xx is not set 133# CONFIG_EMBEDDED6xx is not set
144# CONFIG_APUS is not set 134# CONFIG_PPC_82xx is not set
135# CONFIG_PPC_83xx is not set
136# CONFIG_PPC_86xx is not set
145CONFIG_PPC_PSERIES=y 137CONFIG_PPC_PSERIES=y
146CONFIG_PPC_SPLPAR=y 138CONFIG_PPC_SPLPAR=y
147CONFIG_EEH=y 139CONFIG_EEH=y
@@ -177,6 +169,7 @@ CONFIG_SPU_BASE=y
177CONFIG_CBE_RAS=y 169CONFIG_CBE_RAS=y
178CONFIG_CBE_THERM=m 170CONFIG_CBE_THERM=m
179CONFIG_CBE_CPUFREQ=m 171CONFIG_CBE_CPUFREQ=m
172CONFIG_CBE_CPUFREQ_PMI=m
180# CONFIG_PQ2ADS is not set 173# CONFIG_PQ2ADS is not set
181CONFIG_PPC_NATIVE=y 174CONFIG_PPC_NATIVE=y
182CONFIG_UDBG_RTAS_CONSOLE=y 175CONFIG_UDBG_RTAS_CONSOLE=y
@@ -217,6 +210,8 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
217# 210#
218CONFIG_CPU_FREQ_PMAC64=y 211CONFIG_CPU_FREQ_PMAC64=y
219# CONFIG_CPM2 is not set 212# CONFIG_CPM2 is not set
213CONFIG_AXON_RAM=m
214# CONFIG_FSL_ULI1575 is not set
220 215
221# 216#
222# Kernel options 217# Kernel options
@@ -258,6 +253,7 @@ CONFIG_MEMORY_HOTPLUG_SPARSE=y
258CONFIG_SPLIT_PTLOCK_CPUS=4 253CONFIG_SPLIT_PTLOCK_CPUS=4
259CONFIG_RESOURCES_64BIT=y 254CONFIG_RESOURCES_64BIT=y
260CONFIG_ZONE_DMA_FLAG=1 255CONFIG_ZONE_DMA_FLAG=1
256CONFIG_BOUNCE=y
261CONFIG_ARCH_MEMORY_PROBE=y 257CONFIG_ARCH_MEMORY_PROBE=y
262CONFIG_PPC_HAS_HASH_64K=y 258CONFIG_PPC_HAS_HASH_64K=y
263# CONFIG_PPC_64K_PAGES is not set 259# CONFIG_PPC_64K_PAGES is not set
@@ -265,6 +261,7 @@ CONFIG_PPC_HAS_HASH_64K=y
265CONFIG_PROC_DEVICETREE=y 261CONFIG_PROC_DEVICETREE=y
266# CONFIG_CMDLINE_BOOL is not set 262# CONFIG_CMDLINE_BOOL is not set
267# CONFIG_PM is not set 263# CONFIG_PM is not set
264CONFIG_SUSPEND_SMP_POSSIBLE=y
268CONFIG_SECCOMP=y 265CONFIG_SECCOMP=y
269# CONFIG_WANT_DEVICE_TREE is not set 266# CONFIG_WANT_DEVICE_TREE is not set
270CONFIG_ISA_DMA_API=y 267CONFIG_ISA_DMA_API=y
@@ -277,6 +274,7 @@ CONFIG_GENERIC_ISA_DMA=y
277# CONFIG_PPC_INDIRECT_PCI is not set 274# CONFIG_PPC_INDIRECT_PCI is not set
278CONFIG_PCI=y 275CONFIG_PCI=y
279CONFIG_PCI_DOMAINS=y 276CONFIG_PCI_DOMAINS=y
277CONFIG_PCI_SYSCALL=y
280# CONFIG_PCIEPORTBUS is not set 278# CONFIG_PCIEPORTBUS is not set
281CONFIG_ARCH_SUPPORTS_MSI=y 279CONFIG_ARCH_SUPPORTS_MSI=y
282CONFIG_PCI_MSI=y 280CONFIG_PCI_MSI=y
@@ -356,6 +354,7 @@ CONFIG_NF_CONNTRACK_MARK=y
356CONFIG_NF_CONNTRACK_EVENTS=y 354CONFIG_NF_CONNTRACK_EVENTS=y
357CONFIG_NF_CT_PROTO_GRE=m 355CONFIG_NF_CT_PROTO_GRE=m
358CONFIG_NF_CT_PROTO_SCTP=m 356CONFIG_NF_CT_PROTO_SCTP=m
357# CONFIG_NF_CT_PROTO_UDPLITE is not set
359CONFIG_NF_CONNTRACK_AMANDA=m 358CONFIG_NF_CONNTRACK_AMANDA=m
360CONFIG_NF_CONNTRACK_FTP=m 359CONFIG_NF_CONNTRACK_FTP=m
361CONFIG_NF_CONNTRACK_H323=m 360CONFIG_NF_CONNTRACK_H323=m
@@ -374,9 +373,11 @@ CONFIG_NETFILTER_XT_TARGET_MARK=m
374CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 373CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
375CONFIG_NETFILTER_XT_TARGET_NFLOG=m 374CONFIG_NETFILTER_XT_TARGET_NFLOG=m
376CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 375CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
376CONFIG_NETFILTER_XT_TARGET_TRACE=m
377CONFIG_NETFILTER_XT_TARGET_TCPMSS=m 377CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
378CONFIG_NETFILTER_XT_MATCH_COMMENT=m 378CONFIG_NETFILTER_XT_MATCH_COMMENT=m
379CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 379CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
380CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
380CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 381CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
381CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 382CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
382CONFIG_NETFILTER_XT_MATCH_DCCP=m 383CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -397,6 +398,7 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
397CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 398CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
398CONFIG_NETFILTER_XT_MATCH_STRING=m 399CONFIG_NETFILTER_XT_MATCH_STRING=m
399CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 400CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
401CONFIG_NETFILTER_XT_MATCH_U32=m
400CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m 402CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
401 403
402# 404#
@@ -481,6 +483,7 @@ CONFIG_NET_CLS_ROUTE=y
481# CONFIG_MAC80211 is not set 483# CONFIG_MAC80211 is not set
482# CONFIG_IEEE80211 is not set 484# CONFIG_IEEE80211 is not set
483# CONFIG_RFKILL is not set 485# CONFIG_RFKILL is not set
486# CONFIG_NET_9P is not set
484 487
485# 488#
486# Device Drivers 489# Device Drivers
@@ -495,28 +498,12 @@ CONFIG_FW_LOADER=y
495# CONFIG_DEBUG_DRIVER is not set 498# CONFIG_DEBUG_DRIVER is not set
496# CONFIG_DEBUG_DEVRES is not set 499# CONFIG_DEBUG_DEVRES is not set
497# CONFIG_SYS_HYPERVISOR is not set 500# CONFIG_SYS_HYPERVISOR is not set
498
499#
500# Connector - unified userspace <-> kernelspace linker
501#
502# CONFIG_CONNECTOR is not set 501# CONFIG_CONNECTOR is not set
503# CONFIG_MTD is not set 502# CONFIG_MTD is not set
504 503CONFIG_OF_DEVICE=y
505#
506# Parallel port support
507#
508# CONFIG_PARPORT is not set 504# CONFIG_PARPORT is not set
509 505CONFIG_BLK_DEV=y
510#
511# Plug and Play support
512#
513# CONFIG_PNPACPI is not set
514
515#
516# Block devices
517#
518CONFIG_BLK_DEV_FD=y 506CONFIG_BLK_DEV_FD=y
519# CONFIG_BLK_CPQ_DA is not set
520# CONFIG_BLK_CPQ_CISS_DA is not set 507# CONFIG_BLK_CPQ_CISS_DA is not set
521# CONFIG_BLK_DEV_DAC960 is not set 508# CONFIG_BLK_DEV_DAC960 is not set
522# CONFIG_BLK_DEV_UMEM is not set 509# CONFIG_BLK_DEV_UMEM is not set
@@ -532,14 +519,11 @@ CONFIG_BLK_DEV_RAM_SIZE=65536
532CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 519CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
533# CONFIG_CDROM_PKTCDVD is not set 520# CONFIG_CDROM_PKTCDVD is not set
534# CONFIG_ATA_OVER_ETH is not set 521# CONFIG_ATA_OVER_ETH is not set
535 522CONFIG_MISC_DEVICES=y
536#
537# Misc devices
538#
539# CONFIG_PHANTOM is not set 523# CONFIG_PHANTOM is not set
524# CONFIG_EEPROM_93CX6 is not set
540# CONFIG_SGI_IOC4 is not set 525# CONFIG_SGI_IOC4 is not set
541# CONFIG_TIFM_CORE is not set 526# CONFIG_TIFM_CORE is not set
542# CONFIG_BLINK is not set
543CONFIG_IDE=y 527CONFIG_IDE=y
544CONFIG_BLK_DEV_IDE=y 528CONFIG_BLK_DEV_IDE=y
545 529
@@ -608,6 +592,7 @@ CONFIG_BLK_DEV_IDEDMA=y
608# 592#
609# CONFIG_RAID_ATTRS is not set 593# CONFIG_RAID_ATTRS is not set
610CONFIG_SCSI=y 594CONFIG_SCSI=y
595CONFIG_SCSI_DMA=y
611# CONFIG_SCSI_TGT is not set 596# CONFIG_SCSI_TGT is not set
612CONFIG_SCSI_NETLINK=y 597CONFIG_SCSI_NETLINK=y
613CONFIG_SCSI_PROC_FS=y 598CONFIG_SCSI_PROC_FS=y
@@ -640,10 +625,7 @@ CONFIG_SCSI_FC_ATTRS=y
640CONFIG_SCSI_ISCSI_ATTRS=m 625CONFIG_SCSI_ISCSI_ATTRS=m
641# CONFIG_SCSI_SAS_ATTRS is not set 626# CONFIG_SCSI_SAS_ATTRS is not set
642# CONFIG_SCSI_SAS_LIBSAS is not set 627# CONFIG_SCSI_SAS_LIBSAS is not set
643 628CONFIG_SCSI_LOWLEVEL=y
644#
645# SCSI low-level drivers
646#
647# CONFIG_ISCSI_TCP is not set 629# CONFIG_ISCSI_TCP is not set
648# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 630# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
649# CONFIG_SCSI_3W_9XXX is not set 631# CONFIG_SCSI_3W_9XXX is not set
@@ -658,7 +640,6 @@ CONFIG_SCSI_ISCSI_ATTRS=m
658# CONFIG_MEGARAID_LEGACY is not set 640# CONFIG_MEGARAID_LEGACY is not set
659# CONFIG_MEGARAID_SAS is not set 641# CONFIG_MEGARAID_SAS is not set
660# CONFIG_SCSI_HPTIOP is not set 642# CONFIG_SCSI_HPTIOP is not set
661# CONFIG_SCSI_BUSLOGIC is not set
662# CONFIG_SCSI_DMX3191D is not set 643# CONFIG_SCSI_DMX3191D is not set
663# CONFIG_SCSI_EATA is not set 644# CONFIG_SCSI_EATA is not set
664# CONFIG_SCSI_FUTURE_DOMAIN is not set 645# CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -739,10 +720,6 @@ CONFIG_SATA_SVW=y
739# CONFIG_PATA_VIA is not set 720# CONFIG_PATA_VIA is not set
740CONFIG_PATA_WINBOND=y 721CONFIG_PATA_WINBOND=y
741CONFIG_PATA_SCC=y 722CONFIG_PATA_SCC=y
742
743#
744# Multi-device support (RAID and LVM)
745#
746CONFIG_MD=y 723CONFIG_MD=y
747CONFIG_BLK_DEV_MD=y 724CONFIG_BLK_DEV_MD=y
748CONFIG_MD_LINEAR=y 725CONFIG_MD_LINEAR=y
@@ -761,6 +738,7 @@ CONFIG_DM_MIRROR=m
761CONFIG_DM_ZERO=m 738CONFIG_DM_ZERO=m
762CONFIG_DM_MULTIPATH=m 739CONFIG_DM_MULTIPATH=m
763CONFIG_DM_MULTIPATH_EMC=m 740CONFIG_DM_MULTIPATH_EMC=m
741# CONFIG_DM_MULTIPATH_RDAC is not set
764# CONFIG_DM_DELAY is not set 742# CONFIG_DM_DELAY is not set
765 743
766# 744#
@@ -797,10 +775,6 @@ CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y
797CONFIG_IEEE1394_ETH1394=m 775CONFIG_IEEE1394_ETH1394=m
798CONFIG_IEEE1394_DV1394=m 776CONFIG_IEEE1394_DV1394=m
799CONFIG_IEEE1394_RAWIO=y 777CONFIG_IEEE1394_RAWIO=y
800
801#
802# I2O device support
803#
804# CONFIG_I2O is not set 778# CONFIG_I2O is not set
805CONFIG_MACINTOSH_DRIVERS=y 779CONFIG_MACINTOSH_DRIVERS=y
806CONFIG_ADB_PMU=y 780CONFIG_ADB_PMU=y
@@ -813,13 +787,11 @@ CONFIG_WINDFARM_PM81=y
813CONFIG_WINDFARM_PM91=y 787CONFIG_WINDFARM_PM91=y
814CONFIG_WINDFARM_PM112=y 788CONFIG_WINDFARM_PM112=y
815# CONFIG_PMAC_RACKMETER is not set 789# CONFIG_PMAC_RACKMETER is not set
816
817#
818# Network device support
819#
820CONFIG_NETDEVICES=y 790CONFIG_NETDEVICES=y
791# CONFIG_NETDEVICES_MULTIQUEUE is not set
821CONFIG_DUMMY=m 792CONFIG_DUMMY=m
822CONFIG_BONDING=m 793CONFIG_BONDING=m
794# CONFIG_MACVLAN is not set
823# CONFIG_EQUALIZER is not set 795# CONFIG_EQUALIZER is not set
824CONFIG_TUN=m 796CONFIG_TUN=m
825# CONFIG_ARCNET is not set 797# CONFIG_ARCNET is not set
@@ -836,13 +808,10 @@ CONFIG_MARVELL_PHY=m
836# CONFIG_VITESSE_PHY is not set 808# CONFIG_VITESSE_PHY is not set
837# CONFIG_SMSC_PHY is not set 809# CONFIG_SMSC_PHY is not set
838CONFIG_BROADCOM_PHY=m 810CONFIG_BROADCOM_PHY=m
811# CONFIG_ICPLUS_PHY is not set
839CONFIG_FIXED_PHY=m 812CONFIG_FIXED_PHY=m
840CONFIG_FIXED_MII_10_FDX=y 813CONFIG_FIXED_MII_10_FDX=y
841CONFIG_FIXED_MII_100_FDX=y 814CONFIG_FIXED_MII_100_FDX=y
842
843#
844# Ethernet (10 or 100Mbit)
845#
846CONFIG_NET_ETHERNET=y 815CONFIG_NET_ETHERNET=y
847CONFIG_MII=y 816CONFIG_MII=y
848# CONFIG_HAPPYMEAL is not set 817# CONFIG_HAPPYMEAL is not set
@@ -851,10 +820,6 @@ CONFIG_SUNGEM=y
851CONFIG_NET_VENDOR_3COM=y 820CONFIG_NET_VENDOR_3COM=y
852CONFIG_VORTEX=y 821CONFIG_VORTEX=y
853# CONFIG_TYPHOON is not set 822# CONFIG_TYPHOON is not set
854
855#
856# Tulip family network device support
857#
858# CONFIG_NET_TULIP is not set 823# CONFIG_NET_TULIP is not set
859# CONFIG_HP100 is not set 824# CONFIG_HP100 is not set
860CONFIG_IBMVETH=m 825CONFIG_IBMVETH=m
@@ -892,7 +857,6 @@ CONFIG_E1000=y
892# CONFIG_SIS190 is not set 857# CONFIG_SIS190 is not set
893# CONFIG_SKGE is not set 858# CONFIG_SKGE is not set
894# CONFIG_SKY2 is not set 859# CONFIG_SKY2 is not set
895# CONFIG_SK98LIN is not set
896# CONFIG_VIA_VELOCITY is not set 860# CONFIG_VIA_VELOCITY is not set
897CONFIG_TIGON3=y 861CONFIG_TIGON3=y
898# CONFIG_BNX2 is not set 862# CONFIG_BNX2 is not set
@@ -942,6 +906,7 @@ CONFIG_PPP_DEFLATE=m
942CONFIG_PPP_BSDCOMP=m 906CONFIG_PPP_BSDCOMP=m
943# CONFIG_PPP_MPPE is not set 907# CONFIG_PPP_MPPE is not set
944CONFIG_PPPOE=m 908CONFIG_PPPOE=m
909# CONFIG_PPPOL2TP is not set
945# CONFIG_SLIP is not set 910# CONFIG_SLIP is not set
946CONFIG_SLHC=m 911CONFIG_SLHC=m
947# CONFIG_NET_FC is not set 912# CONFIG_NET_FC is not set
@@ -950,15 +915,7 @@ CONFIG_NETCONSOLE=y
950CONFIG_NETPOLL=y 915CONFIG_NETPOLL=y
951CONFIG_NETPOLL_TRAP=y 916CONFIG_NETPOLL_TRAP=y
952CONFIG_NET_POLL_CONTROLLER=y 917CONFIG_NET_POLL_CONTROLLER=y
953
954#
955# ISDN subsystem
956#
957# CONFIG_ISDN is not set 918# CONFIG_ISDN is not set
958
959#
960# Telephony Support
961#
962# CONFIG_PHONE is not set 919# CONFIG_PHONE is not set
963 920
964# 921#
@@ -1065,10 +1022,6 @@ CONFIG_HVC_ISERIES=y
1065CONFIG_HVC_RTAS=y 1022CONFIG_HVC_RTAS=y
1066CONFIG_HVC_BEAT=y 1023CONFIG_HVC_BEAT=y
1067CONFIG_HVCS=m 1024CONFIG_HVCS=m
1068
1069#
1070# IPMI
1071#
1072# CONFIG_IPMI_HANDLER is not set 1025# CONFIG_IPMI_HANDLER is not set
1073# CONFIG_WATCHDOG is not set 1026# CONFIG_WATCHDOG is not set
1074# CONFIG_HW_RANDOM is not set 1027# CONFIG_HW_RANDOM is not set
@@ -1081,10 +1034,6 @@ CONFIG_GEN_RTC=y
1081CONFIG_RAW_DRIVER=y 1034CONFIG_RAW_DRIVER=y
1082CONFIG_MAX_RAW_DEVS=256 1035CONFIG_MAX_RAW_DEVS=256
1083# CONFIG_HANGCHECK_TIMER is not set 1036# CONFIG_HANGCHECK_TIMER is not set
1084
1085#
1086# TPM devices
1087#
1088# CONFIG_TCG_TPM is not set 1037# CONFIG_TCG_TPM is not set
1089CONFIG_DEVPORT=y 1038CONFIG_DEVPORT=y
1090CONFIG_I2C=y 1039CONFIG_I2C=y
@@ -1119,6 +1068,7 @@ CONFIG_I2C_POWERMAC=y
1119# CONFIG_I2C_SIS5595 is not set 1068# CONFIG_I2C_SIS5595 is not set
1120# CONFIG_I2C_SIS630 is not set 1069# CONFIG_I2C_SIS630 is not set
1121# CONFIG_I2C_SIS96X is not set 1070# CONFIG_I2C_SIS96X is not set
1071# CONFIG_I2C_TAOS_EVM is not set
1122# CONFIG_I2C_STUB is not set 1072# CONFIG_I2C_STUB is not set
1123# CONFIG_I2C_TINY_USB is not set 1073# CONFIG_I2C_TINY_USB is not set
1124# CONFIG_I2C_VIA is not set 1074# CONFIG_I2C_VIA is not set
@@ -1130,11 +1080,13 @@ CONFIG_I2C_POWERMAC=y
1130# 1080#
1131# CONFIG_SENSORS_DS1337 is not set 1081# CONFIG_SENSORS_DS1337 is not set
1132# CONFIG_SENSORS_DS1374 is not set 1082# CONFIG_SENSORS_DS1374 is not set
1083# CONFIG_DS1682 is not set
1133# CONFIG_SENSORS_EEPROM is not set 1084# CONFIG_SENSORS_EEPROM is not set
1134# CONFIG_SENSORS_PCF8574 is not set 1085# CONFIG_SENSORS_PCF8574 is not set
1135# CONFIG_SENSORS_PCA9539 is not set 1086# CONFIG_SENSORS_PCA9539 is not set
1136# CONFIG_SENSORS_PCF8591 is not set 1087# CONFIG_SENSORS_PCF8591 is not set
1137# CONFIG_SENSORS_MAX6875 is not set 1088# CONFIG_SENSORS_MAX6875 is not set
1089# CONFIG_SENSORS_TSL2550 is not set
1138# CONFIG_I2C_DEBUG_CORE is not set 1090# CONFIG_I2C_DEBUG_CORE is not set
1139# CONFIG_I2C_DEBUG_ALGO is not set 1091# CONFIG_I2C_DEBUG_ALGO is not set
1140# CONFIG_I2C_DEBUG_BUS is not set 1092# CONFIG_I2C_DEBUG_BUS is not set
@@ -1145,11 +1097,8 @@ CONFIG_I2C_POWERMAC=y
1145# 1097#
1146# CONFIG_SPI is not set 1098# CONFIG_SPI is not set
1147# CONFIG_SPI_MASTER is not set 1099# CONFIG_SPI_MASTER is not set
1148
1149#
1150# Dallas's 1-wire bus
1151#
1152# CONFIG_W1 is not set 1100# CONFIG_W1 is not set
1101# CONFIG_POWER_SUPPLY is not set
1153# CONFIG_HWMON is not set 1102# CONFIG_HWMON is not set
1154 1103
1155# 1104#
@@ -1168,8 +1117,8 @@ CONFIG_I2C_POWERMAC=y
1168# Graphics support 1117# Graphics support
1169# 1118#
1170CONFIG_BACKLIGHT_LCD_SUPPORT=y 1119CONFIG_BACKLIGHT_LCD_SUPPORT=y
1171CONFIG_BACKLIGHT_CLASS_DEVICE=y
1172CONFIG_LCD_CLASS_DEVICE=y 1120CONFIG_LCD_CLASS_DEVICE=y
1121CONFIG_BACKLIGHT_CLASS_DEVICE=y
1173 1122
1174# 1123#
1175# Display device support 1124# Display device support
@@ -1180,6 +1129,7 @@ CONFIG_DISPLAY_SUPPORT=y
1180# Display hardware drivers 1129# Display hardware drivers
1181# 1130#
1182# CONFIG_VGASTATE is not set 1131# CONFIG_VGASTATE is not set
1132CONFIG_VIDEO_OUTPUT_CONTROL=m
1183CONFIG_FB=y 1133CONFIG_FB=y
1184CONFIG_FIRMWARE_EDID=y 1134CONFIG_FIRMWARE_EDID=y
1185CONFIG_FB_DDC=y 1135CONFIG_FB_DDC=y
@@ -1243,11 +1193,13 @@ CONFIG_FB_IBM_GXT4500=y
1243# CONFIG_VGA_CONSOLE is not set 1193# CONFIG_VGA_CONSOLE is not set
1244CONFIG_DUMMY_CONSOLE=y 1194CONFIG_DUMMY_CONSOLE=y
1245CONFIG_FRAMEBUFFER_CONSOLE=y 1195CONFIG_FRAMEBUFFER_CONSOLE=y
1196# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1246# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 1197# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1247# CONFIG_FONTS is not set 1198# CONFIG_FONTS is not set
1248CONFIG_FONT_8x8=y 1199CONFIG_FONT_8x8=y
1249CONFIG_FONT_8x16=y 1200CONFIG_FONT_8x16=y
1250CONFIG_LOGO=y 1201CONFIG_LOGO=y
1202CONFIG_FB_LOGO_EXTRA=y
1251CONFIG_LOGO_LINUX_MONO=y 1203CONFIG_LOGO_LINUX_MONO=y
1252CONFIG_LOGO_LINUX_VGA16=y 1204CONFIG_LOGO_LINUX_VGA16=y
1253CONFIG_LOGO_LINUX_CLUT224=y 1205CONFIG_LOGO_LINUX_CLUT224=y
@@ -1303,6 +1255,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
1303# CONFIG_SND_CMIPCI is not set 1255# CONFIG_SND_CMIPCI is not set
1304# CONFIG_SND_CS4281 is not set 1256# CONFIG_SND_CS4281 is not set
1305# CONFIG_SND_CS46XX is not set 1257# CONFIG_SND_CS46XX is not set
1258# CONFIG_SND_CS5530 is not set
1306# CONFIG_SND_DARLA20 is not set 1259# CONFIG_SND_DARLA20 is not set
1307# CONFIG_SND_GINA20 is not set 1260# CONFIG_SND_GINA20 is not set
1308# CONFIG_SND_LAYLA20 is not set 1261# CONFIG_SND_LAYLA20 is not set
@@ -1352,6 +1305,10 @@ CONFIG_SND_POWERMAC=m
1352CONFIG_SND_POWERMAC_AUTO_DRC=y 1305CONFIG_SND_POWERMAC_AUTO_DRC=y
1353 1306
1354# 1307#
1308# ALSA PowerPC devices
1309#
1310
1311#
1355# Apple Onboard Audio driver 1312# Apple Onboard Audio driver
1356# 1313#
1357CONFIG_SND_AOA=m 1314CONFIG_SND_AOA=m
@@ -1375,13 +1332,14 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
1375# CONFIG_SND_SOC is not set 1332# CONFIG_SND_SOC is not set
1376 1333
1377# 1334#
1378# Open Sound System 1335# SoC Audio support for SuperH
1379# 1336#
1380# CONFIG_SOUND_PRIME is not set
1381 1337
1382# 1338#
1383# HID Devices 1339# Open Sound System
1384# 1340#
1341# CONFIG_SOUND_PRIME is not set
1342CONFIG_HID_SUPPORT=y
1385CONFIG_HID=y 1343CONFIG_HID=y
1386# CONFIG_HID_DEBUG is not set 1344# CONFIG_HID_DEBUG is not set
1387 1345
@@ -1392,10 +1350,7 @@ CONFIG_USB_HID=y
1392# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1350# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1393# CONFIG_HID_FF is not set 1351# CONFIG_HID_FF is not set
1394CONFIG_USB_HIDDEV=y 1352CONFIG_USB_HIDDEV=y
1395 1353CONFIG_USB_SUPPORT=y
1396#
1397# USB support
1398#
1399CONFIG_USB_ARCH_HAS_HCD=y 1354CONFIG_USB_ARCH_HAS_HCD=y
1400CONFIG_USB_ARCH_HAS_OHCI=y 1355CONFIG_USB_ARCH_HAS_OHCI=y
1401CONFIG_USB_ARCH_HAS_EHCI=y 1356CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1426,6 +1381,7 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1426CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1381CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1427# CONFIG_USB_UHCI_HCD is not set 1382# CONFIG_USB_UHCI_HCD is not set
1428# CONFIG_USB_SL811_HCD is not set 1383# CONFIG_USB_SL811_HCD is not set
1384# CONFIG_USB_R8A66597_HCD is not set
1429 1385
1430# 1386#
1431# USB Device Class drivers 1387# USB Device Class drivers
@@ -1504,23 +1460,7 @@ CONFIG_USB_APPLEDISPLAY=m
1504# 1460#
1505# CONFIG_USB_GADGET is not set 1461# CONFIG_USB_GADGET is not set
1506# CONFIG_MMC is not set 1462# CONFIG_MMC is not set
1507
1508#
1509# LED devices
1510#
1511# CONFIG_NEW_LEDS is not set 1463# CONFIG_NEW_LEDS is not set
1512
1513#
1514# LED drivers
1515#
1516
1517#
1518# LED Triggers
1519#
1520
1521#
1522# InfiniBand support
1523#
1524CONFIG_INFINIBAND=m 1464CONFIG_INFINIBAND=m
1525# CONFIG_INFINIBAND_USER_MAD is not set 1465# CONFIG_INFINIBAND_USER_MAD is not set
1526# CONFIG_INFINIBAND_USER_ACCESS is not set 1466# CONFIG_INFINIBAND_USER_ACCESS is not set
@@ -1536,14 +1476,13 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y
1536# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set 1476# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
1537# CONFIG_INFINIBAND_SRP is not set 1477# CONFIG_INFINIBAND_SRP is not set
1538CONFIG_INFINIBAND_ISER=m 1478CONFIG_INFINIBAND_ISER=m
1479CONFIG_EDAC=y
1539 1480
1540# 1481#
1541# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 1482# Reporting subsystems
1542#
1543
1544#
1545# Real Time Clock
1546# 1483#
1484# CONFIG_EDAC_DEBUG is not set
1485CONFIG_EDAC_MM_EDAC=y
1547# CONFIG_RTC_CLASS is not set 1486# CONFIG_RTC_CLASS is not set
1548 1487
1549# 1488#
@@ -1560,6 +1499,11 @@ CONFIG_INFINIBAND_ISER=m
1560# 1499#
1561 1500
1562# 1501#
1502# Userspace I/O
1503#
1504# CONFIG_UIO is not set
1505
1506#
1563# File systems 1507# File systems
1564# 1508#
1565CONFIG_EXT2_FS=y 1509CONFIG_EXT2_FS=y
@@ -1690,7 +1634,6 @@ CONFIG_CIFS_POSIX=y
1690# CONFIG_NCP_FS is not set 1634# CONFIG_NCP_FS is not set
1691# CONFIG_CODA_FS is not set 1635# CONFIG_CODA_FS is not set
1692# CONFIG_AFS_FS is not set 1636# CONFIG_AFS_FS is not set
1693# CONFIG_9P_FS is not set
1694 1637
1695# 1638#
1696# Partition Types 1639# Partition Types
@@ -1772,6 +1715,7 @@ CONFIG_CRC_CCITT=m
1772# CONFIG_CRC16 is not set 1715# CONFIG_CRC16 is not set
1773# CONFIG_CRC_ITU_T is not set 1716# CONFIG_CRC_ITU_T is not set
1774CONFIG_CRC32=y 1717CONFIG_CRC32=y
1718# CONFIG_CRC7 is not set
1775CONFIG_LIBCRC32C=m 1719CONFIG_LIBCRC32C=m
1776CONFIG_ZLIB_INFLATE=y 1720CONFIG_ZLIB_INFLATE=y
1777CONFIG_ZLIB_DEFLATE=m 1721CONFIG_ZLIB_DEFLATE=m
@@ -1803,6 +1747,7 @@ CONFIG_DEBUG_FS=y
1803CONFIG_DEBUG_KERNEL=y 1747CONFIG_DEBUG_KERNEL=y
1804# CONFIG_DEBUG_SHIRQ is not set 1748# CONFIG_DEBUG_SHIRQ is not set
1805CONFIG_DETECT_SOFTLOCKUP=y 1749CONFIG_DETECT_SOFTLOCKUP=y
1750CONFIG_SCHED_DEBUG=y
1806# CONFIG_SCHEDSTATS is not set 1751# CONFIG_SCHEDSTATS is not set
1807# CONFIG_TIMER_STATS is not set 1752# CONFIG_TIMER_STATS is not set
1808# CONFIG_DEBUG_SLAB is not set 1753# CONFIG_DEBUG_SLAB is not set
@@ -1837,10 +1782,10 @@ CONFIG_BOOTX_TEXT=y
1837# 1782#
1838# CONFIG_KEYS is not set 1783# CONFIG_KEYS is not set
1839# CONFIG_SECURITY is not set 1784# CONFIG_SECURITY is not set
1840 1785CONFIG_XOR_BLOCKS=y
1841# 1786CONFIG_ASYNC_CORE=y
1842# Cryptographic options 1787CONFIG_ASYNC_MEMCPY=y
1843# 1788CONFIG_ASYNC_XOR=y
1844CONFIG_CRYPTO=y 1789CONFIG_CRYPTO=y
1845CONFIG_CRYPTO_ALGAPI=y 1790CONFIG_CRYPTO_ALGAPI=y
1846CONFIG_CRYPTO_BLKCIPHER=y 1791CONFIG_CRYPTO_BLKCIPHER=y
@@ -1880,7 +1825,4 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1880CONFIG_CRYPTO_CRC32C=m 1825CONFIG_CRYPTO_CRC32C=m
1881# CONFIG_CRYPTO_CAMELLIA is not set 1826# CONFIG_CRYPTO_CAMELLIA is not set
1882CONFIG_CRYPTO_TEST=m 1827CONFIG_CRYPTO_TEST=m
1883 1828# CONFIG_CRYPTO_HW is not set
1884#
1885# Hardware crypto devices
1886#
diff --git a/arch/powerpc/configs/prpmc2800_defconfig b/arch/powerpc/configs/prpmc2800_defconfig
index 858f865f2d..cce3d3da08 100644
--- a/arch/powerpc/configs/prpmc2800_defconfig
+++ b/arch/powerpc/configs/prpmc2800_defconfig
@@ -1,9 +1,26 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 14:15:11 2007 4# Tue Aug 28 21:24:45 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18CONFIG_PPC_STD_MMU=y
19CONFIG_PPC_STD_MMU_32=y
20# CONFIG_PPC_MM_SLICES is not set
21# CONFIG_SMP is not set
22CONFIG_NOT_COHERENT_CACHE=y
23CONFIG_CHECK_CACHE_COHERENCY=y
7CONFIG_PPC32=y 24CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 25CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 26CONFIG_MMU=y
@@ -14,63 +31,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y 31CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 32CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y 33CONFIG_GENERIC_FIND_NEXT_BIT=y
34# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
17CONFIG_PPC=y 35CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y 36CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y 37CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 38CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 39CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 40CONFIG_PPC_OF=y
41CONFIG_OF=y
23# CONFIG_PPC_UDBG_16550 is not set 42# CONFIG_PPC_UDBG_16550 is not set
24# CONFIG_GENERIC_TBSYNC is not set 43# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 44CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 45CONFIG_GENERIC_BUG=y
27# CONFIG_DEFAULT_UIMAGE is not set 46# CONFIG_DEFAULT_UIMAGE is not set
28
29#
30# Processor support
31#
32CONFIG_CLASSIC32=y
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_PPC_FPU=y
43# CONFIG_PPC_DCR_NATIVE is not set 47# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set 48# CONFIG_PPC_DCR_MMIO is not set
45CONFIG_ALTIVEC=y
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
49# CONFIG_SMP is not set
50CONFIG_NOT_COHERENT_CACHE=y
51CONFIG_CHECK_CACHE_COHERENCY=y
52CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
53 50
54# 51#
55# Code maturity level options 52# General setup
56# 53#
57CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
58CONFIG_BROKEN_ON_SMP=y 55CONFIG_BROKEN_ON_SMP=y
59CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
60
61#
62# General setup
63#
64CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
65CONFIG_LOCALVERSION_AUTO=y 58CONFIG_LOCALVERSION_AUTO=y
66CONFIG_SWAP=y 59CONFIG_SWAP=y
67CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
68# CONFIG_IPC_NS is not set
69CONFIG_SYSVIPC_SYSCTL=y 61CONFIG_SYSVIPC_SYSCTL=y
70CONFIG_POSIX_MQUEUE=y 62CONFIG_POSIX_MQUEUE=y
71# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
72# CONFIG_TASKSTATS is not set 64# CONFIG_TASKSTATS is not set
73# CONFIG_UTS_NS is not set 65# CONFIG_USER_NS is not set
74# CONFIG_AUDIT is not set 66# CONFIG_AUDIT is not set
75# CONFIG_IKCONFIG is not set 67# CONFIG_IKCONFIG is not set
76CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
@@ -103,19 +95,12 @@ CONFIG_SLAB=y
103CONFIG_RT_MUTEXES=y 95CONFIG_RT_MUTEXES=y
104# CONFIG_TINY_SHMEM is not set 96# CONFIG_TINY_SHMEM is not set
105CONFIG_BASE_SMALL=0 97CONFIG_BASE_SMALL=0
106
107#
108# Loadable module support
109#
110# CONFIG_MODULES is not set 98# CONFIG_MODULES is not set
111
112#
113# Block layer
114#
115CONFIG_BLOCK=y 99CONFIG_BLOCK=y
116CONFIG_LBD=y 100CONFIG_LBD=y
117# CONFIG_BLK_DEV_IO_TRACE is not set 101# CONFIG_BLK_DEV_IO_TRACE is not set
118# CONFIG_LSF is not set 102# CONFIG_LSF is not set
103# CONFIG_BLK_DEV_BSG is not set
119 104
120# 105#
121# IO Schedulers 106# IO Schedulers
@@ -135,7 +120,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
135# 120#
136# CONFIG_PPC_MULTIPLATFORM is not set 121# CONFIG_PPC_MULTIPLATFORM is not set
137CONFIG_EMBEDDED6xx=y 122CONFIG_EMBEDDED6xx=y
138# CONFIG_APUS is not set 123# CONFIG_PPC_82xx is not set
124# CONFIG_PPC_83xx is not set
125# CONFIG_PPC_86xx is not set
139# CONFIG_PPC_MPC52xx is not set 126# CONFIG_PPC_MPC52xx is not set
140# CONFIG_PPC_MPC5200 is not set 127# CONFIG_PPC_MPC5200 is not set
141# CONFIG_PPC_CELL is not set 128# CONFIG_PPC_CELL is not set
@@ -156,8 +143,8 @@ CONFIG_MV64X60=y
156# CONFIG_PPC_INDIRECT_IO is not set 143# CONFIG_PPC_INDIRECT_IO is not set
157# CONFIG_GENERIC_IOMAP is not set 144# CONFIG_GENERIC_IOMAP is not set
158# CONFIG_CPU_FREQ is not set 145# CONFIG_CPU_FREQ is not set
159# CONFIG_TAU is not set
160# CONFIG_CPM2 is not set 146# CONFIG_CPM2 is not set
147# CONFIG_FSL_ULI1575 is not set
161 148
162# 149#
163# Kernel options 150# Kernel options
@@ -187,6 +174,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
187CONFIG_SPLIT_PTLOCK_CPUS=4 174CONFIG_SPLIT_PTLOCK_CPUS=4
188# CONFIG_RESOURCES_64BIT is not set 175# CONFIG_RESOURCES_64BIT is not set
189CONFIG_ZONE_DMA_FLAG=1 176CONFIG_ZONE_DMA_FLAG=1
177CONFIG_BOUNCE=y
178CONFIG_VIRT_TO_BUS=y
190CONFIG_PROC_DEVICETREE=y 179CONFIG_PROC_DEVICETREE=y
191# CONFIG_CMDLINE_BOOL is not set 180# CONFIG_CMDLINE_BOOL is not set
192# CONFIG_PM is not set 181# CONFIG_PM is not set
@@ -201,9 +190,9 @@ CONFIG_ISA_DMA_API=y
201CONFIG_ZONE_DMA=y 190CONFIG_ZONE_DMA=y
202CONFIG_GENERIC_ISA_DMA=y 191CONFIG_GENERIC_ISA_DMA=y
203CONFIG_PPC_INDIRECT_PCI=y 192CONFIG_PPC_INDIRECT_PCI=y
204# CONFIG_PPC_INDIRECT_PCI_BE is not set
205CONFIG_PCI=y 193CONFIG_PCI=y
206CONFIG_PCI_DOMAINS=y 194CONFIG_PCI_DOMAINS=y
195CONFIG_PCI_SYSCALL=y
207# CONFIG_PCIEPORTBUS is not set 196# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y 197CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set 198# CONFIG_PCI_MSI is not set
@@ -315,6 +304,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
315# CONFIG_MAC80211 is not set 304# CONFIG_MAC80211 is not set
316# CONFIG_IEEE80211 is not set 305# CONFIG_IEEE80211 is not set
317# CONFIG_RFKILL is not set 306# CONFIG_RFKILL is not set
307# CONFIG_NET_9P is not set
318 308
319# 309#
320# Device Drivers 310# Device Drivers
@@ -327,10 +317,6 @@ CONFIG_STANDALONE=y
327CONFIG_PREVENT_FIRMWARE_BUILD=y 317CONFIG_PREVENT_FIRMWARE_BUILD=y
328# CONFIG_FW_LOADER is not set 318# CONFIG_FW_LOADER is not set
329# CONFIG_SYS_HYPERVISOR is not set 319# CONFIG_SYS_HYPERVISOR is not set
330
331#
332# Connector - unified userspace <-> kernelspace linker
333#
334# CONFIG_CONNECTOR is not set 320# CONFIG_CONNECTOR is not set
335CONFIG_MTD=y 321CONFIG_MTD=y
336# CONFIG_MTD_DEBUG is not set 322# CONFIG_MTD_DEBUG is not set
@@ -406,20 +392,9 @@ CONFIG_MTD_PHYSMAP_OF=y
406# UBI - Unsorted block images 392# UBI - Unsorted block images
407# 393#
408# CONFIG_MTD_UBI is not set 394# CONFIG_MTD_UBI is not set
409 395CONFIG_OF_DEVICE=y
410#
411# Parallel port support
412#
413# CONFIG_PARPORT is not set 396# CONFIG_PARPORT is not set
414 397CONFIG_BLK_DEV=y
415#
416# Plug and Play support
417#
418# CONFIG_PNPACPI is not set
419
420#
421# Block devices
422#
423# CONFIG_BLK_DEV_FD is not set 398# CONFIG_BLK_DEV_FD is not set
424# CONFIG_BLK_CPQ_DA is not set 399# CONFIG_BLK_CPQ_DA is not set
425# CONFIG_BLK_CPQ_CISS_DA is not set 400# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -437,14 +412,11 @@ CONFIG_BLK_DEV_RAM_SIZE=131072
437CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 412CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
438# CONFIG_CDROM_PKTCDVD is not set 413# CONFIG_CDROM_PKTCDVD is not set
439# CONFIG_ATA_OVER_ETH is not set 414# CONFIG_ATA_OVER_ETH is not set
440 415CONFIG_MISC_DEVICES=y
441#
442# Misc devices
443#
444# CONFIG_PHANTOM is not set 416# CONFIG_PHANTOM is not set
417# CONFIG_EEPROM_93CX6 is not set
445# CONFIG_SGI_IOC4 is not set 418# CONFIG_SGI_IOC4 is not set
446# CONFIG_TIFM_CORE is not set 419# CONFIG_TIFM_CORE is not set
447# CONFIG_BLINK is not set
448CONFIG_IDE=y 420CONFIG_IDE=y
449CONFIG_BLK_DEV_IDE=y 421CONFIG_BLK_DEV_IDE=y
450 422
@@ -509,6 +481,7 @@ CONFIG_BLK_DEV_IDEDMA=y
509# 481#
510# CONFIG_RAID_ATTRS is not set 482# CONFIG_RAID_ATTRS is not set
511CONFIG_SCSI=y 483CONFIG_SCSI=y
484CONFIG_SCSI_DMA=y
512# CONFIG_SCSI_TGT is not set 485# CONFIG_SCSI_TGT is not set
513# CONFIG_SCSI_NETLINK is not set 486# CONFIG_SCSI_NETLINK is not set
514CONFIG_SCSI_PROC_FS=y 487CONFIG_SCSI_PROC_FS=y
@@ -537,12 +510,8 @@ CONFIG_BLK_DEV_SD=y
537# CONFIG_SCSI_SPI_ATTRS is not set 510# CONFIG_SCSI_SPI_ATTRS is not set
538# CONFIG_SCSI_FC_ATTRS is not set 511# CONFIG_SCSI_FC_ATTRS is not set
539# CONFIG_SCSI_ISCSI_ATTRS is not set 512# CONFIG_SCSI_ISCSI_ATTRS is not set
540# CONFIG_SCSI_SAS_ATTRS is not set
541# CONFIG_SCSI_SAS_LIBSAS is not set 513# CONFIG_SCSI_SAS_LIBSAS is not set
542 514CONFIG_SCSI_LOWLEVEL=y
543#
544# SCSI low-level drivers
545#
546# CONFIG_ISCSI_TCP is not set 515# CONFIG_ISCSI_TCP is not set
547# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 516# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
548# CONFIG_SCSI_3W_9XXX is not set 517# CONFIG_SCSI_3W_9XXX is not set
@@ -632,10 +601,6 @@ CONFIG_SATA_MV=y
632# CONFIG_PATA_SIS is not set 601# CONFIG_PATA_SIS is not set
633# CONFIG_PATA_VIA is not set 602# CONFIG_PATA_VIA is not set
634# CONFIG_PATA_WINBOND is not set 603# CONFIG_PATA_WINBOND is not set
635
636#
637# Multi-device support (RAID and LVM)
638#
639# CONFIG_MD is not set 604# CONFIG_MD is not set
640 605
641# 606#
@@ -651,21 +616,15 @@ CONFIG_SATA_MV=y
651# 616#
652# CONFIG_FIREWIRE is not set 617# CONFIG_FIREWIRE is not set
653# CONFIG_IEEE1394 is not set 618# CONFIG_IEEE1394 is not set
654
655#
656# I2O device support
657#
658# CONFIG_I2O is not set 619# CONFIG_I2O is not set
659CONFIG_MACINTOSH_DRIVERS=y 620CONFIG_MACINTOSH_DRIVERS=y
660# CONFIG_MAC_EMUMOUSEBTN is not set 621# CONFIG_MAC_EMUMOUSEBTN is not set
661# CONFIG_WINDFARM is not set 622# CONFIG_WINDFARM is not set
662
663#
664# Network device support
665#
666CONFIG_NETDEVICES=y 623CONFIG_NETDEVICES=y
624# CONFIG_NETDEVICES_MULTIQUEUE is not set
667# CONFIG_DUMMY is not set 625# CONFIG_DUMMY is not set
668# CONFIG_BONDING is not set 626# CONFIG_BONDING is not set
627# CONFIG_MACVLAN is not set
669# CONFIG_EQUALIZER is not set 628# CONFIG_EQUALIZER is not set
670# CONFIG_TUN is not set 629# CONFIG_TUN is not set
671# CONFIG_ARCNET is not set 630# CONFIG_ARCNET is not set
@@ -682,21 +641,14 @@ CONFIG_PHYLIB=y
682# CONFIG_VITESSE_PHY is not set 641# CONFIG_VITESSE_PHY is not set
683# CONFIG_SMSC_PHY is not set 642# CONFIG_SMSC_PHY is not set
684# CONFIG_BROADCOM_PHY is not set 643# CONFIG_BROADCOM_PHY is not set
644# CONFIG_ICPLUS_PHY is not set
685# CONFIG_FIXED_PHY is not set 645# CONFIG_FIXED_PHY is not set
686
687#
688# Ethernet (10 or 100Mbit)
689#
690CONFIG_NET_ETHERNET=y 646CONFIG_NET_ETHERNET=y
691CONFIG_MII=y 647CONFIG_MII=y
692# CONFIG_HAPPYMEAL is not set 648# CONFIG_HAPPYMEAL is not set
693# CONFIG_SUNGEM is not set 649# CONFIG_SUNGEM is not set
694# CONFIG_CASSINI is not set 650# CONFIG_CASSINI is not set
695# CONFIG_NET_VENDOR_3COM is not set 651# CONFIG_NET_VENDOR_3COM is not set
696
697#
698# Tulip family network device support
699#
700# CONFIG_NET_TULIP is not set 652# CONFIG_NET_TULIP is not set
701# CONFIG_HP100 is not set 653# CONFIG_HP100 is not set
702CONFIG_NET_PCI=y 654CONFIG_NET_PCI=y
@@ -736,7 +688,6 @@ CONFIG_E1000=y
736# CONFIG_SIS190 is not set 688# CONFIG_SIS190 is not set
737# CONFIG_SKGE is not set 689# CONFIG_SKGE is not set
738# CONFIG_SKY2 is not set 690# CONFIG_SKY2 is not set
739# CONFIG_SK98LIN is not set
740# CONFIG_VIA_VELOCITY is not set 691# CONFIG_VIA_VELOCITY is not set
741# CONFIG_TIGON3 is not set 692# CONFIG_TIGON3 is not set
742# CONFIG_BNX2 is not set 693# CONFIG_BNX2 is not set
@@ -778,15 +729,7 @@ CONFIG_NETDEV_10000=y
778# CONFIG_NETCONSOLE is not set 729# CONFIG_NETCONSOLE is not set
779# CONFIG_NETPOLL is not set 730# CONFIG_NETPOLL is not set
780# CONFIG_NET_POLL_CONTROLLER is not set 731# CONFIG_NET_POLL_CONTROLLER is not set
781
782#
783# ISDN subsystem
784#
785# CONFIG_ISDN is not set 732# CONFIG_ISDN is not set
786
787#
788# Telephony Support
789#
790# CONFIG_PHONE is not set 733# CONFIG_PHONE is not set
791 734
792# 735#
@@ -850,10 +793,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
850CONFIG_UNIX98_PTYS=y 793CONFIG_UNIX98_PTYS=y
851CONFIG_LEGACY_PTYS=y 794CONFIG_LEGACY_PTYS=y
852CONFIG_LEGACY_PTY_COUNT=256 795CONFIG_LEGACY_PTY_COUNT=256
853
854#
855# IPMI
856#
857# CONFIG_IPMI_HANDLER is not set 796# CONFIG_IPMI_HANDLER is not set
858# CONFIG_WATCHDOG is not set 797# CONFIG_WATCHDOG is not set
859# CONFIG_HW_RANDOM is not set 798# CONFIG_HW_RANDOM is not set
@@ -865,10 +804,6 @@ CONFIG_GEN_RTC=y
865# CONFIG_AGP is not set 804# CONFIG_AGP is not set
866# CONFIG_DRM is not set 805# CONFIG_DRM is not set
867# CONFIG_RAW_DRIVER is not set 806# CONFIG_RAW_DRIVER is not set
868
869#
870# TPM devices
871#
872# CONFIG_TCG_TPM is not set 807# CONFIG_TCG_TPM is not set
873CONFIG_DEVPORT=y 808CONFIG_DEVPORT=y
874CONFIG_I2C=y 809CONFIG_I2C=y
@@ -903,6 +838,7 @@ CONFIG_I2C_CHARDEV=y
903# CONFIG_I2C_SIS5595 is not set 838# CONFIG_I2C_SIS5595 is not set
904# CONFIG_I2C_SIS630 is not set 839# CONFIG_I2C_SIS630 is not set
905# CONFIG_I2C_SIS96X is not set 840# CONFIG_I2C_SIS96X is not set
841# CONFIG_I2C_TAOS_EVM is not set
906# CONFIG_I2C_TINY_USB is not set 842# CONFIG_I2C_TINY_USB is not set
907# CONFIG_I2C_VIA is not set 843# CONFIG_I2C_VIA is not set
908# CONFIG_I2C_VIAPRO is not set 844# CONFIG_I2C_VIAPRO is not set
@@ -914,12 +850,14 @@ CONFIG_I2C_MV64XXX=y
914# 850#
915# CONFIG_SENSORS_DS1337 is not set 851# CONFIG_SENSORS_DS1337 is not set
916# CONFIG_SENSORS_DS1374 is not set 852# CONFIG_SENSORS_DS1374 is not set
853# CONFIG_DS1682 is not set
917# CONFIG_SENSORS_EEPROM is not set 854# CONFIG_SENSORS_EEPROM is not set
918# CONFIG_SENSORS_PCF8574 is not set 855# CONFIG_SENSORS_PCF8574 is not set
919# CONFIG_SENSORS_PCA9539 is not set 856# CONFIG_SENSORS_PCA9539 is not set
920# CONFIG_SENSORS_PCF8591 is not set 857# CONFIG_SENSORS_PCF8591 is not set
921# CONFIG_SENSORS_M41T00 is not set 858# CONFIG_SENSORS_M41T00 is not set
922# CONFIG_SENSORS_MAX6875 is not set 859# CONFIG_SENSORS_MAX6875 is not set
860# CONFIG_SENSORS_TSL2550 is not set
923# CONFIG_I2C_DEBUG_CORE is not set 861# CONFIG_I2C_DEBUG_CORE is not set
924# CONFIG_I2C_DEBUG_ALGO is not set 862# CONFIG_I2C_DEBUG_ALGO is not set
925# CONFIG_I2C_DEBUG_BUS is not set 863# CONFIG_I2C_DEBUG_BUS is not set
@@ -930,14 +868,12 @@ CONFIG_I2C_MV64XXX=y
930# 868#
931# CONFIG_SPI is not set 869# CONFIG_SPI is not set
932# CONFIG_SPI_MASTER is not set 870# CONFIG_SPI_MASTER is not set
933
934#
935# Dallas's 1-wire bus
936#
937# CONFIG_W1 is not set 871# CONFIG_W1 is not set
872# CONFIG_POWER_SUPPLY is not set
938CONFIG_HWMON=y 873CONFIG_HWMON=y
939# CONFIG_HWMON_VID is not set 874# CONFIG_HWMON_VID is not set
940# CONFIG_SENSORS_ABITUGURU is not set 875# CONFIG_SENSORS_ABITUGURU is not set
876# CONFIG_SENSORS_ABITUGURU3 is not set
941# CONFIG_SENSORS_AD7418 is not set 877# CONFIG_SENSORS_AD7418 is not set
942# CONFIG_SENSORS_ADM1021 is not set 878# CONFIG_SENSORS_ADM1021 is not set
943# CONFIG_SENSORS_ADM1025 is not set 879# CONFIG_SENSORS_ADM1025 is not set
@@ -964,14 +900,17 @@ CONFIG_HWMON=y
964# CONFIG_SENSORS_LM87 is not set 900# CONFIG_SENSORS_LM87 is not set
965# CONFIG_SENSORS_LM90 is not set 901# CONFIG_SENSORS_LM90 is not set
966# CONFIG_SENSORS_LM92 is not set 902# CONFIG_SENSORS_LM92 is not set
903# CONFIG_SENSORS_LM93 is not set
967# CONFIG_SENSORS_MAX1619 is not set 904# CONFIG_SENSORS_MAX1619 is not set
968# CONFIG_SENSORS_MAX6650 is not set 905# CONFIG_SENSORS_MAX6650 is not set
969# CONFIG_SENSORS_PC87360 is not set 906# CONFIG_SENSORS_PC87360 is not set
970# CONFIG_SENSORS_PC87427 is not set 907# CONFIG_SENSORS_PC87427 is not set
971# CONFIG_SENSORS_SIS5595 is not set 908# CONFIG_SENSORS_SIS5595 is not set
909# CONFIG_SENSORS_DME1737 is not set
972# CONFIG_SENSORS_SMSC47M1 is not set 910# CONFIG_SENSORS_SMSC47M1 is not set
973# CONFIG_SENSORS_SMSC47M192 is not set 911# CONFIG_SENSORS_SMSC47M192 is not set
974# CONFIG_SENSORS_SMSC47B397 is not set 912# CONFIG_SENSORS_SMSC47B397 is not set
913# CONFIG_SENSORS_THMC50 is not set
975# CONFIG_SENSORS_VIA686A is not set 914# CONFIG_SENSORS_VIA686A is not set
976# CONFIG_SENSORS_VT1211 is not set 915# CONFIG_SENSORS_VT1211 is not set
977# CONFIG_SENSORS_VT8231 is not set 916# CONFIG_SENSORS_VT8231 is not set
@@ -1006,6 +945,7 @@ CONFIG_HWMON=y
1006# 945#
1007# CONFIG_DISPLAY_SUPPORT is not set 946# CONFIG_DISPLAY_SUPPORT is not set
1008# CONFIG_VGASTATE is not set 947# CONFIG_VGASTATE is not set
948CONFIG_VIDEO_OUTPUT_CONTROL=y
1009# CONFIG_FB is not set 949# CONFIG_FB is not set
1010# CONFIG_FB_IBM_GXT4500 is not set 950# CONFIG_FB_IBM_GXT4500 is not set
1011 951
@@ -1020,10 +960,7 @@ CONFIG_DUMMY_CONSOLE=y
1020# Sound 960# Sound
1021# 961#
1022# CONFIG_SOUND is not set 962# CONFIG_SOUND is not set
1023 963CONFIG_HID_SUPPORT=y
1024#
1025# HID Devices
1026#
1027CONFIG_HID=y 964CONFIG_HID=y
1028# CONFIG_HID_DEBUG is not set 965# CONFIG_HID_DEBUG is not set
1029 966
@@ -1034,10 +971,7 @@ CONFIG_USB_HID=y
1034# CONFIG_USB_HIDINPUT_POWERBOOK is not set 971# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1035# CONFIG_HID_FF is not set 972# CONFIG_HID_FF is not set
1036# CONFIG_USB_HIDDEV is not set 973# CONFIG_USB_HIDDEV is not set
1037 974CONFIG_USB_SUPPORT=y
1038#
1039# USB support
1040#
1041CONFIG_USB_ARCH_HAS_HCD=y 975CONFIG_USB_ARCH_HAS_HCD=y
1042CONFIG_USB_ARCH_HAS_OHCI=y 976CONFIG_USB_ARCH_HAS_OHCI=y
1043CONFIG_USB_ARCH_HAS_EHCI=y 977CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1059,7 +993,6 @@ CONFIG_USB_EHCI_HCD=y
1059# CONFIG_USB_EHCI_SPLIT_ISO is not set 993# CONFIG_USB_EHCI_SPLIT_ISO is not set
1060# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 994# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1061# CONFIG_USB_EHCI_TT_NEWSCHED is not set 995# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1062# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1063# CONFIG_USB_ISP116X_HCD is not set 996# CONFIG_USB_ISP116X_HCD is not set
1064CONFIG_USB_OHCI_HCD=y 997CONFIG_USB_OHCI_HCD=y
1065# CONFIG_USB_OHCI_HCD_PPC_OF is not set 998# CONFIG_USB_OHCI_HCD_PPC_OF is not set
@@ -1068,6 +1001,7 @@ CONFIG_USB_OHCI_HCD=y
1068CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1001CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1069# CONFIG_USB_UHCI_HCD is not set 1002# CONFIG_USB_UHCI_HCD is not set
1070# CONFIG_USB_SL811_HCD is not set 1003# CONFIG_USB_SL811_HCD is not set
1004# CONFIG_USB_R8A66597_HCD is not set
1071 1005
1072# 1006#
1073# USB Device Class drivers 1007# USB Device Class drivers
@@ -1134,32 +1068,9 @@ CONFIG_USB_MON=y
1134# 1068#
1135# CONFIG_USB_GADGET is not set 1069# CONFIG_USB_GADGET is not set
1136# CONFIG_MMC is not set 1070# CONFIG_MMC is not set
1137
1138#
1139# LED devices
1140#
1141# CONFIG_NEW_LEDS is not set 1071# CONFIG_NEW_LEDS is not set
1142
1143#
1144# LED drivers
1145#
1146
1147#
1148# LED Triggers
1149#
1150
1151#
1152# InfiniBand support
1153#
1154# CONFIG_INFINIBAND is not set 1072# CONFIG_INFINIBAND is not set
1155 1073# CONFIG_EDAC is not set
1156#
1157# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1158#
1159
1160#
1161# Real Time Clock
1162#
1163CONFIG_RTC_LIB=y 1074CONFIG_RTC_LIB=y
1164CONFIG_RTC_CLASS=y 1075CONFIG_RTC_CLASS=y
1165CONFIG_RTC_HCTOSYS=y 1076CONFIG_RTC_HCTOSYS=y
@@ -1186,6 +1097,7 @@ CONFIG_RTC_DRV_MAX6900=y
1186# CONFIG_RTC_DRV_X1205 is not set 1097# CONFIG_RTC_DRV_X1205 is not set
1187# CONFIG_RTC_DRV_PCF8563 is not set 1098# CONFIG_RTC_DRV_PCF8563 is not set
1188# CONFIG_RTC_DRV_PCF8583 is not set 1099# CONFIG_RTC_DRV_PCF8583 is not set
1100# CONFIG_RTC_DRV_M41T80 is not set
1189 1101
1190# 1102#
1191# SPI RTC drivers 1103# SPI RTC drivers
@@ -1194,9 +1106,12 @@ CONFIG_RTC_DRV_MAX6900=y
1194# 1106#
1195# Platform RTC drivers 1107# Platform RTC drivers
1196# 1108#
1109# CONFIG_RTC_DRV_CMOS is not set
1197# CONFIG_RTC_DRV_DS1553 is not set 1110# CONFIG_RTC_DRV_DS1553 is not set
1111# CONFIG_RTC_DRV_STK17TA8 is not set
1198# CONFIG_RTC_DRV_DS1742 is not set 1112# CONFIG_RTC_DRV_DS1742 is not set
1199# CONFIG_RTC_DRV_M48T86 is not set 1113# CONFIG_RTC_DRV_M48T86 is not set
1114# CONFIG_RTC_DRV_M48T59 is not set
1200# CONFIG_RTC_DRV_V3020 is not set 1115# CONFIG_RTC_DRV_V3020 is not set
1201 1116
1202# 1117#
@@ -1217,6 +1132,11 @@ CONFIG_RTC_DRV_MAX6900=y
1217# 1132#
1218 1133
1219# 1134#
1135# Userspace I/O
1136#
1137# CONFIG_UIO is not set
1138
1139#
1220# File systems 1140# File systems
1221# 1141#
1222CONFIG_EXT2_FS=y 1142CONFIG_EXT2_FS=y
@@ -1310,7 +1230,6 @@ CONFIG_SUNRPC=y
1310# CONFIG_NCP_FS is not set 1230# CONFIG_NCP_FS is not set
1311# CONFIG_CODA_FS is not set 1231# CONFIG_CODA_FS is not set
1312# CONFIG_AFS_FS is not set 1232# CONFIG_AFS_FS is not set
1313# CONFIG_9P_FS is not set
1314 1233
1315# 1234#
1316# Partition Types 1235# Partition Types
@@ -1353,6 +1272,7 @@ CONFIG_BITREVERSE=y
1353# CONFIG_CRC16 is not set 1272# CONFIG_CRC16 is not set
1354# CONFIG_CRC_ITU_T is not set 1273# CONFIG_CRC_ITU_T is not set
1355CONFIG_CRC32=y 1274CONFIG_CRC32=y
1275# CONFIG_CRC7 is not set
1356# CONFIG_LIBCRC32C is not set 1276# CONFIG_LIBCRC32C is not set
1357CONFIG_PLIST=y 1277CONFIG_PLIST=y
1358CONFIG_HAS_IOMEM=y 1278CONFIG_HAS_IOMEM=y
@@ -1375,7 +1295,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1375# CONFIG_HEADERS_CHECK is not set 1295# CONFIG_HEADERS_CHECK is not set
1376# CONFIG_DEBUG_KERNEL is not set 1296# CONFIG_DEBUG_KERNEL is not set
1377CONFIG_DEBUG_BUGVERBOSE=y 1297CONFIG_DEBUG_BUGVERBOSE=y
1378# CONFIG_BOOTX_TEXT is not set
1379# CONFIG_PPC_EARLY_DEBUG is not set 1298# CONFIG_PPC_EARLY_DEBUG is not set
1380 1299
1381# 1300#
@@ -1383,8 +1302,4 @@ CONFIG_DEBUG_BUGVERBOSE=y
1383# 1302#
1384# CONFIG_KEYS is not set 1303# CONFIG_KEYS is not set
1385# CONFIG_SECURITY is not set 1304# CONFIG_SECURITY is not set
1386
1387#
1388# Cryptographic options
1389#
1390# CONFIG_CRYPTO is not set 1305# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 0caf0dd5ea..0f274e5f69 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -1,9 +1,23 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc6 3# Linux kernel version: 2.6.23-rc4
4# Tue Jun 26 14:17:45 2007 4# Thu Aug 30 16:50:02 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7
8#
9# Processor support
10#
11# CONFIG_POWER4_ONLY is not set
12CONFIG_POWER3=y
13CONFIG_POWER4=y
14CONFIG_PPC_FPU=y
15CONFIG_ALTIVEC=y
16CONFIG_PPC_STD_MMU=y
17CONFIG_PPC_MM_SLICES=y
18CONFIG_VIRT_CPU_ACCOUNTING=y
19CONFIG_SMP=y
20CONFIG_NR_CPUS=128
7CONFIG_64BIT=y 21CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y 22CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 23CONFIG_MMU=y
@@ -15,6 +29,7 @@ CONFIG_ARCH_HAS_ILOG2_U64=y
15CONFIG_GENERIC_HWEIGHT=y 29CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y 30CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y 31CONFIG_GENERIC_FIND_NEXT_BIT=y
32CONFIG_ARCH_NO_VIRT_TO_BUS=y
18CONFIG_PPC=y 33CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y 34CONFIG_EARLY_PRINTK=y
20CONFIG_COMPAT=y 35CONFIG_COMPAT=y
@@ -22,45 +37,27 @@ CONFIG_SYSVIPC_COMPAT=y
22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_ARCH_MAY_HAVE_PC_FDC=y 38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24CONFIG_PPC_OF=y 39CONFIG_PPC_OF=y
40CONFIG_OF=y
25CONFIG_PPC_UDBG_16550=y 41CONFIG_PPC_UDBG_16550=y
26# CONFIG_GENERIC_TBSYNC is not set 42# CONFIG_GENERIC_TBSYNC is not set
27CONFIG_AUDIT_ARCH=y 43CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y 44CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set 45# CONFIG_DEFAULT_UIMAGE is not set
30
31#
32# Processor support
33#
34# CONFIG_POWER4_ONLY is not set
35CONFIG_POWER3=y
36CONFIG_POWER4=y
37CONFIG_PPC_FPU=y
38# CONFIG_PPC_DCR_NATIVE is not set 46# CONFIG_PPC_DCR_NATIVE is not set
39# CONFIG_PPC_DCR_MMIO is not set 47# CONFIG_PPC_DCR_MMIO is not set
40# CONFIG_PPC_OF_PLATFORM_PCI is not set 48# CONFIG_PPC_OF_PLATFORM_PCI is not set
41CONFIG_ALTIVEC=y
42CONFIG_PPC_STD_MMU=y
43CONFIG_PPC_MM_SLICES=y
44CONFIG_VIRT_CPU_ACCOUNTING=y
45CONFIG_SMP=y
46CONFIG_NR_CPUS=128
47CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
48 50
49# 51#
50# Code maturity level options 52# General setup
51# 53#
52CONFIG_EXPERIMENTAL=y 54CONFIG_EXPERIMENTAL=y
53CONFIG_LOCK_KERNEL=y 55CONFIG_LOCK_KERNEL=y
54CONFIG_INIT_ENV_ARG_LIMIT=32 56CONFIG_INIT_ENV_ARG_LIMIT=32
55
56#
57# General setup
58#
59CONFIG_LOCALVERSION="" 57CONFIG_LOCALVERSION=""
60CONFIG_LOCALVERSION_AUTO=y 58CONFIG_LOCALVERSION_AUTO=y
61CONFIG_SWAP=y 59CONFIG_SWAP=y
62CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
63# CONFIG_IPC_NS is not set
64CONFIG_SYSVIPC_SYSCTL=y 61CONFIG_SYSVIPC_SYSCTL=y
65CONFIG_POSIX_MQUEUE=y 62CONFIG_POSIX_MQUEUE=y
66# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
@@ -68,7 +65,7 @@ CONFIG_TASKSTATS=y
68CONFIG_TASK_DELAY_ACCT=y 65CONFIG_TASK_DELAY_ACCT=y
69CONFIG_TASK_XACCT=y 66CONFIG_TASK_XACCT=y
70CONFIG_TASK_IO_ACCOUNTING=y 67CONFIG_TASK_IO_ACCOUNTING=y
71# CONFIG_UTS_NS is not set 68# CONFIG_USER_NS is not set
72CONFIG_AUDIT=y 69CONFIG_AUDIT=y
73CONFIG_AUDITSYSCALL=y 70CONFIG_AUDITSYSCALL=y
74CONFIG_IKCONFIG=y 71CONFIG_IKCONFIG=y
@@ -105,10 +102,6 @@ CONFIG_SLAB=y
105CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
106# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
107CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
108
109#
110# Loadable module support
111#
112CONFIG_MODULES=y 105CONFIG_MODULES=y
113CONFIG_MODULE_UNLOAD=y 106CONFIG_MODULE_UNLOAD=y
114# CONFIG_MODULE_FORCE_UNLOAD is not set 107# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -116,12 +109,9 @@ CONFIG_MODVERSIONS=y
116CONFIG_MODULE_SRCVERSION_ALL=y 109CONFIG_MODULE_SRCVERSION_ALL=y
117CONFIG_KMOD=y 110CONFIG_KMOD=y
118CONFIG_STOP_MACHINE=y 111CONFIG_STOP_MACHINE=y
119
120#
121# Block layer
122#
123CONFIG_BLOCK=y 112CONFIG_BLOCK=y
124# CONFIG_BLK_DEV_IO_TRACE is not set 113# CONFIG_BLK_DEV_IO_TRACE is not set
114CONFIG_BLK_DEV_BSG=y
125 115
126# 116#
127# IO Schedulers 117# IO Schedulers
@@ -141,7 +131,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
141# 131#
142CONFIG_PPC_MULTIPLATFORM=y 132CONFIG_PPC_MULTIPLATFORM=y
143# CONFIG_EMBEDDED6xx is not set 133# CONFIG_EMBEDDED6xx is not set
144# CONFIG_APUS is not set 134# CONFIG_PPC_82xx is not set
135# CONFIG_PPC_83xx is not set
136# CONFIG_PPC_86xx is not set
145CONFIG_PPC_PSERIES=y 137CONFIG_PPC_PSERIES=y
146CONFIG_PPC_SPLPAR=y 138CONFIG_PPC_SPLPAR=y
147CONFIG_EEH=y 139CONFIG_EEH=y
@@ -179,6 +171,7 @@ CONFIG_IBMEBUS=y
179# CONFIG_GENERIC_IOMAP is not set 171# CONFIG_GENERIC_IOMAP is not set
180# CONFIG_CPU_FREQ is not set 172# CONFIG_CPU_FREQ is not set
181# CONFIG_CPM2 is not set 173# CONFIG_CPM2 is not set
174# CONFIG_FSL_ULI1575 is not set
182 175
183# 176#
184# Kernel options 177# Kernel options
@@ -221,6 +214,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
221CONFIG_MIGRATION=y 214CONFIG_MIGRATION=y
222CONFIG_RESOURCES_64BIT=y 215CONFIG_RESOURCES_64BIT=y
223CONFIG_ZONE_DMA_FLAG=1 216CONFIG_ZONE_DMA_FLAG=1
217CONFIG_BOUNCE=y
224CONFIG_NODES_SPAN_OTHER_NODES=y 218CONFIG_NODES_SPAN_OTHER_NODES=y
225# CONFIG_PPC_HAS_HASH_64K is not set 219# CONFIG_PPC_HAS_HASH_64K is not set
226# CONFIG_PPC_64K_PAGES is not set 220# CONFIG_PPC_64K_PAGES is not set
@@ -228,6 +222,7 @@ CONFIG_SCHED_SMT=y
228CONFIG_PROC_DEVICETREE=y 222CONFIG_PROC_DEVICETREE=y
229# CONFIG_CMDLINE_BOOL is not set 223# CONFIG_CMDLINE_BOOL is not set
230# CONFIG_PM is not set 224# CONFIG_PM is not set
225CONFIG_SUSPEND_SMP_POSSIBLE=y
231CONFIG_SECCOMP=y 226CONFIG_SECCOMP=y
232# CONFIG_WANT_DEVICE_TREE is not set 227# CONFIG_WANT_DEVICE_TREE is not set
233CONFIG_ISA_DMA_API=y 228CONFIG_ISA_DMA_API=y
@@ -240,6 +235,7 @@ CONFIG_GENERIC_ISA_DMA=y
240# CONFIG_PPC_INDIRECT_PCI is not set 235# CONFIG_PPC_INDIRECT_PCI is not set
241CONFIG_PCI=y 236CONFIG_PCI=y
242CONFIG_PCI_DOMAINS=y 237CONFIG_PCI_DOMAINS=y
238CONFIG_PCI_SYSCALL=y
243# CONFIG_PCIEPORTBUS is not set 239# CONFIG_PCIEPORTBUS is not set
244CONFIG_ARCH_SUPPORTS_MSI=y 240CONFIG_ARCH_SUPPORTS_MSI=y
245CONFIG_PCI_MSI=y 241CONFIG_PCI_MSI=y
@@ -318,6 +314,7 @@ CONFIG_NF_CT_ACCT=y
318CONFIG_NF_CONNTRACK_MARK=y 314CONFIG_NF_CONNTRACK_MARK=y
319CONFIG_NF_CONNTRACK_EVENTS=y 315CONFIG_NF_CONNTRACK_EVENTS=y
320# CONFIG_NF_CT_PROTO_SCTP is not set 316# CONFIG_NF_CT_PROTO_SCTP is not set
317CONFIG_NF_CT_PROTO_UDPLITE=m
321# CONFIG_NF_CONNTRACK_AMANDA is not set 318# CONFIG_NF_CONNTRACK_AMANDA is not set
322CONFIG_NF_CONNTRACK_FTP=m 319CONFIG_NF_CONNTRACK_FTP=m
323# CONFIG_NF_CONNTRACK_H323 is not set 320# CONFIG_NF_CONNTRACK_H323 is not set
@@ -336,6 +333,7 @@ CONFIG_NETFILTER_XT_TARGET_NFLOG=m
336CONFIG_NETFILTER_XT_TARGET_TCPMSS=m 333CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
337CONFIG_NETFILTER_XT_MATCH_COMMENT=m 334CONFIG_NETFILTER_XT_MATCH_COMMENT=m
338CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 335CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
336CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
339CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 337CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
340CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 338CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
341CONFIG_NETFILTER_XT_MATCH_DCCP=m 339CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -356,6 +354,7 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
356CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 354CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
357CONFIG_NETFILTER_XT_MATCH_STRING=m 355CONFIG_NETFILTER_XT_MATCH_STRING=m
358CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 356CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
357CONFIG_NETFILTER_XT_MATCH_U32=m
359CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m 358CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
360 359
361# 360#
@@ -434,6 +433,7 @@ CONFIG_NET_CLS_ROUTE=y
434# CONFIG_MAC80211 is not set 433# CONFIG_MAC80211 is not set
435# CONFIG_IEEE80211 is not set 434# CONFIG_IEEE80211 is not set
436# CONFIG_RFKILL is not set 435# CONFIG_RFKILL is not set
436# CONFIG_NET_9P is not set
437 437
438# 438#
439# Device Drivers 439# Device Drivers
@@ -448,16 +448,9 @@ CONFIG_FW_LOADER=y
448# CONFIG_DEBUG_DRIVER is not set 448# CONFIG_DEBUG_DRIVER is not set
449# CONFIG_DEBUG_DEVRES is not set 449# CONFIG_DEBUG_DEVRES is not set
450# CONFIG_SYS_HYPERVISOR is not set 450# CONFIG_SYS_HYPERVISOR is not set
451
452#
453# Connector - unified userspace <-> kernelspace linker
454#
455# CONFIG_CONNECTOR is not set 451# CONFIG_CONNECTOR is not set
456# CONFIG_MTD is not set 452# CONFIG_MTD is not set
457 453CONFIG_OF_DEVICE=y
458#
459# Parallel port support
460#
461CONFIG_PARPORT=m 454CONFIG_PARPORT=m
462CONFIG_PARPORT_PC=m 455CONFIG_PARPORT_PC=m
463# CONFIG_PARPORT_SERIAL is not set 456# CONFIG_PARPORT_SERIAL is not set
@@ -466,18 +459,9 @@ CONFIG_PARPORT_PC=m
466# CONFIG_PARPORT_GSC is not set 459# CONFIG_PARPORT_GSC is not set
467# CONFIG_PARPORT_AX88796 is not set 460# CONFIG_PARPORT_AX88796 is not set
468# CONFIG_PARPORT_1284 is not set 461# CONFIG_PARPORT_1284 is not set
469 462CONFIG_BLK_DEV=y
470#
471# Plug and Play support
472#
473# CONFIG_PNPACPI is not set
474
475#
476# Block devices
477#
478CONFIG_BLK_DEV_FD=m 463CONFIG_BLK_DEV_FD=m
479# CONFIG_PARIDE is not set 464# CONFIG_PARIDE is not set
480# CONFIG_BLK_CPQ_DA is not set
481# CONFIG_BLK_CPQ_CISS_DA is not set 465# CONFIG_BLK_CPQ_CISS_DA is not set
482# CONFIG_BLK_DEV_DAC960 is not set 466# CONFIG_BLK_DEV_DAC960 is not set
483# CONFIG_BLK_DEV_UMEM is not set 467# CONFIG_BLK_DEV_UMEM is not set
@@ -493,14 +477,11 @@ CONFIG_BLK_DEV_RAM_SIZE=65536
493CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 477CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
494# CONFIG_CDROM_PKTCDVD is not set 478# CONFIG_CDROM_PKTCDVD is not set
495# CONFIG_ATA_OVER_ETH is not set 479# CONFIG_ATA_OVER_ETH is not set
496 480CONFIG_MISC_DEVICES=y
497#
498# Misc devices
499#
500# CONFIG_PHANTOM is not set 481# CONFIG_PHANTOM is not set
482# CONFIG_EEPROM_93CX6 is not set
501# CONFIG_SGI_IOC4 is not set 483# CONFIG_SGI_IOC4 is not set
502# CONFIG_TIFM_CORE is not set 484# CONFIG_TIFM_CORE is not set
503# CONFIG_BLINK is not set
504CONFIG_IDE=y 485CONFIG_IDE=y
505CONFIG_BLK_DEV_IDE=y 486CONFIG_BLK_DEV_IDE=y
506 487
@@ -565,6 +546,7 @@ CONFIG_BLK_DEV_IDEDMA=y
565# 546#
566# CONFIG_RAID_ATTRS is not set 547# CONFIG_RAID_ATTRS is not set
567CONFIG_SCSI=y 548CONFIG_SCSI=y
549CONFIG_SCSI_DMA=y
568# CONFIG_SCSI_TGT is not set 550# CONFIG_SCSI_TGT is not set
569CONFIG_SCSI_NETLINK=y 551CONFIG_SCSI_NETLINK=y
570CONFIG_SCSI_PROC_FS=y 552CONFIG_SCSI_PROC_FS=y
@@ -597,10 +579,7 @@ CONFIG_SCSI_FC_ATTRS=y
597CONFIG_SCSI_ISCSI_ATTRS=m 579CONFIG_SCSI_ISCSI_ATTRS=m
598CONFIG_SCSI_SAS_ATTRS=m 580CONFIG_SCSI_SAS_ATTRS=m
599# CONFIG_SCSI_SAS_LIBSAS is not set 581# CONFIG_SCSI_SAS_LIBSAS is not set
600 582CONFIG_SCSI_LOWLEVEL=y
601#
602# SCSI low-level drivers
603#
604# CONFIG_ISCSI_TCP is not set 583# CONFIG_ISCSI_TCP is not set
605# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 584# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
606# CONFIG_SCSI_3W_9XXX is not set 585# CONFIG_SCSI_3W_9XXX is not set
@@ -615,7 +594,6 @@ CONFIG_SCSI_SAS_ATTRS=m
615# CONFIG_MEGARAID_LEGACY is not set 594# CONFIG_MEGARAID_LEGACY is not set
616# CONFIG_MEGARAID_SAS is not set 595# CONFIG_MEGARAID_SAS is not set
617# CONFIG_SCSI_HPTIOP is not set 596# CONFIG_SCSI_HPTIOP is not set
618# CONFIG_SCSI_BUSLOGIC is not set
619# CONFIG_SCSI_DMX3191D is not set 597# CONFIG_SCSI_DMX3191D is not set
620# CONFIG_SCSI_EATA is not set 598# CONFIG_SCSI_EATA is not set
621# CONFIG_SCSI_FUTURE_DOMAIN is not set 599# CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -697,10 +675,6 @@ CONFIG_ATA=y
697# CONFIG_PATA_SIS is not set 675# CONFIG_PATA_SIS is not set
698# CONFIG_PATA_VIA is not set 676# CONFIG_PATA_VIA is not set
699CONFIG_PATA_WINBOND=y 677CONFIG_PATA_WINBOND=y
700
701#
702# Multi-device support (RAID and LVM)
703#
704CONFIG_MD=y 678CONFIG_MD=y
705CONFIG_BLK_DEV_MD=y 679CONFIG_BLK_DEV_MD=y
706CONFIG_MD_LINEAR=y 680CONFIG_MD_LINEAR=y
@@ -718,6 +692,7 @@ CONFIG_DM_MIRROR=m
718CONFIG_DM_ZERO=m 692CONFIG_DM_ZERO=m
719CONFIG_DM_MULTIPATH=m 693CONFIG_DM_MULTIPATH=m
720CONFIG_DM_MULTIPATH_EMC=m 694CONFIG_DM_MULTIPATH_EMC=m
695# CONFIG_DM_MULTIPATH_RDAC is not set
721# CONFIG_DM_DELAY is not set 696# CONFIG_DM_DELAY is not set
722 697
723# 698#
@@ -733,27 +708,17 @@ CONFIG_DM_MULTIPATH_EMC=m
733# 708#
734# CONFIG_FIREWIRE is not set 709# CONFIG_FIREWIRE is not set
735# CONFIG_IEEE1394 is not set 710# CONFIG_IEEE1394 is not set
736
737#
738# I2O device support
739#
740# CONFIG_I2O is not set 711# CONFIG_I2O is not set
741# CONFIG_MACINTOSH_DRIVERS is not set 712# CONFIG_MACINTOSH_DRIVERS is not set
742
743#
744# Network device support
745#
746CONFIG_NETDEVICES=y 713CONFIG_NETDEVICES=y
714# CONFIG_NETDEVICES_MULTIQUEUE is not set
747CONFIG_DUMMY=m 715CONFIG_DUMMY=m
748CONFIG_BONDING=m 716CONFIG_BONDING=m
717# CONFIG_MACVLAN is not set
749# CONFIG_EQUALIZER is not set 718# CONFIG_EQUALIZER is not set
750CONFIG_TUN=m 719CONFIG_TUN=m
751# CONFIG_ARCNET is not set 720# CONFIG_ARCNET is not set
752# CONFIG_PHYLIB is not set 721# CONFIG_PHYLIB is not set
753
754#
755# Ethernet (10 or 100Mbit)
756#
757CONFIG_NET_ETHERNET=y 722CONFIG_NET_ETHERNET=y
758CONFIG_MII=y 723CONFIG_MII=y
759# CONFIG_HAPPYMEAL is not set 724# CONFIG_HAPPYMEAL is not set
@@ -762,10 +727,6 @@ CONFIG_MII=y
762CONFIG_NET_VENDOR_3COM=y 727CONFIG_NET_VENDOR_3COM=y
763CONFIG_VORTEX=y 728CONFIG_VORTEX=y
764# CONFIG_TYPHOON is not set 729# CONFIG_TYPHOON is not set
765
766#
767# Tulip family network device support
768#
769# CONFIG_NET_TULIP is not set 730# CONFIG_NET_TULIP is not set
770# CONFIG_HP100 is not set 731# CONFIG_HP100 is not set
771CONFIG_IBMVETH=y 732CONFIG_IBMVETH=y
@@ -804,7 +765,6 @@ CONFIG_E1000=y
804# CONFIG_SIS190 is not set 765# CONFIG_SIS190 is not set
805# CONFIG_SKGE is not set 766# CONFIG_SKGE is not set
806# CONFIG_SKY2 is not set 767# CONFIG_SKY2 is not set
807# CONFIG_SK98LIN is not set
808# CONFIG_VIA_VELOCITY is not set 768# CONFIG_VIA_VELOCITY is not set
809CONFIG_TIGON3=y 769CONFIG_TIGON3=y
810# CONFIG_BNX2 is not set 770# CONFIG_BNX2 is not set
@@ -855,6 +815,7 @@ CONFIG_PPP_DEFLATE=m
855CONFIG_PPP_BSDCOMP=m 815CONFIG_PPP_BSDCOMP=m
856# CONFIG_PPP_MPPE is not set 816# CONFIG_PPP_MPPE is not set
857CONFIG_PPPOE=m 817CONFIG_PPPOE=m
818# CONFIG_PPPOL2TP is not set
858# CONFIG_SLIP is not set 819# CONFIG_SLIP is not set
859CONFIG_SLHC=m 820CONFIG_SLHC=m
860# CONFIG_NET_FC is not set 821# CONFIG_NET_FC is not set
@@ -863,15 +824,7 @@ CONFIG_NETCONSOLE=y
863CONFIG_NETPOLL=y 824CONFIG_NETPOLL=y
864CONFIG_NETPOLL_TRAP=y 825CONFIG_NETPOLL_TRAP=y
865CONFIG_NET_POLL_CONTROLLER=y 826CONFIG_NET_POLL_CONTROLLER=y
866
867#
868# ISDN subsystem
869#
870# CONFIG_ISDN is not set 827# CONFIG_ISDN is not set
871
872#
873# Telephony Support
874#
875# CONFIG_PHONE is not set 828# CONFIG_PHONE is not set
876 829
877# 830#
@@ -975,10 +928,6 @@ CONFIG_HVC_DRIVER=y
975CONFIG_HVC_CONSOLE=y 928CONFIG_HVC_CONSOLE=y
976CONFIG_HVC_RTAS=y 929CONFIG_HVC_RTAS=y
977CONFIG_HVCS=m 930CONFIG_HVCS=m
978
979#
980# IPMI
981#
982# CONFIG_IPMI_HANDLER is not set 931# CONFIG_IPMI_HANDLER is not set
983# CONFIG_WATCHDOG is not set 932# CONFIG_WATCHDOG is not set
984# CONFIG_HW_RANDOM is not set 933# CONFIG_HW_RANDOM is not set
@@ -991,10 +940,6 @@ CONFIG_GEN_RTC=y
991CONFIG_RAW_DRIVER=y 940CONFIG_RAW_DRIVER=y
992CONFIG_MAX_RAW_DEVS=1024 941CONFIG_MAX_RAW_DEVS=1024
993# CONFIG_HANGCHECK_TIMER is not set 942# CONFIG_HANGCHECK_TIMER is not set
994
995#
996# TPM devices
997#
998# CONFIG_TCG_TPM is not set 943# CONFIG_TCG_TPM is not set
999CONFIG_DEVPORT=y 944CONFIG_DEVPORT=y
1000CONFIG_I2C=y 945CONFIG_I2C=y
@@ -1029,6 +974,7 @@ CONFIG_I2C_ALGOBIT=y
1029# CONFIG_I2C_SIS5595 is not set 974# CONFIG_I2C_SIS5595 is not set
1030# CONFIG_I2C_SIS630 is not set 975# CONFIG_I2C_SIS630 is not set
1031# CONFIG_I2C_SIS96X is not set 976# CONFIG_I2C_SIS96X is not set
977# CONFIG_I2C_TAOS_EVM is not set
1032# CONFIG_I2C_STUB is not set 978# CONFIG_I2C_STUB is not set
1033# CONFIG_I2C_TINY_USB is not set 979# CONFIG_I2C_TINY_USB is not set
1034# CONFIG_I2C_VIA is not set 980# CONFIG_I2C_VIA is not set
@@ -1040,11 +986,13 @@ CONFIG_I2C_ALGOBIT=y
1040# 986#
1041# CONFIG_SENSORS_DS1337 is not set 987# CONFIG_SENSORS_DS1337 is not set
1042# CONFIG_SENSORS_DS1374 is not set 988# CONFIG_SENSORS_DS1374 is not set
989# CONFIG_DS1682 is not set
1043# CONFIG_SENSORS_EEPROM is not set 990# CONFIG_SENSORS_EEPROM is not set
1044# CONFIG_SENSORS_PCF8574 is not set 991# CONFIG_SENSORS_PCF8574 is not set
1045# CONFIG_SENSORS_PCA9539 is not set 992# CONFIG_SENSORS_PCA9539 is not set
1046# CONFIG_SENSORS_PCF8591 is not set 993# CONFIG_SENSORS_PCF8591 is not set
1047# CONFIG_SENSORS_MAX6875 is not set 994# CONFIG_SENSORS_MAX6875 is not set
995# CONFIG_SENSORS_TSL2550 is not set
1048# CONFIG_I2C_DEBUG_CORE is not set 996# CONFIG_I2C_DEBUG_CORE is not set
1049# CONFIG_I2C_DEBUG_ALGO is not set 997# CONFIG_I2C_DEBUG_ALGO is not set
1050# CONFIG_I2C_DEBUG_BUS is not set 998# CONFIG_I2C_DEBUG_BUS is not set
@@ -1055,11 +1003,8 @@ CONFIG_I2C_ALGOBIT=y
1055# 1003#
1056# CONFIG_SPI is not set 1004# CONFIG_SPI is not set
1057# CONFIG_SPI_MASTER is not set 1005# CONFIG_SPI_MASTER is not set
1058
1059#
1060# Dallas's 1-wire bus
1061#
1062# CONFIG_W1 is not set 1006# CONFIG_W1 is not set
1007# CONFIG_POWER_SUPPLY is not set
1063# CONFIG_HWMON is not set 1008# CONFIG_HWMON is not set
1064 1009
1065# 1010#
@@ -1078,8 +1023,8 @@ CONFIG_I2C_ALGOBIT=y
1078# Graphics support 1023# Graphics support
1079# 1024#
1080CONFIG_BACKLIGHT_LCD_SUPPORT=y 1025CONFIG_BACKLIGHT_LCD_SUPPORT=y
1081CONFIG_BACKLIGHT_CLASS_DEVICE=y
1082CONFIG_LCD_CLASS_DEVICE=m 1026CONFIG_LCD_CLASS_DEVICE=m
1027CONFIG_BACKLIGHT_CLASS_DEVICE=y
1083 1028
1084# 1029#
1085# Display device support 1030# Display device support
@@ -1090,6 +1035,7 @@ CONFIG_DISPLAY_SUPPORT=y
1090# Display hardware drivers 1035# Display hardware drivers
1091# 1036#
1092# CONFIG_VGASTATE is not set 1037# CONFIG_VGASTATE is not set
1038# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1093CONFIG_FB=y 1039CONFIG_FB=y
1094CONFIG_FIRMWARE_EDID=y 1040CONFIG_FIRMWARE_EDID=y
1095CONFIG_FB_DDC=y 1041CONFIG_FB_DDC=y
@@ -1152,6 +1098,7 @@ CONFIG_FB_IBM_GXT4500=y
1152# CONFIG_VGA_CONSOLE is not set 1098# CONFIG_VGA_CONSOLE is not set
1153CONFIG_DUMMY_CONSOLE=y 1099CONFIG_DUMMY_CONSOLE=y
1154CONFIG_FRAMEBUFFER_CONSOLE=y 1100CONFIG_FRAMEBUFFER_CONSOLE=y
1101# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1155# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 1102# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1156# CONFIG_FONTS is not set 1103# CONFIG_FONTS is not set
1157CONFIG_FONT_8x8=y 1104CONFIG_FONT_8x8=y
@@ -1165,10 +1112,7 @@ CONFIG_LOGO_LINUX_CLUT224=y
1165# Sound 1112# Sound
1166# 1113#
1167# CONFIG_SOUND is not set 1114# CONFIG_SOUND is not set
1168 1115CONFIG_HID_SUPPORT=y
1169#
1170# HID Devices
1171#
1172CONFIG_HID=y 1116CONFIG_HID=y
1173# CONFIG_HID_DEBUG is not set 1117# CONFIG_HID_DEBUG is not set
1174 1118
@@ -1179,10 +1123,7 @@ CONFIG_USB_HID=y
1179# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1123# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1180# CONFIG_HID_FF is not set 1124# CONFIG_HID_FF is not set
1181CONFIG_USB_HIDDEV=y 1125CONFIG_USB_HIDDEV=y
1182 1126CONFIG_USB_SUPPORT=y
1183#
1184# USB support
1185#
1186CONFIG_USB_ARCH_HAS_HCD=y 1127CONFIG_USB_ARCH_HAS_HCD=y
1187CONFIG_USB_ARCH_HAS_OHCI=y 1128CONFIG_USB_ARCH_HAS_OHCI=y
1188CONFIG_USB_ARCH_HAS_EHCI=y 1129CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1204,7 +1145,6 @@ CONFIG_USB_EHCI_HCD=y
1204# CONFIG_USB_EHCI_SPLIT_ISO is not set 1145# CONFIG_USB_EHCI_SPLIT_ISO is not set
1205# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1146# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1206# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1147# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1207# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1208# CONFIG_USB_ISP116X_HCD is not set 1148# CONFIG_USB_ISP116X_HCD is not set
1209CONFIG_USB_OHCI_HCD=y 1149CONFIG_USB_OHCI_HCD=y
1210# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1150# CONFIG_USB_OHCI_HCD_PPC_OF is not set
@@ -1213,6 +1153,7 @@ CONFIG_USB_OHCI_HCD=y
1213CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1153CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1214# CONFIG_USB_UHCI_HCD is not set 1154# CONFIG_USB_UHCI_HCD is not set
1215# CONFIG_USB_SL811_HCD is not set 1155# CONFIG_USB_SL811_HCD is not set
1156# CONFIG_USB_R8A66597_HCD is not set
1216 1157
1217# 1158#
1218# USB Device Class drivers 1159# USB Device Class drivers
@@ -1291,23 +1232,7 @@ CONFIG_USB_MON=y
1291# 1232#
1292# CONFIG_USB_GADGET is not set 1233# CONFIG_USB_GADGET is not set
1293# CONFIG_MMC is not set 1234# CONFIG_MMC is not set
1294
1295#
1296# LED devices
1297#
1298# CONFIG_NEW_LEDS is not set 1235# CONFIG_NEW_LEDS is not set
1299
1300#
1301# LED drivers
1302#
1303
1304#
1305# LED Triggers
1306#
1307
1308#
1309# InfiniBand support
1310#
1311CONFIG_INFINIBAND=m 1236CONFIG_INFINIBAND=m
1312CONFIG_INFINIBAND_USER_MAD=m 1237CONFIG_INFINIBAND_USER_MAD=m
1313CONFIG_INFINIBAND_USER_ACCESS=m 1238CONFIG_INFINIBAND_USER_ACCESS=m
@@ -1325,14 +1250,7 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y
1325# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set 1250# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
1326CONFIG_INFINIBAND_SRP=m 1251CONFIG_INFINIBAND_SRP=m
1327# CONFIG_INFINIBAND_ISER is not set 1252# CONFIG_INFINIBAND_ISER is not set
1328 1253# CONFIG_EDAC is not set
1329#
1330# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1331#
1332
1333#
1334# Real Time Clock
1335#
1336# CONFIG_RTC_CLASS is not set 1254# CONFIG_RTC_CLASS is not set
1337 1255
1338# 1256#
@@ -1347,11 +1265,12 @@ CONFIG_INFINIBAND_SRP=m
1347# 1265#
1348# DMA Devices 1266# DMA Devices
1349# 1267#
1268# CONFIG_AUXDISPLAY is not set
1350 1269
1351# 1270#
1352# Auxiliary Display support 1271# Userspace I/O
1353# 1272#
1354# CONFIG_KS0108 is not set 1273# CONFIG_UIO is not set
1355 1274
1356# 1275#
1357# File systems 1276# File systems
@@ -1485,7 +1404,6 @@ CONFIG_CIFS_POSIX=y
1485# CONFIG_NCP_FS is not set 1404# CONFIG_NCP_FS is not set
1486# CONFIG_CODA_FS is not set 1405# CONFIG_CODA_FS is not set
1487# CONFIG_AFS_FS is not set 1406# CONFIG_AFS_FS is not set
1488# CONFIG_9P_FS is not set
1489 1407
1490# 1408#
1491# Partition Types 1409# Partition Types
@@ -1551,6 +1469,7 @@ CONFIG_CRC_CCITT=m
1551# CONFIG_CRC16 is not set 1469# CONFIG_CRC16 is not set
1552# CONFIG_CRC_ITU_T is not set 1470# CONFIG_CRC_ITU_T is not set
1553CONFIG_CRC32=y 1471CONFIG_CRC32=y
1472# CONFIG_CRC7 is not set
1554CONFIG_LIBCRC32C=m 1473CONFIG_LIBCRC32C=m
1555CONFIG_ZLIB_INFLATE=y 1474CONFIG_ZLIB_INFLATE=y
1556CONFIG_ZLIB_DEFLATE=m 1475CONFIG_ZLIB_DEFLATE=m
@@ -1582,6 +1501,7 @@ CONFIG_DEBUG_FS=y
1582CONFIG_DEBUG_KERNEL=y 1501CONFIG_DEBUG_KERNEL=y
1583# CONFIG_DEBUG_SHIRQ is not set 1502# CONFIG_DEBUG_SHIRQ is not set
1584CONFIG_DETECT_SOFTLOCKUP=y 1503CONFIG_DETECT_SOFTLOCKUP=y
1504CONFIG_SCHED_DEBUG=y
1585# CONFIG_SCHEDSTATS is not set 1505# CONFIG_SCHEDSTATS is not set
1586# CONFIG_TIMER_STATS is not set 1506# CONFIG_TIMER_STATS is not set
1587# CONFIG_DEBUG_SLAB is not set 1507# CONFIG_DEBUG_SLAB is not set
@@ -1617,10 +1537,6 @@ CONFIG_IRQSTACKS=y
1617# 1537#
1618# CONFIG_KEYS is not set 1538# CONFIG_KEYS is not set
1619# CONFIG_SECURITY is not set 1539# CONFIG_SECURITY is not set
1620
1621#
1622# Cryptographic options
1623#
1624CONFIG_CRYPTO=y 1540CONFIG_CRYPTO=y
1625CONFIG_CRYPTO_ALGAPI=y 1541CONFIG_CRYPTO_ALGAPI=y
1626CONFIG_CRYPTO_BLKCIPHER=y 1542CONFIG_CRYPTO_BLKCIPHER=y
@@ -1660,7 +1576,4 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1660CONFIG_CRYPTO_CRC32C=m 1576CONFIG_CRYPTO_CRC32C=m
1661# CONFIG_CRYPTO_CAMELLIA is not set 1577# CONFIG_CRYPTO_CAMELLIA is not set
1662CONFIG_CRYPTO_TEST=m 1578CONFIG_CRYPTO_TEST=m
1663 1579# CONFIG_CRYPTO_HW is not set
1664#
1665# Hardware crypto devices
1666#
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index 9a8c9af43b..d6a38cd501 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -188,33 +188,21 @@ static struct ibmebus_dev* __devinit ibmebus_register_device_node(
188 struct device_node *dn) 188 struct device_node *dn)
189{ 189{
190 struct ibmebus_dev *dev; 190 struct ibmebus_dev *dev;
191 const char *loc_code; 191 int i, len, bus_len;
192 int length;
193
194 loc_code = of_get_property(dn, "ibm,loc-code", NULL);
195 if (!loc_code) {
196 printk(KERN_WARNING "%s: node %s missing 'ibm,loc-code'\n",
197 __FUNCTION__, dn->name ? dn->name : "<unknown>");
198 return ERR_PTR(-EINVAL);
199 }
200
201 if (strlen(loc_code) == 0) {
202 printk(KERN_WARNING "%s: 'ibm,loc-code' is invalid\n",
203 __FUNCTION__);
204 return ERR_PTR(-EINVAL);
205 }
206 192
207 dev = kzalloc(sizeof(struct ibmebus_dev), GFP_KERNEL); 193 dev = kzalloc(sizeof(struct ibmebus_dev), GFP_KERNEL);
208 if (!dev) { 194 if (!dev)
209 return ERR_PTR(-ENOMEM); 195 return ERR_PTR(-ENOMEM);
210 }
211 196
212 dev->ofdev.node = of_node_get(dn); 197 dev->ofdev.node = of_node_get(dn);
213 198
214 length = strlen(loc_code); 199 len = strlen(dn->full_name + 1);
215 memcpy(dev->ofdev.dev.bus_id, loc_code 200 bus_len = min(len, BUS_ID_SIZE - 1);
216 + (length - min(length, BUS_ID_SIZE - 1)), 201 memcpy(dev->ofdev.dev.bus_id, dn->full_name + 1
217 min(length, BUS_ID_SIZE - 1)); 202 + (len - bus_len), bus_len);
203 for (i = 0; i < bus_len; i++)
204 if (dev->ofdev.dev.bus_id[i] == '/')
205 dev->ofdev.dev.bus_id[i] = '_';
218 206
219 /* Register with generic device framework. */ 207 /* Register with generic device framework. */
220 if (ibmebus_register_device_common(dev, dn->name) != 0) { 208 if (ibmebus_register_device_common(dev, dn->name) != 0) {
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index cea8045ba4..90fa11c72e 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -493,7 +493,7 @@ static int __init serial_dev_init(void)
493 493
494 return platform_device_register(&serial_device); 494 return platform_device_register(&serial_device);
495} 495}
496arch_initcall(serial_dev_init); 496device_initcall(serial_dev_init);
497 497
498 498
499/* 499/*
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index a83727b308..8a1b001d0b 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -83,7 +83,7 @@ void flush_fp_to_thread(struct task_struct *tsk)
83 */ 83 */
84 BUG_ON(tsk != current); 84 BUG_ON(tsk != current);
85#endif 85#endif
86 giveup_fpu(current); 86 giveup_fpu(tsk);
87 } 87 }
88 preempt_enable(); 88 preempt_enable();
89 } 89 }
@@ -143,7 +143,7 @@ void flush_altivec_to_thread(struct task_struct *tsk)
143#ifdef CONFIG_SMP 143#ifdef CONFIG_SMP
144 BUG_ON(tsk != current); 144 BUG_ON(tsk != current);
145#endif 145#endif
146 giveup_altivec(current); 146 giveup_altivec(tsk);
147 } 147 }
148 preempt_enable(); 148 preempt_enable();
149 } 149 }
@@ -182,7 +182,7 @@ void flush_spe_to_thread(struct task_struct *tsk)
182#ifdef CONFIG_SMP 182#ifdef CONFIG_SMP
183 BUG_ON(tsk != current); 183 BUG_ON(tsk != current);
184#endif 184#endif
185 giveup_spe(current); 185 giveup_spe(tsk);
186 } 186 }
187 preempt_enable(); 187 preempt_enable();
188 } 188 }
@@ -605,6 +605,13 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
605 regs->ccr = 0; 605 regs->ccr = 0;
606 regs->gpr[1] = sp; 606 regs->gpr[1] = sp;
607 607
608 /*
609 * We have just cleared all the nonvolatile GPRs, so make
610 * FULL_REGS(regs) return true. This is necessary to allow
611 * ptrace to examine the thread immediately after exec.
612 */
613 regs->trap &= ~1UL;
614
608#ifdef CONFIG_PPC32 615#ifdef CONFIG_PPC32
609 regs->mq = 0; 616 regs->mq = 0;
610 regs->nip = start; 617 regs->nip = start;
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 727a6699f2..c627cf86d1 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -239,7 +239,7 @@ static void snapshot_tb_and_purr(void *data)
239 struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data); 239 struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data);
240 240
241 local_irq_save(flags); 241 local_irq_save(flags);
242 p->tb = mftb(); 242 p->tb = get_tb_or_rtc();
243 p->purr = mfspr(SPRN_PURR); 243 p->purr = mfspr(SPRN_PURR);
244 wmb(); 244 wmb();
245 p->initialized = 1; 245 p->initialized = 1;
@@ -317,7 +317,7 @@ static void snapshot_purr(void)
317 */ 317 */
318void snapshot_timebase(void) 318void snapshot_timebase(void)
319{ 319{
320 __get_cpu_var(last_jiffy) = get_tb(); 320 __get_cpu_var(last_jiffy) = get_tb_or_rtc();
321 snapshot_purr(); 321 snapshot_purr();
322} 322}
323 323
@@ -684,6 +684,8 @@ void timer_interrupt(struct pt_regs * regs)
684 684
685 write_seqlock(&xtime_lock); 685 write_seqlock(&xtime_lock);
686 tb_next_jiffy = tb_last_jiffy + tb_ticks_per_jiffy; 686 tb_next_jiffy = tb_last_jiffy + tb_ticks_per_jiffy;
687 if (__USE_RTC() && tb_next_jiffy >= 1000000000)
688 tb_next_jiffy -= 1000000000;
687 if (per_cpu(last_jiffy, cpu) >= tb_next_jiffy) { 689 if (per_cpu(last_jiffy, cpu) >= tb_next_jiffy) {
688 tb_last_jiffy = tb_next_jiffy; 690 tb_last_jiffy = tb_next_jiffy;
689 do_timer(1); 691 do_timer(1);
@@ -977,7 +979,7 @@ void __init time_init(void)
977 tb_to_ns_scale = scale; 979 tb_to_ns_scale = scale;
978 tb_to_ns_shift = shift; 980 tb_to_ns_shift = shift;
979 /* Save the current timebase to pretty up CONFIG_PRINTK_TIME */ 981 /* Save the current timebase to pretty up CONFIG_PRINTK_TIME */
980 boot_tb = get_tb(); 982 boot_tb = get_tb_or_rtc();
981 983
982 tm = get_boot_time(); 984 tm = get_boot_time();
983 985
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index cef01e4e89..213fa31ac5 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -98,6 +98,18 @@ static struct vdso_patch_def vdso_patches[] = {
98 CPU_FTR_USE_TB, 0, 98 CPU_FTR_USE_TB, 0,
99 "__kernel_gettimeofday", NULL 99 "__kernel_gettimeofday", NULL
100 }, 100 },
101 {
102 CPU_FTR_USE_TB, 0,
103 "__kernel_clock_gettime", NULL
104 },
105 {
106 CPU_FTR_USE_TB, 0,
107 "__kernel_clock_getres", NULL
108 },
109 {
110 CPU_FTR_USE_TB, 0,
111 "__kernel_get_tbfreq", NULL
112 },
101}; 113};
102 114
103/* 115/*
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index a73d2d7009..ff1811ac6c 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -74,6 +74,22 @@ static inline void slb_shadow_clear(unsigned long entry)
74 get_slb_shadow()->save_area[entry].esid = 0; 74 get_slb_shadow()->save_area[entry].esid = 0;
75} 75}
76 76
77static inline void create_shadowed_slbe(unsigned long ea, unsigned long flags,
78 unsigned long entry)
79{
80 /*
81 * Updating the shadow buffer before writing the SLB ensures
82 * we don't get a stale entry here if we get preempted by PHYP
83 * between these two statements.
84 */
85 slb_shadow_update(ea, flags, entry);
86
87 asm volatile("slbmte %0,%1" :
88 : "r" (mk_vsid_data(ea, flags)),
89 "r" (mk_esid_data(ea, entry))
90 : "memory" );
91}
92
77void slb_flush_and_rebolt(void) 93void slb_flush_and_rebolt(void)
78{ 94{
79 /* If you change this make sure you change SLB_NUM_BOLTED 95 /* If you change this make sure you change SLB_NUM_BOLTED
@@ -226,12 +242,16 @@ void slb_initialize(void)
226 vflags = SLB_VSID_KERNEL | vmalloc_llp; 242 vflags = SLB_VSID_KERNEL | vmalloc_llp;
227 243
228 /* Invalidate the entire SLB (even slot 0) & all the ERATS */ 244 /* Invalidate the entire SLB (even slot 0) & all the ERATS */
229 slb_shadow_update(PAGE_OFFSET, lflags, 0); 245 asm volatile("isync":::"memory");
230 asm volatile("isync; slbia; sync; slbmte %0,%1; isync" :: 246 asm volatile("slbmte %0,%0"::"r" (0) : "memory");
231 "r" (get_slb_shadow()->save_area[0].vsid), 247 asm volatile("isync; slbia; isync":::"memory");
232 "r" (get_slb_shadow()->save_area[0].esid) : "memory"); 248 create_shadowed_slbe(PAGE_OFFSET, lflags, 0);
233 249
234 slb_shadow_update(VMALLOC_START, vflags, 1); 250 create_shadowed_slbe(VMALLOC_START, vflags, 1);
235 251
236 slb_flush_and_rebolt(); 252 /* We don't bolt the stack for the time being - we're in boot,
253 * so the stack is in the bolted segment. By the time it goes
254 * elsewhere, we'll call _switch() which will bolt in the new
255 * one. */
256 asm volatile("isync":::"memory");
237} 257}
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index e7fdf013cd..eafe7605cd 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -76,14 +76,14 @@ int mpc834x_usb_cfg(void)
76 if (port0_is_dr) 76 if (port0_is_dr)
77 printk(KERN_WARNING 77 printk(KERN_WARNING
78 "834x USB port0 can't be used by both DR and MPH!\n"); 78 "834x USB port0 can't be used by both DR and MPH!\n");
79 sicrl |= MPC834X_SICRL_USB0; 79 sicrl &= ~MPC834X_SICRL_USB0;
80 } 80 }
81 prop = of_get_property(np, "port1", NULL); 81 prop = of_get_property(np, "port1", NULL);
82 if (prop) { 82 if (prop) {
83 if (port1_is_dr) 83 if (port1_is_dr)
84 printk(KERN_WARNING 84 printk(KERN_WARNING
85 "834x USB port1 can't be used by both DR and MPH!\n"); 85 "834x USB port1 can't be used by both DR and MPH!\n");
86 sicrl |= MPC834X_SICRL_USB1; 86 sicrl &= ~MPC834X_SICRL_USB1;
87 } 87 }
88 of_node_put(np); 88 of_node_put(np);
89 } 89 }
diff --git a/arch/powerpc/platforms/85xx/mpc8544_ds.c b/arch/powerpc/platforms/85xx/mpc8544_ds.c
index 0f834d8be4..48983bc56d 100644
--- a/arch/powerpc/platforms/85xx/mpc8544_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8544_ds.c
@@ -178,7 +178,9 @@ define_machine(mpc8544_ds) {
178 .probe = mpc8544_ds_probe, 178 .probe = mpc8544_ds_probe,
179 .setup_arch = mpc8544_ds_setup_arch, 179 .setup_arch = mpc8544_ds_setup_arch,
180 .init_IRQ = mpc8544_ds_pic_init, 180 .init_IRQ = mpc8544_ds_pic_init,
181#ifdef CONFIG_PCI
181 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 182 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
183#endif
182 .get_irq = mpic_get_irq, 184 .get_irq = mpic_get_irq,
183 .restart = mpc85xx_restart, 185 .restart = mpc85xx_restart,
184 .calibrate_decr = generic_calibrate_decr, 186 .calibrate_decr = generic_calibrate_decr,
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 6a171e9abf..2d4cb78476 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -351,10 +351,10 @@ define_machine(mpc85xx_cds) {
351 .get_irq = mpic_get_irq, 351 .get_irq = mpic_get_irq,
352#ifdef CONFIG_PCI 352#ifdef CONFIG_PCI
353 .restart = mpc85xx_cds_restart, 353 .restart = mpc85xx_cds_restart,
354 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
354#else 355#else
355 .restart = mpc85xx_restart, 356 .restart = mpc85xx_restart,
356#endif 357#endif
357 .calibrate_decr = generic_calibrate_decr, 358 .calibrate_decr = generic_calibrate_decr,
358 .progress = udbg_progress, 359 .progress = udbg_progress,
359 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
360}; 360};
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index be25ecd911..7ca7e676f1 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -207,5 +207,7 @@ define_machine(mpc85xx_mds) {
207 .restart = mpc85xx_restart, 207 .restart = mpc85xx_restart,
208 .calibrate_decr = generic_calibrate_decr, 208 .calibrate_decr = generic_calibrate_decr,
209 .progress = udbg_progress, 209 .progress = udbg_progress,
210#ifdef CONFIG_PCI
210 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 211 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
212#endif
211}; 213};
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 56b27caf7a..47aafa76c9 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -250,5 +250,7 @@ define_machine(mpc86xx_hpcn) {
250 .time_init = mpc86xx_time_init, 250 .time_init = mpc86xx_time_init,
251 .calibrate_decr = generic_calibrate_decr, 251 .calibrate_decr = generic_calibrate_decr,
252 .progress = udbg_progress, 252 .progress = udbg_progress,
253#ifdef CONFIG_PCI
253 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 254 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
255#endif
254}; 256};
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index cfc2497415..19d4628edf 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -285,6 +285,7 @@ config AXON_RAM
285config FSL_ULI1575 285config FSL_ULI1575
286 bool 286 bool
287 default n 287 default n
288 select GENERIC_ISA_DMA
288 help 289 help
289 Supports for the ULI1575 PCIe south bridge that exists on some 290 Supports for the ULI1575 PCIe south bridge that exists on some
290 Freescale reference boards. The boards all use the ULI in pretty 291 Freescale reference boards. The boards all use the ULI in pretty
diff --git a/arch/powerpc/platforms/cell/cbe_regs.h b/arch/powerpc/platforms/cell/cbe_regs.h
index 17d5971448..b24025f2ac 100644
--- a/arch/powerpc/platforms/cell/cbe_regs.h
+++ b/arch/powerpc/platforms/cell/cbe_regs.h
@@ -113,10 +113,14 @@ struct cbe_pmd_regs {
113 u64 checkstop_fir; /* 0x0c00 */ 113 u64 checkstop_fir; /* 0x0c00 */
114 u64 recoverable_fir; /* 0x0c08 */ 114 u64 recoverable_fir; /* 0x0c08 */
115 u64 spec_att_mchk_fir; /* 0x0c10 */ 115 u64 spec_att_mchk_fir; /* 0x0c10 */
116 u64 fir_mode_reg; /* 0x0c18 */ 116 u32 fir_mode_reg; /* 0x0c18 */
117 u8 pad_0x0c1c_0x0c20 [4]; /* 0x0c1c */
118#define CBE_PMD_FIR_MODE_M8 0x00800
117 u64 fir_enable_mask; /* 0x0c20 */ 119 u64 fir_enable_mask; /* 0x0c20 */
118 120
119 u8 pad_0x0c28_0x1000 [0x1000 - 0x0c28]; /* 0x0c28 */ 121 u8 pad_0x0c28_0x0ca8 [0x0ca8 - 0x0c28]; /* 0x0c28 */
122 u64 ras_esc_0; /* 0x0ca8 */
123 u8 pad_0x0cb0_0x1000 [0x1000 - 0x0cb0]; /* 0x0cb0 */
120}; 124};
121 125
122extern struct cbe_pmd_regs __iomem *cbe_get_pmd_regs(struct device_node *np); 126extern struct cbe_pmd_regs __iomem *cbe_get_pmd_regs(struct device_node *np);
diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c b/arch/powerpc/platforms/cell/cbe_thermal.c
index e4132f8f51..fb5eda4846 100644
--- a/arch/powerpc/platforms/cell/cbe_thermal.c
+++ b/arch/powerpc/platforms/cell/cbe_thermal.c
@@ -88,17 +88,13 @@ static struct cbe_pmd_regs __iomem *get_pmd_regs(struct sys_device *sysdev)
88/* returns the value for a given spu in a given register */ 88/* returns the value for a given spu in a given register */
89static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iomem *reg) 89static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iomem *reg)
90{ 90{
91 const unsigned int *id;
92 union spe_reg value; 91 union spe_reg value;
93 struct spu *spu; 92 struct spu *spu;
94 93
95 /* getting the id from the reg attribute will not work on future device-tree layouts
96 * in future we should store the id to the spu struct and use it here */
97 spu = container_of(sysdev, struct spu, sysdev); 94 spu = container_of(sysdev, struct spu, sysdev);
98 id = of_get_property(spu_devnode(spu), "reg", NULL);
99 value.val = in_be64(&reg->val); 95 value.val = in_be64(&reg->val);
100 96
101 return value.spe[*id]; 97 return value.spe[spu->spe_id];
102} 98}
103 99
104static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf) 100static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf)
diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c
index 812bf563ed..4ede22d363 100644
--- a/arch/powerpc/platforms/cell/pervasive.c
+++ b/arch/powerpc/platforms/cell/pervasive.c
@@ -38,6 +38,8 @@
38#include "pervasive.h" 38#include "pervasive.h"
39#include "cbe_regs.h" 39#include "cbe_regs.h"
40 40
41static int sysreset_hack;
42
41static void cbe_power_save(void) 43static void cbe_power_save(void)
42{ 44{
43 unsigned long ctrl, thread_switch_control; 45 unsigned long ctrl, thread_switch_control;
@@ -85,6 +87,9 @@ static void cbe_power_save(void)
85 87
86static int cbe_system_reset_exception(struct pt_regs *regs) 88static int cbe_system_reset_exception(struct pt_regs *regs)
87{ 89{
90 int cpu;
91 struct cbe_pmd_regs __iomem *pmd;
92
88 switch (regs->msr & SRR1_WAKEMASK) { 93 switch (regs->msr & SRR1_WAKEMASK) {
89 case SRR1_WAKEEE: 94 case SRR1_WAKEEE:
90 do_IRQ(regs); 95 do_IRQ(regs);
@@ -93,6 +98,18 @@ static int cbe_system_reset_exception(struct pt_regs *regs)
93 timer_interrupt(regs); 98 timer_interrupt(regs);
94 break; 99 break;
95 case SRR1_WAKEMT: 100 case SRR1_WAKEMT:
101 /*
102 * The BMC can inject user triggered system reset exceptions,
103 * but cannot set the system reset reason in srr1,
104 * so check an extra register here.
105 */
106 if (sysreset_hack && (cpu = smp_processor_id()) == 0) {
107 pmd = cbe_get_cpu_pmd_regs(cpu);
108 if (in_be64(&pmd->ras_esc_0) & 0xffff) {
109 out_be64(&pmd->ras_esc_0, 0);
110 return 0;
111 }
112 }
96 break; 113 break;
97#ifdef CONFIG_CBE_RAS 114#ifdef CONFIG_CBE_RAS
98 case SRR1_WAKESYSERR: 115 case SRR1_WAKESYSERR:
@@ -113,9 +130,12 @@ static int cbe_system_reset_exception(struct pt_regs *regs)
113void __init cbe_pervasive_init(void) 130void __init cbe_pervasive_init(void)
114{ 131{
115 int cpu; 132 int cpu;
133
116 if (!cpu_has_feature(CPU_FTR_PAUSE_ZERO)) 134 if (!cpu_has_feature(CPU_FTR_PAUSE_ZERO))
117 return; 135 return;
118 136
137 sysreset_hack = machine_is_compatible("IBM,CBPLUS-1.0");
138
119 for_each_possible_cpu(cpu) { 139 for_each_possible_cpu(cpu) {
120 struct cbe_pmd_regs __iomem *regs = cbe_get_cpu_pmd_regs(cpu); 140 struct cbe_pmd_regs __iomem *regs = cbe_get_cpu_pmd_regs(cpu);
121 if (!regs) 141 if (!regs)
@@ -124,6 +144,12 @@ void __init cbe_pervasive_init(void)
124 /* Enable Pause(0) control bit */ 144 /* Enable Pause(0) control bit */
125 out_be64(&regs->pmcr, in_be64(&regs->pmcr) | 145 out_be64(&regs->pmcr, in_be64(&regs->pmcr) |
126 CBE_PMD_PAUSE_ZERO_CONTROL); 146 CBE_PMD_PAUSE_ZERO_CONTROL);
147
148 /* Enable JTAG system-reset hack */
149 if (sysreset_hack)
150 out_be32(&regs->fir_mode_reg,
151 in_be32(&regs->fir_mode_reg) |
152 CBE_PMD_FIR_MODE_M8);
127 } 153 }
128 154
129 ppc_md.power_save = cbe_power_save; 155 ppc_md.power_save = cbe_power_save;
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index 095a30304c..106d2921e2 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -236,27 +236,34 @@ static irqreturn_t
236spu_irq_class_0(int irq, void *data) 236spu_irq_class_0(int irq, void *data)
237{ 237{
238 struct spu *spu; 238 struct spu *spu;
239 unsigned long stat, mask;
239 240
240 spu = data; 241 spu = data;
241 spu->class_0_pending = 1; 242
243 mask = spu_int_mask_get(spu, 0);
244 stat = spu_int_stat_get(spu, 0);
245 stat &= mask;
246
247 spin_lock(&spu->register_lock);
248 spu->class_0_pending |= stat;
249 spin_unlock(&spu->register_lock);
250
242 spu->stop_callback(spu); 251 spu->stop_callback(spu);
243 252
253 spu_int_stat_clear(spu, 0, stat);
254
244 return IRQ_HANDLED; 255 return IRQ_HANDLED;
245} 256}
246 257
247int 258int
248spu_irq_class_0_bottom(struct spu *spu) 259spu_irq_class_0_bottom(struct spu *spu)
249{ 260{
250 unsigned long stat, mask;
251 unsigned long flags; 261 unsigned long flags;
252 262 unsigned long stat;
253 spu->class_0_pending = 0;
254 263
255 spin_lock_irqsave(&spu->register_lock, flags); 264 spin_lock_irqsave(&spu->register_lock, flags);
256 mask = spu_int_mask_get(spu, 0); 265 stat = spu->class_0_pending;
257 stat = spu_int_stat_get(spu, 0); 266 spu->class_0_pending = 0;
258
259 stat &= mask;
260 267
261 if (stat & 1) /* invalid DMA alignment */ 268 if (stat & 1) /* invalid DMA alignment */
262 __spu_trap_dma_align(spu); 269 __spu_trap_dma_align(spu);
@@ -267,7 +274,6 @@ spu_irq_class_0_bottom(struct spu *spu)
267 if (stat & 4) /* error on SPU */ 274 if (stat & 4) /* error on SPU */
268 __spu_trap_error(spu); 275 __spu_trap_error(spu);
269 276
270 spu_int_stat_clear(spu, 0, stat);
271 spin_unlock_irqrestore(&spu->register_lock, flags); 277 spin_unlock_irqrestore(&spu->register_lock, flags);
272 278
273 return (stat & 0x7) ? -EIO : 0; 279 return (stat & 0x7) ? -EIO : 0;
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c
index 5eb8834618..0e14f53250 100644
--- a/arch/powerpc/platforms/cell/spu_manage.c
+++ b/arch/powerpc/platforms/cell/spu_manage.c
@@ -48,10 +48,18 @@ static u64 __init find_spu_unit_number(struct device_node *spe)
48{ 48{
49 const unsigned int *prop; 49 const unsigned int *prop;
50 int proplen; 50 int proplen;
51
52 /* new device trees should provide the physical-id attribute */
53 prop = of_get_property(spe, "physical-id", &proplen);
54 if (proplen == 4)
55 return (u64)*prop;
56
57 /* celleb device tree provides the unit-id */
51 prop = of_get_property(spe, "unit-id", &proplen); 58 prop = of_get_property(spe, "unit-id", &proplen);
52 if (proplen == 4) 59 if (proplen == 4)
53 return (u64)*prop; 60 return (u64)*prop;
54 61
62 /* legacy device trees provide the id in the reg attribute */
55 prop = of_get_property(spe, "reg", &proplen); 63 prop = of_get_property(spe, "reg", &proplen);
56 if (proplen == 4) 64 if (proplen == 4)
57 return (u64)*prop; 65 return (u64)*prop;
diff --git a/arch/powerpc/platforms/cell/spufs/backing_ops.c b/arch/powerpc/platforms/cell/spufs/backing_ops.c
index 07a0e815ab..ec01214e51 100644
--- a/arch/powerpc/platforms/cell/spufs/backing_ops.c
+++ b/arch/powerpc/platforms/cell/spufs/backing_ops.c
@@ -162,7 +162,8 @@ static int spu_backing_wbox_write(struct spu_context *ctx, u32 data)
162 BUG_ON(avail != (4 - slot)); 162 BUG_ON(avail != (4 - slot));
163 ctx->csa.spu_mailbox_data[slot] = data; 163 ctx->csa.spu_mailbox_data[slot] = data;
164 ctx->csa.spu_chnlcnt_RW[29] = ++slot; 164 ctx->csa.spu_chnlcnt_RW[29] = ++slot;
165 ctx->csa.prob.mb_stat_R = (((4 - slot) & 0xff) << 8); 165 ctx->csa.prob.mb_stat_R &= ~(0x00ff00);
166 ctx->csa.prob.mb_stat_R |= (((4 - slot) & 0xff) << 8);
166 gen_spu_event(ctx, MFC_SPU_MAILBOX_WRITTEN_EVENT); 167 gen_spu_event(ctx, MFC_SPU_MAILBOX_WRITTEN_EVENT);
167 ret = 4; 168 ret = 4;
168 } else { 169 } else {
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 4100ddc52f..7de4e91968 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -2177,8 +2177,8 @@ struct tree_descr spufs_dir_contents[] = {
2177 { "mbox_stat", &spufs_mbox_stat_fops, 0444, }, 2177 { "mbox_stat", &spufs_mbox_stat_fops, 0444, },
2178 { "ibox_stat", &spufs_ibox_stat_fops, 0444, }, 2178 { "ibox_stat", &spufs_ibox_stat_fops, 0444, },
2179 { "wbox_stat", &spufs_wbox_stat_fops, 0444, }, 2179 { "wbox_stat", &spufs_wbox_stat_fops, 0444, },
2180 { "signal1", &spufs_signal1_nosched_fops, 0222, }, 2180 { "signal1", &spufs_signal1_fops, 0666, },
2181 { "signal2", &spufs_signal2_nosched_fops, 0222, }, 2181 { "signal2", &spufs_signal2_fops, 0666, },
2182 { "signal1_type", &spufs_signal1_type, 0666, }, 2182 { "signal1_type", &spufs_signal1_type, 0666, },
2183 { "signal2_type", &spufs_signal2_type, 0666, }, 2183 { "signal2_type", &spufs_signal2_type, 0666, },
2184 { "cntl", &spufs_cntl_fops, 0666, }, 2184 { "cntl", &spufs_cntl_fops, 0666, },
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index 6abdd8fe20..958f10e90f 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -193,11 +193,7 @@ static int spu_reacquire_runnable(struct spu_context *ctx, u32 *npc,
193 if (ret) 193 if (ret)
194 return ret; 194 return ret;
195 195
196 ret = spu_run_init(ctx, npc); 196 spuctx_switch_state(ctx, SPU_UTIL_USER);
197 if (ret) {
198 spu_release(ctx);
199 return ret;
200 }
201 return 0; 197 return 0;
202} 198}
203 199
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index c784edd40e..5bebe7fbe0 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -579,7 +579,7 @@ static struct spu *find_victim(struct spu_context *ctx)
579 list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) { 579 list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) {
580 struct spu_context *tmp = spu->ctx; 580 struct spu_context *tmp = spu->ctx;
581 581
582 if (tmp->prio > ctx->prio && 582 if (tmp && tmp->prio > ctx->prio &&
583 (!victim || tmp->prio > victim->prio)) 583 (!victim || tmp->prio > victim->prio))
584 victim = spu->ctx; 584 victim = spu->ctx;
585 } 585 }
@@ -611,9 +611,9 @@ static struct spu *find_victim(struct spu_context *ctx)
611 611
612 mutex_lock(&cbe_spu_info[node].list_mutex); 612 mutex_lock(&cbe_spu_info[node].list_mutex);
613 cbe_spu_info[node].nr_active--; 613 cbe_spu_info[node].nr_active--;
614 spu_unbind_context(spu, victim);
614 mutex_unlock(&cbe_spu_info[node].list_mutex); 615 mutex_unlock(&cbe_spu_info[node].list_mutex);
615 616
616 spu_unbind_context(spu, victim);
617 victim->stats.invol_ctx_switch++; 617 victim->stats.invol_ctx_switch++;
618 spu->stats.invol_ctx_switch++; 618 spu->stats.invol_ctx_switch++;
619 mutex_unlock(&victim->state_mutex); 619 mutex_unlock(&victim->state_mutex);
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index f33b21b9f5..9014d55c71 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -93,7 +93,7 @@ static void iobmap_build(struct iommu_table *tbl, long index,
93 93
94 pr_debug("iobmap: build at: %lx, %lx, addr: %lx\n", index, npages, uaddr); 94 pr_debug("iobmap: build at: %lx, %lx, addr: %lx\n", index, npages, uaddr);
95 95
96 bus_addr = (tbl->it_offset + index) << PAGE_SHIFT; 96 bus_addr = (tbl->it_offset + index) << IOBMAP_PAGE_SHIFT;
97 97
98 ip = ((u32 *)tbl->it_base) + index; 98 ip = ((u32 *)tbl->it_base) + index;
99 99
@@ -118,7 +118,7 @@ static void iobmap_free(struct iommu_table *tbl, long index,
118 118
119 pr_debug("iobmap: free at: %lx, %lx\n", index, npages); 119 pr_debug("iobmap: free at: %lx, %lx\n", index, npages);
120 120
121 bus_addr = (tbl->it_offset + index) << PAGE_SHIFT; 121 bus_addr = (tbl->it_offset + index) << IOBMAP_PAGE_SHIFT;
122 122
123 ip = ((u32 *)tbl->it_base) + index; 123 ip = ((u32 *)tbl->it_base) + index;
124 124
@@ -137,7 +137,7 @@ static void iommu_table_iobmap_setup(void)
137 iommu_table_iobmap.it_busno = 0; 137 iommu_table_iobmap.it_busno = 0;
138 iommu_table_iobmap.it_offset = 0; 138 iommu_table_iobmap.it_offset = 0;
139 /* it_size is in number of entries */ 139 /* it_size is in number of entries */
140 iommu_table_iobmap.it_size = 0x80000000 >> PAGE_SHIFT; 140 iommu_table_iobmap.it_size = 0x80000000 >> IOBMAP_PAGE_SHIFT;
141 141
142 /* Initialize the common IOMMU code */ 142 /* Initialize the common IOMMU code */
143 iommu_table_iobmap.it_base = (unsigned long)iob_l2_base; 143 iommu_table_iobmap.it_base = (unsigned long)iob_l2_base;
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 87d52060fe..2eb8f92704 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -83,6 +83,7 @@ enum ps3_dev_type {
83 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */ 83 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */
84 PS3_DEV_TYPE_SB_GPIO = 6, 84 PS3_DEV_TYPE_SB_GPIO = 6,
85 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */ 85 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */
86 PS3_DEV_TYPE_STOR_DUMMY = 32,
86 PS3_DEV_TYPE_NOACCESS = 255, 87 PS3_DEV_TYPE_NOACCESS = 255,
87}; 88};
88 89
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index 8cc37cfea0..1c94824f7b 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -349,6 +349,35 @@ int ps3_repository_find_device(struct ps3_repository_device *repo)
349 return result; 349 return result;
350 } 350 }
351 351
352 if (tmp.bus_type == PS3_BUS_TYPE_STORAGE) {
353 /*
354 * A storage device may show up in the repository before the
355 * hypervisor has finished probing its type and regions
356 */
357 unsigned int num_regions;
358
359 if (tmp.dev_type == PS3_DEV_TYPE_STOR_DUMMY) {
360 pr_debug("%s:%u storage device not ready\n", __func__,
361 __LINE__);
362 return -ENODEV;
363 }
364
365 result = ps3_repository_read_stor_dev_num_regions(tmp.bus_index,
366 tmp.dev_index,
367 &num_regions);
368 if (result) {
369 pr_debug("%s:%d read_stor_dev_num_regions failed\n",
370 __func__, __LINE__);
371 return result;
372 }
373
374 if (!num_regions) {
375 pr_debug("%s:%u storage device has no regions yet\n",
376 __func__, __LINE__);
377 return -ENODEV;
378 }
379 }
380
352 result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index, 381 result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index,
353 &tmp.dev_id); 382 &tmp.dev_id);
354 383
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 2952b22f1c..609945dbe3 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -63,7 +63,8 @@ int ps3_compare_firmware_version(u16 major, u16 minor, u16 rev)
63 x.minor = minor; 63 x.minor = minor;
64 x.rev = rev; 64 x.rev = rev;
65 65
66 return (ps3_firmware_version.raw - x.raw); 66 return (ps3_firmware_version.raw > x.raw) -
67 (ps3_firmware_version.raw < x.raw);
67} 68}
68EXPORT_SYMBOL_GPL(ps3_compare_firmware_version); 69EXPORT_SYMBOL_GPL(ps3_compare_firmware_version);
69 70
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index ac2a4b8a4c..d1630a074a 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -505,6 +505,8 @@ static void mfc_sr1_set(struct spu *spu, u64 sr1)
505 static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK 505 static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK
506 | MFC_STATE1_PROBLEM_STATE_MASK); 506 | MFC_STATE1_PROBLEM_STATE_MASK);
507 507
508 sr1 |= MFC_STATE1_MASTER_RUN_CONTROL_MASK;
509
508 BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed)); 510 BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed));
509 511
510 spu_pdata(spu)->cache.sr1 = sr1; 512 spu_pdata(spu)->cache.sr1 = sr1;
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 5bd90a7eb7..f0b5ff17d8 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -419,7 +419,7 @@ static void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
419 * For the moment only implement delivery to all cpus or one cpu. 419 * For the moment only implement delivery to all cpus or one cpu.
420 * Get current irq_server for the given irq 420 * Get current irq_server for the given irq
421 */ 421 */
422 irq_server = get_irq_server(irq, 1); 422 irq_server = get_irq_server(virq, 1);
423 if (irq_server == -1) { 423 if (irq_server == -1) {
424 char cpulist[128]; 424 char cpulist[128];
425 cpumask_scnprintf(cpulist, sizeof(cpulist), cpumask); 425 cpumask_scnprintf(cpulist, sizeof(cpulist), cpumask);
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
index 2326d5dc57..ab037a3a40 100644
--- a/arch/powerpc/sysdev/axonram.c
+++ b/arch/powerpc/sysdev/axonram.c
@@ -59,8 +59,7 @@
59struct axon_ram_bank { 59struct axon_ram_bank {
60 struct of_device *device; 60 struct of_device *device;
61 struct gendisk *disk; 61 struct gendisk *disk;
62 unsigned int irq_correctable; 62 unsigned int irq_id;
63 unsigned int irq_uncorrectable;
64 unsigned long ph_addr; 63 unsigned long ph_addr;
65 unsigned long io_addr; 64 unsigned long io_addr;
66 unsigned long size; 65 unsigned long size;
@@ -93,16 +92,9 @@ axon_ram_irq_handler(int irq, void *dev)
93 92
94 BUG_ON(!bank); 93 BUG_ON(!bank);
95 94
96 if (irq == bank->irq_correctable) { 95 dev_err(&device->dev, "Correctable memory error occured\n");
97 dev_err(&device->dev, "Correctable memory error occured\n"); 96 bank->ecc_counter++;
98 bank->ecc_counter++; 97 return IRQ_HANDLED;
99 return IRQ_HANDLED;
100 } else if (irq == bank->irq_uncorrectable) {
101 dev_err(&device->dev, "Uncorrectable memory error occured\n");
102 panic("Critical ECC error on %s", device->node->full_name);
103 }
104
105 return IRQ_NONE;
106} 98}
107 99
108/** 100/**
@@ -259,28 +251,18 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
259 blk_queue_hardsect_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE); 251 blk_queue_hardsect_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE);
260 add_disk(bank->disk); 252 add_disk(bank->disk);
261 253
262 bank->irq_correctable = irq_of_parse_and_map(device->node, 0); 254 bank->irq_id = irq_of_parse_and_map(device->node, 0);
263 bank->irq_uncorrectable = irq_of_parse_and_map(device->node, 1); 255 if (bank->irq_id == NO_IRQ) {
264 if ((bank->irq_correctable <= 0) || (bank->irq_uncorrectable <= 0)) {
265 dev_err(&device->dev, "Cannot access ECC interrupt ID\n"); 256 dev_err(&device->dev, "Cannot access ECC interrupt ID\n");
266 rc = -EFAULT; 257 rc = -EFAULT;
267 goto failed; 258 goto failed;
268 } 259 }
269 260
270 rc = request_irq(bank->irq_correctable, axon_ram_irq_handler, 261 rc = request_irq(bank->irq_id, axon_ram_irq_handler,
271 AXON_RAM_IRQ_FLAGS, bank->disk->disk_name, device);
272 if (rc != 0) {
273 dev_err(&device->dev, "Cannot register ECC interrupt handler\n");
274 bank->irq_correctable = bank->irq_uncorrectable = 0;
275 rc = -EFAULT;
276 goto failed;
277 }
278
279 rc = request_irq(bank->irq_uncorrectable, axon_ram_irq_handler,
280 AXON_RAM_IRQ_FLAGS, bank->disk->disk_name, device); 262 AXON_RAM_IRQ_FLAGS, bank->disk->disk_name, device);
281 if (rc != 0) { 263 if (rc != 0) {
282 dev_err(&device->dev, "Cannot register ECC interrupt handler\n"); 264 dev_err(&device->dev, "Cannot register ECC interrupt handler\n");
283 bank->irq_uncorrectable = 0; 265 bank->irq_id = NO_IRQ;
284 rc = -EFAULT; 266 rc = -EFAULT;
285 goto failed; 267 goto failed;
286 } 268 }
@@ -296,13 +278,9 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
296 278
297failed: 279failed:
298 if (bank != NULL) { 280 if (bank != NULL) {
299 if (bank->irq_uncorrectable > 0) 281 if (bank->irq_id != NO_IRQ)
300 free_irq(bank->irq_uncorrectable, device); 282 free_irq(bank->irq_id, device);
301 if (bank->irq_correctable > 0)
302 free_irq(bank->irq_correctable, device);
303 if (bank->disk != NULL) { 283 if (bank->disk != NULL) {
304 if (bank->disk->queue != NULL)
305 blk_cleanup_queue(bank->disk->queue);
306 if (bank->disk->major > 0) 284 if (bank->disk->major > 0)
307 unregister_blkdev(bank->disk->major, 285 unregister_blkdev(bank->disk->major,
308 bank->disk->disk_name); 286 bank->disk->disk_name);
@@ -329,9 +307,7 @@ axon_ram_remove(struct of_device *device)
329 BUG_ON(!bank || !bank->disk); 307 BUG_ON(!bank || !bank->disk);
330 308
331 device_remove_file(&device->dev, &dev_attr_ecc); 309 device_remove_file(&device->dev, &dev_attr_ecc);
332 free_irq(bank->irq_uncorrectable, device); 310 free_irq(bank->irq_id, device);
333 free_irq(bank->irq_correctable, device);
334 blk_cleanup_queue(bank->disk->queue);
335 unregister_blkdev(bank->disk->major, bank->disk->disk_name); 311 unregister_blkdev(bank->disk->major, bank->disk->disk_name);
336 del_gendisk(bank->disk); 312 del_gendisk(bank->disk);
337 iounmap((void __iomem *) bank->io_addr); 313 iounmap((void __iomem *) bank->io_addr);
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c
index 4f67b89ba1..dd5417aec1 100644
--- a/arch/powerpc/sysdev/commproc.c
+++ b/arch/powerpc/sysdev/commproc.c
@@ -395,4 +395,4 @@ uint cpm_dpram_phys(u8* addr)
395{ 395{
396 return (dpram_pbase + (uint)(addr - dpram_vbase)); 396 return (dpram_pbase + (uint)(addr - dpram_vbase));
397} 397}
398EXPORT_SYMBOL(cpm_dpram_addr); 398EXPORT_SYMBOL(cpm_dpram_phys);
diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2_common.c
index 9244129747..c827715a50 100644
--- a/arch/powerpc/sysdev/cpm2_common.c
+++ b/arch/powerpc/sysdev/cpm2_common.c
@@ -102,7 +102,7 @@ cpm_setbrg(uint brg, uint rate)
102 brg -= 4; 102 brg -= 4;
103 } 103 }
104 bp += brg; 104 bp += brg;
105 *bp = ((BRG_UART_CLK / rate) << 1) | CPM_BRG_EN; 105 out_be32(bp, (((BRG_UART_CLK / rate) - 1) << 1) | CPM_BRG_EN);
106 106
107 cpm2_unmap(bp); 107 cpm2_unmap(bp);
108} 108}
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c
index 7088428e1f..9da880be4d 100644
--- a/arch/ppc/8xx_io/commproc.c
+++ b/arch/ppc/8xx_io/commproc.c
@@ -459,7 +459,7 @@ EXPORT_SYMBOL(cpm_dpdump);
459 459
460void *cpm_dpram_addr(unsigned long offset) 460void *cpm_dpram_addr(unsigned long offset)
461{ 461{
462 return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset; 462 return (void *)(dpram_vbase + offset);
463} 463}
464EXPORT_SYMBOL(cpm_dpram_addr); 464EXPORT_SYMBOL(cpm_dpram_addr);
465 465
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S
index 944c35c242..eb8d26f873 100644
--- a/arch/ppc/kernel/head_8xx.S
+++ b/arch/ppc/kernel/head_8xx.S
@@ -495,9 +495,7 @@ LoadLargeDTLB:
495 lwz r11, 4(r0) 495 lwz r11, 4(r0)
496 496
497 lwz r12, 16(r0) 497 lwz r12, 16(r0)
498#ifdef CONFIG_8xx_CPU6
499 lwz r3, 8(r0) 498 lwz r3, 8(r0)
500#endif
501 rfi 499 rfi
502 500
503/* This is the data TLB error on the MPC8xx. This could be due to 501/* This is the data TLB error on the MPC8xx. This could be due to
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 3d211aa33c..97ac58682d 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -34,6 +34,8 @@ isa-y := $(isa-y)-nofpu
34endif 34endif
35endif 35endif
36 36
37isa-y := $(isa-y)-up
38
37cflags-$(CONFIG_CPU_SH2) := $(call cc-option,-m2,) 39cflags-$(CONFIG_CPU_SH2) := $(call cc-option,-m2,)
38cflags-$(CONFIG_CPU_SH2A) += $(call cc-option,-m2a,) \ 40cflags-$(CONFIG_CPU_SH2A) += $(call cc-option,-m2a,) \
39 $(call cc-option,-m2a-nofpu,) 41 $(call cc-option,-m2a-nofpu,)
@@ -46,7 +48,20 @@ cflags-$(CONFIG_CPU_SH4A) += $(call cc-option,-m4a,) \
46cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb 48cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb
47cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml 49cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml
48 50
49cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) -ffreestanding 51#
52# -Wa,-isa= tuning implies -Wa,-dsp for the versions of binutils that
53# support it, while -Wa,-dsp by itself limits the range of usable opcodes
54# on certain CPU subtypes. Try the ISA variant first, and if that fails,
55# fall back on -Wa,-dsp for the old binutils versions. Even without DSP
56# opcodes, we always want the best ISA tuning the version of binutils
57# will provide.
58#
59isaflags-y := $(call as-option,-Wa$(comma)-isa=$(isa-y),)
60
61isaflags-$(CONFIG_SH_DSP) := \
62 $(call as-option,-Wa$(comma)-isa=$(isa-y),-Wa$(comma)-dsp)
63
64cflags-y += $(isaflags-y) -ffreestanding
50 65
51cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \ 66cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \
52 $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g') 67 $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c
index 6e4e965413..dab193293f 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c
@@ -41,3 +41,8 @@ static int __init sh4202_devices_setup(void)
41 ARRAY_SIZE(sh4202_devices)); 41 ARRAY_SIZE(sh4202_devices));
42} 42}
43__initcall(sh4202_devices_setup); 43__initcall(sh4202_devices_setup);
44
45void __init plat_irq_setup(void)
46{
47 /* do nothing - all IRL interrupts are handled by the board code */
48}
diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c
index e2d02fd13f..d850785b20 100644
--- a/arch/sparc/kernel/ebus.c
+++ b/arch/sparc/kernel/ebus.c
@@ -156,6 +156,8 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
156 dev->prom_node = dp; 156 dev->prom_node = dp;
157 157
158 regs = of_get_property(dp, "reg", &len); 158 regs = of_get_property(dp, "reg", &len);
159 if (!regs)
160 len = 0;
159 if (len % sizeof(struct linux_prom_registers)) { 161 if (len % sizeof(struct linux_prom_registers)) {
160 prom_printf("UGH: proplen for %s was %d, need multiple of %d\n", 162 prom_printf("UGH: proplen for %s was %d, need multiple of %d\n",
161 dev->prom_node->name, len, 163 dev->prom_node->name, len,
diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile
index 9ddc5b9ce3..76effdbea0 100644
--- a/arch/sparc/lib/Makefile
+++ b/arch/sparc/lib/Makefile
@@ -8,6 +8,7 @@ lib-y := mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o memcpy.o memset.o \
8 strlen.o checksum.o blockops.o memscan.o memcmp.o strncmp.o \ 8 strlen.o checksum.o blockops.o memscan.o memcmp.o strncmp.o \
9 strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \ 9 strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \
10 copy_user.o locks.o atomic.o \ 10 copy_user.o locks.o atomic.o \
11 lshrdi3.o ashldi3.o rwsem.o muldi3.o bitext.o 11 lshrdi3.o ashldi3.o rwsem.o muldi3.o bitext.o \
12 cmpdi2.o
12 13
13obj-y += iomap.o atomic32.o 14obj-y += iomap.o atomic32.o
diff --git a/arch/sparc/lib/cmpdi2.c b/arch/sparc/lib/cmpdi2.c
new file mode 100644
index 0000000000..8c1306437e
--- /dev/null
+++ b/arch/sparc/lib/cmpdi2.c
@@ -0,0 +1,27 @@
1#include <linux/module.h>
2
3#include "libgcc.h"
4
5word_type __cmpdi2(long long a, long long b)
6{
7 const DWunion au = {
8 .ll = a
9 };
10 const DWunion bu = {
11 .ll = b
12 };
13
14 if (au.s.high < bu.s.high)
15 return 0;
16 else if (au.s.high > bu.s.high)
17 return 2;
18
19 if ((unsigned int) au.s.low < (unsigned int) bu.s.low)
20 return 0;
21 else if ((unsigned int) au.s.low > (unsigned int) bu.s.low)
22 return 2;
23
24 return 1;
25}
26
27EXPORT_SYMBOL(__cmpdi2);
diff --git a/arch/sparc/lib/libgcc.h b/arch/sparc/lib/libgcc.h
new file mode 100644
index 0000000000..b84fd797f3
--- /dev/null
+++ b/arch/sparc/lib/libgcc.h
@@ -0,0 +1,18 @@
1#ifndef __ASM_LIBGCC_H
2#define __ASM_LIBGCC_H
3
4#include <asm/byteorder.h>
5
6typedef int word_type __attribute__ ((mode (__word__)));
7
8struct DWstruct {
9 int high, low;
10};
11
12typedef union
13{
14 struct DWstruct s;
15 long long ll;
16} DWunion;
17
18#endif /* __ASM_LIBGCC_H */
diff --git a/arch/sparc/prom/console.c b/arch/sparc/prom/console.c
index 8d1cfb0d50..2a007a7844 100644
--- a/arch/sparc/prom/console.c
+++ b/arch/sparc/prom/console.c
@@ -17,9 +17,6 @@
17 17
18extern void restore_current(void); 18extern void restore_current(void);
19 19
20static char con_name_jmc[] = "/obio/su@"; /* "/obio/su@0,3002f8"; */
21#define CON_SIZE_JMC (sizeof(con_name_jmc))
22
23/* Non blocking get character from console input device, returns -1 20/* Non blocking get character from console input device, returns -1
24 * if no input was taken. This can be used for polling. 21 * if no input was taken. This can be used for polling.
25 */ 22 */
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index 68338a601f..7d07297db8 100644
--- a/arch/sparc64/defconfig
+++ b/arch/sparc64/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc1 3# Linux kernel version: 2.6.23-rc6
4# Sun Jul 22 19:24:37 2007 4# Sun Sep 16 09:52:11 2007
5# 5#
6CONFIG_SPARC=y 6CONFIG_SPARC=y
7CONFIG_SPARC64=y 7CONFIG_SPARC64=y
@@ -32,15 +32,11 @@ CONFIG_HZ=100
32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33 33
34# 34#
35# Code maturity level options 35# General setup
36# 36#
37CONFIG_EXPERIMENTAL=y 37CONFIG_EXPERIMENTAL=y
38CONFIG_BROKEN_ON_SMP=y 38CONFIG_BROKEN_ON_SMP=y
39CONFIG_INIT_ENV_ARG_LIMIT=32 39CONFIG_INIT_ENV_ARG_LIMIT=32
40
41#
42# General setup
43#
44CONFIG_LOCALVERSION="" 40CONFIG_LOCALVERSION=""
45# CONFIG_LOCALVERSION_AUTO is not set 41# CONFIG_LOCALVERSION_AUTO is not set
46CONFIG_SWAP=y 42CONFIG_SWAP=y
@@ -555,6 +551,7 @@ CONFIG_E1000_NAPI=y
555# CONFIG_SIS190 is not set 551# CONFIG_SIS190 is not set
556# CONFIG_SKGE is not set 552# CONFIG_SKGE is not set
557# CONFIG_SKY2 is not set 553# CONFIG_SKY2 is not set
554# CONFIG_SK98LIN is not set
558# CONFIG_VIA_VELOCITY is not set 555# CONFIG_VIA_VELOCITY is not set
559CONFIG_TIGON3=m 556CONFIG_TIGON3=m
560CONFIG_BNX2=m 557CONFIG_BNX2=m
@@ -809,6 +806,7 @@ CONFIG_HWMON=y
809# CONFIG_SENSORS_SMSC47M1 is not set 806# CONFIG_SENSORS_SMSC47M1 is not set
810# CONFIG_SENSORS_SMSC47M192 is not set 807# CONFIG_SENSORS_SMSC47M192 is not set
811# CONFIG_SENSORS_SMSC47B397 is not set 808# CONFIG_SENSORS_SMSC47B397 is not set
809# CONFIG_SENSORS_THMC50 is not set
812# CONFIG_SENSORS_VIA686A is not set 810# CONFIG_SENSORS_VIA686A is not set
813# CONFIG_SENSORS_VT1211 is not set 811# CONFIG_SENSORS_VT1211 is not set
814# CONFIG_SENSORS_VT8231 is not set 812# CONFIG_SENSORS_VT8231 is not set
@@ -1162,10 +1160,6 @@ CONFIG_USB_STORAGE=m
1162# CONFIG_MMC is not set 1160# CONFIG_MMC is not set
1163# CONFIG_NEW_LEDS is not set 1161# CONFIG_NEW_LEDS is not set
1164# CONFIG_INFINIBAND is not set 1162# CONFIG_INFINIBAND is not set
1165
1166#
1167# Real Time Clock
1168#
1169# CONFIG_RTC_CLASS is not set 1163# CONFIG_RTC_CLASS is not set
1170 1164
1171# 1165#
diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c
index f205fc7cbc..d208cc7804 100644
--- a/arch/sparc64/kernel/binfmt_aout32.c
+++ b/arch/sparc64/kernel/binfmt_aout32.c
@@ -177,7 +177,7 @@ static u32 __user *create_aout32_tables(char __user *p, struct linux_binprm *bpr
177 get_user(c,p++); 177 get_user(c,p++);
178 } while (c); 178 } while (c);
179 } 179 }
180 put_user(NULL,argv); 180 put_user(0,argv);
181 current->mm->arg_end = current->mm->env_start = (unsigned long) p; 181 current->mm->arg_end = current->mm->env_start = (unsigned long) p;
182 while (envc-->0) { 182 while (envc-->0) {
183 char c; 183 char c;
@@ -186,7 +186,7 @@ static u32 __user *create_aout32_tables(char __user *p, struct linux_binprm *bpr
186 get_user(c,p++); 186 get_user(c,p++);
187 } while (c); 187 } while (c);
188 } 188 }
189 put_user(NULL,envp); 189 put_user(0,envp);
190 current->mm->env_end = (unsigned long) p; 190 current->mm->env_end = (unsigned long) p;
191 return sp; 191 return sp;
192} 192}
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
index bc9ae36f7a..04ab81cb4f 100644
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -375,7 +375,10 @@ static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_de
375 dev->num_addrs = 0; 375 dev->num_addrs = 0;
376 dev->num_irqs = 0; 376 dev->num_irqs = 0;
377 } else { 377 } else {
378 (void) of_get_property(dp, "reg", &len); 378 const int *regs = of_get_property(dp, "reg", &len);
379
380 if (!regs)
381 len = 0;
379 dev->num_addrs = len / sizeof(struct linux_prom_registers); 382 dev->num_addrs = len / sizeof(struct linux_prom_registers);
380 383
381 for (i = 0; i < dev->num_addrs; i++) 384 for (i = 0; i < dev->num_addrs; i++)
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S
index 63144ad476..c4147ad867 100644
--- a/arch/sparc64/kernel/head.S
+++ b/arch/sparc64/kernel/head.S
@@ -98,7 +98,7 @@ sparc64_boot:
98 .globl prom_boot_mapped_pc, prom_boot_mapping_mode 98 .globl prom_boot_mapped_pc, prom_boot_mapping_mode
99 .globl prom_boot_mapping_phys_high, prom_boot_mapping_phys_low 99 .globl prom_boot_mapping_phys_high, prom_boot_mapping_phys_low
100 .globl prom_compatible_name, prom_cpu_path, prom_cpu_compatible 100 .globl prom_compatible_name, prom_cpu_path, prom_cpu_compatible
101 .globl is_sun4v, sun4v_chip_type 101 .globl is_sun4v, sun4v_chip_type, prom_set_trap_table_name
102prom_peer_name: 102prom_peer_name:
103 .asciz "peer" 103 .asciz "peer"
104prom_compatible_name: 104prom_compatible_name:
@@ -121,6 +121,8 @@ prom_map_name:
121 .asciz "map" 121 .asciz "map"
122prom_unmap_name: 122prom_unmap_name:
123 .asciz "unmap" 123 .asciz "unmap"
124prom_set_trap_table_name:
125 .asciz "SUNW,set-trap-table"
124prom_sun4v_name: 126prom_sun4v_name:
125 .asciz "sun4v" 127 .asciz "sun4v"
126prom_niagara_prefix: 128prom_niagara_prefix:
@@ -691,15 +693,38 @@ setup_trap_table:
691 sethi %hi(kern_base), %g3 693 sethi %hi(kern_base), %g3
692 ldx [%g3 + %lo(kern_base)], %g3 694 ldx [%g3 + %lo(kern_base)], %g3
693 add %g2, %g3, %o1 695 add %g2, %g3, %o1
696 sethi %hi(sparc64_ttable_tl0), %o0
694 697
695 call prom_set_trap_table_sun4v 698 set prom_set_trap_table_name, %g2
696 sethi %hi(sparc64_ttable_tl0), %o0 699 stx %g2, [%sp + 2047 + 128 + 0x00]
700 mov 2, %g2
701 stx %g2, [%sp + 2047 + 128 + 0x08]
702 mov 0, %g2
703 stx %g2, [%sp + 2047 + 128 + 0x10]
704 stx %o0, [%sp + 2047 + 128 + 0x18]
705 stx %o1, [%sp + 2047 + 128 + 0x20]
706 sethi %hi(p1275buf), %g2
707 or %g2, %lo(p1275buf), %g2
708 ldx [%g2 + 0x08], %o1
709 call %o1
710 add %sp, (2047 + 128), %o0
697 711
698 ba,pt %xcc, 2f 712 ba,pt %xcc, 2f
699 nop 713 nop
700 714
7011: call prom_set_trap_table 7151: sethi %hi(sparc64_ttable_tl0), %o0
702 sethi %hi(sparc64_ttable_tl0), %o0 716 set prom_set_trap_table_name, %g2
717 stx %g2, [%sp + 2047 + 128 + 0x00]
718 mov 1, %g2
719 stx %g2, [%sp + 2047 + 128 + 0x08]
720 mov 0, %g2
721 stx %g2, [%sp + 2047 + 128 + 0x10]
722 stx %o0, [%sp + 2047 + 128 + 0x18]
723 sethi %hi(p1275buf), %g2
724 or %g2, %lo(p1275buf), %g2
725 ldx [%g2 + 0x08], %o1
726 call %o1
727 add %sp, (2047 + 128), %o0
703 728
704 /* Start using proper page size encodings in ctx register. */ 729 /* Start using proper page size encodings in ctx register. */
7052: sethi %hi(sparc64_kern_pri_context), %g3 7302: sethi %hi(sparc64_kern_pri_context), %g3
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 384abf410c..23956096b3 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -217,8 +217,27 @@ struct irq_handler_data {
217 void (*pre_handler)(unsigned int, void *, void *); 217 void (*pre_handler)(unsigned int, void *, void *);
218 void *pre_handler_arg1; 218 void *pre_handler_arg1;
219 void *pre_handler_arg2; 219 void *pre_handler_arg2;
220
221 u32 msi;
220}; 222};
221 223
224void sparc64_set_msi(unsigned int virt_irq, u32 msi)
225{
226 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
227
228 if (data)
229 data->msi = msi;
230}
231
232u32 sparc64_get_msi(unsigned int virt_irq)
233{
234 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
235
236 if (data)
237 return data->msi;
238 return 0xffffffff;
239}
240
222static inline struct ino_bucket *virt_irq_to_bucket(unsigned int virt_irq) 241static inline struct ino_bucket *virt_irq_to_bucket(unsigned int virt_irq)
223{ 242{
224 unsigned int real_irq = virt_to_real_irq(virt_irq); 243 unsigned int real_irq = virt_to_real_irq(virt_irq);
@@ -308,7 +327,7 @@ static void sun4u_irq_disable(unsigned int virt_irq)
308 327
309 if (likely(data)) { 328 if (likely(data)) {
310 unsigned long imap = data->imap; 329 unsigned long imap = data->imap;
311 u32 tmp = upa_readq(imap); 330 unsigned long tmp = upa_readq(imap);
312 331
313 tmp &= ~IMAP_VALID; 332 tmp &= ~IMAP_VALID;
314 upa_writeq(tmp, imap); 333 upa_writeq(tmp, imap);
@@ -741,7 +760,7 @@ unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p,
741 break; 760 break;
742 } 761 }
743 if (devino >= msi_end) 762 if (devino >= msi_end)
744 return 0; 763 return -ENOSPC;
745 764
746 sysino = sun4v_devino_to_sysino(devhandle, devino); 765 sysino = sun4v_devino_to_sysino(devhandle, devino);
747 bucket = &ivector_table[sysino]; 766 bucket = &ivector_table[sysino];
@@ -755,8 +774,8 @@ unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p,
755 774
756 data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC); 775 data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC);
757 if (unlikely(!data)) { 776 if (unlikely(!data)) {
758 prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n"); 777 virt_irq_free(*virt_irq_p);
759 prom_halt(); 778 return -ENOMEM;
760 } 779 }
761 set_irq_chip_data(bucket->virt_irq, data); 780 set_irq_chip_data(bucket->virt_irq, data);
762 781
diff --git a/arch/sparc64/kernel/mdesc.c b/arch/sparc64/kernel/mdesc.c
index 9f22e4ff60..856659bb13 100644
--- a/arch/sparc64/kernel/mdesc.c
+++ b/arch/sparc64/kernel/mdesc.c
@@ -777,8 +777,12 @@ void __devinit mdesc_fill_in_cpu_data(cpumask_t mask)
777 cpuid = *id; 777 cpuid = *id;
778 778
779#ifdef CONFIG_SMP 779#ifdef CONFIG_SMP
780 if (cpuid >= NR_CPUS) 780 if (cpuid >= NR_CPUS) {
781 printk(KERN_WARNING "Ignoring CPU %d which is "
782 ">= NR_CPUS (%d)\n",
783 cpuid, NR_CPUS);
781 continue; 784 continue;
785 }
782 if (!cpu_isset(cpuid, mask)) 786 if (!cpu_isset(cpuid, mask))
783 continue; 787 continue;
784#else 788#else
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index 3d93e9203b..e8dac81d8a 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -393,7 +393,6 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
393 sd->host_controller = pbm; 393 sd->host_controller = pbm;
394 sd->prom_node = node; 394 sd->prom_node = node;
395 sd->op = of_find_device_by_node(node); 395 sd->op = of_find_device_by_node(node);
396 sd->msi_num = 0xffffffff;
397 396
398 sd = &sd->op->dev.archdata; 397 sd = &sd->op->dev.archdata;
399 sd->iommu = pbm->iommu; 398 sd->iommu = pbm->iommu;
@@ -745,7 +744,7 @@ static void __devinit pci_of_scan_bus(struct pci_pbm_info *pbm,
745{ 744{
746 struct device_node *child; 745 struct device_node *child;
747 const u32 *reg; 746 const u32 *reg;
748 int reglen, devfn; 747 int reglen, devfn, prev_devfn;
749 struct pci_dev *dev; 748 struct pci_dev *dev;
750 749
751 if (ofpci_verbose) 750 if (ofpci_verbose)
@@ -753,14 +752,25 @@ static void __devinit pci_of_scan_bus(struct pci_pbm_info *pbm,
753 node->full_name, bus->number); 752 node->full_name, bus->number);
754 753
755 child = NULL; 754 child = NULL;
755 prev_devfn = -1;
756 while ((child = of_get_next_child(node, child)) != NULL) { 756 while ((child = of_get_next_child(node, child)) != NULL) {
757 if (ofpci_verbose) 757 if (ofpci_verbose)
758 printk(" * %s\n", child->full_name); 758 printk(" * %s\n", child->full_name);
759 reg = of_get_property(child, "reg", &reglen); 759 reg = of_get_property(child, "reg", &reglen);
760 if (reg == NULL || reglen < 20) 760 if (reg == NULL || reglen < 20)
761 continue; 761 continue;
762
762 devfn = (reg[0] >> 8) & 0xff; 763 devfn = (reg[0] >> 8) & 0xff;
763 764
765 /* This is a workaround for some device trees
766 * which list PCI devices twice. On the V100
767 * for example, device number 3 is listed twice.
768 * Once as "pm" and once again as "lomp".
769 */
770 if (devfn == prev_devfn)
771 continue;
772 prev_devfn = devfn;
773
764 /* create a new pci_dev for this device */ 774 /* create a new pci_dev for this device */
765 dev = of_create_pci_dev(pbm, child, bus, devfn, 0); 775 dev = of_create_pci_dev(pbm, child, bus, devfn, 0);
766 if (!dev) 776 if (!dev)
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c
index 2f61c4b125..c76bfbb7da 100644
--- a/arch/sparc64/kernel/pci_common.c
+++ b/arch/sparc64/kernel/pci_common.c
@@ -264,7 +264,7 @@ static int sun4v_read_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn,
264 unsigned int func = PCI_FUNC(devfn); 264 unsigned int func = PCI_FUNC(devfn);
265 unsigned long ret; 265 unsigned long ret;
266 266
267 if (bus_dev == pbm->pci_bus && devfn == 0x00) 267 if (!bus && devfn == 0x00)
268 return pci_host_bridge_read_pci_cfg(bus_dev, devfn, where, 268 return pci_host_bridge_read_pci_cfg(bus_dev, devfn, where,
269 size, value); 269 size, value);
270 if (config_out_of_range(pbm, bus, devfn, where)) { 270 if (config_out_of_range(pbm, bus, devfn, where)) {
@@ -300,7 +300,7 @@ static int sun4v_write_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn,
300 unsigned int func = PCI_FUNC(devfn); 300 unsigned int func = PCI_FUNC(devfn);
301 unsigned long ret; 301 unsigned long ret;
302 302
303 if (bus_dev == pbm->pci_bus && devfn == 0x00) 303 if (!bus && devfn == 0x00)
304 return pci_host_bridge_write_pci_cfg(bus_dev, devfn, where, 304 return pci_host_bridge_write_pci_cfg(bus_dev, devfn, where,
305 size, value); 305 size, value);
306 if (config_out_of_range(pbm, bus, devfn, where)) { 306 if (config_out_of_range(pbm, bus, devfn, where)) {
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c
index 466f4aa8fc..da724b13e8 100644
--- a/arch/sparc64/kernel/pci_sun4v.c
+++ b/arch/sparc64/kernel/pci_sun4v.c
@@ -940,13 +940,13 @@ static int pci_sun4v_setup_msi_irq(unsigned int *virt_irq_p,
940 if (msi_num < 0) 940 if (msi_num < 0)
941 return msi_num; 941 return msi_num;
942 942
943 devino = sun4v_build_msi(pbm->devhandle, virt_irq_p, 943 err = sun4v_build_msi(pbm->devhandle, virt_irq_p,
944 pbm->msiq_first_devino, 944 pbm->msiq_first_devino,
945 (pbm->msiq_first_devino + 945 (pbm->msiq_first_devino +
946 pbm->msiq_num)); 946 pbm->msiq_num));
947 err = -ENOMEM; 947 if (err < 0)
948 if (!devino)
949 goto out_err; 948 goto out_err;
949 devino = err;
950 950
951 msiqid = ((devino - pbm->msiq_first_devino) + 951 msiqid = ((devino - pbm->msiq_first_devino) +
952 pbm->msiq_first); 952 pbm->msiq_first);
@@ -971,7 +971,7 @@ static int pci_sun4v_setup_msi_irq(unsigned int *virt_irq_p,
971 if (pci_sun4v_msi_setvalid(pbm->devhandle, msi_num, HV_MSIVALID_VALID)) 971 if (pci_sun4v_msi_setvalid(pbm->devhandle, msi_num, HV_MSIVALID_VALID))
972 goto out_err; 972 goto out_err;
973 973
974 pdev->dev.archdata.msi_num = msi_num; 974 sparc64_set_msi(*virt_irq_p, msi_num);
975 975
976 if (entry->msi_attrib.is_64) { 976 if (entry->msi_attrib.is_64) {
977 msg.address_hi = pbm->msi64_start >> 32; 977 msg.address_hi = pbm->msi64_start >> 32;
@@ -993,8 +993,6 @@ static int pci_sun4v_setup_msi_irq(unsigned int *virt_irq_p,
993 993
994out_err: 994out_err:
995 free_msi(pbm, msi_num); 995 free_msi(pbm, msi_num);
996 sun4v_destroy_msi(*virt_irq_p);
997 *virt_irq_p = 0;
998 return err; 996 return err;
999 997
1000} 998}
@@ -1006,7 +1004,7 @@ static void pci_sun4v_teardown_msi_irq(unsigned int virt_irq,
1006 unsigned long msiqid, err; 1004 unsigned long msiqid, err;
1007 unsigned int msi_num; 1005 unsigned int msi_num;
1008 1006
1009 msi_num = pdev->dev.archdata.msi_num; 1007 msi_num = sparc64_get_msi(virt_irq);
1010 err = pci_sun4v_msi_getmsiq(pbm->devhandle, msi_num, &msiqid); 1008 err = pci_sun4v_msi_getmsiq(pbm->devhandle, msi_num, &msiqid);
1011 if (err) { 1009 if (err) {
1012 printk(KERN_ERR "%s: getmsiq gives error %lu\n", 1010 printk(KERN_ERR "%s: getmsiq gives error %lu\n",
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index d1a78c976c..a246e962e5 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -1046,7 +1046,8 @@ static void __init irq_trans_init(struct device_node *dp)
1046 if (!strcmp(dp->name, "fhc") && 1046 if (!strcmp(dp->name, "fhc") &&
1047 !strcmp(dp->parent->name, "central")) 1047 !strcmp(dp->parent->name, "central"))
1048 return central_irq_trans_init(dp); 1048 return central_irq_trans_init(dp);
1049 if (!strcmp(dp->name, "virtual-devices")) 1049 if (!strcmp(dp->name, "virtual-devices") ||
1050 !strcmp(dp->name, "niu"))
1050 return sun4v_vdev_irq_trans_init(dp); 1051 return sun4v_vdev_irq_trans_init(dp);
1051} 1052}
1052 1053
@@ -1583,8 +1584,12 @@ static void __init of_fill_in_cpu_data(void)
1583 ncpus_probed++; 1584 ncpus_probed++;
1584 1585
1585#ifdef CONFIG_SMP 1586#ifdef CONFIG_SMP
1586 if (cpuid >= NR_CPUS) 1587 if (cpuid >= NR_CPUS) {
1588 printk(KERN_WARNING "Ignoring CPU %d which is "
1589 ">= NR_CPUS (%d)\n",
1590 cpuid, NR_CPUS);
1587 continue; 1591 continue;
1592 }
1588#else 1593#else
1589 /* On uniprocessor we only want the values for the 1594 /* On uniprocessor we only want the values for the
1590 * real physical cpu the kernel booted onto, however 1595 * real physical cpu the kernel booted onto, however
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index b84c49e369..c73b7a48b0 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -353,6 +353,8 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu)
353 int timeout, ret; 353 int timeout, ret;
354 354
355 p = fork_idle(cpu); 355 p = fork_idle(cpu);
356 if (IS_ERR(p))
357 return PTR_ERR(p);
356 callin_flag = 0; 358 callin_flag = 0;
357 cpu_new_thread = task_thread_info(p); 359 cpu_new_thread = task_thread_info(p);
358 360
diff --git a/arch/sparc64/kernel/trampoline.S b/arch/sparc64/kernel/trampoline.S
index 9533a25ce5..04e81dda13 100644
--- a/arch/sparc64/kernel/trampoline.S
+++ b/arch/sparc64/kernel/trampoline.S
@@ -345,7 +345,7 @@ after_lock_tlb:
345 sethi %hi(tramp_stack), %g1 345 sethi %hi(tramp_stack), %g1
346 or %g1, %lo(tramp_stack), %g1 346 or %g1, %lo(tramp_stack), %g1
347 add %g1, TRAMP_STACK_SIZE, %g1 347 add %g1, TRAMP_STACK_SIZE, %g1
348 sub %g1, STACKFRAME_SZ + STACK_BIAS, %sp 348 sub %g1, STACKFRAME_SZ + STACK_BIAS + 256, %sp
349 mov 0, %fp 349 mov 0, %fp
350 350
351 /* Put garbage in these registers to trap any access to them. */ 351 /* Put garbage in these registers to trap any access to them. */
@@ -411,15 +411,38 @@ after_lock_tlb:
411 sethi %hi(kern_base), %g3 411 sethi %hi(kern_base), %g3
412 ldx [%g3 + %lo(kern_base)], %g3 412 ldx [%g3 + %lo(kern_base)], %g3
413 add %g2, %g3, %o1 413 add %g2, %g3, %o1
414 sethi %hi(sparc64_ttable_tl0), %o0
414 415
415 call prom_set_trap_table_sun4v 416 set prom_set_trap_table_name, %g2
416 sethi %hi(sparc64_ttable_tl0), %o0 417 stx %g2, [%sp + 2047 + 128 + 0x00]
418 mov 2, %g2
419 stx %g2, [%sp + 2047 + 128 + 0x08]
420 mov 0, %g2
421 stx %g2, [%sp + 2047 + 128 + 0x10]
422 stx %o0, [%sp + 2047 + 128 + 0x18]
423 stx %o1, [%sp + 2047 + 128 + 0x20]
424 sethi %hi(p1275buf), %g2
425 or %g2, %lo(p1275buf), %g2
426 ldx [%g2 + 0x08], %o1
427 call %o1
428 add %sp, (2047 + 128), %o0
417 429
418 ba,pt %xcc, 2f 430 ba,pt %xcc, 2f
419 nop 431 nop
420 432
4211: call prom_set_trap_table 4331: sethi %hi(sparc64_ttable_tl0), %o0
422 sethi %hi(sparc64_ttable_tl0), %o0 434 set prom_set_trap_table_name, %g2
435 stx %g2, [%sp + 2047 + 128 + 0x00]
436 mov 1, %g2
437 stx %g2, [%sp + 2047 + 128 + 0x08]
438 mov 0, %g2
439 stx %g2, [%sp + 2047 + 128 + 0x10]
440 stx %o0, [%sp + 2047 + 128 + 0x18]
441 sethi %hi(p1275buf), %g2
442 or %g2, %lo(p1275buf), %g2
443 ldx [%g2 + 0x08], %o1
444 call %o1
445 add %sp, (2047 + 128), %o0
423 446
4242: ldx [%l0], %g6 4472: ldx [%l0], %g6
425 ldx [%g6 + TI_TASK], %g4 448 ldx [%g6 + TI_TASK], %g4
diff --git a/arch/sparc64/kernel/vio.c b/arch/sparc64/kernel/vio.c
index 1550ac5673..0c1ee619d8 100644
--- a/arch/sparc64/kernel/vio.c
+++ b/arch/sparc64/kernel/vio.c
@@ -292,7 +292,7 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
292 } 292 }
293 vdev->dp = dp; 293 vdev->dp = dp;
294 294
295 printk(KERN_ERR "VIO: Adding device %s\n", vdev->dev.bus_id); 295 printk(KERN_INFO "VIO: Adding device %s\n", vdev->dev.bus_id);
296 296
297 err = device_register(&vdev->dev); 297 err = device_register(&vdev->dev);
298 if (err) { 298 if (err) {
@@ -342,8 +342,33 @@ static struct mdesc_notifier_client vio_device_notifier = {
342 .node_name = "virtual-device-port", 342 .node_name = "virtual-device-port",
343}; 343};
344 344
345/* We are only interested in domain service ports under the
346 * "domain-services" node. On control nodes there is another port
347 * under "openboot" that we should not mess with as aparently that is
348 * reserved exclusively for OBP use.
349 */
350static void vio_add_ds(struct mdesc_handle *hp, u64 node)
351{
352 int found;
353 u64 a;
354
355 found = 0;
356 mdesc_for_each_arc(a, hp, node, MDESC_ARC_TYPE_BACK) {
357 u64 target = mdesc_arc_target(hp, a);
358 const char *name = mdesc_node_name(hp, target);
359
360 if (!strcmp(name, "domain-services")) {
361 found = 1;
362 break;
363 }
364 }
365
366 if (found)
367 (void) vio_create_one(hp, node, &root_vdev->dev);
368}
369
345static struct mdesc_notifier_client vio_ds_notifier = { 370static struct mdesc_notifier_client vio_ds_notifier = {
346 .add = vio_add, 371 .add = vio_add_ds,
347 .remove = vio_remove, 372 .remove = vio_remove,
348 .node_name = "domain-services-port", 373 .node_name = "domain-services-port",
349}; 374};
diff --git a/arch/sparc64/lib/NGcopy_from_user.S b/arch/sparc64/lib/NGcopy_from_user.S
index 2d93456f76..e7f433f71b 100644
--- a/arch/sparc64/lib/NGcopy_from_user.S
+++ b/arch/sparc64/lib/NGcopy_from_user.S
@@ -1,6 +1,6 @@
1/* NGcopy_from_user.S: Niagara optimized copy from userspace. 1/* NGcopy_from_user.S: Niagara optimized copy from userspace.
2 * 2 *
3 * Copyright (C) 2006 David S. Miller (davem@davemloft.net) 3 * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
4 */ 4 */
5 5
6#define EX_LD(x) \ 6#define EX_LD(x) \
@@ -8,8 +8,8 @@
8 .section .fixup; \ 8 .section .fixup; \
9 .align 4; \ 9 .align 4; \
1099: wr %g0, ASI_AIUS, %asi;\ 1099: wr %g0, ASI_AIUS, %asi;\
11 retl; \ 11 ret; \
12 mov 1, %o0; \ 12 restore %g0, 1, %o0; \
13 .section __ex_table,"a";\ 13 .section __ex_table,"a";\
14 .align 4; \ 14 .align 4; \
15 .word 98b, 99b; \ 15 .word 98b, 99b; \
@@ -24,7 +24,7 @@
24#define LOAD(type,addr,dest) type##a [addr] ASI_AIUS, dest 24#define LOAD(type,addr,dest) type##a [addr] ASI_AIUS, dest
25#define LOAD_TWIN(addr_reg,dest0,dest1) \ 25#define LOAD_TWIN(addr_reg,dest0,dest1) \
26 ldda [addr_reg] ASI_BLK_INIT_QUAD_LDD_AIUS, dest0 26 ldda [addr_reg] ASI_BLK_INIT_QUAD_LDD_AIUS, dest0
27#define EX_RETVAL(x) 0 27#define EX_RETVAL(x) %g0
28 28
29#ifdef __KERNEL__ 29#ifdef __KERNEL__
30#define PREAMBLE \ 30#define PREAMBLE \
diff --git a/arch/sparc64/lib/NGcopy_to_user.S b/arch/sparc64/lib/NGcopy_to_user.S
index 34112d5054..6ea01c5532 100644
--- a/arch/sparc64/lib/NGcopy_to_user.S
+++ b/arch/sparc64/lib/NGcopy_to_user.S
@@ -1,6 +1,6 @@
1/* NGcopy_to_user.S: Niagara optimized copy to userspace. 1/* NGcopy_to_user.S: Niagara optimized copy to userspace.
2 * 2 *
3 * Copyright (C) 2006 David S. Miller (davem@davemloft.net) 3 * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
4 */ 4 */
5 5
6#define EX_ST(x) \ 6#define EX_ST(x) \
@@ -8,8 +8,8 @@
8 .section .fixup; \ 8 .section .fixup; \
9 .align 4; \ 9 .align 4; \
1099: wr %g0, ASI_AIUS, %asi;\ 1099: wr %g0, ASI_AIUS, %asi;\
11 retl; \ 11 ret; \
12 mov 1, %o0; \ 12 restore %g0, 1, %o0; \
13 .section __ex_table,"a";\ 13 .section __ex_table,"a";\
14 .align 4; \ 14 .align 4; \
15 .word 98b, 99b; \ 15 .word 98b, 99b; \
@@ -23,7 +23,7 @@
23#define FUNC_NAME NGcopy_to_user 23#define FUNC_NAME NGcopy_to_user
24#define STORE(type,src,addr) type##a src, [addr] ASI_AIUS 24#define STORE(type,src,addr) type##a src, [addr] ASI_AIUS
25#define STORE_ASI ASI_BLK_INIT_QUAD_LDD_AIUS 25#define STORE_ASI ASI_BLK_INIT_QUAD_LDD_AIUS
26#define EX_RETVAL(x) 0 26#define EX_RETVAL(x) %g0
27 27
28#ifdef __KERNEL__ 28#ifdef __KERNEL__
29 /* Writing to %asi is _expensive_ so we hardcode it. 29 /* Writing to %asi is _expensive_ so we hardcode it.
diff --git a/arch/sparc64/lib/NGmemcpy.S b/arch/sparc64/lib/NGmemcpy.S
index 66063a9a66..96a14caf69 100644
--- a/arch/sparc64/lib/NGmemcpy.S
+++ b/arch/sparc64/lib/NGmemcpy.S
@@ -1,6 +1,6 @@
1/* NGmemcpy.S: Niagara optimized memcpy. 1/* NGmemcpy.S: Niagara optimized memcpy.
2 * 2 *
3 * Copyright (C) 2006 David S. Miller (davem@davemloft.net) 3 * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
4 */ 4 */
5 5
6#ifdef __KERNEL__ 6#ifdef __KERNEL__
@@ -16,6 +16,12 @@
16 wr %g0, ASI_PNF, %asi 16 wr %g0, ASI_PNF, %asi
17#endif 17#endif
18 18
19#ifdef __sparc_v9__
20#define SAVE_AMOUNT 128
21#else
22#define SAVE_AMOUNT 64
23#endif
24
19#ifndef STORE_ASI 25#ifndef STORE_ASI
20#define STORE_ASI ASI_BLK_INIT_QUAD_LDD_P 26#define STORE_ASI ASI_BLK_INIT_QUAD_LDD_P
21#endif 27#endif
@@ -50,7 +56,11 @@
50#endif 56#endif
51 57
52#ifndef STORE_INIT 58#ifndef STORE_INIT
59#ifndef SIMULATE_NIAGARA_ON_NON_NIAGARA
53#define STORE_INIT(src,addr) stxa src, [addr] %asi 60#define STORE_INIT(src,addr) stxa src, [addr] %asi
61#else
62#define STORE_INIT(src,addr) stx src, [addr + 0x00]
63#endif
54#endif 64#endif
55 65
56#ifndef FUNC_NAME 66#ifndef FUNC_NAME
@@ -73,18 +83,19 @@
73 83
74 .globl FUNC_NAME 84 .globl FUNC_NAME
75 .type FUNC_NAME,#function 85 .type FUNC_NAME,#function
76FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ 86FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
77 srlx %o2, 31, %g2 87 PREAMBLE
88 save %sp, -SAVE_AMOUNT, %sp
89 srlx %i2, 31, %g2
78 cmp %g2, 0 90 cmp %g2, 0
79 tne %xcc, 5 91 tne %xcc, 5
80 PREAMBLE 92 mov %i0, %o0
81 mov %o0, GLOBAL_SPARE 93 cmp %i2, 0
82 cmp %o2, 0
83 be,pn %XCC, 85f 94 be,pn %XCC, 85f
84 or %o0, %o1, %o3 95 or %o0, %i1, %i3
85 cmp %o2, 16 96 cmp %i2, 16
86 blu,a,pn %XCC, 80f 97 blu,a,pn %XCC, 80f
87 or %o3, %o2, %o3 98 or %i3, %i2, %i3
88 99
89 /* 2 blocks (128 bytes) is the minimum we can do the block 100 /* 2 blocks (128 bytes) is the minimum we can do the block
90 * copy with. We need to ensure that we'll iterate at least 101 * copy with. We need to ensure that we'll iterate at least
@@ -93,31 +104,31 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
93 * to (64 - 1) bytes from the length before we perform the 104 * to (64 - 1) bytes from the length before we perform the
94 * block copy loop. 105 * block copy loop.
95 */ 106 */
96 cmp %o2, (2 * 64) 107 cmp %i2, (2 * 64)
97 blu,pt %XCC, 70f 108 blu,pt %XCC, 70f
98 andcc %o3, 0x7, %g0 109 andcc %i3, 0x7, %g0
99 110
100 /* %o0: dst 111 /* %o0: dst
101 * %o1: src 112 * %i1: src
102 * %o2: len (known to be >= 128) 113 * %i2: len (known to be >= 128)
103 * 114 *
104 * The block copy loops will use %o4/%o5,%g2/%g3 as 115 * The block copy loops will use %i4/%i5,%g2/%g3 as
105 * temporaries while copying the data. 116 * temporaries while copying the data.
106 */ 117 */
107 118
108 LOAD(prefetch, %o1, #one_read) 119 LOAD(prefetch, %i1, #one_read)
109 wr %g0, STORE_ASI, %asi 120 wr %g0, STORE_ASI, %asi
110 121
111 /* Align destination on 64-byte boundary. */ 122 /* Align destination on 64-byte boundary. */
112 andcc %o0, (64 - 1), %o4 123 andcc %o0, (64 - 1), %i4
113 be,pt %XCC, 2f 124 be,pt %XCC, 2f
114 sub %o4, 64, %o4 125 sub %i4, 64, %i4
115 sub %g0, %o4, %o4 ! bytes to align dst 126 sub %g0, %i4, %i4 ! bytes to align dst
116 sub %o2, %o4, %o2 127 sub %i2, %i4, %i2
1171: subcc %o4, 1, %o4 1281: subcc %i4, 1, %i4
118 EX_LD(LOAD(ldub, %o1, %g1)) 129 EX_LD(LOAD(ldub, %i1, %g1))
119 EX_ST(STORE(stb, %g1, %o0)) 130 EX_ST(STORE(stb, %g1, %o0))
120 add %o1, 1, %o1 131 add %i1, 1, %i1
121 bne,pt %XCC, 1b 132 bne,pt %XCC, 1b
122 add %o0, 1, %o0 133 add %o0, 1, %o0
123 134
@@ -136,111 +147,155 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
136 * aligned store data at a time, this is easy to ensure. 147 * aligned store data at a time, this is easy to ensure.
137 */ 148 */
1382: 1492:
139 andcc %o1, (16 - 1), %o4 150 andcc %i1, (16 - 1), %i4
140 andn %o2, (64 - 1), %g1 ! block copy loop iterator 151 andn %i2, (64 - 1), %g1 ! block copy loop iterator
141 sub %o2, %g1, %o2 ! final sub-block copy bytes
142 be,pt %XCC, 50f 152 be,pt %XCC, 50f
143 cmp %o4, 8 153 sub %i2, %g1, %i2 ! final sub-block copy bytes
144 be,a,pt %XCC, 10f 154
145 sub %o1, 0x8, %o1 155 cmp %i4, 8
156 be,pt %XCC, 10f
157 sub %i1, %i4, %i1
146 158
147 /* Neither 8-byte nor 16-byte aligned, shift and mask. */ 159 /* Neither 8-byte nor 16-byte aligned, shift and mask. */
148 mov %g1, %o4 160 and %i4, 0x7, GLOBAL_SPARE
149 and %o1, 0x7, %g1 161 sll GLOBAL_SPARE, 3, GLOBAL_SPARE
150 sll %g1, 3, %g1 162 mov 64, %i5
151 mov 64, %o3 163 EX_LD(LOAD_TWIN(%i1, %g2, %g3))
152 andn %o1, 0x7, %o1 164 sub %i5, GLOBAL_SPARE, %i5
153 EX_LD(LOAD(ldx, %o1, %g2)) 165 mov 16, %o4
154 sub %o3, %g1, %o3 166 mov 32, %o5
155 sllx %g2, %g1, %g2 167 mov 48, %o7
168 mov 64, %i3
169
170 bg,pn %XCC, 9f
171 nop
156 172
157#define SWIVEL_ONE_DWORD(SRC, TMP1, TMP2, PRE_VAL, PRE_SHIFT, POST_SHIFT, DST)\ 173#define MIX_THREE_WORDS(WORD1, WORD2, WORD3, PRE_SHIFT, POST_SHIFT, TMP) \
158 EX_LD(LOAD(ldx, SRC, TMP1)); \ 174 sllx WORD1, POST_SHIFT, WORD1; \
159 srlx TMP1, PRE_SHIFT, TMP2; \ 175 srlx WORD2, PRE_SHIFT, TMP; \
160 or TMP2, PRE_VAL, TMP2; \ 176 sllx WORD2, POST_SHIFT, WORD2; \
161 EX_ST(STORE_INIT(TMP2, DST)); \ 177 or WORD1, TMP, WORD1; \
162 sllx TMP1, POST_SHIFT, PRE_VAL; 178 srlx WORD3, PRE_SHIFT, TMP; \
163 179 or WORD2, TMP, WORD2;
1641: add %o1, 0x8, %o1 180
165 SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x00) 1818: EX_LD(LOAD_TWIN(%i1 + %o4, %o2, %o3))
166 add %o1, 0x8, %o1 182 MIX_THREE_WORDS(%g2, %g3, %o2, %i5, GLOBAL_SPARE, %o1)
167 SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x08) 183 LOAD(prefetch, %i1 + %i3, #one_read)
168 add %o1, 0x8, %o1 184
169 SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x10) 185 EX_ST(STORE_INIT(%g2, %o0 + 0x00))
170 add %o1, 0x8, %o1 186 EX_ST(STORE_INIT(%g3, %o0 + 0x08))
171 SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x18) 187
172 add %o1, 32, %o1 188 EX_LD(LOAD_TWIN(%i1 + %o5, %g2, %g3))
173 LOAD(prefetch, %o1, #one_read) 189 MIX_THREE_WORDS(%o2, %o3, %g2, %i5, GLOBAL_SPARE, %o1)
174 sub %o1, 32 - 8, %o1 190
175 SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x20) 191 EX_ST(STORE_INIT(%o2, %o0 + 0x10))
176 add %o1, 8, %o1 192 EX_ST(STORE_INIT(%o3, %o0 + 0x18))
177 SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x28) 193
178 add %o1, 8, %o1 194 EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3))
179 SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x30) 195 MIX_THREE_WORDS(%g2, %g3, %o2, %i5, GLOBAL_SPARE, %o1)
180 add %o1, 8, %o1 196
181 SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x38) 197 EX_ST(STORE_INIT(%g2, %o0 + 0x20))
182 subcc %o4, 64, %o4 198 EX_ST(STORE_INIT(%g3, %o0 + 0x28))
183 bne,pt %XCC, 1b 199
200 EX_LD(LOAD_TWIN(%i1 + %i3, %g2, %g3))
201 add %i1, 64, %i1
202 MIX_THREE_WORDS(%o2, %o3, %g2, %i5, GLOBAL_SPARE, %o1)
203
204 EX_ST(STORE_INIT(%o2, %o0 + 0x30))
205 EX_ST(STORE_INIT(%o3, %o0 + 0x38))
206
207 subcc %g1, 64, %g1
208 bne,pt %XCC, 8b
184 add %o0, 64, %o0 209 add %o0, 64, %o0
185 210
186#undef SWIVEL_ONE_DWORD 211 ba,pt %XCC, 60f
212 add %i1, %i4, %i1
213
2149: EX_LD(LOAD_TWIN(%i1 + %o4, %o2, %o3))
215 MIX_THREE_WORDS(%g3, %o2, %o3, %i5, GLOBAL_SPARE, %o1)
216 LOAD(prefetch, %i1 + %i3, #one_read)
217
218 EX_ST(STORE_INIT(%g3, %o0 + 0x00))
219 EX_ST(STORE_INIT(%o2, %o0 + 0x08))
220
221 EX_LD(LOAD_TWIN(%i1 + %o5, %g2, %g3))
222 MIX_THREE_WORDS(%o3, %g2, %g3, %i5, GLOBAL_SPARE, %o1)
223
224 EX_ST(STORE_INIT(%o3, %o0 + 0x10))
225 EX_ST(STORE_INIT(%g2, %o0 + 0x18))
226
227 EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3))
228 MIX_THREE_WORDS(%g3, %o2, %o3, %i5, GLOBAL_SPARE, %o1)
229
230 EX_ST(STORE_INIT(%g3, %o0 + 0x20))
231 EX_ST(STORE_INIT(%o2, %o0 + 0x28))
232
233 EX_LD(LOAD_TWIN(%i1 + %i3, %g2, %g3))
234 add %i1, 64, %i1
235 MIX_THREE_WORDS(%o3, %g2, %g3, %i5, GLOBAL_SPARE, %o1)
236
237 EX_ST(STORE_INIT(%o3, %o0 + 0x30))
238 EX_ST(STORE_INIT(%g2, %o0 + 0x38))
239
240 subcc %g1, 64, %g1
241 bne,pt %XCC, 9b
242 add %o0, 64, %o0
187 243
188 srl %g1, 3, %g1
189 ba,pt %XCC, 60f 244 ba,pt %XCC, 60f
190 add %o1, %g1, %o1 245 add %i1, %i4, %i1
191 246
19210: /* Destination is 64-byte aligned, source was only 8-byte 24710: /* Destination is 64-byte aligned, source was only 8-byte
193 * aligned but it has been subtracted by 8 and we perform 248 * aligned but it has been subtracted by 8 and we perform
194 * one twin load ahead, then add 8 back into source when 249 * one twin load ahead, then add 8 back into source when
195 * we finish the loop. 250 * we finish the loop.
196 */ 251 */
197 EX_LD(LOAD_TWIN(%o1, %o4, %o5)) 252 EX_LD(LOAD_TWIN(%i1, %o4, %o5))
1981: add %o1, 16, %o1 253 mov 16, %o7
199 EX_LD(LOAD_TWIN(%o1, %g2, %g3)) 254 mov 32, %g2
200 add %o1, 16 + 32, %o1 255 mov 48, %g3
201 LOAD(prefetch, %o1, #one_read) 256 mov 64, %o1
202 sub %o1, 32, %o1 2571: EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3))
258 LOAD(prefetch, %i1 + %o1, #one_read)
203 EX_ST(STORE_INIT(%o5, %o0 + 0x00)) ! initializes cache line 259 EX_ST(STORE_INIT(%o5, %o0 + 0x00)) ! initializes cache line
204 EX_ST(STORE_INIT(%g2, %o0 + 0x08)) 260 EX_ST(STORE_INIT(%o2, %o0 + 0x08))
205 EX_LD(LOAD_TWIN(%o1, %o4, %o5)) 261 EX_LD(LOAD_TWIN(%i1 + %g2, %o4, %o5))
206 add %o1, 16, %o1 262 EX_ST(STORE_INIT(%o3, %o0 + 0x10))
207 EX_ST(STORE_INIT(%g3, %o0 + 0x10))
208 EX_ST(STORE_INIT(%o4, %o0 + 0x18)) 263 EX_ST(STORE_INIT(%o4, %o0 + 0x18))
209 EX_LD(LOAD_TWIN(%o1, %g2, %g3)) 264 EX_LD(LOAD_TWIN(%i1 + %g3, %o2, %o3))
210 add %o1, 16, %o1
211 EX_ST(STORE_INIT(%o5, %o0 + 0x20)) 265 EX_ST(STORE_INIT(%o5, %o0 + 0x20))
212 EX_ST(STORE_INIT(%g2, %o0 + 0x28)) 266 EX_ST(STORE_INIT(%o2, %o0 + 0x28))
213 EX_LD(LOAD_TWIN(%o1, %o4, %o5)) 267 EX_LD(LOAD_TWIN(%i1 + %o1, %o4, %o5))
214 EX_ST(STORE_INIT(%g3, %o0 + 0x30)) 268 add %i1, 64, %i1
269 EX_ST(STORE_INIT(%o3, %o0 + 0x30))
215 EX_ST(STORE_INIT(%o4, %o0 + 0x38)) 270 EX_ST(STORE_INIT(%o4, %o0 + 0x38))
216 subcc %g1, 64, %g1 271 subcc %g1, 64, %g1
217 bne,pt %XCC, 1b 272 bne,pt %XCC, 1b
218 add %o0, 64, %o0 273 add %o0, 64, %o0
219 274
220 ba,pt %XCC, 60f 275 ba,pt %XCC, 60f
221 add %o1, 0x8, %o1 276 add %i1, 0x8, %i1
222 277
22350: /* Destination is 64-byte aligned, and source is 16-byte 27850: /* Destination is 64-byte aligned, and source is 16-byte
224 * aligned. 279 * aligned.
225 */ 280 */
2261: EX_LD(LOAD_TWIN(%o1, %o4, %o5)) 281 mov 16, %o7
227 add %o1, 16, %o1 282 mov 32, %g2
228 EX_LD(LOAD_TWIN(%o1, %g2, %g3)) 283 mov 48, %g3
229 add %o1, 16 + 32, %o1 284 mov 64, %o1
230 LOAD(prefetch, %o1, #one_read) 2851: EX_LD(LOAD_TWIN(%i1 + %g0, %o4, %o5))
231 sub %o1, 32, %o1 286 EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3))
287 LOAD(prefetch, %i1 + %o1, #one_read)
232 EX_ST(STORE_INIT(%o4, %o0 + 0x00)) ! initializes cache line 288 EX_ST(STORE_INIT(%o4, %o0 + 0x00)) ! initializes cache line
233 EX_ST(STORE_INIT(%o5, %o0 + 0x08)) 289 EX_ST(STORE_INIT(%o5, %o0 + 0x08))
234 EX_LD(LOAD_TWIN(%o1, %o4, %o5)) 290 EX_LD(LOAD_TWIN(%i1 + %g2, %o4, %o5))
235 add %o1, 16, %o1 291 EX_ST(STORE_INIT(%o2, %o0 + 0x10))
236 EX_ST(STORE_INIT(%g2, %o0 + 0x10)) 292 EX_ST(STORE_INIT(%o3, %o0 + 0x18))
237 EX_ST(STORE_INIT(%g3, %o0 + 0x18)) 293 EX_LD(LOAD_TWIN(%i1 + %g3, %o2, %o3))
238 EX_LD(LOAD_TWIN(%o1, %g2, %g3)) 294 add %i1, 64, %i1
239 add %o1, 16, %o1
240 EX_ST(STORE_INIT(%o4, %o0 + 0x20)) 295 EX_ST(STORE_INIT(%o4, %o0 + 0x20))
241 EX_ST(STORE_INIT(%o5, %o0 + 0x28)) 296 EX_ST(STORE_INIT(%o5, %o0 + 0x28))
242 EX_ST(STORE_INIT(%g2, %o0 + 0x30)) 297 EX_ST(STORE_INIT(%o2, %o0 + 0x30))
243 EX_ST(STORE_INIT(%g3, %o0 + 0x38)) 298 EX_ST(STORE_INIT(%o3, %o0 + 0x38))
244 subcc %g1, 64, %g1 299 subcc %g1, 64, %g1
245 bne,pt %XCC, 1b 300 bne,pt %XCC, 1b
246 add %o0, 64, %o0 301 add %o0, 64, %o0
@@ -249,47 +304,47 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
24960: 30460:
250 membar #Sync 305 membar #Sync
251 306
252 /* %o2 contains any final bytes still needed to be copied 307 /* %i2 contains any final bytes still needed to be copied
253 * over. If anything is left, we copy it one byte at a time. 308 * over. If anything is left, we copy it one byte at a time.
254 */ 309 */
255 RESTORE_ASI(%o3) 310 RESTORE_ASI(%i3)
256 brz,pt %o2, 85f 311 brz,pt %i2, 85f
257 sub %o0, %o1, %o3 312 sub %o0, %i1, %i3
258 ba,a,pt %XCC, 90f 313 ba,a,pt %XCC, 90f
259 314
260 .align 64 315 .align 64
26170: /* 16 < len <= 64 */ 31670: /* 16 < len <= 64 */
262 bne,pn %XCC, 75f 317 bne,pn %XCC, 75f
263 sub %o0, %o1, %o3 318 sub %o0, %i1, %i3
264 319
26572: 32072:
266 andn %o2, 0xf, %o4 321 andn %i2, 0xf, %i4
267 and %o2, 0xf, %o2 322 and %i2, 0xf, %i2
2681: subcc %o4, 0x10, %o4 3231: subcc %i4, 0x10, %i4
269 EX_LD(LOAD(ldx, %o1, %o5)) 324 EX_LD(LOAD(ldx, %i1, %o4))
270 add %o1, 0x08, %o1 325 add %i1, 0x08, %i1
271 EX_LD(LOAD(ldx, %o1, %g1)) 326 EX_LD(LOAD(ldx, %i1, %g1))
272 sub %o1, 0x08, %o1 327 sub %i1, 0x08, %i1
273 EX_ST(STORE(stx, %o5, %o1 + %o3)) 328 EX_ST(STORE(stx, %o4, %i1 + %i3))
274 add %o1, 0x8, %o1 329 add %i1, 0x8, %i1
275 EX_ST(STORE(stx, %g1, %o1 + %o3)) 330 EX_ST(STORE(stx, %g1, %i1 + %i3))
276 bgu,pt %XCC, 1b 331 bgu,pt %XCC, 1b
277 add %o1, 0x8, %o1 332 add %i1, 0x8, %i1
27873: andcc %o2, 0x8, %g0 33373: andcc %i2, 0x8, %g0
279 be,pt %XCC, 1f 334 be,pt %XCC, 1f
280 nop 335 nop
281 sub %o2, 0x8, %o2 336 sub %i2, 0x8, %i2
282 EX_LD(LOAD(ldx, %o1, %o5)) 337 EX_LD(LOAD(ldx, %i1, %o4))
283 EX_ST(STORE(stx, %o5, %o1 + %o3)) 338 EX_ST(STORE(stx, %o4, %i1 + %i3))
284 add %o1, 0x8, %o1 339 add %i1, 0x8, %i1
2851: andcc %o2, 0x4, %g0 3401: andcc %i2, 0x4, %g0
286 be,pt %XCC, 1f 341 be,pt %XCC, 1f
287 nop 342 nop
288 sub %o2, 0x4, %o2 343 sub %i2, 0x4, %i2
289 EX_LD(LOAD(lduw, %o1, %o5)) 344 EX_LD(LOAD(lduw, %i1, %i5))
290 EX_ST(STORE(stw, %o5, %o1 + %o3)) 345 EX_ST(STORE(stw, %i5, %i1 + %i3))
291 add %o1, 0x4, %o1 346 add %i1, 0x4, %i1
2921: cmp %o2, 0 3471: cmp %i2, 0
293 be,pt %XCC, 85f 348 be,pt %XCC, 85f
294 nop 349 nop
295 ba,pt %xcc, 90f 350 ba,pt %xcc, 90f
@@ -300,71 +355,71 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
300 sub %g1, 0x8, %g1 355 sub %g1, 0x8, %g1
301 be,pn %icc, 2f 356 be,pn %icc, 2f
302 sub %g0, %g1, %g1 357 sub %g0, %g1, %g1
303 sub %o2, %g1, %o2 358 sub %i2, %g1, %i2
304 359
3051: subcc %g1, 1, %g1 3601: subcc %g1, 1, %g1
306 EX_LD(LOAD(ldub, %o1, %o5)) 361 EX_LD(LOAD(ldub, %i1, %i5))
307 EX_ST(STORE(stb, %o5, %o1 + %o3)) 362 EX_ST(STORE(stb, %i5, %i1 + %i3))
308 bgu,pt %icc, 1b 363 bgu,pt %icc, 1b
309 add %o1, 1, %o1 364 add %i1, 1, %i1
310 365
3112: add %o1, %o3, %o0 3662: add %i1, %i3, %o0
312 andcc %o1, 0x7, %g1 367 andcc %i1, 0x7, %g1
313 bne,pt %icc, 8f 368 bne,pt %icc, 8f
314 sll %g1, 3, %g1 369 sll %g1, 3, %g1
315 370
316 cmp %o2, 16 371 cmp %i2, 16
317 bgeu,pt %icc, 72b 372 bgeu,pt %icc, 72b
318 nop 373 nop
319 ba,a,pt %xcc, 73b 374 ba,a,pt %xcc, 73b
320 375
3218: mov 64, %o3 3768: mov 64, %i3
322 andn %o1, 0x7, %o1 377 andn %i1, 0x7, %i1
323 EX_LD(LOAD(ldx, %o1, %g2)) 378 EX_LD(LOAD(ldx, %i1, %g2))
324 sub %o3, %g1, %o3 379 sub %i3, %g1, %i3
325 andn %o2, 0x7, %o4 380 andn %i2, 0x7, %i4
326 sllx %g2, %g1, %g2 381 sllx %g2, %g1, %g2
3271: add %o1, 0x8, %o1 3821: add %i1, 0x8, %i1
328 EX_LD(LOAD(ldx, %o1, %g3)) 383 EX_LD(LOAD(ldx, %i1, %g3))
329 subcc %o4, 0x8, %o4 384 subcc %i4, 0x8, %i4
330 srlx %g3, %o3, %o5 385 srlx %g3, %i3, %i5
331 or %o5, %g2, %o5 386 or %i5, %g2, %i5
332 EX_ST(STORE(stx, %o5, %o0)) 387 EX_ST(STORE(stx, %i5, %o0))
333 add %o0, 0x8, %o0 388 add %o0, 0x8, %o0
334 bgu,pt %icc, 1b 389 bgu,pt %icc, 1b
335 sllx %g3, %g1, %g2 390 sllx %g3, %g1, %g2
336 391
337 srl %g1, 3, %g1 392 srl %g1, 3, %g1
338 andcc %o2, 0x7, %o2 393 andcc %i2, 0x7, %i2
339 be,pn %icc, 85f 394 be,pn %icc, 85f
340 add %o1, %g1, %o1 395 add %i1, %g1, %i1
341 ba,pt %xcc, 90f 396 ba,pt %xcc, 90f
342 sub %o0, %o1, %o3 397 sub %o0, %i1, %i3
343 398
344 .align 64 399 .align 64
34580: /* 0 < len <= 16 */ 40080: /* 0 < len <= 16 */
346 andcc %o3, 0x3, %g0 401 andcc %i3, 0x3, %g0
347 bne,pn %XCC, 90f 402 bne,pn %XCC, 90f
348 sub %o0, %o1, %o3 403 sub %o0, %i1, %i3
349 404
3501: 4051:
351 subcc %o2, 4, %o2 406 subcc %i2, 4, %i2
352 EX_LD(LOAD(lduw, %o1, %g1)) 407 EX_LD(LOAD(lduw, %i1, %g1))
353 EX_ST(STORE(stw, %g1, %o1 + %o3)) 408 EX_ST(STORE(stw, %g1, %i1 + %i3))
354 bgu,pt %XCC, 1b 409 bgu,pt %XCC, 1b
355 add %o1, 4, %o1 410 add %i1, 4, %i1
356 411
35785: retl 41285: ret
358 mov EX_RETVAL(GLOBAL_SPARE), %o0 413 restore EX_RETVAL(%i0), %g0, %o0
359 414
360 .align 32 415 .align 32
36190: 41690:
362 subcc %o2, 1, %o2 417 subcc %i2, 1, %i2
363 EX_LD(LOAD(ldub, %o1, %g1)) 418 EX_LD(LOAD(ldub, %i1, %g1))
364 EX_ST(STORE(stb, %g1, %o1 + %o3)) 419 EX_ST(STORE(stb, %g1, %i1 + %i3))
365 bgu,pt %XCC, 90b 420 bgu,pt %XCC, 90b
366 add %o1, 1, %o1 421 add %i1, 1, %i1
367 retl 422 ret
368 mov EX_RETVAL(GLOBAL_SPARE), %o0 423 restore EX_RETVAL(%i0), %g0, %o0
369 424
370 .size FUNC_NAME, .-FUNC_NAME 425 .size FUNC_NAME, .-FUNC_NAME
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c
index eaba9b70b1..6cfab2e4d3 100644
--- a/arch/sparc64/mm/hugetlbpage.c
+++ b/arch/sparc64/mm/hugetlbpage.c
@@ -175,7 +175,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
175 return -ENOMEM; 175 return -ENOMEM;
176 176
177 if (flags & MAP_FIXED) { 177 if (flags & MAP_FIXED) {
178 if (prepare_hugepage_range(addr, len, pgoff)) 178 if (prepare_hugepage_range(addr, len))
179 return -EINVAL; 179 return -EINVAL;
180 return addr; 180 return addr;
181 } 181 }
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c
index 68c83ad04a..bbec752282 100644
--- a/arch/sparc64/prom/misc.c
+++ b/arch/sparc64/prom/misc.c
@@ -143,22 +143,6 @@ unsigned char prom_get_idprom(char *idbuf, int num_bytes)
143 return 0xff; 143 return 0xff;
144} 144}
145 145
146/* Install Linux trap table so PROM uses that instead of its own. */
147void prom_set_trap_table(unsigned long tba)
148{
149 p1275_cmd("SUNW,set-trap-table",
150 (P1275_ARG(0, P1275_ARG_IN_64B) |
151 P1275_INOUT(1, 0)), tba);
152}
153
154void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa)
155{
156 p1275_cmd("SUNW,set-trap-table",
157 (P1275_ARG(0, P1275_ARG_IN_64B) |
158 P1275_ARG(1, P1275_ARG_IN_64B) |
159 P1275_INOUT(2, 0)), tba, mmfsa);
160}
161
162int prom_get_mmu_ihandle(void) 146int prom_get_mmu_ihandle(void)
163{ 147{
164 int node, ret; 148 int node, ret;
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h
index 8d7f7c1cb9..6c2be26f1d 100644
--- a/arch/um/include/kern_util.h
+++ b/arch/um/include/kern_util.h
@@ -117,7 +117,7 @@ extern void sigio_handler(int sig, union uml_pt_regs *regs);
117 117
118extern void copy_sc(union uml_pt_regs *regs, void *from); 118extern void copy_sc(union uml_pt_regs *regs, void *from);
119 119
120unsigned long to_irq_stack(int sig, unsigned long *mask_out); 120extern unsigned long to_irq_stack(unsigned long *mask_out);
121unsigned long from_irq_stack(int nested); 121unsigned long from_irq_stack(int nested);
122 122
123#endif 123#endif
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
index 24547741b2..4185090611 100644
--- a/arch/um/kernel/dyn.lds.S
+++ b/arch/um/kernel/dyn.lds.S
@@ -71,11 +71,13 @@ SECTIONS
71 *(.gnu.warning) 71 *(.gnu.warning)
72 72
73 . = ALIGN(4096); 73 . = ALIGN(4096);
74 __syscall_stub_start = .;
75 *(.__syscall_stub*)
76 __syscall_stub_end = .;
77 . = ALIGN(4096);
78 } =0x90909090 74 } =0x90909090
75 . = ALIGN(4096);
76 .syscall_stub : {
77 __syscall_stub_start = .;
78 *(.__syscall_stub*)
79 __syscall_stub_end = .;
80 }
79 .fini : { 81 .fini : {
80 KEEP (*(.fini)) 82 KEEP (*(.fini))
81 } =0x90909090 83 } =0x90909090
@@ -138,8 +140,8 @@ SECTIONS
138 .got : { *(.got.plt) *(.got) } 140 .got : { *(.got.plt) *(.got) }
139 _edata = .; 141 _edata = .;
140 PROVIDE (edata = .); 142 PROVIDE (edata = .);
141 __bss_start = .;
142 .bss : { 143 .bss : {
144 __bss_start = .;
143 *(.dynbss) 145 *(.dynbss)
144 *(.bss .bss.* .gnu.linkonce.b.*) 146 *(.bss .bss.* .gnu.linkonce.b.*)
145 *(COMMON) 147 *(COMMON)
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index 9870febdbe..cf0dd9cf8c 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -518,13 +518,13 @@ int init_aio_irq(int irq, char *name, irq_handler_t handler)
518 518
519static unsigned long pending_mask; 519static unsigned long pending_mask;
520 520
521unsigned long to_irq_stack(int sig, unsigned long *mask_out) 521unsigned long to_irq_stack(unsigned long *mask_out)
522{ 522{
523 struct thread_info *ti; 523 struct thread_info *ti;
524 unsigned long mask, old; 524 unsigned long mask, old;
525 int nested; 525 int nested;
526 526
527 mask = xchg(&pending_mask, 1 << sig); 527 mask = xchg(&pending_mask, *mask_out);
528 if(mask != 0){ 528 if(mask != 0){
529 /* If any interrupts come in at this point, we want to 529 /* If any interrupts come in at this point, we want to
530 * make sure that their bits aren't lost by our 530 * make sure that their bits aren't lost by our
@@ -534,7 +534,7 @@ unsigned long to_irq_stack(int sig, unsigned long *mask_out)
534 * and pending_mask contains a bit for each interrupt 534 * and pending_mask contains a bit for each interrupt
535 * that came in. 535 * that came in.
536 */ 536 */
537 old = 1 << sig; 537 old = *mask_out;
538 do { 538 do {
539 old |= mask; 539 old |= mask;
540 mask = xchg(&pending_mask, old); 540 mask = xchg(&pending_mask, old);
@@ -550,6 +550,7 @@ unsigned long to_irq_stack(int sig, unsigned long *mask_out)
550 550
551 task = cpu_tasks[ti->cpu].task; 551 task = cpu_tasks[ti->cpu].task;
552 tti = task_thread_info(task); 552 tti = task_thread_info(task);
553
553 *ti = *tti; 554 *ti = *tti;
554 ti->real_thread = tti; 555 ti->real_thread = tti;
555 task->stack = ti; 556 task->stack = ti;
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S
index 307b937367..81acdc2434 100644
--- a/arch/um/kernel/uml.lds.S
+++ b/arch/um/kernel/uml.lds.S
@@ -44,12 +44,13 @@ SECTIONS
44 /* .gnu.warning sections are handled specially by elf32.em. */ 44 /* .gnu.warning sections are handled specially by elf32.em. */
45 *(.gnu.warning) 45 *(.gnu.warning)
46 *(.gnu.linkonce.t*) 46 *(.gnu.linkonce.t*)
47 }
47 48
48 . = ALIGN(4096); 49 . = ALIGN(4096);
49 __syscall_stub_start = .; 50 .syscall_stub : {
50 *(.__syscall_stub*) 51 __syscall_stub_start = .;
51 __syscall_stub_end = .; 52 *(.__syscall_stub*)
52 . = ALIGN(4096); 53 __syscall_stub_end = .;
53 } 54 }
54 55
55 #include "asm/common.lds.S" 56 #include "asm/common.lds.S"
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c
index 6f92f732d2..c3ecc2a84e 100644
--- a/arch/um/os-Linux/file.c
+++ b/arch/um/os-Linux/file.c
@@ -320,7 +320,8 @@ int os_file_size(char *file, unsigned long long *size_out)
320 } 320 }
321 321
322 if(S_ISBLK(buf.ust_mode)){ 322 if(S_ISBLK(buf.ust_mode)){
323 int fd, blocks; 323 int fd;
324 long blocks;
324 325
325 fd = os_open_file(file, of_read(OPENFLAGS()), 0); 326 fd = os_open_file(file, of_read(OPENFLAGS()), 0);
326 if(fd < 0){ 327 if(fd < 0){
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c
index 18e5c8b67e..b98f7ea2d2 100644
--- a/arch/um/os-Linux/signal.c
+++ b/arch/um/os-Linux/signal.c
@@ -119,7 +119,7 @@ void (*handlers[_NSIG])(int sig, struct sigcontext *sc);
119 119
120void handle_signal(int sig, struct sigcontext *sc) 120void handle_signal(int sig, struct sigcontext *sc)
121{ 121{
122 unsigned long pending = 0; 122 unsigned long pending = 1UL << sig;
123 123
124 do { 124 do {
125 int nested, bail; 125 int nested, bail;
@@ -134,7 +134,7 @@ void handle_signal(int sig, struct sigcontext *sc)
134 * have to return, and the upper handler will deal 134 * have to return, and the upper handler will deal
135 * with this interrupt. 135 * with this interrupt.
136 */ 136 */
137 bail = to_irq_stack(sig, &pending); 137 bail = to_irq_stack(&pending);
138 if(bail) 138 if(bail)
139 return; 139 return;
140 140
diff --git a/arch/um/os-Linux/sys-x86_64/registers.c b/arch/um/os-Linux/sys-x86_64/registers.c
index e6fc2179d1..9467315b80 100644
--- a/arch/um/os-Linux/sys-x86_64/registers.c
+++ b/arch/um/os-Linux/sys-x86_64/registers.c
@@ -4,6 +4,7 @@
4 */ 4 */
5 5
6#include <errno.h> 6#include <errno.h>
7#include <sys/ptrace.h>
7#include <string.h> 8#include <string.h>
8#include "ptrace_user.h" 9#include "ptrace_user.h"
9#include "uml-config.h" 10#include "uml-config.h"
@@ -17,6 +18,20 @@
17static unsigned long exec_regs[MAX_REG_NR]; 18static unsigned long exec_regs[MAX_REG_NR];
18static unsigned long exec_fp_regs[HOST_FP_SIZE]; 19static unsigned long exec_fp_regs[HOST_FP_SIZE];
19 20
21int save_fp_registers(int pid, unsigned long *fp_regs)
22{
23 if(ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0)
24 return -errno;
25 return 0;
26}
27
28int restore_fp_registers(int pid, unsigned long *fp_regs)
29{
30 if(ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0)
31 return -errno;
32 return 0;
33}
34
20void init_thread_registers(union uml_pt_regs *to) 35void init_thread_registers(union uml_pt_regs *to)
21{ 36{
22 memcpy(to->skas.regs, exec_regs, sizeof(to->skas.regs)); 37 memcpy(to->skas.regs, exec_regs, sizeof(to->skas.regs));
diff --git a/arch/um/sys-x86_64/ptrace.c b/arch/um/sys-x86_64/ptrace.c
index 55b66e09a9..1970d78aa5 100644
--- a/arch/um/sys-x86_64/ptrace.c
+++ b/arch/um/sys-x86_64/ptrace.c
@@ -156,12 +156,6 @@ int is_syscall(unsigned long addr)
156 return(instr == 0x050f); 156 return(instr == 0x050f);
157} 157}
158 158
159int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu )
160{
161 panic("dump_fpu");
162 return(1);
163}
164
165int get_fpregs(unsigned long buf, struct task_struct *child) 159int get_fpregs(unsigned long buf, struct task_struct *child)
166{ 160{
167 panic("get_fpregs"); 161 panic("get_fpregs");
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index ffa0364062..b4d9089a6a 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -60,14 +60,6 @@ config ZONE_DMA
60 bool 60 bool
61 default y 61 default y
62 62
63config QUICKLIST
64 bool
65 default y
66
67config NR_QUICK
68 int
69 default 2
70
71config ISA 63config ISA
72 bool 64 bool
73 65
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig
index e64f65c9d9..b091c5e355 100644
--- a/arch/x86_64/defconfig
+++ b/arch/x86_64/defconfig
@@ -201,7 +201,6 @@ CONFIG_PM=y
201# CONFIG_PM_DEBUG is not set 201# CONFIG_PM_DEBUG is not set
202CONFIG_HIBERNATION=y 202CONFIG_HIBERNATION=y
203CONFIG_PM_STD_PARTITION="" 203CONFIG_PM_STD_PARTITION=""
204CONFIG_SUSPEND_SMP=y
205 204
206# 205#
207# ACPI (Advanced Configuration and Power Interface) Support 206# ACPI (Advanced Configuration and Power Interface) Support
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
index 938278697e..18b2318109 100644
--- a/arch/x86_64/ia32/ia32entry.S
+++ b/arch/x86_64/ia32/ia32entry.S
@@ -38,6 +38,18 @@
38 movq %rax,R8(%rsp) 38 movq %rax,R8(%rsp)
39 .endm 39 .endm
40 40
41 .macro LOAD_ARGS32 offset
42 movl \offset(%rsp),%r11d
43 movl \offset+8(%rsp),%r10d
44 movl \offset+16(%rsp),%r9d
45 movl \offset+24(%rsp),%r8d
46 movl \offset+40(%rsp),%ecx
47 movl \offset+48(%rsp),%edx
48 movl \offset+56(%rsp),%esi
49 movl \offset+64(%rsp),%edi
50 movl \offset+72(%rsp),%eax
51 .endm
52
41 .macro CFI_STARTPROC32 simple 53 .macro CFI_STARTPROC32 simple
42 CFI_STARTPROC \simple 54 CFI_STARTPROC \simple
43 CFI_UNDEFINED r8 55 CFI_UNDEFINED r8
@@ -152,7 +164,7 @@ sysenter_tracesys:
152 movq $-ENOSYS,RAX(%rsp) /* really needed? */ 164 movq $-ENOSYS,RAX(%rsp) /* really needed? */
153 movq %rsp,%rdi /* &pt_regs -> arg1 */ 165 movq %rsp,%rdi /* &pt_regs -> arg1 */
154 call syscall_trace_enter 166 call syscall_trace_enter
155 LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ 167 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
156 RESTORE_REST 168 RESTORE_REST
157 movl %ebp, %ebp 169 movl %ebp, %ebp
158 /* no need to do an access_ok check here because rbp has been 170 /* no need to do an access_ok check here because rbp has been
@@ -255,7 +267,7 @@ cstar_tracesys:
255 movq $-ENOSYS,RAX(%rsp) /* really needed? */ 267 movq $-ENOSYS,RAX(%rsp) /* really needed? */
256 movq %rsp,%rdi /* &pt_regs -> arg1 */ 268 movq %rsp,%rdi /* &pt_regs -> arg1 */
257 call syscall_trace_enter 269 call syscall_trace_enter
258 LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ 270 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
259 RESTORE_REST 271 RESTORE_REST
260 movl RSP-ARGOFFSET(%rsp), %r8d 272 movl RSP-ARGOFFSET(%rsp), %r8d
261 /* no need to do an access_ok check here because r8 has been 273 /* no need to do an access_ok check here because r8 has been
@@ -334,7 +346,7 @@ ia32_tracesys:
334 movq $-ENOSYS,RAX(%rsp) /* really needed? */ 346 movq $-ENOSYS,RAX(%rsp) /* really needed? */
335 movq %rsp,%rdi /* &pt_regs -> arg1 */ 347 movq %rsp,%rdi /* &pt_regs -> arg1 */
336 call syscall_trace_enter 348 call syscall_trace_enter
337 LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ 349 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
338 RESTORE_REST 350 RESTORE_REST
339 jmp ia32_do_syscall 351 jmp ia32_do_syscall
340END(ia32_syscall) 352END(ia32_syscall)
diff --git a/arch/x86_64/kernel/acpi/wakeup.S b/arch/x86_64/kernel/acpi/wakeup.S
index 13f1480cbe..a06f2bcabe 100644
--- a/arch/x86_64/kernel/acpi/wakeup.S
+++ b/arch/x86_64/kernel/acpi/wakeup.S
@@ -81,7 +81,7 @@ wakeup_code:
81 testl $2, realmode_flags - wakeup_code 81 testl $2, realmode_flags - wakeup_code
82 jz 1f 82 jz 1f
83 mov video_mode - wakeup_code, %ax 83 mov video_mode - wakeup_code, %ax
84 call mode_seta 84 call mode_set
851: 851:
86 86
87 movw $0xb800, %ax 87 movw $0xb800, %ax
@@ -291,52 +291,31 @@ no_longmode:
291#define VIDEO_FIRST_V7 0x0900 291#define VIDEO_FIRST_V7 0x0900
292 292
293# Setting of user mode (AX=mode ID) => CF=success 293# Setting of user mode (AX=mode ID) => CF=success
294
295# For now, we only handle VESA modes (0x0200..0x03ff). To handle other
296# modes, we should probably compile in the video code from the boot
297# directory.
294.code16 298.code16
295mode_seta: 299mode_set:
296 movw %ax, %bx 300 movw %ax, %bx
297#if 0 301 subb $VIDEO_FIRST_VESA>>8, %bh
298 cmpb $0xff, %ah 302 cmpb $2, %bh
299 jz setalias 303 jb check_vesa
300
301 testb $VIDEO_RECALC>>8, %ah
302 jnz _setrec
303
304 cmpb $VIDEO_FIRST_RESOLUTION>>8, %ah
305 jnc setres
306
307 cmpb $VIDEO_FIRST_SPECIAL>>8, %ah
308 jz setspc
309
310 cmpb $VIDEO_FIRST_V7>>8, %ah
311 jz setv7
312#endif
313
314 cmpb $VIDEO_FIRST_VESA>>8, %ah
315 jnc check_vesaa
316#if 0
317 orb %ah, %ah
318 jz setmenu
319#endif
320
321 decb %ah
322# jz setbios Add bios modes later
323 304
324setbada: clc 305setbad:
306 clc
325 ret 307 ret
326 308
327check_vesaa: 309check_vesa:
328 subb $VIDEO_FIRST_VESA>>8, %bh
329 orw $0x4000, %bx # Use linear frame buffer 310 orw $0x4000, %bx # Use linear frame buffer
330 movw $0x4f02, %ax # VESA BIOS mode set call 311 movw $0x4f02, %ax # VESA BIOS mode set call
331 int $0x10 312 int $0x10
332 cmpw $0x004f, %ax # AL=4f if implemented 313 cmpw $0x004f, %ax # AL=4f if implemented
333 jnz _setbada # AH=0 if OK 314 jnz setbad # AH=0 if OK
334 315
335 stc 316 stc
336 ret 317 ret
337 318
338_setbada: jmp setbada
339
340wakeup_stack_begin: # Stack grows down 319wakeup_stack_begin: # Stack grows down
341 320
342.org 0xff0 321.org 0xff0
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index f57f8b9019..966fa10624 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -397,14 +397,12 @@ static void clear_IO_APIC (void)
397int skip_ioapic_setup; 397int skip_ioapic_setup;
398int ioapic_force; 398int ioapic_force;
399 399
400/* dummy parsing: see setup.c */ 400static int __init parse_noapic(char *str)
401
402static int __init disable_ioapic_setup(char *str)
403{ 401{
404 skip_ioapic_setup = 1; 402 disable_ioapic_setup();
405 return 0; 403 return 0;
406} 404}
407early_param("noapic", disable_ioapic_setup); 405early_param("noapic", parse_noapic);
408 406
409/* Actually the next is obsolete, but keep it for paranoid reasons -AK */ 407/* Actually the next is obsolete, but keep it for paranoid reasons -AK */
410static int __init disable_timer_pin_setup(char *arg) 408static int __init disable_timer_pin_setup(char *arg)
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
index 2842f50cbe..9895655545 100644
--- a/arch/x86_64/kernel/process.c
+++ b/arch/x86_64/kernel/process.c
@@ -208,7 +208,6 @@ void cpu_idle (void)
208 if (__get_cpu_var(cpu_idle_state)) 208 if (__get_cpu_var(cpu_idle_state))
209 __get_cpu_var(cpu_idle_state) = 0; 209 __get_cpu_var(cpu_idle_state) = 0;
210 210
211 check_pgt_cache();
212 rmb(); 211 rmb();
213 idle = pm_idle; 212 idle = pm_idle;
214 if (!idle) 213 if (!idle)
diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c
index e83cc67155..eea3702427 100644
--- a/arch/x86_64/kernel/ptrace.c
+++ b/arch/x86_64/kernel/ptrace.c
@@ -232,10 +232,6 @@ static int putreg(struct task_struct *child,
232{ 232{
233 unsigned long tmp; 233 unsigned long tmp;
234 234
235 /* Some code in the 64bit emulation may not be 64bit clean.
236 Don't take any chances. */
237 if (test_tsk_thread_flag(child, TIF_IA32))
238 value &= 0xffffffff;
239 switch (regno) { 235 switch (regno) {
240 case offsetof(struct user_regs_struct,fs): 236 case offsetof(struct user_regs_struct,fs):
241 if (value && (value & 3) != 3) 237 if (value && (value & 3) != 3)
diff --git a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c
index 673a300b59..df4a82812a 100644
--- a/arch/x86_64/kernel/smp.c
+++ b/arch/x86_64/kernel/smp.c
@@ -241,7 +241,7 @@ void flush_tlb_mm (struct mm_struct * mm)
241 } 241 }
242 if (!cpus_empty(cpu_mask)) 242 if (!cpus_empty(cpu_mask))
243 flush_tlb_others(cpu_mask, mm, FLUSH_ALL); 243 flush_tlb_others(cpu_mask, mm, FLUSH_ALL);
244 check_pgt_cache(); 244
245 preempt_enable(); 245 preempt_enable();
246} 246}
247EXPORT_SYMBOL(flush_tlb_mm); 247EXPORT_SYMBOL(flush_tlb_mm);
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
index 327c9f2fa6..54816adb8e 100644
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -374,6 +374,13 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
374 if (unlikely(in_atomic() || !mm)) 374 if (unlikely(in_atomic() || !mm))
375 goto bad_area_nosemaphore; 375 goto bad_area_nosemaphore;
376 376
377 /*
378 * User-mode registers count as a user access even for any
379 * potential system fault or CPU buglet.
380 */
381 if (user_mode_vm(regs))
382 error_code |= PF_USER;
383
377 again: 384 again:
378 /* When running in the kernel we expect faults to occur only to 385 /* When running in the kernel we expect faults to occur only to
379 * addresses in user space. All other faults represent errors in the 386 * addresses in user space. All other faults represent errors in the
diff --git a/arch/x86_64/vdso/vclock_gettime.c b/arch/x86_64/vdso/vclock_gettime.c
index 17f6a00de7..5b54cdfb2b 100644
--- a/arch/x86_64/vdso/vclock_gettime.c
+++ b/arch/x86_64/vdso/vclock_gettime.c
@@ -34,10 +34,11 @@ static long vdso_fallback_gettime(long clock, struct timespec *ts)
34 34
35static inline long vgetns(void) 35static inline long vgetns(void)
36{ 36{
37 long v;
37 cycles_t (*vread)(void); 38 cycles_t (*vread)(void);
38 vread = gtod->clock.vread; 39 vread = gtod->clock.vread;
39 return ((vread() - gtod->clock.cycle_last) * gtod->clock.mult) >> 40 v = (vread() - gtod->clock.cycle_last) & gtod->clock.mask;
40 gtod->clock.shift; 41 return (v * gtod->clock.mult) >> gtod->clock.shift;
41} 42}
42 43
43static noinline int do_realtime(struct timespec *ts) 44static noinline int do_realtime(struct timespec *ts)
diff --git a/arch/x86_64/vdso/voffset.h b/arch/x86_64/vdso/voffset.h
index 5304204911..4af67c7908 100644
--- a/arch/x86_64/vdso/voffset.h
+++ b/arch/x86_64/vdso/voffset.h
@@ -1 +1 @@
#define VDSO_TEXT_OFFSET 0x500 #define VDSO_TEXT_OFFSET 0x600
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index 95f836db38..acf05be249 100644
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -27,7 +27,12 @@ platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss
27PLATFORM = $(platform-y) 27PLATFORM = $(platform-y)
28export PLATFORM 28export PLATFORM
29 29
30CFLAGS += -pipe -mlongcalls 30# temporarily until string.h is fixed
31cflags-y += -ffreestanding
32
33cflags-y += -pipe -mlongcalls
34
35CFLAGS += $(cflags-y)
31 36
32KBUILD_DEFCONFIG := iss_defconfig 37KBUILD_DEFCONFIG := iss_defconfig
33 38
diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile
index 71f733c4f6..f582d6a24e 100644
--- a/arch/xtensa/kernel/Makefile
+++ b/arch/xtensa/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y := head.o vmlinux.lds
7 7
8obj-y := align.o entry.o irq.o coprocessor.o process.o ptrace.o semaphore.o \ 8obj-y := align.o entry.o irq.o coprocessor.o process.o ptrace.o semaphore.o \
9 setup.o signal.o syscall.o time.o traps.o vectors.o platform.o \ 9 setup.o signal.o syscall.o time.o traps.o vectors.o platform.o \
10 pci-dma.o 10 pci-dma.o init_task.o io.o
11 11
12## windowspill.o 12## windowspill.o
13 13
diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c
index d0323cd6a2..d5ffe7b644 100644
--- a/arch/xtensa/kernel/asm-offsets.c
+++ b/arch/xtensa/kernel/asm-offsets.c
@@ -18,12 +18,13 @@
18#include <linux/stddef.h> 18#include <linux/stddef.h>
19#include <linux/thread_info.h> 19#include <linux/thread_info.h>
20#include <linux/ptrace.h> 20#include <linux/ptrace.h>
21#include <linux/mm.h>
22
21#include <asm/ptrace.h> 23#include <asm/ptrace.h>
22#include <asm/processor.h> 24#include <asm/processor.h>
23#include <asm/uaccess.h> 25#include <asm/uaccess.h>
24 26
25#define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 27#define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val))
26#define BLANK() asm volatile("\n->" : : )
27 28
28int main(void) 29int main(void)
29{ 30{
@@ -63,7 +64,6 @@ int main(void)
63 DEFINE(PT_SIZE, sizeof(struct pt_regs)); 64 DEFINE(PT_SIZE, sizeof(struct pt_regs));
64 DEFINE(PT_AREG_END, offsetof (struct pt_regs, areg[XCHAL_NUM_AREGS])); 65 DEFINE(PT_AREG_END, offsetof (struct pt_regs, areg[XCHAL_NUM_AREGS]));
65 DEFINE(PT_USER_SIZE, offsetof(struct pt_regs, areg[XCHAL_NUM_AREGS])); 66 DEFINE(PT_USER_SIZE, offsetof(struct pt_regs, areg[XCHAL_NUM_AREGS]));
66 BLANK();
67 67
68 /* struct task_struct */ 68 /* struct task_struct */
69 DEFINE(TASK_PTRACE, offsetof (struct task_struct, ptrace)); 69 DEFINE(TASK_PTRACE, offsetof (struct task_struct, ptrace));
@@ -73,27 +73,26 @@ int main(void)
73 DEFINE(TASK_THREAD, offsetof (struct task_struct, thread)); 73 DEFINE(TASK_THREAD, offsetof (struct task_struct, thread));
74 DEFINE(TASK_THREAD_INFO, offsetof (struct task_struct, stack)); 74 DEFINE(TASK_THREAD_INFO, offsetof (struct task_struct, stack));
75 DEFINE(TASK_STRUCT_SIZE, sizeof (struct task_struct)); 75 DEFINE(TASK_STRUCT_SIZE, sizeof (struct task_struct));
76 BLANK();
77 76
78 /* struct thread_info (offset from start_struct) */ 77 /* struct thread_info (offset from start_struct) */
79 DEFINE(THREAD_RA, offsetof (struct task_struct, thread.ra)); 78 DEFINE(THREAD_RA, offsetof (struct task_struct, thread.ra));
80 DEFINE(THREAD_SP, offsetof (struct task_struct, thread.sp)); 79 DEFINE(THREAD_SP, offsetof (struct task_struct, thread.sp));
81 DEFINE(THREAD_CP_SAVE, offsetof (struct task_struct, thread.cp_save)); 80 DEFINE(THREAD_CP_SAVE, offsetof (struct task_struct, thread.cp_save));
82 DEFINE(THREAD_CURRENT_DS, offsetof (struct task_struct, thread.current_ds)); 81 DEFINE(THREAD_CURRENT_DS, offsetof (struct task_struct, thread.current_ds));
83 BLANK();
84 82
85 /* struct mm_struct */ 83 /* struct mm_struct */
86 DEFINE(MM_USERS, offsetof(struct mm_struct, mm_users)); 84 DEFINE(MM_USERS, offsetof(struct mm_struct, mm_users));
87 DEFINE(MM_PGD, offsetof (struct mm_struct, pgd)); 85 DEFINE(MM_PGD, offsetof (struct mm_struct, pgd));
88 DEFINE(MM_CONTEXT, offsetof (struct mm_struct, context)); 86 DEFINE(MM_CONTEXT, offsetof (struct mm_struct, context));
89 BLANK(); 87
90 DEFINE(PT_SINGLESTEP_BIT, PT_SINGLESTEP_BIT); 88 /* struct page */
89 DEFINE(PAGE_FLAGS, offsetof(struct page, flags));
91 90
92 /* constants */ 91 /* constants */
93 DEFINE(_CLONE_VM, CLONE_VM); 92 DEFINE(_CLONE_VM, CLONE_VM);
94 DEFINE(_CLONE_UNTRACED, CLONE_UNTRACED); 93 DEFINE(_CLONE_UNTRACED, CLONE_UNTRACED);
94 DEFINE(PG_ARCH_1, PG_arch_1);
95 95
96 return 0; 96 return 0;
97} 97}
98 98
99
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S
index 8dc7a2c26f..91a689eca4 100644
--- a/arch/xtensa/kernel/entry.S
+++ b/arch/xtensa/kernel/entry.S
@@ -7,7 +7,7 @@
7 * License. See the file "COPYING" in the main directory of this archive 7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details. 8 * for more details.
9 * 9 *
10 * Copyright (C) 2004-2005 by Tensilica Inc. 10 * Copyright (C) 2004-2007 by Tensilica Inc.
11 * 11 *
12 * Chris Zankel <chris@zankel.net> 12 * Chris Zankel <chris@zankel.net>
13 * 13 *
@@ -169,7 +169,7 @@ _user_exception:
169 * We have to save all registers up to the first '1' from 169 * We have to save all registers up to the first '1' from
170 * the right, except the current frame (bit 0). 170 * the right, except the current frame (bit 0).
171 * Assume a2 is: 001001000110001 171 * Assume a2 is: 001001000110001
172 * All regiser frames starting from the top fiel to the marked '1' 172 * All register frames starting from the top field to the marked '1'
173 * must be saved. 173 * must be saved.
174 */ 174 */
175 175
@@ -1572,10 +1572,12 @@ ENTRY(fast_second_level_miss)
1572 l32i a0, a1, TASK_MM # tsk->mm 1572 l32i a0, a1, TASK_MM # tsk->mm
1573 beqz a0, 9f 1573 beqz a0, 9f
1574 1574
15758: rsr a1, EXCVADDR # fault address 1575
1576 _PGD_OFFSET(a0, a1, a1) 1576 /* We deliberately destroy a3 that holds the exception table. */
1577
15788: rsr a3, EXCVADDR # fault address
1579 _PGD_OFFSET(a0, a3, a1)
1577 l32i a0, a0, 0 # read pmdval 1580 l32i a0, a0, 0 # read pmdval
1578 //beqi a0, _PAGE_USER, 2f
1579 beqz a0, 2f 1581 beqz a0, 2f
1580 1582
1581 /* Read ptevaddr and convert to top of page-table page. 1583 /* Read ptevaddr and convert to top of page-table page.
@@ -1588,7 +1590,7 @@ ENTRY(fast_second_level_miss)
1588 * The messy computation for 'pteval' above really simplifies 1590 * The messy computation for 'pteval' above really simplifies
1589 * into the following: 1591 * into the following:
1590 * 1592 *
1591 * pteval = ((pmdval - PAGE_OFFSET) & PAGE_MASK) | PAGE_KERNEL 1593 * pteval = ((pmdval - PAGE_OFFSET) & PAGE_MASK) | PAGE_DIRECTORY
1592 */ 1594 */
1593 1595
1594 movi a1, -PAGE_OFFSET 1596 movi a1, -PAGE_OFFSET
@@ -1596,20 +1598,34 @@ ENTRY(fast_second_level_miss)
1596 extui a1, a0, 0, PAGE_SHIFT # ... & PAGE_MASK 1598 extui a1, a0, 0, PAGE_SHIFT # ... & PAGE_MASK
1597 xor a0, a0, a1 1599 xor a0, a0, a1
1598 1600
1599 1601 movi a1, _PAGE_DIRECTORY
1600 movi a1, PAGE_DIRECTORY
1601 or a0, a0, a1 # ... | PAGE_DIRECTORY 1602 or a0, a0, a1 # ... | PAGE_DIRECTORY
1602 1603
1604 /*
1605 * We utilize all three wired-ways (7-9) to hold pmd translations.
1606 * Memory regions are mapped to the DTLBs according to bits 28 and 29.
1607 * This allows to map the three most common regions to three different
1608 * DTLBs:
1609 * 0,1 -> way 7 program (0040.0000) and virtual (c000.0000)
1610 * 2 -> way 8 shared libaries (2000.0000)
1611 * 3 -> way 0 stack (3000.0000)
1612 */
1613
1614 extui a3, a3, 28, 2 # addr. bit 28 and 29 0,1,2,3
1603 rsr a1, PTEVADDR 1615 rsr a1, PTEVADDR
1616 addx2 a3, a3, a3 # -> 0,3,6,9
1604 srli a1, a1, PAGE_SHIFT 1617 srli a1, a1, PAGE_SHIFT
1618 extui a3, a3, 2, 2 # -> 0,0,1,2
1605 slli a1, a1, PAGE_SHIFT # ptevaddr & PAGE_MASK 1619 slli a1, a1, PAGE_SHIFT # ptevaddr & PAGE_MASK
1606 addi a1, a1, DTLB_WAY_PGD # ... + way_number 1620 addi a3, a3, DTLB_WAY_PGD
1621 add a1, a1, a3 # ... + way_number
1607 1622
1608 wdtlb a0, a1 16233: wdtlb a0, a1
1609 dsync 1624 dsync
1610 1625
1611 /* Exit critical section. */ 1626 /* Exit critical section. */
1612 1627
16284: movi a3, exc_table # restore a3
1613 movi a0, 0 1629 movi a0, 0
1614 s32i a0, a3, EXC_TABLE_FIXUP 1630 s32i a0, a3, EXC_TABLE_FIXUP
1615 1631
@@ -1636,8 +1652,76 @@ ENTRY(fast_second_level_miss)
16369: l32i a0, a1, TASK_ACTIVE_MM # unlikely case mm == 0 16529: l32i a0, a1, TASK_ACTIVE_MM # unlikely case mm == 0
1637 j 8b 1653 j 8b
1638 1654
1655#if (DCACHE_WAY_SIZE > PAGE_SIZE)
1656
16572: /* Special case for cache aliasing.
1658 * We (should) only get here if a clear_user_page, copy_user_page
1659 * or the aliased cache flush functions got preemptively interrupted
1660 * by another task. Re-establish temporary mapping to the
1661 * TLBTEMP_BASE areas.
1662 */
1663
1664 /* We shouldn't be in a double exception */
1665
1666 l32i a0, a2, PT_DEPC
1667 bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, 2f
1668
1669 /* Make sure the exception originated in the special functions */
1670
1671 movi a0, __tlbtemp_mapping_start
1672 rsr a3, EPC_1
1673 bltu a3, a0, 2f
1674 movi a0, __tlbtemp_mapping_end
1675 bgeu a3, a0, 2f
1676
1677 /* Check if excvaddr was in one of the TLBTEMP_BASE areas. */
1678
1679 movi a3, TLBTEMP_BASE_1
1680 rsr a0, EXCVADDR
1681 bltu a0, a3, 2f
1682
1683 addi a1, a0, -(2 << (DCACHE_ALIAS_ORDER + PAGE_SHIFT))
1684 bgeu a1, a3, 2f
1685
1686 /* Check if we have to restore an ITLB mapping. */
1687
1688 movi a1, __tlbtemp_mapping_itlb
1689 rsr a3, EPC_1
1690 sub a3, a3, a1
1691
1692 /* Calculate VPN */
1693
1694 movi a1, PAGE_MASK
1695 and a1, a1, a0
1696
1697 /* Jump for ITLB entry */
1698
1699 bgez a3, 1f
1700
1701 /* We can use up to two TLBTEMP areas, one for src and one for dst. */
1702
1703 extui a3, a0, PAGE_SHIFT + DCACHE_ALIAS_ORDER, 1
1704 add a1, a3, a1
1705
1706 /* PPN is in a6 for the first TLBTEMP area and in a7 for the second. */
1707
1708 mov a0, a6
1709 movnez a0, a7, a3
1710 j 3b
1711
1712 /* ITLB entry. We only use dst in a6. */
1713
17141: witlb a6, a1
1715 isync
1716 j 4b
1717
1718
1719#endif // DCACHE_WAY_SIZE > PAGE_SIZE
1720
1721
16392: /* Invalid PGD, default exception handling */ 17222: /* Invalid PGD, default exception handling */
1640 1723
1724 movi a3, exc_table
1641 rsr a1, DEPC 1725 rsr a1, DEPC
1642 xsr a3, EXCSAVE_1 1726 xsr a3, EXCSAVE_1
1643 s32i a1, a2, PT_AREG2 1727 s32i a1, a2, PT_AREG2
@@ -1682,15 +1766,15 @@ ENTRY(fast_store_prohibited)
16828: rsr a1, EXCVADDR # fault address 17668: rsr a1, EXCVADDR # fault address
1683 _PGD_OFFSET(a0, a1, a4) 1767 _PGD_OFFSET(a0, a1, a4)
1684 l32i a0, a0, 0 1768 l32i a0, a0, 0
1685 //beqi a0, _PAGE_USER, 2f # FIXME use _PAGE_INVALID
1686 beqz a0, 2f 1769 beqz a0, 2f
1687 1770
1771 /* Note that we assume _PAGE_WRITABLE_BIT is only set if pte is valid.*/
1772
1688 _PTE_OFFSET(a0, a1, a4) 1773 _PTE_OFFSET(a0, a1, a4)
1689 l32i a4, a0, 0 # read pteval 1774 l32i a4, a0, 0 # read pteval
1690 movi a1, _PAGE_VALID | _PAGE_RW 1775 bbci.l a4, _PAGE_WRITABLE_BIT, 2f
1691 bnall a4, a1, 2f
1692 1776
1693 movi a1, _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_WRENABLE 1777 movi a1, _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_HW_WRITE
1694 or a4, a4, a1 1778 or a4, a4, a1
1695 rsr a1, EXCVADDR 1779 rsr a1, EXCVADDR
1696 s32i a4, a0, 0 1780 s32i a4, a0, 0
@@ -1700,10 +1784,7 @@ ENTRY(fast_store_prohibited)
1700 dhwb a0, 0 1784 dhwb a0, 0
1701#endif 1785#endif
1702 pdtlb a0, a1 1786 pdtlb a0, a1
1703 beqz a0, 1f
1704 idtlb a0 // FIXME do we need this?
1705 wdtlb a4, a0 1787 wdtlb a4, a0
17061:
1707 1788
1708 /* Exit critical section. */ 1789 /* Exit critical section. */
1709 1790
diff --git a/arch/xtensa/kernel/init_task.c b/arch/xtensa/kernel/init_task.c
new file mode 100644
index 0000000000..021b4f46ff
--- /dev/null
+++ b/arch/xtensa/kernel/init_task.c
@@ -0,0 +1,38 @@
1/*
2 * arch/xtensa/kernel/init_task.c
3 *
4 * Xtensa Processor version.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 2007 Tensilica Inc.
11 *
12 * Chris Zankel <chris@zankel.net>
13 */
14
15#include <linux/mm.h>
16#include <linux/fs.h>
17#include <linux/init.h>
18#include <linux/init_task.h>
19#include <linux/module.h>
20#include <linux/mqueue.h>
21
22#include <asm/uaccess.h>
23
24static struct fs_struct init_fs = INIT_FS;
25static struct files_struct init_files = INIT_FILES;
26static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
27static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
28struct mm_struct init_mm = INIT_MM(init_mm);
29
30EXPORT_SYMBOL(init_mm);
31
32union thread_union init_thread_union
33 __attribute__((__section__(".data.init_task"))) =
34{ INIT_THREAD_INFO(init_task) };
35
36struct task_struct init_task = INIT_TASK(init_task);
37
38EXPORT_SYMBOL(init_task);
diff --git a/arch/xtensa/kernel/io.c b/arch/xtensa/kernel/io.c
new file mode 100644
index 0000000000..5b65269b1d
--- /dev/null
+++ b/arch/xtensa/kernel/io.c
@@ -0,0 +1,75 @@
1/*
2 * arch/xtensa/io.c
3 *
4 * IO primitives
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * Copied from sparc.
12 *
13 * Chris Zankel <chris@zankel.net>
14 *
15 */
16
17#include <asm/io.h>
18#include <asm/byteorder.h>
19
20void outsb(unsigned long addr, const void *src, unsigned long count) {
21 while (count) {
22 count -= 1;
23 writeb(*(const char *)src, addr);
24 src += 1;
25 addr += 1;
26 }
27}
28
29void outsw(unsigned long addr, const void *src, unsigned long count) {
30 while (count) {
31 count -= 2;
32 writew(*(const short *)src, addr);
33 src += 2;
34 addr += 2;
35 }
36}
37
38void outsl(unsigned long addr, const void *src, unsigned long count) {
39 while (count) {
40 count -= 4;
41 writel(*(const long *)src, addr);
42 src += 4;
43 addr += 4;
44 }
45}
46
47void insb(unsigned long addr, void *dst, unsigned long count) {
48 while (count) {
49 count -= 1;
50 *(unsigned char *)dst = readb(addr);
51 dst += 1;
52 addr += 1;
53 }
54}
55
56void insw(unsigned long addr, void *dst, unsigned long count) {
57 while (count) {
58 count -= 2;
59 *(unsigned short *)dst = readw(addr);
60 dst += 2;
61 addr += 2;
62 }
63}
64
65void insl(unsigned long addr, void *dst, unsigned long count) {
66 while (count) {
67 count -= 4;
68 /*
69 * XXX I am sure we are in for an unaligned trap here.
70 */
71 *(unsigned long *)dst = readl(addr);
72 dst += 4;
73 addr += 4;
74 }
75}
diff --git a/arch/xtensa/kernel/module.c b/arch/xtensa/kernel/module.c
index 2ea1755a08..ddf14dcf2a 100644
--- a/arch/xtensa/kernel/module.c
+++ b/arch/xtensa/kernel/module.c
@@ -7,7 +7,7 @@
7 * License. See the file "COPYING" in the main directory of this archive 7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details. 8 * for more details.
9 * 9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc. 10 * Copyright (C) 2001 - 2006 Tensilica Inc.
11 * 11 *
12 * Chris Zankel <chris@zankel.net> 12 * Chris Zankel <chris@zankel.net>
13 * 13 *
@@ -22,57 +22,216 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/cache.h> 23#include <linux/cache.h>
24 24
25LIST_HEAD(module_buf_list); 25#undef DEBUG_RELOCATE
26 26
27void *module_alloc(unsigned long size) 27void *module_alloc(unsigned long size)
28{ 28{
29 panic("module_alloc not implemented"); 29 if (size == 0)
30 return NULL;
31 return vmalloc(size);
30} 32}
31 33
32void module_free(struct module *mod, void *module_region) 34void module_free(struct module *mod, void *module_region)
33{ 35{
34 panic("module_free not implemented"); 36 vfree(module_region);
37 /* FIXME: If module_region == mod->init_region, trim exception
38 table entries. */
35} 39}
36 40
37int module_frob_arch_sections(Elf32_Ehdr *hdr, 41int module_frob_arch_sections(Elf32_Ehdr *hdr,
38 Elf32_Shdr *sechdrs, 42 Elf32_Shdr *sechdrs,
39 char *secstrings, 43 char *secstrings,
40 struct module *me) 44 struct module *mod)
41{ 45{
42 panic("module_frob_arch_sections not implemented"); 46 return 0;
47}
48
49static int
50decode_calln_opcode (unsigned char *location)
51{
52#ifdef __XTENSA_EB__
53 return (location[0] & 0xf0) == 0x50;
54#endif
55#ifdef __XTENSA_EL__
56 return (location[0] & 0xf) == 0x5;
57#endif
58}
59
60static int
61decode_l32r_opcode (unsigned char *location)
62{
63#ifdef __XTENSA_EB__
64 return (location[0] & 0xf0) == 0x10;
65#endif
66#ifdef __XTENSA_EL__
67 return (location[0] & 0xf) == 0x1;
68#endif
43} 69}
44 70
45int apply_relocate(Elf32_Shdr *sechdrs, 71int apply_relocate(Elf32_Shdr *sechdrs,
46 const char *strtab, 72 const char *strtab,
47 unsigned int symindex, 73 unsigned int symindex,
48 unsigned int relsec, 74 unsigned int relsec,
49 struct module *module) 75 struct module *mod)
50{ 76{
51 panic ("apply_relocate not implemented"); 77 printk(KERN_ERR "module %s: REL RELOCATION unsupported\n",
78 mod->name);
79 return -ENOEXEC;
80
52} 81}
53 82
54int apply_relocate_add(Elf32_Shdr *sechdrs, 83int apply_relocate_add(Elf32_Shdr *sechdrs,
55 const char *strtab, 84 const char *strtab,
56 unsigned int symindex, 85 unsigned int symindex,
57 unsigned int relsec, 86 unsigned int relsec,
58 struct module *module) 87 struct module *mod)
59{ 88{
60 panic("apply_relocate_add not implemented"); 89 unsigned int i;
90 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr;
91 Elf32_Sym *sym;
92 unsigned char *location;
93 uint32_t value;
94
95#ifdef DEBUG_RELOCATE
96 printk("Applying relocate section %u to %u\n", relsec,
97 sechdrs[relsec].sh_info);
98#endif
99 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) {
100 location = (char *)sechdrs[sechdrs[relsec].sh_info].sh_addr
101 + rela[i].r_offset;
102 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
103 + ELF32_R_SYM(rela[i].r_info);
104 value = sym->st_value + rela[i].r_addend;
105
106 switch (ELF32_R_TYPE(rela[i].r_info)) {
107 case R_XTENSA_NONE:
108 case R_XTENSA_DIFF8:
109 case R_XTENSA_DIFF16:
110 case R_XTENSA_DIFF32:
111 case R_XTENSA_ASM_EXPAND:
112 break;
113
114 case R_XTENSA_32:
115 case R_XTENSA_PLT:
116 *(uint32_t *)location += value;
117 break;
118
119 case R_XTENSA_SLOT0_OP:
120 if (decode_calln_opcode(location)) {
121 value -= ((unsigned long)location & -4) + 4;
122 if ((value & 3) != 0 ||
123 ((value + (1 << 19)) >> 20) != 0) {
124 printk("%s: relocation out of range, "
125 "section %d reloc %d "
126 "sym '%s'\n",
127 mod->name, relsec, i,
128 strtab + sym->st_name);
129 return -ENOEXEC;
130 }
131 value = (signed int)value >> 2;
132#ifdef __XTENSA_EB__
133 location[0] = ((location[0] & ~0x3) |
134 ((value >> 16) & 0x3));
135 location[1] = (value >> 8) & 0xff;
136 location[2] = value & 0xff;
137#endif
138#ifdef __XTENSA_EL__
139 location[0] = ((location[0] & ~0xc0) |
140 ((value << 6) & 0xc0));
141 location[1] = (value >> 2) & 0xff;
142 location[2] = (value >> 10) & 0xff;
143#endif
144 } else if (decode_l32r_opcode(location)) {
145 value -= (((unsigned long)location + 3) & -4);
146 if ((value & 3) != 0 ||
147 (signed int)value >> 18 != -1) {
148 printk("%s: relocation out of range, "
149 "section %d reloc %d "
150 "sym '%s'\n",
151 mod->name, relsec, i,
152 strtab + sym->st_name);
153 return -ENOEXEC;
154 }
155 value = (signed int)value >> 2;
156
157#ifdef __XTENSA_EB__
158 location[1] = (value >> 8) & 0xff;
159 location[2] = value & 0xff;
160#endif
161#ifdef __XTENSA_EL__
162 location[1] = value & 0xff;
163 location[2] = (value >> 8) & 0xff;
164#endif
165 }
166 /* FIXME: Ignore any other opcodes. The Xtensa
167 assembler currently assumes that the linker will
168 always do relaxation and so all PC-relative
169 operands need relocations. (The assembler also
170 writes out the tentative PC-relative values,
171 assuming no link-time relaxation, so it is usually
172 safe to ignore the relocations.) If the
173 assembler's "--no-link-relax" flag can be made to
174 work, and if all kernel modules can be assembled
175 with that flag, then unexpected relocations could
176 be detected here. */
177 break;
178
179 case R_XTENSA_SLOT1_OP:
180 case R_XTENSA_SLOT2_OP:
181 case R_XTENSA_SLOT3_OP:
182 case R_XTENSA_SLOT4_OP:
183 case R_XTENSA_SLOT5_OP:
184 case R_XTENSA_SLOT6_OP:
185 case R_XTENSA_SLOT7_OP:
186 case R_XTENSA_SLOT8_OP:
187 case R_XTENSA_SLOT9_OP:
188 case R_XTENSA_SLOT10_OP:
189 case R_XTENSA_SLOT11_OP:
190 case R_XTENSA_SLOT12_OP:
191 case R_XTENSA_SLOT13_OP:
192 case R_XTENSA_SLOT14_OP:
193 printk("%s: unexpected FLIX relocation: %u\n",
194 mod->name,
195 ELF32_R_TYPE(rela[i].r_info));
196 return -ENOEXEC;
197
198 case R_XTENSA_SLOT0_ALT:
199 case R_XTENSA_SLOT1_ALT:
200 case R_XTENSA_SLOT2_ALT:
201 case R_XTENSA_SLOT3_ALT:
202 case R_XTENSA_SLOT4_ALT:
203 case R_XTENSA_SLOT5_ALT:
204 case R_XTENSA_SLOT6_ALT:
205 case R_XTENSA_SLOT7_ALT:
206 case R_XTENSA_SLOT8_ALT:
207 case R_XTENSA_SLOT9_ALT:
208 case R_XTENSA_SLOT10_ALT:
209 case R_XTENSA_SLOT11_ALT:
210 case R_XTENSA_SLOT12_ALT:
211 case R_XTENSA_SLOT13_ALT:
212 case R_XTENSA_SLOT14_ALT:
213 printk("%s: unexpected ALT relocation: %u\n",
214 mod->name,
215 ELF32_R_TYPE(rela[i].r_info));
216 return -ENOEXEC;
217
218 default:
219 printk("%s: unexpected relocation: %u\n",
220 mod->name,
221 ELF32_R_TYPE(rela[i].r_info));
222 return -ENOEXEC;
223 }
224 }
225 return 0;
61} 226}
62 227
63int module_finalize(const Elf_Ehdr *hdr, 228int module_finalize(const Elf_Ehdr *hdr,
64 const Elf_Shdr *sechdrs, 229 const Elf_Shdr *sechdrs,
65 struct module *me) 230 struct module *mod)
66{ 231{
67 panic ("module_finalize not implemented"); 232 return 0;
68} 233}
69 234
70void module_arch_cleanup(struct module *mod) 235void module_arch_cleanup(struct module *mod)
71{ 236{
72 panic("module_arch_cleanup not implemented");
73}
74
75struct bug_entry *module_find_bug(unsigned long bugaddr)
76{
77 panic("module_find_bug not implemented");
78} 237}
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index 77deae5290..b7c073484e 100644
--- a/arch/xtensa/kernel/pci.c
+++ b/arch/xtensa/kernel/pci.c
@@ -394,72 +394,3 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
394 394
395 return ret; 395 return ret;
396} 396}
397
398/*
399 * This probably belongs here rather than ioport.c because
400 * we do not want this crud linked into SBus kernels.
401 * Also, think for a moment about likes of floppy.c that
402 * include architecture specific parts. They may want to redefine ins/outs.
403 *
404 * We do not use horrible macros here because we want to
405 * advance pointer by sizeof(size).
406 */
407void outsb(unsigned long addr, const void *src, unsigned long count) {
408 while (count) {
409 count -= 1;
410 writeb(*(const char *)src, addr);
411 src += 1;
412 addr += 1;
413 }
414}
415
416void outsw(unsigned long addr, const void *src, unsigned long count) {
417 while (count) {
418 count -= 2;
419 writew(*(const short *)src, addr);
420 src += 2;
421 addr += 2;
422 }
423}
424
425void outsl(unsigned long addr, const void *src, unsigned long count) {
426 while (count) {
427 count -= 4;
428 writel(*(const long *)src, addr);
429 src += 4;
430 addr += 4;
431 }
432}
433
434void insb(unsigned long addr, void *dst, unsigned long count) {
435 while (count) {
436 count -= 1;
437 *(unsigned char *)dst = readb(addr);
438 dst += 1;
439 addr += 1;
440 }
441}
442
443void insw(unsigned long addr, void *dst, unsigned long count) {
444 while (count) {
445 count -= 2;
446 *(unsigned short *)dst = readw(addr);
447 dst += 2;
448 addr += 2;
449 }
450}
451
452void insl(unsigned long addr, void *dst, unsigned long count) {
453 while (count) {
454 count -= 4;
455 /*
456 * XXX I am sure we are in for an unaligned trap here.
457 */
458 *(unsigned long *)dst = readl(addr);
459 dst += 4;
460 addr += 4;
461 }
462}
463
464
465
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c
index ce758bab95..f53d7bd9df 100644
--- a/arch/xtensa/kernel/process.c
+++ b/arch/xtensa/kernel/process.c
@@ -30,6 +30,7 @@
30#include <linux/init_task.h> 30#include <linux/init_task.h>
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/mqueue.h> 32#include <linux/mqueue.h>
33#include <linux/fs.h>
33 34
34#include <asm/pgtable.h> 35#include <asm/pgtable.h>
35#include <asm/uaccess.h> 36#include <asm/uaccess.h>
@@ -45,20 +46,6 @@
45 46
46extern void ret_from_fork(void); 47extern void ret_from_fork(void);
47 48
48static struct fs_struct init_fs = INIT_FS;
49static struct files_struct init_files = INIT_FILES;
50static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
51static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
52struct mm_struct init_mm = INIT_MM(init_mm);
53EXPORT_SYMBOL(init_mm);
54
55union thread_union init_thread_union
56 __attribute__((__section__(".data.init_task"))) =
57{ INIT_THREAD_INFO(init_task) };
58
59struct task_struct init_task = INIT_TASK(init_task);
60EXPORT_SYMBOL(init_task);
61
62struct task_struct *current_set[NR_CPUS] = {&init_task, }; 49struct task_struct *current_set[NR_CPUS] = {&init_task, };
63 50
64void (*pm_power_off)(void) = NULL; 51void (*pm_power_off)(void) = NULL;
diff --git a/arch/xtensa/kernel/semaphore.c b/arch/xtensa/kernel/semaphore.c
index d40f4b1b75..995c6410ae 100644
--- a/arch/xtensa/kernel/semaphore.c
+++ b/arch/xtensa/kernel/semaphore.c
@@ -100,7 +100,7 @@ static __inline__ int waking_non_zero_trylock(struct semaphore *sem)
100 return ret; 100 return ret;
101} 101}
102 102
103spinlock_t semaphore_wake_lock; 103DEFINE_SPINLOCK(semaphore_wake_lock);
104 104
105/* 105/*
106 * Semaphores are implemented using a two-way counter: 106 * Semaphores are implemented using a two-way counter:
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c
index fe3834bc1d..f3e16efcd4 100644
--- a/arch/xtensa/kernel/syscall.c
+++ b/arch/xtensa/kernel/syscall.c
@@ -93,3 +93,8 @@ asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg)
93 return (long)ret; 93 return (long)ret;
94} 94}
95 95
96asmlinkage long xtensa_fadvise64_64(int fd, int advice, unsigned long long offset, unsigned long long len)
97{
98 return sys_fadvise64_64(fd, offset, len, advice);
99}
100
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c
index 22949be4a5..60d29fe0b1 100644
--- a/arch/xtensa/kernel/time.c
+++ b/arch/xtensa/kernel/time.c
@@ -32,12 +32,20 @@ EXPORT_SYMBOL(rtc_lock);
32 32
33#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT 33#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
34unsigned long ccount_per_jiffy; /* per 1/HZ */ 34unsigned long ccount_per_jiffy; /* per 1/HZ */
35unsigned long ccount_nsec; /* nsec per ccount increment */ 35unsigned long nsec_per_ccount; /* nsec per ccount increment */
36#endif 36#endif
37 37
38unsigned int last_ccount_stamp;
39static long last_rtc_update = 0; 38static long last_rtc_update = 0;
40 39
40/*
41 * Scheduler clock - returns current tim in nanosec units.
42 */
43
44unsigned long long sched_clock(void)
45{
46 return (unsigned long long)jiffies * (1000000000 / HZ);
47}
48
41static irqreturn_t timer_interrupt(int irq, void *dev_id); 49static irqreturn_t timer_interrupt(int irq, void *dev_id);
42static struct irqaction timer_irqaction = { 50static struct irqaction timer_irqaction = {
43 .handler = timer_interrupt, 51 .handler = timer_interrupt,
@@ -69,7 +77,6 @@ void __init time_init(void)
69 77
70 xtime.tv_nsec = 0; 78 xtime.tv_nsec = 0;
71 last_rtc_update = xtime.tv_sec = sec_n; 79 last_rtc_update = xtime.tv_sec = sec_n;
72 last_ccount_stamp = get_ccount();
73 80
74 set_normalized_timespec(&wall_to_monotonic, 81 set_normalized_timespec(&wall_to_monotonic,
75 -xtime.tv_sec, -xtime.tv_nsec); 82 -xtime.tv_sec, -xtime.tv_nsec);
@@ -85,7 +92,7 @@ int do_settimeofday(struct timespec *tv)
85{ 92{
86 time_t wtm_sec, sec = tv->tv_sec; 93 time_t wtm_sec, sec = tv->tv_sec;
87 long wtm_nsec, nsec = tv->tv_nsec; 94 long wtm_nsec, nsec = tv->tv_nsec;
88 unsigned long ccount; 95 unsigned long delta;
89 96
90 if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) 97 if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
91 return -EINVAL; 98 return -EINVAL;
@@ -97,8 +104,10 @@ int do_settimeofday(struct timespec *tv)
97 * wall time. Discover what correction gettimeofday() would have 104 * wall time. Discover what correction gettimeofday() would have
98 * made, and then undo it! 105 * made, and then undo it!
99 */ 106 */
100 ccount = get_ccount(); 107
101 nsec -= (ccount - last_ccount_stamp) * CCOUNT_NSEC; 108 delta = CCOUNT_PER_JIFFY;
109 delta += get_ccount() - get_linux_timer();
110 nsec -= delta * NSEC_PER_CCOUNT;
102 111
103 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); 112 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
104 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); 113 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
@@ -117,17 +126,21 @@ EXPORT_SYMBOL(do_settimeofday);
117void do_gettimeofday(struct timeval *tv) 126void do_gettimeofday(struct timeval *tv)
118{ 127{
119 unsigned long flags; 128 unsigned long flags;
120 unsigned long sec, usec, delta, seq; 129 unsigned long volatile sec, usec, delta, seq;
121 130
122 do { 131 do {
123 seq = read_seqbegin_irqsave(&xtime_lock, flags); 132 seq = read_seqbegin_irqsave(&xtime_lock, flags);
124 133
125 delta = get_ccount() - last_ccount_stamp;
126 sec = xtime.tv_sec; 134 sec = xtime.tv_sec;
127 usec = (xtime.tv_nsec / NSEC_PER_USEC); 135 usec = (xtime.tv_nsec / NSEC_PER_USEC);
136
137 delta = get_linux_timer() - get_ccount();
138
128 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); 139 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
129 140
130 usec += (delta * CCOUNT_NSEC) / NSEC_PER_USEC; 141 usec += (((unsigned long) CCOUNT_PER_JIFFY - delta)
142 * (unsigned long) NSEC_PER_CCOUNT) / NSEC_PER_USEC;
143
131 for (; usec >= 1000000; sec++, usec -= 1000000) 144 for (; usec >= 1000000; sec++, usec -= 1000000)
132 ; 145 ;
133 146
@@ -158,9 +171,12 @@ again:
158 171
159 write_seqlock(&xtime_lock); 172 write_seqlock(&xtime_lock);
160 173
161 last_ccount_stamp = next; 174 do_timer(1); /* Linux handler in kernel/timer.c */
175
176 /* Note that writing CCOMPARE clears the interrupt. */
177
162 next += CCOUNT_PER_JIFFY; 178 next += CCOUNT_PER_JIFFY;
163 do_timer (1); /* Linux handler in kernel/timer.c */ 179 set_linux_timer(next);
164 180
165 if (ntp_synced() && 181 if (ntp_synced() &&
166 xtime.tv_sec - last_rtc_update >= 659 && 182 xtime.tv_sec - last_rtc_update >= 659 &&
@@ -175,19 +191,15 @@ again:
175 write_sequnlock(&xtime_lock); 191 write_sequnlock(&xtime_lock);
176 } 192 }
177 193
178 /* NOTE: writing CCOMPAREn clears the interrupt. */ 194 /* Allow platform to do something useful (Wdog). */
179 195
180 set_linux_timer (next); 196 platform_heartbeat();
181 197
182 /* Make sure we didn't miss any tick... */ 198 /* Make sure we didn't miss any tick... */
183 199
184 if ((signed long)(get_ccount() - next) > 0) 200 if ((signed long)(get_ccount() - next) > 0)
185 goto again; 201 goto again;
186 202
187 /* Allow platform to do something useful (Wdog). */
188
189 platform_heartbeat();
190
191 return IRQ_HANDLED; 203 return IRQ_HANDLED;
192} 204}
193 205
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c
index c5e62f9d9f..8be99c777d 100644
--- a/arch/xtensa/kernel/traps.c
+++ b/arch/xtensa/kernel/traps.c
@@ -83,7 +83,7 @@ typedef struct {
83 void* handler; 83 void* handler;
84} dispatch_init_table_t; 84} dispatch_init_table_t;
85 85
86dispatch_init_table_t __init dispatch_init_table[] = { 86static dispatch_init_table_t __initdata dispatch_init_table[] = {
87 87
88{ EXCCAUSE_ILLEGAL_INSTRUCTION, 0, do_illegal_instruction}, 88{ EXCCAUSE_ILLEGAL_INSTRUCTION, 0, do_illegal_instruction},
89{ EXCCAUSE_SYSTEM_CALL, KRNL, fast_syscall_kernel }, 89{ EXCCAUSE_SYSTEM_CALL, KRNL, fast_syscall_kernel },
@@ -305,7 +305,7 @@ do_debug(struct pt_regs *regs)
305 305
306#define set_handler(idx,handler) (exc_table[idx] = (unsigned long) (handler)) 306#define set_handler(idx,handler) (exc_table[idx] = (unsigned long) (handler))
307 307
308void trap_init(void) 308void __init trap_init(void)
309{ 309{
310 int i; 310 int i;
311 311
diff --git a/arch/xtensa/mm/Makefile b/arch/xtensa/mm/Makefile
index a5aed5932d..10aec22a8f 100644
--- a/arch/xtensa/mm/Makefile
+++ b/arch/xtensa/mm/Makefile
@@ -5,9 +5,5 @@
5# removes any old dependencies. DON'T put your own dependencies here 5# removes any old dependencies. DON'T put your own dependencies here
6# unless it's something special (ie not a .c file). 6# unless it's something special (ie not a .c file).
7# 7#
8# Note 2! The CFLAGS definition is now in the main makefile...
9 8
10obj-y := init.o fault.o tlb.o misc.o 9obj-y := init.o fault.o tlb.o misc.o cache.o
11obj-m :=
12obj-n :=
13obj- :=
diff --git a/arch/xtensa/mm/cache.c b/arch/xtensa/mm/cache.c
new file mode 100644
index 0000000000..9a1fa9478a
--- /dev/null
+++ b/arch/xtensa/mm/cache.c
@@ -0,0 +1,256 @@
1/*
2 * arch/xtensa/mm/cache.c
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001-2006 Tensilica Inc.
9 *
10 * Chris Zankel <chris@zankel.net>
11 * Joe Taylor
12 * Marc Gauthier
13 *
14 */
15
16#include <linux/init.h>
17#include <linux/signal.h>
18#include <linux/sched.h>
19#include <linux/kernel.h>
20#include <linux/errno.h>
21#include <linux/string.h>
22#include <linux/types.h>
23#include <linux/ptrace.h>
24#include <linux/bootmem.h>
25#include <linux/swap.h>
26#include <linux/pagemap.h>
27
28#include <asm/pgtable.h>
29#include <asm/bootparam.h>
30#include <asm/mmu_context.h>
31#include <asm/tlb.h>
32#include <asm/tlbflush.h>
33#include <asm/page.h>
34#include <asm/pgalloc.h>
35#include <asm/pgtable.h>
36
37//#define printd(x...) printk(x)
38#define printd(x...) do { } while(0)
39
40/*
41 * Note:
42 * The kernel provides one architecture bit PG_arch_1 in the page flags that
43 * can be used for cache coherency.
44 *
45 * I$-D$ coherency.
46 *
47 * The Xtensa architecture doesn't keep the instruction cache coherent with
48 * the data cache. We use the architecture bit to indicate if the caches
49 * are coherent. The kernel clears this bit whenever a page is added to the
50 * page cache. At that time, the caches might not be in sync. We, therefore,
51 * define this flag as 'clean' if set.
52 *
53 * D-cache aliasing.
54 *
55 * With cache aliasing, we have to always flush the cache when pages are
56 * unmapped (see tlb_start_vma(). So, we use this flag to indicate a dirty
57 * page.
58 *
59 *
60 *
61 */
62
63#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
64
65/*
66 * Any time the kernel writes to a user page cache page, or it is about to
67 * read from a page cache page this routine is called.
68 *
69 */
70
71void flush_dcache_page(struct page *page)
72{
73 struct address_space *mapping = page_mapping(page);
74
75 /*
76 * If we have a mapping but the page is not mapped to user-space
77 * yet, we simply mark this page dirty and defer flushing the
78 * caches until update_mmu().
79 */
80
81 if (mapping && !mapping_mapped(mapping)) {
82 if (!test_bit(PG_arch_1, &page->flags))
83 set_bit(PG_arch_1, &page->flags);
84 return;
85
86 } else {
87
88 unsigned long phys = page_to_phys(page);
89 unsigned long temp = page->index << PAGE_SHIFT;
90 unsigned long alias = !(DCACHE_ALIAS_EQ(temp, phys));
91 unsigned long virt;
92
93 /*
94 * Flush the page in kernel space and user space.
95 * Note that we can omit that step if aliasing is not
96 * an issue, but we do have to synchronize I$ and D$
97 * if we have a mapping.
98 */
99
100 if (!alias && !mapping)
101 return;
102
103 __flush_invalidate_dcache_page((long)page_address(page));
104
105 virt = TLBTEMP_BASE_1 + (temp & DCACHE_ALIAS_MASK);
106
107 if (alias)
108 __flush_invalidate_dcache_page_alias(virt, phys);
109
110 if (mapping)
111 __invalidate_icache_page_alias(virt, phys);
112 }
113
114 /* There shouldn't be an entry in the cache for this page anymore. */
115}
116
117
118/*
119 * For now, flush the whole cache. FIXME??
120 */
121
122void flush_cache_range(struct vm_area_struct* vma,
123 unsigned long start, unsigned long end)
124{
125 __flush_invalidate_dcache_all();
126 __invalidate_icache_all();
127}
128
129/*
130 * Remove any entry in the cache for this page.
131 *
132 * Note that this function is only called for user pages, so use the
133 * alias versions of the cache flush functions.
134 */
135
136void flush_cache_page(struct vm_area_struct* vma, unsigned long address,
137 unsigned long pfn)
138{
139 /* Note that we have to use the 'alias' address to avoid multi-hit */
140
141 unsigned long phys = page_to_phys(pfn_to_page(pfn));
142 unsigned long virt = TLBTEMP_BASE_1 + (address & DCACHE_ALIAS_MASK);
143
144 __flush_invalidate_dcache_page_alias(virt, phys);
145 __invalidate_icache_page_alias(virt, phys);
146}
147
148#endif
149
150void
151update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t pte)
152{
153 unsigned long pfn = pte_pfn(pte);
154 struct page *page;
155
156 if (!pfn_valid(pfn))
157 return;
158
159 page = pfn_to_page(pfn);
160
161 /* Invalidate old entry in TLBs */
162
163 invalidate_itlb_mapping(addr);
164 invalidate_dtlb_mapping(addr);
165
166#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
167
168 if (!PageReserved(page) && test_bit(PG_arch_1, &page->flags)) {
169
170 unsigned long vaddr = TLBTEMP_BASE_1 + (addr & DCACHE_ALIAS_MASK);
171 unsigned long paddr = (unsigned long) page_address(page);
172 unsigned long phys = page_to_phys(page);
173
174 __flush_invalidate_dcache_page(paddr);
175
176 __flush_invalidate_dcache_page_alias(vaddr, phys);
177 __invalidate_icache_page_alias(vaddr, phys);
178
179 clear_bit(PG_arch_1, &page->flags);
180 }
181#else
182 if (!PageReserved(page) && !test_bit(PG_arch_1, &page->flags)
183 && (vma->vm_flags & VM_EXEC) != 0) {
184 unsigned long vaddr = addr & PAGE_MASK;
185 __flush_dcache_page(vaddr);
186 __invalidate_icache_page(vaddr);
187 set_bit(PG_arch_1, &page->flags);
188 }
189#endif
190}
191
192/*
193 * access_process_vm() has called get_user_pages(), which has done a
194 * flush_dcache_page() on the page.
195 */
196
197#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
198
199void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
200 unsigned long vaddr, void *dst, const void *src,
201 unsigned long len)
202{
203 unsigned long phys = page_to_phys(page);
204 unsigned long alias = !(DCACHE_ALIAS_EQ(vaddr, phys));
205
206 /* Flush and invalidate user page if aliased. */
207
208 if (alias) {
209 unsigned long temp = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK);
210 __flush_invalidate_dcache_page_alias(temp, phys);
211 }
212
213 /* Copy data */
214
215 memcpy(dst, src, len);
216
217 /*
218 * Flush and invalidate kernel page if aliased and synchronize
219 * data and instruction caches for executable pages.
220 */
221
222 if (alias) {
223 unsigned long temp = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK);
224
225 __flush_invalidate_dcache_range((unsigned long) dst, len);
226 if ((vma->vm_flags & VM_EXEC) != 0) {
227 __invalidate_icache_page_alias(temp, phys);
228 }
229
230 } else if ((vma->vm_flags & VM_EXEC) != 0) {
231 __flush_dcache_range((unsigned long)dst,len);
232 __invalidate_icache_range((unsigned long) dst, len);
233 }
234}
235
236extern void copy_from_user_page(struct vm_area_struct *vma, struct page *page,
237 unsigned long vaddr, void *dst, const void *src,
238 unsigned long len)
239{
240 unsigned long phys = page_to_phys(page);
241 unsigned long alias = !(DCACHE_ALIAS_EQ(vaddr, phys));
242
243 /*
244 * Flush user page if aliased.
245 * (Note: a simply flush would be sufficient)
246 */
247
248 if (alias) {
249 unsigned long temp = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK);
250 __flush_invalidate_dcache_page_alias(temp, phys);
251 }
252
253 memcpy(dst, src, len);
254}
255
256#endif
diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c
index 16004067ad..45d28f217c 100644
--- a/arch/xtensa/mm/fault.c
+++ b/arch/xtensa/mm/fault.c
@@ -24,6 +24,8 @@
24unsigned long asid_cache = ASID_USER_FIRST; 24unsigned long asid_cache = ASID_USER_FIRST;
25void bad_page_fault(struct pt_regs*, unsigned long, int); 25void bad_page_fault(struct pt_regs*, unsigned long, int);
26 26
27#undef DEBUG_PAGE_FAULT
28
27/* 29/*
28 * This routine handles page faults. It determines the address, 30 * This routine handles page faults. It determines the address,
29 * and the problem, and then passes it off to one of the appropriate 31 * and the problem, and then passes it off to one of the appropriate
@@ -64,7 +66,7 @@ void do_page_fault(struct pt_regs *regs)
64 exccause == EXCCAUSE_ITLB_MISS || 66 exccause == EXCCAUSE_ITLB_MISS ||
65 exccause == EXCCAUSE_FETCH_CACHE_ATTRIBUTE) ? 1 : 0; 67 exccause == EXCCAUSE_FETCH_CACHE_ATTRIBUTE) ? 1 : 0;
66 68
67#if 0 69#ifdef DEBUG_PAGE_FAULT
68 printk("[%s:%d:%08x:%d:%08x:%s%s]\n", current->comm, current->pid, 70 printk("[%s:%d:%08x:%d:%08x:%s%s]\n", current->comm, current->pid,
69 address, exccause, regs->pc, is_write? "w":"", is_exec? "x":""); 71 address, exccause, regs->pc, is_write? "w":"", is_exec? "x":"");
70#endif 72#endif
@@ -219,7 +221,7 @@ bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
219 221
220 /* Are we prepared to handle this kernel fault? */ 222 /* Are we prepared to handle this kernel fault? */
221 if ((entry = search_exception_tables(regs->pc)) != NULL) { 223 if ((entry = search_exception_tables(regs->pc)) != NULL) {
222#if 1 224#ifdef DEBUG_PAGE_FAULT
223 printk(KERN_DEBUG "%s: Exception at pc=%#010lx (%lx)\n", 225 printk(KERN_DEBUG "%s: Exception at pc=%#010lx (%lx)\n",
224 current->comm, regs->pc, entry->fixup); 226 current->comm, regs->pc, entry->fixup);
225#endif 227#endif
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
index 8415c76f11..b3086f34a8 100644
--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -15,40 +15,24 @@
15 * Kevin Chea 15 * Kevin Chea
16 */ 16 */
17 17
18#include <linux/init.h>
19#include <linux/signal.h>
20#include <linux/sched.h>
21#include <linux/kernel.h> 18#include <linux/kernel.h>
22#include <linux/errno.h> 19#include <linux/errno.h>
23#include <linux/string.h>
24#include <linux/types.h>
25#include <linux/ptrace.h>
26#include <linux/bootmem.h> 20#include <linux/bootmem.h>
27#include <linux/swap.h> 21#include <linux/swap.h>
22#include <linux/mman.h>
23#include <linux/nodemask.h>
24#include <linux/mm.h>
25#include <linux/slab.h>
28 26
29#include <asm/pgtable.h> 27#include <asm/pgtable.h>
30#include <asm/bootparam.h> 28#include <asm/bootparam.h>
31#include <asm/mmu_context.h> 29#include <asm/mmu_context.h>
32#include <asm/tlb.h> 30#include <asm/tlb.h>
33#include <asm/tlbflush.h>
34#include <asm/page.h> 31#include <asm/page.h>
35#include <asm/pgalloc.h> 32#include <asm/pgalloc.h>
36#include <asm/pgtable.h>
37
38 33
39#define DEBUG 0
40 34
41DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 35DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
42//static DEFINE_SPINLOCK(tlb_lock);
43
44/*
45 * This flag is used to indicate that the page was mapped and modified in
46 * kernel space, so the cache is probably dirty at that address.
47 * If cache aliasing is enabled and the page color mismatches, update_mmu_cache
48 * synchronizes the caches if this bit is set.
49 */
50
51#define PG_cache_clean PG_arch_1
52 36
53/* References to section boundaries */ 37/* References to section boundaries */
54 38
@@ -323,228 +307,22 @@ void show_mem(void)
323 printk("%d free pages\n", free); 307 printk("%d free pages\n", free);
324} 308}
325 309
326/* ------------------------------------------------------------------------- */ 310struct kmem_cache *pgtable_cache __read_mostly;
327
328#if (DCACHE_WAY_SIZE > PAGE_SIZE)
329
330/*
331 * With cache aliasing, the page color of the page in kernel space and user
332 * space might mismatch. We temporarily map the page to a different virtual
333 * address with the same color and clear the page there.
334 */
335
336void clear_user_page(void *kaddr, unsigned long vaddr, struct page* page)
337{
338
339 /* There shouldn't be any entries for this page. */
340
341 __flush_invalidate_dcache_page_phys(__pa(page_address(page)));
342
343 if (!PAGE_COLOR_EQ(vaddr, kaddr)) {
344 unsigned long v, p;
345
346 /* Temporarily map page to DTLB_WAY_DCACHE_ALIAS0. */
347
348 spin_lock(&tlb_lock);
349
350 p = (unsigned long)pte_val((mk_pte(page,PAGE_KERNEL)));
351 kaddr = (void*)PAGE_COLOR_MAP0(vaddr);
352 v = (unsigned long)kaddr | DTLB_WAY_DCACHE_ALIAS0;
353 __asm__ __volatile__("wdtlb %0,%1; dsync" : :"a" (p), "a" (v));
354
355 clear_page(kaddr);
356
357 spin_unlock(&tlb_lock);
358 } else {
359 clear_page(kaddr);
360 }
361
362 /* We need to make sure that i$ and d$ are coherent. */
363
364 clear_bit(PG_cache_clean, &page->flags);
365}
366
367/*
368 * With cache aliasing, we have to make sure that the page color of the page
369 * in kernel space matches that of the virtual user address before we read
370 * the page. If the page color differ, we create a temporary DTLB entry with
371 * the corrent page color and use this 'temporary' address as the source.
372 * We then use the same approach as in clear_user_page and copy the data
373 * to the kernel space and clear the PG_cache_clean bit to synchronize caches
374 * later.
375 *
376 * Note:
377 * Instead of using another 'way' for the temporary DTLB entry, we could
378 * probably use the same entry that points to the kernel address (after
379 * saving the original value and restoring it when we are done).
380 */
381 311
382void copy_user_page(void* to, void* from, unsigned long vaddr, 312static void pgd_ctor(void *addr, struct kmem_cache *cache, unsigned long flags)
383 struct page* to_page)
384{ 313{
385 /* There shouldn't be any entries for the new page. */ 314 pte_t* ptep = (pte_t*)addr;
386 315 int i;
387 __flush_invalidate_dcache_page_phys(__pa(page_address(to_page)));
388
389 spin_lock(&tlb_lock);
390
391 if (!PAGE_COLOR_EQ(vaddr, from)) {
392 unsigned long v, p, t;
393
394 __asm__ __volatile__ ("pdtlb %1,%2; rdtlb1 %0,%1"
395 : "=a"(p), "=a"(t) : "a"(from));
396 from = (void*)PAGE_COLOR_MAP0(vaddr);
397 v = (unsigned long)from | DTLB_WAY_DCACHE_ALIAS0;
398 __asm__ __volatile__ ("wdtlb %0,%1; dsync" ::"a" (p), "a" (v));
399 }
400
401 if (!PAGE_COLOR_EQ(vaddr, to)) {
402 unsigned long v, p;
403
404 p = (unsigned long)pte_val((mk_pte(to_page,PAGE_KERNEL)));
405 to = (void*)PAGE_COLOR_MAP1(vaddr);
406 v = (unsigned long)to | DTLB_WAY_DCACHE_ALIAS1;
407 __asm__ __volatile__ ("wdtlb %0,%1; dsync" ::"a" (p), "a" (v));
408 }
409 copy_page(to, from);
410
411 spin_unlock(&tlb_lock);
412
413 /* We need to make sure that i$ and d$ are coherent. */
414
415 clear_bit(PG_cache_clean, &to_page->flags);
416}
417
418
419
420/*
421 * Any time the kernel writes to a user page cache page, or it is about to
422 * read from a page cache page this routine is called.
423 *
424 * Note:
425 * The kernel currently only provides one architecture bit in the page
426 * flags that we use for I$/D$ coherency. Maybe, in future, we can
427 * use a sepearte bit for deferred dcache aliasing:
428 * If the page is not mapped yet, we only need to set a flag,
429 * if mapped, we need to invalidate the page.
430 */
431// FIXME: we probably need this for WB caches not only for Page Coloring..
432
433void flush_dcache_page(struct page *page)
434{
435 unsigned long addr = __pa(page_address(page));
436 struct address_space *mapping = page_mapping(page);
437
438 __flush_invalidate_dcache_page_phys(addr);
439
440 if (!test_bit(PG_cache_clean, &page->flags))
441 return;
442
443 /* If this page hasn't been mapped, yet, handle I$/D$ coherency later.*/
444#if 0
445 if (mapping && !mapping_mapped(mapping))
446 clear_bit(PG_cache_clean, &page->flags);
447 else
448#endif
449 __invalidate_icache_page_phys(addr);
450}
451
452void flush_cache_range(struct vm_area_struct* vma, unsigned long s,
453 unsigned long e)
454{
455 __flush_invalidate_cache_all();
456}
457
458void flush_cache_page(struct vm_area_struct* vma, unsigned long address,
459 unsigned long pfn)
460{
461 struct page *page = pfn_to_page(pfn);
462
463 /* Remove any entry for the old mapping. */
464
465 if (current->active_mm == vma->vm_mm) {
466 unsigned long addr = __pa(page_address(page));
467 __flush_invalidate_dcache_page_phys(addr);
468 if ((vma->vm_flags & VM_EXEC) != 0)
469 __invalidate_icache_page_phys(addr);
470 } else {
471 BUG();
472 }
473}
474
475#endif /* (DCACHE_WAY_SIZE > PAGE_SIZE) */
476
477
478pte_t* pte_alloc_one_kernel (struct mm_struct* mm, unsigned long addr)
479{
480 pte_t* pte = (pte_t*)__get_free_pages(GFP_KERNEL|__GFP_REPEAT, 0);
481 if (likely(pte)) {
482 pte_t* ptep = (pte_t*)(pte_val(*pte) + PAGE_OFFSET);
483 int i;
484 for (i = 0; i < 1024; i++, ptep++)
485 pte_clear(mm, addr, ptep);
486 }
487 return pte;
488}
489
490struct page* pte_alloc_one(struct mm_struct *mm, unsigned long addr)
491{
492 struct page *page;
493
494 page = alloc_pages(GFP_KERNEL | __GFP_REPEAT, 0);
495
496 if (likely(page)) {
497 pte_t* ptep = kmap_atomic(page, KM_USER0);
498 int i;
499 316
500 for (i = 0; i < 1024; i++, ptep++) 317 for (i = 0; i < 1024; i++, ptep++)
501 pte_clear(mm, addr, ptep); 318 pte_clear(NULL, 0, ptep);
502 319
503 kunmap_atomic(ptep, KM_USER0);
504 }
505 return page;
506} 320}
507 321
508 322void __init pgtable_cache_init(void)
509/*
510 * Handle D$/I$ coherency.
511 *
512 * Note:
513 * We only have one architecture bit for the page flags, so we cannot handle
514 * cache aliasing, yet.
515 */
516
517void
518update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t pte)
519{ 323{
520 unsigned long pfn = pte_pfn(pte); 324 pgtable_cache = kmem_cache_create("pgd",
521 struct page *page; 325 PAGE_SIZE, PAGE_SIZE,
522 unsigned long vaddr = addr & PAGE_MASK; 326 SLAB_HWCACHE_ALIGN,
523 327 pgd_ctor);
524 if (!pfn_valid(pfn))
525 return;
526
527 page = pfn_to_page(pfn);
528
529 invalidate_itlb_mapping(addr);
530 invalidate_dtlb_mapping(addr);
531
532 /* We have a new mapping. Use it. */
533
534 write_dtlb_entry(pte, dtlb_probe(addr));
535
536 /* If the processor can execute from this page, synchronize D$/I$. */
537
538 if ((vma->vm_flags & VM_EXEC) != 0) {
539
540 write_itlb_entry(pte, itlb_probe(addr));
541
542 /* Synchronize caches, if not clean. */
543
544 if (!test_and_set_bit(PG_cache_clean, &page->flags)) {
545 __flush_dcache_page(vaddr);
546 __invalidate_icache_page(vaddr);
547 }
548 }
549} 328}
550
diff --git a/arch/xtensa/mm/misc.S b/arch/xtensa/mm/misc.S
index ae085332c6..e1f880368e 100644
--- a/arch/xtensa/mm/misc.S
+++ b/arch/xtensa/mm/misc.S
@@ -7,29 +7,33 @@
7 * License. See the file "COPYING" in the main directory of this archive 7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details. 8 * for more details.
9 * 9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc. 10 * Copyright (C) 2001 - 2007 Tensilica Inc.
11 * 11 *
12 * Chris Zankel <chris@zankel.net> 12 * Chris Zankel <chris@zankel.net>
13 */ 13 */
14 14
15/* Note: we might want to implement some of the loops as zero-overhead-loops,
16 * where applicable and if supported by the processor.
17 */
18 15
19#include <linux/linkage.h> 16#include <linux/linkage.h>
20#include <asm/page.h> 17#include <asm/page.h>
21#include <asm/pgtable.h> 18#include <asm/pgtable.h>
22#include <asm/asmmacro.h> 19#include <asm/asmmacro.h>
23#include <asm/cacheasm.h> 20#include <asm/cacheasm.h>
21#include <asm/tlbflush.h>
22
24 23
25/* clear_page (page) */ 24/*
25 * clear_page and clear_user_page are the same for non-cache-aliased configs.
26 *
27 * clear_page (unsigned long page)
28 * a2
29 */
26 30
27ENTRY(clear_page) 31ENTRY(clear_page)
28 entry a1, 16 32 entry a1, 16
29 addi a4, a2, PAGE_SIZE
30 movi a3, 0
31 33
321: s32i a3, a2, 0 34 movi a3, 0
35 __loopi a2, a7, PAGE_SIZE, 32
36 s32i a3, a2, 0
33 s32i a3, a2, 4 37 s32i a3, a2, 4
34 s32i a3, a2, 8 38 s32i a3, a2, 8
35 s32i a3, a2, 12 39 s32i a3, a2, 12
@@ -37,42 +41,277 @@ ENTRY(clear_page)
37 s32i a3, a2, 20 41 s32i a3, a2, 20
38 s32i a3, a2, 24 42 s32i a3, a2, 24
39 s32i a3, a2, 28 43 s32i a3, a2, 28
40 addi a2, a2, 32 44 __endla a2, a7, 32
41 blt a2, a4, 1b
42 45
43 retw 46 retw
44 47
45/* 48/*
49 * copy_page and copy_user_page are the same for non-cache-aliased configs.
50 *
46 * copy_page (void *to, void *from) 51 * copy_page (void *to, void *from)
47 * a2 a3 52 * a2 a3
48 */ 53 */
49 54
50ENTRY(copy_page) 55ENTRY(copy_page)
51 entry a1, 16 56 entry a1, 16
52 addi a4, a2, PAGE_SIZE
53
541: l32i a5, a3, 0
55 l32i a6, a3, 4
56 l32i a7, a3, 8
57 s32i a5, a2, 0
58 s32i a6, a2, 4
59 s32i a7, a2, 8
60 l32i a5, a3, 12
61 l32i a6, a3, 16
62 l32i a7, a3, 20
63 s32i a5, a2, 12
64 s32i a6, a2, 16
65 s32i a7, a2, 20
66 l32i a5, a3, 24
67 l32i a6, a3, 28
68 s32i a5, a2, 24
69 s32i a6, a2, 28
70 addi a2, a2, 32
71 addi a3, a3, 32
72 blt a2, a4, 1b
73 57
58 __loopi a2, a4, PAGE_SIZE, 32
59
60 l32i a8, a3, 0
61 l32i a9, a3, 4
62 s32i a8, a2, 0
63 s32i a9, a2, 4
64
65 l32i a8, a3, 8
66 l32i a9, a3, 12
67 s32i a8, a2, 8
68 s32i a9, a2, 12
69
70 l32i a8, a3, 16
71 l32i a9, a3, 20
72 s32i a8, a2, 16
73 s32i a9, a2, 20
74
75 l32i a8, a3, 24
76 l32i a9, a3, 28
77 s32i a8, a2, 24
78 s32i a9, a2, 28
79
80 addi a2, a2, 32
81 addi a3, a3, 32
82
83 __endl a2, a4
84
85 retw
86
87/*
88 * If we have to deal with cache aliasing, we use temporary memory mappings
89 * to ensure that the source and destination pages have the same color as
90 * the virtual address. We use way 0 and 1 for temporary mappings in such cases.
91 *
92 * The temporary DTLB entries shouldn't be flushed by interrupts, but are
93 * flushed by preemptive task switches. Special code in the
94 * fast_second_level_miss handler re-established the temporary mapping.
95 * It requires that the PPNs for the destination and source addresses are
96 * in a6, and a7, respectively.
97 */
98
99/* TLB miss exceptions are treated special in the following region */
100
101ENTRY(__tlbtemp_mapping_start)
102
103#if (DCACHE_WAY_SIZE > PAGE_SIZE)
104
105/*
106 * clear_user_page (void *addr, unsigned long vaddr, struct page *page)
107 * a2 a3 a4
108 */
109
110ENTRY(clear_user_page)
111 entry a1, 32
112
113 /* Mark page dirty and determine alias. */
114
115 movi a7, (1 << PG_ARCH_1)
116 l32i a5, a4, PAGE_FLAGS
117 xor a6, a2, a3
118 extui a3, a3, PAGE_SHIFT, DCACHE_ALIAS_ORDER
119 extui a6, a6, PAGE_SHIFT, DCACHE_ALIAS_ORDER
120 or a5, a5, a7
121 slli a3, a3, PAGE_SHIFT
122 s32i a5, a4, PAGE_FLAGS
123
124 /* Skip setting up a temporary DTLB if not aliased. */
125
126 beqz a6, 1f
127
128 /* Invalidate kernel page. */
129
130 mov a10, a2
131 call8 __invalidate_dcache_page
132
133 /* Setup a temporary DTLB with the color of the VPN */
134
135 movi a4, -PAGE_OFFSET + (PAGE_KERNEL | _PAGE_HW_WRITE)
136 movi a5, TLBTEMP_BASE_1 # virt
137 add a6, a2, a4 # ppn
138 add a2, a5, a3 # add 'color'
139
140 wdtlb a6, a2
141 dsync
142
1431: movi a3, 0
144 __loopi a2, a7, PAGE_SIZE, 32
145 s32i a3, a2, 0
146 s32i a3, a2, 4
147 s32i a3, a2, 8
148 s32i a3, a2, 12
149 s32i a3, a2, 16
150 s32i a3, a2, 20
151 s32i a3, a2, 24
152 s32i a3, a2, 28
153 __endla a2, a7, 32
154
155 bnez a6, 1f
156 retw
157
158 /* We need to invalidate the temporary idtlb entry, if any. */
159
1601: addi a2, a2, -PAGE_SIZE
161 idtlb a2
162 dsync
163
164 retw
165
166/*
167 * copy_page_user (void *to, void *from, unsigned long vaddr, struct page *page)
168 * a2 a3 a4 a5
169 */
170
171ENTRY(copy_user_page)
172
173 entry a1, 32
174
175 /* Mark page dirty and determine alias for destination. */
176
177 movi a8, (1 << PG_ARCH_1)
178 l32i a9, a5, PAGE_FLAGS
179 xor a6, a2, a4
180 xor a7, a3, a4
181 extui a4, a4, PAGE_SHIFT, DCACHE_ALIAS_ORDER
182 extui a6, a6, PAGE_SHIFT, DCACHE_ALIAS_ORDER
183 extui a7, a7, PAGE_SHIFT, DCACHE_ALIAS_ORDER
184 or a9, a9, a8
185 slli a4, a4, PAGE_SHIFT
186 s32i a9, a5, PAGE_FLAGS
187 movi a5, -PAGE_OFFSET + (PAGE_KERNEL | _PAGE_HW_WRITE)
188
189 beqz a6, 1f
190
191 /* Invalidate dcache */
192
193 mov a10, a2
194 call8 __invalidate_dcache_page
195
196 /* Setup a temporary DTLB with a matching color. */
197
198 movi a8, TLBTEMP_BASE_1 # base
199 add a6, a2, a5 # ppn
200 add a2, a8, a4 # add 'color'
201
202 wdtlb a6, a2
203 dsync
204
205 /* Skip setting up a temporary DTLB for destination if not aliased. */
206
2071: beqz a7, 1f
208
209 /* Setup a temporary DTLB with a matching color. */
210
211 movi a8, TLBTEMP_BASE_2 # base
212 add a7, a3, a5 # ppn
213 add a3, a8, a4
214 addi a8, a3, 1 # way1
215
216 wdtlb a7, a8
217 dsync
218
2191: __loopi a2, a4, PAGE_SIZE, 32
220
221 l32i a8, a3, 0
222 l32i a9, a3, 4
223 s32i a8, a2, 0
224 s32i a9, a2, 4
225
226 l32i a8, a3, 8
227 l32i a9, a3, 12
228 s32i a8, a2, 8
229 s32i a9, a2, 12
230
231 l32i a8, a3, 16
232 l32i a9, a3, 20
233 s32i a8, a2, 16
234 s32i a9, a2, 20
235
236 l32i a8, a3, 24
237 l32i a9, a3, 28
238 s32i a8, a2, 24
239 s32i a9, a2, 28
240
241 addi a2, a2, 32
242 addi a3, a3, 32
243
244 __endl a2, a4
245
246 /* We need to invalidate any temporary mapping! */
247
248 bnez a6, 1f
249 bnez a7, 2f
250 retw
251
2521: addi a2, a2, -PAGE_SIZE
253 idtlb a2
254 dsync
255 bnez a7, 2f
256 retw
257
2582: addi a3, a3, -PAGE_SIZE+1
259 idtlb a3
260 dsync
261
262 retw
263
264#endif
265
266#if (DCACHE_WAY_SIZE > PAGE_SIZE)
267
268/*
269 * void __flush_invalidate_dcache_page_alias (addr, phys)
270 * a2 a3
271 */
272
273ENTRY(__flush_invalidate_dcache_page_alias)
274 entry sp, 16
275
276 movi a7, 0 # required for exception handler
277 addi a6, a3, (PAGE_KERNEL | _PAGE_HW_WRITE)
278 mov a4, a2
279 wdtlb a6, a2
280 dsync
281
282 ___flush_invalidate_dcache_page a2 a3
283
284 idtlb a4
285 dsync
286
287 retw
288
289#endif
290
291ENTRY(__tlbtemp_mapping_itlb)
292
293#if (ICACHE_WAY_SIZE > PAGE_SIZE)
294
295ENTRY(__invalidate_icache_page_alias)
296 entry sp, 16
297
298 addi a6, a3, (PAGE_KERNEL | _PAGE_HW_WRITE)
299 mov a4, a2
300 witlb a6, a2
301 isync
302
303 ___invalidate_icache_page a2 a3
304
305 iitlb a4
306 isync
74 retw 307 retw
75 308
309#endif
310
311/* End of special treatment in tlb miss exception */
312
313ENTRY(__tlbtemp_mapping_end)
314
76/* 315/*
77 * void __invalidate_icache_page(ulong start) 316 * void __invalidate_icache_page(ulong start)
78 */ 317 */
@@ -121,8 +360,6 @@ ENTRY(__flush_dcache_page)
121 dsync 360 dsync
122 retw 361 retw
123 362
124
125
126/* 363/*
127 * void __invalidate_icache_range(ulong start, ulong size) 364 * void __invalidate_icache_range(ulong start, ulong size)
128 */ 365 */
@@ -168,7 +405,6 @@ ENTRY(__invalidate_dcache_range)
168 405
169 ___invalidate_dcache_range a2 a3 a4 406 ___invalidate_dcache_range a2 a3 a4
170 407
171
172 retw 408 retw
173 409
174/* 410/*
diff --git a/arch/xtensa/platform-iss/console.c b/arch/xtensa/platform-iss/console.c
index 2f4f20ffe6..854677d0c3 100644
--- a/arch/xtensa/platform-iss/console.c
+++ b/arch/xtensa/platform-iss/console.c
@@ -20,7 +20,6 @@
20#include <linux/param.h> 20#include <linux/param.h>
21#include <linux/serial.h> 21#include <linux/serial.h>
22#include <linux/serialP.h> 22#include <linux/serialP.h>
23#include <linux/console.h>
24 23
25#include <asm/uaccess.h> 24#include <asm/uaccess.h>
26#include <asm/irq.h> 25#include <asm/irq.h>
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index a15845c164..ed39313c40 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1075,12 +1075,6 @@ void blk_queue_end_tag(struct request_queue *q, struct request *rq)
1075 */ 1075 */
1076 return; 1076 return;
1077 1077
1078 if (unlikely(!__test_and_clear_bit(tag, bqt->tag_map))) {
1079 printk(KERN_ERR "%s: attempt to clear non-busy tag (%d)\n",
1080 __FUNCTION__, tag);
1081 return;
1082 }
1083
1084 list_del_init(&rq->queuelist); 1078 list_del_init(&rq->queuelist);
1085 rq->cmd_flags &= ~REQ_QUEUED; 1079 rq->cmd_flags &= ~REQ_QUEUED;
1086 rq->tag = -1; 1080 rq->tag = -1;
@@ -1090,6 +1084,19 @@ void blk_queue_end_tag(struct request_queue *q, struct request *rq)
1090 __FUNCTION__, tag); 1084 __FUNCTION__, tag);
1091 1085
1092 bqt->tag_index[tag] = NULL; 1086 bqt->tag_index[tag] = NULL;
1087
1088 /*
1089 * We use test_and_clear_bit's memory ordering properties here.
1090 * The tag_map bit acts as a lock for tag_index[bit], so we need
1091 * a barrer before clearing the bit (precisely: release semantics).
1092 * Could use clear_bit_unlock when it is merged.
1093 */
1094 if (unlikely(!test_and_clear_bit(tag, bqt->tag_map))) {
1095 printk(KERN_ERR "%s: attempt to clear non-busy tag (%d)\n",
1096 __FUNCTION__, tag);
1097 return;
1098 }
1099
1093 bqt->busy--; 1100 bqt->busy--;
1094} 1101}
1095 1102
@@ -1136,6 +1143,10 @@ int blk_queue_start_tag(struct request_queue *q, struct request *rq)
1136 return 1; 1143 return 1;
1137 1144
1138 } while (test_and_set_bit(tag, bqt->tag_map)); 1145 } while (test_and_set_bit(tag, bqt->tag_map));
1146 /*
1147 * We rely on test_and_set_bit providing lock memory ordering semantics
1148 * (could use test_and_set_bit_lock when it is merged).
1149 */
1139 1150
1140 rq->cmd_flags |= REQ_QUEUED; 1151 rq->cmd_flags |= REQ_QUEUED;
1141 rq->tag = tag; 1152 rq->tag = tag;
diff --git a/crypto/async_tx/async_tx.c b/crypto/async_tx/async_tx.c
index 035007145e..bc18cbb8ea 100644
--- a/crypto/async_tx/async_tx.c
+++ b/crypto/async_tx/async_tx.c
@@ -80,6 +80,7 @@ dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
80{ 80{
81 enum dma_status status; 81 enum dma_status status;
82 struct dma_async_tx_descriptor *iter; 82 struct dma_async_tx_descriptor *iter;
83 struct dma_async_tx_descriptor *parent;
83 84
84 if (!tx) 85 if (!tx)
85 return DMA_SUCCESS; 86 return DMA_SUCCESS;
@@ -87,8 +88,15 @@ dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
87 /* poll through the dependency chain, return when tx is complete */ 88 /* poll through the dependency chain, return when tx is complete */
88 do { 89 do {
89 iter = tx; 90 iter = tx;
90 while (iter->cookie == -EBUSY) 91
91 iter = iter->parent; 92 /* find the root of the unsubmitted dependency chain */
93 while (iter->cookie == -EBUSY) {
94 parent = iter->parent;
95 if (parent && parent->cookie == -EBUSY)
96 iter = iter->parent;
97 else
98 break;
99 }
92 100
93 status = dma_sync_wait(iter->chan, iter->cookie); 101 status = dma_sync_wait(iter->chan, iter->cookie);
94 } while (status == DMA_IN_PROGRESS || (iter != tx)); 102 } while (status == DMA_IN_PROGRESS || (iter != tx));
diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c
index 7755834b88..d8f8ec3202 100644
--- a/crypto/blkcipher.c
+++ b/crypto/blkcipher.c
@@ -59,11 +59,13 @@ static inline void blkcipher_unmap_dst(struct blkcipher_walk *walk)
59 scatterwalk_unmap(walk->dst.virt.addr, 1); 59 scatterwalk_unmap(walk->dst.virt.addr, 1);
60} 60}
61 61
62/* Get a spot of the specified length that does not straddle a page.
63 * The caller needs to ensure that there is enough space for this operation.
64 */
62static inline u8 *blkcipher_get_spot(u8 *start, unsigned int len) 65static inline u8 *blkcipher_get_spot(u8 *start, unsigned int len)
63{ 66{
64 if (offset_in_page(start + len) < len) 67 u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK);
65 return (u8 *)((unsigned long)(start + len) & PAGE_MASK); 68 return start > end_page ? start : end_page;
66 return start;
67} 69}
68 70
69static inline unsigned int blkcipher_done_slow(struct crypto_blkcipher *tfm, 71static inline unsigned int blkcipher_done_slow(struct crypto_blkcipher *tfm,
@@ -155,7 +157,8 @@ static inline int blkcipher_next_slow(struct blkcipher_desc *desc,
155 if (walk->buffer) 157 if (walk->buffer)
156 goto ok; 158 goto ok;
157 159
158 n = bsize * 2 + (alignmask & ~(crypto_tfm_ctx_alignment() - 1)); 160 n = bsize * 3 - (alignmask + 1) +
161 (alignmask & ~(crypto_tfm_ctx_alignment() - 1));
159 walk->buffer = kmalloc(n, GFP_ATOMIC); 162 walk->buffer = kmalloc(n, GFP_ATOMIC);
160 if (!walk->buffer) 163 if (!walk->buffer)
161 return blkcipher_walk_done(desc, walk, -ENOMEM); 164 return blkcipher_walk_done(desc, walk, -ENOMEM);
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index f1372de4ce..4875f0149e 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -68,6 +68,24 @@ config ACPI_PROCFS
68 68
69 Say N to delete /proc/acpi/ files that have moved to /sys/ 69 Say N to delete /proc/acpi/ files that have moved to /sys/
70 70
71config ACPI_PROC_EVENT
72 bool "Deprecated /proc/acpi/event support"
73 depends on PROC_FS
74 default y
75 ---help---
76 A user-space daemon, acpi, typically read /proc/acpi/event
77 and handled all ACPI sub-system generated events.
78
79 These events are now delivered to user-space via
80 either the input layer, or as netlink events.
81
82 This build option enables the old code for legacy
83 user-space implementation. After some time, this will
84 be moved under CONFIG_ACPI_PROCFS, and then deleted.
85
86 Say Y here to retain the old behaviour. Say N if your
87 user-space is newer than kernel 2.6.23 (September 2007).
88
71config ACPI_AC 89config ACPI_AC
72 tristate "AC Adapter" 90 tristate "AC Adapter"
73 depends on X86 91 depends on X86
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index d8b3509352..26d70702b3 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -204,7 +204,10 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
204 case ACPI_NOTIFY_BUS_CHECK: 204 case ACPI_NOTIFY_BUS_CHECK:
205 case ACPI_NOTIFY_DEVICE_CHECK: 205 case ACPI_NOTIFY_DEVICE_CHECK:
206 acpi_ac_get_state(ac); 206 acpi_ac_get_state(ac);
207 acpi_bus_generate_event(device, event, (u32) ac->state); 207 acpi_bus_generate_proc_event(device, event, (u32) ac->state);
208 acpi_bus_generate_netlink_event(device->pnp.device_class,
209 device->dev.bus_id, event,
210 (u32) ac->state);
208 break; 211 break;
209 default: 212 default:
210 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 213 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 86fd142f4b..d915fec9bf 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -1069,7 +1069,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data)
1069 hotk->brightness = (event & ~((u32) BR_DOWN)); 1069 hotk->brightness = (event & ~((u32) BR_DOWN));
1070 } 1070 }
1071 1071
1072 acpi_bus_generate_event(hotk->device, event, 1072 acpi_bus_generate_proc_event(hotk->device, event,
1073 hotk->event_count[event % 128]++); 1073 hotk->event_count[event % 128]++);
1074 1074
1075 return; 1075 return;
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index d7b499fe0c..9b2c0f74f8 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -113,7 +113,7 @@ struct acpi_battery_info {
113 acpi_string oem_info; 113 acpi_string oem_info;
114}; 114};
115 115
116enum acpi_battery_files { 116enum acpi_battery_files{
117 ACPI_BATTERY_INFO = 0, 117 ACPI_BATTERY_INFO = 0,
118 ACPI_BATTERY_STATE, 118 ACPI_BATTERY_STATE,
119 ACPI_BATTERY_ALARM, 119 ACPI_BATTERY_ALARM,
@@ -129,14 +129,13 @@ struct acpi_battery_flags {
129}; 129};
130 130
131struct acpi_battery { 131struct acpi_battery {
132 struct mutex mutex;
132 struct acpi_device *device; 133 struct acpi_device *device;
133 struct acpi_battery_flags flags; 134 struct acpi_battery_flags flags;
134 struct acpi_buffer bif_data; 135 struct acpi_buffer bif_data;
135 struct acpi_buffer bst_data; 136 struct acpi_buffer bst_data;
136 struct mutex lock;
137 unsigned long alarm; 137 unsigned long alarm;
138 unsigned long update_time[ACPI_BATTERY_NUMFILES]; 138 unsigned long update_time[ACPI_BATTERY_NUMFILES];
139
140}; 139};
141 140
142inline int acpi_battery_present(struct acpi_battery *battery) 141inline int acpi_battery_present(struct acpi_battery *battery)
@@ -236,10 +235,10 @@ static int acpi_battery_get_info(struct acpi_battery *battery)
236 return 0; 235 return 0;
237 236
238 /* Evaluate _BIF */ 237 /* Evaluate _BIF */
239 mutex_lock(&battery->lock); 238
240 status = acpi_evaluate_object(acpi_battery_handle(battery), "_BIF", 239 status =
241 NULL, &buffer); 240 acpi_evaluate_object(acpi_battery_handle(battery), "_BIF", NULL,
242 mutex_unlock(&battery->lock); 241 &buffer);
243 if (ACPI_FAILURE(status)) { 242 if (ACPI_FAILURE(status)) {
244 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF")); 243 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF"));
245 return -ENODEV; 244 return -ENODEV;
@@ -286,10 +285,10 @@ static int acpi_battery_get_state(struct acpi_battery *battery)
286 return 0; 285 return 0;
287 286
288 /* Evaluate _BST */ 287 /* Evaluate _BST */
289 mutex_lock(&battery->lock); 288
290 status = acpi_evaluate_object(acpi_battery_handle(battery), "_BST", 289 status =
291 NULL, &buffer); 290 acpi_evaluate_object(acpi_battery_handle(battery), "_BST", NULL,
292 mutex_unlock(&battery->lock); 291 &buffer);
293 if (ACPI_FAILURE(status)) { 292 if (ACPI_FAILURE(status)) {
294 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST")); 293 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST"));
295 return -ENODEV; 294 return -ENODEV;
@@ -337,10 +336,9 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery,
337 336
338 arg0.integer.value = alarm; 337 arg0.integer.value = alarm;
339 338
340 mutex_lock(&battery->lock); 339 status =
341 status = acpi_evaluate_object(acpi_battery_handle(battery), "_BTP", 340 acpi_evaluate_object(acpi_battery_handle(battery), "_BTP",
342 &arg_list, NULL); 341 &arg_list, NULL);
343 mutex_unlock(&battery->lock);
344 if (ACPI_FAILURE(status)) 342 if (ACPI_FAILURE(status))
345 return -ENODEV; 343 return -ENODEV;
346 344
@@ -660,6 +658,8 @@ acpi_battery_write_alarm(struct file *file,
660 if (!battery || (count > sizeof(alarm_string) - 1)) 658 if (!battery || (count > sizeof(alarm_string) - 1))
661 return -EINVAL; 659 return -EINVAL;
662 660
661 mutex_lock(&battery->mutex);
662
663 result = acpi_battery_update(battery, 1, &update_result); 663 result = acpi_battery_update(battery, 1, &update_result);
664 if (result) { 664 if (result) {
665 result = -ENODEV; 665 result = -ENODEV;
@@ -688,7 +688,9 @@ acpi_battery_write_alarm(struct file *file,
688 acpi_battery_check_result(battery, result); 688 acpi_battery_check_result(battery, result);
689 689
690 if (!result) 690 if (!result)
691 return count; 691 result = count;
692
693 mutex_unlock(&battery->mutex);
692 694
693 return result; 695 return result;
694} 696}
@@ -712,6 +714,8 @@ static int acpi_battery_read(int fid, struct seq_file *seq)
712 int update_result = ACPI_BATTERY_NONE_UPDATE; 714 int update_result = ACPI_BATTERY_NONE_UPDATE;
713 int update = 0; 715 int update = 0;
714 716
717 mutex_lock(&battery->mutex);
718
715 update = (get_seconds() - battery->update_time[fid] >= update_time); 719 update = (get_seconds() - battery->update_time[fid] >= update_time);
716 update = (update | battery->flags.update[fid]); 720 update = (update | battery->flags.update[fid]);
717 721
@@ -729,6 +733,7 @@ static int acpi_battery_read(int fid, struct seq_file *seq)
729 result = acpi_read_funcs[fid].print(seq, result); 733 result = acpi_read_funcs[fid].print(seq, result);
730 acpi_battery_check_result(battery, result); 734 acpi_battery_check_result(battery, result);
731 battery->flags.update[fid] = result; 735 battery->flags.update[fid] = result;
736 mutex_unlock(&battery->mutex);
732 return result; 737 return result;
733} 738}
734 739
@@ -867,8 +872,11 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
867 case ACPI_NOTIFY_DEVICE_CHECK: 872 case ACPI_NOTIFY_DEVICE_CHECK:
868 device = battery->device; 873 device = battery->device;
869 acpi_battery_notify_update(battery); 874 acpi_battery_notify_update(battery);
870 acpi_bus_generate_event(device, event, 875 acpi_bus_generate_proc_event(device, event,
871 acpi_battery_present(battery)); 876 acpi_battery_present(battery));
877 acpi_bus_generate_netlink_event(device->pnp.device_class,
878 device->dev.bus_id, event,
879 acpi_battery_present(battery));
872 break; 880 break;
873 default: 881 default:
874 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 882 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
@@ -892,7 +900,10 @@ static int acpi_battery_add(struct acpi_device *device)
892 if (!battery) 900 if (!battery)
893 return -ENOMEM; 901 return -ENOMEM;
894 902
895 mutex_init(&battery->lock); 903 mutex_init(&battery->mutex);
904
905 mutex_lock(&battery->mutex);
906
896 battery->device = device; 907 battery->device = device;
897 strcpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME); 908 strcpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME);
898 strcpy(acpi_device_class(device), ACPI_BATTERY_CLASS); 909 strcpy(acpi_device_class(device), ACPI_BATTERY_CLASS);
@@ -928,6 +939,7 @@ static int acpi_battery_add(struct acpi_device *device)
928 kfree(battery); 939 kfree(battery);
929 } 940 }
930 941
942 mutex_unlock(&battery->mutex);
931 943
932 return result; 944 return result;
933} 945}
@@ -942,6 +954,8 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
942 954
943 battery = acpi_driver_data(device); 955 battery = acpi_driver_data(device);
944 956
957 mutex_lock(&battery->mutex);
958
945 status = acpi_remove_notify_handler(device->handle, 959 status = acpi_remove_notify_handler(device->handle,
946 ACPI_ALL_NOTIFY, 960 ACPI_ALL_NOTIFY,
947 acpi_battery_notify); 961 acpi_battery_notify);
@@ -952,7 +966,9 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
952 966
953 kfree(battery->bst_data.pointer); 967 kfree(battery->bst_data.pointer);
954 968
955 mutex_destroy(&battery->lock); 969 mutex_unlock(&battery->mutex);
970
971 mutex_destroy(&battery->mutex);
956 972
957 kfree(battery); 973 kfree(battery);
958 974
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 6b2658c962..9ba778a2b4 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -276,6 +276,7 @@ EXPORT_SYMBOL(acpi_bus_set_power);
276 Event Management 276 Event Management
277 -------------------------------------------------------------------------- */ 277 -------------------------------------------------------------------------- */
278 278
279#ifdef CONFIG_ACPI_PROC_EVENT
279static DEFINE_SPINLOCK(acpi_bus_event_lock); 280static DEFINE_SPINLOCK(acpi_bus_event_lock);
280 281
281LIST_HEAD(acpi_bus_event_list); 282LIST_HEAD(acpi_bus_event_list);
@@ -283,7 +284,7 @@ DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue);
283 284
284extern int event_is_open; 285extern int event_is_open;
285 286
286int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data) 287int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data)
287{ 288{
288 struct acpi_bus_event *event = NULL; 289 struct acpi_bus_event *event = NULL;
289 unsigned long flags = 0; 290 unsigned long flags = 0;
@@ -292,10 +293,6 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
292 if (!device) 293 if (!device)
293 return -EINVAL; 294 return -EINVAL;
294 295
295 if (acpi_bus_generate_genetlink_event(device, type, data))
296 printk(KERN_WARNING PREFIX
297 "Failed to generate an ACPI event via genetlink!\n");
298
299 /* drop event on the floor if no one's listening */ 296 /* drop event on the floor if no one's listening */
300 if (!event_is_open) 297 if (!event_is_open)
301 return 0; 298 return 0;
@@ -318,7 +315,7 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
318 return 0; 315 return 0;
319} 316}
320 317
321EXPORT_SYMBOL(acpi_bus_generate_event); 318EXPORT_SYMBOL(acpi_bus_generate_proc_event);
322 319
323int acpi_bus_receive_event(struct acpi_bus_event *event) 320int acpi_bus_receive_event(struct acpi_bus_event *event)
324{ 321{
@@ -364,6 +361,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
364} 361}
365 362
366EXPORT_SYMBOL(acpi_bus_receive_event); 363EXPORT_SYMBOL(acpi_bus_receive_event);
364#endif /* CONFIG_ACPI_PROC_EVENT */
367 365
368/* -------------------------------------------------------------------------- 366/* --------------------------------------------------------------------------
369 Notification Handling 367 Notification Handling
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 540581338e..2e79a3395e 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -284,7 +284,7 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
284 } 284 }
285 input_sync(input); 285 input_sync(input);
286 286
287 acpi_bus_generate_event(button->device, event, 287 acpi_bus_generate_proc_event(button->device, event,
288 ++button->pushed); 288 ++button->pushed);
289 break; 289 break;
290 default: 290 default:
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 56bee9e065..3f7935ab0c 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -696,14 +696,6 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
696 return AE_CTRL_TERMINATE; 696 return AE_CTRL_TERMINATE;
697} 697}
698 698
699static void ec_remove_handlers(struct acpi_ec *ec)
700{
701 acpi_remove_address_space_handler(ec->handle,
702 ACPI_ADR_SPACE_EC,
703 &acpi_ec_space_handler);
704 acpi_remove_gpe_handler(NULL, ec->gpe, &acpi_ec_gpe_handler);
705}
706
707static int acpi_ec_add(struct acpi_device *device) 699static int acpi_ec_add(struct acpi_device *device)
708{ 700{
709 struct acpi_ec *ec = NULL; 701 struct acpi_ec *ec = NULL;
@@ -727,13 +719,16 @@ static int acpi_ec_add(struct acpi_device *device)
727 /* Check if we found the boot EC */ 719 /* Check if we found the boot EC */
728 if (boot_ec) { 720 if (boot_ec) {
729 if (boot_ec->gpe == ec->gpe) { 721 if (boot_ec->gpe == ec->gpe) {
730 ec_remove_handlers(boot_ec); 722 /* We might have incorrect info for GL at boot time */
731 mutex_destroy(&boot_ec->lock); 723 mutex_lock(&boot_ec->lock);
732 kfree(boot_ec); 724 boot_ec->global_lock = ec->global_lock;
733 first_ec = boot_ec = NULL; 725 /* Copy handlers from new ec into boot ec */
726 list_splice(&ec->list, &boot_ec->list);
727 mutex_unlock(&boot_ec->lock);
728 kfree(ec);
729 ec = boot_ec;
734 } 730 }
735 } 731 } else
736 if (!first_ec)
737 first_ec = ec; 732 first_ec = ec;
738 ec->handle = device->handle; 733 ec->handle = device->handle;
739 acpi_driver_data(device) = ec; 734 acpi_driver_data(device) = ec;
@@ -762,6 +757,9 @@ static int acpi_ec_remove(struct acpi_device *device, int type)
762 if (ec == first_ec) 757 if (ec == first_ec)
763 first_ec = NULL; 758 first_ec = NULL;
764 759
760 /* Don't touch boot EC */
761 if (boot_ec != ec)
762 kfree(ec);
765 return 0; 763 return 0;
766} 764}
767 765
@@ -825,7 +823,9 @@ static int acpi_ec_start(struct acpi_device *device)
825 if (!ec) 823 if (!ec)
826 return -EINVAL; 824 return -EINVAL;
827 825
828 ret = ec_install_handlers(ec); 826 /* Boot EC is already working */
827 if (ec != boot_ec)
828 ret = ec_install_handlers(ec);
829 829
830 /* EC is fully operational, allow queries */ 830 /* EC is fully operational, allow queries */
831 atomic_set(&ec->query_pending, 0); 831 atomic_set(&ec->query_pending, 0);
@@ -835,6 +835,7 @@ static int acpi_ec_start(struct acpi_device *device)
835 835
836static int acpi_ec_stop(struct acpi_device *device, int type) 836static int acpi_ec_stop(struct acpi_device *device, int type)
837{ 837{
838 acpi_status status;
838 struct acpi_ec *ec; 839 struct acpi_ec *ec;
839 840
840 if (!device) 841 if (!device)
@@ -843,7 +844,21 @@ static int acpi_ec_stop(struct acpi_device *device, int type)
843 ec = acpi_driver_data(device); 844 ec = acpi_driver_data(device);
844 if (!ec) 845 if (!ec)
845 return -EINVAL; 846 return -EINVAL;
846 ec_remove_handlers(ec); 847
848 /* Don't touch boot EC */
849 if (ec == boot_ec)
850 return 0;
851
852 status = acpi_remove_address_space_handler(ec->handle,
853 ACPI_ADR_SPACE_EC,
854 &acpi_ec_space_handler);
855 if (ACPI_FAILURE(status))
856 return -ENODEV;
857
858 status = acpi_remove_gpe_handler(NULL, ec->gpe, &acpi_ec_gpe_handler);
859 if (ACPI_FAILURE(status))
860 return -ENODEV;
861
847 return 0; 862 return 0;
848} 863}
849 864
@@ -871,7 +886,8 @@ int __init acpi_ec_ecdt_probe(void)
871 printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n"); 886 printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
872 status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device, 887 status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
873 boot_ec, NULL); 888 boot_ec, NULL);
874 if (ACPI_FAILURE(status)) 889 /* Check that acpi_get_devices actually find something */
890 if (ACPI_FAILURE(status) || !boot_ec->handle)
875 goto error; 891 goto error;
876 } 892 }
877 893
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
index 95637a4ff7..5c95863f8f 100644
--- a/drivers/acpi/event.c
+++ b/drivers/acpi/event.c
@@ -17,6 +17,7 @@
17#define _COMPONENT ACPI_SYSTEM_COMPONENT 17#define _COMPONENT ACPI_SYSTEM_COMPONENT
18ACPI_MODULE_NAME("event"); 18ACPI_MODULE_NAME("event");
19 19
20#ifdef CONFIG_ACPI_PROC_EVENT
20/* Global vars for handling event proc entry */ 21/* Global vars for handling event proc entry */
21static DEFINE_SPINLOCK(acpi_system_event_lock); 22static DEFINE_SPINLOCK(acpi_system_event_lock);
22int event_is_open = 0; 23int event_is_open = 0;
@@ -106,6 +107,7 @@ static const struct file_operations acpi_system_event_ops = {
106 .release = acpi_system_close_event, 107 .release = acpi_system_close_event,
107 .poll = acpi_system_poll_event, 108 .poll = acpi_system_poll_event,
108}; 109};
110#endif /* CONFIG_ACPI_PROC_EVENT */
109 111
110#ifdef CONFIG_NET 112#ifdef CONFIG_NET
111static unsigned int acpi_event_seqnum; 113static unsigned int acpi_event_seqnum;
@@ -147,7 +149,8 @@ static struct genl_multicast_group acpi_event_mcgrp = {
147 .name = ACPI_GENL_MCAST_GROUP_NAME, 149 .name = ACPI_GENL_MCAST_GROUP_NAME,
148}; 150};
149 151
150int acpi_bus_generate_genetlink_event(struct acpi_device *device, 152int acpi_bus_generate_netlink_event(const char *device_class,
153 const char *bus_id,
151 u8 type, int data) 154 u8 type, int data)
152{ 155{
153 struct sk_buff *skb; 156 struct sk_buff *skb;
@@ -191,8 +194,8 @@ int acpi_bus_generate_genetlink_event(struct acpi_device *device,
191 194
192 memset(event, 0, sizeof(struct acpi_genl_event)); 195 memset(event, 0, sizeof(struct acpi_genl_event));
193 196
194 strcpy(event->device_class, device->pnp.device_class); 197 strcpy(event->device_class, device_class);
195 strcpy(event->bus_id, device->dev.bus_id); 198 strcpy(event->bus_id, bus_id);
196 event->type = type; 199 event->type = type;
197 event->data = data; 200 event->data = data;
198 201
@@ -211,6 +214,8 @@ int acpi_bus_generate_genetlink_event(struct acpi_device *device,
211 return 0; 214 return 0;
212} 215}
213 216
217EXPORT_SYMBOL(acpi_bus_generate_netlink_event);
218
214static int acpi_event_genetlink_init(void) 219static int acpi_event_genetlink_init(void)
215{ 220{
216 int result; 221 int result;
@@ -228,12 +233,15 @@ static int acpi_event_genetlink_init(void)
228} 233}
229 234
230#else 235#else
231int acpi_bus_generate_genetlink_event(struct acpi_device *device, u8 type, 236int acpi_bus_generate_netlink_event(const char *device_class,
232 int data) 237 const char *bus_id,
238 u8 type, int data)
233{ 239{
234 return 0; 240 return 0;
235} 241}
236 242
243EXPORT_SYMBOL(acpi_bus_generate_netlink_event);
244
237static int acpi_event_genetlink_init(void) 245static int acpi_event_genetlink_init(void)
238{ 246{
239 return -ENODEV; 247 return -ENODEV;
@@ -242,7 +250,9 @@ static int acpi_event_genetlink_init(void)
242 250
243static int __init acpi_event_init(void) 251static int __init acpi_event_init(void)
244{ 252{
253#ifdef CONFIG_ACPI_PROC_EVENT
245 struct proc_dir_entry *entry; 254 struct proc_dir_entry *entry;
255#endif
246 int error = 0; 256 int error = 0;
247 257
248 if (acpi_disabled) 258 if (acpi_disabled)
@@ -254,12 +264,14 @@ static int __init acpi_event_init(void)
254 printk(KERN_WARNING PREFIX 264 printk(KERN_WARNING PREFIX
255 "Failed to create genetlink family for ACPI event\n"); 265 "Failed to create genetlink family for ACPI event\n");
256 266
267#ifdef CONFIG_ACPI_PROC_EVENT
257 /* 'event' [R] */ 268 /* 'event' [R] */
258 entry = create_proc_entry("event", S_IRUSR, acpi_root_dir); 269 entry = create_proc_entry("event", S_IRUSR, acpi_root_dir);
259 if (entry) 270 if (entry)
260 entry->proc_fops = &acpi_system_event_ops; 271 entry->proc_fops = &acpi_system_event_ops;
261 else 272 else
262 return -ENODEV; 273 return -ENODEV;
274#endif
263 275
264 return 0; 276 return 0;
265} 277}
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c
index 76c525dc59..cf69c0040a 100644
--- a/drivers/acpi/hardware/hwsleep.c
+++ b/drivers/acpi/hardware/hwsleep.c
@@ -576,13 +576,10 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
576 ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS")); 576 ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS"));
577 } 577 }
578 578
579 status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL);
580 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
581 ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK"));
582 }
583 /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
584
585 /* 579 /*
580 * GPEs must be enabled before _WAK is called as GPEs
581 * might get fired there
582 *
586 * Restore the GPEs: 583 * Restore the GPEs:
587 * 1) Disable/Clear all GPEs 584 * 1) Disable/Clear all GPEs
588 * 2) Enable all runtime GPEs 585 * 2) Enable all runtime GPEs
@@ -591,13 +588,19 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
591 if (ACPI_FAILURE(status)) { 588 if (ACPI_FAILURE(status)) {
592 return_ACPI_STATUS(status); 589 return_ACPI_STATUS(status);
593 } 590 }
594 acpi_gbl_system_awake_and_running = TRUE;
595
596 status = acpi_hw_enable_all_runtime_gpes(); 591 status = acpi_hw_enable_all_runtime_gpes();
597 if (ACPI_FAILURE(status)) { 592 if (ACPI_FAILURE(status)) {
598 return_ACPI_STATUS(status); 593 return_ACPI_STATUS(status);
599 } 594 }
600 595
596 status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL);
597 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
598 ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK"));
599 }
600 /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
601
602 acpi_gbl_system_awake_and_running = TRUE;
603
601 /* Enable power button */ 604 /* Enable power button */
602 605
603 (void) 606 (void)
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
index ab65b2c256..f39fbc6b92 100644
--- a/drivers/acpi/namespace/nsxfeval.c
+++ b/drivers/acpi/namespace/nsxfeval.c
@@ -540,7 +540,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
540 ******************************************************************************/ 540 ******************************************************************************/
541 541
542acpi_status 542acpi_status
543acpi_get_devices(char *HID, 543acpi_get_devices(const char *HID,
544 acpi_walk_callback user_function, 544 acpi_walk_callback user_function,
545 void *context, void **return_value) 545 void *context, void **return_value)
546{ 546{
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 498422343f..9f11dc296c 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -102,6 +102,8 @@ static struct acpi_driver acpi_processor_driver = {
102 .add = acpi_processor_add, 102 .add = acpi_processor_add,
103 .remove = acpi_processor_remove, 103 .remove = acpi_processor_remove,
104 .start = acpi_processor_start, 104 .start = acpi_processor_start,
105 .suspend = acpi_processor_suspend,
106 .resume = acpi_processor_resume,
105 }, 107 },
106}; 108};
107 109
@@ -698,16 +700,23 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
698 switch (event) { 700 switch (event) {
699 case ACPI_PROCESSOR_NOTIFY_PERFORMANCE: 701 case ACPI_PROCESSOR_NOTIFY_PERFORMANCE:
700 acpi_processor_ppc_has_changed(pr); 702 acpi_processor_ppc_has_changed(pr);
701 acpi_bus_generate_event(device, event, 703 acpi_bus_generate_proc_event(device, event,
702 pr->performance_platform_limit); 704 pr->performance_platform_limit);
705 acpi_bus_generate_netlink_event(device->pnp.device_class,
706 device->dev.bus_id, event,
707 pr->performance_platform_limit);
703 break; 708 break;
704 case ACPI_PROCESSOR_NOTIFY_POWER: 709 case ACPI_PROCESSOR_NOTIFY_POWER:
705 acpi_processor_cst_has_changed(pr); 710 acpi_processor_cst_has_changed(pr);
706 acpi_bus_generate_event(device, event, 0); 711 acpi_bus_generate_proc_event(device, event, 0);
712 acpi_bus_generate_netlink_event(device->pnp.device_class,
713 device->dev.bus_id, event, 0);
707 break; 714 break;
708 case ACPI_PROCESSOR_NOTIFY_THROTTLING: 715 case ACPI_PROCESSOR_NOTIFY_THROTTLING:
709 acpi_processor_tstate_has_changed(pr); 716 acpi_processor_tstate_has_changed(pr);
710 acpi_bus_generate_event(device, event, 0); 717 acpi_bus_generate_proc_event(device, event, 0);
718 acpi_bus_generate_netlink_event(device->pnp.device_class,
719 device->dev.bus_id, event, 0);
711 default: 720 default:
712 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 721 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
713 "Unsupported event [0x%x]\n", event)); 722 "Unsupported event [0x%x]\n", event));
@@ -717,6 +726,25 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
717 return; 726 return;
718} 727}
719 728
729static int acpi_cpu_soft_notify(struct notifier_block *nfb,
730 unsigned long action, void *hcpu)
731{
732 unsigned int cpu = (unsigned long)hcpu;
733 struct acpi_processor *pr = processors[cpu];
734
735 if (action == CPU_ONLINE && pr) {
736 acpi_processor_ppc_has_changed(pr);
737 acpi_processor_cst_has_changed(pr);
738 acpi_processor_tstate_has_changed(pr);
739 }
740 return NOTIFY_OK;
741}
742
743static struct notifier_block acpi_cpu_notifier =
744{
745 .notifier_call = acpi_cpu_soft_notify,
746};
747
720static int acpi_processor_add(struct acpi_device *device) 748static int acpi_processor_add(struct acpi_device *device)
721{ 749{
722 struct acpi_processor *pr = NULL; 750 struct acpi_processor *pr = NULL;
@@ -980,6 +1008,7 @@ void acpi_processor_install_hotplug_notify(void)
980 ACPI_UINT32_MAX, 1008 ACPI_UINT32_MAX,
981 processor_walk_namespace_cb, &action, NULL); 1009 processor_walk_namespace_cb, &action, NULL);
982#endif 1010#endif
1011 register_hotcpu_notifier(&acpi_cpu_notifier);
983} 1012}
984 1013
985static 1014static
@@ -992,6 +1021,7 @@ void acpi_processor_uninstall_hotplug_notify(void)
992 ACPI_UINT32_MAX, 1021 ACPI_UINT32_MAX,
993 processor_walk_namespace_cb, &action, NULL); 1022 processor_walk_namespace_cb, &action, NULL);
994#endif 1023#endif
1024 unregister_hotcpu_notifier(&acpi_cpu_notifier);
995} 1025}
996 1026
997/* 1027/*
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index a8634a0655..f18261368e 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -63,6 +63,7 @@
63ACPI_MODULE_NAME("processor_idle"); 63ACPI_MODULE_NAME("processor_idle");
64#define ACPI_PROCESSOR_FILE_POWER "power" 64#define ACPI_PROCESSOR_FILE_POWER "power"
65#define US_TO_PM_TIMER_TICKS(t) ((t * (PM_TIMER_FREQUENCY/1000)) / 1000) 65#define US_TO_PM_TIMER_TICKS(t) ((t * (PM_TIMER_FREQUENCY/1000)) / 1000)
66#define PM_TIMER_TICK_NS (1000000000ULL/PM_TIMER_FREQUENCY)
66#define C2_OVERHEAD 4 /* 1us (3.579 ticks per us) */ 67#define C2_OVERHEAD 4 /* 1us (3.579 ticks per us) */
67#define C3_OVERHEAD 4 /* 1us (3.579 ticks per us) */ 68#define C3_OVERHEAD 4 /* 1us (3.579 ticks per us) */
68static void (*pm_idle_save) (void) __read_mostly; 69static void (*pm_idle_save) (void) __read_mostly;
@@ -324,6 +325,23 @@ static void acpi_state_timer_broadcast(struct acpi_processor *pr,
324 325
325#endif 326#endif
326 327
328/*
329 * Suspend / resume control
330 */
331static int acpi_idle_suspend;
332
333int acpi_processor_suspend(struct acpi_device * device, pm_message_t state)
334{
335 acpi_idle_suspend = 1;
336 return 0;
337}
338
339int acpi_processor_resume(struct acpi_device * device)
340{
341 acpi_idle_suspend = 0;
342 return 0;
343}
344
327static void acpi_processor_idle(void) 345static void acpi_processor_idle(void)
328{ 346{
329 struct acpi_processor *pr = NULL; 347 struct acpi_processor *pr = NULL;
@@ -354,7 +372,7 @@ static void acpi_processor_idle(void)
354 } 372 }
355 373
356 cx = pr->power.state; 374 cx = pr->power.state;
357 if (!cx) { 375 if (!cx || acpi_idle_suspend) {
358 if (pm_idle_save) 376 if (pm_idle_save)
359 pm_idle_save(); 377 pm_idle_save();
360 else 378 else
@@ -462,6 +480,9 @@ static void acpi_processor_idle(void)
462 * TBD: Can't get time duration while in C1, as resumes 480 * TBD: Can't get time duration while in C1, as resumes
463 * go to an ISR rather than here. Need to instrument 481 * go to an ISR rather than here. Need to instrument
464 * base interrupt handler. 482 * base interrupt handler.
483 *
484 * Note: the TSC better not stop in C1, sched_clock() will
485 * skew otherwise.
465 */ 486 */
466 sleep_ticks = 0xFFFFFFFF; 487 sleep_ticks = 0xFFFFFFFF;
467 break; 488 break;
@@ -469,6 +490,8 @@ static void acpi_processor_idle(void)
469 case ACPI_STATE_C2: 490 case ACPI_STATE_C2:
470 /* Get start time (ticks) */ 491 /* Get start time (ticks) */
471 t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); 492 t1 = inl(acpi_gbl_FADT.xpm_timer_block.address);
493 /* Tell the scheduler that we are going deep-idle: */
494 sched_clock_idle_sleep_event();
472 /* Invoke C2 */ 495 /* Invoke C2 */
473 acpi_state_timer_broadcast(pr, cx, 1); 496 acpi_state_timer_broadcast(pr, cx, 1);
474 acpi_cstate_enter(cx); 497 acpi_cstate_enter(cx);
@@ -479,17 +502,22 @@ static void acpi_processor_idle(void)
479 /* TSC halts in C2, so notify users */ 502 /* TSC halts in C2, so notify users */
480 mark_tsc_unstable("possible TSC halt in C2"); 503 mark_tsc_unstable("possible TSC halt in C2");
481#endif 504#endif
505 /* Compute time (ticks) that we were actually asleep */
506 sleep_ticks = ticks_elapsed(t1, t2);
507
508 /* Tell the scheduler how much we idled: */
509 sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS);
510
482 /* Re-enable interrupts */ 511 /* Re-enable interrupts */
483 local_irq_enable(); 512 local_irq_enable();
513 /* Do not account our idle-switching overhead: */
514 sleep_ticks -= cx->latency_ticks + C2_OVERHEAD;
515
484 current_thread_info()->status |= TS_POLLING; 516 current_thread_info()->status |= TS_POLLING;
485 /* Compute time (ticks) that we were actually asleep */
486 sleep_ticks =
487 ticks_elapsed(t1, t2) - cx->latency_ticks - C2_OVERHEAD;
488 acpi_state_timer_broadcast(pr, cx, 0); 517 acpi_state_timer_broadcast(pr, cx, 0);
489 break; 518 break;
490 519
491 case ACPI_STATE_C3: 520 case ACPI_STATE_C3:
492
493 /* 521 /*
494 * disable bus master 522 * disable bus master
495 * bm_check implies we need ARB_DIS 523 * bm_check implies we need ARB_DIS
@@ -518,6 +546,8 @@ static void acpi_processor_idle(void)
518 t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); 546 t1 = inl(acpi_gbl_FADT.xpm_timer_block.address);
519 /* Invoke C3 */ 547 /* Invoke C3 */
520 acpi_state_timer_broadcast(pr, cx, 1); 548 acpi_state_timer_broadcast(pr, cx, 1);
549 /* Tell the scheduler that we are going deep-idle: */
550 sched_clock_idle_sleep_event();
521 acpi_cstate_enter(cx); 551 acpi_cstate_enter(cx);
522 /* Get end time (ticks) */ 552 /* Get end time (ticks) */
523 t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); 553 t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);
@@ -531,12 +561,17 @@ static void acpi_processor_idle(void)
531 /* TSC halts in C3, so notify users */ 561 /* TSC halts in C3, so notify users */
532 mark_tsc_unstable("TSC halts in C3"); 562 mark_tsc_unstable("TSC halts in C3");
533#endif 563#endif
564 /* Compute time (ticks) that we were actually asleep */
565 sleep_ticks = ticks_elapsed(t1, t2);
566 /* Tell the scheduler how much we idled: */
567 sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS);
568
534 /* Re-enable interrupts */ 569 /* Re-enable interrupts */
535 local_irq_enable(); 570 local_irq_enable();
571 /* Do not account our idle-switching overhead: */
572 sleep_ticks -= cx->latency_ticks + C3_OVERHEAD;
573
536 current_thread_info()->status |= TS_POLLING; 574 current_thread_info()->status |= TS_POLLING;
537 /* Compute time (ticks) that we were actually asleep */
538 sleep_ticks =
539 ticks_elapsed(t1, t2) - cx->latency_ticks - C3_OVERHEAD;
540 acpi_state_timer_broadcast(pr, cx, 0); 575 acpi_state_timer_broadcast(pr, cx, 0);
541 break; 576 break;
542 577
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 82c3a55001..a578986e32 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -440,11 +440,12 @@ static int acpi_sbs_generate_event(struct acpi_device *device,
440 strcpy(acpi_device_bid(device), bid); 440 strcpy(acpi_device_bid(device), bid);
441 strcpy(acpi_device_class(device), class); 441 strcpy(acpi_device_class(device), class);
442 442
443 result = acpi_bus_generate_event(device, event, state); 443 result = acpi_bus_generate_proc_event(device, event, state);
444 444
445 strcpy(acpi_device_bid(device), bid_saved); 445 strcpy(acpi_device_bid(device), bid_saved);
446 strcpy(acpi_device_class(device), class_saved); 446 strcpy(acpi_device_class(device), class_saved);
447 447
448 acpi_bus_generate_netlink_event(class, bid, event, state);
448 return result; 449 return result;
449} 450}
450 451
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index be74347d13..64620d6687 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -35,8 +35,9 @@ struct acpi_device_bus_id{
35 * e.g. on a device with hid:IBM0001 and cid:ACPI0001 you get: 35 * e.g. on a device with hid:IBM0001 and cid:ACPI0001 you get:
36 * char *modalias: "acpi:IBM0001:ACPI0001" 36 * char *modalias: "acpi:IBM0001:ACPI0001"
37*/ 37*/
38int create_modalias(struct acpi_device *acpi_dev, char *modalias, int size){ 38static int create_modalias(struct acpi_device *acpi_dev, char *modalias,
39 39 int size)
40{
40 int len; 41 int len;
41 42
42 if (!acpi_dev->flags.hardware_id) 43 if (!acpi_dev->flags.hardware_id)
diff --git a/drivers/acpi/sleep/Makefile b/drivers/acpi/sleep/Makefile
index 195a4f69c0..f1fb888c2d 100644
--- a/drivers/acpi/sleep/Makefile
+++ b/drivers/acpi/sleep/Makefile
@@ -1,5 +1,5 @@
1obj-y := poweroff.o wakeup.o 1obj-y := wakeup.o
2obj-$(CONFIG_ACPI_SLEEP) += main.o 2obj-y += main.o
3obj-$(CONFIG_ACPI_SLEEP) += proc.o 3obj-$(CONFIG_ACPI_SLEEP) += proc.o
4 4
5EXTRA_CFLAGS += $(ACPI_CFLAGS) 5EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index e8cff5dd4c..2cbb9aabd0 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -15,13 +15,39 @@
15#include <linux/dmi.h> 15#include <linux/dmi.h>
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/suspend.h> 17#include <linux/suspend.h>
18
19#include <asm/io.h>
20
18#include <acpi/acpi_bus.h> 21#include <acpi/acpi_bus.h>
19#include <acpi/acpi_drivers.h> 22#include <acpi/acpi_drivers.h>
20#include "sleep.h" 23#include "sleep.h"
21 24
22u8 sleep_states[ACPI_S_STATE_COUNT]; 25u8 sleep_states[ACPI_S_STATE_COUNT];
23 26
27#ifdef CONFIG_PM_SLEEP
24static u32 acpi_target_sleep_state = ACPI_STATE_S0; 28static u32 acpi_target_sleep_state = ACPI_STATE_S0;
29#endif
30
31int acpi_sleep_prepare(u32 acpi_state)
32{
33#ifdef CONFIG_ACPI_SLEEP
34 /* do we have a wakeup address for S2 and S3? */
35 if (acpi_state == ACPI_STATE_S3) {
36 if (!acpi_wakeup_address) {
37 return -EFAULT;
38 }
39 acpi_set_firmware_waking_vector((acpi_physical_address)
40 virt_to_phys((void *)
41 acpi_wakeup_address));
42
43 }
44 ACPI_FLUSH_CPU_CACHE();
45 acpi_enable_wakeup_device_prep(acpi_state);
46#endif
47 acpi_gpe_sleep_prepare(acpi_state);
48 acpi_enter_sleep_state_prep(acpi_state);
49 return 0;
50}
25 51
26#ifdef CONFIG_SUSPEND 52#ifdef CONFIG_SUSPEND
27static struct pm_ops acpi_pm_ops; 53static struct pm_ops acpi_pm_ops;
@@ -275,6 +301,7 @@ int acpi_suspend(u32 acpi_state)
275 return -EINVAL; 301 return -EINVAL;
276} 302}
277 303
304#ifdef CONFIG_PM_SLEEP
278/** 305/**
279 * acpi_pm_device_sleep_state - return preferred power state of ACPI device 306 * acpi_pm_device_sleep_state - return preferred power state of ACPI device
280 * in the system sleep state given by %acpi_target_sleep_state 307 * in the system sleep state given by %acpi_target_sleep_state
@@ -305,7 +332,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p)
305 unsigned long d_min, d_max; 332 unsigned long d_min, d_max;
306 333
307 if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) { 334 if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) {
308 printk(KERN_ERR "ACPI handle has no context!\n"); 335 printk(KERN_DEBUG "ACPI handle has no context!\n");
309 return -ENODEV; 336 return -ENODEV;
310 } 337 }
311 338
@@ -349,6 +376,21 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p)
349 *d_min_p = d_min; 376 *d_min_p = d_min;
350 return d_max; 377 return d_max;
351} 378}
379#endif
380
381static void acpi_power_off_prepare(void)
382{
383 /* Prepare to power off the system */
384 acpi_sleep_prepare(ACPI_STATE_S5);
385}
386
387static void acpi_power_off(void)
388{
389 /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
390 printk("%s called\n", __FUNCTION__);
391 local_irq_disable();
392 acpi_enter_sleep_state(ACPI_STATE_S5);
393}
352 394
353int __init acpi_sleep_init(void) 395int __init acpi_sleep_init(void)
354{ 396{
@@ -363,16 +405,17 @@ int __init acpi_sleep_init(void)
363 if (acpi_disabled) 405 if (acpi_disabled)
364 return 0; 406 return 0;
365 407
408 sleep_states[ACPI_STATE_S0] = 1;
409 printk(KERN_INFO PREFIX "(supports S0");
410
366#ifdef CONFIG_SUSPEND 411#ifdef CONFIG_SUSPEND
367 printk(KERN_INFO PREFIX "(supports"); 412 for (i = ACPI_STATE_S1; i < ACPI_STATE_S4; i++) {
368 for (i = ACPI_STATE_S0; i < ACPI_STATE_S4; i++) {
369 status = acpi_get_sleep_type_data(i, &type_a, &type_b); 413 status = acpi_get_sleep_type_data(i, &type_a, &type_b);
370 if (ACPI_SUCCESS(status)) { 414 if (ACPI_SUCCESS(status)) {
371 sleep_states[i] = 1; 415 sleep_states[i] = 1;
372 printk(" S%d", i); 416 printk(" S%d", i);
373 } 417 }
374 } 418 }
375 printk(")\n");
376 419
377 pm_set_ops(&acpi_pm_ops); 420 pm_set_ops(&acpi_pm_ops);
378#endif 421#endif
@@ -382,10 +425,16 @@ int __init acpi_sleep_init(void)
382 if (ACPI_SUCCESS(status)) { 425 if (ACPI_SUCCESS(status)) {
383 hibernation_set_ops(&acpi_hibernation_ops); 426 hibernation_set_ops(&acpi_hibernation_ops);
384 sleep_states[ACPI_STATE_S4] = 1; 427 sleep_states[ACPI_STATE_S4] = 1;
428 printk(" S4");
385 } 429 }
386#else
387 sleep_states[ACPI_STATE_S4] = 0;
388#endif 430#endif
389 431 status = acpi_get_sleep_type_data(ACPI_STATE_S5, &type_a, &type_b);
432 if (ACPI_SUCCESS(status)) {
433 sleep_states[ACPI_STATE_S5] = 1;
434 printk(" S5");
435 pm_power_off_prepare = acpi_power_off_prepare;
436 pm_power_off = acpi_power_off;
437 }
438 printk(")\n");
390 return 0; 439 return 0;
391} 440}
diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c
deleted file mode 100644
index 39e40d56b0..0000000000
--- a/drivers/acpi/sleep/poweroff.c
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * poweroff.c - ACPI handler for powering off the system.
3 *
4 * AKA S5, but it is independent of whether or not the kernel supports
5 * any other sleep support in the system.
6 *
7 * Copyright (c) 2005 Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
8 *
9 * This file is released under the GPLv2.
10 */
11
12#include <linux/pm.h>
13#include <linux/init.h>
14#include <acpi/acpi_bus.h>
15#include <linux/sysdev.h>
16#include <asm/io.h>
17#include "sleep.h"
18
19int acpi_sleep_prepare(u32 acpi_state)
20{
21#ifdef CONFIG_ACPI_SLEEP
22 /* do we have a wakeup address for S2 and S3? */
23 if (acpi_state == ACPI_STATE_S3) {
24 if (!acpi_wakeup_address) {
25 return -EFAULT;
26 }
27 acpi_set_firmware_waking_vector((acpi_physical_address)
28 virt_to_phys((void *)
29 acpi_wakeup_address));
30
31 }
32 ACPI_FLUSH_CPU_CACHE();
33 acpi_enable_wakeup_device_prep(acpi_state);
34#endif
35 acpi_gpe_sleep_prepare(acpi_state);
36 acpi_enter_sleep_state_prep(acpi_state);
37 return 0;
38}
39
40#ifdef CONFIG_PM
41
42static void acpi_power_off_prepare(void)
43{
44 /* Prepare to power off the system */
45 acpi_sleep_prepare(ACPI_STATE_S5);
46}
47
48static void acpi_power_off(void)
49{
50 /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
51 printk("%s called\n", __FUNCTION__);
52 local_irq_disable();
53 /* Some SMP machines only can poweroff in boot CPU */
54 acpi_enter_sleep_state(ACPI_STATE_S5);
55}
56
57static int acpi_poweroff_init(void)
58{
59 if (!acpi_disabled) {
60 u8 type_a, type_b;
61 acpi_status status;
62
63 status =
64 acpi_get_sleep_type_data(ACPI_STATE_S5, &type_a, &type_b);
65 if (ACPI_SUCCESS(status)) {
66 pm_power_off_prepare = acpi_power_off_prepare;
67 pm_power_off = acpi_power_off;
68 }
69 }
70 return 0;
71}
72
73late_initcall(acpi_poweroff_init);
74
75#endif /* CONFIG_PM */
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
index 66b62b0d36..3839efd5ea 100644
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25ACPI_MODULE_NAME("sleep") 25ACPI_MODULE_NAME("sleep")
26#ifdef CONFIG_ACPI_PROCFS_SLEEP 26#ifdef CONFIG_ACPI_PROCFS
27static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset) 27static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset)
28{ 28{
29 int i; 29 int i;
@@ -76,7 +76,7 @@ acpi_system_write_sleep(struct file *file,
76 Done: 76 Done:
77 return error ? error : count; 77 return error ? error : count;
78} 78}
79#endif /* CONFIG_ACPI_PROCFS_SLEEP */ 79#endif /* CONFIG_ACPI_PROCFS */
80 80
81#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || !defined(CONFIG_X86) 81#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || !defined(CONFIG_X86)
82/* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */ 82/* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */
@@ -471,7 +471,7 @@ static const struct file_operations acpi_system_wakeup_device_fops = {
471 .release = single_release, 471 .release = single_release,
472}; 472};
473 473
474#ifdef CONFIG_ACPI_PROCFS_SLEEP 474#ifdef CONFIG_ACPI_PROCFS
475static const struct file_operations acpi_system_sleep_fops = { 475static const struct file_operations acpi_system_sleep_fops = {
476 .open = acpi_system_sleep_open_fs, 476 .open = acpi_system_sleep_open_fs,
477 .read = seq_read, 477 .read = seq_read,
@@ -479,7 +479,7 @@ static const struct file_operations acpi_system_sleep_fops = {
479 .llseek = seq_lseek, 479 .llseek = seq_lseek,
480 .release = single_release, 480 .release = single_release,
481}; 481};
482#endif /* CONFIG_ACPI_PROCFS_SLEEP */ 482#endif /* CONFIG_ACPI_PROCFS */
483 483
484#ifdef HAVE_ACPI_LEGACY_ALARM 484#ifdef HAVE_ACPI_LEGACY_ALARM
485static const struct file_operations acpi_system_alarm_fops = { 485static const struct file_operations acpi_system_alarm_fops = {
@@ -506,7 +506,7 @@ static int __init acpi_sleep_proc_init(void)
506 if (acpi_disabled) 506 if (acpi_disabled)
507 return 0; 507 return 0;
508 508
509#ifdef CONFIG_ACPI_PROCFS_SLEEP 509#ifdef CONFIG_ACPI_PROCFS
510 /* 'sleep' [R/W] */ 510 /* 'sleep' [R/W] */
511 entry = 511 entry =
512 create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR, 512 create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR,
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c
index 1da64b4518..8cc9492ffb 100644
--- a/drivers/acpi/tables/tbutils.c
+++ b/drivers/acpi/tables/tbutils.c
@@ -51,6 +51,65 @@ ACPI_MODULE_NAME("tbutils")
51static acpi_physical_address 51static acpi_physical_address
52acpi_tb_get_root_table_entry(u8 * table_entry, 52acpi_tb_get_root_table_entry(u8 * table_entry,
53 acpi_native_uint table_entry_size); 53 acpi_native_uint table_entry_size);
54/*******************************************************************************
55 *
56 * FUNCTION: acpi_tb_check_xsdt
57 *
58 * PARAMETERS: address - Pointer to the XSDT
59 *
60 * RETURN: status
61 * AE_OK - XSDT is okay
62 * AE_NO_MEMORY - can't map XSDT
63 * AE_INVALID_TABLE_LENGTH - invalid table length
64 * AE_NULL_ENTRY - XSDT has NULL entry
65 *
66 * DESCRIPTION: validate XSDT
67******************************************************************************/
68
69static acpi_status
70acpi_tb_check_xsdt(acpi_physical_address address)
71{
72 struct acpi_table_header *table;
73 u32 length;
74 u64 xsdt_entry_address;
75 u8 *table_entry;
76 u32 table_count;
77 int i;
78
79 table = acpi_os_map_memory(address, sizeof(struct acpi_table_header));
80 if (!table)
81 return AE_NO_MEMORY;
82
83 length = table->length;
84 acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
85 if (length < sizeof(struct acpi_table_header))
86 return AE_INVALID_TABLE_LENGTH;
87
88 table = acpi_os_map_memory(address, length);
89 if (!table)
90 return AE_NO_MEMORY;
91
92 /* Calculate the number of tables described in XSDT */
93 table_count =
94 (u32) ((table->length -
95 sizeof(struct acpi_table_header)) / sizeof(u64));
96 table_entry =
97 ACPI_CAST_PTR(u8, table) + sizeof(struct acpi_table_header);
98 for (i = 0; i < table_count; i++) {
99 ACPI_MOVE_64_TO_64(&xsdt_entry_address, table_entry);
100 if (!xsdt_entry_address) {
101 /* XSDT has NULL entry */
102 break;
103 }
104 table_entry += sizeof(u64);
105 }
106 acpi_os_unmap_memory(table, length);
107
108 if (i < table_count)
109 return AE_NULL_ENTRY;
110 else
111 return AE_OK;
112}
54 113
55/******************************************************************************* 114/*******************************************************************************
56 * 115 *
@@ -341,6 +400,7 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags)
341 u32 table_count; 400 u32 table_count;
342 struct acpi_table_header *table; 401 struct acpi_table_header *table;
343 acpi_physical_address address; 402 acpi_physical_address address;
403 acpi_physical_address rsdt_address;
344 u32 length; 404 u32 length;
345 u8 *table_entry; 405 u8 *table_entry;
346 acpi_status status; 406 acpi_status status;
@@ -369,6 +429,8 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags)
369 */ 429 */
370 address = (acpi_physical_address) rsdp->xsdt_physical_address; 430 address = (acpi_physical_address) rsdp->xsdt_physical_address;
371 table_entry_size = sizeof(u64); 431 table_entry_size = sizeof(u64);
432 rsdt_address = (acpi_physical_address)
433 rsdp->rsdt_physical_address;
372 } else { 434 } else {
373 /* Root table is an RSDT (32-bit physical addresses) */ 435 /* Root table is an RSDT (32-bit physical addresses) */
374 436
@@ -382,6 +444,15 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags)
382 */ 444 */
383 acpi_os_unmap_memory(rsdp, sizeof(struct acpi_table_rsdp)); 445 acpi_os_unmap_memory(rsdp, sizeof(struct acpi_table_rsdp));
384 446
447 if (table_entry_size == sizeof(u64)) {
448 if (acpi_tb_check_xsdt(address) == AE_NULL_ENTRY) {
449 /* XSDT has NULL entry, RSDT is used */
450 address = rsdt_address;
451 table_entry_size = sizeof(u32);
452 ACPI_WARNING((AE_INFO, "BIOS XSDT has NULL entry,"
453 "using RSDT"));
454 }
455 }
385 /* Map the RSDT/XSDT table header to get the full table length */ 456 /* Map the RSDT/XSDT table header to get the full table length */
386 457
387 table = acpi_os_map_memory(address, sizeof(struct acpi_table_header)); 458 table = acpi_os_map_memory(address, sizeof(struct acpi_table_header));
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 1e06159fd9..bc6d5866ef 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -77,23 +77,27 @@ MODULE_LICENSE("GPL");
77 77
78static int act; 78static int act;
79module_param(act, int, 0644); 79module_param(act, int, 0644);
80MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.\n"); 80MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.");
81
82static int crt;
83module_param(crt, int, 0644);
84MODULE_PARM_DESC(crt, "Disable or lower all critical trip points.");
81 85
82static int tzp; 86static int tzp;
83module_param(tzp, int, 0444); 87module_param(tzp, int, 0444);
84MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n"); 88MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.");
85 89
86static int nocrt; 90static int nocrt;
87module_param(nocrt, int, 0); 91module_param(nocrt, int, 0);
88MODULE_PARM_DESC(nocrt, "Set to disable action on ACPI thermal zone critical and hot trips.\n"); 92MODULE_PARM_DESC(nocrt, "Set to take no action upon ACPI thermal zone critical trips points.");
89 93
90static int off; 94static int off;
91module_param(off, int, 0); 95module_param(off, int, 0);
92MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.\n"); 96MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.");
93 97
94static int psv; 98static int psv;
95module_param(psv, int, 0644); 99module_param(psv, int, 0644);
96MODULE_PARM_DESC(psv, "Disable or override all passive trip points.\n"); 100MODULE_PARM_DESC(psv, "Disable or override all passive trip points.");
97 101
98static int acpi_thermal_add(struct acpi_device *device); 102static int acpi_thermal_add(struct acpi_device *device);
99static int acpi_thermal_remove(struct acpi_device *device, int type); 103static int acpi_thermal_remove(struct acpi_device *device, int type);
@@ -340,6 +344,20 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
340 tz->trips.critical.temperature)); 344 tz->trips.critical.temperature));
341 } 345 }
342 346
347 if (tz->trips.critical.flags.valid == 1) {
348 if (crt == -1) {
349 tz->trips.critical.flags.valid = 0;
350 } else if (crt > 0) {
351 unsigned long crt_k = CELSIUS_TO_KELVIN(crt);
352
353 /*
354 * Allow override to lower critical threshold
355 */
356 if (crt_k < tz->trips.critical.temperature)
357 tz->trips.critical.temperature = crt_k;
358 }
359 }
360
343 /* Critical Sleep (optional) */ 361 /* Critical Sleep (optional) */
344 362
345 status = 363 status =
@@ -485,8 +503,12 @@ static int acpi_thermal_critical(struct acpi_thermal *tz)
485 printk(KERN_EMERG 503 printk(KERN_EMERG
486 "Critical temperature reached (%ld C), shutting down.\n", 504 "Critical temperature reached (%ld C), shutting down.\n",
487 KELVIN_TO_CELSIUS(tz->temperature)); 505 KELVIN_TO_CELSIUS(tz->temperature));
488 acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL, 506 acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL,
489 tz->trips.critical.flags.enabled); 507 tz->trips.critical.flags.enabled);
508 acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
509 tz->device->dev.bus_id,
510 ACPI_THERMAL_NOTIFY_CRITICAL,
511 tz->trips.critical.flags.enabled);
490 512
491 orderly_poweroff(true); 513 orderly_poweroff(true);
492 514
@@ -504,8 +526,12 @@ static int acpi_thermal_hot(struct acpi_thermal *tz)
504 } else if (tz->trips.hot.flags.enabled) 526 } else if (tz->trips.hot.flags.enabled)
505 tz->trips.hot.flags.enabled = 0; 527 tz->trips.hot.flags.enabled = 0;
506 528
507 acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_HOT, 529 acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_HOT,
508 tz->trips.hot.flags.enabled); 530 tz->trips.hot.flags.enabled);
531 acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
532 tz->device->dev.bus_id,
533 ACPI_THERMAL_NOTIFY_HOT,
534 tz->trips.hot.flags.enabled);
509 535
510 /* TBD: Call user-mode "sleep(S4)" function */ 536 /* TBD: Call user-mode "sleep(S4)" function */
511 537
@@ -1067,9 +1093,9 @@ static int acpi_thermal_add_fs(struct acpi_device *device)
1067 entry->owner = THIS_MODULE; 1093 entry->owner = THIS_MODULE;
1068 } 1094 }
1069 1095
1070 /* 'trip_points' [R/W] */ 1096 /* 'trip_points' [R] */
1071 entry = create_proc_entry(ACPI_THERMAL_FILE_TRIP_POINTS, 1097 entry = create_proc_entry(ACPI_THERMAL_FILE_TRIP_POINTS,
1072 S_IFREG | S_IRUGO | S_IWUSR, 1098 S_IRUGO,
1073 acpi_device_dir(device)); 1099 acpi_device_dir(device));
1074 if (!entry) 1100 if (!entry)
1075 return -ENODEV; 1101 return -ENODEV;
@@ -1149,12 +1175,16 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
1149 case ACPI_THERMAL_NOTIFY_THRESHOLDS: 1175 case ACPI_THERMAL_NOTIFY_THRESHOLDS:
1150 acpi_thermal_get_trip_points(tz); 1176 acpi_thermal_get_trip_points(tz);
1151 acpi_thermal_check(tz); 1177 acpi_thermal_check(tz);
1152 acpi_bus_generate_event(device, event, 0); 1178 acpi_bus_generate_proc_event(device, event, 0);
1179 acpi_bus_generate_netlink_event(device->pnp.device_class,
1180 device->dev.bus_id, event, 0);
1153 break; 1181 break;
1154 case ACPI_THERMAL_NOTIFY_DEVICES: 1182 case ACPI_THERMAL_NOTIFY_DEVICES:
1155 if (tz->flags.devices) 1183 if (tz->flags.devices)
1156 acpi_thermal_get_devices(tz); 1184 acpi_thermal_get_devices(tz);
1157 acpi_bus_generate_event(device, event, 0); 1185 acpi_bus_generate_proc_event(device, event, 0);
1186 acpi_bus_generate_netlink_event(device->pnp.device_class,
1187 device->dev.bus_id, event, 0);
1158 break; 1188 break;
1159 default: 1189 default:
1160 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 1190 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
@@ -1339,6 +1369,13 @@ static int thermal_act(struct dmi_system_id *d) {
1339 } 1369 }
1340 return 0; 1370 return 0;
1341} 1371}
1372static int thermal_nocrt(struct dmi_system_id *d) {
1373
1374 printk(KERN_NOTICE "ACPI: %s detected: "
1375 "disabling all critical thermal trip point actions.\n", d->ident);
1376 nocrt = 1;
1377 return 0;
1378}
1342static int thermal_tzp(struct dmi_system_id *d) { 1379static int thermal_tzp(struct dmi_system_id *d) {
1343 1380
1344 if (tzp == 0) { 1381 if (tzp == 0) {
@@ -1387,6 +1424,14 @@ static struct dmi_system_id thermal_dmi_table[] __initdata = {
1387 DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"), 1424 DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
1388 }, 1425 },
1389 }, 1426 },
1427 {
1428 .callback = thermal_nocrt,
1429 .ident = "Gigabyte GA-7ZX",
1430 .matches = {
1431 DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co., Ltd."),
1432 DMI_MATCH(DMI_BOARD_NAME, "7ZX"),
1433 },
1434 },
1390 {} 1435 {}
1391}; 1436};
1392#endif /* CONFIG_DMI */ 1437#endif /* CONFIG_DMI */
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
index 1621655d6e..93ea8290b4 100644
--- a/drivers/acpi/utilities/utglobal.c
+++ b/drivers/acpi/utilities/utglobal.c
@@ -126,6 +126,7 @@ const char *acpi_format_exception(acpi_status status)
126 "Unknown exception code: 0x%8.8X", status)); 126 "Unknown exception code: 0x%8.8X", status));
127 127
128 exception = "UNKNOWN_STATUS_CODE"; 128 exception = "UNKNOWN_STATUS_CODE";
129 dump_stack();
129 } 130 }
130 131
131 return (ACPI_CAST_PTR(const char, exception)); 132 return (ACPI_CAST_PTR(const char, exception));
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index d987019419..d05891f162 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -31,7 +31,7 @@
31#include <linux/list.h> 31#include <linux/list.h>
32#include <linux/proc_fs.h> 32#include <linux/proc_fs.h>
33#include <linux/seq_file.h> 33#include <linux/seq_file.h>
34 34#include <linux/input.h>
35#include <linux/backlight.h> 35#include <linux/backlight.h>
36#include <linux/video_output.h> 36#include <linux/video_output.h>
37#include <asm/uaccess.h> 37#include <asm/uaccess.h>
@@ -138,6 +138,8 @@ struct acpi_video_bus {
138 struct semaphore sem; 138 struct semaphore sem;
139 struct list_head video_device_list; 139 struct list_head video_device_list;
140 struct proc_dir_entry *dir; 140 struct proc_dir_entry *dir;
141 struct input_dev *input;
142 char phys[32]; /* for input device */
141}; 143};
142 144
143struct acpi_video_device_flags { 145struct acpi_video_device_flags {
@@ -415,7 +417,6 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
415 arg0.integer.value = level; 417 arg0.integer.value = level;
416 status = acpi_evaluate_object(device->dev->handle, "_BCM", &args, NULL); 418 status = acpi_evaluate_object(device->dev->handle, "_BCM", &args, NULL);
417 419
418 printk(KERN_DEBUG "set_level status: %x\n", status);
419 return status; 420 return status;
420} 421}
421 422
@@ -1752,7 +1753,7 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video)
1752 1753
1753static int acpi_video_bus_start_devices(struct acpi_video_bus *video) 1754static int acpi_video_bus_start_devices(struct acpi_video_bus *video)
1754{ 1755{
1755 return acpi_video_bus_DOS(video, 1, 0); 1756 return acpi_video_bus_DOS(video, 0, 0);
1756} 1757}
1757 1758
1758static int acpi_video_bus_stop_devices(struct acpi_video_bus *video) 1759static int acpi_video_bus_stop_devices(struct acpi_video_bus *video)
@@ -1764,6 +1765,9 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
1764{ 1765{
1765 struct acpi_video_bus *video = data; 1766 struct acpi_video_bus *video = data;
1766 struct acpi_device *device = NULL; 1767 struct acpi_device *device = NULL;
1768 struct input_dev *input;
1769 int keycode;
1770
1767 1771
1768 printk("video bus notify\n"); 1772 printk("video bus notify\n");
1769 1773
@@ -1771,11 +1775,13 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
1771 return; 1775 return;
1772 1776
1773 device = video->device; 1777 device = video->device;
1778 input = video->input;
1774 1779
1775 switch (event) { 1780 switch (event) {
1776 case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch, 1781 case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch,
1777 * most likely via hotkey. */ 1782 * most likely via hotkey. */
1778 acpi_bus_generate_event(device, event, 0); 1783 acpi_bus_generate_proc_event(device, event, 0);
1784 keycode = KEY_SWITCHVIDEOMODE;
1779 break; 1785 break;
1780 1786
1781 case ACPI_VIDEO_NOTIFY_PROBE: /* User plugged in or removed a video 1787 case ACPI_VIDEO_NOTIFY_PROBE: /* User plugged in or removed a video
@@ -1783,22 +1789,38 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
1783 acpi_video_device_enumerate(video); 1789 acpi_video_device_enumerate(video);
1784 acpi_video_device_rebind(video); 1790 acpi_video_device_rebind(video);
1785 acpi_video_switch_output(video, event); 1791 acpi_video_switch_output(video, event);
1786 acpi_bus_generate_event(device, event, 0); 1792 acpi_bus_generate_proc_event(device, event, 0);
1793 keycode = KEY_SWITCHVIDEOMODE;
1787 break; 1794 break;
1788 1795
1789 case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */ 1796 case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */
1797 acpi_video_switch_output(video, event);
1798 acpi_bus_generate_proc_event(device, event, 0);
1799 keycode = KEY_SWITCHVIDEOMODE;
1800 break;
1790 case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */ 1801 case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */
1802 acpi_video_switch_output(video, event);
1803 acpi_bus_generate_proc_event(device, event, 0);
1804 keycode = KEY_VIDEO_NEXT;
1805 break;
1791 case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */ 1806 case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */
1792 acpi_video_switch_output(video, event); 1807 acpi_video_switch_output(video, event);
1793 acpi_bus_generate_event(device, event, 0); 1808 acpi_bus_generate_proc_event(device, event, 0);
1809 keycode = KEY_VIDEO_PREV;
1794 break; 1810 break;
1795 1811
1796 default: 1812 default:
1813 keycode = KEY_UNKNOWN;
1797 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 1814 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
1798 "Unsupported event [0x%x]\n", event)); 1815 "Unsupported event [0x%x]\n", event));
1799 break; 1816 break;
1800 } 1817 }
1801 1818
1819 input_report_key(input, keycode, 1);
1820 input_sync(input);
1821 input_report_key(input, keycode, 0);
1822 input_sync(input);
1823
1802 return; 1824 return;
1803} 1825}
1804 1826
@@ -1806,38 +1828,65 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
1806{ 1828{
1807 struct acpi_video_device *video_device = data; 1829 struct acpi_video_device *video_device = data;
1808 struct acpi_device *device = NULL; 1830 struct acpi_device *device = NULL;
1831 struct acpi_video_bus *bus;
1832 struct input_dev *input;
1833 int keycode;
1809 1834
1810 if (!video_device) 1835 if (!video_device)
1811 return; 1836 return;
1812 1837
1813 device = video_device->dev; 1838 device = video_device->dev;
1839 bus = video_device->video;
1840 input = bus->input;
1814 1841
1815 switch (event) { 1842 switch (event) {
1816 case ACPI_VIDEO_NOTIFY_SWITCH: /* change in status (cycle output device) */
1817 case ACPI_VIDEO_NOTIFY_PROBE: /* change in status (output device status) */
1818 acpi_bus_generate_event(device, event, 0);
1819 break;
1820 case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */ 1843 case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */
1844 acpi_video_switch_brightness(video_device, event);
1845 acpi_bus_generate_proc_event(device, event, 0);
1846 keycode = KEY_BRIGHTNESS_CYCLE;
1847 break;
1821 case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */ 1848 case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */
1849 acpi_video_switch_brightness(video_device, event);
1850 acpi_bus_generate_proc_event(device, event, 0);
1851 keycode = KEY_BRIGHTNESSUP;
1852 break;
1822 case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: /* Decrease brightness */ 1853 case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: /* Decrease brightness */
1854 acpi_video_switch_brightness(video_device, event);
1855 acpi_bus_generate_proc_event(device, event, 0);
1856 keycode = KEY_BRIGHTNESSDOWN;
1857 break;
1823 case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightnesss */ 1858 case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightnesss */
1859 acpi_video_switch_brightness(video_device, event);
1860 acpi_bus_generate_proc_event(device, event, 0);
1861 keycode = KEY_BRIGHTNESS_ZERO;
1862 break;
1824 case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */ 1863 case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */
1825 acpi_video_switch_brightness(video_device, event); 1864 acpi_video_switch_brightness(video_device, event);
1826 acpi_bus_generate_event(device, event, 0); 1865 acpi_bus_generate_proc_event(device, event, 0);
1866 keycode = KEY_DISPLAY_OFF;
1827 break; 1867 break;
1828 default: 1868 default:
1869 keycode = KEY_UNKNOWN;
1829 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 1870 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
1830 "Unsupported event [0x%x]\n", event)); 1871 "Unsupported event [0x%x]\n", event));
1831 break; 1872 break;
1832 } 1873 }
1874
1875 input_report_key(input, keycode, 1);
1876 input_sync(input);
1877 input_report_key(input, keycode, 0);
1878 input_sync(input);
1879
1833 return; 1880 return;
1834} 1881}
1835 1882
1883static int instance;
1836static int acpi_video_bus_add(struct acpi_device *device) 1884static int acpi_video_bus_add(struct acpi_device *device)
1837{ 1885{
1838 int result = 0; 1886 int result = 0;
1839 acpi_status status = 0; 1887 acpi_status status = 0;
1840 struct acpi_video_bus *video = NULL; 1888 struct acpi_video_bus *video = NULL;
1889 struct input_dev *input;
1841 1890
1842 1891
1843 if (!device) 1892 if (!device)
@@ -1847,6 +1896,13 @@ static int acpi_video_bus_add(struct acpi_device *device)
1847 if (!video) 1896 if (!video)
1848 return -ENOMEM; 1897 return -ENOMEM;
1849 1898
1899 /* a hack to fix the duplicate name "VID" problem on T61 */
1900 if (!strcmp(device->pnp.bus_id, "VID")) {
1901 if (instance)
1902 device->pnp.bus_id[3] = '0' + instance;
1903 instance ++;
1904 }
1905
1850 video->device = device; 1906 video->device = device;
1851 strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME); 1907 strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
1852 strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS); 1908 strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
@@ -1881,6 +1937,39 @@ static int acpi_video_bus_add(struct acpi_device *device)
1881 goto end; 1937 goto end;
1882 } 1938 }
1883 1939
1940
1941 video->input = input = input_allocate_device();
1942
1943 snprintf(video->phys, sizeof(video->phys),
1944 "%s/video/input0", acpi_device_hid(video->device));
1945
1946 input->name = acpi_device_name(video->device);
1947 input->phys = video->phys;
1948 input->id.bustype = BUS_HOST;
1949 input->id.product = 0x06;
1950 input->evbit[0] = BIT(EV_KEY);
1951 set_bit(KEY_SWITCHVIDEOMODE, input->keybit);
1952 set_bit(KEY_VIDEO_NEXT, input->keybit);
1953 set_bit(KEY_VIDEO_PREV, input->keybit);
1954 set_bit(KEY_BRIGHTNESS_CYCLE, input->keybit);
1955 set_bit(KEY_BRIGHTNESSUP, input->keybit);
1956 set_bit(KEY_BRIGHTNESSDOWN, input->keybit);
1957 set_bit(KEY_BRIGHTNESS_ZERO, input->keybit);
1958 set_bit(KEY_DISPLAY_OFF, input->keybit);
1959 set_bit(KEY_UNKNOWN, input->keybit);
1960 result = input_register_device(input);
1961 if (result) {
1962 acpi_remove_notify_handler(video->device->handle,
1963 ACPI_DEVICE_NOTIFY,
1964 acpi_video_bus_notify);
1965 acpi_video_bus_stop_devices(video);
1966 acpi_video_bus_put_devices(video);
1967 kfree(video->attached_array);
1968 acpi_video_bus_remove_fs(device);
1969 goto end;
1970 }
1971
1972
1884 printk(KERN_INFO PREFIX "%s [%s] (multi-head: %s rom: %s post: %s)\n", 1973 printk(KERN_INFO PREFIX "%s [%s] (multi-head: %s rom: %s post: %s)\n",
1885 ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(device), 1974 ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(device),
1886 video->flags.multihead ? "yes" : "no", 1975 video->flags.multihead ? "yes" : "no",
@@ -1914,6 +2003,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
1914 acpi_video_bus_put_devices(video); 2003 acpi_video_bus_put_devices(video);
1915 acpi_video_bus_remove_fs(device); 2004 acpi_video_bus_remove_fs(device);
1916 2005
2006 input_unregister_device(video->input);
1917 kfree(video->attached_array); 2007 kfree(video->attached_array);
1918 kfree(video); 2008 kfree(video);
1919 2009
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 06f212ff2b..c16820325d 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -418,10 +418,12 @@ static const struct pci_device_id ahci_pci_tbl[] = {
418 418
419 /* ATI */ 419 /* ATI */
420 { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600 }, /* ATI SB600 */ 420 { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600 }, /* ATI SB600 */
421 { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb600 }, /* ATI SB700 IDE */ 421 { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb600 }, /* ATI SB700/800 */
422 { PCI_VDEVICE(ATI, 0x4391), board_ahci_sb600 }, /* ATI SB700 AHCI */ 422 { PCI_VDEVICE(ATI, 0x4391), board_ahci_sb600 }, /* ATI SB700/800 */
423 { PCI_VDEVICE(ATI, 0x4392), board_ahci_sb600 }, /* ATI SB700 nraid5 */ 423 { PCI_VDEVICE(ATI, 0x4392), board_ahci_sb600 }, /* ATI SB700/800 */
424 { PCI_VDEVICE(ATI, 0x4393), board_ahci_sb600 }, /* ATI SB700 raid5 */ 424 { PCI_VDEVICE(ATI, 0x4393), board_ahci_sb600 }, /* ATI SB700/800 */
425 { PCI_VDEVICE(ATI, 0x4394), board_ahci_sb600 }, /* ATI SB700/800 */
426 { PCI_VDEVICE(ATI, 0x4395), board_ahci_sb600 }, /* ATI SB700/800 */
425 427
426 /* VIA */ 428 /* VIA */
427 { PCI_VDEVICE(VIA, 0x3349), board_ahci_vt8251 }, /* VIA VT8251 */ 429 { PCI_VDEVICE(VIA, 0x3349), board_ahci_vt8251 }, /* VIA VT8251 */
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 430fcf4f9e..9454669547 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -26,7 +26,7 @@
26#include <linux/libata.h> 26#include <linux/libata.h>
27 27
28#define DRV_NAME "ata_generic" 28#define DRV_NAME "ata_generic"
29#define DRV_VERSION "0.2.12" 29#define DRV_VERSION "0.2.13"
30 30
31/* 31/*
32 * A generic parallel ATA driver using libata 32 * A generic parallel ATA driver using libata
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 071d274afa..6996eb5b75 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -94,7 +94,7 @@
94#include <linux/dmi.h> 94#include <linux/dmi.h>
95 95
96#define DRV_NAME "ata_piix" 96#define DRV_NAME "ata_piix"
97#define DRV_VERSION "2.11" 97#define DRV_VERSION "2.12"
98 98
99enum { 99enum {
100 PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ 100 PIIX_IOCFG = 0x54, /* IDE I/O configuration register */
@@ -130,6 +130,7 @@ enum {
130 ich6m_sata_ahci = 8, 130 ich6m_sata_ahci = 8,
131 ich8_sata_ahci = 9, 131 ich8_sata_ahci = 9,
132 piix_pata_mwdma = 10, /* PIIX3 MWDMA only */ 132 piix_pata_mwdma = 10, /* PIIX3 MWDMA only */
133 tolapai_sata_ahci = 11,
133 134
134 /* constants for mapping table */ 135 /* constants for mapping table */
135 P0 = 0, /* port 0 */ 136 P0 = 0, /* port 0 */
@@ -253,6 +254,8 @@ static const struct pci_device_id piix_pci_tbl[] = {
253 { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, 254 { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
254 /* SATA Controller IDE (ICH9M) */ 255 /* SATA Controller IDE (ICH9M) */
255 { 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, 256 { 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
257 /* SATA Controller IDE (Tolapai) */
258 { 0x8086, 0x5028, PCI_ANY_ID, PCI_ANY_ID, 0, 0, tolapai_sata_ahci },
256 259
257 { } /* terminate list */ 260 { } /* terminate list */
258}; 261};
@@ -441,12 +444,25 @@ static const struct piix_map_db ich8_map_db = {
441 }, 444 },
442}; 445};
443 446
447static const struct piix_map_db tolapai_map_db = {
448 .mask = 0x3,
449 .port_enable = 0x3,
450 .map = {
451 /* PM PS SM SS MAP */
452 { P0, NA, P1, NA }, /* 00b */
453 { RV, RV, RV, RV }, /* 01b */
454 { RV, RV, RV, RV }, /* 10b */
455 { RV, RV, RV, RV },
456 },
457};
458
444static const struct piix_map_db *piix_map_db_table[] = { 459static const struct piix_map_db *piix_map_db_table[] = {
445 [ich5_sata] = &ich5_map_db, 460 [ich5_sata] = &ich5_map_db,
446 [ich6_sata] = &ich6_map_db, 461 [ich6_sata] = &ich6_map_db,
447 [ich6_sata_ahci] = &ich6_map_db, 462 [ich6_sata_ahci] = &ich6_map_db,
448 [ich6m_sata_ahci] = &ich6m_map_db, 463 [ich6m_sata_ahci] = &ich6m_map_db,
449 [ich8_sata_ahci] = &ich8_map_db, 464 [ich8_sata_ahci] = &ich8_map_db,
465 [tolapai_sata_ahci] = &tolapai_map_db,
450}; 466};
451 467
452static struct ata_port_info piix_port_info[] = { 468static struct ata_port_info piix_port_info[] = {
@@ -560,6 +576,17 @@ static struct ata_port_info piix_port_info[] = {
560 .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */ 576 .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */
561 .port_ops = &piix_pata_ops, 577 .port_ops = &piix_pata_ops,
562 }, 578 },
579
580 /* tolapai_sata_ahci: 11: */
581 {
582 .sht = &piix_sht,
583 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
584 PIIX_FLAG_AHCI,
585 .pio_mask = 0x1f, /* pio0-4 */
586 .mwdma_mask = 0x07, /* mwdma0-2 */
587 .udma_mask = ATA_UDMA6,
588 .port_ops = &piix_sata_ops,
589 },
563}; 590};
564 591
565static struct pci_bits piix_enable_bits[] = { 592static struct pci_bits piix_enable_bits[] = {
@@ -894,6 +921,13 @@ static int piix_broken_suspend(void)
894{ 921{
895 static struct dmi_system_id sysids[] = { 922 static struct dmi_system_id sysids[] = {
896 { 923 {
924 .ident = "TECRA M3",
925 .matches = {
926 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
927 DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M3"),
928 },
929 },
930 {
897 .ident = "TECRA M5", 931 .ident = "TECRA M5",
898 .matches = { 932 .matches = {
899 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), 933 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
@@ -908,6 +942,13 @@ static int piix_broken_suspend(void)
908 }, 942 },
909 }, 943 },
910 { 944 {
945 .ident = "Satellite U200",
946 .matches = {
947 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
948 DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U200"),
949 },
950 },
951 {
911 .ident = "Satellite U205", 952 .ident = "Satellite U205",
912 .matches = { 953 .matches = {
913 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), 954 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
@@ -921,7 +962,8 @@ static int piix_broken_suspend(void)
921 DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"), 962 DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"),
922 }, 963 },
923 }, 964 },
924 { } 965
966 { } /* terminate list */
925 }; 967 };
926 static const char *oemstrs[] = { 968 static const char *oemstrs[] = {
927 "Tecra M3,", 969 "Tecra M3,",
@@ -1139,6 +1181,41 @@ static void __devinit piix_init_sata_map(struct pci_dev *pdev,
1139 hpriv->map = map; 1181 hpriv->map = map;
1140} 1182}
1141 1183
1184static void piix_iocfg_bit18_quirk(struct pci_dev *pdev)
1185{
1186 static struct dmi_system_id sysids[] = {
1187 {
1188 /* Clevo M570U sets IOCFG bit 18 if the cdrom
1189 * isn't used to boot the system which
1190 * disables the channel.
1191 */
1192 .ident = "M570U",
1193 .matches = {
1194 DMI_MATCH(DMI_SYS_VENDOR, "Clevo Co."),
1195 DMI_MATCH(DMI_PRODUCT_NAME, "M570U"),
1196 },
1197 },
1198
1199 { } /* terminate list */
1200 };
1201 u32 iocfg;
1202
1203 if (!dmi_check_system(sysids))
1204 return;
1205
1206 /* The datasheet says that bit 18 is NOOP but certain systems
1207 * seem to use it to disable a channel. Clear the bit on the
1208 * affected systems.
1209 */
1210 pci_read_config_dword(pdev, PIIX_IOCFG, &iocfg);
1211 if (iocfg & (1 << 18)) {
1212 dev_printk(KERN_INFO, &pdev->dev,
1213 "applying IOCFG bit18 quirk\n");
1214 iocfg &= ~(1 << 18);
1215 pci_write_config_dword(pdev, PIIX_IOCFG, iocfg);
1216 }
1217}
1218
1142/** 1219/**
1143 * piix_init_one - Register PIIX ATA PCI device with kernel services 1220 * piix_init_one - Register PIIX ATA PCI device with kernel services
1144 * @pdev: PCI device to register 1221 * @pdev: PCI device to register
@@ -1200,6 +1277,9 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1200 piix_map_db_table[ent->driver_data]); 1277 piix_map_db_table[ent->driver_data]);
1201 } 1278 }
1202 1279
1280 /* apply IOCFG bit18 quirk */
1281 piix_iocfg_bit18_quirk(pdev);
1282
1203 /* On ICH5, some BIOSen disable the interrupt using the 1283 /* On ICH5, some BIOSen disable the interrupt using the
1204 * PCI_COMMAND_INTX_DISABLE bit added in PCI 2.3. 1284 * PCI_COMMAND_INTX_DISABLE bit added in PCI 2.3.
1205 * On ICH6, this bit has the same effect, but only when 1285 * On ICH6, this bit has the same effect, but only when
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 99d4fbffb0..772be09b46 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1911,8 +1911,9 @@ int ata_dev_configure(struct ata_device *dev)
1911 dev->flags |= ATA_DFLAG_FLUSH_EXT; 1911 dev->flags |= ATA_DFLAG_FLUSH_EXT;
1912 } 1912 }
1913 1913
1914 if (ata_id_hpa_enabled(dev->id)) 1914 if (!(dev->horkage & ATA_HORKAGE_BROKEN_HPA) &&
1915 dev->n_sectors = ata_hpa_resize(dev); 1915 ata_id_hpa_enabled(dev->id))
1916 dev->n_sectors = ata_hpa_resize(dev);
1916 1917
1917 /* config NCQ */ 1918 /* config NCQ */
1918 ata_dev_config_ncq(dev, ncq_desc, sizeof(ncq_desc)); 1919 ata_dev_config_ncq(dev, ncq_desc, sizeof(ncq_desc));
@@ -3700,11 +3701,16 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags)
3700 goto fail; 3701 goto fail;
3701 3702
3702 /* verify n_sectors hasn't changed */ 3703 /* verify n_sectors hasn't changed */
3703 if (dev->class == ATA_DEV_ATA && dev->n_sectors != n_sectors) { 3704 if (dev->class == ATA_DEV_ATA && n_sectors &&
3705 dev->n_sectors != n_sectors) {
3704 ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch " 3706 ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch "
3705 "%llu != %llu\n", 3707 "%llu != %llu\n",
3706 (unsigned long long)n_sectors, 3708 (unsigned long long)n_sectors,
3707 (unsigned long long)dev->n_sectors); 3709 (unsigned long long)dev->n_sectors);
3710
3711 /* restore original n_sectors */
3712 dev->n_sectors = n_sectors;
3713
3708 rc = -ENODEV; 3714 rc = -ENODEV;
3709 goto fail; 3715 goto fail;
3710 } 3716 }
@@ -3772,6 +3778,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
3772 { "Maxtor 6L250S0", "BANC1G10", ATA_HORKAGE_NONCQ }, 3778 { "Maxtor 6L250S0", "BANC1G10", ATA_HORKAGE_NONCQ },
3773 { "Maxtor 6B200M0", "BANC1BM0", ATA_HORKAGE_NONCQ }, 3779 { "Maxtor 6B200M0", "BANC1BM0", ATA_HORKAGE_NONCQ },
3774 { "Maxtor 6B200M0", "BANC1B10", ATA_HORKAGE_NONCQ }, 3780 { "Maxtor 6B200M0", "BANC1B10", ATA_HORKAGE_NONCQ },
3781 { "Maxtor 7B250S0", "BANC1B70", ATA_HORKAGE_NONCQ, },
3782 { "Maxtor 7B300S0", "BANC1B70", ATA_HORKAGE_NONCQ },
3783 { "Maxtor 7V300F0", "VA111630", ATA_HORKAGE_NONCQ },
3775 { "HITACHI HDS7250SASUN500G 0621KTAWSD", "K2AOAJ0AHITACHI", 3784 { "HITACHI HDS7250SASUN500G 0621KTAWSD", "K2AOAJ0AHITACHI",
3776 ATA_HORKAGE_NONCQ }, 3785 ATA_HORKAGE_NONCQ },
3777 /* NCQ hard hangs device under heavier load, needs hard power cycle */ 3786 /* NCQ hard hangs device under heavier load, needs hard power cycle */
@@ -3788,9 +3797,14 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
3788 { "WDC WD740ADFD-00NLR1", NULL, ATA_HORKAGE_NONCQ, }, 3797 { "WDC WD740ADFD-00NLR1", NULL, ATA_HORKAGE_NONCQ, },
3789 { "FUJITSU MHV2080BH", "00840028", ATA_HORKAGE_NONCQ, }, 3798 { "FUJITSU MHV2080BH", "00840028", ATA_HORKAGE_NONCQ, },
3790 { "ST9160821AS", "3.CLF", ATA_HORKAGE_NONCQ, }, 3799 { "ST9160821AS", "3.CLF", ATA_HORKAGE_NONCQ, },
3800 { "ST3160812AS", "3.AD", ATA_HORKAGE_NONCQ, },
3791 { "SAMSUNG HD401LJ", "ZZ100-15", ATA_HORKAGE_NONCQ, }, 3801 { "SAMSUNG HD401LJ", "ZZ100-15", ATA_HORKAGE_NONCQ, },
3792 3802
3793 /* Devices with NCQ limits */ 3803 /* devices which puke on READ_NATIVE_MAX */
3804 { "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA, },
3805 { "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_HORKAGE_BROKEN_HPA },
3806 { "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_HORKAGE_BROKEN_HPA },
3807 { "MAXTOR 6L080L4", "A93.0500", ATA_HORKAGE_BROKEN_HPA },
3794 3808
3795 /* End Marker */ 3809 /* End Marker */
3796 { } 3810 { }
@@ -3980,6 +3994,11 @@ static unsigned int ata_dev_init_params(struct ata_device *dev,
3980 tf.device |= (heads - 1) & 0x0f; /* max head = num. of heads - 1 */ 3994 tf.device |= (heads - 1) & 0x0f; /* max head = num. of heads - 1 */
3981 3995
3982 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0); 3996 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0);
3997 /* A clean abort indicates an original or just out of spec drive
3998 and we should continue as we issue the setup based on the
3999 drive reported working geometry */
4000 if (err_mask == AC_ERR_DEV && (tf.feature & ATA_ABORTED))
4001 err_mask = 0;
3983 4002
3984 DPRINTK("EXIT, err_mask=%x\n", err_mask); 4003 DPRINTK("EXIT, err_mask=%x\n", err_mask);
3985 return err_mask; 4004 return err_mask;
@@ -6020,6 +6039,7 @@ void ata_dev_init(struct ata_device *dev)
6020 */ 6039 */
6021 spin_lock_irqsave(ap->lock, flags); 6040 spin_lock_irqsave(ap->lock, flags);
6022 dev->flags &= ~ATA_DFLAG_INIT_MASK; 6041 dev->flags &= ~ATA_DFLAG_INIT_MASK;
6042 dev->horkage = 0;
6023 spin_unlock_irqrestore(ap->lock, flags); 6043 spin_unlock_irqrestore(ap->lock, flags);
6024 6044
6025 memset((void *)dev + ATA_DEVICE_CLEAR_OFFSET, 0, 6045 memset((void *)dev + ATA_DEVICE_CLEAR_OFFSET, 0,
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 1cce2198ba..8023167bbb 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -297,7 +297,7 @@ void ata_bmdma_start (struct ata_queued_cmd *qc)
297 dmactl = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_CMD); 297 dmactl = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
298 iowrite8(dmactl | ATA_DMA_START, ap->ioaddr.bmdma_addr + ATA_DMA_CMD); 298 iowrite8(dmactl | ATA_DMA_START, ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
299 299
300 /* Strictly, one may wish to issue a readb() here, to 300 /* Strictly, one may wish to issue an ioread8() here, to
301 * flush the mmio write. However, control also passes 301 * flush the mmio write. However, control also passes
302 * to the hardware at this point, and it will interrupt 302 * to the hardware at this point, and it will interrupt
303 * us when we are to resume control. So, in effect, 303 * us when we are to resume control. So, in effect,
@@ -307,6 +307,9 @@ void ata_bmdma_start (struct ata_queued_cmd *qc)
307 * is expected, so I think it is best to not add a readb() 307 * is expected, so I think it is best to not add a readb()
308 * without first all the MMIO ATA cards/mobos. 308 * without first all the MMIO ATA cards/mobos.
309 * Or maybe I'm just being paranoid. 309 * Or maybe I'm just being paranoid.
310 *
311 * FIXME: The posting of this write means I/O starts are
312 * unneccessarily delayed for MMIO
310 */ 313 */
311} 314}
312 315
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index e8a28e94fe..71bdc3b318 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -34,7 +34,7 @@
34#include <linux/dmi.h> 34#include <linux/dmi.h>
35 35
36#define DRV_NAME "pata_ali" 36#define DRV_NAME "pata_ali"
37#define DRV_VERSION "0.7.4" 37#define DRV_VERSION "0.7.5"
38 38
39/* 39/*
40 * Cable special cases 40 * Cable special cases
@@ -48,6 +48,13 @@ static struct dmi_system_id cable_dmi_table[] = {
48 DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"), 48 DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"),
49 }, 49 },
50 }, 50 },
51 {
52 .ident = "Toshiba Satelite S1800-814",
53 .matches = {
54 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
55 DMI_MATCH(DMI_PRODUCT_NAME, "S1800-814"),
56 },
57 },
51 { } 58 { }
52}; 59};
53 60
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index b09facad63..04048fcf63 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -25,7 +25,7 @@
25#include <linux/libata.h> 25#include <linux/libata.h>
26 26
27#define DRV_NAME "pata_amd" 27#define DRV_NAME "pata_amd"
28#define DRV_VERSION "0.3.8" 28#define DRV_VERSION "0.3.9"
29 29
30/** 30/**
31 * timing_setup - shared timing computation and load 31 * timing_setup - shared timing computation and load
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 80509be49e..86f85a2cab 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -22,7 +22,7 @@
22#include <linux/libata.h> 22#include <linux/libata.h>
23 23
24#define DRV_NAME "pata_atiixp" 24#define DRV_NAME "pata_atiixp"
25#define DRV_VERSION "0.4.5" 25#define DRV_VERSION "0.4.6"
26 26
27enum { 27enum {
28 ATIIXP_IDE_PIO_TIMING = 0x40, 28 ATIIXP_IDE_PIO_TIMING = 0x40,
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index 7dc76e71bd..e2459088cd 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -41,7 +41,7 @@
41#include <linux/libata.h> 41#include <linux/libata.h>
42 42
43#define DRV_NAME "pata_cs5520" 43#define DRV_NAME "pata_cs5520"
44#define DRV_VERSION "0.6.5" 44#define DRV_VERSION "0.6.6"
45 45
46struct pio_clocks 46struct pio_clocks
47{ 47{
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c
index 68f150a1e2..c6066aa43e 100644
--- a/drivers/ata/pata_cs5530.c
+++ b/drivers/ata/pata_cs5530.c
@@ -35,7 +35,7 @@
35#include <linux/dmi.h> 35#include <linux/dmi.h>
36 36
37#define DRV_NAME "pata_cs5530" 37#define DRV_NAME "pata_cs5530"
38#define DRV_VERSION "0.7.3" 38#define DRV_VERSION "0.7.4"
39 39
40static void __iomem *cs5530_port_base(struct ata_port *ap) 40static void __iomem *cs5530_port_base(struct ata_port *ap)
41{ 41{
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index 91a396fa5b..9e553c5420 100644
--- a/drivers/ata/pata_isapnp.c
+++ b/drivers/ata/pata_isapnp.c
@@ -17,7 +17,7 @@
17#include <linux/libata.h> 17#include <linux/libata.h>
18 18
19#define DRV_NAME "pata_isapnp" 19#define DRV_NAME "pata_isapnp"
20#define DRV_VERSION "0.2.1" 20#define DRV_VERSION "0.2.2"
21 21
22static struct scsi_host_template isapnp_sht = { 22static struct scsi_host_template isapnp_sht = {
23 .module = THIS_MODULE, 23 .module = THIS_MODULE,
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index 430673be1d..5d8b91e70e 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -80,7 +80,7 @@
80 80
81 81
82#define DRV_NAME "pata_it821x" 82#define DRV_NAME "pata_it821x"
83#define DRV_VERSION "0.3.7" 83#define DRV_VERSION "0.3.8"
84 84
85struct it821x_dev 85struct it821x_dev
86{ 86{
@@ -533,6 +533,10 @@ static int it821x_check_atapi_dma(struct ata_queued_cmd *qc)
533 struct ata_port *ap = qc->ap; 533 struct ata_port *ap = qc->ap;
534 struct it821x_dev *itdev = ap->private_data; 534 struct it821x_dev *itdev = ap->private_data;
535 535
536 /* Only use dma for transfers to/from the media. */
537 if (qc->nbytes < 2048)
538 return -EOPNOTSUPP;
539
536 /* No ATAPI DMA in smart mode */ 540 /* No ATAPI DMA in smart mode */
537 if (itdev->smart) 541 if (itdev->smart)
538 return -EOPNOTSUPP; 542 return -EOPNOTSUPP;
@@ -587,7 +591,7 @@ static int it821x_port_start(struct ata_port *ap)
587 itdev->want[1][1] = ATA_ANY; 591 itdev->want[1][1] = ATA_ANY;
588 itdev->last_device = -1; 592 itdev->last_device = -1;
589 593
590 if (pdev->revision == 0x11) { 594 if (pdev->revision == 0x10) {
591 itdev->timing10 = 1; 595 itdev->timing10 = 1;
592 /* Need to disable ATAPI DMA for this case */ 596 /* Need to disable ATAPI DMA for this case */
593 if (!itdev->smart) 597 if (!itdev->smart)
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index 4ca7fd6118..5dea3584c6 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -189,6 +189,9 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev)
189 data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000); 189 data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000);
190 data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000); 190 data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000);
191 191
192 if (!data->cs0 || !data->cs1)
193 return -ENOMEM;
194
192 irq = platform_get_irq(pdev, 0); 195 irq = platform_get_irq(pdev, 0);
193 if (irq) 196 if (irq)
194 set_irq_type(irq, IRQT_RISING); 197 set_irq_type(irq, IRQT_RISING);
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
index 87594c04d3..b45506f1ef 100644
--- a/drivers/ata/pata_marvell.c
+++ b/drivers/ata/pata_marvell.c
@@ -44,10 +44,10 @@ static int marvell_pre_reset(struct ata_port *ap, unsigned long deadline)
44 return -ENOMEM; 44 return -ENOMEM;
45 printk("BAR5:"); 45 printk("BAR5:");
46 for(i = 0; i <= 0x0F; i++) 46 for(i = 0; i <= 0x0F; i++)
47 printk("%02X:%02X ", i, readb(barp + i)); 47 printk("%02X:%02X ", i, ioread8(barp + i));
48 printk("\n"); 48 printk("\n");
49 49
50 devices = readl(barp + 0x0C); 50 devices = ioread32(barp + 0x0C);
51 pci_iounmap(pdev, barp); 51 pci_iounmap(pdev, barp);
52 52
53 if ((pdev->device == 0x6145) && (ap->port_no == 0) && 53 if ((pdev->device == 0x6145) && (ap->port_no == 0) &&
@@ -192,6 +192,8 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i
192 192
193static const struct pci_device_id marvell_pci_tbl[] = { 193static const struct pci_device_id marvell_pci_tbl[] = {
194 { PCI_DEVICE(0x11AB, 0x6101), }, 194 { PCI_DEVICE(0x11AB, 0x6101), },
195 { PCI_DEVICE(0x11AB, 0x6121), },
196 { PCI_DEVICE(0x11AB, 0x6123), },
195 { PCI_DEVICE(0x11AB, 0x6145), }, 197 { PCI_DEVICE(0x11AB, 0x6145), },
196 { } /* terminate list */ 198 { } /* terminate list */
197}; 199};
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 182e83c904..099f4cdc4c 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -24,7 +24,7 @@
24 24
25 25
26#define DRV_NAME "mpc52xx_ata" 26#define DRV_NAME "mpc52xx_ata"
27#define DRV_VERSION "0.1.0ac2" 27#define DRV_VERSION "0.1.2"
28 28
29 29
30/* Private structures used by the driver */ 30/* Private structures used by the driver */
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 6da23feed0..0f2b027624 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -42,7 +42,7 @@
42 42
43 43
44#define DRV_NAME "pata_pcmcia" 44#define DRV_NAME "pata_pcmcia"
45#define DRV_VERSION "0.3.1" 45#define DRV_VERSION "0.3.2"
46 46
47/* 47/*
48 * Private data structure to glue stuff together 48 * Private data structure to glue stuff together
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
index 69a5aa4949..bb64a986e8 100644
--- a/drivers/ata/pata_pdc2027x.c
+++ b/drivers/ata/pata_pdc2027x.c
@@ -35,7 +35,7 @@
35#include <linux/libata.h> 35#include <linux/libata.h>
36 36
37#define DRV_NAME "pata_pdc2027x" 37#define DRV_NAME "pata_pdc2027x"
38#define DRV_VERSION "0.9" 38#define DRV_VERSION "1.0"
39#undef PDC_DEBUG 39#undef PDC_DEBUG
40 40
41#ifdef PDC_DEBUG 41#ifdef PDC_DEBUG
@@ -563,13 +563,13 @@ static long pdc_read_counter(struct ata_host *host)
563 u32 bccrl, bccrh, bccrlv, bccrhv; 563 u32 bccrl, bccrh, bccrlv, bccrhv;
564 564
565retry: 565retry:
566 bccrl = readl(mmio_base + PDC_BYTE_COUNT) & 0xffff; 566 bccrl = readl(mmio_base + PDC_BYTE_COUNT) & 0x7fff;
567 bccrh = readl(mmio_base + PDC_BYTE_COUNT + 0x100) & 0xffff; 567 bccrh = readl(mmio_base + PDC_BYTE_COUNT + 0x100) & 0x7fff;
568 rmb(); 568 rmb();
569 569
570 /* Read the counter values again for verification */ 570 /* Read the counter values again for verification */
571 bccrlv = readl(mmio_base + PDC_BYTE_COUNT) & 0xffff; 571 bccrlv = readl(mmio_base + PDC_BYTE_COUNT) & 0x7fff;
572 bccrhv = readl(mmio_base + PDC_BYTE_COUNT + 0x100) & 0xffff; 572 bccrhv = readl(mmio_base + PDC_BYTE_COUNT + 0x100) & 0x7fff;
573 rmb(); 573 rmb();
574 574
575 counter = (bccrh << 15) | bccrl; 575 counter = (bccrh << 15) | bccrl;
@@ -692,16 +692,16 @@ static long pdc_detect_pll_input_clock(struct ata_host *host)
692 struct timeval start_time, end_time; 692 struct timeval start_time, end_time;
693 long pll_clock, usec_elapsed; 693 long pll_clock, usec_elapsed;
694 694
695 /* Read current counter value */
696 start_count = pdc_read_counter(host);
697 do_gettimeofday(&start_time);
698
699 /* Start the test mode */ 695 /* Start the test mode */
700 scr = readl(mmio_base + PDC_SYS_CTL); 696 scr = readl(mmio_base + PDC_SYS_CTL);
701 PDPRINTK("scr[%X]\n", scr); 697 PDPRINTK("scr[%X]\n", scr);
702 writel(scr | (0x01 << 14), mmio_base + PDC_SYS_CTL); 698 writel(scr | (0x01 << 14), mmio_base + PDC_SYS_CTL);
703 readl(mmio_base + PDC_SYS_CTL); /* flush */ 699 readl(mmio_base + PDC_SYS_CTL); /* flush */
704 700
701 /* Read current counter value */
702 start_count = pdc_read_counter(host);
703 do_gettimeofday(&start_time);
704
705 /* Let the counter run for 100 ms. */ 705 /* Let the counter run for 100 ms. */
706 mdelay(100); 706 mdelay(100);
707 707
@@ -719,7 +719,7 @@ static long pdc_detect_pll_input_clock(struct ata_host *host)
719 usec_elapsed = (end_time.tv_sec - start_time.tv_sec) * 1000000 + 719 usec_elapsed = (end_time.tv_sec - start_time.tv_sec) * 1000000 +
720 (end_time.tv_usec - start_time.tv_usec); 720 (end_time.tv_usec - start_time.tv_usec);
721 721
722 pll_clock = (start_count - end_count) / 100 * 722 pll_clock = ((start_count - end_count) & 0x3fffffff) / 100 *
723 (100000000 / usec_elapsed); 723 (100000000 / usec_elapsed);
724 724
725 PDPRINTK("start[%ld] end[%ld] \n", start_count, end_count); 725 PDPRINTK("start[%ld] end[%ld] \n", start_count, end_count);
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index a909f793ff..5086d03f2d 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -22,7 +22,7 @@
22#include <linux/pata_platform.h> 22#include <linux/pata_platform.h>
23 23
24#define DRV_NAME "pata_platform" 24#define DRV_NAME "pata_platform"
25#define DRV_VERSION "1.0" 25#define DRV_VERSION "1.1"
26 26
27static int pio_mask = 1; 27static int pio_mask = 1;
28 28
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c
index b8b2d11e41..5edf67b1f3 100644
--- a/drivers/ata/pata_sc1200.c
+++ b/drivers/ata/pata_sc1200.c
@@ -40,7 +40,7 @@
40#include <linux/libata.h> 40#include <linux/libata.h>
41 41
42#define DRV_NAME "sc1200" 42#define DRV_NAME "sc1200"
43#define DRV_VERSION "0.2.5" 43#define DRV_VERSION "0.2.6"
44 44
45#define SC1200_REV_A 0x00 45#define SC1200_REV_A 0x00
46#define SC1200_REV_B1 0x01 46#define SC1200_REV_B1 0x01
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
index 36cdbd2b0b..2d048ef25a 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -43,7 +43,7 @@
43#include <linux/libata.h> 43#include <linux/libata.h>
44 44
45#define DRV_NAME "pata_scc" 45#define DRV_NAME "pata_scc"
46#define DRV_VERSION "0.2" 46#define DRV_VERSION "0.3"
47 47
48#define PCI_DEVICE_ID_TOSHIBA_SCC_ATA 0x01b4 48#define PCI_DEVICE_ID_TOSHIBA_SCC_ATA 0x01b4
49 49
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index 89691541fe..0faf99c8f1 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -41,7 +41,7 @@
41#include <linux/libata.h> 41#include <linux/libata.h>
42 42
43#define DRV_NAME "pata_serverworks" 43#define DRV_NAME "pata_serverworks"
44#define DRV_VERSION "0.4.1" 44#define DRV_VERSION "0.4.2"
45 45
46#define SVWKS_CSB5_REVISION_NEW 0x92 /* min PCI_REVISION_ID for UDMA5 (A2.0) */ 46#define SVWKS_CSB5_REVISION_NEW 0x92 /* min PCI_REVISION_ID for UDMA5 (A2.0) */
47#define SVWKS_CSB6_REVISION 0xa0 /* min PCI_REVISION_ID for UDMA4 (A1.0) */ 47#define SVWKS_CSB6_REVISION 0xa0 /* min PCI_REVISION_ID for UDMA4 (A1.0) */
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
index b0cd52d6e3..40395804a6 100644
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -33,7 +33,7 @@
33#include <linux/libata.h> 33#include <linux/libata.h>
34 34
35#define DRV_NAME "pata_sil680" 35#define DRV_NAME "pata_sil680"
36#define DRV_VERSION "0.4.6" 36#define DRV_VERSION "0.4.7"
37 37
38#define SIL680_MMIO_BAR 5 38#define SIL680_MMIO_BAR 5
39 39
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index 66bd0e83ac..cce2834b2b 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -54,6 +54,7 @@ struct sis_laptop {
54static const struct sis_laptop sis_laptop[] = { 54static const struct sis_laptop sis_laptop[] = {
55 /* devid, subvendor, subdev */ 55 /* devid, subvendor, subdev */
56 { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */ 56 { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */
57 { 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */
57 /* end marker */ 58 /* end marker */
58 { 0, } 59 { 0, }
59}; 60};
@@ -374,8 +375,9 @@ static void sis_66_set_dmamode (struct ata_port *ap, struct ata_device *adev)
374 int drive_pci = sis_old_port_base(adev); 375 int drive_pci = sis_old_port_base(adev);
375 u16 timing; 376 u16 timing;
376 377
378 /* MWDMA 0-2 and UDMA 0-5 */
377 const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 }; 379 const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 };
378 const u16 udma_bits[] = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000}; 380 const u16 udma_bits[] = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000, 0x8000 };
379 381
380 pci_read_config_word(pdev, drive_pci, &timing); 382 pci_read_config_word(pdev, drive_pci, &timing);
381 383
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c
index 8c2813aa6c..c0f43bb259 100644
--- a/drivers/ata/pata_sl82c105.c
+++ b/drivers/ata/pata_sl82c105.c
@@ -26,7 +26,7 @@
26#include <linux/libata.h> 26#include <linux/libata.h>
27 27
28#define DRV_NAME "pata_sl82c105" 28#define DRV_NAME "pata_sl82c105"
29#define DRV_VERSION "0.3.1" 29#define DRV_VERSION "0.3.2"
30 30
31enum { 31enum {
32 /* 32 /*
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index f645fe22cd..636c4f1a0b 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -63,7 +63,7 @@
63#include <linux/dmi.h> 63#include <linux/dmi.h>
64 64
65#define DRV_NAME "pata_via" 65#define DRV_NAME "pata_via"
66#define DRV_VERSION "0.3.1" 66#define DRV_VERSION "0.3.2"
67 67
68/* 68/*
69 * The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx 69 * The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx
@@ -97,6 +97,7 @@ static const struct via_isa_bridge {
97 u8 rev_max; 97 u8 rev_max;
98 u16 flags; 98 u16 flags;
99} via_isa_bridges[] = { 99} via_isa_bridges[] = {
100 { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
100 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 101 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
101 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 102 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
102 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 103 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
@@ -144,6 +145,9 @@ static int via_cable_override(struct pci_dev *pdev)
144 /* Systems by DMI */ 145 /* Systems by DMI */
145 if (dmi_check_system(cable_dmi_table)) 146 if (dmi_check_system(cable_dmi_table))
146 return 1; 147 return 1;
148 /* Arima W730-K8/Targa Visionary 811/... */
149 if (pdev->subsystem_vendor == 0x161F && pdev->subsystem_device == 0x2032)
150 return 1;
147 return 0; 151 return 0;
148} 152}
149 153
@@ -240,7 +244,6 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo
240 int ut; 244 int ut;
241 int offset = 3 - (2*ap->port_no) - adev->devno; 245 int offset = 3 - (2*ap->port_no) - adev->devno;
242 246
243
244 /* Calculate the timing values we require */ 247 /* Calculate the timing values we require */
245 ata_timing_compute(adev, mode, &t, T, UT); 248 ata_timing_compute(adev, mode, &t, T, UT);
246 249
@@ -287,9 +290,17 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo
287 ut = t.udma ? (0xe0 | (FIT(t.udma, 2, 9) - 2)) : 0x07; 290 ut = t.udma ? (0xe0 | (FIT(t.udma, 2, 9) - 2)) : 0x07;
288 break; 291 break;
289 } 292 }
293
290 /* Set UDMA unless device is not UDMA capable */ 294 /* Set UDMA unless device is not UDMA capable */
291 if (udma_type) 295 if (udma_type) {
292 pci_write_config_byte(pdev, 0x50 + offset, ut); 296 u8 cable80_status;
297
298 /* Get 80-wire cable detection bit */
299 pci_read_config_byte(pdev, 0x50 + offset, &cable80_status);
300 cable80_status &= 0x10;
301
302 pci_write_config_byte(pdev, 0x50 + offset, ut | cable80_status);
303 }
293} 304}
294 305
295static void via_set_piomode(struct ata_port *ap, struct ata_device *adev) 306static void via_set_piomode(struct ata_port *ap, struct ata_device *adev)
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index bec1de594d..5c79271401 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -44,7 +44,7 @@
44#include <linux/libata.h> 44#include <linux/libata.h>
45 45
46#define DRV_NAME "pdc_adma" 46#define DRV_NAME "pdc_adma"
47#define DRV_VERSION "0.06" 47#define DRV_VERSION "1.0"
48 48
49/* macro to calculate base address for ATA regs */ 49/* macro to calculate base address for ATA regs */
50#define ADMA_ATA_REGS(base,port_no) ((base) + ((port_no) * 0x40)) 50#define ADMA_ATA_REGS(base,port_no) ((base) + ((port_no) * 0x40))
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index a9c948d760..fdbed8ecdf 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -28,7 +28,7 @@
28#include <scsi/scsi_device.h> 28#include <scsi/scsi_device.h>
29 29
30#define DRV_NAME "sata_inic162x" 30#define DRV_NAME "sata_inic162x"
31#define DRV_VERSION "0.2" 31#define DRV_VERSION "0.3"
32 32
33enum { 33enum {
34 MMIO_BAR = 5, 34 MMIO_BAR = 5,
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 3acf65e75e..cb7dec97fe 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -72,7 +72,7 @@
72#include <linux/libata.h> 72#include <linux/libata.h>
73 73
74#define DRV_NAME "sata_mv" 74#define DRV_NAME "sata_mv"
75#define DRV_VERSION "0.81" 75#define DRV_VERSION "1.0"
76 76
77enum { 77enum {
78 /* BAR's are enumerated in terms of pci_resource_start() terms */ 78 /* BAR's are enumerated in terms of pci_resource_start() terms */
@@ -313,7 +313,10 @@ enum {
313#define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE) 313#define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE)
314 314
315enum { 315enum {
316 MV_DMA_BOUNDARY = 0xffffffffU, 316 /* DMA boundary 0xffff is required by the s/g splitting
317 * we need on /length/ in mv_fill-sg().
318 */
319 MV_DMA_BOUNDARY = 0xffffU,
317 320
318 /* mask of register bits containing lower 32 bits 321 /* mask of register bits containing lower 32 bits
319 * of EDMA request queue DMA address 322 * of EDMA request queue DMA address
@@ -448,7 +451,7 @@ static struct scsi_host_template mv5_sht = {
448 .queuecommand = ata_scsi_queuecmd, 451 .queuecommand = ata_scsi_queuecmd,
449 .can_queue = ATA_DEF_QUEUE, 452 .can_queue = ATA_DEF_QUEUE,
450 .this_id = ATA_SHT_THIS_ID, 453 .this_id = ATA_SHT_THIS_ID,
451 .sg_tablesize = MV_MAX_SG_CT, 454 .sg_tablesize = MV_MAX_SG_CT / 2,
452 .cmd_per_lun = ATA_SHT_CMD_PER_LUN, 455 .cmd_per_lun = ATA_SHT_CMD_PER_LUN,
453 .emulated = ATA_SHT_EMULATED, 456 .emulated = ATA_SHT_EMULATED,
454 .use_clustering = 1, 457 .use_clustering = 1,
@@ -466,7 +469,7 @@ static struct scsi_host_template mv6_sht = {
466 .queuecommand = ata_scsi_queuecmd, 469 .queuecommand = ata_scsi_queuecmd,
467 .can_queue = ATA_DEF_QUEUE, 470 .can_queue = ATA_DEF_QUEUE,
468 .this_id = ATA_SHT_THIS_ID, 471 .this_id = ATA_SHT_THIS_ID,
469 .sg_tablesize = MV_MAX_SG_CT, 472 .sg_tablesize = MV_MAX_SG_CT / 2,
470 .cmd_per_lun = ATA_SHT_CMD_PER_LUN, 473 .cmd_per_lun = ATA_SHT_CMD_PER_LUN,
471 .emulated = ATA_SHT_EMULATED, 474 .emulated = ATA_SHT_EMULATED,
472 .use_clustering = 1, 475 .use_clustering = 1,
@@ -1139,15 +1142,27 @@ static unsigned int mv_fill_sg(struct ata_queued_cmd *qc)
1139 dma_addr_t addr = sg_dma_address(sg); 1142 dma_addr_t addr = sg_dma_address(sg);
1140 u32 sg_len = sg_dma_len(sg); 1143 u32 sg_len = sg_dma_len(sg);
1141 1144
1142 mv_sg->addr = cpu_to_le32(addr & 0xffffffff); 1145 while (sg_len) {
1143 mv_sg->addr_hi = cpu_to_le32((addr >> 16) >> 16); 1146 u32 offset = addr & 0xffff;
1144 mv_sg->flags_size = cpu_to_le32(sg_len & 0xffff); 1147 u32 len = sg_len;
1148
1149 if ((offset + sg_len > 0x10000))
1150 len = 0x10000 - offset;
1151
1152 mv_sg->addr = cpu_to_le32(addr & 0xffffffff);
1153 mv_sg->addr_hi = cpu_to_le32((addr >> 16) >> 16);
1154 mv_sg->flags_size = cpu_to_le32(len);
1145 1155
1146 if (ata_sg_is_last(sg, qc)) 1156 sg_len -= len;
1147 mv_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL); 1157 addr += len;
1158
1159 if (!sg_len && ata_sg_is_last(sg, qc))
1160 mv_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL);
1161
1162 mv_sg++;
1163 n_sg++;
1164 }
1148 1165
1149 mv_sg++;
1150 n_sg++;
1151 } 1166 }
1152 1167
1153 return n_sg; 1168 return n_sg;
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 0b58c4df6f..40dc731398 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -49,7 +49,7 @@
49#include <linux/libata.h> 49#include <linux/libata.h>
50 50
51#define DRV_NAME "sata_nv" 51#define DRV_NAME "sata_nv"
52#define DRV_VERSION "3.4" 52#define DRV_VERSION "3.5"
53 53
54#define NV_ADMA_DMA_BOUNDARY 0xffffffffUL 54#define NV_ADMA_DMA_BOUNDARY 0xffffffffUL
55 55
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index d39ebc23c4..25698cf0dc 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -45,7 +45,7 @@
45#include "sata_promise.h" 45#include "sata_promise.h"
46 46
47#define DRV_NAME "sata_promise" 47#define DRV_NAME "sata_promise"
48#define DRV_VERSION "2.09" 48#define DRV_VERSION "2.10"
49 49
50enum { 50enum {
51 PDC_MAX_PORTS = 4, 51 PDC_MAX_PORTS = 4,
@@ -328,8 +328,8 @@ static const struct pci_device_id pdc_ata_pci_tbl[] = {
328 328
329 { PCI_VDEVICE(PROMISE, 0x3318), board_20319 }, 329 { PCI_VDEVICE(PROMISE, 0x3318), board_20319 },
330 { PCI_VDEVICE(PROMISE, 0x3319), board_20319 }, 330 { PCI_VDEVICE(PROMISE, 0x3319), board_20319 },
331 { PCI_VDEVICE(PROMISE, 0x3515), board_20319 }, 331 { PCI_VDEVICE(PROMISE, 0x3515), board_40518 },
332 { PCI_VDEVICE(PROMISE, 0x3519), board_20319 }, 332 { PCI_VDEVICE(PROMISE, 0x3519), board_40518 },
333 { PCI_VDEVICE(PROMISE, 0x3d17), board_40518 }, 333 { PCI_VDEVICE(PROMISE, 0x3d17), board_40518 },
334 { PCI_VDEVICE(PROMISE, 0x3d18), board_40518 }, 334 { PCI_VDEVICE(PROMISE, 0x3d18), board_40518 },
335 335
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c
index c8f9242e7f..5e1dfdda69 100644
--- a/drivers/ata/sata_qstor.c
+++ b/drivers/ata/sata_qstor.c
@@ -39,7 +39,7 @@
39#include <linux/libata.h> 39#include <linux/libata.h>
40 40
41#define DRV_NAME "sata_qstor" 41#define DRV_NAME "sata_qstor"
42#define DRV_VERSION "0.08" 42#define DRV_VERSION "0.09"
43 43
44enum { 44enum {
45 QS_MMIO_BAR = 4, 45 QS_MMIO_BAR = 4,
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index db67637589..8c72e714b4 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -46,7 +46,7 @@
46#include <linux/libata.h> 46#include <linux/libata.h>
47 47
48#define DRV_NAME "sata_sil" 48#define DRV_NAME "sata_sil"
49#define DRV_VERSION "2.2" 49#define DRV_VERSION "2.3"
50 50
51enum { 51enum {
52 SIL_MMIO_BAR = 5, 52 SIL_MMIO_BAR = 5,
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 46fbbe7f12..233e886933 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -30,7 +30,7 @@
30#include <linux/libata.h> 30#include <linux/libata.h>
31 31
32#define DRV_NAME "sata_sil24" 32#define DRV_NAME "sata_sil24"
33#define DRV_VERSION "0.9" 33#define DRV_VERSION "1.0"
34 34
35/* 35/*
36 * Port request block (PRB) 32 bytes 36 * Port request block (PRB) 32 bytes
@@ -888,6 +888,16 @@ static inline void sil24_host_intr(struct ata_port *ap)
888 u32 slot_stat, qc_active; 888 u32 slot_stat, qc_active;
889 int rc; 889 int rc;
890 890
891 /* If PCIX_IRQ_WOC, there's an inherent race window between
892 * clearing IRQ pending status and reading PORT_SLOT_STAT
893 * which may cause spurious interrupts afterwards. This is
894 * unavoidable and much better than losing interrupts which
895 * happens if IRQ pending is cleared after reading
896 * PORT_SLOT_STAT.
897 */
898 if (ap->flags & SIL24_FLAG_PCIX_IRQ_WOC)
899 writel(PORT_IRQ_COMPLETE, port + PORT_IRQ_STAT);
900
891 slot_stat = readl(port + PORT_SLOT_STAT); 901 slot_stat = readl(port + PORT_SLOT_STAT);
892 902
893 if (unlikely(slot_stat & HOST_SSTAT_ATTN)) { 903 if (unlikely(slot_stat & HOST_SSTAT_ATTN)) {
@@ -895,9 +905,6 @@ static inline void sil24_host_intr(struct ata_port *ap)
895 return; 905 return;
896 } 906 }
897 907
898 if (ap->flags & SIL24_FLAG_PCIX_IRQ_WOC)
899 writel(PORT_IRQ_COMPLETE, port + PORT_IRQ_STAT);
900
901 qc_active = slot_stat & ~HOST_SSTAT_ATTN; 908 qc_active = slot_stat & ~HOST_SSTAT_ATTN;
902 rc = ata_qc_complete_multiple(ap, qc_active, sil24_finish_qc); 909 rc = ata_qc_complete_multiple(ap, qc_active, sil24_finish_qc);
903 if (rc > 0) 910 if (rc > 0)
@@ -910,7 +917,8 @@ static inline void sil24_host_intr(struct ata_port *ap)
910 return; 917 return;
911 } 918 }
912 919
913 if (ata_ratelimit()) 920 /* spurious interrupts are expected if PCIX_IRQ_WOC */
921 if (!(ap->flags & SIL24_FLAG_PCIX_IRQ_WOC) && ata_ratelimit())
914 ata_port_printk(ap, KERN_INFO, "spurious interrupt " 922 ata_port_printk(ap, KERN_INFO, "spurious interrupt "
915 "(slot_stat 0x%x active_tag %d sactive 0x%x)\n", 923 "(slot_stat 0x%x active_tag %d sactive 0x%x)\n",
916 slot_stat, ap->active_tag, ap->sactive); 924 slot_stat, ap->active_tag, ap->sactive);
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c
index 31a2f55aae..41c1d6e8f1 100644
--- a/drivers/ata/sata_sis.c
+++ b/drivers/ata/sata_sis.c
@@ -43,7 +43,7 @@
43#include "sis.h" 43#include "sis.h"
44 44
45#define DRV_NAME "sata_sis" 45#define DRV_NAME "sata_sis"
46#define DRV_VERSION "0.8" 46#define DRV_VERSION "1.0"
47 47
48enum { 48enum {
49 sis_180 = 0, 49 sis_180 = 0,
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
index 92e8770750..d9678e7bc3 100644
--- a/drivers/ata/sata_svw.c
+++ b/drivers/ata/sata_svw.c
@@ -53,7 +53,7 @@
53#endif /* CONFIG_PPC_OF */ 53#endif /* CONFIG_PPC_OF */
54 54
55#define DRV_NAME "sata_svw" 55#define DRV_NAME "sata_svw"
56#define DRV_VERSION "2.2" 56#define DRV_VERSION "2.3"
57 57
58enum { 58enum {
59 /* ap->flags bits */ 59 /* ap->flags bits */
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c
index 5193bd8647..97aefdd87b 100644
--- a/drivers/ata/sata_sx4.c
+++ b/drivers/ata/sata_sx4.c
@@ -92,7 +92,7 @@
92#include "sata_promise.h" 92#include "sata_promise.h"
93 93
94#define DRV_NAME "sata_sx4" 94#define DRV_NAME "sata_sx4"
95#define DRV_VERSION "0.11" 95#define DRV_VERSION "0.12"
96 96
97 97
98enum { 98enum {
diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c
index 78c28512f0..e6b8b45279 100644
--- a/drivers/ata/sata_uli.c
+++ b/drivers/ata/sata_uli.c
@@ -36,7 +36,7 @@
36#include <linux/libata.h> 36#include <linux/libata.h>
37 37
38#define DRV_NAME "sata_uli" 38#define DRV_NAME "sata_uli"
39#define DRV_VERSION "1.2" 39#define DRV_VERSION "1.3"
40 40
41enum { 41enum {
42 uli_5289 = 0, 42 uli_5289 = 0,
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 86b7bfc173..57fd30de8f 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -46,7 +46,7 @@
46#include <linux/libata.h> 46#include <linux/libata.h>
47 47
48#define DRV_NAME "sata_via" 48#define DRV_NAME "sata_via"
49#define DRV_VERSION "2.2" 49#define DRV_VERSION "2.3"
50 50
51enum board_ids_enum { 51enum board_ids_enum {
52 vt6420, 52 vt6420,
@@ -371,7 +371,7 @@ static void vt6421_set_dma_mode(struct ata_port *ap, struct ata_device *adev)
371{ 371{
372 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 372 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
373 static const u8 udma_bits[] = { 0xEE, 0xE8, 0xE6, 0xE4, 0xE2, 0xE1, 0xE0, 0xE0 }; 373 static const u8 udma_bits[] = { 0xEE, 0xE8, 0xE6, 0xE4, 0xE2, 0xE1, 0xE0, 0xE0 };
374 pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev->pio_mode - XFER_UDMA_0]); 374 pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev->dma_mode - XFER_UDMA_0]);
375} 375}
376 376
377static const unsigned int svia_bar_sizes[] = { 377static const unsigned int svia_bar_sizes[] = {
diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c
index 24344d0d05..1920915dfa 100644
--- a/drivers/ata/sata_vsc.c
+++ b/drivers/ata/sata_vsc.c
@@ -47,7 +47,7 @@
47#include <linux/libata.h> 47#include <linux/libata.h>
48 48
49#define DRV_NAME "sata_vsc" 49#define DRV_NAME "sata_vsc"
50#define DRV_VERSION "2.2" 50#define DRV_VERSION "2.3"
51 51
52enum { 52enum {
53 VSC_MMIO_BAR = 0, 53 VSC_MMIO_BAR = 0,
diff --git a/drivers/base/core.c b/drivers/base/core.c
index e6738bcbe5..ec86d6fc23 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -284,6 +284,7 @@ static ssize_t show_uevent(struct device *dev, struct device_attribute *attr,
284 284
285 /* let the kset specific function add its keys */ 285 /* let the kset specific function add its keys */
286 pos = data; 286 pos = data;
287 memset(envp, 0, sizeof(envp));
287 retval = kset->uevent_ops->uevent(kset, &dev->kobj, 288 retval = kset->uevent_ops->uevent(kset, &dev->kobj,
288 envp, ARRAY_SIZE(envp), 289 envp, ARRAY_SIZE(envp),
289 pos, PAGE_SIZE); 290 pos, PAGE_SIZE);
@@ -585,9 +586,13 @@ void device_initialize(struct device *dev)
585static struct kobject * get_device_parent(struct device *dev, 586static struct kobject * get_device_parent(struct device *dev,
586 struct device *parent) 587 struct device *parent)
587{ 588{
588 /* Set the parent to the class, not the parent device */ 589 /*
589 /* this keeps sysfs from having a symlink to make old udevs happy */ 590 * Set the parent to the class, not the parent device
590 if (dev->class) 591 * for topmost devices in class hierarchy.
592 * This keeps sysfs from having a symlink to make old
593 * udevs happy
594 */
595 if (dev->class && (!parent || parent->class != dev->class))
591 return &dev->class->subsys.kobj; 596 return &dev->class->subsys.kobj;
592 else if (parent) 597 else if (parent)
593 return &parent->kobj; 598 return &parent->kobj;
@@ -679,14 +684,26 @@ static int device_add_class_symlinks(struct device *dev)
679 goto out_subsys; 684 goto out_subsys;
680 } 685 }
681 if (dev->parent) { 686 if (dev->parent) {
682 error = sysfs_create_link(&dev->kobj, &dev->parent->kobj,
683 "device");
684 if (error)
685 goto out_busid;
686#ifdef CONFIG_SYSFS_DEPRECATED 687#ifdef CONFIG_SYSFS_DEPRECATED
687 { 688 {
688 char * class_name = make_class_name(dev->class->name, 689 struct device *parent = dev->parent;
689 &dev->kobj); 690 char *class_name;
691
692 /*
693 * In old sysfs stacked class devices had 'device'
694 * link pointing to real device instead of parent
695 */
696 while (parent->class && !parent->bus && parent->parent)
697 parent = parent->parent;
698
699 error = sysfs_create_link(&dev->kobj,
700 &parent->kobj,
701 "device");
702 if (error)
703 goto out_busid;
704
705 class_name = make_class_name(dev->class->name,
706 &dev->kobj);
690 if (class_name) 707 if (class_name)
691 error = sysfs_create_link(&dev->parent->kobj, 708 error = sysfs_create_link(&dev->parent->kobj,
692 &dev->kobj, class_name); 709 &dev->kobj, class_name);
@@ -694,6 +711,11 @@ static int device_add_class_symlinks(struct device *dev)
694 if (error) 711 if (error)
695 goto out_device; 712 goto out_device;
696 } 713 }
714#else
715 error = sysfs_create_link(&dev->kobj, &dev->parent->kobj,
716 "device");
717 if (error)
718 goto out_busid;
697#endif 719#endif
698 } 720 }
699 return 0; 721 return 0;
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 92bf868ca0..84d6aa500e 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -17,8 +17,8 @@
17*/ 17*/
18 18
19 19
20#define DAC960_DriverVersion "2.5.48" 20#define DAC960_DriverVersion "2.5.49"
21#define DAC960_DriverDate "14 May 2006" 21#define DAC960_DriverDate "21 Aug 2007"
22 22
23 23
24#include <linux/module.h> 24#include <linux/module.h>
@@ -31,6 +31,7 @@
31#include <linux/genhd.h> 31#include <linux/genhd.h>
32#include <linux/hdreg.h> 32#include <linux/hdreg.h>
33#include <linux/blkpg.h> 33#include <linux/blkpg.h>
34#include <linux/dma-mapping.h>
34#include <linux/interrupt.h> 35#include <linux/interrupt.h>
35#include <linux/ioport.h> 36#include <linux/ioport.h>
36#include <linux/mm.h> 37#include <linux/mm.h>
@@ -1165,9 +1166,9 @@ static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
1165 int i; 1166 int i;
1166 1167
1167 1168
1168 if (pci_set_dma_mask(Controller->PCIDevice, DAC690_V1_PciDmaMask)) 1169 if (pci_set_dma_mask(Controller->PCIDevice, DMA_32BIT_MASK))
1169 return DAC960_Failure(Controller, "DMA mask out of range"); 1170 return DAC960_Failure(Controller, "DMA mask out of range");
1170 Controller->BounceBufferLimit = DAC690_V1_PciDmaMask; 1171 Controller->BounceBufferLimit = DMA_32BIT_MASK;
1171 1172
1172 if ((hw_type == DAC960_PD_Controller) || (hw_type == DAC960_P_Controller)) { 1173 if ((hw_type == DAC960_PD_Controller) || (hw_type == DAC960_P_Controller)) {
1173 CommandMailboxesSize = 0; 1174 CommandMailboxesSize = 0;
@@ -1368,9 +1369,12 @@ static bool DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T
1368 dma_addr_t CommandMailboxDMA; 1369 dma_addr_t CommandMailboxDMA;
1369 DAC960_V2_CommandStatus_T CommandStatus; 1370 DAC960_V2_CommandStatus_T CommandStatus;
1370 1371
1371 if (pci_set_dma_mask(Controller->PCIDevice, DAC690_V2_PciDmaMask)) 1372 if (!pci_set_dma_mask(Controller->PCIDevice, DMA_64BIT_MASK))
1372 return DAC960_Failure(Controller, "DMA mask out of range"); 1373 Controller->BounceBufferLimit = DMA_64BIT_MASK;
1373 Controller->BounceBufferLimit = DAC690_V2_PciDmaMask; 1374 else if (!pci_set_dma_mask(Controller->PCIDevice, DMA_32BIT_MASK))
1375 Controller->BounceBufferLimit = DMA_32BIT_MASK;
1376 else
1377 return DAC960_Failure(Controller, "DMA mask out of range");
1374 1378
1375 /* This is a temporary dma mapping, used only in the scope of this function */ 1379 /* This is a temporary dma mapping, used only in the scope of this function */
1376 CommandMailbox = pci_alloc_consistent(PCI_Device, 1380 CommandMailbox = pci_alloc_consistent(PCI_Device,
diff --git a/drivers/block/DAC960.h b/drivers/block/DAC960.h
index f5e2436c39..85fa9bb637 100644
--- a/drivers/block/DAC960.h
+++ b/drivers/block/DAC960.h
@@ -61,13 +61,6 @@
61#define DAC960_V2_MaxPhysicalDevices 272 61#define DAC960_V2_MaxPhysicalDevices 272
62 62
63/* 63/*
64 Define the pci dma mask supported by DAC960 V1 and V2 Firmware Controlers
65 */
66
67#define DAC690_V1_PciDmaMask 0xffffffff
68#define DAC690_V2_PciDmaMask 0xffffffffffffffffULL
69
70/*
71 Define a 32/64 bit I/O Address data type. 64 Define a 32/64 bit I/O Address data type.
72*/ 65*/
73 66
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index 4dff49256a..317a790c15 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -417,7 +417,7 @@ static int __send_request(struct request *req)
417 desc->req_id = port->req_id; 417 desc->req_id = port->req_id;
418 desc->operation = op; 418 desc->operation = op;
419 if (port->vdisk_type == VD_DISK_TYPE_DISK) { 419 if (port->vdisk_type == VD_DISK_TYPE_DISK) {
420 desc->slice = 2; 420 desc->slice = 0xff;
421 } else { 421 } else {
422 desc->slice = 0; 422 desc->slice = 0;
423 } 423 }
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
index 59b054810e..98a9cdeaff 100644
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -691,15 +691,18 @@ static void hci_usb_rx_complete(struct urb *urb)
691 urb->iso_frame_desc[i].offset, 691 urb->iso_frame_desc[i].offset,
692 urb->iso_frame_desc[i].actual_length); 692 urb->iso_frame_desc[i].actual_length);
693 693
694 if (!urb->iso_frame_desc[i].status) 694 if (!urb->iso_frame_desc[i].status) {
695 husb->hdev->stat.byte_rx += urb->iso_frame_desc[i].actual_length;
695 hci_recv_fragment(husb->hdev, _urb->type, 696 hci_recv_fragment(husb->hdev, _urb->type,
696 urb->transfer_buffer + urb->iso_frame_desc[i].offset, 697 urb->transfer_buffer + urb->iso_frame_desc[i].offset,
697 urb->iso_frame_desc[i].actual_length); 698 urb->iso_frame_desc[i].actual_length);
699 }
698 } 700 }
699#else 701#else
700 ; 702 ;
701#endif 703#endif
702 } else { 704 } else {
705 husb->hdev->stat.byte_rx += count;
703 err = hci_recv_fragment(husb->hdev, _urb->type, urb->transfer_buffer, count); 706 err = hci_recv_fragment(husb->hdev, _urb->type, urb->transfer_buffer, count);
704 if (err < 0) { 707 if (err < 0) {
705 BT_ERR("%s corrupted packet: type %d count %d", 708 BT_ERR("%s corrupted packet: type %d count %d",
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 67ee3d4b28..79245714f0 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -1032,6 +1032,10 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp)
1032 check_disk_change(ip->i_bdev); 1032 check_disk_change(ip->i_bdev);
1033 return 0; 1033 return 0;
1034err_release: 1034err_release:
1035 if (CDROM_CAN(CDC_LOCK) && cdi->options & CDO_LOCK) {
1036 cdi->ops->lock_door(cdi, 0);
1037 cdinfo(CD_OPEN, "door unlocked.\n");
1038 }
1035 cdi->ops->release(cdi); 1039 cdi->ops->release(cdi);
1036err: 1040err:
1037 cdi->use_count--; 1041 cdi->use_count--;
diff --git a/drivers/char/Makefile b/drivers/char/Makefile
index d68ddbe70f..c78ff26647 100644
--- a/drivers/char/Makefile
+++ b/drivers/char/Makefile
@@ -129,7 +129,7 @@ $(obj)/defkeymap.o: $(obj)/defkeymap.c
129 129
130ifdef GENERATE_KEYMAP 130ifdef GENERATE_KEYMAP
131 131
132$(obj)/defkeymap.c $(obj)/%.c: $(src)/%.map 132$(obj)/defkeymap.c: $(obj)/%.c: $(src)/%.map
133 loadkeys --mktable $< > $@.tmp 133 loadkeys --mktable $< > $@.tmp
134 sed -e 's/^static *//' $@.tmp > $@ 134 sed -e 's/^static *//' $@.tmp > $@
135 rm $@.tmp 135 rm $@.tmp
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
index 35ab1a9f8e..8955e7ff75 100644
--- a/drivers/char/agp/agp.h
+++ b/drivers/char/agp/agp.h
@@ -176,7 +176,7 @@ struct agp_bridge_data {
176#define I830_GMCH_MEM_MASK 0x1 176#define I830_GMCH_MEM_MASK 0x1
177#define I830_GMCH_MEM_64M 0x1 177#define I830_GMCH_MEM_64M 0x1
178#define I830_GMCH_MEM_128M 0 178#define I830_GMCH_MEM_128M 0
179#define I830_GMCH_GMS_MASK 0xF0 179#define I830_GMCH_GMS_MASK 0x70
180#define I830_GMCH_GMS_DISABLED 0x00 180#define I830_GMCH_GMS_DISABLED 0x00
181#define I830_GMCH_GMS_LOCAL 0x10 181#define I830_GMCH_GMS_LOCAL 0x10
182#define I830_GMCH_GMS_STOLEN_512 0x20 182#define I830_GMCH_GMS_STOLEN_512 0x20
@@ -190,6 +190,7 @@ struct agp_bridge_data {
190#define INTEL_I830_ERRSTS 0x92 190#define INTEL_I830_ERRSTS 0x92
191 191
192/* Intel 855GM/852GM registers */ 192/* Intel 855GM/852GM registers */
193#define I855_GMCH_GMS_MASK 0xF0
193#define I855_GMCH_GMS_STOLEN_0M 0x0 194#define I855_GMCH_GMS_STOLEN_0M 0x0
194#define I855_GMCH_GMS_STOLEN_1M (0x1 << 4) 195#define I855_GMCH_GMS_STOLEN_1M (0x1 << 4)
195#define I855_GMCH_GMS_STOLEN_4M (0x2 << 4) 196#define I855_GMCH_GMS_STOLEN_4M (0x2 << 4)
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
index df0ddf14b8..f60bca70d1 100644
--- a/drivers/char/agp/amd-k7-agp.c
+++ b/drivers/char/agp/amd-k7-agp.c
@@ -223,6 +223,8 @@ static int amd_irongate_configure(void)
223 pci_read_config_dword(agp_bridge->dev, AMD_MMBASE, &temp); 223 pci_read_config_dword(agp_bridge->dev, AMD_MMBASE, &temp);
224 temp = (temp & PCI_BASE_ADDRESS_MEM_MASK); 224 temp = (temp & PCI_BASE_ADDRESS_MEM_MASK);
225 amd_irongate_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096); 225 amd_irongate_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096);
226 if (!amd_irongate_private.registers)
227 return -ENOMEM;
226 228
227 /* Write out the address of the gatt table */ 229 /* Write out the address of the gatt table */
228 writel(agp_bridge->gatt_bus_addr, amd_irongate_private.registers+AMD_ATTBASE); 230 writel(agp_bridge->gatt_bus_addr, amd_irongate_private.registers+AMD_ATTBASE);
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c
index da7513d7b4..2d46b713c8 100644
--- a/drivers/char/agp/ati-agp.c
+++ b/drivers/char/agp/ati-agp.c
@@ -213,6 +213,9 @@ static int ati_configure(void)
213 temp = (temp & 0xfffff000); 213 temp = (temp & 0xfffff000);
214 ati_generic_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096); 214 ati_generic_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096);
215 215
216 if (!ati_generic_private.registers)
217 return -ENOMEM;
218
216 if (is_r200()) 219 if (is_r200())
217 pci_write_config_dword(agp_bridge->dev, ATI_RS100_IG_AGPMODE, 0x20000); 220 pci_write_config_dword(agp_bridge->dev, ATI_RS100_IG_AGPMODE, 0x20000);
218 else 221 else
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c
index df8da72628..d78cd09186 100644
--- a/drivers/char/agp/efficeon-agp.c
+++ b/drivers/char/agp/efficeon-agp.c
@@ -375,6 +375,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev,
375 if (!r->start && r->end) { 375 if (!r->start && r->end) {
376 if (pci_assign_resource(pdev, 0)) { 376 if (pci_assign_resource(pdev, 0)) {
377 printk(KERN_ERR PFX "could not assign resource 0\n"); 377 printk(KERN_ERR PFX "could not assign resource 0\n");
378 agp_put_bridge(bridge);
378 return -ENODEV; 379 return -ENODEV;
379 } 380 }
380 } 381 }
@@ -386,6 +387,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev,
386 */ 387 */
387 if (pci_enable_device(pdev)) { 388 if (pci_enable_device(pdev)) {
388 printk(KERN_ERR PFX "Unable to Enable PCI device\n"); 389 printk(KERN_ERR PFX "Unable to Enable PCI device\n");
390 agp_put_bridge(bridge);
389 return -ENODEV; 391 return -ENODEV;
390 } 392 }
391 393
diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c
index bcdb149c81..313a133a11 100644
--- a/drivers/char/agp/hp-agp.c
+++ b/drivers/char/agp/hp-agp.c
@@ -221,6 +221,7 @@ hp_zx1_lba_init (u64 hpa)
221 if (cap != PCI_CAP_ID_AGP) { 221 if (cap != PCI_CAP_ID_AGP) {
222 printk(KERN_ERR PFX "Invalid capability ID 0x%02x at 0x%x\n", 222 printk(KERN_ERR PFX "Invalid capability ID 0x%02x at 0x%x\n",
223 cap, hp->lba_cap_offset); 223 cap, hp->lba_cap_offset);
224 iounmap(hp->lba_regs);
224 return -ENODEV; 225 return -ENODEV;
225 } 226 }
226 227
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c
index 53354bf83a..75d2aca635 100644
--- a/drivers/char/agp/i460-agp.c
+++ b/drivers/char/agp/i460-agp.c
@@ -249,6 +249,10 @@ static int i460_create_gatt_table (struct agp_bridge_data *bridge)
249 num_entries = A_SIZE_8(temp)->num_entries; 249 num_entries = A_SIZE_8(temp)->num_entries;
250 250
251 i460.gatt = ioremap(INTEL_I460_ATTBASE, PAGE_SIZE << page_order); 251 i460.gatt = ioremap(INTEL_I460_ATTBASE, PAGE_SIZE << page_order);
252 if (!i460.gatt) {
253 printk(KERN_ERR PFX "ioremap failed\n");
254 return -ENOMEM;
255 }
252 256
253 /* These are no good, the should be removed from the agp_bridge strucure... */ 257 /* These are no good, the should be removed from the agp_bridge strucure... */
254 agp_bridge->gatt_table_real = NULL; 258 agp_bridge->gatt_table_real = NULL;
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 294cdbf4d4..141ca176c3 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -506,7 +506,7 @@ static void intel_i830_init_gtt_entries(void)
506 break; 506 break;
507 } 507 }
508 } else { 508 } else {
509 switch (gmch_ctrl & I830_GMCH_GMS_MASK) { 509 switch (gmch_ctrl & I855_GMCH_GMS_MASK) {
510 case I855_GMCH_GMS_STOLEN_1M: 510 case I855_GMCH_GMS_STOLEN_1M:
511 gtt_entries = MB(1) - KB(size); 511 gtt_entries = MB(1) - KB(size);
512 break; 512 break;
@@ -914,6 +914,7 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
914 struct aper_size_info_fixed *size; 914 struct aper_size_info_fixed *size;
915 int num_entries; 915 int num_entries;
916 u32 temp, temp2; 916 u32 temp, temp2;
917 int gtt_map_size = 256 * 1024;
917 918
918 size = agp_bridge->current_size; 919 size = agp_bridge->current_size;
919 page_order = size->page_order; 920 page_order = size->page_order;
@@ -923,15 +924,19 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
923 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp); 924 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp);
924 pci_read_config_dword(intel_private.pcidev, I915_PTEADDR,&temp2); 925 pci_read_config_dword(intel_private.pcidev, I915_PTEADDR,&temp2);
925 926
926 intel_private.gtt = ioremap(temp2, 256 * 1024); 927 if (IS_G33)
928 gtt_map_size = 1024 * 1024; /* 1M on G33 */
929 intel_private.gtt = ioremap(temp2, gtt_map_size);
927 if (!intel_private.gtt) 930 if (!intel_private.gtt)
928 return -ENOMEM; 931 return -ENOMEM;
929 932
930 temp &= 0xfff80000; 933 temp &= 0xfff80000;
931 934
932 intel_private.registers = ioremap(temp,128 * 4096); 935 intel_private.registers = ioremap(temp,128 * 4096);
933 if (!intel_private.registers) 936 if (!intel_private.registers) {
937 iounmap(intel_private.gtt);
934 return -ENOMEM; 938 return -ENOMEM;
939 }
935 940
936 temp = readl(intel_private.registers+I810_PGETBL_CTL) & 0xfffff000; 941 temp = readl(intel_private.registers+I810_PGETBL_CTL) & 0xfffff000;
937 global_cache_flush(); /* FIXME: ? */ 942 global_cache_flush(); /* FIXME: ? */
@@ -985,13 +990,15 @@ static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge)
985 temp &= 0xfff00000; 990 temp &= 0xfff00000;
986 intel_private.gtt = ioremap((temp + (512 * 1024)) , 512 * 1024); 991 intel_private.gtt = ioremap((temp + (512 * 1024)) , 512 * 1024);
987 992
988 if (!intel_private.gtt) 993 if (!intel_private.gtt)
989 return -ENOMEM; 994 return -ENOMEM;
990 995
991 996
992 intel_private.registers = ioremap(temp,128 * 4096); 997 intel_private.registers = ioremap(temp,128 * 4096);
993 if (!intel_private.registers) 998 if (!intel_private.registers) {
994 return -ENOMEM; 999 iounmap(intel_private.gtt);
1000 return -ENOMEM;
1001 }
995 1002
996 temp = readl(intel_private.registers+I810_PGETBL_CTL) & 0xfffff000; 1003 temp = readl(intel_private.registers+I810_PGETBL_CTL) & 0xfffff000;
997 global_cache_flush(); /* FIXME: ? */ 1004 global_cache_flush(); /* FIXME: ? */
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c
index 6cd7373dcd..225ed2a53d 100644
--- a/drivers/char/agp/nvidia-agp.c
+++ b/drivers/char/agp/nvidia-agp.c
@@ -157,6 +157,9 @@ static int nvidia_configure(void)
157 nvidia_private.aperture = 157 nvidia_private.aperture =
158 (volatile u32 __iomem *) ioremap(apbase, 33 * PAGE_SIZE); 158 (volatile u32 __iomem *) ioremap(apbase, 33 * PAGE_SIZE);
159 159
160 if (!nvidia_private.aperture)
161 return -ENOMEM;
162
160 return 0; 163 return 0;
161} 164}
162 165
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c
index 9aaf401a89..0ecc54d327 100644
--- a/drivers/char/agp/via-agp.c
+++ b/drivers/char/agp/via-agp.c
@@ -399,6 +399,11 @@ static struct agp_device_ids via_agp_device_ids[] __devinitdata =
399 .device_id = PCI_DEVICE_ID_VIA_P4M890, 399 .device_id = PCI_DEVICE_ID_VIA_P4M890,
400 .chipset_name = "P4M890", 400 .chipset_name = "P4M890",
401 }, 401 },
402 /* P4M900 */
403 {
404 .device_id = PCI_DEVICE_ID_VIA_VT3364,
405 .chipset_name = "P4M900",
406 },
402 { }, /* dummy final entry, always present */ 407 { }, /* dummy final entry, always present */
403}; 408};
404 409
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c
index 923174c54a..c115b39b85 100644
--- a/drivers/char/drm/drm_bufs.c
+++ b/drivers/char/drm/drm_bufs.c
@@ -177,8 +177,14 @@ static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
177 MTRR_TYPE_WRCOMB, 1); 177 MTRR_TYPE_WRCOMB, 1);
178 } 178 }
179 } 179 }
180 if (map->type == _DRM_REGISTERS) 180 if (map->type == _DRM_REGISTERS) {
181 map->handle = ioremap(map->offset, map->size); 181 map->handle = ioremap(map->offset, map->size);
182 if (!map->handle) {
183 drm_free(map, sizeof(*map), DRM_MEM_MAPS);
184 return -ENOMEM;
185 }
186 }
187
182 break; 188 break;
183 case _DRM_SHM: 189 case _DRM_SHM:
184 list = drm_find_matching_map(dev, map); 190 list = drm_find_matching_map(dev, map);
@@ -479,11 +485,6 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
479 return -EINVAL; 485 return -EINVAL;
480 } 486 }
481 487
482 if (!map) {
483 mutex_unlock(&dev->struct_mutex);
484 return -EINVAL;
485 }
486
487 /* Register and framebuffer maps are permanent */ 488 /* Register and framebuffer maps are permanent */
488 if ((map->type == _DRM_REGISTERS) || (map->type == _DRM_FRAME_BUFFER)) { 489 if ((map->type == _DRM_REGISTERS) || (map->type == _DRM_FRAME_BUFFER)) {
489 mutex_unlock(&dev->struct_mutex); 490 mutex_unlock(&dev->struct_mutex);
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h
index 737088bd07..28b98733be 100644
--- a/drivers/char/drm/i915_drv.h
+++ b/drivers/char/drm/i915_drv.h
@@ -210,6 +210,12 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
210#define I915REG_INT_MASK_R 0x020a8 210#define I915REG_INT_MASK_R 0x020a8
211#define I915REG_INT_ENABLE_R 0x020a0 211#define I915REG_INT_ENABLE_R 0x020a0
212 212
213#define I915REG_PIPEASTAT 0x70024
214#define I915REG_PIPEBSTAT 0x71024
215
216#define I915_VBLANK_INTERRUPT_ENABLE (1UL<<17)
217#define I915_VBLANK_CLEAR (1UL<<1)
218
213#define SRX_INDEX 0x3c4 219#define SRX_INDEX 0x3c4
214#define SRX_DATA 0x3c5 220#define SRX_DATA 0x3c5
215#define SR01 1 221#define SR01 1
diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c
index 4b4b2ce898..bb8e9e9c82 100644
--- a/drivers/char/drm/i915_irq.c
+++ b/drivers/char/drm/i915_irq.c
@@ -214,6 +214,10 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
214 struct drm_device *dev = (struct drm_device *) arg; 214 struct drm_device *dev = (struct drm_device *) arg;
215 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; 215 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
216 u16 temp; 216 u16 temp;
217 u32 pipea_stats, pipeb_stats;
218
219 pipea_stats = I915_READ(I915REG_PIPEASTAT);
220 pipeb_stats = I915_READ(I915REG_PIPEBSTAT);
217 221
218 temp = I915_READ16(I915REG_INT_IDENTITY_R); 222 temp = I915_READ16(I915REG_INT_IDENTITY_R);
219 223
@@ -225,6 +229,8 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
225 return IRQ_NONE; 229 return IRQ_NONE;
226 230
227 I915_WRITE16(I915REG_INT_IDENTITY_R, temp); 231 I915_WRITE16(I915REG_INT_IDENTITY_R, temp);
232 (void) I915_READ16(I915REG_INT_IDENTITY_R);
233 DRM_READMEMORYBARRIER();
228 234
229 dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); 235 dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv);
230 236
@@ -252,6 +258,12 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
252 258
253 if (dev_priv->swaps_pending > 0) 259 if (dev_priv->swaps_pending > 0)
254 drm_locked_tasklet(dev, i915_vblank_tasklet); 260 drm_locked_tasklet(dev, i915_vblank_tasklet);
261 I915_WRITE(I915REG_PIPEASTAT,
262 pipea_stats|I915_VBLANK_INTERRUPT_ENABLE|
263 I915_VBLANK_CLEAR);
264 I915_WRITE(I915REG_PIPEBSTAT,
265 pipeb_stats|I915_VBLANK_INTERRUPT_ENABLE|
266 I915_VBLANK_CLEAR);
255 } 267 }
256 268
257 return IRQ_HANDLED; 269 return IRQ_HANDLED;
diff --git a/drivers/char/drm/via_dmablit.c b/drivers/char/drm/via_dmablit.c
index 832de1d9ba..3dd1ed3d1b 100644
--- a/drivers/char/drm/via_dmablit.c
+++ b/drivers/char/drm/via_dmablit.c
@@ -560,7 +560,7 @@ via_init_dmablit(struct drm_device *dev)
560 blitq->head = 0; 560 blitq->head = 0;
561 blitq->cur = 0; 561 blitq->cur = 0;
562 blitq->serviced = 0; 562 blitq->serviced = 0;
563 blitq->num_free = VIA_NUM_BLIT_SLOTS; 563 blitq->num_free = VIA_NUM_BLIT_SLOTS - 1;
564 blitq->num_outstanding = 0; 564 blitq->num_outstanding = 0;
565 blitq->is_active = 0; 565 blitq->is_active = 0;
566 blitq->aborting = 0; 566 blitq->aborting = 0;
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 77bf4aa217..4c16778e3f 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -62,6 +62,8 @@
62 62
63static u32 hpet_nhpet, hpet_max_freq = HPET_USER_FREQ; 63static u32 hpet_nhpet, hpet_max_freq = HPET_USER_FREQ;
64 64
65/* This clocksource driver currently only works on ia64 */
66#ifdef CONFIG_IA64
65static void __iomem *hpet_mctr; 67static void __iomem *hpet_mctr;
66 68
67static cycle_t read_hpet(void) 69static cycle_t read_hpet(void)
@@ -79,6 +81,7 @@ static struct clocksource clocksource_hpet = {
79 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 81 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
80}; 82};
81static struct clocksource *hpet_clocksource; 83static struct clocksource *hpet_clocksource;
84#endif
82 85
83/* A lock for concurrent access by app and isr hpet activity. */ 86/* A lock for concurrent access by app and isr hpet activity. */
84static DEFINE_SPINLOCK(hpet_lock); 87static DEFINE_SPINLOCK(hpet_lock);
@@ -909,6 +912,8 @@ int hpet_alloc(struct hpet_data *hdp)
909 912
910 hpetp->hp_delta = hpet_calibrate(hpetp); 913 hpetp->hp_delta = hpet_calibrate(hpetp);
911 914
915/* This clocksource driver currently only works on ia64 */
916#ifdef CONFIG_IA64
912 if (!hpet_clocksource) { 917 if (!hpet_clocksource) {
913 hpet_mctr = (void __iomem *)&hpetp->hp_hpet->hpet_mc; 918 hpet_mctr = (void __iomem *)&hpetp->hp_hpet->hpet_mc;
914 CLKSRC_FSYS_MMIO_SET(clocksource_hpet.fsys_mmio, hpet_mctr); 919 CLKSRC_FSYS_MMIO_SET(clocksource_hpet.fsys_mmio, hpet_mctr);
@@ -918,6 +923,7 @@ int hpet_alloc(struct hpet_data *hdp)
918 hpetp->hp_clocksource = &clocksource_hpet; 923 hpetp->hp_clocksource = &clocksource_hpet;
919 hpet_clocksource = &clocksource_hpet; 924 hpet_clocksource = &clocksource_hpet;
920 } 925 }
926#endif
921 927
922 return 0; 928 return 0;
923} 929}
@@ -940,14 +946,14 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
940 printk(KERN_DEBUG "%s: 0x%lx is busy\n", 946 printk(KERN_DEBUG "%s: 0x%lx is busy\n",
941 __FUNCTION__, hdp->hd_phys_address); 947 __FUNCTION__, hdp->hd_phys_address);
942 iounmap(hdp->hd_address); 948 iounmap(hdp->hd_address);
943 return -EBUSY; 949 return AE_ALREADY_EXISTS;
944 } 950 }
945 } else if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) { 951 } else if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) {
946 struct acpi_resource_fixed_memory32 *fixmem32; 952 struct acpi_resource_fixed_memory32 *fixmem32;
947 953
948 fixmem32 = &res->data.fixed_memory32; 954 fixmem32 = &res->data.fixed_memory32;
949 if (!fixmem32) 955 if (!fixmem32)
950 return -EINVAL; 956 return AE_NO_MEMORY;
951 957
952 hdp->hd_phys_address = fixmem32->address; 958 hdp->hd_phys_address = fixmem32->address;
953 hdp->hd_address = ioremap(fixmem32->address, 959 hdp->hd_address = ioremap(fixmem32->address,
@@ -957,7 +963,7 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
957 printk(KERN_DEBUG "%s: 0x%lx is busy\n", 963 printk(KERN_DEBUG "%s: 0x%lx is busy\n",
958 __FUNCTION__, hdp->hd_phys_address); 964 __FUNCTION__, hdp->hd_phys_address);
959 iounmap(hdp->hd_address); 965 iounmap(hdp->hd_address);
960 return -EBUSY; 966 return AE_ALREADY_EXISTS;
961 } 967 }
962 } else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) { 968 } else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) {
963 struct acpi_resource_extended_irq *irqp; 969 struct acpi_resource_extended_irq *irqp;
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 9b07f78510..dd441ff4af 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2215,7 +2215,8 @@ static int ipmi_pci_resume(struct pci_dev *pdev)
2215 2215
2216static struct pci_device_id ipmi_pci_devices[] = { 2216static struct pci_device_id ipmi_pci_devices[] = {
2217 { PCI_DEVICE(PCI_HP_VENDOR_ID, PCI_MMC_DEVICE_ID) }, 2217 { PCI_DEVICE(PCI_HP_VENDOR_ID, PCI_MMC_DEVICE_ID) },
2218 { PCI_DEVICE_CLASS(PCI_ERMC_CLASSCODE, PCI_ERMC_CLASSCODE_MASK) } 2218 { PCI_DEVICE_CLASS(PCI_ERMC_CLASSCODE, PCI_ERMC_CLASSCODE_MASK) },
2219 { 0, }
2219}; 2220};
2220MODULE_DEVICE_TABLE(pci, ipmi_pci_devices); 2221MODULE_DEVICE_TABLE(pci, ipmi_pci_devices);
2221 2222
diff --git a/drivers/char/lcd.c b/drivers/char/lcd.c
index 1f0962616e..4fe9206f84 100644
--- a/drivers/char/lcd.c
+++ b/drivers/char/lcd.c
@@ -25,7 +25,6 @@
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/uaccess.h> 26#include <asm/uaccess.h>
27#include <asm/system.h> 27#include <asm/system.h>
28#include <linux/delay.h>
29 28
30#include "lcd.h" 29#include "lcd.h"
31 30
diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c
index c08a4152ee..04ac155d3a 100644
--- a/drivers/char/mspec.c
+++ b/drivers/char/mspec.c
@@ -67,7 +67,7 @@
67/* 67/*
68 * Page types allocated by the device. 68 * Page types allocated by the device.
69 */ 69 */
70enum { 70enum mspec_page_type {
71 MSPEC_FETCHOP = 1, 71 MSPEC_FETCHOP = 1,
72 MSPEC_CACHED, 72 MSPEC_CACHED,
73 MSPEC_UNCACHED 73 MSPEC_UNCACHED
@@ -83,15 +83,25 @@ static int is_sn2;
83 * One of these structures is allocated when an mspec region is mmaped. The 83 * One of these structures is allocated when an mspec region is mmaped. The
84 * structure is pointed to by the vma->vm_private_data field in the vma struct. 84 * structure is pointed to by the vma->vm_private_data field in the vma struct.
85 * This structure is used to record the addresses of the mspec pages. 85 * This structure is used to record the addresses of the mspec pages.
86 * This structure is shared by all vma's that are split off from the
87 * original vma when split_vma()'s are done.
88 *
89 * The refcnt is incremented atomically because mm->mmap_sem does not
90 * protect in fork case where multiple tasks share the vma_data.
86 */ 91 */
87struct vma_data { 92struct vma_data {
88 atomic_t refcnt; /* Number of vmas sharing the data. */ 93 atomic_t refcnt; /* Number of vmas sharing the data. */
89 spinlock_t lock; /* Serialize access to the vma. */ 94 spinlock_t lock; /* Serialize access to this structure. */
90 int count; /* Number of pages allocated. */ 95 int count; /* Number of pages allocated. */
91 int type; /* Type of pages allocated. */ 96 enum mspec_page_type type; /* Type of pages allocated. */
97 int flags; /* See VMD_xxx below. */
98 unsigned long vm_start; /* Original (unsplit) base. */
99 unsigned long vm_end; /* Original (unsplit) end. */
92 unsigned long maddr[0]; /* Array of MSPEC addresses. */ 100 unsigned long maddr[0]; /* Array of MSPEC addresses. */
93}; 101};
94 102
103#define VMD_VMALLOCED 0x1 /* vmalloc'd rather than kmalloc'd */
104
95/* used on shub2 to clear FOP cache in the HUB */ 105/* used on shub2 to clear FOP cache in the HUB */
96static unsigned long scratch_page[MAX_NUMNODES]; 106static unsigned long scratch_page[MAX_NUMNODES];
97#define SH2_AMO_CACHE_ENTRIES 4 107#define SH2_AMO_CACHE_ENTRIES 4
@@ -129,8 +139,8 @@ mspec_zero_block(unsigned long addr, int len)
129 * mspec_open 139 * mspec_open
130 * 140 *
131 * Called when a device mapping is created by a means other than mmap 141 * Called when a device mapping is created by a means other than mmap
132 * (via fork, etc.). Increments the reference count on the underlying 142 * (via fork, munmap, etc.). Increments the reference count on the
133 * mspec data so it is not freed prematurely. 143 * underlying mspec data so it is not freed prematurely.
134 */ 144 */
135static void 145static void
136mspec_open(struct vm_area_struct *vma) 146mspec_open(struct vm_area_struct *vma)
@@ -145,43 +155,43 @@ mspec_open(struct vm_area_struct *vma)
145 * mspec_close 155 * mspec_close
146 * 156 *
147 * Called when unmapping a device mapping. Frees all mspec pages 157 * Called when unmapping a device mapping. Frees all mspec pages
148 * belonging to the vma. 158 * belonging to all the vma's sharing this vma_data structure.
149 */ 159 */
150static void 160static void
151mspec_close(struct vm_area_struct *vma) 161mspec_close(struct vm_area_struct *vma)
152{ 162{
153 struct vma_data *vdata; 163 struct vma_data *vdata;
154 int i, pages, result, vdata_size; 164 int index, last_index;
165 unsigned long my_page;
155 166
156 vdata = vma->vm_private_data; 167 vdata = vma->vm_private_data;
168
157 if (!atomic_dec_and_test(&vdata->refcnt)) 169 if (!atomic_dec_and_test(&vdata->refcnt))
158 return; 170 return;
159 171
160 pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; 172 last_index = (vdata->vm_end - vdata->vm_start) >> PAGE_SHIFT;
161 vdata_size = sizeof(struct vma_data) + pages * sizeof(long); 173 for (index = 0; index < last_index; index++) {
162 for (i = 0; i < pages; i++) { 174 if (vdata->maddr[index] == 0)
163 if (vdata->maddr[i] == 0)
164 continue; 175 continue;
165 /* 176 /*
166 * Clear the page before sticking it back 177 * Clear the page before sticking it back
167 * into the pool. 178 * into the pool.
168 */ 179 */
169 result = mspec_zero_block(vdata->maddr[i], PAGE_SIZE); 180 my_page = vdata->maddr[index];
170 if (!result) 181 vdata->maddr[index] = 0;
171 uncached_free_page(vdata->maddr[i]); 182 if (!mspec_zero_block(my_page, PAGE_SIZE))
183 uncached_free_page(my_page);
172 else 184 else
173 printk(KERN_WARNING "mspec_close(): " 185 printk(KERN_WARNING "mspec_close(): "
174 "failed to zero page %i\n", 186 "failed to zero page %ld\n", my_page);
175 result);
176 } 187 }
177 188
178 if (vdata_size <= PAGE_SIZE) 189 if (vdata->flags & VMD_VMALLOCED)
179 kfree(vdata);
180 else
181 vfree(vdata); 190 vfree(vdata);
191 else
192 kfree(vdata);
182} 193}
183 194
184
185/* 195/*
186 * mspec_nopfn 196 * mspec_nopfn
187 * 197 *
@@ -195,7 +205,8 @@ mspec_nopfn(struct vm_area_struct *vma, unsigned long address)
195 int index; 205 int index;
196 struct vma_data *vdata = vma->vm_private_data; 206 struct vma_data *vdata = vma->vm_private_data;
197 207
198 index = (address - vma->vm_start) >> PAGE_SHIFT; 208 BUG_ON(address < vdata->vm_start || address >= vdata->vm_end);
209 index = (address - vdata->vm_start) >> PAGE_SHIFT;
199 maddr = (volatile unsigned long) vdata->maddr[index]; 210 maddr = (volatile unsigned long) vdata->maddr[index];
200 if (maddr == 0) { 211 if (maddr == 0) {
201 maddr = uncached_alloc_page(numa_node_id()); 212 maddr = uncached_alloc_page(numa_node_id());
@@ -237,10 +248,11 @@ static struct vm_operations_struct mspec_vm_ops = {
237 * underlying pages. 248 * underlying pages.
238 */ 249 */
239static int 250static int
240mspec_mmap(struct file *file, struct vm_area_struct *vma, int type) 251mspec_mmap(struct file *file, struct vm_area_struct *vma,
252 enum mspec_page_type type)
241{ 253{
242 struct vma_data *vdata; 254 struct vma_data *vdata;
243 int pages, vdata_size; 255 int pages, vdata_size, flags = 0;
244 256
245 if (vma->vm_pgoff != 0) 257 if (vma->vm_pgoff != 0)
246 return -EINVAL; 258 return -EINVAL;
@@ -255,12 +267,17 @@ mspec_mmap(struct file *file, struct vm_area_struct *vma, int type)
255 vdata_size = sizeof(struct vma_data) + pages * sizeof(long); 267 vdata_size = sizeof(struct vma_data) + pages * sizeof(long);
256 if (vdata_size <= PAGE_SIZE) 268 if (vdata_size <= PAGE_SIZE)
257 vdata = kmalloc(vdata_size, GFP_KERNEL); 269 vdata = kmalloc(vdata_size, GFP_KERNEL);
258 else 270 else {
259 vdata = vmalloc(vdata_size); 271 vdata = vmalloc(vdata_size);
272 flags = VMD_VMALLOCED;
273 }
260 if (!vdata) 274 if (!vdata)
261 return -ENOMEM; 275 return -ENOMEM;
262 memset(vdata, 0, vdata_size); 276 memset(vdata, 0, vdata_size);
263 277
278 vdata->vm_start = vma->vm_start;
279 vdata->vm_end = vma->vm_end;
280 vdata->flags = flags;
264 vdata->type = type; 281 vdata->type = type;
265 spin_lock_init(&vdata->lock); 282 spin_lock_init(&vdata->lock);
266 vdata->refcnt = ATOMIC_INIT(1); 283 vdata->refcnt = ATOMIC_INIT(1);
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 397c714cf2..af274e5a25 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1550,11 +1550,13 @@ __u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr,
1550 * As close as possible to RFC 793, which 1550 * As close as possible to RFC 793, which
1551 * suggests using a 250 kHz clock. 1551 * suggests using a 250 kHz clock.
1552 * Further reading shows this assumes 2 Mb/s networks. 1552 * Further reading shows this assumes 2 Mb/s networks.
1553 * For 10 Gb/s Ethernet, a 1 GHz clock is appropriate. 1553 * For 10 Mb/s Ethernet, a 1 MHz clock is appropriate.
1554 * That's funny, Linux has one built in! Use it! 1554 * For 10 Gb/s Ethernet, a 1 GHz clock should be ok, but
1555 * (Networks are faster now - should this be increased?) 1555 * we also need to limit the resolution so that the u32 seq
1556 * overlaps less than one time per MSL (2 minutes).
1557 * Choosing a clock of 64 ns period is OK. (period of 274 s)
1556 */ 1558 */
1557 seq += ktime_get_real().tv64; 1559 seq += ktime_get_real().tv64 >> 6;
1558#if 0 1560#if 0
1559 printk("init_seq(%lx, %lx, %d, %d) = %d\n", 1561 printk("init_seq(%lx, %lx, %d, %d) = %d\n",
1560 saddr, daddr, sport, dport, seq); 1562 saddr, daddr, sport, dport, seq);
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index aeec67e272..859858561a 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -875,7 +875,7 @@ found:
875 875
876#ifdef CONFIG_ACPI 876#ifdef CONFIG_ACPI
877 if (sonypi_acpi_device) 877 if (sonypi_acpi_device)
878 acpi_bus_generate_event(sonypi_acpi_device, 1, event); 878 acpi_bus_generate_proc_event(sonypi_acpi_device, 1, event);
879#endif 879#endif
880 880
881 kfifo_put(sonypi_device.fifo, (unsigned char *)&event, sizeof(event)); 881 kfifo_put(sonypi_device.fifo, (unsigned char *)&event, sizeof(event));
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 51ea93cab6..9c867cf6de 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2063,8 +2063,7 @@ static int init_dev(struct tty_driver *driver, int idx,
2063 } 2063 }
2064 2064
2065 if (!*tp_loc) { 2065 if (!*tp_loc) {
2066 tp = (struct ktermios *) kmalloc(sizeof(struct ktermios), 2066 tp = kmalloc(sizeof(struct ktermios), GFP_KERNEL);
2067 GFP_KERNEL);
2068 if (!tp) 2067 if (!tp)
2069 goto free_mem_out; 2068 goto free_mem_out;
2070 *tp = driver->init_termios; 2069 *tp = driver->init_termios;
@@ -2094,8 +2093,7 @@ static int init_dev(struct tty_driver *driver, int idx,
2094 } 2093 }
2095 2094
2096 if (!*o_tp_loc) { 2095 if (!*o_tp_loc) {
2097 o_tp = (struct ktermios *) 2096 o_tp = kmalloc(sizeof(struct ktermios), GFP_KERNEL);
2098 kmalloc(sizeof(struct ktermios), GFP_KERNEL);
2099 if (!o_tp) 2097 if (!o_tp)
2100 goto free_mem_out; 2098 goto free_mem_out;
2101 *o_tp = driver->other->init_termios; 2099 *o_tp = driver->other->init_termios;
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
index 3423e9ee64..3ee73cf64b 100644
--- a/drivers/char/tty_ioctl.c
+++ b/drivers/char/tty_ioctl.c
@@ -795,6 +795,7 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
795 if (L_ICANON(tty)) 795 if (L_ICANON(tty))
796 retval = inq_canon(tty); 796 retval = inq_canon(tty);
797 return put_user(retval, (unsigned int __user *) arg); 797 return put_user(retval, (unsigned int __user *) arg);
798#ifndef TCGETS2
798 case TIOCGLCKTRMIOS: 799 case TIOCGLCKTRMIOS:
799 if (kernel_termios_to_user_termios((struct termios __user *)arg, real_tty->termios_locked)) 800 if (kernel_termios_to_user_termios((struct termios __user *)arg, real_tty->termios_locked))
800 return -EFAULT; 801 return -EFAULT;
@@ -806,6 +807,19 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
806 if (user_termios_to_kernel_termios(real_tty->termios_locked, (struct termios __user *) arg)) 807 if (user_termios_to_kernel_termios(real_tty->termios_locked, (struct termios __user *) arg))
807 return -EFAULT; 808 return -EFAULT;
808 return 0; 809 return 0;
810#else
811 case TIOCGLCKTRMIOS:
812 if (kernel_termios_to_user_termios_1((struct termios __user *)arg, real_tty->termios_locked))
813 return -EFAULT;
814 return 0;
815
816 case TIOCSLCKTRMIOS:
817 if (!capable(CAP_SYS_ADMIN))
818 return -EPERM;
819 if (user_termios_to_kernel_termios_1(real_tty->termios_locked, (struct termios __user *) arg))
820 return -EFAULT;
821 return 0;
822#endif
809 823
810 case TIOCPKT: 824 case TIOCPKT:
811 { 825 {
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index c6f6f42097..7a61a2a9aa 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -770,6 +770,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
770 /* 770 /*
771 * Switching-from response 771 * Switching-from response
772 */ 772 */
773 acquire_console_sem();
773 if (vc->vt_newvt >= 0) { 774 if (vc->vt_newvt >= 0) {
774 if (arg == 0) 775 if (arg == 0)
775 /* 776 /*
@@ -784,7 +785,6 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
784 * complete the switch. 785 * complete the switch.
785 */ 786 */
786 int newvt; 787 int newvt;
787 acquire_console_sem();
788 newvt = vc->vt_newvt; 788 newvt = vc->vt_newvt;
789 vc->vt_newvt = -1; 789 vc->vt_newvt = -1;
790 i = vc_allocate(newvt); 790 i = vc_allocate(newvt);
@@ -798,7 +798,6 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
798 * other console switches.. 798 * other console switches..
799 */ 799 */
800 complete_change_console(vc_cons[newvt].d); 800 complete_change_console(vc_cons[newvt].d);
801 release_console_sem();
802 } 801 }
803 } 802 }
804 803
@@ -810,9 +809,12 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
810 /* 809 /*
811 * If it's just an ACK, ignore it 810 * If it's just an ACK, ignore it
812 */ 811 */
813 if (arg != VT_ACKACQ) 812 if (arg != VT_ACKACQ) {
813 release_console_sem();
814 return -EINVAL; 814 return -EINVAL;
815 }
815 } 816 }
817 release_console_sem();
816 818
817 return 0; 819 return 0;
818 820
@@ -1030,7 +1032,7 @@ static DECLARE_WAIT_QUEUE_HEAD(vt_activate_queue);
1030 1032
1031/* 1033/*
1032 * Sleeps until a vt is activated, or the task is interrupted. Returns 1034 * Sleeps until a vt is activated, or the task is interrupted. Returns
1033 * 0 if activation, -EINTR if interrupted. 1035 * 0 if activation, -EINTR if interrupted by a signal handler.
1034 */ 1036 */
1035int vt_waitactive(int vt) 1037int vt_waitactive(int vt)
1036{ 1038{
@@ -1055,7 +1057,7 @@ int vt_waitactive(int vt)
1055 break; 1057 break;
1056 } 1058 }
1057 release_console_sem(); 1059 release_console_sem();
1058 retval = -EINTR; 1060 retval = -ERESTARTNOHAND;
1059 if (signal_pending(current)) 1061 if (signal_pending(current))
1060 break; 1062 break;
1061 schedule(); 1063 schedule();
@@ -1208,15 +1210,18 @@ void change_console(struct vc_data *new_vc)
1208 /* 1210 /*
1209 * Send the signal as privileged - kill_pid() will 1211 * Send the signal as privileged - kill_pid() will
1210 * tell us if the process has gone or something else 1212 * tell us if the process has gone or something else
1211 * is awry 1213 * is awry.
1214 *
1215 * We need to set vt_newvt *before* sending the signal or we
1216 * have a race.
1212 */ 1217 */
1218 vc->vt_newvt = new_vc->vc_num;
1213 if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) { 1219 if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) {
1214 /* 1220 /*
1215 * It worked. Mark the vt to switch to and 1221 * It worked. Mark the vt to switch to and
1216 * return. The process needs to send us a 1222 * return. The process needs to send us a
1217 * VT_RELDISP ioctl to complete the switch. 1223 * VT_RELDISP ioctl to complete the switch.
1218 */ 1224 */
1219 vc->vt_newvt = new_vc->vc_num;
1220 return; 1225 return;
1221 } 1226 }
1222 1227
diff --git a/drivers/dma/ioatdma.c b/drivers/dma/ioatdma.c
index 2d1f17865b..41b18c5a31 100644
--- a/drivers/dma/ioatdma.c
+++ b/drivers/dma/ioatdma.c
@@ -191,17 +191,12 @@ static int ioat_dma_alloc_chan_resources(struct dma_chan *chan)
191 int i; 191 int i;
192 LIST_HEAD(tmp_list); 192 LIST_HEAD(tmp_list);
193 193
194 /* 194 /* have we already been set up? */
195 * In-use bit automatically set by reading chanctrl 195 if (!list_empty(&ioat_chan->free_desc))
196 * If 0, we got it, if 1, someone else did 196 return INITIAL_IOAT_DESC_COUNT;
197 */
198 chanctrl = readw(ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET);
199 if (chanctrl & IOAT_CHANCTRL_CHANNEL_IN_USE)
200 return -EBUSY;
201 197
202 /* Setup register to interrupt and write completion status on error */ 198 /* Setup register to interrupt and write completion status on error */
203 chanctrl = IOAT_CHANCTRL_CHANNEL_IN_USE | 199 chanctrl = IOAT_CHANCTRL_ERR_INT_EN |
204 IOAT_CHANCTRL_ERR_INT_EN |
205 IOAT_CHANCTRL_ANY_ERR_ABORT_EN | 200 IOAT_CHANCTRL_ANY_ERR_ABORT_EN |
206 IOAT_CHANCTRL_ERR_COMPLETION_EN; 201 IOAT_CHANCTRL_ERR_COMPLETION_EN;
207 writew(chanctrl, ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET); 202 writew(chanctrl, ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET);
@@ -282,11 +277,6 @@ static void ioat_dma_free_chan_resources(struct dma_chan *chan)
282 in_use_descs - 1); 277 in_use_descs - 1);
283 278
284 ioat_chan->last_completion = ioat_chan->completion_addr = 0; 279 ioat_chan->last_completion = ioat_chan->completion_addr = 0;
285
286 /* Tell hw the chan is free */
287 chanctrl = readw(ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET);
288 chanctrl &= ~IOAT_CHANCTRL_CHANNEL_IN_USE;
289 writew(chanctrl, ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET);
290} 280}
291 281
292static struct dma_async_tx_descriptor * 282static struct dma_async_tx_descriptor *
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index 3bba224cb5..6eb434749c 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -967,7 +967,7 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx)
967 if (!force_function_unhide && !(stat8 & (1 << 5))) { 967 if (!force_function_unhide && !(stat8 & (1 << 5))) {
968 printk(KERN_INFO "Contact your BIOS vendor to see if the " 968 printk(KERN_INFO "Contact your BIOS vendor to see if the "
969 "E752x error registers can be safely un-hidden\n"); 969 "E752x error registers can be safely un-hidden\n");
970 return -ENOMEM; 970 return -ENODEV;
971 } 971 }
972 stat8 |= (1 << 5); 972 stat8 |= (1 << 5);
973 pci_write_config_byte(pdev, E752X_DEVPRES1, stat8); 973 pci_write_config_byte(pdev, E752X_DEVPRES1, stat8);
diff --git a/drivers/edac/edac_core.h b/drivers/edac/edac_core.h
index 4e6bad15c4..e80af67664 100644
--- a/drivers/edac/edac_core.h
+++ b/drivers/edac/edac_core.h
@@ -75,7 +75,7 @@ extern int edac_debug_level;
75#define edac_debug_printk(level, fmt, arg...) \ 75#define edac_debug_printk(level, fmt, arg...) \
76 do { \ 76 do { \
77 if (level <= edac_debug_level) \ 77 if (level <= edac_debug_level) \
78 edac_printk(KERN_EMERG, EDAC_DEBUG, fmt, ##arg); \ 78 edac_printk(KERN_DEBUG, EDAC_DEBUG, fmt, ##arg); \
79 } while(0) 79 } while(0)
80 80
81#define debugf0( ... ) edac_debug_printk(0, __VA_ARGS__ ) 81#define debugf0( ... ) edac_debug_printk(0, __VA_ARGS__ )
diff --git a/drivers/firewire/Kconfig b/drivers/firewire/Kconfig
index d011a76f8e..fe9e768cfb 100644
--- a/drivers/firewire/Kconfig
+++ b/drivers/firewire/Kconfig
@@ -11,7 +11,8 @@ config FIREWIRE
11 This is the "Juju" FireWire stack, a new alternative implementation 11 This is the "Juju" FireWire stack, a new alternative implementation
12 designed for robustness and simplicity. You can build either this 12 designed for robustness and simplicity. You can build either this
13 stack, or the classic stack (the ieee1394 driver, ohci1394 etc.) 13 stack, or the classic stack (the ieee1394 driver, ohci1394 etc.)
14 or both. 14 or both. Please read http://wiki.linux1394.org/JujuMigration before
15 you enable the new stack.
15 16
16 To compile this driver as a module, say M here: the module will be 17 To compile this driver as a module, say M here: the module will be
17 called firewire-core. It functionally replaces ieee1394, raw1394, 18 called firewire-core. It functionally replaces ieee1394, raw1394,
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c
index 0aeab3218b..3e9719948a 100644
--- a/drivers/firewire/fw-card.c
+++ b/drivers/firewire/fw-card.c
@@ -510,9 +510,11 @@ fw_core_remove_card(struct fw_card *card)
510 /* Set up the dummy driver. */ 510 /* Set up the dummy driver. */
511 card->driver = &dummy_driver; 511 card->driver = &dummy_driver;
512 512
513 fw_flush_transactions(card);
514
515 fw_destroy_nodes(card); 513 fw_destroy_nodes(card);
514 flush_scheduled_work();
515
516 fw_flush_transactions(card);
517 del_timer_sync(&card->flush_timer);
516 518
517 fw_card_put(card); 519 fw_card_put(card);
518} 520}
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index 7e427b4c74..e14c1ca781 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -1945,10 +1945,8 @@ static int pci_suspend(struct pci_dev *pdev, pm_message_t state)
1945 return err; 1945 return err;
1946 } 1946 }
1947 err = pci_set_power_state(pdev, pci_choose_state(pdev, state)); 1947 err = pci_set_power_state(pdev, pci_choose_state(pdev, state));
1948 if (err) { 1948 if (err)
1949 fw_error("pci_set_power_state failed\n"); 1949 fw_error("pci_set_power_state failed with %d\n", err);
1950 return err;
1951 }
1952 1950
1953 return 0; 1951 return 0;
1954} 1952}
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index ba816ef6de..238730f75d 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -159,6 +159,7 @@ struct sbp2_pointer {
159 159
160struct sbp2_orb { 160struct sbp2_orb {
161 struct fw_transaction t; 161 struct fw_transaction t;
162 struct kref kref;
162 dma_addr_t request_bus; 163 dma_addr_t request_bus;
163 int rcode; 164 int rcode;
164 struct sbp2_pointer pointer; 165 struct sbp2_pointer pointer;
@@ -280,6 +281,14 @@ static const struct {
280}; 281};
281 282
282static void 283static void
284free_orb(struct kref *kref)
285{
286 struct sbp2_orb *orb = container_of(kref, struct sbp2_orb, kref);
287
288 kfree(orb);
289}
290
291static void
283sbp2_status_write(struct fw_card *card, struct fw_request *request, 292sbp2_status_write(struct fw_card *card, struct fw_request *request,
284 int tcode, int destination, int source, 293 int tcode, int destination, int source,
285 int generation, int speed, 294 int generation, int speed,
@@ -312,8 +321,8 @@ sbp2_status_write(struct fw_card *card, struct fw_request *request,
312 spin_lock_irqsave(&card->lock, flags); 321 spin_lock_irqsave(&card->lock, flags);
313 list_for_each_entry(orb, &sd->orb_list, link) { 322 list_for_each_entry(orb, &sd->orb_list, link) {
314 if (STATUS_GET_ORB_HIGH(status) == 0 && 323 if (STATUS_GET_ORB_HIGH(status) == 0 &&
315 STATUS_GET_ORB_LOW(status) == orb->request_bus && 324 STATUS_GET_ORB_LOW(status) == orb->request_bus) {
316 orb->rcode == RCODE_COMPLETE) { 325 orb->rcode = RCODE_COMPLETE;
317 list_del(&orb->link); 326 list_del(&orb->link);
318 break; 327 break;
319 } 328 }
@@ -325,6 +334,8 @@ sbp2_status_write(struct fw_card *card, struct fw_request *request,
325 else 334 else
326 fw_error("status write for unknown orb\n"); 335 fw_error("status write for unknown orb\n");
327 336
337 kref_put(&orb->kref, free_orb);
338
328 fw_send_response(card, request, RCODE_COMPLETE); 339 fw_send_response(card, request, RCODE_COMPLETE);
329} 340}
330 341
@@ -335,13 +346,27 @@ complete_transaction(struct fw_card *card, int rcode,
335 struct sbp2_orb *orb = data; 346 struct sbp2_orb *orb = data;
336 unsigned long flags; 347 unsigned long flags;
337 348
338 orb->rcode = rcode; 349 /*
339 if (rcode != RCODE_COMPLETE) { 350 * This is a little tricky. We can get the status write for
340 spin_lock_irqsave(&card->lock, flags); 351 * the orb before we get this callback. The status write
352 * handler above will assume the orb pointer transaction was
353 * successful and set the rcode to RCODE_COMPLETE for the orb.
354 * So this callback only sets the rcode if it hasn't already
355 * been set and only does the cleanup if the transaction
356 * failed and we didn't already get a status write.
357 */
358 spin_lock_irqsave(&card->lock, flags);
359
360 if (orb->rcode == -1)
361 orb->rcode = rcode;
362 if (orb->rcode != RCODE_COMPLETE) {
341 list_del(&orb->link); 363 list_del(&orb->link);
342 spin_unlock_irqrestore(&card->lock, flags);
343 orb->callback(orb, NULL); 364 orb->callback(orb, NULL);
344 } 365 }
366
367 spin_unlock_irqrestore(&card->lock, flags);
368
369 kref_put(&orb->kref, free_orb);
345} 370}
346 371
347static void 372static void
@@ -360,6 +385,10 @@ sbp2_send_orb(struct sbp2_orb *orb, struct fw_unit *unit,
360 list_add_tail(&orb->link, &sd->orb_list); 385 list_add_tail(&orb->link, &sd->orb_list);
361 spin_unlock_irqrestore(&device->card->lock, flags); 386 spin_unlock_irqrestore(&device->card->lock, flags);
362 387
388 /* Take a ref for the orb list and for the transaction callback. */
389 kref_get(&orb->kref);
390 kref_get(&orb->kref);
391
363 fw_send_request(device->card, &orb->t, TCODE_WRITE_BLOCK_REQUEST, 392 fw_send_request(device->card, &orb->t, TCODE_WRITE_BLOCK_REQUEST,
364 node_id, generation, device->max_speed, offset, 393 node_id, generation, device->max_speed, offset,
365 &orb->pointer, sizeof(orb->pointer), 394 &orb->pointer, sizeof(orb->pointer),
@@ -416,6 +445,7 @@ sbp2_send_management_orb(struct fw_unit *unit, int node_id, int generation,
416 if (orb == NULL) 445 if (orb == NULL)
417 return -ENOMEM; 446 return -ENOMEM;
418 447
448 kref_init(&orb->base.kref);
419 orb->response_bus = 449 orb->response_bus =
420 dma_map_single(device->card->device, &orb->response, 450 dma_map_single(device->card->device, &orb->response,
421 sizeof(orb->response), DMA_FROM_DEVICE); 451 sizeof(orb->response), DMA_FROM_DEVICE);
@@ -490,7 +520,7 @@ sbp2_send_management_orb(struct fw_unit *unit, int node_id, int generation,
490 if (response) 520 if (response)
491 fw_memcpy_from_be32(response, 521 fw_memcpy_from_be32(response,
492 orb->response, sizeof(orb->response)); 522 orb->response, sizeof(orb->response));
493 kfree(orb); 523 kref_put(&orb->base.kref, free_orb);
494 524
495 return retval; 525 return retval;
496} 526}
@@ -886,7 +916,6 @@ complete_command_orb(struct sbp2_orb *base_orb, struct sbp2_status *status)
886 916
887 orb->cmd->result = result; 917 orb->cmd->result = result;
888 orb->done(orb->cmd); 918 orb->done(orb->cmd);
889 kfree(orb);
890} 919}
891 920
892static int sbp2_command_orb_map_scatterlist(struct sbp2_command_orb *orb) 921static int sbp2_command_orb_map_scatterlist(struct sbp2_command_orb *orb)
@@ -1005,6 +1034,7 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
1005 1034
1006 /* Initialize rcode to something not RCODE_COMPLETE. */ 1035 /* Initialize rcode to something not RCODE_COMPLETE. */
1007 orb->base.rcode = -1; 1036 orb->base.rcode = -1;
1037 kref_init(&orb->base.kref);
1008 1038
1009 orb->unit = unit; 1039 orb->unit = unit;
1010 orb->done = done; 1040 orb->done = done;
@@ -1051,10 +1081,11 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
1051 sbp2_send_orb(&orb->base, unit, sd->node_id, sd->generation, 1081 sbp2_send_orb(&orb->base, unit, sd->node_id, sd->generation,
1052 sd->command_block_agent_address + SBP2_ORB_POINTER); 1082 sd->command_block_agent_address + SBP2_ORB_POINTER);
1053 1083
1084 kref_put(&orb->base.kref, free_orb);
1054 return 0; 1085 return 0;
1055 1086
1056 fail_mapping: 1087 fail_mapping:
1057 kfree(orb); 1088 kref_put(&orb->base.kref, free_orb);
1058 fail_alloc: 1089 fail_alloc:
1059 return SCSI_MLQUEUE_HOST_BUSY; 1090 return SCSI_MLQUEUE_HOST_BUSY;
1060} 1091}
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c
index 565c4e679b..6eea3476b9 100644
--- a/drivers/hwmon/lm78.c
+++ b/drivers/hwmon/lm78.c
@@ -882,7 +882,7 @@ static int __init lm78_isa_device_add(unsigned short address)
882{ 882{
883 struct resource res = { 883 struct resource res = {
884 .start = address, 884 .start = address,
885 .end = address + LM78_EXTENT, 885 .end = address + LM78_EXTENT - 1,
886 .name = "lm78", 886 .name = "lm78",
887 .flags = IORESOURCE_IO, 887 .flags = IORESOURCE_IO,
888 }; 888 };
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
index c95909cc1d..dcc941a5aa 100644
--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -1746,7 +1746,7 @@ w83781d_isa_device_add(unsigned short address)
1746{ 1746{
1747 struct resource res = { 1747 struct resource res = {
1748 .start = address, 1748 .start = address,
1749 .end = address + W83781D_EXTENT, 1749 .end = address + W83781D_EXTENT - 1,
1750 .name = "w83781d", 1750 .name = "w83781d",
1751 .flags = IORESOURCE_IO, 1751 .flags = IORESOURCE_IO,
1752 }; 1752 };
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
index 8a5f5825bb..7f0a0a62cf 100644
--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -357,13 +357,29 @@ static int sendbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
357 return wrcount; 357 return wrcount;
358} 358}
359 359
360static int acknak(struct i2c_adapter *i2c_adap, int is_ack)
361{
362 struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
363
364 /* assert: sda is high */
365 if (is_ack) /* send ack */
366 setsda(adap, 0);
367 udelay((adap->udelay + 1) / 2);
368 if (sclhi(adap) < 0) { /* timeout */
369 dev_err(&i2c_adap->dev, "readbytes: ack/nak timeout\n");
370 return -ETIMEDOUT;
371 }
372 scllo(adap);
373 return 0;
374}
375
360static int readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg) 376static int readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
361{ 377{
362 int inval; 378 int inval;
363 int rdcount=0; /* counts bytes read */ 379 int rdcount=0; /* counts bytes read */
364 struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
365 unsigned char *temp = msg->buf; 380 unsigned char *temp = msg->buf;
366 int count = msg->len; 381 int count = msg->len;
382 const unsigned flags = msg->flags;
367 383
368 while (count > 0) { 384 while (count > 0) {
369 inval = i2c_inb(i2c_adap); 385 inval = i2c_inb(i2c_adap);
@@ -377,28 +393,12 @@ static int readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
377 temp++; 393 temp++;
378 count--; 394 count--;
379 395
380 if (msg->flags & I2C_M_NO_RD_ACK) {
381 bit_dbg(2, &i2c_adap->dev, "i2c_inb: 0x%02x\n",
382 inval);
383 continue;
384 }
385
386 /* assert: sda is high */
387 if (count) /* send ack */
388 setsda(adap, 0);
389 udelay((adap->udelay + 1) / 2);
390 bit_dbg(2, &i2c_adap->dev, "i2c_inb: 0x%02x %s\n", inval,
391 count ? "A" : "NA");
392 if (sclhi(adap)<0) { /* timeout */
393 dev_err(&i2c_adap->dev, "readbytes: timeout at ack\n");
394 return -ETIMEDOUT;
395 };
396 scllo(adap);
397
398 /* Some SMBus transactions require that we receive the 396 /* Some SMBus transactions require that we receive the
399 transaction length as the first read byte. */ 397 transaction length as the first read byte. */
400 if (rdcount == 1 && (msg->flags & I2C_M_RECV_LEN)) { 398 if (rdcount == 1 && (flags & I2C_M_RECV_LEN)) {
401 if (inval <= 0 || inval > I2C_SMBUS_BLOCK_MAX) { 399 if (inval <= 0 || inval > I2C_SMBUS_BLOCK_MAX) {
400 if (!(flags & I2C_M_NO_RD_ACK))
401 acknak(i2c_adap, 0);
402 dev_err(&i2c_adap->dev, "readbytes: invalid " 402 dev_err(&i2c_adap->dev, "readbytes: invalid "
403 "block length (%d)\n", inval); 403 "block length (%d)\n", inval);
404 return -EREMOTEIO; 404 return -EREMOTEIO;
@@ -409,6 +409,18 @@ static int readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
409 count += inval; 409 count += inval;
410 msg->len += inval; 410 msg->len += inval;
411 } 411 }
412
413 bit_dbg(2, &i2c_adap->dev, "readbytes: 0x%02x %s\n",
414 inval,
415 (flags & I2C_M_NO_RD_ACK)
416 ? "(no ack/nak)"
417 : (count ? "A" : "NA"));
418
419 if (!(flags & I2C_M_NO_RD_ACK)) {
420 inval = acknak(i2c_adap, count);
421 if (inval < 0)
422 return inval;
423 }
412 } 424 }
413 return rdcount; 425 return rdcount;
414} 426}
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 1842f523c2..9f3a4cd0b0 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -208,6 +208,7 @@ config I2C_PIIX4
208 ATI IXP400 208 ATI IXP400
209 ATI SB600 209 ATI SB600
210 ATI SB700 210 ATI SB700
211 ATI SB800
211 Serverworks OSB4 212 Serverworks OSB4
212 Serverworks CSB5 213 Serverworks CSB5
213 Serverworks CSB6 214 Serverworks CSB6
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 025f19423f..44e1cd21bb 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -147,7 +147,7 @@ static int __init i2c_gpio_probe(struct platform_device *pdev)
147 * The reason to do so is to avoid sysfs names that only make 147 * The reason to do so is to avoid sysfs names that only make
148 * sense when there are multiple adapters. 148 * sense when there are multiple adapters.
149 */ 149 */
150 adap->nr = pdev->id >= 0 ? pdev->id : 0; 150 adap->nr = (pdev->id != -1) ? pdev->id : 0;
151 ret = i2c_bit_add_numbered_bus(adap); 151 ret = i2c_bit_add_numbered_bus(adap);
152 if (ret) 152 if (ret)
153 goto err_add_bus; 153 goto err_add_bus;
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index debc76cd21..167e4137ee 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -23,7 +23,7 @@
23 Supports: 23 Supports:
24 Intel PIIX4, 440MX 24 Intel PIIX4, 440MX
25 Serverworks OSB4, CSB5, CSB6, HT-1000 25 Serverworks OSB4, CSB5, CSB6, HT-1000
26 ATI IXP200, IXP300, IXP400, SB600, SB700 26 ATI IXP200, IXP300, IXP400, SB600, SB700, SB800
27 SMSC Victory66 27 SMSC Victory66
28 28
29 Note: we assume there can only be one device, with one SMBus interface. 29 Note: we assume there can only be one device, with one SMBus interface.
@@ -397,9 +397,7 @@ static struct pci_device_id piix4_ids[] = {
397 .driver_data = 0 }, 397 .driver_data = 0 },
398 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS), 398 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS),
399 .driver_data = 0 }, 399 .driver_data = 0 },
400 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SMBUS), 400 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS),
401 .driver_data = 0 },
402 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SMBUS),
403 .driver_data = 0 }, 401 .driver_data = 0 },
404 { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4), 402 { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4),
405 .driver_data = 0 }, 403 .driver_data = 0 },
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 9d6b790d43..bb5466b27b 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -926,7 +926,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
926 * The reason to do so is to avoid sysfs names that only make 926 * The reason to do so is to avoid sysfs names that only make
927 * sense when there are multiple adapters. 927 * sense when there are multiple adapters.
928 */ 928 */
929 i2c->adap.nr = dev->id >= 0 ? dev->id : 0; 929 i2c->adap.nr = dev->id != -1 ? dev->id : 0;
930 930
931 ret = i2c_add_numbered_adapter(&i2c->adap); 931 ret = i2c_add_numbered_adapter(&i2c->adap);
932 if (ret < 0) { 932 if (ret < 0) {
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index 7adb61bad6..4200251ff6 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -781,7 +781,7 @@ endif
781 781
782config BLK_DEV_IDE_PMAC 782config BLK_DEV_IDE_PMAC
783 bool "Builtin PowerMac IDE support" 783 bool "Builtin PowerMac IDE support"
784 depends on PPC_PMAC && IDE=y 784 depends on PPC_PMAC && IDE=y && BLK_DEV_IDE=y
785 help 785 help
786 This driver provides support for the built-in IDE controller on 786 This driver provides support for the built-in IDE controller on
787 most of the recent Apple Power Macintoshes and PowerBooks. 787 most of the recent Apple Power Macintoshes and PowerBooks.
@@ -946,7 +946,7 @@ config BLK_DEV_Q40IDE
946 946
947config BLK_DEV_MPC8xx_IDE 947config BLK_DEV_MPC8xx_IDE
948 bool "MPC8xx IDE support" 948 bool "MPC8xx IDE support"
949 depends on 8xx && IDE=y && BLK_DEV_IDE=y 949 depends on 8xx && IDE=y && BLK_DEV_IDE=y && !PPC_MERGE
950 select IDE_GENERIC 950 select IDE_GENERIC
951 help 951 help
952 This option provides support for IDE on Motorola MPC8xx Systems. 952 This option provides support for IDE on Motorola MPC8xx Systems.
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index eba1adbc1b..4754769eda 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -487,6 +487,7 @@ static inline int idedisk_supports_lba48(const struct hd_driveid *id)
487 */ 487 */
488static const struct drive_list_entry hpa_list[] = { 488static const struct drive_list_entry hpa_list[] = {
489 { "ST340823A", NULL }, 489 { "ST340823A", NULL },
490 { "ST320413A", NULL },
490 { NULL, NULL } 491 { NULL, NULL }
491}; 492};
492 493
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index f4cd2700ca..646a54e233 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -615,8 +615,7 @@ u8 eighty_ninty_three (ide_drive_t *drive)
615 if (hwif->cbl != ATA_CBL_PATA80 && !ivb) 615 if (hwif->cbl != ATA_CBL_PATA80 && !ivb)
616 goto no_80w; 616 goto no_80w;
617 617
618 /* Check for SATA but only if we are ATA5 or higher */ 618 if (ide_dev_is_sata(id))
619 if (id->hw_config == 0 && (id->major_rev_num & 0x7FE0))
620 return 1; 619 return 1;
621 620
622 /* 621 /*
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
index 025689de50..11ecb61800 100644
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -596,6 +596,13 @@ static struct dmi_system_id cable_dmi_table[] = {
596 DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"), 596 DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"),
597 }, 597 },
598 }, 598 },
599 {
600 .ident = "Toshiba Satellite S1800-814",
601 .matches = {
602 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
603 DMI_MATCH(DMI_PRODUCT_NAME, "S1800-814"),
604 },
605 },
599 { } 606 { }
600}; 607};
601 608
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 2cd74c345a..39f1c89f7c 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/ide/pci/hpt366.c Version 1.10 Jun 29, 2007 2 * linux/drivers/ide/pci/hpt366.c Version 1.12 Aug 19, 2007
3 * 3 *
4 * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org> 4 * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org>
5 * Portions Copyright (C) 2001 Sun Microsystems, Inc. 5 * Portions Copyright (C) 2001 Sun Microsystems, Inc.
@@ -68,7 +68,8 @@
68 * HPT37x chip family; save space by introducing the separate transfer mode 68 * HPT37x chip family; save space by introducing the separate transfer mode
69 * table in which the mode lookup is done 69 * table in which the mode lookup is done
70 * - use f_CNT value saved by the HighPoint BIOS as reading it directly gives 70 * - use f_CNT value saved by the HighPoint BIOS as reading it directly gives
71 * the wrong PCI frequency since DPLL has already been calibrated by BIOS 71 * the wrong PCI frequency since DPLL has already been calibrated by BIOS;
72 * read it only from the function 0 of HPT374 chips
72 * - fix the hotswap code: it caused RESET- to glitch when tristating the bus, 73 * - fix the hotswap code: it caused RESET- to glitch when tristating the bus,
73 * and for HPT36x the obsolete HDIO_TRISTATE_HWIF handler was called instead 74 * and for HPT36x the obsolete HDIO_TRISTATE_HWIF handler was called instead
74 * - pass to init_chipset() handlers a copy of the IDE PCI device structure as 75 * - pass to init_chipset() handlers a copy of the IDE PCI device structure as
@@ -113,6 +114,7 @@
113 * unify HPT36x/37x timing setup code and the speedproc handlers by joining 114 * unify HPT36x/37x timing setup code and the speedproc handlers by joining
114 * the register setting lists into the table indexed by the clock selected 115 * the register setting lists into the table indexed by the clock selected
115 * - set the correct hwif->ultra_mask for each individual chip 116 * - set the correct hwif->ultra_mask for each individual chip
117 * - add UltraDMA mode filtering for the HPT37[24] based SATA cards
116 * Sergei Shtylyov, <sshtylyov@ru.mvista.com> or <source@mvista.com> 118 * Sergei Shtylyov, <sshtylyov@ru.mvista.com> or <source@mvista.com>
117 */ 119 */
118 120
@@ -517,42 +519,44 @@ static int check_in_drive_list(ide_drive_t *drive, const char **list)
517} 519}
518 520
519/* 521/*
520 * Note for the future; the SATA hpt37x we must set 522 * The Marvell bridge chips used on the HighPoint SATA cards do not seem
521 * either PIO or UDMA modes 0,4,5 523 * to support the UltraDMA modes 1, 2, and 3 as well as any MWDMA modes...
522 */ 524 */
523 525
524static u8 hpt3xx_udma_filter(ide_drive_t *drive) 526static u8 hpt3xx_udma_filter(ide_drive_t *drive)
525{ 527{
526 struct hpt_info *info = pci_get_drvdata(HWIF(drive)->pci_dev); 528 ide_hwif_t *hwif = HWIF(drive);
527 u8 mask; 529 struct hpt_info *info = pci_get_drvdata(hwif->pci_dev);
530 u8 mask = hwif->ultra_mask;
528 531
529 switch (info->chip_type) { 532 switch (info->chip_type) {
530 case HPT370A:
531 if (!HPT370_ALLOW_ATA100_5 ||
532 check_in_drive_list(drive, bad_ata100_5))
533 return 0x1f;
534 else
535 return 0x3f;
536 case HPT370:
537 if (!HPT370_ALLOW_ATA100_5 ||
538 check_in_drive_list(drive, bad_ata100_5))
539 mask = 0x1f;
540 else
541 mask = 0x3f;
542 break;
543 case HPT36x: 533 case HPT36x:
544 if (!HPT366_ALLOW_ATA66_4 || 534 if (!HPT366_ALLOW_ATA66_4 ||
545 check_in_drive_list(drive, bad_ata66_4)) 535 check_in_drive_list(drive, bad_ata66_4))
546 mask = 0x0f; 536 mask = ATA_UDMA3;
547 else
548 mask = 0x1f;
549 537
550 if (!HPT366_ALLOW_ATA66_3 || 538 if (!HPT366_ALLOW_ATA66_3 ||
551 check_in_drive_list(drive, bad_ata66_3)) 539 check_in_drive_list(drive, bad_ata66_3))
552 mask = 0x07; 540 mask = ATA_UDMA2;
541 break;
542 case HPT370:
543 if (!HPT370_ALLOW_ATA100_5 ||
544 check_in_drive_list(drive, bad_ata100_5))
545 mask = ATA_UDMA4;
553 break; 546 break;
547 case HPT370A:
548 if (!HPT370_ALLOW_ATA100_5 ||
549 check_in_drive_list(drive, bad_ata100_5))
550 return ATA_UDMA4;
551 case HPT372 :
552 case HPT372A:
553 case HPT372N:
554 case HPT374 :
555 if (ide_dev_is_sata(drive->id))
556 mask &= ~0x0e;
557 /* Fall thru */
554 default: 558 default:
555 return 0x7f; 559 return mask;
556 } 560 }
557 561
558 return check_in_drive_list(drive, bad_ata33) ? 0x00 : mask; 562 return check_in_drive_list(drive, bad_ata33) ? 0x00 : mask;
@@ -981,6 +985,7 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
981 struct hpt_info *info = kmalloc(sizeof(struct hpt_info), GFP_KERNEL); 985 struct hpt_info *info = kmalloc(sizeof(struct hpt_info), GFP_KERNEL);
982 unsigned long io_base = pci_resource_start(dev, 4); 986 unsigned long io_base = pci_resource_start(dev, 4);
983 u8 pci_clk, dpll_clk = 0; /* PCI and DPLL clock in MHz */ 987 u8 pci_clk, dpll_clk = 0; /* PCI and DPLL clock in MHz */
988 u8 chip_type;
984 enum ata_clock clock; 989 enum ata_clock clock;
985 990
986 if (info == NULL) { 991 if (info == NULL) {
@@ -992,7 +997,8 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
992 * Copy everything from a static "template" structure 997 * Copy everything from a static "template" structure
993 * to just allocated per-chip hpt_info structure. 998 * to just allocated per-chip hpt_info structure.
994 */ 999 */
995 *info = *(struct hpt_info *)pci_get_drvdata(dev); 1000 memcpy(info, pci_get_drvdata(dev), sizeof(struct hpt_info));
1001 chip_type = info->chip_type;
996 1002
997 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (L1_CACHE_BYTES / 4)); 1003 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (L1_CACHE_BYTES / 4));
998 pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x78); 1004 pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x78);
@@ -1002,7 +1008,7 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
1002 /* 1008 /*
1003 * First, try to estimate the PCI clock frequency... 1009 * First, try to estimate the PCI clock frequency...
1004 */ 1010 */
1005 if (info->chip_type >= HPT370) { 1011 if (chip_type >= HPT370) {
1006 u8 scr1 = 0; 1012 u8 scr1 = 0;
1007 u16 f_cnt = 0; 1013 u16 f_cnt = 0;
1008 u32 temp = 0; 1014 u32 temp = 0;
@@ -1016,7 +1022,7 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
1016 * HighPoint does this for HPT372A. 1022 * HighPoint does this for HPT372A.
1017 * NOTE: This register is only writeable via I/O space. 1023 * NOTE: This register is only writeable via I/O space.
1018 */ 1024 */
1019 if (info->chip_type == HPT372A) 1025 if (chip_type == HPT372A)
1020 outb(0x0e, io_base + 0x9c); 1026 outb(0x0e, io_base + 0x9c);
1021 1027
1022 /* 1028 /*
@@ -1034,13 +1040,28 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
1034 * First try reading the register in which the HighPoint BIOS 1040 * First try reading the register in which the HighPoint BIOS
1035 * saves f_CNT value before reprogramming the DPLL from its 1041 * saves f_CNT value before reprogramming the DPLL from its
1036 * default setting (which differs for the various chips). 1042 * default setting (which differs for the various chips).
1037 * NOTE: This register is only accessible via I/O space.
1038 * 1043 *
1039 * In case the signature check fails, we'll have to resort to 1044 * NOTE: This register is only accessible via I/O space;
1040 * reading the f_CNT register itself in hopes that nobody has 1045 * HPT374 BIOS only saves it for the function 0, so we have to
1041 * touched the DPLL yet... 1046 * always read it from there -- no need to check the result of
1047 * pci_get_slot() for the function 0 as the whole device has
1048 * been already "pinned" (via function 1) in init_setup_hpt374()
1049 */
1050 if (chip_type == HPT374 && (PCI_FUNC(dev->devfn) & 1)) {
1051 struct pci_dev *dev1 = pci_get_slot(dev->bus,
1052 dev->devfn - 1);
1053 unsigned long io_base = pci_resource_start(dev1, 4);
1054
1055 temp = inl(io_base + 0x90);
1056 pci_dev_put(dev1);
1057 } else
1058 temp = inl(io_base + 0x90);
1059
1060 /*
1061 * In case the signature check fails, we'll have to
1062 * resort to reading the f_CNT register itself in hopes
1063 * that nobody has touched the DPLL yet...
1042 */ 1064 */
1043 temp = inl(io_base + 0x90);
1044 if ((temp & 0xFFFFF000) != 0xABCDE000) { 1065 if ((temp & 0xFFFFF000) != 0xABCDE000) {
1045 int i; 1066 int i;
1046 1067
@@ -1120,7 +1141,7 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
1120 * We also don't like using the DPLL because this causes glitches 1141 * We also don't like using the DPLL because this causes glitches
1121 * on PRST-/SRST- when the state engine gets reset... 1142 * on PRST-/SRST- when the state engine gets reset...
1122 */ 1143 */
1123 if (info->chip_type >= HPT374 || info->settings[clock] == NULL) { 1144 if (chip_type >= HPT374 || info->settings[clock] == NULL) {
1124 u16 f_low, delta = pci_clk < 50 ? 2 : 4; 1145 u16 f_low, delta = pci_clk < 50 ? 2 : 4;
1125 int adjust; 1146 int adjust;
1126 1147
@@ -1190,7 +1211,7 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
1190 /* Point to this chip's own instance of the hpt_info structure. */ 1211 /* Point to this chip's own instance of the hpt_info structure. */
1191 pci_set_drvdata(dev, info); 1212 pci_set_drvdata(dev, info);
1192 1213
1193 if (info->chip_type >= HPT370) { 1214 if (chip_type >= HPT370) {
1194 u8 mcr1, mcr4; 1215 u8 mcr1, mcr4;
1195 1216
1196 /* 1217 /*
@@ -1209,7 +1230,7 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
1209 * the MISC. register to stretch the UltraDMA Tss timing. 1230 * the MISC. register to stretch the UltraDMA Tss timing.
1210 * NOTE: This register is only writeable via I/O space. 1231 * NOTE: This register is only writeable via I/O space.
1211 */ 1232 */
1212 if (info->chip_type == HPT371N && clock == ATA_CLOCK_66MHZ) 1233 if (chip_type == HPT371N && clock == ATA_CLOCK_66MHZ)
1213 1234
1214 outb(inb(io_base + 0x9c) | 0x04, io_base + 0x9c); 1235 outb(inb(io_base + 0x9c) | 0x04, io_base + 0x9c);
1215 1236
@@ -1218,25 +1239,24 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
1218 1239
1219static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) 1240static void __devinit init_hwif_hpt366(ide_hwif_t *hwif)
1220{ 1241{
1221 struct pci_dev *dev = hwif->pci_dev; 1242 struct pci_dev *dev = hwif->pci_dev;
1222 struct hpt_info *info = pci_get_drvdata(dev); 1243 struct hpt_info *info = pci_get_drvdata(dev);
1223 int serialize = HPT_SERIALIZE_IO; 1244 int serialize = HPT_SERIALIZE_IO;
1224 u8 scr1 = 0, ata66 = hwif->channel ? 0x01 : 0x02; 1245 u8 scr1 = 0, ata66 = hwif->channel ? 0x01 : 0x02;
1225 u8 chip_type = info->chip_type; 1246 u8 chip_type = info->chip_type;
1226 u8 new_mcr, old_mcr = 0; 1247 u8 new_mcr, old_mcr = 0;
1227 1248
1228 /* Cache the channel's MISC. control registers' offset */ 1249 /* Cache the channel's MISC. control registers' offset */
1229 hwif->select_data = hwif->channel ? 0x54 : 0x50; 1250 hwif->select_data = hwif->channel ? 0x54 : 0x50;
1230 1251
1231 hwif->tuneproc = &hpt3xx_tune_drive; 1252 hwif->tuneproc = &hpt3xx_tune_drive;
1232 hwif->speedproc = &hpt3xx_tune_chipset; 1253 hwif->speedproc = &hpt3xx_tune_chipset;
1233 hwif->quirkproc = &hpt3xx_quirkproc; 1254 hwif->quirkproc = &hpt3xx_quirkproc;
1234 hwif->intrproc = &hpt3xx_intrproc; 1255 hwif->intrproc = &hpt3xx_intrproc;
1235 hwif->maskproc = &hpt3xx_maskproc; 1256 hwif->maskproc = &hpt3xx_maskproc;
1236 hwif->busproc = &hpt3xx_busproc; 1257 hwif->busproc = &hpt3xx_busproc;
1237 1258
1238 if (chip_type <= HPT370A) 1259 hwif->udma_filter = &hpt3xx_udma_filter;
1239 hwif->udma_filter = &hpt3xx_udma_filter;
1240 1260
1241 /* 1261 /*
1242 * HPT3xxN chips have some complications: 1262 * HPT3xxN chips have some complications:
@@ -1486,19 +1506,19 @@ static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d)
1486 d->host_flags |= IDE_HFLAG_SINGLE; 1506 d->host_flags |= IDE_HFLAG_SINGLE;
1487 d->enablebits[0].mask = d->enablebits[0].val = 0x10; 1507 d->enablebits[0].mask = d->enablebits[0].val = 0x10;
1488 1508
1489 d->udma_mask = HPT366_ALLOW_ATA66_3 ? 1509 d->udma_mask = HPT366_ALLOW_ATA66_3 ? (HPT366_ALLOW_ATA66_4 ?
1490 (HPT366_ALLOW_ATA66_4 ? 0x1f : 0x0f) : 0x07; 1510 ATA_UDMA4 : ATA_UDMA3) : ATA_UDMA2;
1491 break; 1511 break;
1492 case 3: 1512 case 3:
1493 case 4: 1513 case 4:
1494 d->udma_mask = HPT370_ALLOW_ATA100_5 ? 0x3f : 0x1f; 1514 d->udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4;
1495 break; 1515 break;
1496 default: 1516 default:
1497 rev = 6; 1517 rev = 6;
1498 /* fall thru */ 1518 /* fall thru */
1499 case 5: 1519 case 5:
1500 case 6: 1520 case 6:
1501 d->udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f; 1521 d->udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5;
1502 break; 1522 break;
1503 } 1523 }
1504 1524
@@ -1559,7 +1579,7 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1559 .init_dma = init_dma_hpt366, 1579 .init_dma = init_dma_hpt366,
1560 .autodma = AUTODMA, 1580 .autodma = AUTODMA,
1561 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1581 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1562 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1582 .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
1563 .bootable = OFF_BOARD, 1583 .bootable = OFF_BOARD,
1564 .extra = 240, 1584 .extra = 240,
1565 .pio_mask = ATA_PIO4, 1585 .pio_mask = ATA_PIO4,
@@ -1571,7 +1591,7 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1571 .init_dma = init_dma_hpt366, 1591 .init_dma = init_dma_hpt366,
1572 .autodma = AUTODMA, 1592 .autodma = AUTODMA,
1573 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1593 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1574 .udma_mask = HPT302_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1594 .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
1575 .bootable = OFF_BOARD, 1595 .bootable = OFF_BOARD,
1576 .extra = 240, 1596 .extra = 240,
1577 .pio_mask = ATA_PIO4, 1597 .pio_mask = ATA_PIO4,
@@ -1583,7 +1603,7 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1583 .init_dma = init_dma_hpt366, 1603 .init_dma = init_dma_hpt366,
1584 .autodma = AUTODMA, 1604 .autodma = AUTODMA,
1585 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1605 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1586 .udma_mask = HPT371_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1606 .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
1587 .bootable = OFF_BOARD, 1607 .bootable = OFF_BOARD,
1588 .extra = 240, 1608 .extra = 240,
1589 .pio_mask = ATA_PIO4, 1609 .pio_mask = ATA_PIO4,
@@ -1595,7 +1615,7 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1595 .init_dma = init_dma_hpt366, 1615 .init_dma = init_dma_hpt366,
1596 .autodma = AUTODMA, 1616 .autodma = AUTODMA,
1597 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1617 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1598 .udma_mask = 0x3f, 1618 .udma_mask = ATA_UDMA5,
1599 .bootable = OFF_BOARD, 1619 .bootable = OFF_BOARD,
1600 .extra = 240, 1620 .extra = 240,
1601 .pio_mask = ATA_PIO4, 1621 .pio_mask = ATA_PIO4,
@@ -1607,7 +1627,7 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1607 .init_dma = init_dma_hpt366, 1627 .init_dma = init_dma_hpt366,
1608 .autodma = AUTODMA, 1628 .autodma = AUTODMA,
1609 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1629 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1610 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1630 .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
1611 .bootable = OFF_BOARD, 1631 .bootable = OFF_BOARD,
1612 .extra = 240, 1632 .extra = 240,
1613 .pio_mask = ATA_PIO4, 1633 .pio_mask = ATA_PIO4,
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index f6db2f37ef..7b0e479c35 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -9,7 +9,7 @@
9 * Split from: 9 * Split from:
10 * linux/drivers/ide/pdc202xx.c Version 0.35 Mar. 30, 2002 10 * linux/drivers/ide/pdc202xx.c Version 0.35 Mar. 30, 2002
11 * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org> 11 * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>
12 * Copyright (C) 2005-2006 MontaVista Software, Inc. 12 * Copyright (C) 2005-2007 MontaVista Software, Inc.
13 * Portions Copyright (C) 1999 Promise Technology, Inc. 13 * Portions Copyright (C) 1999 Promise Technology, Inc.
14 * Author: Frank Tiernan (frankt@promise.com) 14 * Author: Frank Tiernan (frankt@promise.com)
15 * Released under terms of General Public License 15 * Released under terms of General Public License
@@ -341,7 +341,7 @@ static long __devinit detect_pll_input_clock(unsigned long dma_base)
341 */ 341 */
342 usec_elapsed = (end_time.tv_sec - start_time.tv_sec) * 1000000 + 342 usec_elapsed = (end_time.tv_sec - start_time.tv_sec) * 1000000 +
343 (end_time.tv_usec - start_time.tv_usec); 343 (end_time.tv_usec - start_time.tv_usec);
344 pll_input = ((start_count - end_count) & 0x3ffffff) / 10 * 344 pll_input = ((start_count - end_count) & 0x3fffffff) / 10 *
345 (10000000 / usec_elapsed); 345 (10000000 / usec_elapsed);
346 346
347 DBG("start[%ld] end[%ld]\n", start_count, end_count); 347 DBG("start[%ld] end[%ld]\n", start_count, end_count);
@@ -535,7 +535,7 @@ static int __devinit init_setup_pdc20270(struct pci_dev *dev,
535 (dev->bus->self->device == PCI_DEVICE_ID_DEC_21150)) { 535 (dev->bus->self->device == PCI_DEVICE_ID_DEC_21150)) {
536 if (PCI_SLOT(dev->devfn) & 2) 536 if (PCI_SLOT(dev->devfn) & 2)
537 return -ENODEV; 537 return -ENODEV;
538 d->extra = 0; 538
539 while ((findev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, findev)) != NULL) { 539 while ((findev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, findev)) != NULL) {
540 if ((findev->vendor == dev->vendor) && 540 if ((findev->vendor == dev->vendor) &&
541 (findev->device == dev->device) && 541 (findev->device == dev->device) &&
@@ -544,7 +544,8 @@ static int __devinit init_setup_pdc20270(struct pci_dev *dev,
544 findev->irq = dev->irq; 544 findev->irq = dev->irq;
545 } 545 }
546 ret = ide_setup_pci_devices(dev, findev, d); 546 ret = ide_setup_pci_devices(dev, findev, d);
547 pci_dev_put(findev); 547 if (ret < 0)
548 pci_dev_put(findev);
548 return ret; 549 return ret;
549 } 550 }
550 } 551 }
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index 581316f958..a7be7795e6 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * 2 *
3 * Version 3.46 3 * Version 3.47
4 * 4 *
5 * VIA IDE driver for Linux. Supported southbridges: 5 * VIA IDE driver for Linux. Supported southbridges:
6 * 6 *
@@ -74,6 +74,7 @@ static struct via_isa_bridge {
74 u8 udma_mask; 74 u8 udma_mask;
75 u8 flags; 75 u8 flags;
76} via_isa_bridges[] = { 76} via_isa_bridges[] = {
77 { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
77 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, 78 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
78 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, 79 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
79 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, 80 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
@@ -429,19 +430,26 @@ static struct dmi_system_id cable_dmi_table[] = {
429 { } 430 { }
430}; 431};
431 432
432static int via_cable_override(void) 433static int via_cable_override(struct pci_dev *pdev)
433{ 434{
434 /* Systems by DMI */ 435 /* Systems by DMI */
435 if (dmi_check_system(cable_dmi_table)) 436 if (dmi_check_system(cable_dmi_table))
436 return 1; 437 return 1;
438
439 /* Arima W730-K8/Targa Visionary 811/... */
440 if (pdev->subsystem_vendor == 0x161F &&
441 pdev->subsystem_device == 0x2032)
442 return 1;
443
437 return 0; 444 return 0;
438} 445}
439 446
440static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif) 447static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif)
441{ 448{
442 struct via82cxxx_dev *vdev = pci_get_drvdata(hwif->pci_dev); 449 struct pci_dev *pdev = hwif->pci_dev;
450 struct via82cxxx_dev *vdev = pci_get_drvdata(pdev);
443 451
444 if (via_cable_override()) 452 if (via_cable_override(pdev))
445 return ATA_CBL_PATA40_SHORT; 453 return ATA_CBL_PATA40_SHORT;
446 454
447 if ((vdev->via_80w >> hwif->channel) & 1) 455 if ((vdev->via_80w >> hwif->channel) & 1)
diff --git a/drivers/ide/ppc/mpc8xx.c b/drivers/ide/ppc/mpc8xx.c
index 8859fe2f5a..dab79afa9b 100644
--- a/drivers/ide/ppc/mpc8xx.c
+++ b/drivers/ide/ppc/mpc8xx.c
@@ -32,7 +32,6 @@
32#include <asm/mpc8xx.h> 32#include <asm/mpc8xx.h>
33#include <asm/mmu.h> 33#include <asm/mmu.h>
34#include <asm/processor.h> 34#include <asm/processor.h>
35#include <asm/residual.h>
36#include <asm/io.h> 35#include <asm/io.h>
37#include <asm/pgtable.h> 36#include <asm/pgtable.h>
38#include <asm/ide.h> 37#include <asm/ide.h>
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 4b13cd9a02..2fb047b898 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -1546,6 +1546,7 @@ static struct pci_device_id pmac_ide_pci_match[] = {
1546 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 1546 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1547 { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID2_ATA, 1547 { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID2_ATA,
1548 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 1548 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1549 {},
1549}; 1550};
1550 1551
1551static struct pci_driver pmac_ide_pci_driver = { 1552static struct pci_driver pmac_ide_pci_driver = {
@@ -1802,9 +1803,7 @@ pmac_ide_dma_check(ide_drive_t *drive)
1802{ 1803{
1803 struct hd_driveid *id = drive->id; 1804 struct hd_driveid *id = drive->id;
1804 ide_hwif_t *hwif = HWIF(drive); 1805 ide_hwif_t *hwif = HWIF(drive);
1805 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)hwif->hwif_data;
1806 int enable = 1; 1806 int enable = 1;
1807 int map;
1808 drive->using_dma = 0; 1807 drive->using_dma = 0;
1809 1808
1810 if (drive->media == ide_floppy) 1809 if (drive->media == ide_floppy)
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index 30e596c0f1..1129f8c308 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -816,19 +816,15 @@ static int __init ide_scan_pcidev(struct pci_dev *dev)
816 struct list_head *l; 816 struct list_head *l;
817 struct pci_driver *d; 817 struct pci_driver *d;
818 818
819 list_for_each(l, &ide_pci_drivers) 819 list_for_each(l, &ide_pci_drivers) {
820 {
821 d = list_entry(l, struct pci_driver, node); 820 d = list_entry(l, struct pci_driver, node);
822 if(d->id_table) 821 if (d->id_table) {
823 { 822 const struct pci_device_id *id = pci_match_id(d->id_table,
824 const struct pci_device_id *id = pci_match_id(d->id_table, dev); 823 dev);
825 if(id != NULL) 824 if (id != NULL && d->probe(dev, id) >= 0) {
826 { 825 dev->driver = d;
827 if(d->probe(dev, id) >= 0) 826 pci_dev_get(dev);
828 { 827 return 1;
829 dev->driver = d;
830 return 1;
831 }
832 } 828 }
833 } 829 }
834 } 830 }
@@ -851,15 +847,13 @@ void __init ide_scan_pcibus (int scan_direction)
851 struct list_head *l, *n; 847 struct list_head *l, *n;
852 848
853 pre_init = 0; 849 pre_init = 0;
854 if (!scan_direction) { 850 if (!scan_direction)
855 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { 851 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
856 ide_scan_pcidev(dev); 852 ide_scan_pcidev(dev);
857 } 853 else
858 } else { 854 while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID, dev))
859 while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { 855 != NULL)
860 ide_scan_pcidev(dev); 856 ide_scan_pcidev(dev);
861 }
862 }
863 857
864 /* 858 /*
865 * Hand the drivers over to the PCI layer now we 859 * Hand the drivers over to the PCI layer now we
@@ -869,12 +863,9 @@ void __init ide_scan_pcibus (int scan_direction)
869 list_for_each_safe(l, n, &ide_pci_drivers) { 863 list_for_each_safe(l, n, &ide_pci_drivers) {
870 list_del(l); 864 list_del(l);
871 d = list_entry(l, struct pci_driver, node); 865 d = list_entry(l, struct pci_driver, node);
872 if (__pci_register_driver(d, d->driver.owner, 866 if (__pci_register_driver(d, d->driver.owner, d->driver.mod_name))
873 d->driver.mod_name)) { 867 printk(KERN_ERR "%s: failed to register driver for %s\n",
874 printk(KERN_ERR "%s: failed to register driver " 868 __FUNCTION__, d->driver.mod_name);
875 "for %s\n", __FUNCTION__,
876 d->driver.mod_name);
877 }
878 } 869 }
879} 870}
880#endif 871#endif
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c
index ee45259573..98fd985a32 100644
--- a/drivers/ieee1394/ieee1394_core.c
+++ b/drivers/ieee1394/ieee1394_core.c
@@ -1273,7 +1273,7 @@ static void __exit ieee1394_cleanup(void)
1273 unregister_chrdev_region(IEEE1394_CORE_DEV, 256); 1273 unregister_chrdev_region(IEEE1394_CORE_DEV, 256);
1274} 1274}
1275 1275
1276fs_initcall(ieee1394_init); /* same as ohci1394 */ 1276module_init(ieee1394_init);
1277module_exit(ieee1394_cleanup); 1277module_exit(ieee1394_cleanup);
1278 1278
1279/* Exported symbols */ 1279/* Exported symbols */
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index 5667c8102e..372c5c16eb 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -3537,7 +3537,5 @@ static int __init ohci1394_init(void)
3537 return pci_register_driver(&ohci1394_pci_driver); 3537 return pci_register_driver(&ohci1394_pci_driver);
3538} 3538}
3539 3539
3540/* Register before most other device drivers. 3540module_init(ohci1394_init);
3541 * Useful for remote debugging via physical DMA, e.g. using firescope. */
3542fs_initcall(ohci1394_init);
3543module_exit(ohci1394_cleanup); 3541module_exit(ohci1394_cleanup);
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 47dbe8f17e..a81ba8fca0 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -513,9 +513,9 @@ static int sbp2util_create_command_orb_pool(struct sbp2_lu *lu)
513 return 0; 513 return 0;
514} 514}
515 515
516static void sbp2util_remove_command_orb_pool(struct sbp2_lu *lu) 516static void sbp2util_remove_command_orb_pool(struct sbp2_lu *lu,
517 struct hpsb_host *host)
517{ 518{
518 struct hpsb_host *host = lu->hi->host;
519 struct list_head *lh, *next; 519 struct list_head *lh, *next;
520 struct sbp2_command_info *cmd; 520 struct sbp2_command_info *cmd;
521 unsigned long flags; 521 unsigned long flags;
@@ -922,15 +922,16 @@ static void sbp2_remove_device(struct sbp2_lu *lu)
922 922
923 if (!lu) 923 if (!lu)
924 return; 924 return;
925
926 hi = lu->hi; 925 hi = lu->hi;
926 if (!hi)
927 goto no_hi;
927 928
928 if (lu->shost) { 929 if (lu->shost) {
929 scsi_remove_host(lu->shost); 930 scsi_remove_host(lu->shost);
930 scsi_host_put(lu->shost); 931 scsi_host_put(lu->shost);
931 } 932 }
932 flush_scheduled_work(); 933 flush_scheduled_work();
933 sbp2util_remove_command_orb_pool(lu); 934 sbp2util_remove_command_orb_pool(lu, hi->host);
934 935
935 list_del(&lu->lu_list); 936 list_del(&lu->lu_list);
936 937
@@ -971,9 +972,8 @@ static void sbp2_remove_device(struct sbp2_lu *lu)
971 972
972 lu->ud->device.driver_data = NULL; 973 lu->ud->device.driver_data = NULL;
973 974
974 if (hi) 975 module_put(hi->host->driver->owner);
975 module_put(hi->host->driver->owner); 976no_hi:
976
977 kfree(lu); 977 kfree(lu);
978} 978}
979 979
diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c b/drivers/infiniband/hw/cxgb3/cxio_hal.c
index 1518b41482..beb2a38146 100644
--- a/drivers/infiniband/hw/cxgb3/cxio_hal.c
+++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c
@@ -916,7 +916,7 @@ int cxio_rdev_open(struct cxio_rdev *rdev_p)
916 PDBG("%s opening rnic dev %s\n", __FUNCTION__, rdev_p->dev_name); 916 PDBG("%s opening rnic dev %s\n", __FUNCTION__, rdev_p->dev_name);
917 memset(&rdev_p->ctrl_qp, 0, sizeof(rdev_p->ctrl_qp)); 917 memset(&rdev_p->ctrl_qp, 0, sizeof(rdev_p->ctrl_qp));
918 if (!rdev_p->t3cdev_p) 918 if (!rdev_p->t3cdev_p)
919 rdev_p->t3cdev_p = T3CDEV(netdev_p); 919 rdev_p->t3cdev_p = dev2t3cdev(netdev_p);
920 rdev_p->t3cdev_p->ulp = (void *) rdev_p; 920 rdev_p->t3cdev_p->ulp = (void *) rdev_p;
921 err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_GET_PARAMS, 921 err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_GET_PARAMS,
922 &(rdev_p->rnic_info)); 922 &(rdev_p->rnic_info));
diff --git a/drivers/infiniband/hw/ehca/ehca_hca.c b/drivers/infiniband/hw/ehca/ehca_hca.c
index fc19ef9fd9..cf22472d94 100644
--- a/drivers/infiniband/hw/ehca/ehca_hca.c
+++ b/drivers/infiniband/hw/ehca/ehca_hca.c
@@ -93,9 +93,13 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props)
93 props->max_pd = min_t(int, rblock->max_pd, INT_MAX); 93 props->max_pd = min_t(int, rblock->max_pd, INT_MAX);
94 props->max_ah = min_t(int, rblock->max_ah, INT_MAX); 94 props->max_ah = min_t(int, rblock->max_ah, INT_MAX);
95 props->max_fmr = min_t(int, rblock->max_mr, INT_MAX); 95 props->max_fmr = min_t(int, rblock->max_mr, INT_MAX);
96 props->max_srq = 0; 96
97 props->max_srq_wr = 0; 97 if (EHCA_BMASK_GET(HCA_CAP_SRQ, shca->hca_cap)) {
98 props->max_srq_sge = 0; 98 props->max_srq = props->max_qp;
99 props->max_srq_wr = props->max_qp_wr;
100 props->max_srq_sge = 3;
101 }
102
99 props->max_pkeys = 16; 103 props->max_pkeys = 16;
100 props->local_ca_ack_delay 104 props->local_ca_ack_delay
101 = rblock->local_ca_ack_delay; 105 = rblock->local_ca_ack_delay;
diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c
index ee06d8bd73..a925ea5244 100644
--- a/drivers/infiniband/hw/ehca/ehca_irq.c
+++ b/drivers/infiniband/hw/ehca/ehca_irq.c
@@ -175,41 +175,55 @@ error_data1:
175 175
176} 176}
177 177
178static void qp_event_callback(struct ehca_shca *shca, u64 eqe, 178static void dispatch_qp_event(struct ehca_shca *shca, struct ehca_qp *qp,
179 enum ib_event_type event_type, int fatal) 179 enum ib_event_type event_type)
180{ 180{
181 struct ib_event event; 181 struct ib_event event;
182 struct ehca_qp *qp;
183 u32 token = EHCA_BMASK_GET(EQE_QP_TOKEN, eqe);
184
185 read_lock(&ehca_qp_idr_lock);
186 qp = idr_find(&ehca_qp_idr, token);
187 read_unlock(&ehca_qp_idr_lock);
188
189
190 if (!qp)
191 return;
192
193 if (fatal)
194 ehca_error_data(shca, qp, qp->ipz_qp_handle.handle);
195 182
196 event.device = &shca->ib_device; 183 event.device = &shca->ib_device;
184 event.event = event_type;
197 185
198 if (qp->ext_type == EQPT_SRQ) { 186 if (qp->ext_type == EQPT_SRQ) {
199 if (!qp->ib_srq.event_handler) 187 if (!qp->ib_srq.event_handler)
200 return; 188 return;
201 189
202 event.event = fatal ? IB_EVENT_SRQ_ERR : event_type;
203 event.element.srq = &qp->ib_srq; 190 event.element.srq = &qp->ib_srq;
204 qp->ib_srq.event_handler(&event, qp->ib_srq.srq_context); 191 qp->ib_srq.event_handler(&event, qp->ib_srq.srq_context);
205 } else { 192 } else {
206 if (!qp->ib_qp.event_handler) 193 if (!qp->ib_qp.event_handler)
207 return; 194 return;
208 195
209 event.event = event_type;
210 event.element.qp = &qp->ib_qp; 196 event.element.qp = &qp->ib_qp;
211 qp->ib_qp.event_handler(&event, qp->ib_qp.qp_context); 197 qp->ib_qp.event_handler(&event, qp->ib_qp.qp_context);
212 } 198 }
199}
200
201static void qp_event_callback(struct ehca_shca *shca, u64 eqe,
202 enum ib_event_type event_type, int fatal)
203{
204 struct ehca_qp *qp;
205 u32 token = EHCA_BMASK_GET(EQE_QP_TOKEN, eqe);
206
207 read_lock(&ehca_qp_idr_lock);
208 qp = idr_find(&ehca_qp_idr, token);
209 read_unlock(&ehca_qp_idr_lock);
210
211 if (!qp)
212 return;
213
214 if (fatal)
215 ehca_error_data(shca, qp, qp->ipz_qp_handle.handle);
216
217 dispatch_qp_event(shca, qp, fatal && qp->ext_type == EQPT_SRQ ?
218 IB_EVENT_SRQ_ERR : event_type);
219
220 /*
221 * eHCA only processes one WQE at a time for SRQ base QPs,
222 * so the last WQE has been processed as soon as the QP enters
223 * error state.
224 */
225 if (fatal && qp->ext_type == EQPT_SRQBASE)
226 dispatch_qp_event(shca, qp, IB_EVENT_QP_LAST_WQE_REACHED);
213 227
214 return; 228 return;
215} 229}
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
index b178cba963..84d435a5ee 100644
--- a/drivers/infiniband/hw/ehca/ehca_qp.c
+++ b/drivers/infiniband/hw/ehca/ehca_qp.c
@@ -600,10 +600,12 @@ static struct ehca_qp *internal_create_qp(
600 600
601 if (EHCA_BMASK_GET(HCA_CAP_MINI_QP, shca->hca_cap) 601 if (EHCA_BMASK_GET(HCA_CAP_MINI_QP, shca->hca_cap)
602 && !(context && udata)) { /* no small QP support in userspace ATM */ 602 && !(context && udata)) { /* no small QP support in userspace ATM */
603 ehca_determine_small_queue( 603 if (HAS_SQ(my_qp))
604 &parms.squeue, max_send_sge, is_llqp); 604 ehca_determine_small_queue(
605 ehca_determine_small_queue( 605 &parms.squeue, max_send_sge, is_llqp);
606 &parms.rqueue, max_recv_sge, is_llqp); 606 if (HAS_RQ(my_qp))
607 ehca_determine_small_queue(
608 &parms.rqueue, max_recv_sge, is_llqp);
607 parms.qp_storage = 609 parms.qp_storage =
608 (parms.squeue.is_small || parms.rqueue.is_small); 610 (parms.squeue.is_small || parms.rqueue.is_small);
609 } 611 }
diff --git a/drivers/infiniband/hw/ehca/ipz_pt_fn.c b/drivers/infiniband/hw/ehca/ipz_pt_fn.c
index a090c679c3..29bd476fbd 100644
--- a/drivers/infiniband/hw/ehca/ipz_pt_fn.c
+++ b/drivers/infiniband/hw/ehca/ipz_pt_fn.c
@@ -172,7 +172,7 @@ static void free_small_queue_page(struct ipz_queue *queue, struct ehca_pd *pd)
172 unsigned long bit; 172 unsigned long bit;
173 int free_page = 0; 173 int free_page = 0;
174 174
175 bit = ((unsigned long)queue->queue_pages[0] & PAGE_MASK) 175 bit = ((unsigned long)queue->queue_pages[0] & ~PAGE_MASK)
176 >> (order + 9); 176 >> (order + 9);
177 177
178 mutex_lock(&pd->lock); 178 mutex_lock(&pd->lock);
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index ba0428d872..85c51bdc36 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1211,12 +1211,42 @@ static void set_datagram_seg(struct mlx4_wqe_datagram_seg *dseg,
1211 dseg->qkey = cpu_to_be32(wr->wr.ud.remote_qkey); 1211 dseg->qkey = cpu_to_be32(wr->wr.ud.remote_qkey);
1212} 1212}
1213 1213
1214static void set_data_seg(struct mlx4_wqe_data_seg *dseg, 1214static void set_mlx_icrc_seg(void *dseg)
1215 struct ib_sge *sg) 1215{
1216 u32 *t = dseg;
1217 struct mlx4_wqe_inline_seg *iseg = dseg;
1218
1219 t[1] = 0;
1220
1221 /*
1222 * Need a barrier here before writing the byte_count field to
1223 * make sure that all the data is visible before the
1224 * byte_count field is set. Otherwise, if the segment begins
1225 * a new cacheline, the HCA prefetcher could grab the 64-byte
1226 * chunk and get a valid (!= * 0xffffffff) byte count but
1227 * stale data, and end up sending the wrong data.
1228 */
1229 wmb();
1230
1231 iseg->byte_count = cpu_to_be32((1 << 31) | 4);
1232}
1233
1234static void set_data_seg(struct mlx4_wqe_data_seg *dseg, struct ib_sge *sg)
1216{ 1235{
1217 dseg->byte_count = cpu_to_be32(sg->length);
1218 dseg->lkey = cpu_to_be32(sg->lkey); 1236 dseg->lkey = cpu_to_be32(sg->lkey);
1219 dseg->addr = cpu_to_be64(sg->addr); 1237 dseg->addr = cpu_to_be64(sg->addr);
1238
1239 /*
1240 * Need a barrier here before writing the byte_count field to
1241 * make sure that all the data is visible before the
1242 * byte_count field is set. Otherwise, if the segment begins
1243 * a new cacheline, the HCA prefetcher could grab the 64-byte
1244 * chunk and get a valid (!= * 0xffffffff) byte count but
1245 * stale data, and end up sending the wrong data.
1246 */
1247 wmb();
1248
1249 dseg->byte_count = cpu_to_be32(sg->length);
1220} 1250}
1221 1251
1222int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, 1252int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
@@ -1225,6 +1255,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1225 struct mlx4_ib_qp *qp = to_mqp(ibqp); 1255 struct mlx4_ib_qp *qp = to_mqp(ibqp);
1226 void *wqe; 1256 void *wqe;
1227 struct mlx4_wqe_ctrl_seg *ctrl; 1257 struct mlx4_wqe_ctrl_seg *ctrl;
1258 struct mlx4_wqe_data_seg *dseg;
1228 unsigned long flags; 1259 unsigned long flags;
1229 int nreq; 1260 int nreq;
1230 int err = 0; 1261 int err = 0;
@@ -1324,22 +1355,27 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1324 break; 1355 break;
1325 } 1356 }
1326 1357
1327 for (i = 0; i < wr->num_sge; ++i) { 1358 /*
1328 set_data_seg(wqe, wr->sg_list + i); 1359 * Write data segments in reverse order, so as to
1360 * overwrite cacheline stamp last within each
1361 * cacheline. This avoids issues with WQE
1362 * prefetching.
1363 */
1329 1364
1330 wqe += sizeof (struct mlx4_wqe_data_seg); 1365 dseg = wqe;
1331 size += sizeof (struct mlx4_wqe_data_seg) / 16; 1366 dseg += wr->num_sge - 1;
1332 } 1367 size += wr->num_sge * (sizeof (struct mlx4_wqe_data_seg) / 16);
1333 1368
1334 /* Add one more inline data segment for ICRC for MLX sends */ 1369 /* Add one more inline data segment for ICRC for MLX sends */
1335 if (qp->ibqp.qp_type == IB_QPT_SMI || qp->ibqp.qp_type == IB_QPT_GSI) { 1370 if (unlikely(qp->ibqp.qp_type == IB_QPT_SMI ||
1336 ((struct mlx4_wqe_inline_seg *) wqe)->byte_count = 1371 qp->ibqp.qp_type == IB_QPT_GSI)) {
1337 cpu_to_be32((1 << 31) | 4); 1372 set_mlx_icrc_seg(dseg + 1);
1338 ((u32 *) wqe)[1] = 0;
1339 wqe += sizeof (struct mlx4_wqe_data_seg);
1340 size += sizeof (struct mlx4_wqe_data_seg) / 16; 1373 size += sizeof (struct mlx4_wqe_data_seg) / 16;
1341 } 1374 }
1342 1375
1376 for (i = wr->num_sge - 1; i >= 0; --i, --dseg)
1377 set_data_seg(dseg, wr->sg_list + i);
1378
1343 ctrl->fence_size = (wr->send_flags & IB_SEND_FENCE ? 1379 ctrl->fence_size = (wr->send_flags & IB_SEND_FENCE ?
1344 MLX4_WQE_CTRL_FENCE : 0) | size; 1380 MLX4_WQE_CTRL_FENCE : 0) | size;
1345 1381
diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig
index e2abe18e57..7c662ee594 100644
--- a/drivers/input/joystick/Kconfig
+++ b/drivers/input/joystick/Kconfig
@@ -277,7 +277,7 @@ config JOYSTICK_XPAD_FF
277 277
278config JOYSTICK_XPAD_LEDS 278config JOYSTICK_XPAD_LEDS
279 bool "LED Support for Xbox360 controller 'BigX' LED" 279 bool "LED Support for Xbox360 controller 'BigX' LED"
280 depends on LEDS_CLASS && JOYSTICK_XPAD 280 depends on JOYSTICK_XPAD && (LEDS_CLASS=y || LEDS_CLASS=JOYSTICK_XPAD)
281 ---help--- 281 ---help---
282 This option enables support for the LED which surrounds the Big X on 282 This option enables support for the LED which surrounds the Big X on
283 XBox 360 controller. 283 XBox 360 controller.
diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c
index 3154ccd740..45c4939ced 100644
--- a/drivers/input/joystick/iforce/iforce-packets.c
+++ b/drivers/input/joystick/iforce/iforce-packets.c
@@ -246,13 +246,12 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data)
246 246
247int iforce_get_id_packet(struct iforce *iforce, char *packet) 247int iforce_get_id_packet(struct iforce *iforce, char *packet)
248{ 248{
249 int status;
250
251 switch (iforce->bus) { 249 switch (iforce->bus) {
252 250
253 case IFORCE_USB: 251 case IFORCE_USB: {
254
255#ifdef CONFIG_JOYSTICK_IFORCE_USB 252#ifdef CONFIG_JOYSTICK_IFORCE_USB
253 int status;
254
256 iforce->cr.bRequest = packet[0]; 255 iforce->cr.bRequest = packet[0];
257 iforce->ctrl->dev = iforce->usbdev; 256 iforce->ctrl->dev = iforce->usbdev;
258 257
@@ -273,6 +272,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet)
273#else 272#else
274 dbg("iforce_get_id_packet: iforce->bus = USB!"); 273 dbg("iforce_get_id_packet: iforce->bus = USB!");
275#endif 274#endif
275 }
276 break; 276 break;
277 277
278 case IFORCE_232: 278 case IFORCE_232:
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 739212252b..f0b22b8b27 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -22,7 +22,6 @@
22#include <linux/delay.h> 22#include <linux/delay.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/input.h> 24#include <linux/input.h>
25#include <linux/irq.h>
26#include <linux/gpio_keys.h> 25#include <linux/gpio_keys.h>
27 26
28#include <asm/gpio.h> 27#include <asm/gpio.h>
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index 2bea1b2c63..a1804bfdbb 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -328,6 +328,7 @@ static void atp_complete(struct urb* urb)
328{ 328{
329 int x, y, x_z, y_z, x_f, y_f; 329 int x, y, x_z, y_z, x_f, y_f;
330 int retval, i, j; 330 int retval, i, j;
331 int key;
331 struct atp *dev = urb->context; 332 struct atp *dev = urb->context;
332 333
333 switch (urb->status) { 334 switch (urb->status) {
@@ -468,6 +469,7 @@ static void atp_complete(struct urb* urb)
468 ATP_XFACT, &x_z, &x_f); 469 ATP_XFACT, &x_z, &x_f);
469 y = atp_calculate_abs(dev->xy_acc + ATP_XSENSORS, ATP_YSENSORS, 470 y = atp_calculate_abs(dev->xy_acc + ATP_XSENSORS, ATP_YSENSORS,
470 ATP_YFACT, &y_z, &y_f); 471 ATP_YFACT, &y_z, &y_f);
472 key = dev->data[dev->datalen - 1] & 1;
471 473
472 if (x && y) { 474 if (x && y) {
473 if (dev->x_old != -1) { 475 if (dev->x_old != -1) {
@@ -505,7 +507,7 @@ static void atp_complete(struct urb* urb)
505 the first touch unless reinitialised. Do so if it's been 507 the first touch unless reinitialised. Do so if it's been
506 idle for a while in order to avoid waking the kernel up 508 idle for a while in order to avoid waking the kernel up
507 several hundred times a second */ 509 several hundred times a second */
508 if (atp_is_geyser_3(dev)) { 510 if (!key && atp_is_geyser_3(dev)) {
509 dev->idlecount++; 511 dev->idlecount++;
510 if (dev->idlecount == 10) { 512 if (dev->idlecount == 10) {
511 dev->valid = 0; 513 dev->valid = 0;
@@ -514,7 +516,7 @@ static void atp_complete(struct urb* urb)
514 } 516 }
515 } 517 }
516 518
517 input_report_key(dev->input, BTN_LEFT, dev->data[dev->datalen - 1] & 1); 519 input_report_key(dev->input, BTN_LEFT, key);
518 input_sync(dev->input); 520 input_sync(dev->input);
519 521
520exit: 522exit:
diff --git a/drivers/input/mouse/touchkit_ps2.h b/drivers/input/mouse/touchkit_ps2.h
index 61e9dfd841..8a0dd3574a 100644
--- a/drivers/input/mouse/touchkit_ps2.h
+++ b/drivers/input/mouse/touchkit_ps2.h
@@ -15,7 +15,8 @@
15#ifdef CONFIG_MOUSE_PS2_TOUCHKIT 15#ifdef CONFIG_MOUSE_PS2_TOUCHKIT
16int touchkit_ps2_detect(struct psmouse *psmouse, int set_properties); 16int touchkit_ps2_detect(struct psmouse *psmouse, int set_properties);
17#else 17#else
18inline int touchkit_ps2_detect(struct psmouse *psmouse, int set_properties) 18static inline int touchkit_ps2_detect(struct psmouse *psmouse,
19 int set_properties)
19{ 20{
20 return -ENOSYS; 21 return -ENOSYS;
21} 22}
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c
index 74f14e0977..3e99df6be0 100644
--- a/drivers/input/serio/gscps2.c
+++ b/drivers/input/serio/gscps2.c
@@ -340,8 +340,8 @@ static int __init gscps2_probe(struct parisc_device *dev)
340 if (dev->id.sversion == 0x96) 340 if (dev->id.sversion == 0x96)
341 hpa += GSC_DINO_OFFSET; 341 hpa += GSC_DINO_OFFSET;
342 342
343 ps2port = kmalloc(sizeof(struct gscps2port), GFP_KERNEL); 343 ps2port = kzalloc(sizeof(struct gscps2port), GFP_KERNEL);
344 serio = kmalloc(sizeof(struct serio), GFP_KERNEL); 344 serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
345 if (!ps2port || !serio) { 345 if (!ps2port || !serio) {
346 ret = -ENOMEM; 346 ret = -ENOMEM;
347 goto fail_nomem; 347 goto fail_nomem;
@@ -349,8 +349,6 @@ static int __init gscps2_probe(struct parisc_device *dev)
349 349
350 dev_set_drvdata(&dev->dev, ps2port); 350 dev_set_drvdata(&dev->dev, ps2port);
351 351
352 memset(ps2port, 0, sizeof(struct gscps2port));
353 memset(serio, 0, sizeof(struct serio));
354 ps2port->port = serio; 352 ps2port->port = serio;
355 ps2port->padev = dev; 353 ps2port->padev = dev;
356 ps2port->addr = ioremap_nocache(hpa, GSC_STATUS + 4); 354 ps2port->addr = ioremap_nocache(hpa, GSC_STATUS + 4);
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 702a526cf4..f8fe421480 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -211,6 +211,16 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
211 }, 211 },
212 }, 212 },
213 { 213 {
214 /*
215 * Like DV4017EA does not raise AUXERR for errors on MUX ports.
216 */
217 .ident = "HP Pavilion DV4270ca",
218 .matches = {
219 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
220 DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EH476UA#ABL)"),
221 },
222 },
223 {
214 .ident = "Toshiba P10", 224 .ident = "Toshiba P10",
215 .matches = { 225 .matches = {
216 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), 226 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 3888dc307e..c2eea2767e 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -512,6 +512,7 @@ static irqreturn_t __devinit i8042_aux_test_irq(int irq, void *dev_id)
512{ 512{
513 unsigned long flags; 513 unsigned long flags;
514 unsigned char str, data; 514 unsigned char str, data;
515 int ret = 0;
515 516
516 spin_lock_irqsave(&i8042_lock, flags); 517 spin_lock_irqsave(&i8042_lock, flags);
517 str = i8042_read_status(); 518 str = i8042_read_status();
@@ -520,10 +521,11 @@ static irqreturn_t __devinit i8042_aux_test_irq(int irq, void *dev_id)
520 if (i8042_irq_being_tested && 521 if (i8042_irq_being_tested &&
521 data == 0xa5 && (str & I8042_STR_AUXDATA)) 522 data == 0xa5 && (str & I8042_STR_AUXDATA))
522 complete(&i8042_aux_irq_delivered); 523 complete(&i8042_aux_irq_delivered);
524 ret = 1;
523 } 525 }
524 spin_unlock_irqrestore(&i8042_lock, flags); 526 spin_unlock_irqrestore(&i8042_lock, flags);
525 527
526 return IRQ_HANDLED; 528 return IRQ_RETVAL(ret);
527} 529}
528 530
529/* 531/*
@@ -1038,7 +1040,7 @@ static void __devinit i8042_register_ports(void)
1038 } 1040 }
1039} 1041}
1040 1042
1041static void __devinit i8042_unregister_ports(void) 1043static void __devexit i8042_unregister_ports(void)
1042{ 1044{
1043 int i; 1045 int i;
1044 1046
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index b407028ffc..741f6c6f1e 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -767,7 +767,7 @@ static int usbtouch_probe(struct usb_interface *intf,
767 le16_to_cpu(udev->descriptor.idProduct)); 767 le16_to_cpu(udev->descriptor.idProduct));
768 768
769 usb_make_path(udev, usbtouch->phys, sizeof(usbtouch->phys)); 769 usb_make_path(udev, usbtouch->phys, sizeof(usbtouch->phys));
770 strlcpy(usbtouch->phys, "/input0", sizeof(usbtouch->phys)); 770 strlcat(usbtouch->phys, "/input0", sizeof(usbtouch->phys));
771 771
772 input_dev->name = usbtouch->name; 772 input_dev->name = usbtouch->name;
773 input_dev->phys = usbtouch->phys; 773 input_dev->phys = usbtouch->phys;
diff --git a/drivers/isdn/i4l/isdn_bsdcomp.c b/drivers/isdn/i4l/isdn_bsdcomp.c
index 90a23795db..02d9918705 100644
--- a/drivers/isdn/i4l/isdn_bsdcomp.c
+++ b/drivers/isdn/i4l/isdn_bsdcomp.c
@@ -341,7 +341,7 @@ static void *bsd_alloc (struct isdn_ppp_comp_data *data)
341 * Allocate space for the dictionary. This may be more than one page in 341 * Allocate space for the dictionary. This may be more than one page in
342 * length. 342 * length.
343 */ 343 */
344 db->dict = (struct bsd_dict *) vmalloc (hsize * sizeof (struct bsd_dict)); 344 db->dict = vmalloc(hsize * sizeof(struct bsd_dict));
345 if (!db->dict) { 345 if (!db->dict) {
346 bsd_free (db); 346 bsd_free (db);
347 return NULL; 347 return NULL;
@@ -354,8 +354,7 @@ static void *bsd_alloc (struct isdn_ppp_comp_data *data)
354 if (!decomp) 354 if (!decomp)
355 db->lens = NULL; 355 db->lens = NULL;
356 else { 356 else {
357 db->lens = (unsigned short *) vmalloc ((maxmaxcode + 1) * 357 db->lens = vmalloc((maxmaxcode + 1) * sizeof(db->lens[0]));
358 sizeof (db->lens[0]));
359 if (!db->lens) { 358 if (!db->lens) {
360 bsd_free (db); 359 bsd_free (db);
361 return (NULL); 360 return (NULL);
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index c97330b198..4910bca526 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -1135,7 +1135,7 @@ isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off)
1135 if (count > dev->drv[drvidx]->stavail) 1135 if (count > dev->drv[drvidx]->stavail)
1136 count = dev->drv[drvidx]->stavail; 1136 count = dev->drv[drvidx]->stavail;
1137 len = dev->drv[drvidx]->interface->readstat(buf, count, 1137 len = dev->drv[drvidx]->interface->readstat(buf, count,
1138 drvidx, isdn_minor2chan(minor)); 1138 drvidx, isdn_minor2chan(minor - ISDN_MINOR_CTRL));
1139 if (len < 0) { 1139 if (len < 0) {
1140 retval = len; 1140 retval = len;
1141 goto out; 1141 goto out;
@@ -1207,7 +1207,8 @@ isdn_write(struct file *file, const char __user *buf, size_t count, loff_t * off
1207 */ 1207 */
1208 if (dev->drv[drvidx]->interface->writecmd) 1208 if (dev->drv[drvidx]->interface->writecmd)
1209 retval = dev->drv[drvidx]->interface-> 1209 retval = dev->drv[drvidx]->interface->
1210 writecmd(buf, count, drvidx, isdn_minor2chan(minor)); 1210 writecmd(buf, count, drvidx,
1211 isdn_minor2chan(minor - ISDN_MINOR_CTRL));
1211 else 1212 else
1212 retval = count; 1213 retval = count;
1213 goto out; 1214 goto out;
@@ -2291,7 +2292,7 @@ static int __init isdn_init(void)
2291 int i; 2292 int i;
2292 char tmprev[50]; 2293 char tmprev[50];
2293 2294
2294 if (!(dev = (isdn_dev *) vmalloc(sizeof(isdn_dev)))) { 2295 if (!(dev = vmalloc(sizeof(isdn_dev)))) {
2295 printk(KERN_WARNING "isdn: Could not allocate device-struct.\n"); 2296 printk(KERN_WARNING "isdn: Could not allocate device-struct.\n");
2296 return -EIO; 2297 return -EIO;
2297 } 2298 }
diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig
index 7b64fd4aa2..0a419a0de6 100644
--- a/drivers/kvm/Kconfig
+++ b/drivers/kvm/Kconfig
@@ -6,7 +6,8 @@ menuconfig VIRTUALIZATION
6 depends on X86 6 depends on X86
7 default y 7 default y
8 ---help--- 8 ---help---
9 Say Y here to get to see options for virtualization guest drivers. 9 Say Y here to get to see options for using your Linux host to run other
10 operating systems inside virtual machines (guests).
10 This option alone does not add any kernel code. 11 This option alone does not add any kernel code.
11 12
12 If you say N, all options in this submenu will be skipped and disabled. 13 If you say N, all options in this submenu will be skipped and disabled.
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 3ac9cbce33..336be86c6f 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -619,7 +619,7 @@ unsigned long segment_base(u16 selector);
619void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, 619void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
620 const u8 *old, const u8 *new, int bytes); 620 const u8 *old, const u8 *new, int bytes);
621int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva); 621int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva);
622void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu); 622void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu);
623int kvm_mmu_load(struct kvm_vcpu *vcpu); 623int kvm_mmu_load(struct kvm_vcpu *vcpu);
624void kvm_mmu_unload(struct kvm_vcpu *vcpu); 624void kvm_mmu_unload(struct kvm_vcpu *vcpu);
625 625
@@ -628,11 +628,15 @@ int kvm_hypercall(struct kvm_vcpu *vcpu, struct kvm_run *run);
628static inline int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, 628static inline int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva,
629 u32 error_code) 629 u32 error_code)
630{ 630{
631 if (unlikely(vcpu->kvm->n_free_mmu_pages < KVM_MIN_FREE_MMU_PAGES))
632 kvm_mmu_free_some_pages(vcpu);
633 return vcpu->mmu.page_fault(vcpu, gva, error_code); 631 return vcpu->mmu.page_fault(vcpu, gva, error_code);
634} 632}
635 633
634static inline void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu)
635{
636 if (unlikely(vcpu->kvm->n_free_mmu_pages < KVM_MIN_FREE_MMU_PAGES))
637 __kvm_mmu_free_some_pages(vcpu);
638}
639
636static inline int kvm_mmu_reload(struct kvm_vcpu *vcpu) 640static inline int kvm_mmu_reload(struct kvm_vcpu *vcpu)
637{ 641{
638 if (likely(vcpu->mmu.root_hpa != INVALID_PAGE)) 642 if (likely(vcpu->mmu.root_hpa != INVALID_PAGE))
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index 1a87ba9d51..23965aa5ee 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -273,12 +273,14 @@ static int mmu_topup_memory_caches(struct kvm_vcpu *vcpu)
273 int r; 273 int r;
274 274
275 r = __mmu_topup_memory_caches(vcpu, GFP_NOWAIT); 275 r = __mmu_topup_memory_caches(vcpu, GFP_NOWAIT);
276 kvm_mmu_free_some_pages(vcpu);
276 if (r < 0) { 277 if (r < 0) {
277 spin_unlock(&vcpu->kvm->lock); 278 spin_unlock(&vcpu->kvm->lock);
278 kvm_arch_ops->vcpu_put(vcpu); 279 kvm_arch_ops->vcpu_put(vcpu);
279 r = __mmu_topup_memory_caches(vcpu, GFP_KERNEL); 280 r = __mmu_topup_memory_caches(vcpu, GFP_KERNEL);
280 kvm_arch_ops->vcpu_load(vcpu); 281 kvm_arch_ops->vcpu_load(vcpu);
281 spin_lock(&vcpu->kvm->lock); 282 spin_lock(&vcpu->kvm->lock);
283 kvm_mmu_free_some_pages(vcpu);
282 } 284 }
283 return r; 285 return r;
284} 286}
@@ -1208,7 +1210,7 @@ int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva)
1208 return kvm_mmu_unprotect_page(vcpu, gpa >> PAGE_SHIFT); 1210 return kvm_mmu_unprotect_page(vcpu, gpa >> PAGE_SHIFT);
1209} 1211}
1210 1212
1211void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu) 1213void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu)
1212{ 1214{
1213 while (vcpu->kvm->n_free_mmu_pages < KVM_REFILL_PAGES) { 1215 while (vcpu->kvm->n_free_mmu_pages < KVM_REFILL_PAGES) {
1214 struct kvm_mmu_page *page; 1216 struct kvm_mmu_page *page;
@@ -1218,7 +1220,6 @@ void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu)
1218 kvm_mmu_zap_page(vcpu->kvm, page); 1220 kvm_mmu_zap_page(vcpu->kvm, page);
1219 } 1221 }
1220} 1222}
1221EXPORT_SYMBOL_GPL(kvm_mmu_free_some_pages);
1222 1223
1223static void free_mmu_pages(struct kvm_vcpu *vcpu) 1224static void free_mmu_pages(struct kvm_vcpu *vcpu)
1224{ 1225{
diff --git a/drivers/lguest/Kconfig b/drivers/lguest/Kconfig
index fd6925f416..41e2250613 100644
--- a/drivers/lguest/Kconfig
+++ b/drivers/lguest/Kconfig
@@ -1,6 +1,6 @@
1config LGUEST 1config LGUEST
2 tristate "Linux hypervisor example code" 2 tristate "Linux hypervisor example code"
3 depends on X86 && PARAVIRT && EXPERIMENTAL && !X86_PAE 3 depends on X86 && PARAVIRT && EXPERIMENTAL && !X86_PAE && FUTEX
4 select LGUEST_GUEST 4 select LGUEST_GUEST
5 select HVC_DRIVER 5 select HVC_DRIVER
6 ---help--- 6 ---help---
diff --git a/drivers/lguest/interrupts_and_traps.c b/drivers/lguest/interrupts_and_traps.c
index 49aa55577d..39731232d8 100644
--- a/drivers/lguest/interrupts_and_traps.c
+++ b/drivers/lguest/interrupts_and_traps.c
@@ -270,8 +270,11 @@ void pin_stack_pages(struct lguest *lg)
270 /* Depending on the CONFIG_4KSTACKS option, the Guest can have one or 270 /* Depending on the CONFIG_4KSTACKS option, the Guest can have one or
271 * two pages of stack space. */ 271 * two pages of stack space. */
272 for (i = 0; i < lg->stack_pages; i++) 272 for (i = 0; i < lg->stack_pages; i++)
273 /* The stack grows *upwards*, hence the subtraction */ 273 /* The stack grows *upwards*, so the address we're given is the
274 pin_page(lg, lg->esp1 - i * PAGE_SIZE); 274 * start of the page after the kernel stack. Subtract one to
275 * get back onto the first stack page, and keep subtracting to
276 * get to the rest of the stack pages. */
277 pin_page(lg, lg->esp1 - 1 - i * PAGE_SIZE);
275} 278}
276 279
277/* Direct traps also mean that we need to know whenever the Guest wants to use 280/* Direct traps also mean that we need to know whenever the Guest wants to use
diff --git a/drivers/lguest/lguest.c b/drivers/lguest/lguest.c
index 6e135ac083..ee1c6d05c3 100644
--- a/drivers/lguest/lguest.c
+++ b/drivers/lguest/lguest.c
@@ -964,11 +964,12 @@ __init void lguest_init(void *boot)
964{ 964{
965 /* Copy boot parameters first: the Launcher put the physical location 965 /* Copy boot parameters first: the Launcher put the physical location
966 * in %esi, and head.S converted that to a virtual address and handed 966 * in %esi, and head.S converted that to a virtual address and handed
967 * it to us. */ 967 * it to us. We use "__memcpy" because "memcpy" sometimes tries to do
968 memcpy(&boot_params, boot, PARAM_SIZE); 968 * tricky things to go faster, and we're not ready for that. */
969 __memcpy(&boot_params, boot, PARAM_SIZE);
969 /* The boot parameters also tell us where the command-line is: save 970 /* The boot parameters also tell us where the command-line is: save
970 * that, too. */ 971 * that, too. */
971 memcpy(boot_command_line, __va(boot_params.hdr.cmd_line_ptr), 972 __memcpy(boot_command_line, __va(boot_params.hdr.cmd_line_ptr),
972 COMMAND_LINE_SIZE); 973 COMMAND_LINE_SIZE);
973 974
974 /* We're under lguest, paravirt is enabled, and we're running at 975 /* We're under lguest, paravirt is enabled, and we're running at
diff --git a/drivers/lguest/lguest_asm.S b/drivers/lguest/lguest_asm.S
index f182c6a362..1ddcd5cd20 100644
--- a/drivers/lguest/lguest_asm.S
+++ b/drivers/lguest/lguest_asm.S
@@ -22,8 +22,9 @@
22 jmp lguest_init 22 jmp lguest_init
23 23
24/*G:055 We create a macro which puts the assembler code between lgstart_ and 24/*G:055 We create a macro which puts the assembler code between lgstart_ and
25 * lgend_ markers. These templates end up in the .init.text section, so they 25 * lgend_ markers. These templates are put in the .text section: they can't be
26 * are discarded after boot. */ 26 * discarded after boot as we may need to patch modules, too. */
27.text
27#define LGUEST_PATCH(name, insns...) \ 28#define LGUEST_PATCH(name, insns...) \
28 lgstart_##name: insns; lgend_##name:; \ 29 lgstart_##name: insns; lgend_##name:; \
29 .globl lgstart_##name; .globl lgend_##name 30 .globl lgstart_##name; .globl lgend_##name
@@ -34,7 +35,6 @@ LGUEST_PATCH(popf, movl %eax, lguest_data+LGUEST_DATA_irq_enabled)
34LGUEST_PATCH(pushf, movl lguest_data+LGUEST_DATA_irq_enabled, %eax) 35LGUEST_PATCH(pushf, movl lguest_data+LGUEST_DATA_irq_enabled, %eax)
35/*:*/ 36/*:*/
36 37
37.text
38/* These demark the EIP range where host should never deliver interrupts. */ 38/* These demark the EIP range where host should never deliver interrupts. */
39.global lguest_noirq_start 39.global lguest_noirq_start
40.global lguest_noirq_end 40.global lguest_noirq_end
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index bc77c5e2ca..5c742a5260 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -89,7 +89,7 @@ static int sleepy_trackpad;
89static int autopoll_devs; 89static int autopoll_devs;
90int __adb_probe_sync; 90int __adb_probe_sync;
91 91
92#ifdef CONFIG_PM 92#ifdef CONFIG_PM_SLEEP
93static void adb_notify_sleep(struct pmu_sleep_notifier *self, int when); 93static void adb_notify_sleep(struct pmu_sleep_notifier *self, int when);
94static struct pmu_sleep_notifier adb_sleep_notifier = { 94static struct pmu_sleep_notifier adb_sleep_notifier = {
95 adb_notify_sleep, 95 adb_notify_sleep,
@@ -313,7 +313,7 @@ int __init adb_init(void)
313 printk(KERN_WARNING "Warning: no ADB interface detected\n"); 313 printk(KERN_WARNING "Warning: no ADB interface detected\n");
314 adb_controller = NULL; 314 adb_controller = NULL;
315 } else { 315 } else {
316#ifdef CONFIG_PM 316#ifdef CONFIG_PM_SLEEP
317 pmu_register_sleep_notifier(&adb_sleep_notifier); 317 pmu_register_sleep_notifier(&adb_sleep_notifier);
318#endif /* CONFIG_PM */ 318#endif /* CONFIG_PM */
319#ifdef CONFIG_PPC 319#ifdef CONFIG_PPC
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 157080b3b4..04f3973e38 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -152,10 +152,10 @@ static spinlock_t pmu_lock;
152static u8 pmu_intr_mask; 152static u8 pmu_intr_mask;
153static int pmu_version; 153static int pmu_version;
154static int drop_interrupts; 154static int drop_interrupts;
155#if defined(CONFIG_PM) && defined(CONFIG_PPC32) 155#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
156static int option_lid_wakeup = 1; 156static int option_lid_wakeup = 1;
157#endif /* CONFIG_PM && CONFIG_PPC32 */ 157#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
158#if (defined(CONFIG_PM)&&defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT_LEGACY) 158#if (defined(CONFIG_PM_SLEEP)&&defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT_LEGACY)
159static int sleep_in_progress; 159static int sleep_in_progress;
160#endif 160#endif
161static unsigned long async_req_locks; 161static unsigned long async_req_locks;
@@ -875,7 +875,7 @@ proc_read_options(char *page, char **start, off_t off,
875{ 875{
876 char *p = page; 876 char *p = page;
877 877
878#if defined(CONFIG_PM) && defined(CONFIG_PPC32) 878#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
879 if (pmu_kind == PMU_KEYLARGO_BASED && 879 if (pmu_kind == PMU_KEYLARGO_BASED &&
880 pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0) 880 pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0)
881 p += sprintf(p, "lid_wakeup=%d\n", option_lid_wakeup); 881 p += sprintf(p, "lid_wakeup=%d\n", option_lid_wakeup);
@@ -916,7 +916,7 @@ proc_write_options(struct file *file, const char __user *buffer,
916 *(val++) = 0; 916 *(val++) = 0;
917 while(*val == ' ') 917 while(*val == ' ')
918 val++; 918 val++;
919#if defined(CONFIG_PM) && defined(CONFIG_PPC32) 919#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
920 if (pmu_kind == PMU_KEYLARGO_BASED && 920 if (pmu_kind == PMU_KEYLARGO_BASED &&
921 pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0) 921 pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0)
922 if (!strcmp(label, "lid_wakeup")) 922 if (!strcmp(label, "lid_wakeup"))
@@ -1738,7 +1738,7 @@ pmu_present(void)
1738 return via != 0; 1738 return via != 0;
1739} 1739}
1740 1740
1741#ifdef CONFIG_PM 1741#ifdef CONFIG_PM_SLEEP
1742 1742
1743static LIST_HEAD(sleep_notifiers); 1743static LIST_HEAD(sleep_notifiers);
1744 1744
@@ -1769,9 +1769,9 @@ pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* n)
1769 return 0; 1769 return 0;
1770} 1770}
1771EXPORT_SYMBOL(pmu_unregister_sleep_notifier); 1771EXPORT_SYMBOL(pmu_unregister_sleep_notifier);
1772#endif /* CONFIG_PM */ 1772#endif /* CONFIG_PM_SLEEP */
1773 1773
1774#if defined(CONFIG_PM) && defined(CONFIG_PPC32) 1774#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
1775 1775
1776/* Sleep is broadcast last-to-first */ 1776/* Sleep is broadcast last-to-first */
1777static void broadcast_sleep(int when) 1777static void broadcast_sleep(int when)
@@ -2390,7 +2390,7 @@ powerbook_sleep_3400(void)
2390 return 0; 2390 return 0;
2391} 2391}
2392 2392
2393#endif /* CONFIG_PM && CONFIG_PPC32 */ 2393#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
2394 2394
2395/* 2395/*
2396 * Support for /dev/pmu device 2396 * Support for /dev/pmu device
@@ -2573,7 +2573,7 @@ pmu_ioctl(struct inode * inode, struct file *filp,
2573 int error = -EINVAL; 2573 int error = -EINVAL;
2574 2574
2575 switch (cmd) { 2575 switch (cmd) {
2576#if defined(CONFIG_PM) && defined(CONFIG_PPC32) 2576#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
2577 case PMU_IOC_SLEEP: 2577 case PMU_IOC_SLEEP:
2578 if (!capable(CAP_SYS_ADMIN)) 2578 if (!capable(CAP_SYS_ADMIN))
2579 return -EACCES; 2579 return -EACCES;
@@ -2601,7 +2601,7 @@ pmu_ioctl(struct inode * inode, struct file *filp,
2601 return put_user(0, argp); 2601 return put_user(0, argp);
2602 else 2602 else
2603 return put_user(1, argp); 2603 return put_user(1, argp);
2604#endif /* CONFIG_PM && CONFIG_PPC32 */ 2604#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
2605 2605
2606#ifdef CONFIG_PMAC_BACKLIGHT_LEGACY 2606#ifdef CONFIG_PMAC_BACKLIGHT_LEGACY
2607 /* Compatibility ioctl's for backlight */ 2607 /* Compatibility ioctl's for backlight */
@@ -2757,7 +2757,7 @@ pmu_polled_request(struct adb_request *req)
2757 * to do suspend-to-disk. 2757 * to do suspend-to-disk.
2758 */ 2758 */
2759 2759
2760#if defined(CONFIG_PM) && defined(CONFIG_PPC32) 2760#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
2761 2761
2762int pmu_sys_suspended; 2762int pmu_sys_suspended;
2763 2763
@@ -2792,7 +2792,7 @@ static int pmu_sys_resume(struct sys_device *sysdev)
2792 return 0; 2792 return 0;
2793} 2793}
2794 2794
2795#endif /* CONFIG_PM && CONFIG_PPC32 */ 2795#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
2796 2796
2797static struct sysdev_class pmu_sysclass = { 2797static struct sysdev_class pmu_sysclass = {
2798 set_kset_name("pmu"), 2798 set_kset_name("pmu"),
@@ -2803,10 +2803,10 @@ static struct sys_device device_pmu = {
2803}; 2803};
2804 2804
2805static struct sysdev_driver driver_pmu = { 2805static struct sysdev_driver driver_pmu = {
2806#if defined(CONFIG_PM) && defined(CONFIG_PPC32) 2806#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
2807 .suspend = &pmu_sys_suspend, 2807 .suspend = &pmu_sys_suspend,
2808 .resume = &pmu_sys_resume, 2808 .resume = &pmu_sys_resume,
2809#endif /* CONFIG_PM && CONFIG_PPC32 */ 2809#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
2810}; 2810};
2811 2811
2812static int __init init_pmu_sysfs(void) 2812static int __init init_pmu_sysfs(void)
@@ -2841,10 +2841,10 @@ EXPORT_SYMBOL(pmu_wait_complete);
2841EXPORT_SYMBOL(pmu_suspend); 2841EXPORT_SYMBOL(pmu_suspend);
2842EXPORT_SYMBOL(pmu_resume); 2842EXPORT_SYMBOL(pmu_resume);
2843EXPORT_SYMBOL(pmu_unlock); 2843EXPORT_SYMBOL(pmu_unlock);
2844#if defined(CONFIG_PM) && defined(CONFIG_PPC32) 2844#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
2845EXPORT_SYMBOL(pmu_enable_irled); 2845EXPORT_SYMBOL(pmu_enable_irled);
2846EXPORT_SYMBOL(pmu_battery_count); 2846EXPORT_SYMBOL(pmu_battery_count);
2847EXPORT_SYMBOL(pmu_batteries); 2847EXPORT_SYMBOL(pmu_batteries);
2848EXPORT_SYMBOL(pmu_power_flags); 2848EXPORT_SYMBOL(pmu_power_flags);
2849#endif /* CONFIG_PM && CONFIG_PPC32 */ 2849#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
2850 2850
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig
index 531d4d17d0..34a8c60a25 100644
--- a/drivers/md/Kconfig
+++ b/drivers/md/Kconfig
@@ -263,7 +263,7 @@ config DM_MULTIPATH_EMC
263 263
264config DM_MULTIPATH_RDAC 264config DM_MULTIPATH_RDAC
265 tristate "LSI/Engenio RDAC multipath support (EXPERIMENTAL)" 265 tristate "LSI/Engenio RDAC multipath support (EXPERIMENTAL)"
266 depends on DM_MULTIPATH && BLK_DEV_DM && EXPERIMENTAL 266 depends on DM_MULTIPATH && BLK_DEV_DM && SCSI && EXPERIMENTAL
267 ---help--- 267 ---help---
268 Multipath support for LSI/Engenio RDAC. 268 Multipath support for LSI/Engenio RDAC.
269 269
diff --git a/drivers/md/dm-bio-list.h b/drivers/md/dm-bio-list.h
index 16ee3b018b..3f7b827649 100644
--- a/drivers/md/dm-bio-list.h
+++ b/drivers/md/dm-bio-list.h
@@ -9,6 +9,8 @@
9 9
10#include <linux/bio.h> 10#include <linux/bio.h>
11 11
12#ifdef CONFIG_BLOCK
13
12struct bio_list { 14struct bio_list {
13 struct bio *head; 15 struct bio *head;
14 struct bio *tail; 16 struct bio *tail;
@@ -106,4 +108,5 @@ static inline struct bio *bio_list_get(struct bio_list *bl)
106 return bio; 108 return bio;
107} 109}
108 110
111#endif /* CONFIG_BLOCK */
109#endif 112#endif
diff --git a/drivers/md/dm-mpath-rdac.c b/drivers/md/dm-mpath-rdac.c
index 8b776b8cb7..16b1613457 100644
--- a/drivers/md/dm-mpath-rdac.c
+++ b/drivers/md/dm-mpath-rdac.c
@@ -292,7 +292,7 @@ static struct request *get_rdac_req(struct rdac_handler *h,
292 rq->end_io_data = h; 292 rq->end_io_data = h;
293 rq->timeout = h->timeout; 293 rq->timeout = h->timeout;
294 rq->cmd_type = REQ_TYPE_BLOCK_PC; 294 rq->cmd_type = REQ_TYPE_BLOCK_PC;
295 rq->cmd_flags = REQ_FAILFAST | REQ_NOMERGE; 295 rq->cmd_flags |= REQ_FAILFAST | REQ_NOMERGE;
296 return rq; 296 return rq;
297} 297}
298 298
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 2aff4be35d..f96dea975f 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -514,7 +514,7 @@ static void ops_complete_biofill(void *stripe_head_ref)
514 struct stripe_head *sh = stripe_head_ref; 514 struct stripe_head *sh = stripe_head_ref;
515 struct bio *return_bi = NULL; 515 struct bio *return_bi = NULL;
516 raid5_conf_t *conf = sh->raid_conf; 516 raid5_conf_t *conf = sh->raid_conf;
517 int i, more_to_read = 0; 517 int i;
518 518
519 pr_debug("%s: stripe %llu\n", __FUNCTION__, 519 pr_debug("%s: stripe %llu\n", __FUNCTION__,
520 (unsigned long long)sh->sector); 520 (unsigned long long)sh->sector);
@@ -522,16 +522,14 @@ static void ops_complete_biofill(void *stripe_head_ref)
522 /* clear completed biofills */ 522 /* clear completed biofills */
523 for (i = sh->disks; i--; ) { 523 for (i = sh->disks; i--; ) {
524 struct r5dev *dev = &sh->dev[i]; 524 struct r5dev *dev = &sh->dev[i];
525 /* check if this stripe has new incoming reads */
526 if (dev->toread)
527 more_to_read++;
528 525
529 /* acknowledge completion of a biofill operation */ 526 /* acknowledge completion of a biofill operation */
530 /* and check if we need to reply to a read request 527 /* and check if we need to reply to a read request,
531 */ 528 * new R5_Wantfill requests are held off until
532 if (test_bit(R5_Wantfill, &dev->flags) && !dev->toread) { 529 * !test_bit(STRIPE_OP_BIOFILL, &sh->ops.pending)
530 */
531 if (test_and_clear_bit(R5_Wantfill, &dev->flags)) {
533 struct bio *rbi, *rbi2; 532 struct bio *rbi, *rbi2;
534 clear_bit(R5_Wantfill, &dev->flags);
535 533
536 /* The access to dev->read is outside of the 534 /* The access to dev->read is outside of the
537 * spin_lock_irq(&conf->device_lock), but is protected 535 * spin_lock_irq(&conf->device_lock), but is protected
@@ -558,8 +556,7 @@ static void ops_complete_biofill(void *stripe_head_ref)
558 556
559 return_io(return_bi); 557 return_io(return_bi);
560 558
561 if (more_to_read) 559 set_bit(STRIPE_HANDLE, &sh->state);
562 set_bit(STRIPE_HANDLE, &sh->state);
563 release_stripe(sh); 560 release_stripe(sh);
564} 561}
565 562
@@ -2541,7 +2538,7 @@ static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh,
2541 struct dma_async_tx_descriptor *tx = NULL; 2538 struct dma_async_tx_descriptor *tx = NULL;
2542 clear_bit(STRIPE_EXPAND_SOURCE, &sh->state); 2539 clear_bit(STRIPE_EXPAND_SOURCE, &sh->state);
2543 for (i = 0; i < sh->disks; i++) 2540 for (i = 0; i < sh->disks; i++)
2544 if (i != sh->pd_idx && (r6s && i != r6s->qd_idx)) { 2541 if (i != sh->pd_idx && (!r6s || i != r6s->qd_idx)) {
2545 int dd_idx, pd_idx, j; 2542 int dd_idx, pd_idx, j;
2546 struct stripe_head *sh2; 2543 struct stripe_head *sh2;
2547 2544
@@ -2574,7 +2571,8 @@ static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh,
2574 set_bit(R5_UPTODATE, &sh2->dev[dd_idx].flags); 2571 set_bit(R5_UPTODATE, &sh2->dev[dd_idx].flags);
2575 for (j = 0; j < conf->raid_disks; j++) 2572 for (j = 0; j < conf->raid_disks; j++)
2576 if (j != sh2->pd_idx && 2573 if (j != sh2->pd_idx &&
2577 (r6s && j != r6s->qd_idx) && 2574 (!r6s || j != raid6_next_disk(sh2->pd_idx,
2575 sh2->disks)) &&
2578 !test_bit(R5_Expanded, &sh2->dev[j].flags)) 2576 !test_bit(R5_Expanded, &sh2->dev[j].flags))
2579 break; 2577 break;
2580 if (j == conf->raid_disks) { 2578 if (j == conf->raid_disks) {
@@ -2583,12 +2581,12 @@ static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh,
2583 } 2581 }
2584 release_stripe(sh2); 2582 release_stripe(sh2);
2585 2583
2586 /* done submitting copies, wait for them to complete */
2587 if (i + 1 >= sh->disks) {
2588 async_tx_ack(tx);
2589 dma_wait_for_async_tx(tx);
2590 }
2591 } 2584 }
2585 /* done submitting copies, wait for them to complete */
2586 if (tx) {
2587 async_tx_ack(tx);
2588 dma_wait_for_async_tx(tx);
2589 }
2592} 2590}
2593 2591
2594/* 2592/*
@@ -2855,7 +2853,7 @@ static void handle_stripe5(struct stripe_head *sh)
2855 sh->disks = conf->raid_disks; 2853 sh->disks = conf->raid_disks;
2856 sh->pd_idx = stripe_to_pdidx(sh->sector, conf, 2854 sh->pd_idx = stripe_to_pdidx(sh->sector, conf,
2857 conf->raid_disks); 2855 conf->raid_disks);
2858 s.locked += handle_write_operations5(sh, 0, 1); 2856 s.locked += handle_write_operations5(sh, 1, 1);
2859 } else if (s.expanded && 2857 } else if (s.expanded &&
2860 !test_bit(STRIPE_OP_POSTXOR, &sh->ops.pending)) { 2858 !test_bit(STRIPE_OP_POSTXOR, &sh->ops.pending)) {
2861 clear_bit(STRIPE_EXPAND_READY, &sh->state); 2859 clear_bit(STRIPE_EXPAND_READY, &sh->state);
diff --git a/drivers/media/dvb/b2c2/flexcop-i2c.c b/drivers/media/dvb/b2c2/flexcop-i2c.c
index 02a0ea6e1c..6bf858a436 100644
--- a/drivers/media/dvb/b2c2/flexcop-i2c.c
+++ b/drivers/media/dvb/b2c2/flexcop-i2c.c
@@ -135,6 +135,13 @@ static int flexcop_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs
135 struct flexcop_device *fc = i2c_get_adapdata(i2c_adap); 135 struct flexcop_device *fc = i2c_get_adapdata(i2c_adap);
136 int i, ret = 0; 136 int i, ret = 0;
137 137
138 /* Some drivers use 1 byte or 0 byte reads as probes, which this
139 * driver doesn't support. These probes will always fail, so this
140 * hack makes them always succeed. If one knew how, it would of
141 * course be better to actually do the read. */
142 if (num == 1 && msgs[0].flags == I2C_M_RD && msgs[0].len <= 1)
143 return 1;
144
138 if (mutex_lock_interruptible(&fc->i2c_mutex)) 145 if (mutex_lock_interruptible(&fc->i2c_mutex))
139 return -ERESTARTSYS; 146 return -ERESTARTSYS;
140 147
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
index acf026342e..bdd797071c 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -800,7 +800,8 @@ static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len,
800} 800}
801 801
802 802
803static void dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len) 803static void dvb_net_sec(struct net_device *dev, const u8 *pkt, int
804pkt_len)
804{ 805{
805 u8 *eth; 806 u8 *eth;
806 struct sk_buff *skb; 807 struct sk_buff *skb;
@@ -902,7 +903,7 @@ static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len,
902 * we rely on the DVB API definition where exactly one complete 903 * we rely on the DVB API definition where exactly one complete
903 * section is delivered in buffer1 904 * section is delivered in buffer1
904 */ 905 */
905 dvb_net_sec (dev, (u8*) buffer1, buffer1_len); 906 dvb_net_sec (dev, buffer1, buffer1_len);
906 return 0; 907 return 0;
907} 908}
908 909
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c
index 317a2a3f9c..da7a6b591a 100644
--- a/drivers/media/video/cx88/cx88-mpeg.c
+++ b/drivers/media/video/cx88/cx88-mpeg.c
@@ -580,7 +580,7 @@ struct cx8802_dev * cx8802_get_device(struct inode *inode)
580 580
581 list_for_each(list,&cx8802_devlist) { 581 list_for_each(list,&cx8802_devlist) {
582 h = list_entry(list, struct cx8802_dev, devlist); 582 h = list_entry(list, struct cx8802_dev, devlist);
583 if (h->mpeg_dev->minor == minor) 583 if (h->mpeg_dev && h->mpeg_dev->minor == minor)
584 return h; 584 return h;
585 } 585 }
586 586
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 2c7b158ce7..40307f3f6f 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1772,6 +1772,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
1772 if (dev->alt_max_pkt_size == NULL) { 1772 if (dev->alt_max_pkt_size == NULL) {
1773 em28xx_errdev("out of memory!\n"); 1773 em28xx_errdev("out of memory!\n");
1774 em28xx_devused&=~(1<<nr); 1774 em28xx_devused&=~(1<<nr);
1775 kfree(dev);
1775 return -ENOMEM; 1776 return -ENOMEM;
1776 } 1777 }
1777 1778
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c
index 5dd519caf8..66ea3cbc36 100644
--- a/drivers/media/video/ivtv/ivtv-fileops.c
+++ b/drivers/media/video/ivtv/ivtv-fileops.c
@@ -190,7 +190,9 @@ static void ivtv_update_pgm_info(struct ivtv *itv)
190 int idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num; 190 int idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num;
191 struct v4l2_enc_idx_entry *e = itv->pgm_info + idx; 191 struct v4l2_enc_idx_entry *e = itv->pgm_info + idx;
192 u32 addr = itv->pgm_info_offset + 4 + idx * 24; 192 u32 addr = itv->pgm_info_offset + 4 + idx * 24;
193 const int mapping[] = { V4L2_ENC_IDX_FRAME_P, V4L2_ENC_IDX_FRAME_I, V4L2_ENC_IDX_FRAME_B, 0 }; 193 const int mapping[8] = { -1, V4L2_ENC_IDX_FRAME_I, V4L2_ENC_IDX_FRAME_P, -1,
194 V4L2_ENC_IDX_FRAME_B, -1, -1, -1 };
195 // 1=I, 2=P, 4=B
194 196
195 e->offset = read_enc(addr + 4) + ((u64)read_enc(addr + 8) << 32); 197 e->offset = read_enc(addr + 4) + ((u64)read_enc(addr + 8) << 32);
196 if (e->offset > itv->mpg_data_received) { 198 if (e->offset > itv->mpg_data_received) {
@@ -199,7 +201,7 @@ static void ivtv_update_pgm_info(struct ivtv *itv)
199 e->offset += itv->vbi_data_inserted; 201 e->offset += itv->vbi_data_inserted;
200 e->length = read_enc(addr); 202 e->length = read_enc(addr);
201 e->pts = read_enc(addr + 16) + ((u64)(read_enc(addr + 20) & 1) << 32); 203 e->pts = read_enc(addr + 16) + ((u64)(read_enc(addr + 20) & 1) << 32);
202 e->flags = mapping[read_enc(addr + 12) & 3]; 204 e->flags = mapping[read_enc(addr + 12) & 7];
203 i++; 205 i++;
204 } 206 }
205 itv->pgm_info_write_idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num; 207 itv->pgm_info_write_idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num;
@@ -752,9 +754,11 @@ static void ivtv_stop_decoding(struct ivtv_open_id *id, int flags, u64 pts)
752 ivtv_yuv_close(itv); 754 ivtv_yuv_close(itv);
753 } 755 }
754 if (s->type == IVTV_DEC_STREAM_TYPE_YUV && itv->output_mode == OUT_YUV) 756 if (s->type == IVTV_DEC_STREAM_TYPE_YUV && itv->output_mode == OUT_YUV)
755 itv->output_mode = OUT_NONE; 757 itv->output_mode = OUT_NONE;
758 else if (s->type == IVTV_DEC_STREAM_TYPE_YUV && itv->output_mode == OUT_UDMA_YUV)
759 itv->output_mode = OUT_NONE;
756 else if (s->type == IVTV_DEC_STREAM_TYPE_MPG && itv->output_mode == OUT_MPG) 760 else if (s->type == IVTV_DEC_STREAM_TYPE_MPG && itv->output_mode == OUT_MPG)
757 itv->output_mode = OUT_NONE; 761 itv->output_mode = OUT_NONE;
758 762
759 itv->speed = 0; 763 itv->speed = 0;
760 clear_bit(IVTV_F_I_DEC_PAUSED, &itv->i_flags); 764 clear_bit(IVTV_F_I_DEC_PAUSED, &itv->i_flags);
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c
index 5977a79619..dfe0aedc60 100644
--- a/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -1099,14 +1099,21 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
1099 1099
1100 case VIDIOC_G_ENC_INDEX: { 1100 case VIDIOC_G_ENC_INDEX: {
1101 struct v4l2_enc_idx *idx = arg; 1101 struct v4l2_enc_idx *idx = arg;
1102 struct v4l2_enc_idx_entry *e = idx->entry;
1103 int entries;
1102 int i; 1104 int i;
1103 1105
1104 idx->entries = (itv->pgm_info_write_idx + IVTV_MAX_PGM_INDEX - itv->pgm_info_read_idx) % 1106 entries = (itv->pgm_info_write_idx + IVTV_MAX_PGM_INDEX - itv->pgm_info_read_idx) %
1105 IVTV_MAX_PGM_INDEX; 1107 IVTV_MAX_PGM_INDEX;
1106 if (idx->entries > V4L2_ENC_IDX_ENTRIES) 1108 if (entries > V4L2_ENC_IDX_ENTRIES)
1107 idx->entries = V4L2_ENC_IDX_ENTRIES; 1109 entries = V4L2_ENC_IDX_ENTRIES;
1108 for (i = 0; i < idx->entries; i++) { 1110 idx->entries = 0;
1109 idx->entry[i] = itv->pgm_info[(itv->pgm_info_read_idx + i) % IVTV_MAX_PGM_INDEX]; 1111 for (i = 0; i < entries; i++) {
1112 *e = itv->pgm_info[(itv->pgm_info_read_idx + i) % IVTV_MAX_PGM_INDEX];
1113 if ((e->flags & V4L2_ENC_IDX_FRAME_MASK) <= V4L2_ENC_IDX_FRAME_B) {
1114 idx->entries++;
1115 e++;
1116 }
1110 } 1117 }
1111 itv->pgm_info_read_idx = (itv->pgm_info_read_idx + idx->entries) % IVTV_MAX_PGM_INDEX; 1118 itv->pgm_info_read_idx = (itv->pgm_info_read_idx + idx->entries) % IVTV_MAX_PGM_INDEX;
1112 break; 1119 break;
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 9c0e8d18c2..931b274bff 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -1196,12 +1196,19 @@ static int pwc_video_open(struct inode *inode, struct file *file)
1196 return 0; 1196 return 0;
1197} 1197}
1198 1198
1199
1200static void pwc_cleanup(struct pwc_device *pdev)
1201{
1202 pwc_remove_sysfs_files(pdev->vdev);
1203 video_unregister_device(pdev->vdev);
1204}
1205
1199/* Note that all cleanup is done in the reverse order as in _open */ 1206/* Note that all cleanup is done in the reverse order as in _open */
1200static int pwc_video_close(struct inode *inode, struct file *file) 1207static int pwc_video_close(struct inode *inode, struct file *file)
1201{ 1208{
1202 struct video_device *vdev = file->private_data; 1209 struct video_device *vdev = file->private_data;
1203 struct pwc_device *pdev; 1210 struct pwc_device *pdev;
1204 int i; 1211 int i, hint;
1205 1212
1206 PWC_DEBUG_OPEN(">> video_close called(vdev = 0x%p).\n", vdev); 1213 PWC_DEBUG_OPEN(">> video_close called(vdev = 0x%p).\n", vdev);
1207 1214
@@ -1224,8 +1231,9 @@ static int pwc_video_close(struct inode *inode, struct file *file)
1224 pwc_isoc_cleanup(pdev); 1231 pwc_isoc_cleanup(pdev);
1225 pwc_free_buffers(pdev); 1232 pwc_free_buffers(pdev);
1226 1233
1234 lock_kernel();
1227 /* Turn off LEDS and power down camera, but only when not unplugged */ 1235 /* Turn off LEDS and power down camera, but only when not unplugged */
1228 if (pdev->error_status != EPIPE) { 1236 if (!pdev->unplugged) {
1229 /* Turn LEDs off */ 1237 /* Turn LEDs off */
1230 if (pwc_set_leds(pdev, 0, 0) < 0) 1238 if (pwc_set_leds(pdev, 0, 0) < 0)
1231 PWC_DEBUG_MODULE("Failed to set LED on/off time.\n"); 1239 PWC_DEBUG_MODULE("Failed to set LED on/off time.\n");
@@ -1234,9 +1242,19 @@ static int pwc_video_close(struct inode *inode, struct file *file)
1234 if (i < 0) 1242 if (i < 0)
1235 PWC_ERROR("Failed to power down camera (%d)\n", i); 1243 PWC_ERROR("Failed to power down camera (%d)\n", i);
1236 } 1244 }
1245 pdev->vopen--;
1246 PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", pdev->vopen);
1247 } else {
1248 pwc_cleanup(pdev);
1249 /* Free memory (don't set pdev to 0 just yet) */
1250 kfree(pdev);
1251 /* search device_hint[] table if we occupy a slot, by any chance */
1252 for (hint = 0; hint < MAX_DEV_HINTS; hint++)
1253 if (device_hint[hint].pdev == pdev)
1254 device_hint[hint].pdev = NULL;
1237 } 1255 }
1238 pdev->vopen--; 1256 unlock_kernel();
1239 PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", pdev->vopen); 1257
1240 return 0; 1258 return 0;
1241} 1259}
1242 1260
@@ -1791,21 +1809,21 @@ static void usb_pwc_disconnect(struct usb_interface *intf)
1791 /* Alert waiting processes */ 1809 /* Alert waiting processes */
1792 wake_up_interruptible(&pdev->frameq); 1810 wake_up_interruptible(&pdev->frameq);
1793 /* Wait until device is closed */ 1811 /* Wait until device is closed */
1794 while (pdev->vopen) 1812 if(pdev->vopen) {
1795 schedule(); 1813 pdev->unplugged = 1;
1796 /* Device is now closed, so we can safely unregister it */ 1814 } else {
1797 PWC_DEBUG_PROBE("Unregistering video device in disconnect().\n"); 1815 /* Device is closed, so we can safely unregister it */
1798 pwc_remove_sysfs_files(pdev->vdev); 1816 PWC_DEBUG_PROBE("Unregistering video device in disconnect().\n");
1799 video_unregister_device(pdev->vdev); 1817 pwc_cleanup(pdev);
1800 1818 /* Free memory (don't set pdev to 0 just yet) */
1801 /* Free memory (don't set pdev to 0 just yet) */ 1819 kfree(pdev);
1802 kfree(pdev);
1803 1820
1804disconnect_out: 1821disconnect_out:
1805 /* search device_hint[] table if we occupy a slot, by any chance */ 1822 /* search device_hint[] table if we occupy a slot, by any chance */
1806 for (hint = 0; hint < MAX_DEV_HINTS; hint++) 1823 for (hint = 0; hint < MAX_DEV_HINTS; hint++)
1807 if (device_hint[hint].pdev == pdev) 1824 if (device_hint[hint].pdev == pdev)
1808 device_hint[hint].pdev = NULL; 1825 device_hint[hint].pdev = NULL;
1826 }
1809 1827
1810 unlock_kernel(); 1828 unlock_kernel();
1811} 1829}
diff --git a/drivers/media/video/pwc/pwc.h b/drivers/media/video/pwc/pwc.h
index 910a04f539..8e8e5b27e7 100644
--- a/drivers/media/video/pwc/pwc.h
+++ b/drivers/media/video/pwc/pwc.h
@@ -193,6 +193,7 @@ struct pwc_device
193 char vsnapshot; /* snapshot mode */ 193 char vsnapshot; /* snapshot mode */
194 char vsync; /* used by isoc handler */ 194 char vsync; /* used by isoc handler */
195 char vmirror; /* for ToUCaM series */ 195 char vmirror; /* for ToUCaM series */
196 char unplugged;
196 197
197 int cmd_len; 198 int cmd_len;
198 unsigned char cmd_buf[13]; 199 unsigned char cmd_buf[13];
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index 8ec83bd700..25ec168108 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -1537,18 +1537,18 @@ struct saa7134_board saa7134_boards[] = {
1537 },{ 1537 },{
1538 .name = name_comp1, 1538 .name = name_comp1,
1539 .vmux = 0, 1539 .vmux = 0,
1540 .amux = LINE2, 1540 .amux = LINE1,
1541 .gpio = 0x00, 1541 .gpio = 0x02,
1542 },{ 1542 },{
1543 .name = name_comp2, 1543 .name = name_comp2,
1544 .vmux = 3, 1544 .vmux = 3,
1545 .amux = LINE2, 1545 .amux = LINE1,
1546 .gpio = 0x00, 1546 .gpio = 0x02,
1547 },{ 1547 },{
1548 .name = name_svideo, 1548 .name = name_svideo,
1549 .vmux = 8, 1549 .vmux = 8,
1550 .amux = LINE2, 1550 .amux = LINE1,
1551 .gpio = 0x00, 1551 .gpio = 0x02,
1552 }}, 1552 }},
1553 .radio = { 1553 .radio = {
1554 .name = name_radio, 1554 .name = name_radio,
diff --git a/drivers/media/video/saa7191.c b/drivers/media/video/saa7191.c
index 8615a6081a..b4018cce32 100644
--- a/drivers/media/video/saa7191.c
+++ b/drivers/media/video/saa7191.c
@@ -130,7 +130,7 @@ static int saa7191_write_reg(struct i2c_client *client, u8 reg,
130 130
131/* the first byte of data must be the first subaddress number (register) */ 131/* the first byte of data must be the first subaddress number (register) */
132static int saa7191_write_block(struct i2c_client *client, 132static int saa7191_write_block(struct i2c_client *client,
133 u8 length, u8 *data) 133 u8 length, const u8 *data)
134{ 134{
135 int i; 135 int i;
136 int ret; 136 int ret;
@@ -592,7 +592,7 @@ static int saa7191_attach(struct i2c_adapter *adap, int addr, int kind)
592 if (err) 592 if (err)
593 goto out_free_decoder; 593 goto out_free_decoder;
594 594
595 err = saa7191_write_block(client, sizeof(initseq), (u8 *)initseq); 595 err = saa7191_write_block(client, sizeof(initseq), initseq);
596 if (err) { 596 if (err) {
597 printk(KERN_ERR "SAA7191 initialization failed\n"); 597 printk(KERN_ERR "SAA7191 initialization failed\n");
598 goto out_detach_client; 598 goto out_detach_client;
diff --git a/drivers/media/video/usbvision/usbvision-cards.c b/drivers/media/video/usbvision/usbvision-cards.c
index 380564cd33..f09eb10273 100644
--- a/drivers/media/video/usbvision/usbvision-cards.c
+++ b/drivers/media/video/usbvision/usbvision-cards.c
@@ -1081,6 +1081,7 @@ struct usb_device_id usbvision_table [] = {
1081 { USB_DEVICE(0x2304, 0x0301), .driver_info=PINNA_LINX_VD_IN_CAB_PAL }, 1081 { USB_DEVICE(0x2304, 0x0301), .driver_info=PINNA_LINX_VD_IN_CAB_PAL },
1082 { USB_DEVICE(0x2304, 0x0419), .driver_info=PINNA_PCTV_BUNGEE_PAL_FM }, 1082 { USB_DEVICE(0x2304, 0x0419), .driver_info=PINNA_PCTV_BUNGEE_PAL_FM },
1083 { USB_DEVICE(0x2400, 0x4200), .driver_info=HPG_WINTV }, 1083 { USB_DEVICE(0x2400, 0x4200), .driver_info=HPG_WINTV },
1084 { }, /* terminate list */
1084}; 1085};
1085 1086
1086MODULE_DEVICE_TABLE (usb, usbvision_table); 1087MODULE_DEVICE_TABLE (usb, usbvision_table);
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c
index e3371f9722..0cb006f294 100644
--- a/drivers/media/video/usbvision/usbvision-video.c
+++ b/drivers/media/video/usbvision/usbvision-video.c
@@ -1387,7 +1387,6 @@ static const struct file_operations usbvision_fops = {
1387 .ioctl = video_ioctl2, 1387 .ioctl = video_ioctl2,
1388 .llseek = no_llseek, 1388 .llseek = no_llseek,
1389/* .poll = video_poll, */ 1389/* .poll = video_poll, */
1390 .mmap = usbvision_v4l2_mmap,
1391 .compat_ioctl = v4l_compat_ioctl32, 1390 .compat_ioctl = v4l_compat_ioctl32,
1392}; 1391};
1393static struct video_device usbvision_video_template = { 1392static struct video_device usbvision_video_template = {
@@ -1413,7 +1412,7 @@ static struct video_device usbvision_video_template = {
1413 .vidioc_s_input = vidioc_s_input, 1412 .vidioc_s_input = vidioc_s_input,
1414 .vidioc_queryctrl = vidioc_queryctrl, 1413 .vidioc_queryctrl = vidioc_queryctrl,
1415 .vidioc_g_audio = vidioc_g_audio, 1414 .vidioc_g_audio = vidioc_g_audio,
1416 .vidioc_g_audio = vidioc_s_audio, 1415 .vidioc_s_audio = vidioc_s_audio,
1417 .vidioc_g_ctrl = vidioc_g_ctrl, 1416 .vidioc_g_ctrl = vidioc_g_ctrl,
1418 .vidioc_s_ctrl = vidioc_s_ctrl, 1417 .vidioc_s_ctrl = vidioc_s_ctrl,
1419 .vidioc_streamon = vidioc_streamon, 1418 .vidioc_streamon = vidioc_streamon,
@@ -1459,7 +1458,7 @@ static struct video_device usbvision_radio_template=
1459 .vidioc_s_input = vidioc_s_input, 1458 .vidioc_s_input = vidioc_s_input,
1460 .vidioc_queryctrl = vidioc_queryctrl, 1459 .vidioc_queryctrl = vidioc_queryctrl,
1461 .vidioc_g_audio = vidioc_g_audio, 1460 .vidioc_g_audio = vidioc_g_audio,
1462 .vidioc_g_audio = vidioc_s_audio, 1461 .vidioc_s_audio = vidioc_s_audio,
1463 .vidioc_g_ctrl = vidioc_g_ctrl, 1462 .vidioc_g_ctrl = vidioc_g_ctrl,
1464 .vidioc_s_ctrl = vidioc_s_ctrl, 1463 .vidioc_s_ctrl = vidioc_s_ctrl,
1465 .vidioc_g_tuner = vidioc_g_tuner, 1464 .vidioc_g_tuner = vidioc_g_tuner,
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index a26655881e..73e248fb2f 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -202,25 +202,5 @@ config THINKPAD_ACPI_BAY
202 202
203 If you are not sure, say Y here. 203 If you are not sure, say Y here.
204 204
205config THINKPAD_ACPI_INPUT_ENABLED
206 bool "Enable input layer support by default"
207 depends on THINKPAD_ACPI
208 default n
209 ---help---
210 This option enables thinkpad-acpi hot key handling over the input
211 layer at driver load time. When it is unset, the driver does not
212 enable hot key handling by default, and also starts up with a mostly
213 empty keymap.
214
215 This option should be enabled if you have a new enough HAL or other
216 userspace support that properly handles the thinkpad-acpi event
217 device. It auto-tunes the hot key support to those reported by the
218 firmware and enables it automatically.
219
220 If unsure, say N here to retain the old behaviour of ibm-acpi, and
221 thinkpad-acpi up to kernel 2.6.21: userspace will have to enable and
222 set up the thinkpad-acpi hot key handling using the sysfs interace
223 after loading the driver.
224
225 205
226endif # MISC_DEVICES 206endif # MISC_DEVICES
diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c
index d0fc4fd212..7dce318df1 100644
--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -732,7 +732,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data)
732 lcd_blank(FB_BLANK_POWERDOWN); 732 lcd_blank(FB_BLANK_POWERDOWN);
733 } 733 }
734 734
735 acpi_bus_generate_event(hotk->device, event, 735 acpi_bus_generate_proc_event(hotk->device, event,
736 hotk->event_count[event % 128]++); 736 hotk->event_count[event % 128]++);
737 737
738 return; 738 return;
@@ -1072,7 +1072,8 @@ static void asus_backlight_exit(void)
1072} 1072}
1073 1073
1074#define ASUS_LED_UNREGISTER(object) \ 1074#define ASUS_LED_UNREGISTER(object) \
1075 led_classdev_unregister(&object##_led) 1075 if (object##_led.dev) \
1076 led_classdev_unregister(&object##_led)
1076 1077
1077static void asus_led_exit(void) 1078static void asus_led_exit(void)
1078{ 1079{
diff --git a/drivers/misc/msi-laptop.c b/drivers/misc/msi-laptop.c
index 932a415197..349be934db 100644
--- a/drivers/misc/msi-laptop.c
+++ b/drivers/misc/msi-laptop.c
@@ -353,7 +353,7 @@ static int __init msi_init(void)
353 if (IS_ERR(msibl_device)) 353 if (IS_ERR(msibl_device))
354 return PTR_ERR(msibl_device); 354 return PTR_ERR(msibl_device);
355 355
356 msibl_device->props.max_brightness = MSI_LCD_LEVEL_MAX-1, 356 msibl_device->props.max_brightness = MSI_LCD_LEVEL_MAX-1;
357 357
358 ret = platform_driver_register(&msipf_driver); 358 ret = platform_driver_register(&msipf_driver);
359 if (ret) 359 if (ret)
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 91da6880ae..d38ddce592 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -856,6 +856,15 @@ static struct dmi_system_id sony_nc_ids[] = {
856 }, 856 },
857 }, 857 },
858 { 858 {
859 .ident = "Sony Vaio FZ Series",
860 .callback = sony_nc_C_enable,
861 .driver_data = sony_C_events,
862 .matches = {
863 DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
864 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ"),
865 },
866 },
867 {
859 .ident = "Sony Vaio C Series", 868 .ident = "Sony Vaio C Series",
860 .callback = sony_nc_C_enable, 869 .callback = sony_nc_C_enable,
861 .driver_data = sony_C_events, 870 .driver_data = sony_C_events,
@@ -904,7 +913,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
904 913
905 dprintk("sony_acpi_notify, event: 0x%.2x\n", ev); 914 dprintk("sony_acpi_notify, event: 0x%.2x\n", ev);
906 sony_laptop_report_input_event(ev); 915 sony_laptop_report_input_event(ev);
907 acpi_bus_generate_event(sony_nc_acpi_device, 1, ev); 916 acpi_bus_generate_proc_event(sony_nc_acpi_device, 1, ev);
908} 917}
909 918
910static acpi_status sony_walk_callback(acpi_handle handle, u32 level, 919static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
@@ -2292,7 +2301,7 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id)
2292 2301
2293found: 2302found:
2294 sony_laptop_report_input_event(device_event); 2303 sony_laptop_report_input_event(device_event);
2295 acpi_bus_generate_event(spic_dev.acpi_dev, 1, device_event); 2304 acpi_bus_generate_proc_event(spic_dev.acpi_dev, 1, device_event);
2296 sonypi_compat_report_event(device_event); 2305 sonypi_compat_report_event(device_event);
2297 2306
2298 return IRQ_HANDLED; 2307 return IRQ_HANDLED;
@@ -2308,8 +2317,6 @@ static int sony_pic_remove(struct acpi_device *device, int type)
2308 struct sony_pic_ioport *io, *tmp_io; 2317 struct sony_pic_ioport *io, *tmp_io;
2309 struct sony_pic_irq *irq, *tmp_irq; 2318 struct sony_pic_irq *irq, *tmp_irq;
2310 2319
2311 sonypi_compat_exit();
2312
2313 if (sony_pic_disable(device)) { 2320 if (sony_pic_disable(device)) {
2314 printk(KERN_ERR DRV_PFX "Couldn't disable device.\n"); 2321 printk(KERN_ERR DRV_PFX "Couldn't disable device.\n");
2315 return -ENXIO; 2322 return -ENXIO;
@@ -2319,6 +2326,8 @@ static int sony_pic_remove(struct acpi_device *device, int type)
2319 release_region(spic_dev.cur_ioport->io.minimum, 2326 release_region(spic_dev.cur_ioport->io.minimum,
2320 spic_dev.cur_ioport->io.address_length); 2327 spic_dev.cur_ioport->io.address_length);
2321 2328
2329 sonypi_compat_exit();
2330
2322 sony_laptop_remove_input(); 2331 sony_laptop_remove_input();
2323 2332
2324 /* pf attrs */ 2333 /* pf attrs */
@@ -2384,6 +2393,9 @@ static int sony_pic_add(struct acpi_device *device)
2384 goto err_free_resources; 2393 goto err_free_resources;
2385 } 2394 }
2386 2395
2396 if (sonypi_compat_init())
2397 goto err_remove_input;
2398
2387 /* request io port */ 2399 /* request io port */
2388 list_for_each_entry(io, &spic_dev.ioports, list) { 2400 list_for_each_entry(io, &spic_dev.ioports, list) {
2389 if (request_region(io->io.minimum, io->io.address_length, 2401 if (request_region(io->io.minimum, io->io.address_length,
@@ -2398,7 +2410,7 @@ static int sony_pic_add(struct acpi_device *device)
2398 if (!spic_dev.cur_ioport) { 2410 if (!spic_dev.cur_ioport) {
2399 printk(KERN_ERR DRV_PFX "Failed to request_region.\n"); 2411 printk(KERN_ERR DRV_PFX "Failed to request_region.\n");
2400 result = -ENODEV; 2412 result = -ENODEV;
2401 goto err_remove_input; 2413 goto err_remove_compat;
2402 } 2414 }
2403 2415
2404 /* request IRQ */ 2416 /* request IRQ */
@@ -2438,9 +2450,6 @@ static int sony_pic_add(struct acpi_device *device)
2438 if (result) 2450 if (result)
2439 goto err_remove_pf; 2451 goto err_remove_pf;
2440 2452
2441 if (sonypi_compat_init())
2442 goto err_remove_pf;
2443
2444 return 0; 2453 return 0;
2445 2454
2446err_remove_pf: 2455err_remove_pf:
@@ -2456,6 +2465,9 @@ err_release_region:
2456 release_region(spic_dev.cur_ioport->io.minimum, 2465 release_region(spic_dev.cur_ioport->io.minimum,
2457 spic_dev.cur_ioport->io.address_length); 2466 spic_dev.cur_ioport->io.address_length);
2458 2467
2468err_remove_compat:
2469 sonypi_compat_exit();
2470
2459err_remove_input: 2471err_remove_input:
2460 sony_laptop_remove_input(); 2472 sony_laptop_remove_input();
2461 2473
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index f6cd34a3db..0222bbaf7b 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -21,7 +21,7 @@
21 * 02110-1301, USA. 21 * 02110-1301, USA.
22 */ 22 */
23 23
24#define IBM_VERSION "0.15" 24#define IBM_VERSION "0.16"
25#define TPACPI_SYSFS_VERSION 0x010000 25#define TPACPI_SYSFS_VERSION 0x010000
26 26
27/* 27/*
@@ -906,9 +906,26 @@ static ssize_t hotkey_radio_sw_show(struct device *dev,
906static struct device_attribute dev_attr_hotkey_radio_sw = 906static struct device_attribute dev_attr_hotkey_radio_sw =
907 __ATTR(hotkey_radio_sw, S_IRUGO, hotkey_radio_sw_show, NULL); 907 __ATTR(hotkey_radio_sw, S_IRUGO, hotkey_radio_sw_show, NULL);
908 908
909/* sysfs hotkey report_mode -------------------------------------------- */
910static ssize_t hotkey_report_mode_show(struct device *dev,
911 struct device_attribute *attr,
912 char *buf)
913{
914 return snprintf(buf, PAGE_SIZE, "%d\n",
915 (hotkey_report_mode != 0) ? hotkey_report_mode : 1);
916}
917
918static struct device_attribute dev_attr_hotkey_report_mode =
919 __ATTR(hotkey_report_mode, S_IRUGO, hotkey_report_mode_show, NULL);
920
909/* --------------------------------------------------------------------- */ 921/* --------------------------------------------------------------------- */
910 922
911static struct attribute *hotkey_mask_attributes[] = { 923static struct attribute *hotkey_attributes[] __initdata = {
924 &dev_attr_hotkey_enable.attr,
925 &dev_attr_hotkey_report_mode.attr,
926};
927
928static struct attribute *hotkey_mask_attributes[] __initdata = {
912 &dev_attr_hotkey_mask.attr, 929 &dev_attr_hotkey_mask.attr,
913 &dev_attr_hotkey_bios_enabled.attr, 930 &dev_attr_hotkey_bios_enabled.attr,
914 &dev_attr_hotkey_bios_mask.attr, 931 &dev_attr_hotkey_bios_mask.attr,
@@ -987,11 +1004,12 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
987 str_supported(tp_features.hotkey)); 1004 str_supported(tp_features.hotkey));
988 1005
989 if (tp_features.hotkey) { 1006 if (tp_features.hotkey) {
990 hotkey_dev_attributes = create_attr_set(7, NULL); 1007 hotkey_dev_attributes = create_attr_set(8, NULL);
991 if (!hotkey_dev_attributes) 1008 if (!hotkey_dev_attributes)
992 return -ENOMEM; 1009 return -ENOMEM;
993 res = add_to_attr_set(hotkey_dev_attributes, 1010 res = add_many_to_attr_set(hotkey_dev_attributes,
994 &dev_attr_hotkey_enable.attr); 1011 hotkey_attributes,
1012 ARRAY_SIZE(hotkey_attributes));
995 if (res) 1013 if (res)
996 return res; 1014 return res;
997 1015
@@ -1055,11 +1073,6 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
1055 TPACPI_HOTKEY_MAP_SIZE); 1073 TPACPI_HOTKEY_MAP_SIZE);
1056 } 1074 }
1057 1075
1058#ifndef CONFIG_THINKPAD_ACPI_INPUT_ENABLED
1059 for (i = 0; i < 12; i++)
1060 hotkey_keycode_map[i] = KEY_UNKNOWN;
1061#endif /* ! CONFIG_THINKPAD_ACPI_INPUT_ENABLED */
1062
1063 set_bit(EV_KEY, tpacpi_inputdev->evbit); 1076 set_bit(EV_KEY, tpacpi_inputdev->evbit);
1064 set_bit(EV_MSC, tpacpi_inputdev->evbit); 1077 set_bit(EV_MSC, tpacpi_inputdev->evbit);
1065 set_bit(MSC_SCAN, tpacpi_inputdev->mscbit); 1078 set_bit(MSC_SCAN, tpacpi_inputdev->mscbit);
@@ -1081,14 +1094,17 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
1081 set_bit(SW_RADIO, tpacpi_inputdev->swbit); 1094 set_bit(SW_RADIO, tpacpi_inputdev->swbit);
1082 } 1095 }
1083 1096
1084#ifdef CONFIG_THINKPAD_ACPI_INPUT_ENABLED
1085 dbg_printk(TPACPI_DBG_INIT, 1097 dbg_printk(TPACPI_DBG_INIT,
1086 "enabling hot key handling\n"); 1098 "enabling hot key handling\n");
1087 res = hotkey_set(1, (hotkey_all_mask & ~hotkey_reserved_mask) 1099 res = hotkey_set(1, (hotkey_all_mask & ~hotkey_reserved_mask)
1088 | hotkey_orig_mask); 1100 | hotkey_orig_mask);
1089 if (res) 1101 if (res)
1090 return res; 1102 return res;
1091#endif /* CONFIG_THINKPAD_ACPI_INPUT_ENABLED */ 1103
1104 dbg_printk(TPACPI_DBG_INIT,
1105 "legacy hot key reporting over procfs %s\n",
1106 (hotkey_report_mode < 2) ?
1107 "enabled" : "disabled");
1092 } 1108 }
1093 1109
1094 return (tp_features.hotkey)? 0 : 1; 1110 return (tp_features.hotkey)? 0 : 1;
@@ -1142,58 +1158,65 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
1142{ 1158{
1143 u32 hkey; 1159 u32 hkey;
1144 unsigned int keycode, scancode; 1160 unsigned int keycode, scancode;
1145 int sendacpi = 1; 1161 int send_acpi_ev = 0;
1146 1162
1147 if (event == 0x80 && acpi_evalf(hkey_handle, &hkey, "MHKP", "d")) { 1163 if (event == 0x80 && acpi_evalf(hkey_handle, &hkey, "MHKP", "d")) {
1148 if (tpacpi_inputdev->users > 0) { 1164 switch (hkey >> 12) {
1149 switch (hkey >> 12) { 1165 case 1:
1150 case 1: 1166 /* 0x1000-0x1FFF: key presses */
1151 /* 0x1000-0x1FFF: key presses */ 1167 scancode = hkey & 0xfff;
1152 scancode = hkey & 0xfff; 1168 if (scancode > 0 && scancode < 0x21) {
1153 if (scancode > 0 && scancode < 0x21) { 1169 scancode--;
1154 scancode--; 1170 keycode = hotkey_keycode_map[scancode];
1155 keycode = hotkey_keycode_map[scancode]; 1171 tpacpi_input_send_key(scancode, keycode);
1156 tpacpi_input_send_key(scancode, keycode); 1172 } else {
1157 sendacpi = (keycode == KEY_RESERVED 1173 printk(IBM_ERR
1158 || keycode == KEY_UNKNOWN); 1174 "hotkey 0x%04x out of range for keyboard map\n",
1159 } else { 1175 hkey);
1160 printk(IBM_ERR 1176 send_acpi_ev = 1;
1161 "hotkey 0x%04x out of range for keyboard map\n", 1177 }
1162 hkey); 1178 break;
1163 } 1179 case 5:
1164 break; 1180 /* 0x5000-0x5FFF: LID */
1165 case 5: 1181 /* we don't handle it through this path, just
1166 /* 0x5000-0x5FFF: LID */ 1182 * eat up known LID events */
1167 /* we don't handle it through this path, just 1183 if (hkey != 0x5001 && hkey != 0x5002) {
1168 * eat up known LID events */ 1184 printk(IBM_ERR
1169 if (hkey != 0x5001 && hkey != 0x5002) { 1185 "unknown LID-related hotkey event: 0x%04x\n",
1170 printk(IBM_ERR 1186 hkey);
1171 "unknown LID-related hotkey event: 0x%04x\n", 1187 send_acpi_ev = 1;
1172 hkey); 1188 }
1173 } 1189 break;
1190 case 7:
1191 /* 0x7000-0x7FFF: misc */
1192 if (tp_features.hotkey_wlsw && hkey == 0x7000) {
1193 tpacpi_input_send_radiosw();
1174 break; 1194 break;
1175 case 7:
1176 /* 0x7000-0x7FFF: misc */
1177 if (tp_features.hotkey_wlsw && hkey == 0x7000) {
1178 tpacpi_input_send_radiosw();
1179 sendacpi = 0;
1180 break;
1181 }
1182 /* fallthrough to default */
1183 default:
1184 /* case 2: dock-related */
1185 /* 0x2305 - T43 waking up due to bay lever eject while aslept */
1186 /* case 3: ultra-bay related. maybe bay in dock? */
1187 /* 0x3003 - T43 after wake up by bay lever eject (0x2305) */
1188 printk(IBM_NOTICE "unhandled hotkey event 0x%04x\n", hkey);
1189 } 1195 }
1196 /* fallthrough to default */
1197 default:
1198 /* case 2: dock-related */
1199 /* 0x2305 - T43 waking up due to bay lever eject while aslept */
1200 /* case 3: ultra-bay related. maybe bay in dock? */
1201 /* 0x3003 - T43 after wake up by bay lever eject (0x2305) */
1202 printk(IBM_NOTICE "unhandled HKEY event 0x%04x\n", hkey);
1203 send_acpi_ev = 1;
1190 } 1204 }
1191
1192 if (sendacpi)
1193 acpi_bus_generate_event(ibm->acpi->device, event, hkey);
1194 } else { 1205 } else {
1195 printk(IBM_ERR "unknown hotkey notification event %d\n", event); 1206 printk(IBM_ERR "unknown hotkey notification event %d\n", event);
1196 acpi_bus_generate_event(ibm->acpi->device, event, 0); 1207 hkey = 0;
1208 send_acpi_ev = 1;
1209 }
1210
1211 /* Legacy events */
1212 if (send_acpi_ev || hotkey_report_mode < 2)
1213 acpi_bus_generate_proc_event(ibm->acpi->device, event, hkey);
1214
1215 /* netlink events */
1216 if (send_acpi_ev) {
1217 acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class,
1218 ibm->acpi->device->dev.bus_id,
1219 event, hkey);
1197 } 1220 }
1198} 1221}
1199 1222
@@ -2162,22 +2185,27 @@ static void dock_notify(struct ibm_struct *ibm, u32 event)
2162 int docked = dock_docked(); 2185 int docked = dock_docked();
2163 int pci = ibm->acpi->hid && ibm->acpi->device && 2186 int pci = ibm->acpi->hid && ibm->acpi->device &&
2164 acpi_match_device_ids(ibm->acpi->device, ibm_pci_device_ids); 2187 acpi_match_device_ids(ibm->acpi->device, ibm_pci_device_ids);
2188 int data;
2165 2189
2166 if (event == 1 && !pci) /* 570 */ 2190 if (event == 1 && !pci) /* 570 */
2167 acpi_bus_generate_event(ibm->acpi->device, event, 1); /* button */ 2191 data = 1; /* button */
2168 else if (event == 1 && pci) /* 570 */ 2192 else if (event == 1 && pci) /* 570 */
2169 acpi_bus_generate_event(ibm->acpi->device, event, 3); /* dock */ 2193 data = 3; /* dock */
2170 else if (event == 3 && docked) 2194 else if (event == 3 && docked)
2171 acpi_bus_generate_event(ibm->acpi->device, event, 1); /* button */ 2195 data = 1; /* button */
2172 else if (event == 3 && !docked) 2196 else if (event == 3 && !docked)
2173 acpi_bus_generate_event(ibm->acpi->device, event, 2); /* undock */ 2197 data = 2; /* undock */
2174 else if (event == 0 && docked) 2198 else if (event == 0 && docked)
2175 acpi_bus_generate_event(ibm->acpi->device, event, 3); /* dock */ 2199 data = 3; /* dock */
2176 else { 2200 else {
2177 printk(IBM_ERR "unknown dock event %d, status %d\n", 2201 printk(IBM_ERR "unknown dock event %d, status %d\n",
2178 event, _sta(dock_handle)); 2202 event, _sta(dock_handle));
2179 acpi_bus_generate_event(ibm->acpi->device, event, 0); /* unknown */ 2203 data = 0; /* unknown */
2180 } 2204 }
2205 acpi_bus_generate_proc_event(ibm->acpi->device, event, data);
2206 acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class,
2207 ibm->acpi->device->dev.bus_id,
2208 event, data);
2181} 2209}
2182 2210
2183static int dock_read(char *p) 2211static int dock_read(char *p)
@@ -2275,7 +2303,10 @@ static int __init bay_init(struct ibm_init_struct *iibm)
2275 2303
2276static void bay_notify(struct ibm_struct *ibm, u32 event) 2304static void bay_notify(struct ibm_struct *ibm, u32 event)
2277{ 2305{
2278 acpi_bus_generate_event(ibm->acpi->device, event, 0); 2306 acpi_bus_generate_proc_event(ibm->acpi->device, event, 0);
2307 acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class,
2308 ibm->acpi->device->dev.bus_id,
2309 event, 0);
2279} 2310}
2280 2311
2281#define bay_occupied(b) (_sta(b##_handle) & 1) 2312#define bay_occupied(b) (_sta(b##_handle) & 1)
@@ -4615,6 +4646,9 @@ module_param_named(fan_control, fan_control_allowed, bool, 0);
4615static int brightness_mode; 4646static int brightness_mode;
4616module_param_named(brightness_mode, brightness_mode, int, 0); 4647module_param_named(brightness_mode, brightness_mode, int, 0);
4617 4648
4649static unsigned int hotkey_report_mode;
4650module_param(hotkey_report_mode, uint, 0);
4651
4618#define IBM_PARAM(feature) \ 4652#define IBM_PARAM(feature) \
4619 module_param_call(feature, set_ibm_param, NULL, NULL, 0) 4653 module_param_call(feature, set_ibm_param, NULL, NULL, 0)
4620 4654
@@ -4640,6 +4674,10 @@ static int __init thinkpad_acpi_module_init(void)
4640{ 4674{
4641 int ret, i; 4675 int ret, i;
4642 4676
4677 /* Parameter checking */
4678 if (hotkey_report_mode > 2)
4679 return -EINVAL;
4680
4643 /* Driver-level probe */ 4681 /* Driver-level probe */
4644 4682
4645 get_thinkpad_model_data(&thinkpad_id); 4683 get_thinkpad_model_data(&thinkpad_id);
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index eee8809a50..082a1cbc16 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -181,6 +181,7 @@ static void tpacpi_remove_driver_attributes(struct device_driver *drv);
181static int experimental; 181static int experimental;
182static u32 dbg_level; 182static u32 dbg_level;
183static int force_load; 183static int force_load;
184static unsigned int hotkey_report_mode;
184 185
185static int thinkpad_acpi_module_init(void); 186static int thinkpad_acpi_module_init(void);
186static void thinkpad_acpi_module_exit(void); 187static void thinkpad_acpi_module_exit(void);
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index fe0e785ed7..817a79462b 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -186,12 +186,10 @@ struct mmc_card *mmc_alloc_card(struct mmc_host *host)
186{ 186{
187 struct mmc_card *card; 187 struct mmc_card *card;
188 188
189 card = kmalloc(sizeof(struct mmc_card), GFP_KERNEL); 189 card = kzalloc(sizeof(struct mmc_card), GFP_KERNEL);
190 if (!card) 190 if (!card)
191 return ERR_PTR(-ENOMEM); 191 return ERR_PTR(-ENOMEM);
192 192
193 memset(card, 0, sizeof(struct mmc_card));
194
195 card->host = host; 193 card->host = host;
196 194
197 device_initialize(&card->dev); 195 device_initialize(&card->dev);
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 6a7e298496..2c7ce8f43a 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -58,12 +58,10 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
58{ 58{
59 struct mmc_host *host; 59 struct mmc_host *host;
60 60
61 host = kmalloc(sizeof(struct mmc_host) + extra, GFP_KERNEL); 61 host = kzalloc(sizeof(struct mmc_host) + extra, GFP_KERNEL);
62 if (!host) 62 if (!host)
63 return NULL; 63 return NULL;
64 64
65 memset(host, 0, sizeof(struct mmc_host) + extra);
66
67 host->parent = dev; 65 host->parent = dev;
68 host->class_dev.parent = dev; 66 host->class_dev.parent = dev;
69 host->class_dev.class = &mmc_host_class; 67 host->class_dev.class = &mmc_host_class;
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index bfebd2fa7a..955ea60583 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -941,7 +941,7 @@ static int __exit at91_mci_remove(struct platform_device *pdev)
941 941
942 host = mmc_priv(mmc); 942 host = mmc_priv(mmc);
943 943
944 if (host->present != -1) { 944 if (host->board->det_pin) {
945 device_init_wakeup(&pdev->dev, 0); 945 device_init_wakeup(&pdev->dev, 0);
946 free_irq(host->board->det_pin, host); 946 free_irq(host->board->det_pin, host);
947 cancel_delayed_work(&host->mmc->detect); 947 cancel_delayed_work(&host->mmc->detect);
@@ -972,7 +972,7 @@ static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state)
972 struct at91mci_host *host = mmc_priv(mmc); 972 struct at91mci_host *host = mmc_priv(mmc);
973 int ret = 0; 973 int ret = 0;
974 974
975 if (device_may_wakeup(&pdev->dev)) 975 if (host->board->det_pin && device_may_wakeup(&pdev->dev))
976 enable_irq_wake(host->board->det_pin); 976 enable_irq_wake(host->board->det_pin);
977 977
978 if (mmc) 978 if (mmc)
@@ -987,7 +987,7 @@ static int at91_mci_resume(struct platform_device *pdev)
987 struct at91mci_host *host = mmc_priv(mmc); 987 struct at91mci_host *host = mmc_priv(mmc);
988 int ret = 0; 988 int ret = 0;
989 989
990 if (device_may_wakeup(&pdev->dev)) 990 if (host->board->det_pin && device_may_wakeup(&pdev->dev))
991 disable_irq_wake(host->board->det_pin); 991 disable_irq_wake(host->board->det_pin);
992 992
993 if (mmc) 993 if (mmc)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index f2bc87ac24..20a7d89e01 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -385,6 +385,9 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
385 BUG_ON(data->blksz > host->mmc->max_blk_size); 385 BUG_ON(data->blksz > host->mmc->max_blk_size);
386 BUG_ON(data->blocks > 65535); 386 BUG_ON(data->blocks > 65535);
387 387
388 host->data = data;
389 host->data_early = 0;
390
388 /* timeout in us */ 391 /* timeout in us */
389 target_timeout = data->timeout_ns / 1000 + 392 target_timeout = data->timeout_ns / 1000 +
390 data->timeout_clks / host->clock; 393 data->timeout_clks / host->clock;
@@ -443,11 +446,11 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host,
443{ 446{
444 u16 mode; 447 u16 mode;
445 448
446 WARN_ON(host->data);
447
448 if (data == NULL) 449 if (data == NULL)
449 return; 450 return;
450 451
452 WARN_ON(!host->data);
453
451 mode = SDHCI_TRNS_BLK_CNT_EN; 454 mode = SDHCI_TRNS_BLK_CNT_EN;
452 if (data->blocks > 1) 455 if (data->blocks > 1)
453 mode |= SDHCI_TRNS_MULTI; 456 mode |= SDHCI_TRNS_MULTI;
@@ -477,8 +480,8 @@ static void sdhci_finish_data(struct sdhci_host *host)
477 /* 480 /*
478 * Controller doesn't count down when in single block mode. 481 * Controller doesn't count down when in single block mode.
479 */ 482 */
480 if ((data->blocks == 1) && (data->error == MMC_ERR_NONE)) 483 if (data->blocks == 1)
481 blocks = 0; 484 blocks = (data->error == MMC_ERR_NONE) ? 0 : 1;
482 else 485 else
483 blocks = readw(host->ioaddr + SDHCI_BLOCK_COUNT); 486 blocks = readw(host->ioaddr + SDHCI_BLOCK_COUNT);
484 data->bytes_xfered = data->blksz * (data->blocks - blocks); 487 data->bytes_xfered = data->blksz * (data->blocks - blocks);
@@ -600,9 +603,10 @@ static void sdhci_finish_command(struct sdhci_host *host)
600 603
601 host->cmd->error = MMC_ERR_NONE; 604 host->cmd->error = MMC_ERR_NONE;
602 605
603 if (host->cmd->data) 606 if (host->data && host->data_early)
604 host->data = host->cmd->data; 607 sdhci_finish_data(host);
605 else 608
609 if (!host->cmd->data)
606 tasklet_schedule(&host->finish_tasklet); 610 tasklet_schedule(&host->finish_tasklet);
607 611
608 host->cmd = NULL; 612 host->cmd = NULL;
@@ -929,9 +933,9 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
929 BUG_ON(intmask == 0); 933 BUG_ON(intmask == 0);
930 934
931 if (!host->cmd) { 935 if (!host->cmd) {
932 printk(KERN_ERR "%s: Got command interrupt even though no " 936 printk(KERN_ERR "%s: Got command interrupt 0x%08x even "
933 "command operation was in progress.\n", 937 "though no command operation was in progress.\n",
934 mmc_hostname(host->mmc)); 938 mmc_hostname(host->mmc), (unsigned)intmask);
935 sdhci_dumpregs(host); 939 sdhci_dumpregs(host);
936 return; 940 return;
937 } 941 }
@@ -961,9 +965,9 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
961 if (intmask & SDHCI_INT_DATA_END) 965 if (intmask & SDHCI_INT_DATA_END)
962 return; 966 return;
963 967
964 printk(KERN_ERR "%s: Got data interrupt even though no " 968 printk(KERN_ERR "%s: Got data interrupt 0x%08x even "
965 "data operation was in progress.\n", 969 "though no data operation was in progress.\n",
966 mmc_hostname(host->mmc)); 970 mmc_hostname(host->mmc), (unsigned)intmask);
967 sdhci_dumpregs(host); 971 sdhci_dumpregs(host);
968 972
969 return; 973 return;
@@ -991,8 +995,18 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
991 writel(readl(host->ioaddr + SDHCI_DMA_ADDRESS), 995 writel(readl(host->ioaddr + SDHCI_DMA_ADDRESS),
992 host->ioaddr + SDHCI_DMA_ADDRESS); 996 host->ioaddr + SDHCI_DMA_ADDRESS);
993 997
994 if (intmask & SDHCI_INT_DATA_END) 998 if (intmask & SDHCI_INT_DATA_END) {
995 sdhci_finish_data(host); 999 if (host->cmd) {
1000 /*
1001 * Data managed to finish before the
1002 * command completed. Make sure we do
1003 * things in the proper order.
1004 */
1005 host->data_early = 1;
1006 } else {
1007 sdhci_finish_data(host);
1008 }
1009 }
996 } 1010 }
997} 1011}
998 1012
@@ -1347,12 +1361,11 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
1347 */ 1361 */
1348 mmc->max_blk_size = (caps & SDHCI_MAX_BLOCK_MASK) >> SDHCI_MAX_BLOCK_SHIFT; 1362 mmc->max_blk_size = (caps & SDHCI_MAX_BLOCK_MASK) >> SDHCI_MAX_BLOCK_SHIFT;
1349 if (mmc->max_blk_size >= 3) { 1363 if (mmc->max_blk_size >= 3) {
1350 printk(KERN_ERR "%s: Invalid maximum block size.\n", 1364 printk(KERN_WARNING "%s: Invalid maximum block size, assuming 512\n",
1351 host->slot_descr); 1365 host->slot_descr);
1352 ret = -ENODEV; 1366 mmc->max_blk_size = 512;
1353 goto unmap; 1367 } else
1354 } 1368 mmc->max_blk_size = 512 << mmc->max_blk_size;
1355 mmc->max_blk_size = 512 << mmc->max_blk_size;
1356 1369
1357 /* 1370 /*
1358 * Maximum block count. 1371 * Maximum block count.
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index d157776c11..e28987d6d2 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -182,6 +182,7 @@ struct sdhci_host {
182 struct mmc_request *mrq; /* Current request */ 182 struct mmc_request *mrq; /* Current request */
183 struct mmc_command *cmd; /* Current command */ 183 struct mmc_command *cmd; /* Current command */
184 struct mmc_data *data; /* Current data request */ 184 struct mmc_data *data; /* Current data request */
185 int data_early:1; /* Data finished before cmd */
185 186
186 struct scatterlist *cur_sg; /* We're working on this */ 187 struct scatterlist *cur_sg; /* We're working on this */
187 int num_sg; /* Entries left */ 188 int num_sg; /* Entries left */
diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c
index aca3319712..9b430f20b6 100644
--- a/drivers/mtd/mtdsuper.c
+++ b/drivers/mtd/mtdsuper.c
@@ -70,6 +70,8 @@ static int get_sb_mtd_aux(struct file_system_type *fs_type, int flags,
70 DEBUG(1, "MTDSB: New superblock for device %d (\"%s\")\n", 70 DEBUG(1, "MTDSB: New superblock for device %d (\"%s\")\n",
71 mtd->index, mtd->name); 71 mtd->index, mtd->name);
72 72
73 sb->s_flags = flags;
74
73 ret = fill_super(sb, data, flags & MS_SILENT ? 1 : 0); 75 ret = fill_super(sb, data, flags & MS_SILENT ? 1 : 0);
74 if (ret < 0) { 76 if (ret < 0) {
75 up_write(&sb->s_umount); 77 up_write(&sb->s_umount);
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 5b9e17bf17..c5519250ef 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2177,7 +2177,7 @@ config SKGE
2177 with better performance and more complete ethtool support. 2177 with better performance and more complete ethtool support.
2178 2178
2179 It does not support the link failover and network management 2179 It does not support the link failover and network management
2180 features available in the hardware. 2180 features that "portable" vendor supplied sk98lin driver does.
2181 2181
2182 This driver supports adapters based on the original Yukon chipset: 2182 This driver supports adapters based on the original Yukon chipset:
2183 Marvell 88E8001, Belkin F5D5005, CNet GigaCard, DLink DGE-530T, 2183 Marvell 88E8001, Belkin F5D5005, CNet GigaCard, DLink DGE-530T,
@@ -2215,6 +2215,93 @@ config SKY2_DEBUG
2215 2215
2216 If unsure, say N. 2216 If unsure, say N.
2217 2217
2218config SK98LIN
2219 tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support (DEPRECATED)"
2220 depends on PCI
2221 ---help---
2222 Say Y here if you have a Marvell Yukon or SysKonnect SK-98xx/SK-95xx
2223 compliant Gigabit Ethernet Adapter.
2224
2225 This driver supports the original Yukon chipset. This driver is
2226 deprecated and will be removed from the kernel in the near future,
2227 it has been replaced by the skge driver. skge is cleaner and
2228 seems to work better.
2229
2230 This driver does not support the newer Yukon2 chipset. A separate
2231 driver, sky2, is provided to support Yukon2-based adapters.
2232
2233 The following adapters are supported by this driver:
2234 - 3Com 3C940 Gigabit LOM Ethernet Adapter
2235 - 3Com 3C941 Gigabit LOM Ethernet Adapter
2236 - Allied Telesyn AT-2970LX Gigabit Ethernet Adapter
2237 - Allied Telesyn AT-2970LX/2SC Gigabit Ethernet Adapter
2238 - Allied Telesyn AT-2970SX Gigabit Ethernet Adapter
2239 - Allied Telesyn AT-2970SX/2SC Gigabit Ethernet Adapter
2240 - Allied Telesyn AT-2970TX Gigabit Ethernet Adapter
2241 - Allied Telesyn AT-2970TX/2TX Gigabit Ethernet Adapter
2242 - Allied Telesyn AT-2971SX Gigabit Ethernet Adapter
2243 - Allied Telesyn AT-2971T Gigabit Ethernet Adapter
2244 - Belkin Gigabit Desktop Card 10/100/1000Base-T Adapter, Copper RJ-45
2245 - EG1032 v2 Instant Gigabit Network Adapter
2246 - EG1064 v2 Instant Gigabit Network Adapter
2247 - Marvell 88E8001 Gigabit LOM Ethernet Adapter (Abit)
2248 - Marvell 88E8001 Gigabit LOM Ethernet Adapter (Albatron)
2249 - Marvell 88E8001 Gigabit LOM Ethernet Adapter (Asus)
2250 - Marvell 88E8001 Gigabit LOM Ethernet Adapter (ECS)
2251 - Marvell 88E8001 Gigabit LOM Ethernet Adapter (Epox)
2252 - Marvell 88E8001 Gigabit LOM Ethernet Adapter (Foxconn)
2253 - Marvell 88E8001 Gigabit LOM Ethernet Adapter (Gigabyte)
2254 - Marvell 88E8001 Gigabit LOM Ethernet Adapter (Iwill)
2255 - Marvell 88E8050 Gigabit LOM Ethernet Adapter (Intel)
2256 - Marvell RDK-8001 Adapter
2257 - Marvell RDK-8002 Adapter
2258 - Marvell RDK-8003 Adapter
2259 - Marvell RDK-8004 Adapter
2260 - Marvell RDK-8006 Adapter
2261 - Marvell RDK-8007 Adapter
2262 - Marvell RDK-8008 Adapter
2263 - Marvell RDK-8009 Adapter
2264 - Marvell RDK-8010 Adapter
2265 - Marvell RDK-8011 Adapter
2266 - Marvell RDK-8012 Adapter
2267 - Marvell RDK-8052 Adapter
2268 - Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Adapter (32 bit)
2269 - Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Adapter (64 bit)
2270 - N-Way PCI-Bus Giga-Card 1000/100/10Mbps(L)
2271 - SK-9521 10/100/1000Base-T Adapter
2272 - SK-9521 V2.0 10/100/1000Base-T Adapter
2273 - SK-9821 Gigabit Ethernet Server Adapter (SK-NET GE-T)
2274 - SK-9821 V2.0 Gigabit Ethernet 10/100/1000Base-T Adapter
2275 - SK-9822 Gigabit Ethernet Server Adapter (SK-NET GE-T dual link)
2276 - SK-9841 Gigabit Ethernet Server Adapter (SK-NET GE-LX)
2277 - SK-9841 V2.0 Gigabit Ethernet 1000Base-LX Adapter
2278 - SK-9842 Gigabit Ethernet Server Adapter (SK-NET GE-LX dual link)
2279 - SK-9843 Gigabit Ethernet Server Adapter (SK-NET GE-SX)
2280 - SK-9843 V2.0 Gigabit Ethernet 1000Base-SX Adapter
2281 - SK-9844 Gigabit Ethernet Server Adapter (SK-NET GE-SX dual link)
2282 - SK-9851 V2.0 Gigabit Ethernet 1000Base-SX Adapter
2283 - SK-9861 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition)
2284 - SK-9861 V2.0 Gigabit Ethernet 1000Base-SX Adapter
2285 - SK-9862 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition dual link)
2286 - SK-9871 Gigabit Ethernet Server Adapter (SK-NET GE-ZX)
2287 - SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter
2288 - SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link)
2289 - SMC EZ Card 1000 (SMC9452TXV.2)
2290
2291 The adapters support Jumbo Frames.
2292 The dual link adapters support link-failover and dual port features.
2293 Both Marvell Yukon and SysKonnect SK-98xx/SK-95xx adapters support
2294 the scatter-gather functionality with sendfile(). Please refer to
2295 <file:Documentation/networking/sk98lin.txt> for more information about
2296 optional driver parameters.
2297 Questions concerning this driver may be addressed to:
2298 <linux@syskonnect.de>
2299
2300 If you want to compile this driver as a module ( = code which can be
2301 inserted in and removed from the running kernel whenever you want),
2302 say M here and read <file:Documentation/kbuild/modules.txt>. The module will
2303 be called sk98lin. This is recommended.
2304
2218config VIA_VELOCITY 2305config VIA_VELOCITY
2219 tristate "VIA Velocity support" 2306 tristate "VIA Velocity support"
2220 depends on PCI 2307 depends on PCI
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index e684212fd8..9c928a8458 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -66,6 +66,7 @@ ps3_gelic-objs += ps3_gelic_net.o
66obj-$(CONFIG_TC35815) += tc35815.o 66obj-$(CONFIG_TC35815) += tc35815.o
67obj-$(CONFIG_SKGE) += skge.o 67obj-$(CONFIG_SKGE) += skge.o
68obj-$(CONFIG_SKY2) += sky2.o 68obj-$(CONFIG_SKY2) += sky2.o
69obj-$(CONFIG_SK98LIN) += sk98lin/
69obj-$(CONFIG_SKFP) += skfp/ 70obj-$(CONFIG_SKFP) += skfp/
70obj-$(CONFIG_VIA_RHINE) += via-rhine.o 71obj-$(CONFIG_VIA_RHINE) += via-rhine.o
71obj-$(CONFIG_VIA_VELOCITY) += via-velocity.o 72obj-$(CONFIG_VIA_VELOCITY) += via-velocity.o
diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 3c1984ecf3..f23e13c8f9 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -2203,21 +2203,20 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
2203 struct net_device *netdev; 2203 struct net_device *netdev;
2204 struct atl1_adapter *adapter; 2204 struct atl1_adapter *adapter;
2205 static int cards_found = 0; 2205 static int cards_found = 0;
2206 bool pci_using_64 = true;
2207 int err; 2206 int err;
2208 2207
2209 err = pci_enable_device(pdev); 2208 err = pci_enable_device(pdev);
2210 if (err) 2209 if (err)
2211 return err; 2210 return err;
2212 2211
2213 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 2212 /*
2213 * 64-bit DMA currently has data corruption problems, so let's just
2214 * use 32-bit DMA for now. This is a big hack that is probably wrong.
2215 */
2216 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
2214 if (err) { 2217 if (err) {
2215 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 2218 dev_err(&pdev->dev, "no usable DMA configuration\n");
2216 if (err) { 2219 goto err_dma;
2217 dev_err(&pdev->dev, "no usable DMA configuration\n");
2218 goto err_dma;
2219 }
2220 pci_using_64 = false;
2221 } 2220 }
2222 /* Mark all PCI regions associated with PCI device 2221 /* Mark all PCI regions associated with PCI device
2223 * pdev as being reserved by owner atl1_driver_name 2222 * pdev as being reserved by owner atl1_driver_name
@@ -2282,7 +2281,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
2282 2281
2283 netdev->ethtool_ops = &atl1_ethtool_ops; 2282 netdev->ethtool_ops = &atl1_ethtool_ops;
2284 adapter->bd_number = cards_found; 2283 adapter->bd_number = cards_found;
2285 adapter->pci_using_64 = pci_using_64;
2286 2284
2287 /* setup the private structure */ 2285 /* setup the private structure */
2288 err = atl1_sw_init(adapter); 2286 err = atl1_sw_init(adapter);
@@ -2299,9 +2297,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
2299 */ 2297 */
2300 /* netdev->features |= NETIF_F_TSO; */ 2298 /* netdev->features |= NETIF_F_TSO; */
2301 2299
2302 if (pci_using_64)
2303 netdev->features |= NETIF_F_HIGHDMA;
2304
2305 netdev->features |= NETIF_F_LLTX; 2300 netdev->features |= NETIF_F_LLTX;
2306 2301
2307 /* 2302 /*
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 24e7f9ab3f..66eed22cbd 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -54,8 +54,8 @@
54 54
55#define DRV_MODULE_NAME "bnx2" 55#define DRV_MODULE_NAME "bnx2"
56#define PFX DRV_MODULE_NAME ": " 56#define PFX DRV_MODULE_NAME ": "
57#define DRV_MODULE_VERSION "1.6.4" 57#define DRV_MODULE_VERSION "1.6.5"
58#define DRV_MODULE_RELDATE "August 3, 2007" 58#define DRV_MODULE_RELDATE "September 20, 2007"
59 59
60#define RUN_AT(x) (jiffies + (x)) 60#define RUN_AT(x) (jiffies + (x))
61 61
@@ -3934,11 +3934,13 @@ bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
3934 /* Chip reset. */ 3934 /* Chip reset. */
3935 REG_WR(bp, BNX2_PCICFG_MISC_CONFIG, val); 3935 REG_WR(bp, BNX2_PCICFG_MISC_CONFIG, val);
3936 3936
3937 /* Reading back any register after chip reset will hang the
3938 * bus on 5706 A0 and A1. The msleep below provides plenty
3939 * of margin for write posting.
3940 */
3937 if ((CHIP_ID(bp) == CHIP_ID_5706_A0) || 3941 if ((CHIP_ID(bp) == CHIP_ID_5706_A0) ||
3938 (CHIP_ID(bp) == CHIP_ID_5706_A1)) { 3942 (CHIP_ID(bp) == CHIP_ID_5706_A1))
3939 current->state = TASK_UNINTERRUPTIBLE; 3943 msleep(20);
3940 schedule_timeout(HZ / 50);
3941 }
3942 3944
3943 /* Reset takes approximate 30 usec */ 3945 /* Reset takes approximate 30 usec */
3944 for (i = 0; i < 10; i++) { 3946 for (i = 0; i < 10; i++) {
@@ -6725,7 +6727,8 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
6725 } else if (CHIP_NUM(bp) == CHIP_NUM_5706 || 6727 } else if (CHIP_NUM(bp) == CHIP_NUM_5706 ||
6726 CHIP_NUM(bp) == CHIP_NUM_5708) 6728 CHIP_NUM(bp) == CHIP_NUM_5708)
6727 bp->phy_flags |= PHY_CRC_FIX_FLAG; 6729 bp->phy_flags |= PHY_CRC_FIX_FLAG;
6728 else if (CHIP_ID(bp) == CHIP_ID_5709_A0) 6730 else if (CHIP_ID(bp) == CHIP_ID_5709_A0 ||
6731 CHIP_ID(bp) == CHIP_ID_5709_A1)
6729 bp->phy_flags |= PHY_DIS_EARLY_DAC_FLAG; 6732 bp->phy_flags |= PHY_DIS_EARLY_DAC_FLAG;
6730 6733
6731 if ((CHIP_ID(bp) == CHIP_ID_5708_A0) || 6734 if ((CHIP_ID(bp) == CHIP_ID_5708_A0) ||
diff --git a/drivers/net/bsd_comp.c b/drivers/net/bsd_comp.c
index 202d4a4ef7..88edb98669 100644
--- a/drivers/net/bsd_comp.c
+++ b/drivers/net/bsd_comp.c
@@ -406,8 +406,7 @@ static void *bsd_alloc (unsigned char *options, int opt_len, int decomp)
406 * Allocate space for the dictionary. This may be more than one page in 406 * Allocate space for the dictionary. This may be more than one page in
407 * length. 407 * length.
408 */ 408 */
409 db->dict = (struct bsd_dict *) vmalloc (hsize * 409 db->dict = vmalloc(hsize * sizeof(struct bsd_dict));
410 sizeof (struct bsd_dict));
411 if (!db->dict) 410 if (!db->dict)
412 { 411 {
413 bsd_free (db); 412 bsd_free (db);
@@ -426,8 +425,7 @@ static void *bsd_alloc (unsigned char *options, int opt_len, int decomp)
426 */ 425 */
427 else 426 else
428 { 427 {
429 db->lens = (unsigned short *) vmalloc ((maxmaxcode + 1) * 428 db->lens = vmalloc((maxmaxcode + 1) * sizeof(db->lens[0]));
430 sizeof (db->lens[0]));
431 if (!db->lens) 429 if (!db->lens)
432 { 430 {
433 bsd_free (db); 431 bsd_free (db);
diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h
index ab72563b81..20e887de25 100644
--- a/drivers/net/cxgb3/adapter.h
+++ b/drivers/net/cxgb3/adapter.h
@@ -50,7 +50,9 @@ typedef irqreturn_t(*intr_handler_t) (int, void *);
50 50
51struct vlan_group; 51struct vlan_group;
52 52
53struct adapter;
53struct port_info { 54struct port_info {
55 struct adapter *adapter;
54 struct vlan_group *vlan_grp; 56 struct vlan_group *vlan_grp;
55 const struct port_type_info *port_type; 57 const struct port_type_info *port_type;
56 u8 port_id; 58 u8 port_id;
diff --git a/drivers/net/cxgb3/common.h b/drivers/net/cxgb3/common.h
index 1637800450..2129210a67 100644
--- a/drivers/net/cxgb3/common.h
+++ b/drivers/net/cxgb3/common.h
@@ -679,7 +679,8 @@ const struct adapter_info *t3_get_adapter_info(unsigned int board_id);
679int t3_seeprom_read(struct adapter *adapter, u32 addr, u32 *data); 679int t3_seeprom_read(struct adapter *adapter, u32 addr, u32 *data);
680int t3_seeprom_write(struct adapter *adapter, u32 addr, u32 data); 680int t3_seeprom_write(struct adapter *adapter, u32 addr, u32 data);
681int t3_seeprom_wp(struct adapter *adapter, int enable); 681int t3_seeprom_wp(struct adapter *adapter, int enable);
682int t3_check_tpsram_version(struct adapter *adapter); 682int t3_get_tp_version(struct adapter *adapter, u32 *vers);
683int t3_check_tpsram_version(struct adapter *adapter, int *must_load);
683int t3_check_tpsram(struct adapter *adapter, u8 *tp_ram, unsigned int size); 684int t3_check_tpsram(struct adapter *adapter, u8 *tp_ram, unsigned int size);
684int t3_set_proto_sram(struct adapter *adap, u8 *data); 685int t3_set_proto_sram(struct adapter *adap, u8 *data);
685int t3_read_flash(struct adapter *adapter, unsigned int addr, 686int t3_read_flash(struct adapter *adapter, unsigned int addr,
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index dc5d26988b..5ab319cfe5 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -358,11 +358,14 @@ static int init_dummy_netdevs(struct adapter *adap)
358 358
359 for (j = 0; j < pi->nqsets - 1; j++) { 359 for (j = 0; j < pi->nqsets - 1; j++) {
360 if (!adap->dummy_netdev[dummy_idx]) { 360 if (!adap->dummy_netdev[dummy_idx]) {
361 nd = alloc_netdev(0, "", ether_setup); 361 struct port_info *p;
362
363 nd = alloc_netdev(sizeof(*p), "", ether_setup);
362 if (!nd) 364 if (!nd)
363 goto free_all; 365 goto free_all;
364 366
365 nd->priv = adap; 367 p = netdev_priv(nd);
368 p->adapter = adap;
366 nd->weight = 64; 369 nd->weight = 64;
367 set_bit(__LINK_STATE_START, &nd->state); 370 set_bit(__LINK_STATE_START, &nd->state);
368 adap->dummy_netdev[dummy_idx] = nd; 371 adap->dummy_netdev[dummy_idx] = nd;
@@ -482,7 +485,8 @@ static ssize_t attr_store(struct device *d, struct device_attribute *attr,
482#define CXGB3_SHOW(name, val_expr) \ 485#define CXGB3_SHOW(name, val_expr) \
483static ssize_t format_##name(struct net_device *dev, char *buf) \ 486static ssize_t format_##name(struct net_device *dev, char *buf) \
484{ \ 487{ \
485 struct adapter *adap = dev->priv; \ 488 struct port_info *pi = netdev_priv(dev); \
489 struct adapter *adap = pi->adapter; \
486 return sprintf(buf, "%u\n", val_expr); \ 490 return sprintf(buf, "%u\n", val_expr); \
487} \ 491} \
488static ssize_t show_##name(struct device *d, struct device_attribute *attr, \ 492static ssize_t show_##name(struct device *d, struct device_attribute *attr, \
@@ -493,7 +497,8 @@ static ssize_t show_##name(struct device *d, struct device_attribute *attr, \
493 497
494static ssize_t set_nfilters(struct net_device *dev, unsigned int val) 498static ssize_t set_nfilters(struct net_device *dev, unsigned int val)
495{ 499{
496 struct adapter *adap = dev->priv; 500 struct port_info *pi = netdev_priv(dev);
501 struct adapter *adap = pi->adapter;
497 int min_tids = is_offload(adap) ? MC5_MIN_TIDS : 0; 502 int min_tids = is_offload(adap) ? MC5_MIN_TIDS : 0;
498 503
499 if (adap->flags & FULL_INIT_DONE) 504 if (adap->flags & FULL_INIT_DONE)
@@ -515,7 +520,8 @@ static ssize_t store_nfilters(struct device *d, struct device_attribute *attr,
515 520
516static ssize_t set_nservers(struct net_device *dev, unsigned int val) 521static ssize_t set_nservers(struct net_device *dev, unsigned int val)
517{ 522{
518 struct adapter *adap = dev->priv; 523 struct port_info *pi = netdev_priv(dev);
524 struct adapter *adap = pi->adapter;
519 525
520 if (adap->flags & FULL_INIT_DONE) 526 if (adap->flags & FULL_INIT_DONE)
521 return -EBUSY; 527 return -EBUSY;
@@ -556,9 +562,10 @@ static struct attribute_group cxgb3_attr_group = {.attrs = cxgb3_attrs };
556static ssize_t tm_attr_show(struct device *d, struct device_attribute *attr, 562static ssize_t tm_attr_show(struct device *d, struct device_attribute *attr,
557 char *buf, int sched) 563 char *buf, int sched)
558{ 564{
559 ssize_t len; 565 struct port_info *pi = netdev_priv(to_net_dev(d));
566 struct adapter *adap = pi->adapter;
560 unsigned int v, addr, bpt, cpt; 567 unsigned int v, addr, bpt, cpt;
561 struct adapter *adap = to_net_dev(d)->priv; 568 ssize_t len;
562 569
563 addr = A_TP_TX_MOD_Q1_Q0_RATE_LIMIT - sched / 2; 570 addr = A_TP_TX_MOD_Q1_Q0_RATE_LIMIT - sched / 2;
564 rtnl_lock(); 571 rtnl_lock();
@@ -581,10 +588,11 @@ static ssize_t tm_attr_show(struct device *d, struct device_attribute *attr,
581static ssize_t tm_attr_store(struct device *d, struct device_attribute *attr, 588static ssize_t tm_attr_store(struct device *d, struct device_attribute *attr,
582 const char *buf, size_t len, int sched) 589 const char *buf, size_t len, int sched)
583{ 590{
591 struct port_info *pi = netdev_priv(to_net_dev(d));
592 struct adapter *adap = pi->adapter;
593 unsigned int val;
584 char *endp; 594 char *endp;
585 ssize_t ret; 595 ssize_t ret;
586 unsigned int val;
587 struct adapter *adap = to_net_dev(d)->priv;
588 596
589 if (!capable(CAP_NET_ADMIN)) 597 if (!capable(CAP_NET_ADMIN))
590 return -EPERM; 598 return -EPERM;
@@ -721,6 +729,7 @@ static void bind_qsets(struct adapter *adap)
721} 729}
722 730
723#define FW_FNAME "t3fw-%d.%d.%d.bin" 731#define FW_FNAME "t3fw-%d.%d.%d.bin"
732#define TPSRAM_NAME "t3%c_protocol_sram-%d.%d.%d.bin"
724 733
725static int upgrade_fw(struct adapter *adap) 734static int upgrade_fw(struct adapter *adap)
726{ 735{
@@ -739,6 +748,71 @@ static int upgrade_fw(struct adapter *adap)
739 } 748 }
740 ret = t3_load_fw(adap, fw->data, fw->size); 749 ret = t3_load_fw(adap, fw->data, fw->size);
741 release_firmware(fw); 750 release_firmware(fw);
751
752 if (ret == 0)
753 dev_info(dev, "successful upgrade to firmware %d.%d.%d\n",
754 FW_VERSION_MAJOR, FW_VERSION_MINOR, FW_VERSION_MICRO);
755 else
756 dev_err(dev, "failed to upgrade to firmware %d.%d.%d\n",
757 FW_VERSION_MAJOR, FW_VERSION_MINOR, FW_VERSION_MICRO);
758
759 return ret;
760}
761
762static inline char t3rev2char(struct adapter *adapter)
763{
764 char rev = 0;
765
766 switch(adapter->params.rev) {
767 case T3_REV_B:
768 case T3_REV_B2:
769 rev = 'b';
770 break;
771 }
772 return rev;
773}
774
775int update_tpsram(struct adapter *adap)
776{
777 const struct firmware *tpsram;
778 char buf[64];
779 struct device *dev = &adap->pdev->dev;
780 int ret;
781 char rev;
782
783 rev = t3rev2char(adap);
784 if (!rev)
785 return 0;
786
787 snprintf(buf, sizeof(buf), TPSRAM_NAME, rev,
788 TP_VERSION_MAJOR, TP_VERSION_MINOR, TP_VERSION_MICRO);
789
790 ret = request_firmware(&tpsram, buf, dev);
791 if (ret < 0) {
792 dev_err(dev, "could not load TP SRAM: unable to load %s\n",
793 buf);
794 return ret;
795 }
796
797 ret = t3_check_tpsram(adap, tpsram->data, tpsram->size);
798 if (ret)
799 goto release_tpsram;
800
801 ret = t3_set_proto_sram(adap, tpsram->data);
802 if (ret == 0)
803 dev_info(dev,
804 "successful update of protocol engine "
805 "to %d.%d.%d\n",
806 TP_VERSION_MAJOR, TP_VERSION_MINOR, TP_VERSION_MICRO);
807 else
808 dev_err(dev, "failed to update of protocol engine %d.%d.%d\n",
809 TP_VERSION_MAJOR, TP_VERSION_MINOR, TP_VERSION_MICRO);
810 if (ret)
811 dev_err(dev, "loading protocol SRAM failed\n");
812
813release_tpsram:
814 release_firmware(tpsram);
815
742 return ret; 816 return ret;
743} 817}
744 818
@@ -755,6 +829,7 @@ static int upgrade_fw(struct adapter *adap)
755static int cxgb_up(struct adapter *adap) 829static int cxgb_up(struct adapter *adap)
756{ 830{
757 int err = 0; 831 int err = 0;
832 int must_load;
758 833
759 if (!(adap->flags & FULL_INIT_DONE)) { 834 if (!(adap->flags & FULL_INIT_DONE)) {
760 err = t3_check_fw_version(adap); 835 err = t3_check_fw_version(adap);
@@ -763,6 +838,13 @@ static int cxgb_up(struct adapter *adap)
763 if (err) 838 if (err)
764 goto out; 839 goto out;
765 840
841 err = t3_check_tpsram_version(adap, &must_load);
842 if (err == -EINVAL) {
843 err = update_tpsram(adap);
844 if (err && must_load)
845 goto out;
846 }
847
766 err = init_dummy_netdevs(adap); 848 err = init_dummy_netdevs(adap);
767 if (err) 849 if (err)
768 goto out; 850 goto out;
@@ -858,8 +940,9 @@ static void schedule_chk_task(struct adapter *adap)
858 940
859static int offload_open(struct net_device *dev) 941static int offload_open(struct net_device *dev)
860{ 942{
861 struct adapter *adapter = dev->priv; 943 struct port_info *pi = netdev_priv(dev);
862 struct t3cdev *tdev = T3CDEV(dev); 944 struct adapter *adapter = pi->adapter;
945 struct t3cdev *tdev = dev2t3cdev(dev);
863 int adap_up = adapter->open_device_map & PORT_MASK; 946 int adap_up = adapter->open_device_map & PORT_MASK;
864 int err = 0; 947 int err = 0;
865 948
@@ -924,10 +1007,10 @@ static int offload_close(struct t3cdev *tdev)
924 1007
925static int cxgb_open(struct net_device *dev) 1008static int cxgb_open(struct net_device *dev)
926{ 1009{
927 int err;
928 struct adapter *adapter = dev->priv;
929 struct port_info *pi = netdev_priv(dev); 1010 struct port_info *pi = netdev_priv(dev);
1011 struct adapter *adapter = pi->adapter;
930 int other_ports = adapter->open_device_map & PORT_MASK; 1012 int other_ports = adapter->open_device_map & PORT_MASK;
1013 int err;
931 1014
932 if (!adapter->open_device_map && (err = cxgb_up(adapter)) < 0) 1015 if (!adapter->open_device_map && (err = cxgb_up(adapter)) < 0)
933 return err; 1016 return err;
@@ -951,17 +1034,17 @@ static int cxgb_open(struct net_device *dev)
951 1034
952static int cxgb_close(struct net_device *dev) 1035static int cxgb_close(struct net_device *dev)
953{ 1036{
954 struct adapter *adapter = dev->priv; 1037 struct port_info *pi = netdev_priv(dev);
955 struct port_info *p = netdev_priv(dev); 1038 struct adapter *adapter = pi->adapter;
956 1039
957 t3_port_intr_disable(adapter, p->port_id); 1040 t3_port_intr_disable(adapter, pi->port_id);
958 netif_stop_queue(dev); 1041 netif_stop_queue(dev);
959 p->phy.ops->power_down(&p->phy, 1); 1042 pi->phy.ops->power_down(&pi->phy, 1);
960 netif_carrier_off(dev); 1043 netif_carrier_off(dev);
961 t3_mac_disable(&p->mac, MAC_DIRECTION_TX | MAC_DIRECTION_RX); 1044 t3_mac_disable(&pi->mac, MAC_DIRECTION_TX | MAC_DIRECTION_RX);
962 1045
963 spin_lock(&adapter->work_lock); /* sync with update task */ 1046 spin_lock(&adapter->work_lock); /* sync with update task */
964 clear_bit(p->port_id, &adapter->open_device_map); 1047 clear_bit(pi->port_id, &adapter->open_device_map);
965 spin_unlock(&adapter->work_lock); 1048 spin_unlock(&adapter->work_lock);
966 1049
967 if (!(adapter->open_device_map & PORT_MASK)) 1050 if (!(adapter->open_device_map & PORT_MASK))
@@ -976,13 +1059,13 @@ static int cxgb_close(struct net_device *dev)
976 1059
977static struct net_device_stats *cxgb_get_stats(struct net_device *dev) 1060static struct net_device_stats *cxgb_get_stats(struct net_device *dev)
978{ 1061{
979 struct adapter *adapter = dev->priv; 1062 struct port_info *pi = netdev_priv(dev);
980 struct port_info *p = netdev_priv(dev); 1063 struct adapter *adapter = pi->adapter;
981 struct net_device_stats *ns = &p->netstats; 1064 struct net_device_stats *ns = &pi->netstats;
982 const struct mac_stats *pstats; 1065 const struct mac_stats *pstats;
983 1066
984 spin_lock(&adapter->stats_lock); 1067 spin_lock(&adapter->stats_lock);
985 pstats = t3_mac_update_stats(&p->mac); 1068 pstats = t3_mac_update_stats(&pi->mac);
986 spin_unlock(&adapter->stats_lock); 1069 spin_unlock(&adapter->stats_lock);
987 1070
988 ns->tx_bytes = pstats->tx_octets; 1071 ns->tx_bytes = pstats->tx_octets;
@@ -1015,14 +1098,16 @@ static struct net_device_stats *cxgb_get_stats(struct net_device *dev)
1015 1098
1016static u32 get_msglevel(struct net_device *dev) 1099static u32 get_msglevel(struct net_device *dev)
1017{ 1100{
1018 struct adapter *adapter = dev->priv; 1101 struct port_info *pi = netdev_priv(dev);
1102 struct adapter *adapter = pi->adapter;
1019 1103
1020 return adapter->msg_enable; 1104 return adapter->msg_enable;
1021} 1105}
1022 1106
1023static void set_msglevel(struct net_device *dev, u32 val) 1107static void set_msglevel(struct net_device *dev, u32 val)
1024{ 1108{
1025 struct adapter *adapter = dev->priv; 1109 struct port_info *pi = netdev_priv(dev);
1110 struct adapter *adapter = pi->adapter;
1026 1111
1027 adapter->msg_enable = val; 1112 adapter->msg_enable = val;
1028} 1113}
@@ -1096,10 +1181,13 @@ static int get_eeprom_len(struct net_device *dev)
1096 1181
1097static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) 1182static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
1098{ 1183{
1184 struct port_info *pi = netdev_priv(dev);
1185 struct adapter *adapter = pi->adapter;
1099 u32 fw_vers = 0; 1186 u32 fw_vers = 0;
1100 struct adapter *adapter = dev->priv; 1187 u32 tp_vers = 0;
1101 1188
1102 t3_get_fw_version(adapter, &fw_vers); 1189 t3_get_fw_version(adapter, &fw_vers);
1190 t3_get_tp_version(adapter, &tp_vers);
1103 1191
1104 strcpy(info->driver, DRV_NAME); 1192 strcpy(info->driver, DRV_NAME);
1105 strcpy(info->version, DRV_VERSION); 1193 strcpy(info->version, DRV_VERSION);
@@ -1108,11 +1196,14 @@ static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
1108 strcpy(info->fw_version, "N/A"); 1196 strcpy(info->fw_version, "N/A");
1109 else { 1197 else {
1110 snprintf(info->fw_version, sizeof(info->fw_version), 1198 snprintf(info->fw_version, sizeof(info->fw_version),
1111 "%s %u.%u.%u", 1199 "%s %u.%u.%u TP %u.%u.%u",
1112 G_FW_VERSION_TYPE(fw_vers) ? "T" : "N", 1200 G_FW_VERSION_TYPE(fw_vers) ? "T" : "N",
1113 G_FW_VERSION_MAJOR(fw_vers), 1201 G_FW_VERSION_MAJOR(fw_vers),
1114 G_FW_VERSION_MINOR(fw_vers), 1202 G_FW_VERSION_MINOR(fw_vers),
1115 G_FW_VERSION_MICRO(fw_vers)); 1203 G_FW_VERSION_MICRO(fw_vers),
1204 G_TP_VERSION_MAJOR(tp_vers),
1205 G_TP_VERSION_MINOR(tp_vers),
1206 G_TP_VERSION_MICRO(tp_vers));
1116 } 1207 }
1117} 1208}
1118 1209
@@ -1136,8 +1227,8 @@ static unsigned long collect_sge_port_stats(struct adapter *adapter,
1136static void get_stats(struct net_device *dev, struct ethtool_stats *stats, 1227static void get_stats(struct net_device *dev, struct ethtool_stats *stats,
1137 u64 *data) 1228 u64 *data)
1138{ 1229{
1139 struct adapter *adapter = dev->priv;
1140 struct port_info *pi = netdev_priv(dev); 1230 struct port_info *pi = netdev_priv(dev);
1231 struct adapter *adapter = pi->adapter;
1141 const struct mac_stats *s; 1232 const struct mac_stats *s;
1142 1233
1143 spin_lock(&adapter->stats_lock); 1234 spin_lock(&adapter->stats_lock);
@@ -1205,7 +1296,8 @@ static inline void reg_block_dump(struct adapter *ap, void *buf,
1205static void get_regs(struct net_device *dev, struct ethtool_regs *regs, 1296static void get_regs(struct net_device *dev, struct ethtool_regs *regs,
1206 void *buf) 1297 void *buf)
1207{ 1298{
1208 struct adapter *ap = dev->priv; 1299 struct port_info *pi = netdev_priv(dev);
1300 struct adapter *ap = pi->adapter;
1209 1301
1210 /* 1302 /*
1211 * Version scheme: 1303 * Version scheme:
@@ -1246,8 +1338,9 @@ static int restart_autoneg(struct net_device *dev)
1246 1338
1247static int cxgb3_phys_id(struct net_device *dev, u32 data) 1339static int cxgb3_phys_id(struct net_device *dev, u32 data)
1248{ 1340{
1341 struct port_info *pi = netdev_priv(dev);
1342 struct adapter *adapter = pi->adapter;
1249 int i; 1343 int i;
1250 struct adapter *adapter = dev->priv;
1251 1344
1252 if (data == 0) 1345 if (data == 0)
1253 data = 2; 1346 data = 2;
@@ -1408,8 +1501,8 @@ static int set_rx_csum(struct net_device *dev, u32 data)
1408 1501
1409static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e) 1502static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
1410{ 1503{
1411 const struct adapter *adapter = dev->priv; 1504 struct port_info *pi = netdev_priv(dev);
1412 const struct port_info *pi = netdev_priv(dev); 1505 struct adapter *adapter = pi->adapter;
1413 const struct qset_params *q = &adapter->params.sge.qset[pi->first_qset]; 1506 const struct qset_params *q = &adapter->params.sge.qset[pi->first_qset];
1414 1507
1415 e->rx_max_pending = MAX_RX_BUFFERS; 1508 e->rx_max_pending = MAX_RX_BUFFERS;
@@ -1425,10 +1518,10 @@ static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
1425 1518
1426static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e) 1519static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
1427{ 1520{
1428 int i; 1521 struct port_info *pi = netdev_priv(dev);
1522 struct adapter *adapter = pi->adapter;
1429 struct qset_params *q; 1523 struct qset_params *q;
1430 struct adapter *adapter = dev->priv; 1524 int i;
1431 const struct port_info *pi = netdev_priv(dev);
1432 1525
1433 if (e->rx_pending > MAX_RX_BUFFERS || 1526 if (e->rx_pending > MAX_RX_BUFFERS ||
1434 e->rx_jumbo_pending > MAX_RX_JUMBO_BUFFERS || 1527 e->rx_jumbo_pending > MAX_RX_JUMBO_BUFFERS ||
@@ -1457,7 +1550,8 @@ static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
1457 1550
1458static int set_coalesce(struct net_device *dev, struct ethtool_coalesce *c) 1551static int set_coalesce(struct net_device *dev, struct ethtool_coalesce *c)
1459{ 1552{
1460 struct adapter *adapter = dev->priv; 1553 struct port_info *pi = netdev_priv(dev);
1554 struct adapter *adapter = pi->adapter;
1461 struct qset_params *qsp = &adapter->params.sge.qset[0]; 1555 struct qset_params *qsp = &adapter->params.sge.qset[0];
1462 struct sge_qset *qs = &adapter->sge.qs[0]; 1556 struct sge_qset *qs = &adapter->sge.qs[0];
1463 1557
@@ -1471,7 +1565,8 @@ static int set_coalesce(struct net_device *dev, struct ethtool_coalesce *c)
1471 1565
1472static int get_coalesce(struct net_device *dev, struct ethtool_coalesce *c) 1566static int get_coalesce(struct net_device *dev, struct ethtool_coalesce *c)
1473{ 1567{
1474 struct adapter *adapter = dev->priv; 1568 struct port_info *pi = netdev_priv(dev);
1569 struct adapter *adapter = pi->adapter;
1475 struct qset_params *q = adapter->params.sge.qset; 1570 struct qset_params *q = adapter->params.sge.qset;
1476 1571
1477 c->rx_coalesce_usecs = q->coalesce_usecs; 1572 c->rx_coalesce_usecs = q->coalesce_usecs;
@@ -1481,8 +1576,9 @@ static int get_coalesce(struct net_device *dev, struct ethtool_coalesce *c)
1481static int get_eeprom(struct net_device *dev, struct ethtool_eeprom *e, 1576static int get_eeprom(struct net_device *dev, struct ethtool_eeprom *e,
1482 u8 * data) 1577 u8 * data)
1483{ 1578{
1579 struct port_info *pi = netdev_priv(dev);
1580 struct adapter *adapter = pi->adapter;
1484 int i, err = 0; 1581 int i, err = 0;
1485 struct adapter *adapter = dev->priv;
1486 1582
1487 u8 *buf = kmalloc(EEPROMSIZE, GFP_KERNEL); 1583 u8 *buf = kmalloc(EEPROMSIZE, GFP_KERNEL);
1488 if (!buf) 1584 if (!buf)
@@ -1501,10 +1597,11 @@ static int get_eeprom(struct net_device *dev, struct ethtool_eeprom *e,
1501static int set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, 1597static int set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
1502 u8 * data) 1598 u8 * data)
1503{ 1599{
1600 struct port_info *pi = netdev_priv(dev);
1601 struct adapter *adapter = pi->adapter;
1602 u32 aligned_offset, aligned_len, *p;
1504 u8 *buf; 1603 u8 *buf;
1505 int err = 0; 1604 int err = 0;
1506 u32 aligned_offset, aligned_len, *p;
1507 struct adapter *adapter = dev->priv;
1508 1605
1509 if (eeprom->magic != EEPROM_MAGIC) 1606 if (eeprom->magic != EEPROM_MAGIC)
1510 return -EINVAL; 1607 return -EINVAL;
@@ -1592,9 +1689,10 @@ static int in_range(int val, int lo, int hi)
1592 1689
1593static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr) 1690static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
1594{ 1691{
1595 int ret; 1692 struct port_info *pi = netdev_priv(dev);
1693 struct adapter *adapter = pi->adapter;
1596 u32 cmd; 1694 u32 cmd;
1597 struct adapter *adapter = dev->priv; 1695 int ret;
1598 1696
1599 if (copy_from_user(&cmd, useraddr, sizeof(cmd))) 1697 if (copy_from_user(&cmd, useraddr, sizeof(cmd)))
1600 return -EFAULT; 1698 return -EFAULT;
@@ -1923,10 +2021,10 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
1923 2021
1924static int cxgb_ioctl(struct net_device *dev, struct ifreq *req, int cmd) 2022static int cxgb_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
1925{ 2023{
1926 int ret, mmd;
1927 struct adapter *adapter = dev->priv;
1928 struct port_info *pi = netdev_priv(dev);
1929 struct mii_ioctl_data *data = if_mii(req); 2024 struct mii_ioctl_data *data = if_mii(req);
2025 struct port_info *pi = netdev_priv(dev);
2026 struct adapter *adapter = pi->adapter;
2027 int ret, mmd;
1930 2028
1931 switch (cmd) { 2029 switch (cmd) {
1932 case SIOCGMIIPHY: 2030 case SIOCGMIIPHY:
@@ -1994,9 +2092,9 @@ static int cxgb_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
1994 2092
1995static int cxgb_change_mtu(struct net_device *dev, int new_mtu) 2093static int cxgb_change_mtu(struct net_device *dev, int new_mtu)
1996{ 2094{
1997 int ret;
1998 struct adapter *adapter = dev->priv;
1999 struct port_info *pi = netdev_priv(dev); 2095 struct port_info *pi = netdev_priv(dev);
2096 struct adapter *adapter = pi->adapter;
2097 int ret;
2000 2098
2001 if (new_mtu < 81) /* accommodate SACK */ 2099 if (new_mtu < 81) /* accommodate SACK */
2002 return -EINVAL; 2100 return -EINVAL;
@@ -2013,8 +2111,8 @@ static int cxgb_change_mtu(struct net_device *dev, int new_mtu)
2013 2111
2014static int cxgb_set_mac_addr(struct net_device *dev, void *p) 2112static int cxgb_set_mac_addr(struct net_device *dev, void *p)
2015{ 2113{
2016 struct adapter *adapter = dev->priv;
2017 struct port_info *pi = netdev_priv(dev); 2114 struct port_info *pi = netdev_priv(dev);
2115 struct adapter *adapter = pi->adapter;
2018 struct sockaddr *addr = p; 2116 struct sockaddr *addr = p;
2019 2117
2020 if (!is_valid_ether_addr(addr->sa_data)) 2118 if (!is_valid_ether_addr(addr->sa_data))
@@ -2050,8 +2148,8 @@ static void t3_synchronize_rx(struct adapter *adap, const struct port_info *p)
2050 2148
2051static void vlan_rx_register(struct net_device *dev, struct vlan_group *grp) 2149static void vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
2052{ 2150{
2053 struct adapter *adapter = dev->priv;
2054 struct port_info *pi = netdev_priv(dev); 2151 struct port_info *pi = netdev_priv(dev);
2152 struct adapter *adapter = pi->adapter;
2055 2153
2056 pi->vlan_grp = grp; 2154 pi->vlan_grp = grp;
2057 if (adapter->params.rev > 0) 2155 if (adapter->params.rev > 0)
@@ -2070,8 +2168,8 @@ static void vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
2070#ifdef CONFIG_NET_POLL_CONTROLLER 2168#ifdef CONFIG_NET_POLL_CONTROLLER
2071static void cxgb_netpoll(struct net_device *dev) 2169static void cxgb_netpoll(struct net_device *dev)
2072{ 2170{
2073 struct adapter *adapter = dev->priv;
2074 struct port_info *pi = netdev_priv(dev); 2171 struct port_info *pi = netdev_priv(dev);
2172 struct adapter *adapter = pi->adapter;
2075 int qidx; 2173 int qidx;
2076 2174
2077 for (qidx = pi->first_qset; qidx < pi->first_qset + pi->nqsets; qidx++) { 2175 for (qidx = pi->first_qset; qidx < pi->first_qset + pi->nqsets; qidx++) {
@@ -2088,42 +2186,6 @@ static void cxgb_netpoll(struct net_device *dev)
2088} 2186}
2089#endif 2187#endif
2090 2188
2091#define TPSRAM_NAME "t3%c_protocol_sram-%d.%d.%d.bin"
2092int update_tpsram(struct adapter *adap)
2093{
2094 const struct firmware *tpsram;
2095 char buf[64];
2096 struct device *dev = &adap->pdev->dev;
2097 int ret;
2098 char rev;
2099
2100 rev = adap->params.rev == T3_REV_B2 ? 'b' : 'a';
2101
2102 snprintf(buf, sizeof(buf), TPSRAM_NAME, rev,
2103 TP_VERSION_MAJOR, TP_VERSION_MINOR, TP_VERSION_MICRO);
2104
2105 ret = request_firmware(&tpsram, buf, dev);
2106 if (ret < 0) {
2107 dev_err(dev, "could not load TP SRAM: unable to load %s\n",
2108 buf);
2109 return ret;
2110 }
2111
2112 ret = t3_check_tpsram(adap, tpsram->data, tpsram->size);
2113 if (ret)
2114 goto release_tpsram;
2115
2116 ret = t3_set_proto_sram(adap, tpsram->data);
2117 if (ret)
2118 dev_err(dev, "loading protocol SRAM failed\n");
2119
2120release_tpsram:
2121 release_firmware(tpsram);
2122
2123 return ret;
2124}
2125
2126
2127/* 2189/*
2128 * Periodic accumulation of MAC statistics. 2190 * Periodic accumulation of MAC statistics.
2129 */ 2191 */
@@ -2433,6 +2495,7 @@ static int __devinit init_one(struct pci_dev *pdev,
2433 2495
2434 adapter->port[i] = netdev; 2496 adapter->port[i] = netdev;
2435 pi = netdev_priv(netdev); 2497 pi = netdev_priv(netdev);
2498 pi->adapter = adapter;
2436 pi->rx_csum_offload = 1; 2499 pi->rx_csum_offload = 1;
2437 pi->nqsets = 1; 2500 pi->nqsets = 1;
2438 pi->first_qset = i; 2501 pi->first_qset = i;
@@ -2442,7 +2505,6 @@ static int __devinit init_one(struct pci_dev *pdev,
2442 netdev->irq = pdev->irq; 2505 netdev->irq = pdev->irq;
2443 netdev->mem_start = mmio_start; 2506 netdev->mem_start = mmio_start;
2444 netdev->mem_end = mmio_start + mmio_len - 1; 2507 netdev->mem_end = mmio_start + mmio_len - 1;
2445 netdev->priv = adapter;
2446 netdev->features |= NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO; 2508 netdev->features |= NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO;
2447 netdev->features |= NETIF_F_LLTX; 2509 netdev->features |= NETIF_F_LLTX;
2448 if (pci_using_dac) 2510 if (pci_using_dac)
@@ -2467,18 +2529,11 @@ static int __devinit init_one(struct pci_dev *pdev,
2467 SET_ETHTOOL_OPS(netdev, &cxgb_ethtool_ops); 2529 SET_ETHTOOL_OPS(netdev, &cxgb_ethtool_ops);
2468 } 2530 }
2469 2531
2470 pci_set_drvdata(pdev, adapter->port[0]); 2532 pci_set_drvdata(pdev, adapter);
2471 if (t3_prep_adapter(adapter, ai, 1) < 0) { 2533 if (t3_prep_adapter(adapter, ai, 1) < 0) {
2472 err = -ENODEV; 2534 err = -ENODEV;
2473 goto out_free_dev; 2535 goto out_free_dev;
2474 } 2536 }
2475
2476 err = t3_check_tpsram_version(adapter);
2477 if (err == -EINVAL)
2478 err = update_tpsram(adapter);
2479
2480 if (err)
2481 goto out_free_dev;
2482 2537
2483 /* 2538 /*
2484 * The card is now ready to go. If any errors occur during device 2539 * The card is now ready to go. If any errors occur during device
@@ -2547,11 +2602,10 @@ out_release_regions:
2547 2602
2548static void __devexit remove_one(struct pci_dev *pdev) 2603static void __devexit remove_one(struct pci_dev *pdev)
2549{ 2604{
2550 struct net_device *dev = pci_get_drvdata(pdev); 2605 struct adapter *adapter = pci_get_drvdata(pdev);
2551 2606
2552 if (dev) { 2607 if (adapter) {
2553 int i; 2608 int i;
2554 struct adapter *adapter = dev->priv;
2555 2609
2556 t3_sge_stop(adapter); 2610 t3_sge_stop(adapter);
2557 sysfs_remove_group(&adapter->port[0]->dev.kobj, 2611 sysfs_remove_group(&adapter->port[0]->dev.kobj,
diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c
index e620ed4c3f..bdff7baeb5 100644
--- a/drivers/net/cxgb3/cxgb3_offload.c
+++ b/drivers/net/cxgb3/cxgb3_offload.c
@@ -593,6 +593,16 @@ int cxgb3_alloc_stid(struct t3cdev *tdev, struct cxgb3_client *client,
593 593
594EXPORT_SYMBOL(cxgb3_alloc_stid); 594EXPORT_SYMBOL(cxgb3_alloc_stid);
595 595
596/* Get the t3cdev associated with a net_device */
597struct t3cdev *dev2t3cdev(struct net_device *dev)
598{
599 const struct port_info *pi = netdev_priv(dev);
600
601 return (struct t3cdev *)pi->adapter;
602}
603
604EXPORT_SYMBOL(dev2t3cdev);
605
596static int do_smt_write_rpl(struct t3cdev *dev, struct sk_buff *skb) 606static int do_smt_write_rpl(struct t3cdev *dev, struct sk_buff *skb)
597{ 607{
598 struct cpl_smt_write_rpl *rpl = cplhdr(skb); 608 struct cpl_smt_write_rpl *rpl = cplhdr(skb);
@@ -925,7 +935,7 @@ void cxgb_neigh_update(struct neighbour *neigh)
925 struct net_device *dev = neigh->dev; 935 struct net_device *dev = neigh->dev;
926 936
927 if (dev && (is_offloading(dev))) { 937 if (dev && (is_offloading(dev))) {
928 struct t3cdev *tdev = T3CDEV(dev); 938 struct t3cdev *tdev = dev2t3cdev(dev);
929 939
930 BUG_ON(!tdev); 940 BUG_ON(!tdev);
931 t3_l2t_update(tdev, neigh); 941 t3_l2t_update(tdev, neigh);
@@ -973,9 +983,9 @@ void cxgb_redirect(struct dst_entry *old, struct dst_entry *new)
973 "device ignored.\n", __FUNCTION__); 983 "device ignored.\n", __FUNCTION__);
974 return; 984 return;
975 } 985 }
976 tdev = T3CDEV(olddev); 986 tdev = dev2t3cdev(olddev);
977 BUG_ON(!tdev); 987 BUG_ON(!tdev);
978 if (tdev != T3CDEV(newdev)) { 988 if (tdev != dev2t3cdev(newdev)) {
979 printk(KERN_WARNING "%s: Redirect to different " 989 printk(KERN_WARNING "%s: Redirect to different "
980 "offload device ignored.\n", __FUNCTION__); 990 "offload device ignored.\n", __FUNCTION__);
981 return; 991 return;
diff --git a/drivers/net/cxgb3/cxgb3_offload.h b/drivers/net/cxgb3/cxgb3_offload.h
index f15446a32e..7a379138b5 100644
--- a/drivers/net/cxgb3/cxgb3_offload.h
+++ b/drivers/net/cxgb3/cxgb3_offload.h
@@ -51,6 +51,8 @@ void cxgb3_offload_deactivate(struct adapter *adapter);
51 51
52void cxgb3_set_dummy_ops(struct t3cdev *dev); 52void cxgb3_set_dummy_ops(struct t3cdev *dev);
53 53
54struct t3cdev *dev2t3cdev(struct net_device *dev);
55
54/* 56/*
55 * Client registration. Users of T3 driver must register themselves. 57 * Client registration. Users of T3 driver must register themselves.
56 * The T3 driver will call the add function of every client for each T3 58 * The T3 driver will call the add function of every client for each T3
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index a2cfd68ac7..58a5f60521 100644
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -1073,7 +1073,7 @@ int t3_eth_xmit(struct sk_buff *skb, struct net_device *dev)
1073{ 1073{
1074 unsigned int ndesc, pidx, credits, gen, compl; 1074 unsigned int ndesc, pidx, credits, gen, compl;
1075 const struct port_info *pi = netdev_priv(dev); 1075 const struct port_info *pi = netdev_priv(dev);
1076 struct adapter *adap = dev->priv; 1076 struct adapter *adap = pi->adapter;
1077 struct sge_qset *qs = dev2qset(dev); 1077 struct sge_qset *qs = dev2qset(dev);
1078 struct sge_txq *q = &qs->txq[TXQ_ETH]; 1078 struct sge_txq *q = &qs->txq[TXQ_ETH];
1079 1079
@@ -1326,7 +1326,8 @@ static void restart_ctrlq(unsigned long data)
1326 struct sk_buff *skb; 1326 struct sk_buff *skb;
1327 struct sge_qset *qs = (struct sge_qset *)data; 1327 struct sge_qset *qs = (struct sge_qset *)data;
1328 struct sge_txq *q = &qs->txq[TXQ_CTRL]; 1328 struct sge_txq *q = &qs->txq[TXQ_CTRL];
1329 struct adapter *adap = qs->netdev->priv; 1329 const struct port_info *pi = netdev_priv(qs->netdev);
1330 struct adapter *adap = pi->adapter;
1330 1331
1331 spin_lock(&q->lock); 1332 spin_lock(&q->lock);
1332 again:reclaim_completed_tx_imm(q); 1333 again:reclaim_completed_tx_imm(q);
@@ -1531,7 +1532,8 @@ static void restart_offloadq(unsigned long data)
1531 struct sk_buff *skb; 1532 struct sk_buff *skb;
1532 struct sge_qset *qs = (struct sge_qset *)data; 1533 struct sge_qset *qs = (struct sge_qset *)data;
1533 struct sge_txq *q = &qs->txq[TXQ_OFLD]; 1534 struct sge_txq *q = &qs->txq[TXQ_OFLD];
1534 struct adapter *adap = qs->netdev->priv; 1535 const struct port_info *pi = netdev_priv(qs->netdev);
1536 struct adapter *adap = pi->adapter;
1535 1537
1536 spin_lock(&q->lock); 1538 spin_lock(&q->lock);
1537 again:reclaim_completed_tx(adap, q); 1539 again:reclaim_completed_tx(adap, q);
@@ -1675,7 +1677,8 @@ static inline void deliver_partial_bundle(struct t3cdev *tdev,
1675 */ 1677 */
1676static int ofld_poll(struct net_device *dev, int *budget) 1678static int ofld_poll(struct net_device *dev, int *budget)
1677{ 1679{
1678 struct adapter *adapter = dev->priv; 1680 const struct port_info *pi = netdev_priv(dev);
1681 struct adapter *adapter = pi->adapter;
1679 struct sge_qset *qs = dev2qset(dev); 1682 struct sge_qset *qs = dev2qset(dev);
1680 struct sge_rspq *q = &qs->rspq; 1683 struct sge_rspq *q = &qs->rspq;
1681 int work_done, limit = min(*budget, dev->quota), avail = limit; 1684 int work_done, limit = min(*budget, dev->quota), avail = limit;
@@ -2075,7 +2078,8 @@ static inline int is_pure_response(const struct rsp_desc *r)
2075 */ 2078 */
2076static int napi_rx_handler(struct net_device *dev, int *budget) 2079static int napi_rx_handler(struct net_device *dev, int *budget)
2077{ 2080{
2078 struct adapter *adap = dev->priv; 2081 const struct port_info *pi = netdev_priv(dev);
2082 struct adapter *adap = pi->adapter;
2079 struct sge_qset *qs = dev2qset(dev); 2083 struct sge_qset *qs = dev2qset(dev);
2080 int effective_budget = min(*budget, dev->quota); 2084 int effective_budget = min(*budget, dev->quota);
2081 2085
@@ -2205,7 +2209,8 @@ static inline int handle_responses(struct adapter *adap, struct sge_rspq *q)
2205irqreturn_t t3_sge_intr_msix(int irq, void *cookie) 2209irqreturn_t t3_sge_intr_msix(int irq, void *cookie)
2206{ 2210{
2207 struct sge_qset *qs = cookie; 2211 struct sge_qset *qs = cookie;
2208 struct adapter *adap = qs->netdev->priv; 2212 const struct port_info *pi = netdev_priv(qs->netdev);
2213 struct adapter *adap = pi->adapter;
2209 struct sge_rspq *q = &qs->rspq; 2214 struct sge_rspq *q = &qs->rspq;
2210 2215
2211 spin_lock(&q->lock); 2216 spin_lock(&q->lock);
@@ -2224,7 +2229,8 @@ irqreturn_t t3_sge_intr_msix(int irq, void *cookie)
2224irqreturn_t t3_sge_intr_msix_napi(int irq, void *cookie) 2229irqreturn_t t3_sge_intr_msix_napi(int irq, void *cookie)
2225{ 2230{
2226 struct sge_qset *qs = cookie; 2231 struct sge_qset *qs = cookie;
2227 struct adapter *adap = qs->netdev->priv; 2232 const struct port_info *pi = netdev_priv(qs->netdev);
2233 struct adapter *adap = pi->adapter;
2228 struct sge_rspq *q = &qs->rspq; 2234 struct sge_rspq *q = &qs->rspq;
2229 2235
2230 spin_lock(&q->lock); 2236 spin_lock(&q->lock);
@@ -2508,7 +2514,8 @@ static void sge_timer_cb(unsigned long data)
2508{ 2514{
2509 spinlock_t *lock; 2515 spinlock_t *lock;
2510 struct sge_qset *qs = (struct sge_qset *)data; 2516 struct sge_qset *qs = (struct sge_qset *)data;
2511 struct adapter *adap = qs->netdev->priv; 2517 const struct port_info *pi = netdev_priv(qs->netdev);
2518 struct adapter *adap = pi->adapter;
2512 2519
2513 if (spin_trylock(&qs->txq[TXQ_ETH].lock)) { 2520 if (spin_trylock(&qs->txq[TXQ_ETH].lock)) {
2514 reclaim_completed_tx(adap, &qs->txq[TXQ_ETH]); 2521 reclaim_completed_tx(adap, &qs->txq[TXQ_ETH]);
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index dd3149d94b..b02d15daf5 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -848,16 +848,15 @@ static int t3_write_flash(struct adapter *adapter, unsigned int addr,
848} 848}
849 849
850/** 850/**
851 * t3_check_tpsram_version - read the tp sram version 851 * t3_get_tp_version - read the tp sram version
852 * @adapter: the adapter 852 * @adapter: the adapter
853 * @vers: where to place the version
853 * 854 *
854 * Reads the protocol sram version from serial eeprom. 855 * Reads the protocol sram version from sram.
855 */ 856 */
856int t3_check_tpsram_version(struct adapter *adapter) 857int t3_get_tp_version(struct adapter *adapter, u32 *vers)
857{ 858{
858 int ret; 859 int ret;
859 u32 vers;
860 unsigned int major, minor;
861 860
862 /* Get version loaded in SRAM */ 861 /* Get version loaded in SRAM */
863 t3_write_reg(adapter, A_TP_EMBED_OP_FIELD0, 0); 862 t3_write_reg(adapter, A_TP_EMBED_OP_FIELD0, 0);
@@ -866,7 +865,32 @@ int t3_check_tpsram_version(struct adapter *adapter)
866 if (ret) 865 if (ret)
867 return ret; 866 return ret;
868 867
869 vers = t3_read_reg(adapter, A_TP_EMBED_OP_FIELD1); 868 *vers = t3_read_reg(adapter, A_TP_EMBED_OP_FIELD1);
869
870 return 0;
871}
872
873/**
874 * t3_check_tpsram_version - read the tp sram version
875 * @adapter: the adapter
876 * @must_load: set to 1 if loading a new microcode image is required
877 *
878 * Reads the protocol sram version from flash.
879 */
880int t3_check_tpsram_version(struct adapter *adapter, int *must_load)
881{
882 int ret;
883 u32 vers;
884 unsigned int major, minor;
885
886 if (adapter->params.rev == T3_REV_A)
887 return 0;
888
889 *must_load = 1;
890
891 ret = t3_get_tp_version(adapter, &vers);
892 if (ret)
893 return ret;
870 894
871 major = G_TP_VERSION_MAJOR(vers); 895 major = G_TP_VERSION_MAJOR(vers);
872 minor = G_TP_VERSION_MINOR(vers); 896 minor = G_TP_VERSION_MINOR(vers);
@@ -874,6 +898,16 @@ int t3_check_tpsram_version(struct adapter *adapter)
874 if (major == TP_VERSION_MAJOR && minor == TP_VERSION_MINOR) 898 if (major == TP_VERSION_MAJOR && minor == TP_VERSION_MINOR)
875 return 0; 899 return 0;
876 900
901 if (major != TP_VERSION_MAJOR)
902 CH_ERR(adapter, "found wrong TP version (%u.%u), "
903 "driver needs version %d.%d\n", major, minor,
904 TP_VERSION_MAJOR, TP_VERSION_MINOR);
905 else {
906 *must_load = 0;
907 CH_ERR(adapter, "found wrong TP version (%u.%u), "
908 "driver compiled for version %d.%d\n", major, minor,
909 TP_VERSION_MAJOR, TP_VERSION_MINOR);
910 }
877 return -EINVAL; 911 return -EINVAL;
878} 912}
879 913
diff --git a/drivers/net/cxgb3/t3cdev.h b/drivers/net/cxgb3/t3cdev.h
index fa4099bc04..77fcc1a498 100644
--- a/drivers/net/cxgb3/t3cdev.h
+++ b/drivers/net/cxgb3/t3cdev.h
@@ -42,9 +42,6 @@
42 42
43#define T3CNAMSIZ 16 43#define T3CNAMSIZ 16
44 44
45/* Get the t3cdev associated with a net_device */
46#define T3CDEV(netdev) (struct t3cdev *)(netdev->priv)
47
48struct cxgb3_client; 45struct cxgb3_client;
49 46
50enum t3ctype { 47enum t3ctype {
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index c3de81bf09..738aa59065 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -700,6 +700,7 @@ dm9000_init_dm9000(struct net_device *dev)
700static int 700static int
701dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev) 701dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev)
702{ 702{
703 unsigned long flags;
703 board_info_t *db = (board_info_t *) dev->priv; 704 board_info_t *db = (board_info_t *) dev->priv;
704 705
705 PRINTK3("dm9000_start_xmit\n"); 706 PRINTK3("dm9000_start_xmit\n");
@@ -707,10 +708,7 @@ dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev)
707 if (db->tx_pkt_cnt > 1) 708 if (db->tx_pkt_cnt > 1)
708 return 1; 709 return 1;
709 710
710 netif_stop_queue(dev); 711 spin_lock_irqsave(&db->lock, flags);
711
712 /* Disable all interrupts */
713 iow(db, DM9000_IMR, IMR_PAR);
714 712
715 /* Move data to DM9000 TX RAM */ 713 /* Move data to DM9000 TX RAM */
716 writeb(DM9000_MWCMD, db->io_addr); 714 writeb(DM9000_MWCMD, db->io_addr);
@@ -718,12 +716,9 @@ dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev)
718 (db->outblk)(db->io_data, skb->data, skb->len); 716 (db->outblk)(db->io_data, skb->data, skb->len);
719 db->stats.tx_bytes += skb->len; 717 db->stats.tx_bytes += skb->len;
720 718
719 db->tx_pkt_cnt++;
721 /* TX control: First packet immediately send, second packet queue */ 720 /* TX control: First packet immediately send, second packet queue */
722 if (db->tx_pkt_cnt == 0) { 721 if (db->tx_pkt_cnt == 1) {
723
724 /* First Packet */
725 db->tx_pkt_cnt++;
726
727 /* Set TX length to DM9000 */ 722 /* Set TX length to DM9000 */
728 iow(db, DM9000_TXPLL, skb->len & 0xff); 723 iow(db, DM9000_TXPLL, skb->len & 0xff);
729 iow(db, DM9000_TXPLH, (skb->len >> 8) & 0xff); 724 iow(db, DM9000_TXPLH, (skb->len >> 8) & 0xff);
@@ -732,23 +727,17 @@ dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev)
732 iow(db, DM9000_TCR, TCR_TXREQ); /* Cleared after TX complete */ 727 iow(db, DM9000_TCR, TCR_TXREQ); /* Cleared after TX complete */
733 728
734 dev->trans_start = jiffies; /* save the time stamp */ 729 dev->trans_start = jiffies; /* save the time stamp */
735
736 } else { 730 } else {
737 /* Second packet */ 731 /* Second packet */
738 db->tx_pkt_cnt++;
739 db->queue_pkt_len = skb->len; 732 db->queue_pkt_len = skb->len;
733 netif_stop_queue(dev);
740 } 734 }
741 735
736 spin_unlock_irqrestore(&db->lock, flags);
737
742 /* free this SKB */ 738 /* free this SKB */
743 dev_kfree_skb(skb); 739 dev_kfree_skb(skb);
744 740
745 /* Re-enable resource check */
746 if (db->tx_pkt_cnt == 1)
747 netif_wake_queue(dev);
748
749 /* Re-enable interrupt */
750 iow(db, DM9000_IMR, IMR_PAR | IMR_PTM | IMR_PRM);
751
752 return 0; 741 return 0;
753} 742}
754 743
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 4c3785c9d4..9ecc3adcf6 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -1726,6 +1726,7 @@ static int e1000_wol_exclusion(struct e1000_adapter *adapter, struct ethtool_wol
1726 case E1000_DEV_ID_82571EB_QUAD_COPPER: 1726 case E1000_DEV_ID_82571EB_QUAD_COPPER:
1727 case E1000_DEV_ID_82571EB_QUAD_FIBER: 1727 case E1000_DEV_ID_82571EB_QUAD_FIBER:
1728 case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: 1728 case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
1729 case E1000_DEV_ID_82571PT_QUAD_COPPER:
1729 case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: 1730 case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
1730 /* quad port adapters only support WoL on port A */ 1731 /* quad port adapters only support WoL on port A */
1731 if (!adapter->quad_port_a) { 1732 if (!adapter->quad_port_a) {
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index ba120f7fb0..8604adbe35 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -387,6 +387,7 @@ e1000_set_mac_type(struct e1000_hw *hw)
387 case E1000_DEV_ID_82571EB_SERDES_DUAL: 387 case E1000_DEV_ID_82571EB_SERDES_DUAL:
388 case E1000_DEV_ID_82571EB_SERDES_QUAD: 388 case E1000_DEV_ID_82571EB_SERDES_QUAD:
389 case E1000_DEV_ID_82571EB_QUAD_COPPER: 389 case E1000_DEV_ID_82571EB_QUAD_COPPER:
390 case E1000_DEV_ID_82571PT_QUAD_COPPER:
390 case E1000_DEV_ID_82571EB_QUAD_FIBER: 391 case E1000_DEV_ID_82571EB_QUAD_FIBER:
391 case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: 392 case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
392 hw->mac_type = e1000_82571; 393 hw->mac_type = e1000_82571;
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index fe8714655c..07f0ea7367 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -475,6 +475,7 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
475#define E1000_DEV_ID_82571EB_FIBER 0x105F 475#define E1000_DEV_ID_82571EB_FIBER 0x105F
476#define E1000_DEV_ID_82571EB_SERDES 0x1060 476#define E1000_DEV_ID_82571EB_SERDES 0x1060
477#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4 477#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4
478#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5
478#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5 479#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5
479#define E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE 0x10BC 480#define E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE 0x10BC
480#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9 481#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 4a225950fb..e7c8951f47 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -108,6 +108,7 @@ static struct pci_device_id e1000_pci_tbl[] = {
108 INTEL_E1000_ETHERNET_DEVICE(0x10BC), 108 INTEL_E1000_ETHERNET_DEVICE(0x10BC),
109 INTEL_E1000_ETHERNET_DEVICE(0x10C4), 109 INTEL_E1000_ETHERNET_DEVICE(0x10C4),
110 INTEL_E1000_ETHERNET_DEVICE(0x10C5), 110 INTEL_E1000_ETHERNET_DEVICE(0x10C5),
111 INTEL_E1000_ETHERNET_DEVICE(0x10D5),
111 INTEL_E1000_ETHERNET_DEVICE(0x10D9), 112 INTEL_E1000_ETHERNET_DEVICE(0x10D9),
112 INTEL_E1000_ETHERNET_DEVICE(0x10DA), 113 INTEL_E1000_ETHERNET_DEVICE(0x10DA),
113 /* required last entry */ 114 /* required last entry */
@@ -1101,6 +1102,7 @@ e1000_probe(struct pci_dev *pdev,
1101 case E1000_DEV_ID_82571EB_QUAD_COPPER: 1102 case E1000_DEV_ID_82571EB_QUAD_COPPER:
1102 case E1000_DEV_ID_82571EB_QUAD_FIBER: 1103 case E1000_DEV_ID_82571EB_QUAD_FIBER:
1103 case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: 1104 case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
1105 case E1000_DEV_ID_82571PT_QUAD_COPPER:
1104 /* if quad port adapter, disable WoL on all but port A */ 1106 /* if quad port adapter, disable WoL on all but port A */
1105 if (global_quad_port_a != 0) 1107 if (global_quad_port_a != 0)
1106 adapter->eeprom_wol = 0; 1108 adapter->eeprom_wol = 0;
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index d67f97bfa3..8d58be56f4 100644
--- a/drivers/net/ehea/ehea.h
+++ b/drivers/net/ehea/ehea.h
@@ -39,7 +39,7 @@
39#include <asm/io.h> 39#include <asm/io.h>
40 40
41#define DRV_NAME "ehea" 41#define DRV_NAME "ehea"
42#define DRV_VERSION "EHEA_0073" 42#define DRV_VERSION "EHEA_0074"
43 43
44/* eHEA capability flags */ 44/* eHEA capability flags */
45#define DLPAR_PORT_ADD_REM 1 45#define DLPAR_PORT_ADD_REM 1
@@ -402,6 +402,8 @@ struct ehea_mc_list {
402 402
403#define EHEA_PORT_UP 1 403#define EHEA_PORT_UP 1
404#define EHEA_PORT_DOWN 0 404#define EHEA_PORT_DOWN 0
405#define EHEA_PHY_LINK_UP 1
406#define EHEA_PHY_LINK_DOWN 0
405#define EHEA_MAX_PORT_RES 16 407#define EHEA_MAX_PORT_RES 16
406struct ehea_port { 408struct ehea_port {
407 struct ehea_adapter *adapter; /* adapter that owns this port */ 409 struct ehea_adapter *adapter; /* adapter that owns this port */
@@ -427,6 +429,7 @@ struct ehea_port {
427 u32 msg_enable; 429 u32 msg_enable;
428 u32 sig_comp_iv; 430 u32 sig_comp_iv;
429 u32 state; 431 u32 state;
432 u8 phy_link;
430 u8 full_duplex; 433 u8 full_duplex;
431 u8 autoneg; 434 u8 autoneg;
432 u8 num_def_qps; 435 u8 num_def_qps;
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 9756211e83..717b12984d 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -53,17 +53,21 @@ static int rq3_entries = EHEA_DEF_ENTRIES_RQ3;
53static int sq_entries = EHEA_DEF_ENTRIES_SQ; 53static int sq_entries = EHEA_DEF_ENTRIES_SQ;
54static int use_mcs = 0; 54static int use_mcs = 0;
55static int num_tx_qps = EHEA_NUM_TX_QP; 55static int num_tx_qps = EHEA_NUM_TX_QP;
56static int prop_carrier_state = 0;
56 57
57module_param(msg_level, int, 0); 58module_param(msg_level, int, 0);
58module_param(rq1_entries, int, 0); 59module_param(rq1_entries, int, 0);
59module_param(rq2_entries, int, 0); 60module_param(rq2_entries, int, 0);
60module_param(rq3_entries, int, 0); 61module_param(rq3_entries, int, 0);
61module_param(sq_entries, int, 0); 62module_param(sq_entries, int, 0);
63module_param(prop_carrier_state, int, 0);
62module_param(use_mcs, int, 0); 64module_param(use_mcs, int, 0);
63module_param(num_tx_qps, int, 0); 65module_param(num_tx_qps, int, 0);
64 66
65MODULE_PARM_DESC(num_tx_qps, "Number of TX-QPS"); 67MODULE_PARM_DESC(num_tx_qps, "Number of TX-QPS");
66MODULE_PARM_DESC(msg_level, "msg_level"); 68MODULE_PARM_DESC(msg_level, "msg_level");
69MODULE_PARM_DESC(prop_carrier_state, "Propagate carrier state of physical "
70 "port to stack. 1:yes, 0:no. Default = 0 ");
67MODULE_PARM_DESC(rq3_entries, "Number of entries for Receive Queue 3 " 71MODULE_PARM_DESC(rq3_entries, "Number of entries for Receive Queue 3 "
68 "[2^x - 1], x = [6..14]. Default = " 72 "[2^x - 1], x = [6..14]. Default = "
69 __MODULE_STRING(EHEA_DEF_ENTRIES_RQ3) ")"); 73 __MODULE_STRING(EHEA_DEF_ENTRIES_RQ3) ")");
@@ -76,7 +80,7 @@ MODULE_PARM_DESC(rq1_entries, "Number of entries for Receive Queue 1 "
76MODULE_PARM_DESC(sq_entries, " Number of entries for the Send Queue " 80MODULE_PARM_DESC(sq_entries, " Number of entries for the Send Queue "
77 "[2^x - 1], x = [6..14]. Default = " 81 "[2^x - 1], x = [6..14]. Default = "
78 __MODULE_STRING(EHEA_DEF_ENTRIES_SQ) ")"); 82 __MODULE_STRING(EHEA_DEF_ENTRIES_SQ) ")");
79MODULE_PARM_DESC(use_mcs, " 0:NAPI, 1:Multiple receive queues, Default = 1 "); 83MODULE_PARM_DESC(use_mcs, " 0:NAPI, 1:Multiple receive queues, Default = 0 ");
80 84
81static int port_name_cnt = 0; 85static int port_name_cnt = 0;
82static LIST_HEAD(adapter_list); 86static LIST_HEAD(adapter_list);
@@ -467,7 +471,7 @@ static struct ehea_cqe *ehea_proc_rwqes(struct net_device *dev,
467 else 471 else
468 netif_receive_skb(skb); 472 netif_receive_skb(skb);
469 473
470 dev->last_rx = jiffies; 474 port->netdev->last_rx = jiffies;
471 } else { 475 } else {
472 pr->p_stats.poll_receive_errors++; 476 pr->p_stats.poll_receive_errors++;
473 port_reset = ehea_treat_poll_error(pr, rq, cqe, 477 port_reset = ehea_treat_poll_error(pr, rq, cqe,
@@ -814,7 +818,9 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed)
814 ehea_error("Failed setting port speed"); 818 ehea_error("Failed setting port speed");
815 } 819 }
816 } 820 }
817 netif_carrier_on(port->netdev); 821 if (!prop_carrier_state || (port->phy_link == EHEA_PHY_LINK_UP))
822 netif_carrier_on(port->netdev);
823
818 kfree(cb4); 824 kfree(cb4);
819out: 825out:
820 return ret; 826 return ret;
@@ -869,13 +875,19 @@ static void ehea_parse_eqe(struct ehea_adapter *adapter, u64 eqe)
869 } 875 }
870 876
871 if (EHEA_BMASK_GET(NEQE_EXTSWITCH_PORT_UP, eqe)) { 877 if (EHEA_BMASK_GET(NEQE_EXTSWITCH_PORT_UP, eqe)) {
878 port->phy_link = EHEA_PHY_LINK_UP;
872 if (netif_msg_link(port)) 879 if (netif_msg_link(port))
873 ehea_info("%s: Physical port up", 880 ehea_info("%s: Physical port up",
874 port->netdev->name); 881 port->netdev->name);
882 if (prop_carrier_state)
883 netif_carrier_on(port->netdev);
875 } else { 884 } else {
885 port->phy_link = EHEA_PHY_LINK_DOWN;
876 if (netif_msg_link(port)) 886 if (netif_msg_link(port))
877 ehea_info("%s: Physical port down", 887 ehea_info("%s: Physical port down",
878 port->netdev->name); 888 port->netdev->name);
889 if (prop_carrier_state)
890 netif_carrier_off(port->netdev);
879 } 891 }
880 892
881 if (EHEA_BMASK_GET(NEQE_EXTSWITCH_PRIMARY, eqe)) 893 if (EHEA_BMASK_GET(NEQE_EXTSWITCH_PRIMARY, eqe))
@@ -2490,7 +2502,7 @@ static ssize_t ehea_show_port_id(struct device *dev,
2490 struct device_attribute *attr, char *buf) 2502 struct device_attribute *attr, char *buf)
2491{ 2503{
2492 struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev); 2504 struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev);
2493 return sprintf(buf, "0x%X", port->logical_port_id); 2505 return sprintf(buf, "%d", port->logical_port_id);
2494} 2506}
2495 2507
2496static DEVICE_ATTR(log_port_id, S_IRUSR | S_IRGRP | S_IROTH, ehea_show_port_id, 2508static DEVICE_ATTR(log_port_id, S_IRUSR | S_IRGRP | S_IROTH, ehea_show_port_id,
@@ -2781,7 +2793,7 @@ static ssize_t ehea_probe_port(struct device *dev,
2781 2793
2782 u32 logical_port_id; 2794 u32 logical_port_id;
2783 2795
2784 sscanf(buf, "%X", &logical_port_id); 2796 sscanf(buf, "%d", &logical_port_id);
2785 2797
2786 port = ehea_get_port(adapter, logical_port_id); 2798 port = ehea_get_port(adapter, logical_port_id);
2787 2799
@@ -2834,7 +2846,7 @@ static ssize_t ehea_remove_port(struct device *dev,
2834 int i; 2846 int i;
2835 u32 logical_port_id; 2847 u32 logical_port_id;
2836 2848
2837 sscanf(buf, "%X", &logical_port_id); 2849 sscanf(buf, "%d", &logical_port_id);
2838 2850
2839 port = ehea_get_port(adapter, logical_port_id); 2851 port = ehea_get_port(adapter, logical_port_id);
2840 2852
diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c
index a36fa6c23f..c82e245960 100644
--- a/drivers/net/ehea/ehea_qmr.c
+++ b/drivers/net/ehea/ehea_qmr.c
@@ -235,6 +235,8 @@ int ehea_destroy_cq(struct ehea_cq *cq)
235 if (!cq) 235 if (!cq)
236 return 0; 236 return 0;
237 237
238 hcp_epas_dtor(&cq->epas);
239
238 if ((hret = ehea_destroy_cq_res(cq, NORMAL_FREE)) == H_R_STATE) { 240 if ((hret = ehea_destroy_cq_res(cq, NORMAL_FREE)) == H_R_STATE) {
239 ehea_error_data(cq->adapter, cq->fw_handle); 241 ehea_error_data(cq->adapter, cq->fw_handle);
240 hret = ehea_destroy_cq_res(cq, FORCE_FREE); 242 hret = ehea_destroy_cq_res(cq, FORCE_FREE);
@@ -361,6 +363,8 @@ int ehea_destroy_eq(struct ehea_eq *eq)
361 if (!eq) 363 if (!eq)
362 return 0; 364 return 0;
363 365
366 hcp_epas_dtor(&eq->epas);
367
364 if ((hret = ehea_destroy_eq_res(eq, NORMAL_FREE)) == H_R_STATE) { 368 if ((hret = ehea_destroy_eq_res(eq, NORMAL_FREE)) == H_R_STATE) {
365 ehea_error_data(eq->adapter, eq->fw_handle); 369 ehea_error_data(eq->adapter, eq->fw_handle);
366 hret = ehea_destroy_eq_res(eq, FORCE_FREE); 370 hret = ehea_destroy_eq_res(eq, FORCE_FREE);
@@ -541,6 +545,8 @@ int ehea_destroy_qp(struct ehea_qp *qp)
541 if (!qp) 545 if (!qp)
542 return 0; 546 return 0;
543 547
548 hcp_epas_dtor(&qp->epas);
549
544 if ((hret = ehea_destroy_qp_res(qp, NORMAL_FREE)) == H_R_STATE) { 550 if ((hret = ehea_destroy_qp_res(qp, NORMAL_FREE)) == H_R_STATE) {
545 ehea_error_data(qp->adapter, qp->fw_handle); 551 ehea_error_data(qp->adapter, qp->fw_handle);
546 hret = ehea_destroy_qp_res(qp, FORCE_FREE); 552 hret = ehea_destroy_qp_res(qp, FORCE_FREE);
diff --git a/drivers/net/eql.c b/drivers/net/eql.c
index a93700e566..102218c4a9 100644
--- a/drivers/net/eql.c
+++ b/drivers/net/eql.c
@@ -391,7 +391,7 @@ static int __eql_insert_slave(slave_queue_t *queue, slave_t *slave)
391 slave_t *duplicate_slave = NULL; 391 slave_t *duplicate_slave = NULL;
392 392
393 duplicate_slave = __eql_find_slave_dev(queue, slave->dev); 393 duplicate_slave = __eql_find_slave_dev(queue, slave->dev);
394 if (duplicate_slave != 0) 394 if (duplicate_slave)
395 eql_kill_one_slave(queue, duplicate_slave); 395 eql_kill_one_slave(queue, duplicate_slave);
396 396
397 list_add(&slave->list, &queue->all_slaves); 397 list_add(&slave->list, &queue->all_slaves);
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 10f4e3b551..1938d6dfc8 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -552,7 +552,7 @@ union ring_type {
552#define PHY_OUI_MARVELL 0x5043 552#define PHY_OUI_MARVELL 0x5043
553#define PHY_OUI_CICADA 0x03f1 553#define PHY_OUI_CICADA 0x03f1
554#define PHY_OUI_VITESSE 0x01c1 554#define PHY_OUI_VITESSE 0x01c1
555#define PHY_OUI_REALTEK 0x01c1 555#define PHY_OUI_REALTEK 0x0732
556#define PHYID1_OUI_MASK 0x03ff 556#define PHYID1_OUI_MASK 0x03ff
557#define PHYID1_OUI_SHFT 6 557#define PHYID1_OUI_SHFT 6
558#define PHYID2_OUI_MASK 0xfc00 558#define PHYID2_OUI_MASK 0xfc00
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index 3ca1e8ece5..0834ef0edd 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -48,6 +48,7 @@
48#ifdef CONFIG_SERIAL_8250 48#ifdef CONFIG_SERIAL_8250
49#include <linux/serial_core.h> 49#include <linux/serial_core.h>
50#include <linux/serial_8250.h> 50#include <linux/serial_8250.h>
51#include <linux/serial_reg.h>
51#endif 52#endif
52 53
53#include <linux/netdevice.h> 54#include <linux/netdevice.h>
@@ -1151,13 +1152,41 @@ static int ioc3_is_menet(struct pci_dev *pdev)
1151 * Also look in ip27-pci.c:pci_fixup_ioc3() for some comments on working 1152 * Also look in ip27-pci.c:pci_fixup_ioc3() for some comments on working
1152 * around ioc3 oddities in this respect. 1153 * around ioc3 oddities in this respect.
1153 * 1154 *
1154 * The IOC3 serials use a 22MHz clock rate with an additional divider by 3. 1155 * The IOC3 serials use a 22MHz clock rate with an additional divider which
1156 * can be programmed in the SCR register if the DLAB bit is set.
1157 *
1158 * Register to interrupt zero because we share the interrupt with
1159 * the serial driver which we don't properly support yet.
1160 *
1161 * Can't use UPF_IOREMAP as the whole of IOC3 resources have already been
1162 * registered.
1155 */ 1163 */
1164static void __devinit ioc3_8250_register(struct ioc3_uartregs __iomem *uart)
1165{
1166#define COSMISC_CONSTANT 6
1167
1168 struct uart_port port = {
1169 .irq = 0,
1170 .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
1171 .iotype = UPIO_MEM,
1172 .regshift = 0,
1173 .uartclk = (22000000 << 1) / COSMISC_CONSTANT,
1174
1175 .membase = (unsigned char __iomem *) uart,
1176 .mapbase = (unsigned long) uart,
1177 };
1178 unsigned char lcr;
1179
1180 lcr = uart->iu_lcr;
1181 uart->iu_lcr = lcr | UART_LCR_DLAB;
1182 uart->iu_scr = COSMISC_CONSTANT,
1183 uart->iu_lcr = lcr;
1184 uart->iu_lcr;
1185 serial8250_register_port(&port);
1186}
1156 1187
1157static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3 *ioc3) 1188static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3 *ioc3)
1158{ 1189{
1159 struct uart_port port;
1160
1161 /* 1190 /*
1162 * We need to recognice and treat the fourth MENET serial as it 1191 * We need to recognice and treat the fourth MENET serial as it
1163 * does not have an SuperIO chip attached to it, therefore attempting 1192 * does not have an SuperIO chip attached to it, therefore attempting
@@ -1171,24 +1200,35 @@ static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3 *ioc3)
1171 return; 1200 return;
1172 1201
1173 /* 1202 /*
1174 * Register to interrupt zero because we share the interrupt with 1203 * Switch IOC3 to PIO mode. It probably already was but let's be
1175 * the serial driver which we don't properly support yet. 1204 * paranoid
1176 *
1177 * Can't use UPF_IOREMAP as the whole of IOC3 resources have already
1178 * been registered.
1179 */ 1205 */
1180 memset(&port, 0, sizeof(port)); 1206 ioc3->gpcr_s = GPCR_UARTA_MODESEL | GPCR_UARTB_MODESEL;
1181 port.irq = 0; 1207 ioc3->gpcr_s;
1182 port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF; 1208 ioc3->gppr_6 = 0;
1183 port.iotype = UPIO_MEM; 1209 ioc3->gppr_6;
1184 port.regshift = 0; 1210 ioc3->gppr_7 = 0;
1185 port.uartclk = 22000000 / 3; 1211 ioc3->gppr_7;
1186 1212 ioc3->sscr_a = ioc3->sscr_a & ~SSCR_DMA_EN;
1187 port.membase = (unsigned char *) &ioc3->sregs.uarta; 1213 ioc3->sscr_a;
1188 serial8250_register_port(&port); 1214 ioc3->sscr_b = ioc3->sscr_b & ~SSCR_DMA_EN;
1189 1215 ioc3->sscr_b;
1190 port.membase = (unsigned char *) &ioc3->sregs.uartb; 1216 /* Disable all SA/B interrupts except for SA/B_INT in SIO_IEC. */
1191 serial8250_register_port(&port); 1217 ioc3->sio_iec &= ~ (SIO_IR_SA_TX_MT | SIO_IR_SA_RX_FULL |
1218 SIO_IR_SA_RX_HIGH | SIO_IR_SA_RX_TIMER |
1219 SIO_IR_SA_DELTA_DCD | SIO_IR_SA_DELTA_CTS |
1220 SIO_IR_SA_TX_EXPLICIT | SIO_IR_SA_MEMERR);
1221 ioc3->sio_iec |= SIO_IR_SA_INT;
1222 ioc3->sscr_a = 0;
1223 ioc3->sio_iec &= ~ (SIO_IR_SB_TX_MT | SIO_IR_SB_RX_FULL |
1224 SIO_IR_SB_RX_HIGH | SIO_IR_SB_RX_TIMER |
1225 SIO_IR_SB_DELTA_DCD | SIO_IR_SB_DELTA_CTS |
1226 SIO_IR_SB_TX_EXPLICIT | SIO_IR_SB_MEMERR);
1227 ioc3->sio_iec |= SIO_IR_SB_INT;
1228 ioc3->sscr_b = 0;
1229
1230 ioc3_8250_register(&ioc3->sregs.uarta);
1231 ioc3_8250_register(&ioc3->sregs.uartb);
1192} 1232}
1193#endif 1233#endif
1194 1234
diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c
index bdd5c979be..4e5101a45c 100644
--- a/drivers/net/irda/kingsun-sir.c
+++ b/drivers/net/irda/kingsun-sir.c
@@ -509,12 +509,12 @@ static int kingsun_probe(struct usb_interface *intf,
509 spin_lock_init(&kingsun->lock); 509 spin_lock_init(&kingsun->lock);
510 510
511 /* Allocate input buffer */ 511 /* Allocate input buffer */
512 kingsun->in_buf = (__u8 *)kmalloc(kingsun->max_rx, GFP_KERNEL); 512 kingsun->in_buf = kmalloc(kingsun->max_rx, GFP_KERNEL);
513 if (!kingsun->in_buf) 513 if (!kingsun->in_buf)
514 goto free_mem; 514 goto free_mem;
515 515
516 /* Allocate output buffer */ 516 /* Allocate output buffer */
517 kingsun->out_buf = (__u8 *)kmalloc(KINGSUN_FIFO_SIZE, GFP_KERNEL); 517 kingsun->out_buf = kmalloc(KINGSUN_FIFO_SIZE, GFP_KERNEL);
518 if (!kingsun->out_buf) 518 if (!kingsun->out_buf)
519 goto free_mem; 519 goto free_mem;
520 520
diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index 92b403bf38..32bed6bc6c 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -405,7 +405,7 @@ static void meth_rx(struct net_device* dev, unsigned long int_status)
405 priv->stats.rx_length_errors++; 405 priv->stats.rx_length_errors++;
406 skb = priv->rx_skbs[priv->rx_write]; 406 skb = priv->rx_skbs[priv->rx_write];
407 } else { 407 } else {
408 skb = alloc_skb(METH_RX_BUFF_SIZE, GFP_ATOMIC | GFP_DMA); 408 skb = alloc_skb(METH_RX_BUFF_SIZE, GFP_ATOMIC);
409 if (!skb) { 409 if (!skb) {
410 /* Ouch! No memory! Drop packet on the floor */ 410 /* Ouch! No memory! Drop packet on the floor */
411 DPRINTK("No mem: dropping packet\n"); 411 DPRINTK("No mem: dropping packet\n");
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 1799eee88d..315335671f 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -534,7 +534,7 @@ static irqreturn_t mv643xx_eth_int_handler(int irq, void *dev_id)
534 } 534 }
535 535
536 /* PHY status changed */ 536 /* PHY status changed */
537 if (eth_int_cause_ext & ETH_INT_CAUSE_PHY) { 537 if (eth_int_cause_ext & (ETH_INT_CAUSE_PHY | ETH_INT_CAUSE_STATE)) {
538 struct ethtool_cmd cmd; 538 struct ethtool_cmd cmd;
539 539
540 if (mii_link_ok(&mp->mii)) { 540 if (mii_link_ok(&mp->mii)) {
@@ -1222,7 +1222,7 @@ static int mv643xx_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
1222 spin_lock_irqsave(&mp->lock, flags); 1222 spin_lock_irqsave(&mp->lock, flags);
1223 1223
1224 eth_tx_submit_descs_for_skb(mp, skb); 1224 eth_tx_submit_descs_for_skb(mp, skb);
1225 stats->tx_bytes = skb->len; 1225 stats->tx_bytes += skb->len;
1226 stats->tx_packets++; 1226 stats->tx_packets++;
1227 dev->trans_start = jiffies; 1227 dev->trans_start = jiffies;
1228 1228
@@ -1357,7 +1357,6 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
1357#endif 1357#endif
1358 1358
1359 dev->watchdog_timeo = 2 * HZ; 1359 dev->watchdog_timeo = 2 * HZ;
1360 dev->tx_queue_len = mp->tx_ring_size;
1361 dev->base_addr = 0; 1360 dev->base_addr = 0;
1362 dev->change_mtu = mv643xx_eth_change_mtu; 1361 dev->change_mtu = mv643xx_eth_change_mtu;
1363 dev->do_ioctl = mv643xx_eth_do_ioctl; 1362 dev->do_ioctl = mv643xx_eth_do_ioctl;
@@ -2768,8 +2767,6 @@ static const struct ethtool_ops mv643xx_ethtool_ops = {
2768 .get_stats_count = mv643xx_get_stats_count, 2767 .get_stats_count = mv643xx_get_stats_count,
2769 .get_ethtool_stats = mv643xx_get_ethtool_stats, 2768 .get_ethtool_stats = mv643xx_get_ethtool_stats,
2770 .get_strings = mv643xx_get_strings, 2769 .get_strings = mv643xx_get_strings,
2771 .get_stats_count = mv643xx_get_stats_count,
2772 .get_ethtool_stats = mv643xx_get_ethtool_stats,
2773 .nway_reset = mv643xx_eth_nway_restart, 2770 .nway_reset = mv643xx_eth_nway_restart,
2774}; 2771};
2775 2772
diff --git a/drivers/net/mv643xx_eth.h b/drivers/net/mv643xx_eth.h
index 82f8c0cbfb..565b96696a 100644
--- a/drivers/net/mv643xx_eth.h
+++ b/drivers/net/mv643xx_eth.h
@@ -64,7 +64,9 @@
64#define ETH_INT_CAUSE_TX_ERROR (ETH_TX_QUEUES_ENABLED << 8) 64#define ETH_INT_CAUSE_TX_ERROR (ETH_TX_QUEUES_ENABLED << 8)
65#define ETH_INT_CAUSE_TX (ETH_INT_CAUSE_TX_DONE | ETH_INT_CAUSE_TX_ERROR) 65#define ETH_INT_CAUSE_TX (ETH_INT_CAUSE_TX_DONE | ETH_INT_CAUSE_TX_ERROR)
66#define ETH_INT_CAUSE_PHY 0x00010000 66#define ETH_INT_CAUSE_PHY 0x00010000
67#define ETH_INT_UNMASK_ALL_EXT (ETH_INT_CAUSE_TX | ETH_INT_CAUSE_PHY) 67#define ETH_INT_CAUSE_STATE 0x00100000
68#define ETH_INT_UNMASK_ALL_EXT (ETH_INT_CAUSE_TX | ETH_INT_CAUSE_PHY | \
69 ETH_INT_CAUSE_STATE)
68 70
69#define ETH_INT_MASK_ALL 0x00000000 71#define ETH_INT_MASK_ALL 0x00000000
70#define ETH_INT_MASK_ALL_EXT 0x00000000 72#define ETH_INT_MASK_ALL_EXT 0x00000000
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index ae9bb7b7fd..556962f961 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -72,7 +72,7 @@
72#include "myri10ge_mcp.h" 72#include "myri10ge_mcp.h"
73#include "myri10ge_mcp_gen_header.h" 73#include "myri10ge_mcp_gen_header.h"
74 74
75#define MYRI10GE_VERSION_STR "1.3.1-1.248" 75#define MYRI10GE_VERSION_STR "1.3.2-1.269"
76 76
77MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); 77MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
78MODULE_AUTHOR("Maintainer: help@myri.com"); 78MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -2514,26 +2514,20 @@ static void myri10ge_firmware_probe(struct myri10ge_priv *mgp)
2514{ 2514{
2515 struct pci_dev *pdev = mgp->pdev; 2515 struct pci_dev *pdev = mgp->pdev;
2516 struct device *dev = &pdev->dev; 2516 struct device *dev = &pdev->dev;
2517 int cap, status; 2517 int status;
2518 u16 val;
2519 2518
2520 mgp->tx.boundary = 4096; 2519 mgp->tx.boundary = 4096;
2521 /* 2520 /*
2522 * Verify the max read request size was set to 4KB 2521 * Verify the max read request size was set to 4KB
2523 * before trying the test with 4KB. 2522 * before trying the test with 4KB.
2524 */ 2523 */
2525 cap = pci_find_capability(pdev, PCI_CAP_ID_EXP); 2524 status = pcie_get_readrq(pdev);
2526 if (cap < 64) { 2525 if (status < 0) {
2527 dev_err(dev, "Bad PCI_CAP_ID_EXP location %d\n", cap);
2528 goto abort;
2529 }
2530 status = pci_read_config_word(pdev, cap + PCI_EXP_DEVCTL, &val);
2531 if (status != 0) {
2532 dev_err(dev, "Couldn't read max read req size: %d\n", status); 2526 dev_err(dev, "Couldn't read max read req size: %d\n", status);
2533 goto abort; 2527 goto abort;
2534 } 2528 }
2535 if ((val & (5 << 12)) != (5 << 12)) { 2529 if (status != 4096) {
2536 dev_warn(dev, "Max Read Request size != 4096 (0x%x)\n", val); 2530 dev_warn(dev, "Max Read Request size != 4096 (%d)\n", status);
2537 mgp->tx.boundary = 2048; 2531 mgp->tx.boundary = 2048;
2538 } 2532 }
2539 /* 2533 /*
@@ -2850,9 +2844,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2850 size_t bytes; 2844 size_t bytes;
2851 int i; 2845 int i;
2852 int status = -ENXIO; 2846 int status = -ENXIO;
2853 int cap;
2854 int dac_enabled; 2847 int dac_enabled;
2855 u16 val;
2856 2848
2857 netdev = alloc_etherdev(sizeof(*mgp)); 2849 netdev = alloc_etherdev(sizeof(*mgp));
2858 if (netdev == NULL) { 2850 if (netdev == NULL) {
@@ -2884,19 +2876,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2884 = pci_find_capability(pdev, PCI_CAP_ID_VNDR); 2876 = pci_find_capability(pdev, PCI_CAP_ID_VNDR);
2885 2877
2886 /* Set our max read request to 4KB */ 2878 /* Set our max read request to 4KB */
2887 cap = pci_find_capability(pdev, PCI_CAP_ID_EXP); 2879 status = pcie_set_readrq(pdev, 4096);
2888 if (cap < 64) {
2889 dev_err(&pdev->dev, "Bad PCI_CAP_ID_EXP location %d\n", cap);
2890 goto abort_with_netdev;
2891 }
2892 status = pci_read_config_word(pdev, cap + PCI_EXP_DEVCTL, &val);
2893 if (status != 0) {
2894 dev_err(&pdev->dev, "Error %d reading PCI_EXP_DEVCTL\n",
2895 status);
2896 goto abort_with_netdev;
2897 }
2898 val = (val & ~PCI_EXP_DEVCTL_READRQ) | (5 << 12);
2899 status = pci_write_config_word(pdev, cap + PCI_EXP_DEVCTL, val);
2900 if (status != 0) { 2880 if (status != 0) {
2901 dev_err(&pdev->dev, "Error %d writing PCI_EXP_DEVCTL\n", 2881 dev_err(&pdev->dev, "Error %d writing PCI_EXP_DEVCTL\n",
2902 status); 2882 status);
@@ -3114,9 +3094,12 @@ static void myri10ge_remove(struct pci_dev *pdev)
3114} 3094}
3115 3095
3116#define PCI_DEVICE_ID_MYRICOM_MYRI10GE_Z8E 0x0008 3096#define PCI_DEVICE_ID_MYRICOM_MYRI10GE_Z8E 0x0008
3097#define PCI_DEVICE_ID_MYRICOM_MYRI10GE_Z8E_9 0x0009
3117 3098
3118static struct pci_device_id myri10ge_pci_tbl[] = { 3099static struct pci_device_id myri10ge_pci_tbl[] = {
3119 {PCI_DEVICE(PCI_VENDOR_ID_MYRICOM, PCI_DEVICE_ID_MYRICOM_MYRI10GE_Z8E)}, 3100 {PCI_DEVICE(PCI_VENDOR_ID_MYRICOM, PCI_DEVICE_ID_MYRICOM_MYRI10GE_Z8E)},
3101 {PCI_DEVICE
3102 (PCI_VENDOR_ID_MYRICOM, PCI_DEVICE_ID_MYRICOM_MYRI10GE_Z8E_9)},
3120 {0}, 3103 {0},
3121}; 3104};
3122 3105
diff --git a/drivers/net/netxen/netxen_nic_hdr.h b/drivers/net/netxen/netxen_nic_hdr.h
index 3276866b17..d72f8f8fcb 100644
--- a/drivers/net/netxen/netxen_nic_hdr.h
+++ b/drivers/net/netxen/netxen_nic_hdr.h
@@ -649,9 +649,11 @@ enum {
649#define PCIX_INT_VECTOR (0x10100) 649#define PCIX_INT_VECTOR (0x10100)
650#define PCIX_INT_MASK (0x10104) 650#define PCIX_INT_MASK (0x10104)
651 651
652#define PCIX_MN_WINDOW (0x10200) 652#define PCIX_MN_WINDOW_F0 (0x10200)
653#define PCIX_MN_WINDOW(_f) (PCIX_MN_WINDOW_F0 + (0x20 * (_f)))
653#define PCIX_MS_WINDOW (0x10204) 654#define PCIX_MS_WINDOW (0x10204)
654#define PCIX_SN_WINDOW (0x10208) 655#define PCIX_SN_WINDOW_F0 (0x10208)
656#define PCIX_SN_WINDOW(_f) (PCIX_SN_WINDOW_F0 + (0x20 * (_f)))
655#define PCIX_CRB_WINDOW (0x10210) 657#define PCIX_CRB_WINDOW (0x10210)
656#define PCIX_CRB_WINDOW_F0 (0x10210) 658#define PCIX_CRB_WINDOW_F0 (0x10210)
657#define PCIX_CRB_WINDOW_F1 (0x10230) 659#define PCIX_CRB_WINDOW_F1 (0x10230)
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index aac15421bd..a7b8d7f232 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -904,11 +904,11 @@ netxen_nic_pci_set_window(struct netxen_adapter *adapter,
904 ddr_mn_window = window; 904 ddr_mn_window = window;
905 writel(window, PCI_OFFSET_SECOND_RANGE(adapter, 905 writel(window, PCI_OFFSET_SECOND_RANGE(adapter,
906 NETXEN_PCIX_PH_REG 906 NETXEN_PCIX_PH_REG
907 (PCIX_MN_WINDOW))); 907 (PCIX_MN_WINDOW(adapter->ahw.pci_func))));
908 /* MUST make sure window is set before we forge on... */ 908 /* MUST make sure window is set before we forge on... */
909 readl(PCI_OFFSET_SECOND_RANGE(adapter, 909 readl(PCI_OFFSET_SECOND_RANGE(adapter,
910 NETXEN_PCIX_PH_REG 910 NETXEN_PCIX_PH_REG
911 (PCIX_MN_WINDOW))); 911 (PCIX_MN_WINDOW(adapter->ahw.pci_func))));
912 } 912 }
913 addr -= (window * NETXEN_WINDOW_ONE); 913 addr -= (window * NETXEN_WINDOW_ONE);
914 addr += NETXEN_PCI_DDR_NET; 914 addr += NETXEN_PCI_DDR_NET;
@@ -929,11 +929,11 @@ netxen_nic_pci_set_window(struct netxen_adapter *adapter,
929 writel((window << 22), 929 writel((window << 22),
930 PCI_OFFSET_SECOND_RANGE(adapter, 930 PCI_OFFSET_SECOND_RANGE(adapter,
931 NETXEN_PCIX_PH_REG 931 NETXEN_PCIX_PH_REG
932 (PCIX_SN_WINDOW))); 932 (PCIX_SN_WINDOW(adapter->ahw.pci_func))));
933 /* MUST make sure window is set before we forge on... */ 933 /* MUST make sure window is set before we forge on... */
934 readl(PCI_OFFSET_SECOND_RANGE(adapter, 934 readl(PCI_OFFSET_SECOND_RANGE(adapter,
935 NETXEN_PCIX_PH_REG 935 NETXEN_PCIX_PH_REG
936 (PCIX_SN_WINDOW))); 936 (PCIX_SN_WINDOW(adapter->ahw.pci_func))));
937 } 937 }
938 addr -= (window * 0x400000); 938 addr -= (window * 0x400000);
939 addr += NETXEN_PCI_QDR_NET; 939 addr += NETXEN_PCI_QDR_NET;
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 08a62acde8..3122d01016 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -639,10 +639,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
639 NETXEN_CRB_NORMALIZE(adapter, 639 NETXEN_CRB_NORMALIZE(adapter,
640 NETXEN_ROMUSB_GLB_PEGTUNE_DONE)); 640 NETXEN_ROMUSB_GLB_PEGTUNE_DONE));
641 /* Handshake with the card before we register the devices. */ 641 /* Handshake with the card before we register the devices. */
642 writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE));
643 netxen_pinit_from_rom(adapter, 0);
644 msleep(1);
645 netxen_load_firmware(adapter);
646 netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE); 642 netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE);
647 } 643 }
648 644
@@ -750,9 +746,6 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)
750 746
751 netxen_nic_disable_int(adapter); 747 netxen_nic_disable_int(adapter);
752 748
753 if (adapter->irq)
754 free_irq(adapter->irq, adapter);
755
756 if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) { 749 if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) {
757 init_firmware_done++; 750 init_firmware_done++;
758 netxen_free_hw_resources(adapter); 751 netxen_free_hw_resources(adapter);
@@ -776,13 +769,8 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)
776 } 769 }
777 } 770 }
778 771
779 if (adapter->flags & NETXEN_NIC_MSI_ENABLED)
780 pci_disable_msi(pdev);
781
782 vfree(adapter->cmd_buf_arr); 772 vfree(adapter->cmd_buf_arr);
783 773
784 pci_disable_device(pdev);
785
786 if (adapter->portnum == 0) { 774 if (adapter->portnum == 0) {
787 if (init_firmware_done) { 775 if (init_firmware_done) {
788 i = 100; 776 i = 100;
@@ -833,12 +821,19 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)
833 } 821 }
834 } 822 }
835 823
824 if (adapter->irq)
825 free_irq(adapter->irq, adapter);
826
827 if (adapter->flags & NETXEN_NIC_MSI_ENABLED)
828 pci_disable_msi(pdev);
829
836 iounmap(adapter->ahw.db_base); 830 iounmap(adapter->ahw.db_base);
837 iounmap(adapter->ahw.pci_base0); 831 iounmap(adapter->ahw.pci_base0);
838 iounmap(adapter->ahw.pci_base1); 832 iounmap(adapter->ahw.pci_base1);
839 iounmap(adapter->ahw.pci_base2); 833 iounmap(adapter->ahw.pci_base2);
840 834
841 pci_release_regions(pdev); 835 pci_release_regions(pdev);
836 pci_disable_device(pdev);
842 pci_set_drvdata(pdev, NULL); 837 pci_set_drvdata(pdev, NULL);
843 838
844 free_netdev(netdev); 839 free_netdev(netdev);
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index e323efd4ed..cb230f44d6 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -409,6 +409,7 @@ int phy_mii_ioctl(struct phy_device *phydev,
409 409
410 return 0; 410 return 0;
411} 411}
412EXPORT_SYMBOL(phy_mii_ioctl);
412 413
413/** 414/**
414 * phy_start_aneg - start auto-negotiation for this PHY device 415 * phy_start_aneg - start auto-negotiation for this PHY device
@@ -755,7 +756,7 @@ out_unlock:
755 */ 756 */
756void phy_start(struct phy_device *phydev) 757void phy_start(struct phy_device *phydev)
757{ 758{
758 spin_lock(&phydev->lock); 759 spin_lock_bh(&phydev->lock);
759 760
760 switch (phydev->state) { 761 switch (phydev->state) {
761 case PHY_STARTING: 762 case PHY_STARTING:
@@ -769,7 +770,7 @@ void phy_start(struct phy_device *phydev)
769 default: 770 default:
770 break; 771 break;
771 } 772 }
772 spin_unlock(&phydev->lock); 773 spin_unlock_bh(&phydev->lock);
773} 774}
774EXPORT_SYMBOL(phy_stop); 775EXPORT_SYMBOL(phy_stop);
775EXPORT_SYMBOL(phy_start); 776EXPORT_SYMBOL(phy_start);
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index a8b74cdab1..49328e0505 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -364,7 +364,7 @@ EXPORT_SYMBOL(genphy_config_advert);
364 */ 364 */
365int genphy_setup_forced(struct phy_device *phydev) 365int genphy_setup_forced(struct phy_device *phydev)
366{ 366{
367 int ctl = BMCR_RESET; 367 int ctl = 0;
368 368
369 phydev->pause = phydev->asym_pause = 0; 369 phydev->pause = phydev->asym_pause = 0;
370 370
@@ -644,7 +644,7 @@ static int phy_probe(struct device *dev)
644 if (!(phydrv->flags & PHY_HAS_INTERRUPT)) 644 if (!(phydrv->flags & PHY_HAS_INTERRUPT))
645 phydev->irq = PHY_POLL; 645 phydev->irq = PHY_POLL;
646 646
647 spin_lock(&phydev->lock); 647 spin_lock_bh(&phydev->lock);
648 648
649 /* Start out supporting everything. Eventually, 649 /* Start out supporting everything. Eventually,
650 * a controller will attach, and may modify one 650 * a controller will attach, and may modify one
@@ -658,7 +658,7 @@ static int phy_probe(struct device *dev)
658 if (phydev->drv->probe) 658 if (phydev->drv->probe)
659 err = phydev->drv->probe(phydev); 659 err = phydev->drv->probe(phydev);
660 660
661 spin_unlock(&phydev->lock); 661 spin_unlock_bh(&phydev->lock);
662 662
663 return err; 663 return err;
664 664
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 9293c82ef2..4b49d0e8c7 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -899,17 +899,9 @@ ppp_start_xmit(struct sk_buff *skb, struct net_device *dev)
899 899
900 /* Put the 2-byte PPP protocol number on the front, 900 /* Put the 2-byte PPP protocol number on the front,
901 making sure there is room for the address and control fields. */ 901 making sure there is room for the address and control fields. */
902 if (skb_headroom(skb) < PPP_HDRLEN) { 902 if (skb_cow_head(skb, PPP_HDRLEN))
903 struct sk_buff *ns; 903 goto outf;
904 904
905 ns = alloc_skb(skb->len + dev->hard_header_len, GFP_ATOMIC);
906 if (ns == 0)
907 goto outf;
908 skb_reserve(ns, dev->hard_header_len);
909 skb_copy_bits(skb, 0, skb_put(ns, skb->len), skb->len);
910 kfree_skb(skb);
911 skb = ns;
912 }
913 pp = skb_push(skb, 2); 905 pp = skb_push(skb, 2);
914 proto = npindex_to_proto[npi]; 906 proto = npindex_to_proto[npi];
915 pp[0] = proto >> 8; 907 pp[0] = proto >> 8;
@@ -1533,7 +1525,7 @@ ppp_input_error(struct ppp_channel *chan, int code)
1533static void 1525static void
1534ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) 1526ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
1535{ 1527{
1536 if (skb->len >= 2) { 1528 if (pskb_may_pull(skb, 2)) {
1537#ifdef CONFIG_PPP_MULTILINK 1529#ifdef CONFIG_PPP_MULTILINK
1538 /* XXX do channel-level decompression here */ 1530 /* XXX do channel-level decompression here */
1539 if (PPP_PROTO(skb) == PPP_MP) 1531 if (PPP_PROTO(skb) == PPP_MP)
@@ -1585,7 +1577,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
1585 if (ppp->vj == 0 || (ppp->flags & SC_REJ_COMP_TCP)) 1577 if (ppp->vj == 0 || (ppp->flags & SC_REJ_COMP_TCP))
1586 goto err; 1578 goto err;
1587 1579
1588 if (skb_tailroom(skb) < 124) { 1580 if (skb_tailroom(skb) < 124 || skb_cloned(skb)) {
1589 /* copy to a new sk_buff with more tailroom */ 1581 /* copy to a new sk_buff with more tailroom */
1590 ns = dev_alloc_skb(skb->len + 128); 1582 ns = dev_alloc_skb(skb->len + 128);
1591 if (ns == 0) { 1583 if (ns == 0) {
@@ -1656,23 +1648,29 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
1656 /* check if the packet passes the pass and active filters */ 1648 /* check if the packet passes the pass and active filters */
1657 /* the filter instructions are constructed assuming 1649 /* the filter instructions are constructed assuming
1658 a four-byte PPP header on each packet */ 1650 a four-byte PPP header on each packet */
1659 *skb_push(skb, 2) = 0; 1651 if (ppp->pass_filter || ppp->active_filter) {
1660 if (ppp->pass_filter 1652 if (skb_cloned(skb) &&
1661 && sk_run_filter(skb, ppp->pass_filter, 1653 pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
1662 ppp->pass_len) == 0) { 1654 goto err;
1663 if (ppp->debug & 1) 1655
1664 printk(KERN_DEBUG "PPP: inbound frame not passed\n"); 1656 *skb_push(skb, 2) = 0;
1665 kfree_skb(skb); 1657 if (ppp->pass_filter
1666 return; 1658 && sk_run_filter(skb, ppp->pass_filter,
1667 } 1659 ppp->pass_len) == 0) {
1668 if (!(ppp->active_filter 1660 if (ppp->debug & 1)
1669 && sk_run_filter(skb, ppp->active_filter, 1661 printk(KERN_DEBUG "PPP: inbound frame "
1670 ppp->active_len) == 0)) 1662 "not passed\n");
1671 ppp->last_recv = jiffies; 1663 kfree_skb(skb);
1672 skb_pull(skb, 2); 1664 return;
1673#else 1665 }
1674 ppp->last_recv = jiffies; 1666 if (!(ppp->active_filter
1667 && sk_run_filter(skb, ppp->active_filter,
1668 ppp->active_len) == 0))
1669 ppp->last_recv = jiffies;
1670 __skb_pull(skb, 2);
1671 } else
1675#endif /* CONFIG_PPP_FILTER */ 1672#endif /* CONFIG_PPP_FILTER */
1673 ppp->last_recv = jiffies;
1676 1674
1677 if ((ppp->dev->flags & IFF_UP) == 0 1675 if ((ppp->dev->flags & IFF_UP) == 0
1678 || ppp->npmode[npi] != NPMODE_PASS) { 1676 || ppp->npmode[npi] != NPMODE_PASS) {
@@ -1770,7 +1768,7 @@ ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
1770 struct channel *ch; 1768 struct channel *ch;
1771 int mphdrlen = (ppp->flags & SC_MP_SHORTSEQ)? MPHDRLEN_SSN: MPHDRLEN; 1769 int mphdrlen = (ppp->flags & SC_MP_SHORTSEQ)? MPHDRLEN_SSN: MPHDRLEN;
1772 1770
1773 if (!pskb_may_pull(skb, mphdrlen) || ppp->mrru == 0) 1771 if (!pskb_may_pull(skb, mphdrlen + 1) || ppp->mrru == 0)
1774 goto err; /* no good, throw it away */ 1772 goto err; /* no good, throw it away */
1775 1773
1776 /* Decode sequence number and begin/end bits */ 1774 /* Decode sequence number and begin/end bits */
diff --git a/drivers/net/ppp_mppe.c b/drivers/net/ppp_mppe.c
index f79cf87a2b..c0b6d19d14 100644
--- a/drivers/net/ppp_mppe.c
+++ b/drivers/net/ppp_mppe.c
@@ -136,7 +136,7 @@ struct ppp_mppe_state {
136 * Key Derivation, from RFC 3078, RFC 3079. 136 * Key Derivation, from RFC 3078, RFC 3079.
137 * Equivalent to Get_Key() for MS-CHAP as described in RFC 3079. 137 * Equivalent to Get_Key() for MS-CHAP as described in RFC 3079.
138 */ 138 */
139static void get_new_key_from_sha(struct ppp_mppe_state * state, unsigned char *InterimKey) 139static void get_new_key_from_sha(struct ppp_mppe_state * state)
140{ 140{
141 struct hash_desc desc; 141 struct hash_desc desc;
142 struct scatterlist sg[4]; 142 struct scatterlist sg[4];
@@ -153,8 +153,6 @@ static void get_new_key_from_sha(struct ppp_mppe_state * state, unsigned char *I
153 desc.flags = 0; 153 desc.flags = 0;
154 154
155 crypto_hash_digest(&desc, sg, nbytes, state->sha1_digest); 155 crypto_hash_digest(&desc, sg, nbytes, state->sha1_digest);
156
157 memcpy(InterimKey, state->sha1_digest, state->keylen);
158} 156}
159 157
160/* 158/*
@@ -163,21 +161,21 @@ static void get_new_key_from_sha(struct ppp_mppe_state * state, unsigned char *I
163 */ 161 */
164static void mppe_rekey(struct ppp_mppe_state * state, int initial_key) 162static void mppe_rekey(struct ppp_mppe_state * state, int initial_key)
165{ 163{
166 unsigned char InterimKey[MPPE_MAX_KEY_LEN];
167 struct scatterlist sg_in[1], sg_out[1]; 164 struct scatterlist sg_in[1], sg_out[1];
168 struct blkcipher_desc desc = { .tfm = state->arc4 }; 165 struct blkcipher_desc desc = { .tfm = state->arc4 };
169 166
170 get_new_key_from_sha(state, InterimKey); 167 get_new_key_from_sha(state);
171 if (!initial_key) { 168 if (!initial_key) {
172 crypto_blkcipher_setkey(state->arc4, InterimKey, state->keylen); 169 crypto_blkcipher_setkey(state->arc4, state->sha1_digest,
173 setup_sg(sg_in, InterimKey, state->keylen); 170 state->keylen);
171 setup_sg(sg_in, state->sha1_digest, state->keylen);
174 setup_sg(sg_out, state->session_key, state->keylen); 172 setup_sg(sg_out, state->session_key, state->keylen);
175 if (crypto_blkcipher_encrypt(&desc, sg_out, sg_in, 173 if (crypto_blkcipher_encrypt(&desc, sg_out, sg_in,
176 state->keylen) != 0) { 174 state->keylen) != 0) {
177 printk(KERN_WARNING "mppe_rekey: cipher_encrypt failed\n"); 175 printk(KERN_WARNING "mppe_rekey: cipher_encrypt failed\n");
178 } 176 }
179 } else { 177 } else {
180 memcpy(state->session_key, InterimKey, state->keylen); 178 memcpy(state->session_key, state->sha1_digest, state->keylen);
181 } 179 }
182 if (state->keylen == 8) { 180 if (state->keylen == 8) {
183 /* See RFC 3078 */ 181 /* See RFC 3078 */
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index 68631a5721..9b30cd600a 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -385,12 +385,12 @@ static int pppoe_rcv(struct sk_buff *skb,
385 struct pppoe_hdr *ph; 385 struct pppoe_hdr *ph;
386 struct pppox_sock *po; 386 struct pppox_sock *po;
387 387
388 if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
389 goto drop;
390
391 if (!(skb = skb_share_check(skb, GFP_ATOMIC))) 388 if (!(skb = skb_share_check(skb, GFP_ATOMIC)))
392 goto out; 389 goto out;
393 390
391 if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
392 goto drop;
393
394 ph = pppoe_hdr(skb); 394 ph = pppoe_hdr(skb);
395 395
396 po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source, dev->ifindex); 396 po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source, dev->ifindex);
@@ -848,71 +848,44 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)
848{ 848{
849 struct pppox_sock *po = pppox_sk(sk); 849 struct pppox_sock *po = pppox_sk(sk);
850 struct net_device *dev = po->pppoe_dev; 850 struct net_device *dev = po->pppoe_dev;
851 struct pppoe_hdr hdr;
852 struct pppoe_hdr *ph; 851 struct pppoe_hdr *ph;
853 int headroom = skb_headroom(skb);
854 int data_len = skb->len; 852 int data_len = skb->len;
855 struct sk_buff *skb2;
856 853
857 if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED)) 854 if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED))
858 goto abort; 855 goto abort;
859 856
860 hdr.ver = 1;
861 hdr.type = 1;
862 hdr.code = 0;
863 hdr.sid = po->num;
864 hdr.length = htons(skb->len);
865
866 if (!dev) 857 if (!dev)
867 goto abort; 858 goto abort;
868 859
869 /* Copy the skb if there is no space for the header. */ 860 /* Copy the data if there is no space for the header or if it's
870 if (headroom < (sizeof(struct pppoe_hdr) + dev->hard_header_len)) { 861 * read-only.
871 skb2 = dev_alloc_skb(32+skb->len + 862 */
872 sizeof(struct pppoe_hdr) + 863 if (skb_cow_head(skb, sizeof(*ph) + dev->hard_header_len))
873 dev->hard_header_len); 864 goto abort;
874
875 if (skb2 == NULL)
876 goto abort;
877
878 skb_reserve(skb2, dev->hard_header_len + sizeof(struct pppoe_hdr));
879 skb_copy_from_linear_data(skb, skb_put(skb2, skb->len),
880 skb->len);
881 } else {
882 /* Make a clone so as to not disturb the original skb,
883 * give dev_queue_xmit something it can free.
884 */
885 skb2 = skb_clone(skb, GFP_ATOMIC);
886
887 if (skb2 == NULL)
888 goto abort;
889 }
890 865
891 ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr)); 866 __skb_push(skb, sizeof(*ph));
892 memcpy(ph, &hdr, sizeof(struct pppoe_hdr)); 867 skb_reset_network_header(skb);
893 skb2->protocol = __constant_htons(ETH_P_PPP_SES);
894 868
895 skb_reset_network_header(skb2); 869 ph = pppoe_hdr(skb);
870 ph->ver = 1;
871 ph->type = 1;
872 ph->code = 0;
873 ph->sid = po->num;
874 ph->length = htons(data_len);
896 875
897 skb2->dev = dev; 876 skb->protocol = __constant_htons(ETH_P_PPP_SES);
877 skb->dev = dev;
898 878
899 dev->hard_header(skb2, dev, ETH_P_PPP_SES, 879 dev->hard_header(skb, dev, ETH_P_PPP_SES,
900 po->pppoe_pa.remote, NULL, data_len); 880 po->pppoe_pa.remote, NULL, data_len);
901 881
902 /* We're transmitting skb2, and assuming that dev_queue_xmit 882 dev_queue_xmit(skb);
903 * will free it. The generic ppp layer however, is expecting
904 * that we give back 'skb' (not 'skb2') in case of failure,
905 * but free it in case of success.
906 */
907
908 if (dev_queue_xmit(skb2) < 0)
909 goto abort;
910 883
911 kfree_skb(skb);
912 return 1; 884 return 1;
913 885
914abort: 886abort:
915 return 0; 887 kfree_skb(skb);
888 return 1;
916} 889}
917 890
918 891
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index 266e8b38fe..abe91cb595 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -491,44 +491,46 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
491 u16 hdrflags; 491 u16 hdrflags;
492 u16 tunnel_id, session_id; 492 u16 tunnel_id, session_id;
493 int length; 493 int length;
494 struct udphdr *uh; 494 int offset;
495 495
496 tunnel = pppol2tp_sock_to_tunnel(sock); 496 tunnel = pppol2tp_sock_to_tunnel(sock);
497 if (tunnel == NULL) 497 if (tunnel == NULL)
498 goto error; 498 goto error;
499 499
500 /* UDP always verifies the packet length. */
501 __skb_pull(skb, sizeof(struct udphdr));
502
500 /* Short packet? */ 503 /* Short packet? */
501 if (skb->len < sizeof(struct udphdr)) { 504 if (!pskb_may_pull(skb, 12)) {
502 PRINTK(tunnel->debug, PPPOL2TP_MSG_DATA, KERN_INFO, 505 PRINTK(tunnel->debug, PPPOL2TP_MSG_DATA, KERN_INFO,
503 "%s: recv short packet (len=%d)\n", tunnel->name, skb->len); 506 "%s: recv short packet (len=%d)\n", tunnel->name, skb->len);
504 goto error; 507 goto error;
505 } 508 }
506 509
507 /* Point to L2TP header */ 510 /* Point to L2TP header */
508 ptr = skb->data + sizeof(struct udphdr); 511 ptr = skb->data;
509 512
510 /* Get L2TP header flags */ 513 /* Get L2TP header flags */
511 hdrflags = ntohs(*(__be16*)ptr); 514 hdrflags = ntohs(*(__be16*)ptr);
512 515
513 /* Trace packet contents, if enabled */ 516 /* Trace packet contents, if enabled */
514 if (tunnel->debug & PPPOL2TP_MSG_DATA) { 517 if (tunnel->debug & PPPOL2TP_MSG_DATA) {
518 length = min(16u, skb->len);
519 if (!pskb_may_pull(skb, length))
520 goto error;
521
515 printk(KERN_DEBUG "%s: recv: ", tunnel->name); 522 printk(KERN_DEBUG "%s: recv: ", tunnel->name);
516 523
517 for (length = 0; length < 16; length++) 524 offset = 0;
518 printk(" %02X", ptr[length]); 525 do {
526 printk(" %02X", ptr[offset]);
527 } while (++offset < length);
528
519 printk("\n"); 529 printk("\n");
520 } 530 }
521 531
522 /* Get length of L2TP packet */ 532 /* Get length of L2TP packet */
523 uh = (struct udphdr *) skb_transport_header(skb); 533 length = skb->len;
524 length = ntohs(uh->len) - sizeof(struct udphdr);
525
526 /* Too short? */
527 if (length < 12) {
528 PRINTK(tunnel->debug, PPPOL2TP_MSG_DATA, KERN_INFO,
529 "%s: recv short L2TP packet (len=%d)\n", tunnel->name, length);
530 goto error;
531 }
532 534
533 /* If type is control packet, it is handled by userspace. */ 535 /* If type is control packet, it is handled by userspace. */
534 if (hdrflags & L2TP_HDRFLAG_T) { 536 if (hdrflags & L2TP_HDRFLAG_T) {
@@ -606,7 +608,6 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
606 "%s: recv data has no seq numbers when required. " 608 "%s: recv data has no seq numbers when required. "
607 "Discarding\n", session->name); 609 "Discarding\n", session->name);
608 session->stats.rx_seq_discards++; 610 session->stats.rx_seq_discards++;
609 session->stats.rx_errors++;
610 goto discard; 611 goto discard;
611 } 612 }
612 613
@@ -625,7 +626,6 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
625 "%s: recv data has no seq numbers when required. " 626 "%s: recv data has no seq numbers when required. "
626 "Discarding\n", session->name); 627 "Discarding\n", session->name);
627 session->stats.rx_seq_discards++; 628 session->stats.rx_seq_discards++;
628 session->stats.rx_errors++;
629 goto discard; 629 goto discard;
630 } 630 }
631 631
@@ -634,10 +634,14 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
634 } 634 }
635 635
636 /* If offset bit set, skip it. */ 636 /* If offset bit set, skip it. */
637 if (hdrflags & L2TP_HDRFLAG_O) 637 if (hdrflags & L2TP_HDRFLAG_O) {
638 ptr += 2 + ntohs(*(__be16 *) ptr); 638 offset = ntohs(*(__be16 *)ptr);
639 skb->transport_header += 2 + offset;
640 if (!pskb_may_pull(skb, skb_transport_offset(skb) + 2))
641 goto discard;
642 }
639 643
640 skb_pull(skb, ptr - skb->data); 644 __skb_pull(skb, skb_transport_offset(skb));
641 645
642 /* Skip PPP header, if present. In testing, Microsoft L2TP clients 646 /* Skip PPP header, if present. In testing, Microsoft L2TP clients
643 * don't send the PPP header (PPP header compression enabled), but 647 * don't send the PPP header (PPP header compression enabled), but
@@ -673,7 +677,6 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
673 */ 677 */
674 if (PPPOL2TP_SKB_CB(skb)->ns != session->nr) { 678 if (PPPOL2TP_SKB_CB(skb)->ns != session->nr) {
675 session->stats.rx_seq_discards++; 679 session->stats.rx_seq_discards++;
676 session->stats.rx_errors++;
677 PRINTK(session->debug, PPPOL2TP_MSG_SEQ, KERN_DEBUG, 680 PRINTK(session->debug, PPPOL2TP_MSG_SEQ, KERN_DEBUG,
678 "%s: oos pkt %hu len %d discarded, " 681 "%s: oos pkt %hu len %d discarded, "
679 "waiting for %hu, reorder_q_len=%d\n", 682 "waiting for %hu, reorder_q_len=%d\n",
@@ -698,6 +701,7 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
698 return 0; 701 return 0;
699 702
700discard: 703discard:
704 session->stats.rx_errors++;
701 kfree_skb(skb); 705 kfree_skb(skb);
702 sock_put(session->sock); 706 sock_put(session->sock);
703 707
@@ -958,7 +962,6 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
958 int data_len = skb->len; 962 int data_len = skb->len;
959 struct inet_sock *inet; 963 struct inet_sock *inet;
960 __wsum csum = 0; 964 __wsum csum = 0;
961 struct sk_buff *skb2 = NULL;
962 struct udphdr *uh; 965 struct udphdr *uh;
963 unsigned int len; 966 unsigned int len;
964 967
@@ -989,41 +992,30 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
989 */ 992 */
990 headroom = NET_SKB_PAD + sizeof(struct iphdr) + 993 headroom = NET_SKB_PAD + sizeof(struct iphdr) +
991 sizeof(struct udphdr) + hdr_len + sizeof(ppph); 994 sizeof(struct udphdr) + hdr_len + sizeof(ppph);
992 if (skb_headroom(skb) < headroom) { 995 if (skb_cow_head(skb, headroom))
993 skb2 = skb_realloc_headroom(skb, headroom); 996 goto abort;
994 if (skb2 == NULL)
995 goto abort;
996 } else
997 skb2 = skb;
998
999 /* Check that the socket has room */
1000 if (atomic_read(&sk_tun->sk_wmem_alloc) < sk_tun->sk_sndbuf)
1001 skb_set_owner_w(skb2, sk_tun);
1002 else
1003 goto discard;
1004 997
1005 /* Setup PPP header */ 998 /* Setup PPP header */
1006 skb_push(skb2, sizeof(ppph)); 999 __skb_push(skb, sizeof(ppph));
1007 skb2->data[0] = ppph[0]; 1000 skb->data[0] = ppph[0];
1008 skb2->data[1] = ppph[1]; 1001 skb->data[1] = ppph[1];
1009 1002
1010 /* Setup L2TP header */ 1003 /* Setup L2TP header */
1011 skb_push(skb2, hdr_len); 1004 pppol2tp_build_l2tp_header(session, __skb_push(skb, hdr_len));
1012 pppol2tp_build_l2tp_header(session, skb2->data);
1013 1005
1014 /* Setup UDP header */ 1006 /* Setup UDP header */
1015 inet = inet_sk(sk_tun); 1007 inet = inet_sk(sk_tun);
1016 skb_push(skb2, sizeof(struct udphdr)); 1008 __skb_push(skb, sizeof(*uh));
1017 skb_reset_transport_header(skb2); 1009 skb_reset_transport_header(skb);
1018 uh = (struct udphdr *) skb2->data; 1010 uh = udp_hdr(skb);
1019 uh->source = inet->sport; 1011 uh->source = inet->sport;
1020 uh->dest = inet->dport; 1012 uh->dest = inet->dport;
1021 uh->len = htons(sizeof(struct udphdr) + hdr_len + sizeof(ppph) + data_len); 1013 uh->len = htons(sizeof(struct udphdr) + hdr_len + sizeof(ppph) + data_len);
1022 uh->check = 0; 1014 uh->check = 0;
1023 1015
1024 /* Calculate UDP checksum if configured to do so */ 1016 /* *BROKEN* Calculate UDP checksum if configured to do so */
1025 if (sk_tun->sk_no_check != UDP_CSUM_NOXMIT) 1017 if (sk_tun->sk_no_check != UDP_CSUM_NOXMIT)
1026 csum = udp_csum_outgoing(sk_tun, skb2); 1018 csum = udp_csum_outgoing(sk_tun, skb);
1027 1019
1028 /* Debug */ 1020 /* Debug */
1029 if (session->send_seq) 1021 if (session->send_seq)
@@ -1036,7 +1028,7 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
1036 1028
1037 if (session->debug & PPPOL2TP_MSG_DATA) { 1029 if (session->debug & PPPOL2TP_MSG_DATA) {
1038 int i; 1030 int i;
1039 unsigned char *datap = skb2->data; 1031 unsigned char *datap = skb->data;
1040 1032
1041 printk(KERN_DEBUG "%s: xmit:", session->name); 1033 printk(KERN_DEBUG "%s: xmit:", session->name);
1042 for (i = 0; i < data_len; i++) { 1034 for (i = 0; i < data_len; i++) {
@@ -1049,18 +1041,18 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
1049 printk("\n"); 1041 printk("\n");
1050 } 1042 }
1051 1043
1052 memset(&(IPCB(skb2)->opt), 0, sizeof(IPCB(skb2)->opt)); 1044 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
1053 IPCB(skb2)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED | 1045 IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED |
1054 IPSKB_REROUTED); 1046 IPSKB_REROUTED);
1055 nf_reset(skb2); 1047 nf_reset(skb);
1056 1048
1057 /* Get routing info from the tunnel socket */ 1049 /* Get routing info from the tunnel socket */
1058 dst_release(skb2->dst); 1050 dst_release(skb->dst);
1059 skb2->dst = sk_dst_get(sk_tun); 1051 skb->dst = sk_dst_get(sk_tun);
1060 1052
1061 /* Queue the packet to IP for output */ 1053 /* Queue the packet to IP for output */
1062 len = skb2->len; 1054 len = skb->len;
1063 rc = ip_queue_xmit(skb2, 1); 1055 rc = ip_queue_xmit(skb, 1);
1064 1056
1065 /* Update stats */ 1057 /* Update stats */
1066 if (rc >= 0) { 1058 if (rc >= 0) {
@@ -1073,17 +1065,12 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
1073 session->stats.tx_errors++; 1065 session->stats.tx_errors++;
1074 } 1066 }
1075 1067
1076 /* Free the original skb */
1077 kfree_skb(skb);
1078
1079 return 1; 1068 return 1;
1080 1069
1081discard:
1082 /* Free the new skb. Caller will free original skb. */
1083 if (skb2 != skb)
1084 kfree_skb(skb2);
1085abort: 1070abort:
1086 return 0; 1071 /* Free the original skb */
1072 kfree_skb(skb);
1073 return 1;
1087} 1074}
1088 1075
1089/***************************************************************************** 1076/*****************************************************************************
@@ -1326,12 +1313,14 @@ static struct sock *pppol2tp_prepare_tunnel_socket(int fd, u16 tunnel_id,
1326 goto err; 1313 goto err;
1327 } 1314 }
1328 1315
1316 sk = sock->sk;
1317
1329 /* Quick sanity checks */ 1318 /* Quick sanity checks */
1330 err = -ESOCKTNOSUPPORT; 1319 err = -EPROTONOSUPPORT;
1331 if (sock->type != SOCK_DGRAM) { 1320 if (sk->sk_protocol != IPPROTO_UDP) {
1332 PRINTK(-1, PPPOL2TP_MSG_CONTROL, KERN_ERR, 1321 PRINTK(-1, PPPOL2TP_MSG_CONTROL, KERN_ERR,
1333 "tunl %hu: fd %d wrong type, got %d, expected %d\n", 1322 "tunl %hu: fd %d wrong protocol, got %d, expected %d\n",
1334 tunnel_id, fd, sock->type, SOCK_DGRAM); 1323 tunnel_id, fd, sk->sk_protocol, IPPROTO_UDP);
1335 goto err; 1324 goto err;
1336 } 1325 }
1337 err = -EAFNOSUPPORT; 1326 err = -EAFNOSUPPORT;
@@ -1343,7 +1332,6 @@ static struct sock *pppol2tp_prepare_tunnel_socket(int fd, u16 tunnel_id,
1343 } 1332 }
1344 1333
1345 err = -ENOTCONN; 1334 err = -ENOTCONN;
1346 sk = sock->sk;
1347 1335
1348 /* Check if this socket has already been prepped */ 1336 /* Check if this socket has already been prepped */
1349 tunnel = (struct pppol2tp_tunnel *)sk->sk_user_data; 1337 tunnel = (struct pppol2tp_tunnel *)sk->sk_user_data;
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index 13d1c0a2a2..e565039184 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -556,7 +556,6 @@ static int gelic_net_stop(struct net_device *netdev)
556{ 556{
557 struct gelic_net_card *card = netdev_priv(netdev); 557 struct gelic_net_card *card = netdev_priv(netdev);
558 558
559 netif_poll_disable(netdev);
560 netif_stop_queue(netdev); 559 netif_stop_queue(netdev);
561 560
562 /* turn off DMA, force end */ 561 /* turn off DMA, force end */
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 69da95b5ad..ea15131505 100755
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -2248,6 +2248,13 @@ static int ql_tx_rx_clean(struct ql3_adapter *qdev,
2248 qdev->rsp_consumer_index) && (work_done < work_to_do)) { 2248 qdev->rsp_consumer_index) && (work_done < work_to_do)) {
2249 2249
2250 net_rsp = qdev->rsp_current; 2250 net_rsp = qdev->rsp_current;
2251 rmb();
2252 /*
2253 * Fix 4032 chipe undocumented "feature" where bit-8 is set if the
2254 * inbound completion is for a VLAN.
2255 */
2256 if (qdev->device_id == QL3032_DEVICE_ID)
2257 net_rsp->opcode &= 0x7f;
2251 switch (net_rsp->opcode) { 2258 switch (net_rsp->opcode) {
2252 2259
2253 case OPCODE_OB_MAC_IOCB_FN0: 2260 case OPCODE_OB_MAC_IOCB_FN0:
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index b85ab4a8f2..c76dd29c8e 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1228,7 +1228,10 @@ static void rtl8169_hw_phy_config(struct net_device *dev)
1228 return; 1228 return;
1229 } 1229 }
1230 1230
1231 /* phy config for RTL8169s mac_version C chip */ 1231 if ((tp->mac_version != RTL_GIGA_MAC_VER_02) &&
1232 (tp->mac_version != RTL_GIGA_MAC_VER_03))
1233 return;
1234
1232 mdio_write(ioaddr, 31, 0x0001); //w 31 2 0 1 1235 mdio_write(ioaddr, 31, 0x0001); //w 31 2 0 1
1233 mdio_write(ioaddr, 21, 0x1000); //w 21 15 0 1000 1236 mdio_write(ioaddr, 21, 0x1000); //w 21 15 0 1000
1234 mdio_write(ioaddr, 24, 0x65c7); //w 24 15 0 65c7 1237 mdio_write(ioaddr, 24, 0x65c7); //w 24 15 0 65c7
@@ -1915,7 +1918,11 @@ static void rtl_hw_start_8169(struct net_device *dev)
1915 1918
1916 rtl_set_rx_max_size(ioaddr); 1919 rtl_set_rx_max_size(ioaddr);
1917 1920
1918 rtl_set_rx_tx_config_registers(tp); 1921 if ((tp->mac_version == RTL_GIGA_MAC_VER_01) ||
1922 (tp->mac_version == RTL_GIGA_MAC_VER_02) ||
1923 (tp->mac_version == RTL_GIGA_MAC_VER_03) ||
1924 (tp->mac_version == RTL_GIGA_MAC_VER_04))
1925 rtl_set_rx_tx_config_registers(tp);
1919 1926
1920 tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW; 1927 tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW;
1921 1928
@@ -1938,6 +1945,14 @@ static void rtl_hw_start_8169(struct net_device *dev)
1938 1945
1939 rtl_set_rx_tx_desc_registers(tp, ioaddr); 1946 rtl_set_rx_tx_desc_registers(tp, ioaddr);
1940 1947
1948 if ((tp->mac_version != RTL_GIGA_MAC_VER_01) &&
1949 (tp->mac_version != RTL_GIGA_MAC_VER_02) &&
1950 (tp->mac_version != RTL_GIGA_MAC_VER_03) &&
1951 (tp->mac_version != RTL_GIGA_MAC_VER_04)) {
1952 RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
1953 rtl_set_rx_tx_config_registers(tp);
1954 }
1955
1941 RTL_W8(Cfg9346, Cfg9346_Lock); 1956 RTL_W8(Cfg9346, Cfg9346_Lock);
1942 1957
1943 /* Initially a 10 us delay. Turned it into a PCI commit. - FR */ 1958 /* Initially a 10 us delay. Turned it into a PCI commit. - FR */
@@ -1952,8 +1967,6 @@ static void rtl_hw_start_8169(struct net_device *dev)
1952 1967
1953 /* Enable all known interrupts by setting the interrupt mask. */ 1968 /* Enable all known interrupts by setting the interrupt mask. */
1954 RTL_W16(IntrMask, tp->intr_event); 1969 RTL_W16(IntrMask, tp->intr_event);
1955
1956 RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
1957} 1970}
1958 1971
1959static void rtl_hw_start_8168(struct net_device *dev) 1972static void rtl_hw_start_8168(struct net_device *dev)
@@ -2567,6 +2580,15 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
2567 (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) { 2580 (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) {
2568 netif_wake_queue(dev); 2581 netif_wake_queue(dev);
2569 } 2582 }
2583 /*
2584 * 8168 hack: TxPoll requests are lost when the Tx packets are
2585 * too close. Let's kick an extra TxPoll request when a burst
2586 * of start_xmit activity is detected (if it is not detected,
2587 * it is slow enough). -- FR
2588 */
2589 smp_rmb();
2590 if (tp->cur_tx != dirty_tx)
2591 RTL_W8(TxPoll, NPQ);
2570 } 2592 }
2571} 2593}
2572 2594
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c
index 384b4685e9..0fb74cb51c 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -726,7 +726,7 @@ err_out:
726 return err; 726 return err;
727} 727}
728 728
729static void __exit sgiseeq_remove(struct platform_device *pdev) 729static int __exit sgiseeq_remove(struct platform_device *pdev)
730{ 730{
731 struct net_device *dev = platform_get_drvdata(pdev); 731 struct net_device *dev = platform_get_drvdata(pdev);
732 struct sgiseeq_private *sp = netdev_priv(dev); 732 struct sgiseeq_private *sp = netdev_priv(dev);
@@ -735,6 +735,8 @@ static void __exit sgiseeq_remove(struct platform_device *pdev)
735 free_page((unsigned long) sp->srings); 735 free_page((unsigned long) sp->srings);
736 free_netdev(dev); 736 free_netdev(dev);
737 platform_set_drvdata(pdev, NULL); 737 platform_set_drvdata(pdev, NULL);
738
739 return 0;
738} 740}
739 741
740static struct platform_driver sgiseeq_driver = { 742static struct platform_driver sgiseeq_driver = {
diff --git a/drivers/net/sk98lin/Makefile b/drivers/net/sk98lin/Makefile
new file mode 100644
index 0000000000..afd900d5d7
--- /dev/null
+++ b/drivers/net/sk98lin/Makefile
@@ -0,0 +1,87 @@
1#
2# Makefile for the SysKonnect SK-98xx device driver.
3#
4
5
6#
7# Standalone driver params
8# SKPARAM += -DSK_KERNEL_24
9# SKPARAM += -DSK_KERNEL_24_26
10# SKPARAM += -DSK_KERNEL_26
11# SKPARAM += -DSK_KERNEL_22_24
12
13obj-$(CONFIG_SK98LIN) += sk98lin.o
14sk98lin-objs := \
15 skge.o \
16 skethtool.o \
17 skdim.o \
18 skaddr.o \
19 skgehwt.o \
20 skgeinit.o \
21 skgepnmi.o \
22 skgesirq.o \
23 ski2c.o \
24 sklm80.o \
25 skqueue.o \
26 skrlmt.o \
27 sktimer.o \
28 skvpd.o \
29 skxmac2.o
30
31# DBGDEF = \
32# -DDEBUG
33
34ifdef DEBUG
35DBGDEF += \
36-DSK_DEBUG_CHKMOD=0x00000000L \
37-DSK_DEBUG_CHKCAT=0x00000000L
38endif
39
40
41# **** possible debug modules for SK_DEBUG_CHKMOD *****************
42# SK_DBGMOD_MERR 0x00000001L /* general module error indication */
43# SK_DBGMOD_HWM 0x00000002L /* Hardware init module */
44# SK_DBGMOD_RLMT 0x00000004L /* RLMT module */
45# SK_DBGMOD_VPD 0x00000008L /* VPD module */
46# SK_DBGMOD_I2C 0x00000010L /* I2C module */
47# SK_DBGMOD_PNMI 0x00000020L /* PNMI module */
48# SK_DBGMOD_CSUM 0x00000040L /* CSUM module */
49# SK_DBGMOD_ADDR 0x00000080L /* ADDR module */
50# SK_DBGMOD_DRV 0x00010000L /* DRV module */
51
52# **** possible debug categories for SK_DEBUG_CHKCAT **************
53# *** common modules ***
54# SK_DBGCAT_INIT 0x00000001L module/driver initialization
55# SK_DBGCAT_CTRL 0x00000002L controlling: add/rmv MCA/MAC and other controls (IOCTL)
56# SK_DBGCAT_ERR 0x00000004L error handling paths
57# SK_DBGCAT_TX 0x00000008L transmit path
58# SK_DBGCAT_RX 0x00000010L receive path
59# SK_DBGCAT_IRQ 0x00000020L general IRQ handling
60# SK_DBGCAT_QUEUE 0x00000040L any queue management
61# SK_DBGCAT_DUMP 0x00000080L large data output e.g. hex dump
62# SK_DBGCAT_FATAL 0x00000100L large data output e.g. hex dump
63
64# *** driver (file skge.c) ***
65# SK_DBGCAT_DRV_ENTRY 0x00010000 entry points
66# SK_DBGCAT_DRV_??? 0x00020000 not used
67# SK_DBGCAT_DRV_MCA 0x00040000 multicast
68# SK_DBGCAT_DRV_TX_PROGRESS 0x00080000 tx path
69# SK_DBGCAT_DRV_RX_PROGRESS 0x00100000 rx path
70# SK_DBGCAT_DRV_PROGRESS 0x00200000 general runtime
71# SK_DBGCAT_DRV_??? 0x00400000 not used
72# SK_DBGCAT_DRV_PROM 0x00800000 promiscuous mode
73# SK_DBGCAT_DRV_TX_FRAME 0x01000000 display tx frames
74# SK_DBGCAT_DRV_ERROR 0x02000000 error conditions
75# SK_DBGCAT_DRV_INT_SRC 0x04000000 interrupts sources
76# SK_DBGCAT_DRV_EVENT 0x08000000 driver events
77
78EXTRA_CFLAGS += -Idrivers/net/sk98lin -DSK_DIAG_SUPPORT -DGENESIS -DYUKON $(DBGDEF) $(SKPARAM)
79
80clean:
81 rm -f core *.o *.a *.s
82
83
84
85
86
87
diff --git a/drivers/net/sk98lin/h/lm80.h b/drivers/net/sk98lin/h/lm80.h
new file mode 100644
index 0000000000..4e2dbbf780
--- /dev/null
+++ b/drivers/net/sk98lin/h/lm80.h
@@ -0,0 +1,179 @@
1/******************************************************************************
2 *
3 * Name: lm80.h
4 * Project: Gigabit Ethernet Adapters, Common Modules
5 * Version: $Revision: 1.6 $
6 * Date: $Date: 2003/05/13 17:26:52 $
7 * Purpose: Contains all defines for the LM80 Chip
8 * (National Semiconductor).
9 *
10 ******************************************************************************/
11
12/******************************************************************************
13 *
14 * (C)Copyright 1998-2002 SysKonnect.
15 * (C)Copyright 2002-2003 Marvell.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or
20 * (at your option) any later version.
21 *
22 * The information in this file is provided "AS IS" without warranty.
23 *
24 ******************************************************************************/
25
26#ifndef __INC_LM80_H
27#define __INC_LM80_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif /* __cplusplus */
32
33/* defines ********************************************************************/
34
35/*
36 * LM80 register definition
37 *
38 * All registers are 8 bit wide
39 */
40#define LM80_CFG 0x00 /* Configuration Register */
41#define LM80_ISRC_1 0x01 /* Interrupt Status Register 1 */
42#define LM80_ISRC_2 0x02 /* Interrupt Status Register 2 */
43#define LM80_IMSK_1 0x03 /* Interrupt Mask Register 1 */
44#define LM80_IMSK_2 0x04 /* Interrupt Mask Register 2 */
45#define LM80_FAN_CTRL 0x05 /* Fan Devisor/RST#/OS# Register */
46#define LM80_TEMP_CTRL 0x06 /* OS# Config, Temp Res. Reg */
47 /* 0x07 - 0x1f reserved */
48 /* current values */
49#define LM80_VT0_IN 0x20 /* current Voltage 0 value */
50#define LM80_VT1_IN 0x21 /* current Voltage 1 value */
51#define LM80_VT2_IN 0x22 /* current Voltage 2 value */
52#define LM80_VT3_IN 0x23 /* current Voltage 3 value */
53#define LM80_VT4_IN 0x24 /* current Voltage 4 value */
54#define LM80_VT5_IN 0x25 /* current Voltage 5 value */
55#define LM80_VT6_IN 0x26 /* current Voltage 6 value */
56#define LM80_TEMP_IN 0x27 /* current Temperature value */
57#define LM80_FAN1_IN 0x28 /* current Fan 1 count */
58#define LM80_FAN2_IN 0x29 /* current Fan 2 count */
59 /* limit values */
60#define LM80_VT0_HIGH_LIM 0x2a /* high limit val for Voltage 0 */
61#define LM80_VT0_LOW_LIM 0x2b /* low limit val for Voltage 0 */
62#define LM80_VT1_HIGH_LIM 0x2c /* high limit val for Voltage 1 */
63#define LM80_VT1_LOW_LIM 0x2d /* low limit val for Voltage 1 */
64#define LM80_VT2_HIGH_LIM 0x2e /* high limit val for Voltage 2 */
65#define LM80_VT2_LOW_LIM 0x2f /* low limit val for Voltage 2 */
66#define LM80_VT3_HIGH_LIM 0x30 /* high limit val for Voltage 3 */
67#define LM80_VT3_LOW_LIM 0x31 /* low limit val for Voltage 3 */
68#define LM80_VT4_HIGH_LIM 0x32 /* high limit val for Voltage 4 */
69#define LM80_VT4_LOW_LIM 0x33 /* low limit val for Voltage 4 */
70#define LM80_VT5_HIGH_LIM 0x34 /* high limit val for Voltage 5 */
71#define LM80_VT5_LOW_LIM 0x35 /* low limit val for Voltage 5 */
72#define LM80_VT6_HIGH_LIM 0x36 /* high limit val for Voltage 6 */
73#define LM80_VT6_LOW_LIM 0x37 /* low limit val for Voltage 6 */
74#define LM80_THOT_LIM_UP 0x38 /* hot temperature limit (high) */
75#define LM80_THOT_LIM_LO 0x39 /* hot temperature limit (low) */
76#define LM80_TOS_LIM_UP 0x3a /* OS temperature limit (high) */
77#define LM80_TOS_LIM_LO 0x3b /* OS temperature limit (low) */
78#define LM80_FAN1_COUNT_LIM 0x3c /* Fan 1 count limit (high) */
79#define LM80_FAN2_COUNT_LIM 0x3d /* Fan 2 count limit (low) */
80 /* 0x3e - 0x3f reserved */
81
82/*
83 * LM80 bit definitions
84 */
85
86/* LM80_CFG Configuration Register */
87#define LM80_CFG_START (1<<0) /* start monitoring operation */
88#define LM80_CFG_INT_ENA (1<<1) /* enables the INT# Interrupt output */
89#define LM80_CFG_INT_POL (1<<2) /* INT# pol: 0 act low, 1 act high */
90#define LM80_CFG_INT_CLR (1<<3) /* disables INT#/RST_OUT#/OS# outputs */
91#define LM80_CFG_RESET (1<<4) /* signals a reset */
92#define LM80_CFG_CHASS_CLR (1<<5) /* clears Chassis Intrusion (CI) pin */
93#define LM80_CFG_GPO (1<<6) /* drives the GPO# pin */
94#define LM80_CFG_INIT (1<<7) /* restore power on defaults */
95
96/* LM80_ISRC_1 Interrupt Status Register 1 */
97/* LM80_IMSK_1 Interrupt Mask Register 1 */
98#define LM80_IS_VT0 (1<<0) /* limit exceeded for Voltage 0 */
99#define LM80_IS_VT1 (1<<1) /* limit exceeded for Voltage 1 */
100#define LM80_IS_VT2 (1<<2) /* limit exceeded for Voltage 2 */
101#define LM80_IS_VT3 (1<<3) /* limit exceeded for Voltage 3 */
102#define LM80_IS_VT4 (1<<4) /* limit exceeded for Voltage 4 */
103#define LM80_IS_VT5 (1<<5) /* limit exceeded for Voltage 5 */
104#define LM80_IS_VT6 (1<<6) /* limit exceeded for Voltage 6 */
105#define LM80_IS_INT_IN (1<<7) /* state of INT_IN# */
106
107/* LM80_ISRC_2 Interrupt Status Register 2 */
108/* LM80_IMSK_2 Interrupt Mask Register 2 */
109#define LM80_IS_TEMP (1<<0) /* HOT temperature limit exceeded */
110#define LM80_IS_BTI (1<<1) /* state of BTI# pin */
111#define LM80_IS_FAN1 (1<<2) /* count limit exceeded for Fan 1 */
112#define LM80_IS_FAN2 (1<<3) /* count limit exceeded for Fan 2 */
113#define LM80_IS_CI (1<<4) /* Chassis Intrusion occured */
114#define LM80_IS_OS (1<<5) /* OS temperature limit exceeded */
115 /* bit 6 and 7 are reserved in LM80_ISRC_2 */
116#define LM80_IS_HT_IRQ_MD (1<<6) /* Hot temperature interrupt mode */
117#define LM80_IS_OT_IRQ_MD (1<<7) /* OS temperature interrupt mode */
118
119/* LM80_FAN_CTRL Fan Devisor/RST#/OS# Register */
120#define LM80_FAN1_MD_SEL (1<<0) /* Fan 1 mode select */
121#define LM80_FAN2_MD_SEL (1<<1) /* Fan 2 mode select */
122#define LM80_FAN1_PRM_CTL (3<<2) /* Fan 1 speed control */
123#define LM80_FAN2_PRM_CTL (3<<4) /* Fan 2 speed control */
124#define LM80_FAN_OS_ENA (1<<6) /* enable OS mode on RST_OUT#/OS# pins*/
125#define LM80_FAN_RST_ENA (1<<7) /* sets RST_OUT#/OS# pins in RST mode */
126
127/* LM80_TEMP_CTRL OS# Config, Temp Res. Reg */
128#define LM80_TEMP_OS_STAT (1<<0) /* mirrors the state of RST_OUT#/OS# */
129#define LM80_TEMP_OS_POL (1<<1) /* select OS# polarity */
130#define LM80_TEMP_OS_MODE (1<<2) /* selects Interrupt mode */
131#define LM80_TEMP_RES (1<<3) /* selects 9 or 11 bit temp resulution*/
132#define LM80_TEMP_LSB (0xf<<4)/* 4 LSBs of 11 bit temp data */
133#define LM80_TEMP_LSB_9 (1<<7) /* LSB of 9 bit temperature data */
134
135 /* 0x07 - 0x1f reserved */
136/* LM80_VT0_IN current Voltage 0 value */
137/* LM80_VT1_IN current Voltage 1 value */
138/* LM80_VT2_IN current Voltage 2 value */
139/* LM80_VT3_IN current Voltage 3 value */
140/* LM80_VT4_IN current Voltage 4 value */
141/* LM80_VT5_IN current Voltage 5 value */
142/* LM80_VT6_IN current Voltage 6 value */
143/* LM80_TEMP_IN current temperature value */
144/* LM80_FAN1_IN current Fan 1 count */
145/* LM80_FAN2_IN current Fan 2 count */
146/* LM80_VT0_HIGH_LIM high limit val for Voltage 0 */
147/* LM80_VT0_LOW_LIM low limit val for Voltage 0 */
148/* LM80_VT1_HIGH_LIM high limit val for Voltage 1 */
149/* LM80_VT1_LOW_LIM low limit val for Voltage 1 */
150/* LM80_VT2_HIGH_LIM high limit val for Voltage 2 */
151/* LM80_VT2_LOW_LIM low limit val for Voltage 2 */
152/* LM80_VT3_HIGH_LIM high limit val for Voltage 3 */
153/* LM80_VT3_LOW_LIM low limit val for Voltage 3 */
154/* LM80_VT4_HIGH_LIM high limit val for Voltage 4 */
155/* LM80_VT4_LOW_LIM low limit val for Voltage 4 */
156/* LM80_VT5_HIGH_LIM high limit val for Voltage 5 */
157/* LM80_VT5_LOW_LIM low limit val for Voltage 5 */
158/* LM80_VT6_HIGH_LIM high limit val for Voltage 6 */
159/* LM80_VT6_LOW_LIM low limit val for Voltage 6 */
160/* LM80_THOT_LIM_UP hot temperature limit (high) */
161/* LM80_THOT_LIM_LO hot temperature limit (low) */
162/* LM80_TOS_LIM_UP OS temperature limit (high) */
163/* LM80_TOS_LIM_LO OS temperature limit (low) */
164/* LM80_FAN1_COUNT_LIM Fan 1 count limit (high) */
165/* LM80_FAN2_COUNT_LIM Fan 2 count limit (low) */
166 /* 0x3e - 0x3f reserved */
167
168#define LM80_ADDR 0x28 /* LM80 default addr */
169
170/* typedefs *******************************************************************/
171
172
173/* function prototypes ********************************************************/
174
175#ifdef __cplusplus
176}
177#endif /* __cplusplus */
178
179#endif /* __INC_LM80_H */
diff --git a/drivers/net/sk98lin/h/skaddr.h b/drivers/net/sk98lin/h/skaddr.h
new file mode 100644
index 0000000000..423ad063d0
--- /dev/null
+++ b/drivers/net/sk98lin/h/skaddr.h
@@ -0,0 +1,285 @@
1/******************************************************************************
2 *
3 * Name: skaddr.h
4 * Project: Gigabit Ethernet Adapters, ADDR-Modul
5 * Version: $Revision: 1.29 $
6 * Date: $Date: 2003/05/13 16:57:24 $
7 * Purpose: Header file for Address Management (MC, UC, Prom).
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/******************************************************************************
26 *
27 * Description:
28 *
29 * This module is intended to manage multicast addresses and promiscuous mode
30 * on GEnesis adapters.
31 *
32 * Include File Hierarchy:
33 *
34 * "skdrv1st.h"
35 * ...
36 * "sktypes.h"
37 * "skqueue.h"
38 * "skaddr.h"
39 * ...
40 * "skdrv2nd.h"
41 *
42 ******************************************************************************/
43
44#ifndef __INC_SKADDR_H
45#define __INC_SKADDR_H
46
47#ifdef __cplusplus
48extern "C" {
49#endif /* cplusplus */
50
51/* defines ********************************************************************/
52
53#define SK_MAC_ADDR_LEN 6 /* Length of MAC address. */
54#define SK_MAX_ADDRS 14 /* #Addrs for exact match. */
55
56/* ----- Common return values ----- */
57
58#define SK_ADDR_SUCCESS 0 /* Function returned successfully. */
59#define SK_ADDR_ILLEGAL_PORT 100 /* Port number too high. */
60#define SK_ADDR_TOO_EARLY 101 /* Function called too early. */
61
62/* ----- Clear/Add flag bits ----- */
63
64#define SK_ADDR_PERMANENT 1 /* RLMT Address */
65
66/* ----- Additional Clear flag bits ----- */
67
68#define SK_MC_SW_ONLY 2 /* Do not update HW when clearing. */
69
70/* ----- Override flag bits ----- */
71
72#define SK_ADDR_LOGICAL_ADDRESS 0
73#define SK_ADDR_VIRTUAL_ADDRESS (SK_ADDR_LOGICAL_ADDRESS) /* old */
74#define SK_ADDR_PHYSICAL_ADDRESS 1
75#define SK_ADDR_CLEAR_LOGICAL 2
76#define SK_ADDR_SET_LOGICAL 4
77
78/* ----- Override return values ----- */
79
80#define SK_ADDR_OVERRIDE_SUCCESS (SK_ADDR_SUCCESS)
81#define SK_ADDR_DUPLICATE_ADDRESS 1
82#define SK_ADDR_MULTICAST_ADDRESS 2
83
84/* ----- Partitioning of excact match table ----- */
85
86#define SK_ADDR_EXACT_MATCHES 16 /* #Exact match entries. */
87
88#define SK_ADDR_FIRST_MATCH_RLMT 1
89#define SK_ADDR_LAST_MATCH_RLMT 2
90#define SK_ADDR_FIRST_MATCH_DRV 3
91#define SK_ADDR_LAST_MATCH_DRV (SK_ADDR_EXACT_MATCHES - 1)
92
93/* ----- SkAddrMcAdd/SkAddrMcUpdate return values ----- */
94
95#define SK_MC_FILTERING_EXACT 0 /* Exact filtering. */
96#define SK_MC_FILTERING_INEXACT 1 /* Inexact filtering. */
97
98/* ----- Additional SkAddrMcAdd return values ----- */
99
100#define SK_MC_ILLEGAL_ADDRESS 2 /* Illegal address. */
101#define SK_MC_ILLEGAL_PORT 3 /* Illegal port (not the active one). */
102#define SK_MC_RLMT_OVERFLOW 4 /* Too many RLMT mc addresses. */
103
104/* Promiscuous mode bits ----- */
105
106#define SK_PROM_MODE_NONE 0 /* Normal receive. */
107#define SK_PROM_MODE_LLC 1 /* Receive all LLC frames. */
108#define SK_PROM_MODE_ALL_MC 2 /* Receive all multicast frames. */
109/* #define SK_PROM_MODE_NON_LLC 4 */ /* Receive all non-LLC frames. */
110
111/* Macros */
112
113#ifdef OLD_STUFF
114#ifndef SK_ADDR_EQUAL
115/*
116 * "&" instead of "&&" allows better optimization on IA-64.
117 * The replacement is safe here, as all bytes exist.
118 */
119#ifndef SK_ADDR_DWORD_COMPARE
120#define SK_ADDR_EQUAL(A1,A2) ( \
121 (((SK_U8 *)(A1))[5] == ((SK_U8 *)(A2))[5]) & \
122 (((SK_U8 *)(A1))[4] == ((SK_U8 *)(A2))[4]) & \
123 (((SK_U8 *)(A1))[3] == ((SK_U8 *)(A2))[3]) & \
124 (((SK_U8 *)(A1))[2] == ((SK_U8 *)(A2))[2]) & \
125 (((SK_U8 *)(A1))[1] == ((SK_U8 *)(A2))[1]) & \
126 (((SK_U8 *)(A1))[0] == ((SK_U8 *)(A2))[0]))
127#else /* SK_ADDR_DWORD_COMPARE */
128#define SK_ADDR_EQUAL(A1,A2) ( \
129 (*(SK_U32 *)&(((SK_U8 *)(A1))[2]) == *(SK_U32 *)&(((SK_U8 *)(A2))[2])) & \
130 (*(SK_U32 *)&(((SK_U8 *)(A1))[0]) == *(SK_U32 *)&(((SK_U8 *)(A2))[0])))
131#endif /* SK_ADDR_DWORD_COMPARE */
132#endif /* SK_ADDR_EQUAL */
133#endif /* 0 */
134
135#ifndef SK_ADDR_EQUAL
136#ifndef SK_ADDR_DWORD_COMPARE
137#define SK_ADDR_EQUAL(A1,A2) ( \
138 (((SK_U8 SK_FAR *)(A1))[5] == ((SK_U8 SK_FAR *)(A2))[5]) & \
139 (((SK_U8 SK_FAR *)(A1))[4] == ((SK_U8 SK_FAR *)(A2))[4]) & \
140 (((SK_U8 SK_FAR *)(A1))[3] == ((SK_U8 SK_FAR *)(A2))[3]) & \
141 (((SK_U8 SK_FAR *)(A1))[2] == ((SK_U8 SK_FAR *)(A2))[2]) & \
142 (((SK_U8 SK_FAR *)(A1))[1] == ((SK_U8 SK_FAR *)(A2))[1]) & \
143 (((SK_U8 SK_FAR *)(A1))[0] == ((SK_U8 SK_FAR *)(A2))[0]))
144#else /* SK_ADDR_DWORD_COMPARE */
145#define SK_ADDR_EQUAL(A1,A2) ( \
146 (*(SK_U16 SK_FAR *)&(((SK_U8 SK_FAR *)(A1))[4]) == \
147 *(SK_U16 SK_FAR *)&(((SK_U8 SK_FAR *)(A2))[4])) && \
148 (*(SK_U32 SK_FAR *)&(((SK_U8 SK_FAR *)(A1))[0]) == \
149 *(SK_U32 SK_FAR *)&(((SK_U8 SK_FAR *)(A2))[0])))
150#endif /* SK_ADDR_DWORD_COMPARE */
151#endif /* SK_ADDR_EQUAL */
152
153/* typedefs *******************************************************************/
154
155typedef struct s_MacAddr {
156 SK_U8 a[SK_MAC_ADDR_LEN];
157} SK_MAC_ADDR;
158
159
160/* SK_FILTER is used to ensure alignment of the filter. */
161typedef union s_InexactFilter {
162 SK_U8 Bytes[8];
163 SK_U64 Val; /* Dummy entry for alignment only. */
164} SK_FILTER64;
165
166
167typedef struct s_AddrNet SK_ADDR_NET;
168
169
170typedef struct s_AddrPort {
171
172/* ----- Public part (read-only) ----- */
173
174 SK_MAC_ADDR CurrentMacAddress; /* Current physical MAC Address. */
175 SK_MAC_ADDR PermanentMacAddress; /* Permanent physical MAC Address. */
176 int PromMode; /* Promiscuous Mode. */
177
178/* ----- Private part ----- */
179
180 SK_MAC_ADDR PreviousMacAddress; /* Prev. phys. MAC Address. */
181 SK_BOOL CurrentMacAddressSet; /* CurrentMacAddress is set. */
182 SK_U8 Align01;
183
184 SK_U32 FirstExactMatchRlmt;
185 SK_U32 NextExactMatchRlmt;
186 SK_U32 FirstExactMatchDrv;
187 SK_U32 NextExactMatchDrv;
188 SK_MAC_ADDR Exact[SK_ADDR_EXACT_MATCHES];
189 SK_FILTER64 InexactFilter; /* For 64-bit hash register. */
190 SK_FILTER64 InexactRlmtFilter; /* For 64-bit hash register. */
191 SK_FILTER64 InexactDrvFilter; /* For 64-bit hash register. */
192} SK_ADDR_PORT;
193
194
195struct s_AddrNet {
196/* ----- Public part (read-only) ----- */
197
198 SK_MAC_ADDR CurrentMacAddress; /* Logical MAC Address. */
199 SK_MAC_ADDR PermanentMacAddress; /* Logical MAC Address. */
200
201/* ----- Private part ----- */
202
203 SK_U32 ActivePort; /* View of module ADDR. */
204 SK_BOOL CurrentMacAddressSet; /* CurrentMacAddress is set. */
205 SK_U8 Align01;
206 SK_U16 Align02;
207};
208
209
210typedef struct s_Addr {
211
212/* ----- Public part (read-only) ----- */
213
214 SK_ADDR_NET Net[SK_MAX_NETS];
215 SK_ADDR_PORT Port[SK_MAX_MACS];
216
217/* ----- Private part ----- */
218} SK_ADDR;
219
220/* function prototypes ********************************************************/
221
222#ifndef SK_KR_PROTO
223
224/* Functions provided by SkAddr */
225
226/* ANSI/C++ compliant function prototypes */
227
228extern int SkAddrInit(
229 SK_AC *pAC,
230 SK_IOC IoC,
231 int Level);
232
233extern int SkAddrMcClear(
234 SK_AC *pAC,
235 SK_IOC IoC,
236 SK_U32 PortNumber,
237 int Flags);
238
239extern int SkAddrMcAdd(
240 SK_AC *pAC,
241 SK_IOC IoC,
242 SK_U32 PortNumber,
243 SK_MAC_ADDR *pMc,
244 int Flags);
245
246extern int SkAddrMcUpdate(
247 SK_AC *pAC,
248 SK_IOC IoC,
249 SK_U32 PortNumber);
250
251extern int SkAddrOverride(
252 SK_AC *pAC,
253 SK_IOC IoC,
254 SK_U32 PortNumber,
255 SK_MAC_ADDR SK_FAR *pNewAddr,
256 int Flags);
257
258extern int SkAddrPromiscuousChange(
259 SK_AC *pAC,
260 SK_IOC IoC,
261 SK_U32 PortNumber,
262 int NewPromMode);
263
264#ifndef SK_SLIM
265extern int SkAddrSwap(
266 SK_AC *pAC,
267 SK_IOC IoC,
268 SK_U32 FromPortNumber,
269 SK_U32 ToPortNumber);
270#endif
271
272#else /* defined(SK_KR_PROTO)) */
273
274/* Non-ANSI/C++ compliant function prototypes */
275
276#error KR-style prototypes are not yet provided.
277
278#endif /* defined(SK_KR_PROTO)) */
279
280
281#ifdef __cplusplus
282}
283#endif /* __cplusplus */
284
285#endif /* __INC_SKADDR_H */
diff --git a/drivers/net/sk98lin/h/skcsum.h b/drivers/net/sk98lin/h/skcsum.h
new file mode 100644
index 0000000000..6e256bd9a2
--- /dev/null
+++ b/drivers/net/sk98lin/h/skcsum.h
@@ -0,0 +1,213 @@
1/******************************************************************************
2 *
3 * Name: skcsum.h
4 * Project: GEnesis - SysKonnect SK-NET Gigabit Ethernet (SK-98xx)
5 * Version: $Revision: 1.10 $
6 * Date: $Date: 2003/08/20 13:59:57 $
7 * Purpose: Store/verify Internet checksum in send/receive packets.
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2001 SysKonnect GmbH.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * The information in this file is provided "AS IS" without warranty.
21 *
22 ******************************************************************************/
23
24/******************************************************************************
25 *
26 * Description:
27 *
28 * Public header file for the "GEnesis" common module "CSUM".
29 *
30 * "GEnesis" is an abbreviation of "Gigabit Ethernet Network System in Silicon"
31 * and is the code name of this SysKonnect project.
32 *
33 * Compilation Options:
34 *
35 * SK_USE_CSUM - Define if CSUM is to be used. Otherwise, CSUM will be an
36 * empty module.
37 *
38 * SKCS_OVERWRITE_PROTO - Define to overwrite the default protocol id
39 * definitions. In this case, all SKCS_PROTO_xxx definitions must be made
40 * external.
41 *
42 * SKCS_OVERWRITE_STATUS - Define to overwrite the default return status
43 * definitions. In this case, all SKCS_STATUS_xxx definitions must be made
44 * external.
45 *
46 * Include File Hierarchy:
47 *
48 * "h/skcsum.h"
49 * "h/sktypes.h"
50 * "h/skqueue.h"
51 *
52 ******************************************************************************/
53
54#ifndef __INC_SKCSUM_H
55#define __INC_SKCSUM_H
56
57#include "h/sktypes.h"
58#include "h/skqueue.h"
59
60/* defines ********************************************************************/
61
62/*
63 * Define the default bit flags for 'SKCS_PACKET_INFO.ProtocolFlags' if no user
64 * overwrite.
65 */
66#ifndef SKCS_OVERWRITE_PROTO /* User overwrite? */
67#define SKCS_PROTO_IP 0x1 /* IP (Internet Protocol version 4) */
68#define SKCS_PROTO_TCP 0x2 /* TCP (Transmission Control Protocol) */
69#define SKCS_PROTO_UDP 0x4 /* UDP (User Datagram Protocol) */
70
71/* Indices for protocol statistics. */
72#define SKCS_PROTO_STATS_IP 0
73#define SKCS_PROTO_STATS_UDP 1
74#define SKCS_PROTO_STATS_TCP 2
75#define SKCS_NUM_PROTOCOLS 3 /* Number of supported protocols. */
76#endif /* !SKCS_OVERWRITE_PROTO */
77
78/*
79 * Define the default SKCS_STATUS type and values if no user overwrite.
80 *
81 * SKCS_STATUS_UNKNOWN_IP_VERSION - Not an IP v4 frame.
82 * SKCS_STATUS_IP_CSUM_ERROR - IP checksum error.
83 * SKCS_STATUS_IP_CSUM_ERROR_TCP - IP checksum error in TCP frame.
84 * SKCS_STATUS_IP_CSUM_ERROR_UDP - IP checksum error in UDP frame
85 * SKCS_STATUS_IP_FRAGMENT - IP fragment (IP checksum ok).
86 * SKCS_STATUS_IP_CSUM_OK - IP checksum ok (not a TCP or UDP frame).
87 * SKCS_STATUS_TCP_CSUM_ERROR - TCP checksum error (IP checksum ok).
88 * SKCS_STATUS_UDP_CSUM_ERROR - UDP checksum error (IP checksum ok).
89 * SKCS_STATUS_TCP_CSUM_OK - IP and TCP checksum ok.
90 * SKCS_STATUS_UDP_CSUM_OK - IP and UDP checksum ok.
91 * SKCS_STATUS_IP_CSUM_OK_NO_UDP - IP checksum OK and no UDP checksum.
92 */
93#ifndef SKCS_OVERWRITE_STATUS /* User overwrite? */
94#define SKCS_STATUS int /* Define status type. */
95
96#define SKCS_STATUS_UNKNOWN_IP_VERSION 1
97#define SKCS_STATUS_IP_CSUM_ERROR 2
98#define SKCS_STATUS_IP_FRAGMENT 3
99#define SKCS_STATUS_IP_CSUM_OK 4
100#define SKCS_STATUS_TCP_CSUM_ERROR 5
101#define SKCS_STATUS_UDP_CSUM_ERROR 6
102#define SKCS_STATUS_TCP_CSUM_OK 7
103#define SKCS_STATUS_UDP_CSUM_OK 8
104/* needed for Microsoft */
105#define SKCS_STATUS_IP_CSUM_ERROR_UDP 9
106#define SKCS_STATUS_IP_CSUM_ERROR_TCP 10
107/* UDP checksum may be omitted */
108#define SKCS_STATUS_IP_CSUM_OK_NO_UDP 11
109#endif /* !SKCS_OVERWRITE_STATUS */
110
111/* Clear protocol statistics event. */
112#define SK_CSUM_EVENT_CLEAR_PROTO_STATS 1
113
114/*
115 * Add two values in one's complement.
116 *
117 * Note: One of the two input values may be "longer" than 16-bit, but then the
118 * resulting sum may be 17 bits long. In this case, add zero to the result using
119 * SKCS_OC_ADD() again.
120 *
121 * Result = Value1 + Value2
122 */
123#define SKCS_OC_ADD(Result, Value1, Value2) { \
124 unsigned long Sum; \
125 \
126 Sum = (unsigned long) (Value1) + (unsigned long) (Value2); \
127 /* Add-in any carry. */ \
128 (Result) = (Sum & 0xffff) + (Sum >> 16); \
129}
130
131/*
132 * Subtract two values in one's complement.
133 *
134 * Result = Value1 - Value2
135 */
136#define SKCS_OC_SUB(Result, Value1, Value2) \
137 SKCS_OC_ADD((Result), (Value1), ~(Value2) & 0xffff)
138
139/* typedefs *******************************************************************/
140
141/*
142 * SKCS_PROTO_STATS - The CSUM protocol statistics structure.
143 *
144 * There is one instance of this structure for each protocol supported.
145 */
146typedef struct s_CsProtocolStatistics {
147 SK_U64 RxOkCts; /* Receive checksum ok. */
148 SK_U64 RxUnableCts; /* Unable to verify receive checksum. */
149 SK_U64 RxErrCts; /* Receive checksum error. */
150 SK_U64 TxOkCts; /* Transmit checksum ok. */
151 SK_U64 TxUnableCts; /* Unable to calculate checksum in hw. */
152} SKCS_PROTO_STATS;
153
154/*
155 * s_Csum - The CSUM module context structure.
156 */
157typedef struct s_Csum {
158 /* Enabled receive SK_PROTO_XXX bit flags. */
159 unsigned ReceiveFlags[SK_MAX_NETS];
160#ifdef TX_CSUM
161 unsigned TransmitFlags[SK_MAX_NETS];
162#endif /* TX_CSUM */
163
164 /* The protocol statistics structure; one per supported protocol. */
165 SKCS_PROTO_STATS ProtoStats[SK_MAX_NETS][SKCS_NUM_PROTOCOLS];
166} SK_CSUM;
167
168/*
169 * SKCS_PACKET_INFO - The packet information structure.
170 */
171typedef struct s_CsPacketInfo {
172 /* Bit field specifiying the desired/found protocols. */
173 unsigned ProtocolFlags;
174
175 /* Length of complete IP header, including any option fields. */
176 unsigned IpHeaderLength;
177
178 /* IP header checksum. */
179 unsigned IpHeaderChecksum;
180
181 /* TCP/UDP pseudo header checksum. */
182 unsigned PseudoHeaderChecksum;
183} SKCS_PACKET_INFO;
184
185/* function prototypes ********************************************************/
186
187#ifndef SK_CS_CALCULATE_CHECKSUM
188extern unsigned SkCsCalculateChecksum(
189 void *pData,
190 unsigned Length);
191#endif /* SK_CS_CALCULATE_CHECKSUM */
192
193extern int SkCsEvent(
194 SK_AC *pAc,
195 SK_IOC Ioc,
196 SK_U32 Event,
197 SK_EVPARA Param);
198
199extern SKCS_STATUS SkCsGetReceiveInfo(
200 SK_AC *pAc,
201 void *pIpHeader,
202 unsigned Checksum1,
203 unsigned Checksum2,
204 int NetNumber);
205
206extern void SkCsSetReceiveFlags(
207 SK_AC *pAc,
208 unsigned ReceiveFlags,
209 unsigned *pChecksum1Offset,
210 unsigned *pChecksum2Offset,
211 int NetNumber);
212
213#endif /* __INC_SKCSUM_H */
diff --git a/drivers/net/sk98lin/h/skdebug.h b/drivers/net/sk98lin/h/skdebug.h
new file mode 100644
index 0000000000..3cba171d74
--- /dev/null
+++ b/drivers/net/sk98lin/h/skdebug.h
@@ -0,0 +1,74 @@
1/******************************************************************************
2 *
3 * Name: skdebug.h
4 * Project: Gigabit Ethernet Adapters, Common Modules
5 * Version: $Revision: 1.14 $
6 * Date: $Date: 2003/05/13 17:26:00 $
7 * Purpose: SK specific DEBUG support
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25#ifndef __INC_SKDEBUG_H
26#define __INC_SKDEBUG_H
27
28#ifdef DEBUG
29#ifndef SK_DBG_MSG
30#define SK_DBG_MSG(pAC,comp,cat,arg) \
31 if ( ((comp) & SK_DBG_CHKMOD(pAC)) && \
32 ((cat) & SK_DBG_CHKCAT(pAC)) ) { \
33 SK_DBG_PRINTF arg ; \
34 }
35#endif
36#else
37#define SK_DBG_MSG(pAC,comp,lev,arg)
38#endif
39
40/* PLS NOTE:
41 * =========
42 * Due to any restrictions of kernel printf routines do not use other
43 * format identifiers as: %x %d %c %s .
44 * Never use any combined format identifiers such as: %lx %ld in your
45 * printf - argument (arg) because some OS specific kernel printfs may
46 * only support some basic identifiers.
47 */
48
49/* Debug modules */
50
51#define SK_DBGMOD_MERR 0x00000001L /* general module error indication */
52#define SK_DBGMOD_HWM 0x00000002L /* Hardware init module */
53#define SK_DBGMOD_RLMT 0x00000004L /* RLMT module */
54#define SK_DBGMOD_VPD 0x00000008L /* VPD module */
55#define SK_DBGMOD_I2C 0x00000010L /* I2C module */
56#define SK_DBGMOD_PNMI 0x00000020L /* PNMI module */
57#define SK_DBGMOD_CSUM 0x00000040L /* CSUM module */
58#define SK_DBGMOD_ADDR 0x00000080L /* ADDR module */
59#define SK_DBGMOD_PECP 0x00000100L /* PECP module */
60#define SK_DBGMOD_POWM 0x00000200L /* Power Management module */
61
62/* Debug events */
63
64#define SK_DBGCAT_INIT 0x00000001L /* module/driver initialization */
65#define SK_DBGCAT_CTRL 0x00000002L /* controlling devices */
66#define SK_DBGCAT_ERR 0x00000004L /* error handling paths */
67#define SK_DBGCAT_TX 0x00000008L /* transmit path */
68#define SK_DBGCAT_RX 0x00000010L /* receive path */
69#define SK_DBGCAT_IRQ 0x00000020L /* general IRQ handling */
70#define SK_DBGCAT_QUEUE 0x00000040L /* any queue management */
71#define SK_DBGCAT_DUMP 0x00000080L /* large data output e.g. hex dump */
72#define SK_DBGCAT_FATAL 0x00000100L /* fatal error */
73
74#endif /* __INC_SKDEBUG_H */
diff --git a/drivers/net/sk98lin/h/skdrv1st.h b/drivers/net/sk98lin/h/skdrv1st.h
new file mode 100644
index 0000000000..91b8d4f459
--- /dev/null
+++ b/drivers/net/sk98lin/h/skdrv1st.h
@@ -0,0 +1,188 @@
1/******************************************************************************
2 *
3 * Name: skdrv1st.h
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.4 $
6 * Date: $Date: 2003/11/12 14:28:14 $
7 * Purpose: First header file for driver and all other modules
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/******************************************************************************
26 *
27 * Description:
28 *
29 * This is the first include file of the driver, which includes all
30 * neccessary system header files and some of the GEnesis header files.
31 * It also defines some basic items.
32 *
33 * Include File Hierarchy:
34 *
35 * see skge.c
36 *
37 ******************************************************************************/
38
39#ifndef __INC_SKDRV1ST_H
40#define __INC_SKDRV1ST_H
41
42typedef struct s_AC SK_AC;
43
44/* Set card versions */
45#define SK_FAR
46
47/* override some default functions with optimized linux functions */
48
49#define SK_PNMI_STORE_U16(p,v) memcpy((char*)(p),(char*)&(v),2)
50#define SK_PNMI_STORE_U32(p,v) memcpy((char*)(p),(char*)&(v),4)
51#define SK_PNMI_STORE_U64(p,v) memcpy((char*)(p),(char*)&(v),8)
52#define SK_PNMI_READ_U16(p,v) memcpy((char*)&(v),(char*)(p),2)
53#define SK_PNMI_READ_U32(p,v) memcpy((char*)&(v),(char*)(p),4)
54#define SK_PNMI_READ_U64(p,v) memcpy((char*)&(v),(char*)(p),8)
55
56#define SK_ADDR_EQUAL(a1,a2) (!memcmp(a1,a2,6))
57
58#include <linux/types.h>
59#include <linux/kernel.h>
60#include <linux/string.h>
61#include <linux/errno.h>
62#include <linux/ioport.h>
63#include <linux/slab.h>
64#include <linux/interrupt.h>
65#include <linux/pci.h>
66#include <linux/bitops.h>
67#include <asm/byteorder.h>
68#include <asm/io.h>
69#include <asm/irq.h>
70#include <linux/netdevice.h>
71#include <linux/etherdevice.h>
72#include <linux/skbuff.h>
73
74#include <linux/init.h>
75#include <asm/uaccess.h>
76#include <net/checksum.h>
77
78#define SK_CS_CALCULATE_CHECKSUM
79#ifndef CONFIG_X86_64
80#define SkCsCalculateChecksum(p,l) ((~ip_compute_csum(p, l)) & 0xffff)
81#else
82#define SkCsCalculateChecksum(p,l) ((~ip_fast_csum(p, l)) & 0xffff)
83#endif
84
85#include "h/sktypes.h"
86#include "h/skerror.h"
87#include "h/skdebug.h"
88#include "h/lm80.h"
89#include "h/xmac_ii.h"
90
91#ifdef __LITTLE_ENDIAN
92#define SK_LITTLE_ENDIAN
93#else
94#define SK_BIG_ENDIAN
95#endif
96
97#define SK_NET_DEVICE net_device
98
99
100/* we use gethrtime(), return unit: nanoseconds */
101#define SK_TICKS_PER_SEC 100
102
103#define SK_MEM_MAPPED_IO
104
105// #define SK_RLMT_SLOW_LOOKAHEAD
106
107#define SK_MAX_MACS 2
108#define SK_MAX_NETS 2
109
110#define SK_IOC char __iomem *
111
112typedef struct s_DrvRlmtMbuf SK_MBUF;
113
114#define SK_CONST64 INT64_C
115#define SK_CONSTU64 UINT64_C
116
117#define SK_MEMCPY(dest,src,size) memcpy(dest,src,size)
118#define SK_MEMCMP(s1,s2,size) memcmp(s1,s2,size)
119#define SK_MEMSET(dest,val,size) memset(dest,val,size)
120#define SK_STRLEN(pStr) strlen((char*)(pStr))
121#define SK_STRNCPY(pDest,pSrc,size) strncpy((char*)(pDest),(char*)(pSrc),size)
122#define SK_STRCMP(pStr1,pStr2) strcmp((char*)(pStr1),(char*)(pStr2))
123
124/* macros to access the adapter */
125#define SK_OUT8(b,a,v) writeb((v), ((b)+(a)))
126#define SK_OUT16(b,a,v) writew((v), ((b)+(a)))
127#define SK_OUT32(b,a,v) writel((v), ((b)+(a)))
128#define SK_IN8(b,a,pv) (*(pv) = readb((b)+(a)))
129#define SK_IN16(b,a,pv) (*(pv) = readw((b)+(a)))
130#define SK_IN32(b,a,pv) (*(pv) = readl((b)+(a)))
131
132#define int8_t char
133#define int16_t short
134#define int32_t long
135#define int64_t long long
136#define uint8_t u_char
137#define uint16_t u_short
138#define uint32_t u_long
139#define uint64_t unsigned long long
140#define t_scalar_t int
141#define t_uscalar_t unsigned int
142#define uintptr_t unsigned long
143
144#define __CONCAT__(A,B) A##B
145
146#define INT32_C(a) __CONCAT__(a,L)
147#define INT64_C(a) __CONCAT__(a,LL)
148#define UINT32_C(a) __CONCAT__(a,UL)
149#define UINT64_C(a) __CONCAT__(a,ULL)
150
151#ifdef DEBUG
152#define SK_DBG_PRINTF printk
153#ifndef SK_DEBUG_CHKMOD
154#define SK_DEBUG_CHKMOD 0
155#endif
156#ifndef SK_DEBUG_CHKCAT
157#define SK_DEBUG_CHKCAT 0
158#endif
159/* those come from the makefile */
160#define SK_DBG_CHKMOD(pAC) (SK_DEBUG_CHKMOD)
161#define SK_DBG_CHKCAT(pAC) (SK_DEBUG_CHKCAT)
162
163extern void SkDbgPrintf(const char *format,...);
164
165#define SK_DBGMOD_DRV 0x00010000
166
167/**** possible driver debug categories ********************************/
168#define SK_DBGCAT_DRV_ENTRY 0x00010000
169#define SK_DBGCAT_DRV_SAP 0x00020000
170#define SK_DBGCAT_DRV_MCA 0x00040000
171#define SK_DBGCAT_DRV_TX_PROGRESS 0x00080000
172#define SK_DBGCAT_DRV_RX_PROGRESS 0x00100000
173#define SK_DBGCAT_DRV_PROGRESS 0x00200000
174#define SK_DBGCAT_DRV_MSG 0x00400000
175#define SK_DBGCAT_DRV_PROM 0x00800000
176#define SK_DBGCAT_DRV_TX_FRAME 0x01000000
177#define SK_DBGCAT_DRV_ERROR 0x02000000
178#define SK_DBGCAT_DRV_INT_SRC 0x04000000
179#define SK_DBGCAT_DRV_EVENT 0x08000000
180
181#endif
182
183#define SK_ERR_LOG SkErrorLog
184
185extern void SkErrorLog(SK_AC*, int, int, char*);
186
187#endif
188
diff --git a/drivers/net/sk98lin/h/skdrv2nd.h b/drivers/net/sk98lin/h/skdrv2nd.h
new file mode 100644
index 0000000000..3fa67171e8
--- /dev/null
+++ b/drivers/net/sk98lin/h/skdrv2nd.h
@@ -0,0 +1,447 @@
1/******************************************************************************
2 *
3 * Name: skdrv2nd.h
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.10 $
6 * Date: $Date: 2003/12/11 16:04:45 $
7 * Purpose: Second header file for driver and all other modules
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/******************************************************************************
26 *
27 * Description:
28 *
29 * This is the second include file of the driver, which includes all other
30 * neccessary files and defines all structures and constants used by the
31 * driver and the common modules.
32 *
33 * Include File Hierarchy:
34 *
35 * see skge.c
36 *
37 ******************************************************************************/
38
39#ifndef __INC_SKDRV2ND_H
40#define __INC_SKDRV2ND_H
41
42#include "h/skqueue.h"
43#include "h/skgehwt.h"
44#include "h/sktimer.h"
45#include "h/ski2c.h"
46#include "h/skgepnmi.h"
47#include "h/skvpd.h"
48#include "h/skgehw.h"
49#include "h/skgeinit.h"
50#include "h/skaddr.h"
51#include "h/skgesirq.h"
52#include "h/skcsum.h"
53#include "h/skrlmt.h"
54#include "h/skgedrv.h"
55
56
57extern SK_MBUF *SkDrvAllocRlmtMbuf(SK_AC*, SK_IOC, unsigned);
58extern void SkDrvFreeRlmtMbuf(SK_AC*, SK_IOC, SK_MBUF*);
59extern SK_U64 SkOsGetTime(SK_AC*);
60extern int SkPciReadCfgDWord(SK_AC*, int, SK_U32*);
61extern int SkPciReadCfgWord(SK_AC*, int, SK_U16*);
62extern int SkPciReadCfgByte(SK_AC*, int, SK_U8*);
63extern int SkPciWriteCfgWord(SK_AC*, int, SK_U16);
64extern int SkPciWriteCfgByte(SK_AC*, int, SK_U8);
65extern int SkDrvEvent(SK_AC*, SK_IOC IoC, SK_U32, SK_EVPARA);
66
67#ifdef SK_DIAG_SUPPORT
68extern int SkDrvEnterDiagMode(SK_AC *pAc);
69extern int SkDrvLeaveDiagMode(SK_AC *pAc);
70#endif
71
72struct s_DrvRlmtMbuf {
73 SK_MBUF *pNext; /* Pointer to next RLMT Mbuf. */
74 SK_U8 *pData; /* Data buffer (virtually contig.). */
75 unsigned Size; /* Data buffer size. */
76 unsigned Length; /* Length of packet (<= Size). */
77 SK_U32 PortIdx; /* Receiving/transmitting port. */
78#ifdef SK_RLMT_MBUF_PRIVATE
79 SK_RLMT_MBUF Rlmt; /* Private part for RLMT. */
80#endif /* SK_RLMT_MBUF_PRIVATE */
81 struct sk_buff *pOs; /* Pointer to message block */
82};
83
84
85/*
86 * Time macros
87 */
88#if SK_TICKS_PER_SEC == 100
89#define SK_PNMI_HUNDREDS_SEC(t) (t)
90#else
91#define SK_PNMI_HUNDREDS_SEC(t) ((((unsigned long)t) * 100) / \
92 (SK_TICKS_PER_SEC))
93#endif
94
95/*
96 * New SkOsGetTime
97 */
98#define SkOsGetTimeCurrent(pAC, pUsec) {\
99 struct timeval t;\
100 do_gettimeofday(&t);\
101 *pUsec = ((((t.tv_sec) * 1000000L)+t.tv_usec)/10000);\
102}
103
104
105/*
106 * ioctl definitions
107 */
108#define SK_IOCTL_BASE (SIOCDEVPRIVATE)
109#define SK_IOCTL_GETMIB (SK_IOCTL_BASE + 0)
110#define SK_IOCTL_SETMIB (SK_IOCTL_BASE + 1)
111#define SK_IOCTL_PRESETMIB (SK_IOCTL_BASE + 2)
112#define SK_IOCTL_GEN (SK_IOCTL_BASE + 3)
113#define SK_IOCTL_DIAG (SK_IOCTL_BASE + 4)
114
115typedef struct s_IOCTL SK_GE_IOCTL;
116
117struct s_IOCTL {
118 char __user * pData;
119 unsigned int Len;
120};
121
122
123/*
124 * define sizes of descriptor rings in bytes
125 */
126
127#define TX_RING_SIZE (8*1024)
128#define RX_RING_SIZE (24*1024)
129
130/*
131 * Buffer size for ethernet packets
132 */
133#define ETH_BUF_SIZE 1540
134#define ETH_MAX_MTU 1514
135#define ETH_MIN_MTU 60
136#define ETH_MULTICAST_BIT 0x01
137#define SK_JUMBO_MTU 9000
138
139/*
140 * transmit priority selects the queue: LOW=asynchron, HIGH=synchron
141 */
142#define TX_PRIO_LOW 0
143#define TX_PRIO_HIGH 1
144
145/*
146 * alignment of rx/tx descriptors
147 */
148#define DESCR_ALIGN 64
149
150/*
151 * definitions for pnmi. TODO
152 */
153#define SK_DRIVER_RESET(pAC, IoC) 0
154#define SK_DRIVER_SENDEVENT(pAC, IoC) 0
155#define SK_DRIVER_SELFTEST(pAC, IoC) 0
156/* For get mtu you must add an own function */
157#define SK_DRIVER_GET_MTU(pAc,IoC,i) 0
158#define SK_DRIVER_SET_MTU(pAc,IoC,i,v) 0
159#define SK_DRIVER_PRESET_MTU(pAc,IoC,i,v) 0
160
161/*
162** Interim definition of SK_DRV_TIMER placed in this file until
163** common modules have been finalized
164*/
165#define SK_DRV_TIMER 11
166#define SK_DRV_MODERATION_TIMER 1
167#define SK_DRV_MODERATION_TIMER_LENGTH 1000000 /* 1 second */
168#define SK_DRV_RX_CLEANUP_TIMER 2
169#define SK_DRV_RX_CLEANUP_TIMER_LENGTH 1000000 /* 100 millisecs */
170
171/*
172** Definitions regarding transmitting frames
173** any calculating any checksum.
174*/
175#define C_LEN_ETHERMAC_HEADER_DEST_ADDR 6
176#define C_LEN_ETHERMAC_HEADER_SRC_ADDR 6
177#define C_LEN_ETHERMAC_HEADER_LENTYPE 2
178#define C_LEN_ETHERMAC_HEADER ( (C_LEN_ETHERMAC_HEADER_DEST_ADDR) + \
179 (C_LEN_ETHERMAC_HEADER_SRC_ADDR) + \
180 (C_LEN_ETHERMAC_HEADER_LENTYPE) )
181
182#define C_LEN_ETHERMTU_MINSIZE 46
183#define C_LEN_ETHERMTU_MAXSIZE_STD 1500
184#define C_LEN_ETHERMTU_MAXSIZE_JUMBO 9000
185
186#define C_LEN_ETHERNET_MINSIZE ( (C_LEN_ETHERMAC_HEADER) + \
187 (C_LEN_ETHERMTU_MINSIZE) )
188
189#define C_OFFSET_IPHEADER C_LEN_ETHERMAC_HEADER
190#define C_OFFSET_IPHEADER_IPPROTO 9
191#define C_OFFSET_TCPHEADER_TCPCS 16
192#define C_OFFSET_UDPHEADER_UDPCS 6
193
194#define C_OFFSET_IPPROTO ( (C_LEN_ETHERMAC_HEADER) + \
195 (C_OFFSET_IPHEADER_IPPROTO) )
196
197#define C_PROTO_ID_UDP 17 /* refer to RFC 790 or Stevens' */
198#define C_PROTO_ID_TCP 6 /* TCP/IP illustrated for details */
199
200/* TX and RX descriptors *****************************************************/
201
202typedef struct s_RxD RXD; /* the receive descriptor */
203
204struct s_RxD {
205 volatile SK_U32 RBControl; /* Receive Buffer Control */
206 SK_U32 VNextRxd; /* Next receive descriptor,low dword */
207 SK_U32 VDataLow; /* Receive buffer Addr, low dword */
208 SK_U32 VDataHigh; /* Receive buffer Addr, high dword */
209 SK_U32 FrameStat; /* Receive Frame Status word */
210 SK_U32 TimeStamp; /* Time stamp from XMAC */
211 SK_U32 TcpSums; /* TCP Sum 2 / TCP Sum 1 */
212 SK_U32 TcpSumStarts; /* TCP Sum Start 2 / TCP Sum Start 1 */
213 RXD *pNextRxd; /* Pointer to next Rxd */
214 struct sk_buff *pMBuf; /* Pointer to Linux' socket buffer */
215};
216
217typedef struct s_TxD TXD; /* the transmit descriptor */
218
219struct s_TxD {
220 volatile SK_U32 TBControl; /* Transmit Buffer Control */
221 SK_U32 VNextTxd; /* Next transmit descriptor,low dword */
222 SK_U32 VDataLow; /* Transmit Buffer Addr, low dword */
223 SK_U32 VDataHigh; /* Transmit Buffer Addr, high dword */
224 SK_U32 FrameStat; /* Transmit Frame Status Word */
225 SK_U32 TcpSumOfs; /* Reserved / TCP Sum Offset */
226 SK_U16 TcpSumSt; /* TCP Sum Start */
227 SK_U16 TcpSumWr; /* TCP Sum Write */
228 SK_U32 TcpReserved; /* not used */
229 TXD *pNextTxd; /* Pointer to next Txd */
230 struct sk_buff *pMBuf; /* Pointer to Linux' socket buffer */
231};
232
233/* Used interrupt bits in the interrupts source register *********************/
234
235#define DRIVER_IRQS ((IS_IRQ_SW) | \
236 (IS_R1_F) |(IS_R2_F) | \
237 (IS_XS1_F) |(IS_XA1_F) | \
238 (IS_XS2_F) |(IS_XA2_F))
239
240#define SPECIAL_IRQS ((IS_HW_ERR) |(IS_I2C_READY) | \
241 (IS_EXT_REG) |(IS_TIMINT) | \
242 (IS_PA_TO_RX1) |(IS_PA_TO_RX2) | \
243 (IS_PA_TO_TX1) |(IS_PA_TO_TX2) | \
244 (IS_MAC1) |(IS_LNK_SYNC_M1)| \
245 (IS_MAC2) |(IS_LNK_SYNC_M2)| \
246 (IS_R1_C) |(IS_R2_C) | \
247 (IS_XS1_C) |(IS_XA1_C) | \
248 (IS_XS2_C) |(IS_XA2_C))
249
250#define IRQ_MASK ((IS_IRQ_SW) | \
251 (IS_R1_B) |(IS_R1_F) |(IS_R2_B) |(IS_R2_F) | \
252 (IS_XS1_B) |(IS_XS1_F) |(IS_XA1_B)|(IS_XA1_F)| \
253 (IS_XS2_B) |(IS_XS2_F) |(IS_XA2_B)|(IS_XA2_F)| \
254 (IS_HW_ERR) |(IS_I2C_READY)| \
255 (IS_EXT_REG) |(IS_TIMINT) | \
256 (IS_PA_TO_RX1) |(IS_PA_TO_RX2)| \
257 (IS_PA_TO_TX1) |(IS_PA_TO_TX2)| \
258 (IS_MAC1) |(IS_MAC2) | \
259 (IS_R1_C) |(IS_R2_C) | \
260 (IS_XS1_C) |(IS_XA1_C) | \
261 (IS_XS2_C) |(IS_XA2_C))
262
263#define IRQ_HWE_MASK (IS_ERR_MSK) /* enable all HW irqs */
264
265typedef struct s_DevNet DEV_NET;
266
267struct s_DevNet {
268 int PortNr;
269 int NetNr;
270 SK_AC *pAC;
271};
272
273typedef struct s_TxPort TX_PORT;
274
275struct s_TxPort {
276 /* the transmit descriptor rings */
277 caddr_t pTxDescrRing; /* descriptor area memory */
278 SK_U64 VTxDescrRing; /* descr. area bus virt. addr. */
279 TXD *pTxdRingHead; /* Head of Tx rings */
280 TXD *pTxdRingTail; /* Tail of Tx rings */
281 TXD *pTxdRingPrev; /* descriptor sent previously */
282 int TxdRingFree; /* # of free entrys */
283 spinlock_t TxDesRingLock; /* serialize descriptor accesses */
284 SK_IOC HwAddr; /* bmu registers address */
285 int PortIndex; /* index number of port (0 or 1) */
286};
287
288typedef struct s_RxPort RX_PORT;
289
290struct s_RxPort {
291 /* the receive descriptor rings */
292 caddr_t pRxDescrRing; /* descriptor area memory */
293 SK_U64 VRxDescrRing; /* descr. area bus virt. addr. */
294 RXD *pRxdRingHead; /* Head of Rx rings */
295 RXD *pRxdRingTail; /* Tail of Rx rings */
296 RXD *pRxdRingPrev; /* descriptor given to BMU previously */
297 int RxdRingFree; /* # of free entrys */
298 int RxCsum; /* use receive checksum hardware */
299 spinlock_t RxDesRingLock; /* serialize descriptor accesses */
300 int RxFillLimit; /* limit for buffers in ring */
301 SK_IOC HwAddr; /* bmu registers address */
302 int PortIndex; /* index number of port (0 or 1) */
303};
304
305/* Definitions needed for interrupt moderation *******************************/
306
307#define IRQ_EOF_AS_TX ((IS_XA1_F) | (IS_XA2_F))
308#define IRQ_EOF_SY_TX ((IS_XS1_F) | (IS_XS2_F))
309#define IRQ_MASK_TX_ONLY ((IRQ_EOF_AS_TX)| (IRQ_EOF_SY_TX))
310#define IRQ_MASK_RX_ONLY ((IS_R1_F) | (IS_R2_F))
311#define IRQ_MASK_SP_ONLY (SPECIAL_IRQS)
312#define IRQ_MASK_TX_RX ((IRQ_MASK_TX_ONLY)| (IRQ_MASK_RX_ONLY))
313#define IRQ_MASK_SP_RX ((SPECIAL_IRQS) | (IRQ_MASK_RX_ONLY))
314#define IRQ_MASK_SP_TX ((SPECIAL_IRQS) | (IRQ_MASK_TX_ONLY))
315#define IRQ_MASK_RX_TX_SP ((SPECIAL_IRQS) | (IRQ_MASK_TX_RX))
316
317#define C_INT_MOD_NONE 1
318#define C_INT_MOD_STATIC 2
319#define C_INT_MOD_DYNAMIC 4
320
321#define C_CLK_FREQ_GENESIS 53215000 /* shorter: 53.125 MHz */
322#define C_CLK_FREQ_YUKON 78215000 /* shorter: 78.125 MHz */
323
324#define C_INTS_PER_SEC_DEFAULT 2000
325#define C_INT_MOD_ENABLE_PERCENTAGE 50 /* if higher 50% enable */
326#define C_INT_MOD_DISABLE_PERCENTAGE 50 /* if lower 50% disable */
327#define C_INT_MOD_IPS_LOWER_RANGE 30
328#define C_INT_MOD_IPS_UPPER_RANGE 40000
329
330
331typedef struct s_DynIrqModInfo DIM_INFO;
332struct s_DynIrqModInfo {
333 unsigned long PrevTimeVal;
334 unsigned int PrevSysLoad;
335 unsigned int PrevUsedTime;
336 unsigned int PrevTotalTime;
337 int PrevUsedDescrRatio;
338 int NbrProcessedDescr;
339 SK_U64 PrevPort0RxIntrCts;
340 SK_U64 PrevPort1RxIntrCts;
341 SK_U64 PrevPort0TxIntrCts;
342 SK_U64 PrevPort1TxIntrCts;
343 SK_BOOL ModJustEnabled; /* Moderation just enabled yes/no */
344
345 int MaxModIntsPerSec; /* Moderation Threshold */
346 int MaxModIntsPerSecUpperLimit; /* Upper limit for DIM */
347 int MaxModIntsPerSecLowerLimit; /* Lower limit for DIM */
348
349 long MaskIrqModeration; /* ModIrqType (eg. 'TxRx') */
350 SK_BOOL DisplayStats; /* Stats yes/no */
351 SK_BOOL AutoSizing; /* Resize DIM-timer on/off */
352 int IntModTypeSelect; /* EnableIntMod (eg. 'dynamic') */
353
354 SK_TIMER ModTimer; /* just some timer */
355};
356
357typedef struct s_PerStrm PER_STRM;
358
359#define SK_ALLOC_IRQ 0x00000001
360
361#ifdef SK_DIAG_SUPPORT
362#define DIAG_ACTIVE 1
363#define DIAG_NOTACTIVE 0
364#endif
365
366/****************************************************************************
367 * Per board structure / Adapter Context structure:
368 * Allocated within attach(9e) and freed within detach(9e).
369 * Contains all 'per device' necessary handles, flags, locks etc.:
370 */
371struct s_AC {
372 SK_GEINIT GIni; /* GE init struct */
373 SK_PNMI Pnmi; /* PNMI data struct */
374 SK_VPD vpd; /* vpd data struct */
375 SK_QUEUE Event; /* Event queue */
376 SK_HWT Hwt; /* Hardware Timer control struct */
377 SK_TIMCTRL Tim; /* Software Timer control struct */
378 SK_I2C I2c; /* I2C relevant data structure */
379 SK_ADDR Addr; /* for Address module */
380 SK_CSUM Csum; /* for checksum module */
381 SK_RLMT Rlmt; /* for rlmt module */
382 spinlock_t SlowPathLock; /* Normal IRQ lock */
383 struct timer_list BlinkTimer; /* for LED blinking */
384 int LedsOn;
385 SK_PNMI_STRUCT_DATA PnmiStruct; /* structure to get all Pnmi-Data */
386 int RlmtMode; /* link check mode to set */
387 int RlmtNets; /* Number of nets */
388
389 SK_IOC IoBase; /* register set of adapter */
390 int BoardLevel; /* level of active hw init (0-2) */
391
392 SK_U32 AllocFlag; /* flag allocation of resources */
393 struct pci_dev *PciDev; /* for access to pci config space */
394 struct SK_NET_DEVICE *dev[2]; /* pointer to device struct */
395
396 int RxBufSize; /* length of receive buffers */
397 struct net_device_stats stats; /* linux 'netstat -i' statistics */
398 int Index; /* internal board index number */
399
400 /* adapter RAM sizes for queues of active port */
401 int RxQueueSize; /* memory used for receive queue */
402 int TxSQueueSize; /* memory used for sync. tx queue */
403 int TxAQueueSize; /* memory used for async. tx queue */
404
405 int PromiscCount; /* promiscuous mode counter */
406 int AllMultiCount; /* allmulticast mode counter */
407 int MulticCount; /* number of different MC */
408 /* addresses for this board */
409 /* (may be more than HW can)*/
410
411 int HWRevision; /* Hardware revision */
412 int ActivePort; /* the active XMAC port */
413 int MaxPorts; /* number of activated ports */
414 int TxDescrPerRing; /* # of descriptors per tx ring */
415 int RxDescrPerRing; /* # of descriptors per rx ring */
416
417 caddr_t pDescrMem; /* Pointer to the descriptor area */
418 dma_addr_t pDescrMemDMA; /* PCI DMA address of area */
419
420 /* the port structures with descriptor rings */
421 TX_PORT TxPort[SK_MAX_MACS][2];
422 RX_PORT RxPort[SK_MAX_MACS];
423
424 SK_BOOL CheckQueue; /* check event queue soon */
425 SK_TIMER DrvCleanupTimer;/* to check for pending descriptors */
426 DIM_INFO DynIrqModInfo; /* all data related to DIM */
427
428 /* Only for tests */
429 int PortDown;
430 int ChipsetType; /* Chipset family type
431 * 0 == Genesis family support
432 * 1 == Yukon family support
433 */
434#ifdef SK_DIAG_SUPPORT
435 SK_U32 DiagModeActive; /* is diag active? */
436 SK_BOOL DiagFlowCtrl; /* for control purposes */
437 SK_PNMI_STRUCT_DATA PnmiBackup; /* backup structure for all Pnmi-Data */
438 SK_BOOL WasIfUp[SK_MAX_MACS]; /* for OpenClose while
439 * DIAG is busy with NIC
440 */
441#endif
442
443};
444
445
446#endif /* __INC_SKDRV2ND_H */
447
diff --git a/drivers/net/sk98lin/h/skerror.h b/drivers/net/sk98lin/h/skerror.h
new file mode 100644
index 0000000000..da062f7662
--- /dev/null
+++ b/drivers/net/sk98lin/h/skerror.h
@@ -0,0 +1,55 @@
1/******************************************************************************
2 *
3 * Name: skerror.h
4 * Project: Gigabit Ethernet Adapters, Common Modules
5 * Version: $Revision: 1.7 $
6 * Date: $Date: 2003/05/13 17:25:13 $
7 * Purpose: SK specific Error log support
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25#ifndef _INC_SKERROR_H_
26#define _INC_SKERROR_H_
27
28/*
29 * Define Error Classes
30 */
31#define SK_ERRCL_OTHER (0) /* Other error */
32#define SK_ERRCL_CONFIG (1L<<0) /* Configuration error */
33#define SK_ERRCL_INIT (1L<<1) /* Initialization error */
34#define SK_ERRCL_NORES (1L<<2) /* Out of Resources error */
35#define SK_ERRCL_SW (1L<<3) /* Internal Software error */
36#define SK_ERRCL_HW (1L<<4) /* Hardware Failure */
37#define SK_ERRCL_COMM (1L<<5) /* Communication error */
38
39
40/*
41 * Define Error Code Bases
42 */
43#define SK_ERRBASE_RLMT 100 /* Base Error number for RLMT */
44#define SK_ERRBASE_HWINIT 200 /* Base Error number for HWInit */
45#define SK_ERRBASE_VPD 300 /* Base Error number for VPD */
46#define SK_ERRBASE_PNMI 400 /* Base Error number for PNMI */
47#define SK_ERRBASE_CSUM 500 /* Base Error number for Checksum */
48#define SK_ERRBASE_SIRQ 600 /* Base Error number for Special IRQ */
49#define SK_ERRBASE_I2C 700 /* Base Error number for I2C module */
50#define SK_ERRBASE_QUEUE 800 /* Base Error number for Scheduler */
51#define SK_ERRBASE_ADDR 900 /* Base Error number for Address module */
52#define SK_ERRBASE_PECP 1000 /* Base Error number for PECP */
53#define SK_ERRBASE_DRV 1100 /* Base Error number for Driver */
54
55#endif /* _INC_SKERROR_H_ */
diff --git a/drivers/net/sk98lin/h/skgedrv.h b/drivers/net/sk98lin/h/skgedrv.h
new file mode 100644
index 0000000000..44fd4c3de8
--- /dev/null
+++ b/drivers/net/sk98lin/h/skgedrv.h
@@ -0,0 +1,51 @@
1/******************************************************************************
2 *
3 * Name: skgedrv.h
4 * Project: Gigabit Ethernet Adapters, Common Modules
5 * Version: $Revision: 1.10 $
6 * Date: $Date: 2003/07/04 12:25:01 $
7 * Purpose: Interface with the driver
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25#ifndef __INC_SKGEDRV_H_
26#define __INC_SKGEDRV_H_
27
28/* defines ********************************************************************/
29
30/*
31 * Define the driver events.
32 * Usually the events are defined by the destination module.
33 * In case of the driver we put the definition of the events here.
34 */
35#define SK_DRV_PORT_RESET 1 /* The port needs to be reset */
36#define SK_DRV_NET_UP 2 /* The net is operational */
37#define SK_DRV_NET_DOWN 3 /* The net is down */
38#define SK_DRV_SWITCH_SOFT 4 /* Ports switch with both links connected */
39#define SK_DRV_SWITCH_HARD 5 /* Port switch due to link failure */
40#define SK_DRV_RLMT_SEND 6 /* Send a RLMT packet */
41#define SK_DRV_ADAP_FAIL 7 /* The whole adapter fails */
42#define SK_DRV_PORT_FAIL 8 /* One port fails */
43#define SK_DRV_SWITCH_INTERN 9 /* Port switch by the driver itself */
44#define SK_DRV_POWER_DOWN 10 /* Power down mode */
45#define SK_DRV_TIMER 11 /* Timer for free use */
46#ifdef SK_NO_RLMT
47#define SK_DRV_LINK_UP 12 /* Link Up event for driver */
48#define SK_DRV_LINK_DOWN 13 /* Link Down event for driver */
49#endif
50#define SK_DRV_DOWNSHIFT_DET 14 /* Downshift 4-Pair / 2-Pair (YUKON only) */
51#endif /* __INC_SKGEDRV_H_ */
diff --git a/drivers/net/sk98lin/h/skgehw.h b/drivers/net/sk98lin/h/skgehw.h
new file mode 100644
index 0000000000..f6282b7956
--- /dev/null
+++ b/drivers/net/sk98lin/h/skgehw.h
@@ -0,0 +1,2126 @@
1/******************************************************************************
2 *
3 * Name: skgehw.h
4 * Project: Gigabit Ethernet Adapters, Common Modules
5 * Version: $Revision: 1.56 $
6 * Date: $Date: 2003/09/23 09:01:00 $
7 * Purpose: Defines and Macros for the Gigabit Ethernet Adapter Product Family
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25#ifndef __INC_SKGEHW_H
26#define __INC_SKGEHW_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif /* __cplusplus */
31
32/* defines ********************************************************************/
33
34#define BIT_31 (1UL << 31)
35#define BIT_30 (1L << 30)
36#define BIT_29 (1L << 29)
37#define BIT_28 (1L << 28)
38#define BIT_27 (1L << 27)
39#define BIT_26 (1L << 26)
40#define BIT_25 (1L << 25)
41#define BIT_24 (1L << 24)
42#define BIT_23 (1L << 23)
43#define BIT_22 (1L << 22)
44#define BIT_21 (1L << 21)
45#define BIT_20 (1L << 20)
46#define BIT_19 (1L << 19)
47#define BIT_18 (1L << 18)
48#define BIT_17 (1L << 17)
49#define BIT_16 (1L << 16)
50#define BIT_15 (1L << 15)
51#define BIT_14 (1L << 14)
52#define BIT_13 (1L << 13)
53#define BIT_12 (1L << 12)
54#define BIT_11 (1L << 11)
55#define BIT_10 (1L << 10)
56#define BIT_9 (1L << 9)
57#define BIT_8 (1L << 8)
58#define BIT_7 (1L << 7)
59#define BIT_6 (1L << 6)
60#define BIT_5 (1L << 5)
61#define BIT_4 (1L << 4)
62#define BIT_3 (1L << 3)
63#define BIT_2 (1L << 2)
64#define BIT_1 (1L << 1)
65#define BIT_0 1L
66
67#define BIT_15S (1U << 15)
68#define BIT_14S (1 << 14)
69#define BIT_13S (1 << 13)
70#define BIT_12S (1 << 12)
71#define BIT_11S (1 << 11)
72#define BIT_10S (1 << 10)
73#define BIT_9S (1 << 9)
74#define BIT_8S (1 << 8)
75#define BIT_7S (1 << 7)
76#define BIT_6S (1 << 6)
77#define BIT_5S (1 << 5)
78#define BIT_4S (1 << 4)
79#define BIT_3S (1 << 3)
80#define BIT_2S (1 << 2)
81#define BIT_1S (1 << 1)
82#define BIT_0S 1
83
84#define SHIFT31(x) ((x) << 31)
85#define SHIFT30(x) ((x) << 30)
86#define SHIFT29(x) ((x) << 29)
87#define SHIFT28(x) ((x) << 28)
88#define SHIFT27(x) ((x) << 27)
89#define SHIFT26(x) ((x) << 26)
90#define SHIFT25(x) ((x) << 25)
91#define SHIFT24(x) ((x) << 24)
92#define SHIFT23(x) ((x) << 23)
93#define SHIFT22(x) ((x) << 22)
94#define SHIFT21(x) ((x) << 21)
95#define SHIFT20(x) ((x) << 20)
96#define SHIFT19(x) ((x) << 19)
97#define SHIFT18(x) ((x) << 18)
98#define SHIFT17(x) ((x) << 17)
99#define SHIFT16(x) ((x) << 16)
100#define SHIFT15(x) ((x) << 15)
101#define SHIFT14(x) ((x) << 14)
102#define SHIFT13(x) ((x) << 13)
103#define SHIFT12(x) ((x) << 12)
104#define SHIFT11(x) ((x) << 11)
105#define SHIFT10(x) ((x) << 10)
106#define SHIFT9(x) ((x) << 9)
107#define SHIFT8(x) ((x) << 8)
108#define SHIFT7(x) ((x) << 7)
109#define SHIFT6(x) ((x) << 6)
110#define SHIFT5(x) ((x) << 5)
111#define SHIFT4(x) ((x) << 4)
112#define SHIFT3(x) ((x) << 3)
113#define SHIFT2(x) ((x) << 2)
114#define SHIFT1(x) ((x) << 1)
115#define SHIFT0(x) ((x) << 0)
116
117/*
118 * Configuration Space header
119 * Since this module is used for different OS', those may be
120 * duplicate on some of them (e.g. Linux). But to keep the
121 * common source, we have to live with this...
122 */
123#define PCI_VENDOR_ID 0x00 /* 16 bit Vendor ID */
124#define PCI_DEVICE_ID 0x02 /* 16 bit Device ID */
125#define PCI_COMMAND 0x04 /* 16 bit Command */
126#define PCI_STATUS 0x06 /* 16 bit Status */
127#define PCI_REV_ID 0x08 /* 8 bit Revision ID */
128#define PCI_CLASS_CODE 0x09 /* 24 bit Class Code */
129#define PCI_CACHE_LSZ 0x0c /* 8 bit Cache Line Size */
130#define PCI_LAT_TIM 0x0d /* 8 bit Latency Timer */
131#define PCI_HEADER_T 0x0e /* 8 bit Header Type */
132#define PCI_BIST 0x0f /* 8 bit Built-in selftest */
133#define PCI_BASE_1ST 0x10 /* 32 bit 1st Base address */
134#define PCI_BASE_2ND 0x14 /* 32 bit 2nd Base address */
135 /* Byte 0x18..0x2b: reserved */
136#define PCI_SUB_VID 0x2c /* 16 bit Subsystem Vendor ID */
137#define PCI_SUB_ID 0x2e /* 16 bit Subsystem ID */
138#define PCI_BASE_ROM 0x30 /* 32 bit Expansion ROM Base Address */
139#define PCI_CAP_PTR 0x34 /* 8 bit Capabilities Ptr */
140 /* Byte 0x35..0x3b: reserved */
141#define PCI_IRQ_LINE 0x3c /* 8 bit Interrupt Line */
142#define PCI_IRQ_PIN 0x3d /* 8 bit Interrupt Pin */
143#define PCI_MIN_GNT 0x3e /* 8 bit Min_Gnt */
144#define PCI_MAX_LAT 0x3f /* 8 bit Max_Lat */
145 /* Device Dependent Region */
146#define PCI_OUR_REG_1 0x40 /* 32 bit Our Register 1 */
147#define PCI_OUR_REG_2 0x44 /* 32 bit Our Register 2 */
148 /* Power Management Region */
149#define PCI_PM_CAP_ID 0x48 /* 8 bit Power Management Cap. ID */
150#define PCI_PM_NITEM 0x49 /* 8 bit Next Item Ptr */
151#define PCI_PM_CAP_REG 0x4a /* 16 bit Power Management Capabilities */
152#define PCI_PM_CTL_STS 0x4c /* 16 bit Power Manag. Control/Status */
153 /* Byte 0x4e: reserved */
154#define PCI_PM_DAT_REG 0x4f /* 8 bit Power Manag. Data Register */
155 /* VPD Region */
156#define PCI_VPD_CAP_ID 0x50 /* 8 bit VPD Cap. ID */
157#define PCI_VPD_NITEM 0x51 /* 8 bit Next Item Ptr */
158#define PCI_VPD_ADR_REG 0x52 /* 16 bit VPD Address Register */
159#define PCI_VPD_DAT_REG 0x54 /* 32 bit VPD Data Register */
160 /* Byte 0x58..0x59: reserved */
161#define PCI_SER_LD_CTRL 0x5a /* 16 bit SEEPROM Loader Ctrl (YUKON only) */
162 /* Byte 0x5c..0xff: reserved */
163
164/*
165 * I2C Address (PCI Config)
166 *
167 * Note: The temperature and voltage sensors are relocated on a different
168 * I2C bus.
169 */
170#define I2C_ADDR_VPD 0xa0 /* I2C address for the VPD EEPROM */
171
172/*
173 * Define Bits and Values of the registers
174 */
175/* PCI_COMMAND 16 bit Command */
176 /* Bit 15..11: reserved */
177#define PCI_INT_DIS BIT_10S /* Interrupt INTx# disable (PCI 2.3) */
178#define PCI_FBTEN BIT_9S /* Fast Back-To-Back enable */
179#define PCI_SERREN BIT_8S /* SERR enable */
180#define PCI_ADSTEP BIT_7S /* Address Stepping */
181#define PCI_PERREN BIT_6S /* Parity Report Response enable */
182#define PCI_VGA_SNOOP BIT_5S /* VGA palette snoop */
183#define PCI_MWIEN BIT_4S /* Memory write an inv cycl ena */
184#define PCI_SCYCEN BIT_3S /* Special Cycle enable */
185#define PCI_BMEN BIT_2S /* Bus Master enable */
186#define PCI_MEMEN BIT_1S /* Memory Space Access enable */
187#define PCI_IOEN BIT_0S /* I/O Space Access enable */
188
189#define PCI_COMMAND_VAL (PCI_FBTEN | PCI_SERREN | PCI_PERREN | PCI_MWIEN |\
190 PCI_BMEN | PCI_MEMEN | PCI_IOEN)
191
192/* PCI_STATUS 16 bit Status */
193#define PCI_PERR BIT_15S /* Parity Error */
194#define PCI_SERR BIT_14S /* Signaled SERR */
195#define PCI_RMABORT BIT_13S /* Received Master Abort */
196#define PCI_RTABORT BIT_12S /* Received Target Abort */
197 /* Bit 11: reserved */
198#define PCI_DEVSEL (3<<9) /* Bit 10.. 9: DEVSEL Timing */
199#define PCI_DEV_FAST (0<<9) /* fast */
200#define PCI_DEV_MEDIUM (1<<9) /* medium */
201#define PCI_DEV_SLOW (2<<9) /* slow */
202#define PCI_DATAPERR BIT_8S /* DATA Parity error detected */
203#define PCI_FB2BCAP BIT_7S /* Fast Back-to-Back Capability */
204#define PCI_UDF BIT_6S /* User Defined Features */
205#define PCI_66MHZCAP BIT_5S /* 66 MHz PCI bus clock capable */
206#define PCI_NEWCAP BIT_4S /* New cap. list implemented */
207#define PCI_INT_STAT BIT_3S /* Interrupt INTx# Status (PCI 2.3) */
208 /* Bit 2.. 0: reserved */
209
210#define PCI_ERRBITS (PCI_PERR | PCI_SERR | PCI_RMABORT | PCI_RTABORT |\
211 PCI_DATAPERR)
212
213/* PCI_CLASS_CODE 24 bit Class Code */
214/* Byte 2: Base Class (02) */
215/* Byte 1: SubClass (00) */
216/* Byte 0: Programming Interface (00) */
217
218/* PCI_CACHE_LSZ 8 bit Cache Line Size */
219/* Possible values: 0,2,4,8,16,32,64,128 */
220
221/* PCI_HEADER_T 8 bit Header Type */
222#define PCI_HD_MF_DEV BIT_7S /* 0= single, 1= multi-func dev */
223#define PCI_HD_TYPE 0x7f /* Bit 6..0: Header Layout 0= normal */
224
225/* PCI_BIST 8 bit Built-in selftest */
226/* Built-in Self test not supported (optional) */
227
228/* PCI_BASE_1ST 32 bit 1st Base address */
229#define PCI_MEMSIZE 0x4000L /* use 16 kB Memory Base */
230#define PCI_MEMBASE_MSK 0xffffc000L /* Bit 31..14: Memory Base Address */
231#define PCI_MEMSIZE_MSK 0x00003ff0L /* Bit 13.. 4: Memory Size Req. */
232#define PCI_PREFEN BIT_3 /* Prefetchable */
233#define PCI_MEM_TYP (3L<<2) /* Bit 2.. 1: Memory Type */
234#define PCI_MEM32BIT (0L<<1) /* Base addr anywhere in 32 Bit range */
235#define PCI_MEM1M (1L<<1) /* Base addr below 1 MegaByte */
236#define PCI_MEM64BIT (2L<<1) /* Base addr anywhere in 64 Bit range */
237#define PCI_MEMSPACE BIT_0 /* Memory Space Indicator */
238
239/* PCI_BASE_2ND 32 bit 2nd Base address */
240#define PCI_IOBASE 0xffffff00L /* Bit 31.. 8: I/O Base address */
241#define PCI_IOSIZE 0x000000fcL /* Bit 7.. 2: I/O Size Requirements */
242 /* Bit 1: reserved */
243#define PCI_IOSPACE BIT_0 /* I/O Space Indicator */
244
245/* PCI_BASE_ROM 32 bit Expansion ROM Base Address */
246#define PCI_ROMBASE_MSK 0xfffe0000L /* Bit 31..17: ROM Base address */
247#define PCI_ROMBASE_SIZ (0x1cL<<14) /* Bit 16..14: Treat as Base or Size */
248#define PCI_ROMSIZE (0x38L<<11) /* Bit 13..11: ROM Size Requirements */
249 /* Bit 10.. 1: reserved */
250#define PCI_ROMEN BIT_0 /* Address Decode enable */
251
252/* Device Dependent Region */
253/* PCI_OUR_REG_1 32 bit Our Register 1 */
254 /* Bit 31..29: reserved */
255#define PCI_PHY_COMA BIT_28 /* Set PHY to Coma Mode (YUKON only) */
256#define PCI_TEST_CAL BIT_27 /* Test PCI buffer calib. (YUKON only) */
257#define PCI_EN_CAL BIT_26 /* Enable PCI buffer calib. (YUKON only) */
258#define PCI_VIO BIT_25 /* PCI I/O Voltage, 0 = 3.3V, 1 = 5V */
259#define PCI_DIS_BOOT BIT_24 /* Disable BOOT via ROM */
260#define PCI_EN_IO BIT_23 /* Mapping to I/O space */
261#define PCI_EN_FPROM BIT_22 /* Enable FLASH mapping to memory */
262 /* 1 = Map Flash to memory */
263 /* 0 = Disable addr. dec */
264#define PCI_PAGESIZE (3L<<20) /* Bit 21..20: FLASH Page Size */
265#define PCI_PAGE_16 (0L<<20) /* 16 k pages */
266#define PCI_PAGE_32K (1L<<20) /* 32 k pages */
267#define PCI_PAGE_64K (2L<<20) /* 64 k pages */
268#define PCI_PAGE_128K (3L<<20) /* 128 k pages */
269 /* Bit 19: reserved */
270#define PCI_PAGEREG (7L<<16) /* Bit 18..16: Page Register */
271#define PCI_NOTAR BIT_15 /* No turnaround cycle */
272#define PCI_FORCE_BE BIT_14 /* Assert all BEs on MR */
273#define PCI_DIS_MRL BIT_13 /* Disable Mem Read Line */
274#define PCI_DIS_MRM BIT_12 /* Disable Mem Read Multiple */
275#define PCI_DIS_MWI BIT_11 /* Disable Mem Write & Invalidate */
276#define PCI_DISC_CLS BIT_10 /* Disc: cacheLsz bound */
277#define PCI_BURST_DIS BIT_9 /* Burst Disable */
278#define PCI_DIS_PCI_CLK BIT_8 /* Disable PCI clock driving */
279#define PCI_SKEW_DAS (0xfL<<4) /* Bit 7.. 4: Skew Ctrl, DAS Ext */
280#define PCI_SKEW_BASE 0xfL /* Bit 3.. 0: Skew Ctrl, Base */
281
282
283/* PCI_OUR_REG_2 32 bit Our Register 2 */
284#define PCI_VPD_WR_THR (0xffL<<24) /* Bit 31..24: VPD Write Threshold */
285#define PCI_DEV_SEL (0x7fL<<17) /* Bit 23..17: EEPROM Device Select */
286#define PCI_VPD_ROM_SZ (7L<<14) /* Bit 16..14: VPD ROM Size */
287 /* Bit 13..12: reserved */
288#define PCI_PATCH_DIR (0xfL<<8) /* Bit 11.. 8: Ext Patches dir 3..0 */
289#define PCI_PATCH_DIR_3 BIT_11
290#define PCI_PATCH_DIR_2 BIT_10
291#define PCI_PATCH_DIR_1 BIT_9
292#define PCI_PATCH_DIR_0 BIT_8
293#define PCI_EXT_PATCHS (0xfL<<4) /* Bit 7.. 4: Extended Patches 3..0 */
294#define PCI_EXT_PATCH_3 BIT_7
295#define PCI_EXT_PATCH_2 BIT_6
296#define PCI_EXT_PATCH_1 BIT_5
297#define PCI_EXT_PATCH_0 BIT_4
298#define PCI_EN_DUMMY_RD BIT_3 /* Enable Dummy Read */
299#define PCI_REV_DESC BIT_2 /* Reverse Desc. Bytes */
300 /* Bit 1: reserved */
301#define PCI_USEDATA64 BIT_0 /* Use 64Bit Data bus ext */
302
303
304/* Power Management Region */
305/* PCI_PM_CAP_REG 16 bit Power Management Capabilities */
306#define PCI_PME_SUP_MSK (0x1f<<11) /* Bit 15..11: PM Event Support Mask */
307#define PCI_PME_D3C_SUP BIT_15S /* PME from D3cold Support (if Vaux) */
308#define PCI_PME_D3H_SUP BIT_14S /* PME from D3hot Support */
309#define PCI_PME_D2_SUP BIT_13S /* PME from D2 Support */
310#define PCI_PME_D1_SUP BIT_12S /* PME from D1 Support */
311#define PCI_PME_D0_SUP BIT_11S /* PME from D0 Support */
312#define PCI_PM_D2_SUP BIT_10S /* D2 Support in 33 MHz mode */
313#define PCI_PM_D1_SUP BIT_9S /* D1 Support */
314 /* Bit 8.. 6: reserved */
315#define PCI_PM_DSI BIT_5S /* Device Specific Initialization */
316#define PCI_PM_APS BIT_4S /* Auxialiary Power Source */
317#define PCI_PME_CLOCK BIT_3S /* PM Event Clock */
318#define PCI_PM_VER_MSK 7 /* Bit 2.. 0: PM PCI Spec. version */
319
320/* PCI_PM_CTL_STS 16 bit Power Management Control/Status */
321#define PCI_PME_STATUS BIT_15S /* PME Status (YUKON only) */
322#define PCI_PM_DAT_SCL (3<<13) /* Bit 14..13: Data Reg. scaling factor */
323#define PCI_PM_DAT_SEL (0xf<<9) /* Bit 12.. 9: PM data selector field */
324#define PCI_PME_EN BIT_8S /* Enable PME# generation (YUKON only) */
325 /* Bit 7.. 2: reserved */
326#define PCI_PM_STATE_MSK 3 /* Bit 1.. 0: Power Management State */
327
328#define PCI_PM_STATE_D0 0 /* D0: Operational (default) */
329#define PCI_PM_STATE_D1 1 /* D1: (YUKON only) */
330#define PCI_PM_STATE_D2 2 /* D2: (YUKON only) */
331#define PCI_PM_STATE_D3 3 /* D3: HOT, Power Down and Reset */
332
333/* VPD Region */
334/* PCI_VPD_ADR_REG 16 bit VPD Address Register */
335#define PCI_VPD_FLAG BIT_15S /* starts VPD rd/wr cycle */
336#define PCI_VPD_ADR_MSK 0x7fffL /* Bit 14.. 0: VPD address mask */
337
338/* Control Register File (Address Map) */
339
340/*
341 * Bank 0
342 */
343#define B0_RAP 0x0000 /* 8 bit Register Address Port */
344 /* 0x0001 - 0x0003: reserved */
345#define B0_CTST 0x0004 /* 16 bit Control/Status register */
346#define B0_LED 0x0006 /* 8 Bit LED register */
347#define B0_POWER_CTRL 0x0007 /* 8 Bit Power Control reg (YUKON only) */
348#define B0_ISRC 0x0008 /* 32 bit Interrupt Source Register */
349#define B0_IMSK 0x000c /* 32 bit Interrupt Mask Register */
350#define B0_HWE_ISRC 0x0010 /* 32 bit HW Error Interrupt Src Reg */
351#define B0_HWE_IMSK 0x0014 /* 32 bit HW Error Interrupt Mask Reg */
352#define B0_SP_ISRC 0x0018 /* 32 bit Special Interrupt Source Reg */
353 /* 0x001c: reserved */
354
355/* B0 XMAC 1 registers (GENESIS only) */
356#define B0_XM1_IMSK 0x0020 /* 16 bit r/w XMAC 1 Interrupt Mask Register*/
357 /* 0x0022 - 0x0027: reserved */
358#define B0_XM1_ISRC 0x0028 /* 16 bit ro XMAC 1 Interrupt Status Reg */
359 /* 0x002a - 0x002f: reserved */
360#define B0_XM1_PHY_ADDR 0x0030 /* 16 bit r/w XMAC 1 PHY Address Register */
361 /* 0x0032 - 0x0033: reserved */
362#define B0_XM1_PHY_DATA 0x0034 /* 16 bit r/w XMAC 1 PHY Data Register */
363 /* 0x0036 - 0x003f: reserved */
364
365/* B0 XMAC 2 registers (GENESIS only) */
366#define B0_XM2_IMSK 0x0040 /* 16 bit r/w XMAC 2 Interrupt Mask Register*/
367 /* 0x0042 - 0x0047: reserved */
368#define B0_XM2_ISRC 0x0048 /* 16 bit ro XMAC 2 Interrupt Status Reg */
369 /* 0x004a - 0x004f: reserved */
370#define B0_XM2_PHY_ADDR 0x0050 /* 16 bit r/w XMAC 2 PHY Address Register */
371 /* 0x0052 - 0x0053: reserved */
372#define B0_XM2_PHY_DATA 0x0054 /* 16 bit r/w XMAC 2 PHY Data Register */
373 /* 0x0056 - 0x005f: reserved */
374
375/* BMU Control Status Registers */
376#define B0_R1_CSR 0x0060 /* 32 bit BMU Ctrl/Stat Rx Queue 1 */
377#define B0_R2_CSR 0x0064 /* 32 bit BMU Ctrl/Stat Rx Queue 2 */
378#define B0_XS1_CSR 0x0068 /* 32 bit BMU Ctrl/Stat Sync Tx Queue 1 */
379#define B0_XA1_CSR 0x006c /* 32 bit BMU Ctrl/Stat Async Tx Queue 1*/
380#define B0_XS2_CSR 0x0070 /* 32 bit BMU Ctrl/Stat Sync Tx Queue 2 */
381#define B0_XA2_CSR 0x0074 /* 32 bit BMU Ctrl/Stat Async Tx Queue 2*/
382 /* 0x0078 - 0x007f: reserved */
383
384/*
385 * Bank 1
386 * - completely empty (this is the RAP Block window)
387 * Note: if RAP = 1 this page is reserved
388 */
389
390/*
391 * Bank 2
392 */
393/* NA reg = 48 bit Network Address Register, 3x16 or 8x8 bit readable */
394#define B2_MAC_1 0x0100 /* NA reg MAC Address 1 */
395 /* 0x0106 - 0x0107: reserved */
396#define B2_MAC_2 0x0108 /* NA reg MAC Address 2 */
397 /* 0x010e - 0x010f: reserved */
398#define B2_MAC_3 0x0110 /* NA reg MAC Address 3 */
399 /* 0x0116 - 0x0117: reserved */
400#define B2_CONN_TYP 0x0118 /* 8 bit Connector type */
401#define B2_PMD_TYP 0x0119 /* 8 bit PMD type */
402#define B2_MAC_CFG 0x011a /* 8 bit MAC Configuration / Chip Revision */
403#define B2_CHIP_ID 0x011b /* 8 bit Chip Identification Number */
404 /* Eprom registers are currently of no use */
405#define B2_E_0 0x011c /* 8 bit EPROM Byte 0 (ext. SRAM size */
406#define B2_E_1 0x011d /* 8 bit EPROM Byte 1 (PHY type) */
407#define B2_E_2 0x011e /* 8 bit EPROM Byte 2 */
408#define B2_E_3 0x011f /* 8 bit EPROM Byte 3 */
409#define B2_FAR 0x0120 /* 32 bit Flash-Prom Addr Reg/Cnt */
410#define B2_FDP 0x0124 /* 8 bit Flash-Prom Data Port */
411 /* 0x0125 - 0x0127: reserved */
412#define B2_LD_CTRL 0x0128 /* 8 bit EPROM loader control register */
413#define B2_LD_TEST 0x0129 /* 8 bit EPROM loader test register */
414 /* 0x012a - 0x012f: reserved */
415#define B2_TI_INI 0x0130 /* 32 bit Timer Init Value */
416#define B2_TI_VAL 0x0134 /* 32 bit Timer Value */
417#define B2_TI_CTRL 0x0138 /* 8 bit Timer Control */
418#define B2_TI_TEST 0x0139 /* 8 Bit Timer Test */
419 /* 0x013a - 0x013f: reserved */
420#define B2_IRQM_INI 0x0140 /* 32 bit IRQ Moderation Timer Init Reg.*/
421#define B2_IRQM_VAL 0x0144 /* 32 bit IRQ Moderation Timer Value */
422#define B2_IRQM_CTRL 0x0148 /* 8 bit IRQ Moderation Timer Control */
423#define B2_IRQM_TEST 0x0149 /* 8 bit IRQ Moderation Timer Test */
424#define B2_IRQM_MSK 0x014c /* 32 bit IRQ Moderation Mask */
425#define B2_IRQM_HWE_MSK 0x0150 /* 32 bit IRQ Moderation HW Error Mask */
426 /* 0x0154 - 0x0157: reserved */
427#define B2_TST_CTRL1 0x0158 /* 8 bit Test Control Register 1 */
428#define B2_TST_CTRL2 0x0159 /* 8 bit Test Control Register 2 */
429 /* 0x015a - 0x015b: reserved */
430#define B2_GP_IO 0x015c /* 32 bit General Purpose I/O Register */
431#define B2_I2C_CTRL 0x0160 /* 32 bit I2C HW Control Register */
432#define B2_I2C_DATA 0x0164 /* 32 bit I2C HW Data Register */
433#define B2_I2C_IRQ 0x0168 /* 32 bit I2C HW IRQ Register */
434#define B2_I2C_SW 0x016c /* 32 bit I2C SW Port Register */
435
436/* Blink Source Counter (GENESIS only) */
437#define B2_BSC_INI 0x0170 /* 32 bit Blink Source Counter Init Val */
438#define B2_BSC_VAL 0x0174 /* 32 bit Blink Source Counter Value */
439#define B2_BSC_CTRL 0x0178 /* 8 bit Blink Source Counter Control */
440#define B2_BSC_STAT 0x0179 /* 8 bit Blink Source Counter Status */
441#define B2_BSC_TST 0x017a /* 16 bit Blink Source Counter Test Reg */
442 /* 0x017c - 0x017f: reserved */
443
444/*
445 * Bank 3
446 */
447/* RAM Random Registers */
448#define B3_RAM_ADDR 0x0180 /* 32 bit RAM Address, to read or write */
449#define B3_RAM_DATA_LO 0x0184 /* 32 bit RAM Data Word (low dWord) */
450#define B3_RAM_DATA_HI 0x0188 /* 32 bit RAM Data Word (high dWord) */
451 /* 0x018c - 0x018f: reserved */
452
453/* RAM Interface Registers */
454/*
455 * The HW-Spec. calls this registers Timeout Value 0..11. But this names are
456 * not usable in SW. Please notice these are NOT real timeouts, these are
457 * the number of qWords transferred continuously.
458 */
459#define B3_RI_WTO_R1 0x0190 /* 8 bit WR Timeout Queue R1 (TO0) */
460#define B3_RI_WTO_XA1 0x0191 /* 8 bit WR Timeout Queue XA1 (TO1) */
461#define B3_RI_WTO_XS1 0x0192 /* 8 bit WR Timeout Queue XS1 (TO2) */
462#define B3_RI_RTO_R1 0x0193 /* 8 bit RD Timeout Queue R1 (TO3) */
463#define B3_RI_RTO_XA1 0x0194 /* 8 bit RD Timeout Queue XA1 (TO4) */
464#define B3_RI_RTO_XS1 0x0195 /* 8 bit RD Timeout Queue XS1 (TO5) */
465#define B3_RI_WTO_R2 0x0196 /* 8 bit WR Timeout Queue R2 (TO6) */
466#define B3_RI_WTO_XA2 0x0197 /* 8 bit WR Timeout Queue XA2 (TO7) */
467#define B3_RI_WTO_XS2 0x0198 /* 8 bit WR Timeout Queue XS2 (TO8) */
468#define B3_RI_RTO_R2 0x0199 /* 8 bit RD Timeout Queue R2 (TO9) */
469#define B3_RI_RTO_XA2 0x019a /* 8 bit RD Timeout Queue XA2 (TO10)*/
470#define B3_RI_RTO_XS2 0x019b /* 8 bit RD Timeout Queue XS2 (TO11)*/
471#define B3_RI_TO_VAL 0x019c /* 8 bit Current Timeout Count Val */
472 /* 0x019d - 0x019f: reserved */
473#define B3_RI_CTRL 0x01a0 /* 16 bit RAM Interface Control Register */
474#define B3_RI_TEST 0x01a2 /* 8 bit RAM Interface Test Register */
475 /* 0x01a3 - 0x01af: reserved */
476
477/* MAC Arbiter Registers (GENESIS only) */
478/* these are the no. of qWord transferred continuously and NOT real timeouts */
479#define B3_MA_TOINI_RX1 0x01b0 /* 8 bit Timeout Init Val Rx Path MAC 1 */
480#define B3_MA_TOINI_RX2 0x01b1 /* 8 bit Timeout Init Val Rx Path MAC 2 */
481#define B3_MA_TOINI_TX1 0x01b2 /* 8 bit Timeout Init Val Tx Path MAC 1 */
482#define B3_MA_TOINI_TX2 0x01b3 /* 8 bit Timeout Init Val Tx Path MAC 2 */
483#define B3_MA_TOVAL_RX1 0x01b4 /* 8 bit Timeout Value Rx Path MAC 1 */
484#define B3_MA_TOVAL_RX2 0x01b5 /* 8 bit Timeout Value Rx Path MAC 1 */
485#define B3_MA_TOVAL_TX1 0x01b6 /* 8 bit Timeout Value Tx Path MAC 2 */
486#define B3_MA_TOVAL_TX2 0x01b7 /* 8 bit Timeout Value Tx Path MAC 2 */
487#define B3_MA_TO_CTRL 0x01b8 /* 16 bit MAC Arbiter Timeout Ctrl Reg */
488#define B3_MA_TO_TEST 0x01ba /* 16 bit MAC Arbiter Timeout Test Reg */
489 /* 0x01bc - 0x01bf: reserved */
490#define B3_MA_RCINI_RX1 0x01c0 /* 8 bit Recovery Init Val Rx Path MAC 1 */
491#define B3_MA_RCINI_RX2 0x01c1 /* 8 bit Recovery Init Val Rx Path MAC 2 */
492#define B3_MA_RCINI_TX1 0x01c2 /* 8 bit Recovery Init Val Tx Path MAC 1 */
493#define B3_MA_RCINI_TX2 0x01c3 /* 8 bit Recovery Init Val Tx Path MAC 2 */
494#define B3_MA_RCVAL_RX1 0x01c4 /* 8 bit Recovery Value Rx Path MAC 1 */
495#define B3_MA_RCVAL_RX2 0x01c5 /* 8 bit Recovery Value Rx Path MAC 1 */
496#define B3_MA_RCVAL_TX1 0x01c6 /* 8 bit Recovery Value Tx Path MAC 2 */
497#define B3_MA_RCVAL_TX2 0x01c7 /* 8 bit Recovery Value Tx Path MAC 2 */
498#define B3_MA_RC_CTRL 0x01c8 /* 16 bit MAC Arbiter Recovery Ctrl Reg */
499#define B3_MA_RC_TEST 0x01ca /* 16 bit MAC Arbiter Recovery Test Reg */
500 /* 0x01cc - 0x01cf: reserved */
501
502/* Packet Arbiter Registers (GENESIS only) */
503/* these are real timeouts */
504#define B3_PA_TOINI_RX1 0x01d0 /* 16 bit Timeout Init Val Rx Path MAC 1 */
505 /* 0x01d2 - 0x01d3: reserved */
506#define B3_PA_TOINI_RX2 0x01d4 /* 16 bit Timeout Init Val Rx Path MAC 2 */
507 /* 0x01d6 - 0x01d7: reserved */
508#define B3_PA_TOINI_TX1 0x01d8 /* 16 bit Timeout Init Val Tx Path MAC 1 */
509 /* 0x01da - 0x01db: reserved */
510#define B3_PA_TOINI_TX2 0x01dc /* 16 bit Timeout Init Val Tx Path MAC 2 */
511 /* 0x01de - 0x01df: reserved */
512#define B3_PA_TOVAL_RX1 0x01e0 /* 16 bit Timeout Val Rx Path MAC 1 */
513 /* 0x01e2 - 0x01e3: reserved */
514#define B3_PA_TOVAL_RX2 0x01e4 /* 16 bit Timeout Val Rx Path MAC 2 */
515 /* 0x01e6 - 0x01e7: reserved */
516#define B3_PA_TOVAL_TX1 0x01e8 /* 16 bit Timeout Val Tx Path MAC 1 */
517 /* 0x01ea - 0x01eb: reserved */
518#define B3_PA_TOVAL_TX2 0x01ec /* 16 bit Timeout Val Tx Path MAC 2 */
519 /* 0x01ee - 0x01ef: reserved */
520#define B3_PA_CTRL 0x01f0 /* 16 bit Packet Arbiter Ctrl Register */
521#define B3_PA_TEST 0x01f2 /* 16 bit Packet Arbiter Test Register */
522 /* 0x01f4 - 0x01ff: reserved */
523
524/*
525 * Bank 4 - 5
526 */
527/* Transmit Arbiter Registers MAC 1 and 2, use MR_ADDR() to access */
528#define TXA_ITI_INI 0x0200 /* 32 bit Tx Arb Interval Timer Init Val*/
529#define TXA_ITI_VAL 0x0204 /* 32 bit Tx Arb Interval Timer Value */
530#define TXA_LIM_INI 0x0208 /* 32 bit Tx Arb Limit Counter Init Val */
531#define TXA_LIM_VAL 0x020c /* 32 bit Tx Arb Limit Counter Value */
532#define TXA_CTRL 0x0210 /* 8 bit Tx Arbiter Control Register */
533#define TXA_TEST 0x0211 /* 8 bit Tx Arbiter Test Register */
534#define TXA_STAT 0x0212 /* 8 bit Tx Arbiter Status Register */
535 /* 0x0213 - 0x027f: reserved */
536 /* 0x0280 - 0x0292: MAC 2 */
537 /* 0x0213 - 0x027f: reserved */
538
539/*
540 * Bank 6
541 */
542/* External registers (GENESIS only) */
543#define B6_EXT_REG 0x0300
544
545/*
546 * Bank 7
547 */
548/* This is a copy of the Configuration register file (lower half) */
549#define B7_CFG_SPC 0x0380
550
551/*
552 * Bank 8 - 15
553 */
554/* Receive and Transmit Queue Registers, use Q_ADDR() to access */
555#define B8_Q_REGS 0x0400
556
557/* Queue Register Offsets, use Q_ADDR() to access */
558#define Q_D 0x00 /* 8*32 bit Current Descriptor */
559#define Q_DA_L 0x20 /* 32 bit Current Descriptor Address Low dWord */
560#define Q_DA_H 0x24 /* 32 bit Current Descriptor Address High dWord */
561#define Q_AC_L 0x28 /* 32 bit Current Address Counter Low dWord */
562#define Q_AC_H 0x2c /* 32 bit Current Address Counter High dWord */
563#define Q_BC 0x30 /* 32 bit Current Byte Counter */
564#define Q_CSR 0x34 /* 32 bit BMU Control/Status Register */
565#define Q_F 0x38 /* 32 bit Flag Register */
566#define Q_T1 0x3c /* 32 bit Test Register 1 */
567#define Q_T1_TR 0x3c /* 8 bit Test Register 1 Transfer SM */
568#define Q_T1_WR 0x3d /* 8 bit Test Register 1 Write Descriptor SM */
569#define Q_T1_RD 0x3e /* 8 bit Test Register 1 Read Descriptor SM */
570#define Q_T1_SV 0x3f /* 8 bit Test Register 1 Supervisor SM */
571#define Q_T2 0x40 /* 32 bit Test Register 2 */
572#define Q_T3 0x44 /* 32 bit Test Register 3 */
573 /* 0x48 - 0x7f: reserved */
574
575/*
576 * Bank 16 - 23
577 */
578/* RAM Buffer Registers */
579#define B16_RAM_REGS 0x0800
580
581/* RAM Buffer Register Offsets, use RB_ADDR() to access */
582#define RB_START 0x00 /* 32 bit RAM Buffer Start Address */
583#define RB_END 0x04 /* 32 bit RAM Buffer End Address */
584#define RB_WP 0x08 /* 32 bit RAM Buffer Write Pointer */
585#define RB_RP 0x0c /* 32 bit RAM Buffer Read Pointer */
586#define RB_RX_UTPP 0x10 /* 32 bit Rx Upper Threshold, Pause Pack */
587#define RB_RX_LTPP 0x14 /* 32 bit Rx Lower Threshold, Pause Pack */
588#define RB_RX_UTHP 0x18 /* 32 bit Rx Upper Threshold, High Prio */
589#define RB_RX_LTHP 0x1c /* 32 bit Rx Lower Threshold, High Prio */
590 /* 0x10 - 0x1f: reserved at Tx RAM Buffer Registers */
591#define RB_PC 0x20 /* 32 bit RAM Buffer Packet Counter */
592#define RB_LEV 0x24 /* 32 bit RAM Buffer Level Register */
593#define RB_CTRL 0x28 /* 8 bit RAM Buffer Control Register */
594#define RB_TST1 0x29 /* 8 bit RAM Buffer Test Register 1 */
595#define RB_TST2 0x2A /* 8 bit RAM Buffer Test Register 2 */
596 /* 0x2c - 0x7f: reserved */
597
598/*
599 * Bank 24
600 */
601/*
602 * Receive MAC FIFO, Receive LED, and Link_Sync regs (GENESIS only)
603 * use MR_ADDR() to access
604 */
605#define RX_MFF_EA 0x0c00 /* 32 bit Receive MAC FIFO End Address */
606#define RX_MFF_WP 0x0c04 /* 32 bit Receive MAC FIFO Write Pointer */
607 /* 0x0c08 - 0x0c0b: reserved */
608#define RX_MFF_RP 0x0c0c /* 32 bit Receive MAC FIFO Read Pointer */
609#define RX_MFF_PC 0x0c10 /* 32 bit Receive MAC FIFO Packet Cnt */
610#define RX_MFF_LEV 0x0c14 /* 32 bit Receive MAC FIFO Level */
611#define RX_MFF_CTRL1 0x0c18 /* 16 bit Receive MAC FIFO Control Reg 1*/
612#define RX_MFF_STAT_TO 0x0c1a /* 8 bit Receive MAC Status Timeout */
613#define RX_MFF_TIST_TO 0x0c1b /* 8 bit Receive MAC Time Stamp Timeout */
614#define RX_MFF_CTRL2 0x0c1c /* 8 bit Receive MAC FIFO Control Reg 2*/
615#define RX_MFF_TST1 0x0c1d /* 8 bit Receive MAC FIFO Test Reg 1 */
616#define RX_MFF_TST2 0x0c1e /* 8 bit Receive MAC FIFO Test Reg 2 */
617 /* 0x0c1f: reserved */
618#define RX_LED_INI 0x0c20 /* 32 bit Receive LED Cnt Init Value */
619#define RX_LED_VAL 0x0c24 /* 32 bit Receive LED Cnt Current Value */
620#define RX_LED_CTRL 0x0c28 /* 8 bit Receive LED Cnt Control Reg */
621#define RX_LED_TST 0x0c29 /* 8 bit Receive LED Cnt Test Register */
622 /* 0x0c2a - 0x0c2f: reserved */
623#define LNK_SYNC_INI 0x0c30 /* 32 bit Link Sync Cnt Init Value */
624#define LNK_SYNC_VAL 0x0c34 /* 32 bit Link Sync Cnt Current Value */
625#define LNK_SYNC_CTRL 0x0c38 /* 8 bit Link Sync Cnt Control Register */
626#define LNK_SYNC_TST 0x0c39 /* 8 bit Link Sync Cnt Test Register */
627 /* 0x0c3a - 0x0c3b: reserved */
628#define LNK_LED_REG 0x0c3c /* 8 bit Link LED Register */
629 /* 0x0c3d - 0x0c3f: reserved */
630
631/* Receive GMAC FIFO (YUKON only), use MR_ADDR() to access */
632#define RX_GMF_EA 0x0c40 /* 32 bit Rx GMAC FIFO End Address */
633#define RX_GMF_AF_THR 0x0c44 /* 32 bit Rx GMAC FIFO Almost Full Thresh. */
634#define RX_GMF_CTRL_T 0x0c48 /* 32 bit Rx GMAC FIFO Control/Test */
635#define RX_GMF_FL_MSK 0x0c4c /* 32 bit Rx GMAC FIFO Flush Mask */
636#define RX_GMF_FL_THR 0x0c50 /* 32 bit Rx GMAC FIFO Flush Threshold */
637 /* 0x0c54 - 0x0c5f: reserved */
638#define RX_GMF_WP 0x0c60 /* 32 bit Rx GMAC FIFO Write Pointer */
639 /* 0x0c64 - 0x0c67: reserved */
640#define RX_GMF_WLEV 0x0c68 /* 32 bit Rx GMAC FIFO Write Level */
641 /* 0x0c6c - 0x0c6f: reserved */
642#define RX_GMF_RP 0x0c70 /* 32 bit Rx GMAC FIFO Read Pointer */
643 /* 0x0c74 - 0x0c77: reserved */
644#define RX_GMF_RLEV 0x0c78 /* 32 bit Rx GMAC FIFO Read Level */
645 /* 0x0c7c - 0x0c7f: reserved */
646
647/*
648 * Bank 25
649 */
650 /* 0x0c80 - 0x0cbf: MAC 2 */
651 /* 0x0cc0 - 0x0cff: reserved */
652
653/*
654 * Bank 26
655 */
656/*
657 * Transmit MAC FIFO and Transmit LED Registers (GENESIS only),
658 * use MR_ADDR() to access
659 */
660#define TX_MFF_EA 0x0d00 /* 32 bit Transmit MAC FIFO End Address */
661#define TX_MFF_WP 0x0d04 /* 32 bit Transmit MAC FIFO WR Pointer */
662#define TX_MFF_WSP 0x0d08 /* 32 bit Transmit MAC FIFO WR Shadow Ptr */
663#define TX_MFF_RP 0x0d0c /* 32 bit Transmit MAC FIFO RD Pointer */
664#define TX_MFF_PC 0x0d10 /* 32 bit Transmit MAC FIFO Packet Cnt */
665#define TX_MFF_LEV 0x0d14 /* 32 bit Transmit MAC FIFO Level */
666#define TX_MFF_CTRL1 0x0d18 /* 16 bit Transmit MAC FIFO Ctrl Reg 1 */
667#define TX_MFF_WAF 0x0d1a /* 8 bit Transmit MAC Wait after flush */
668 /* 0x0c1b: reserved */
669#define TX_MFF_CTRL2 0x0d1c /* 8 bit Transmit MAC FIFO Ctrl Reg 2 */
670#define TX_MFF_TST1 0x0d1d /* 8 bit Transmit MAC FIFO Test Reg 1 */
671#define TX_MFF_TST2 0x0d1e /* 8 bit Transmit MAC FIFO Test Reg 2 */
672 /* 0x0d1f: reserved */
673#define TX_LED_INI 0x0d20 /* 32 bit Transmit LED Cnt Init Value */
674#define TX_LED_VAL 0x0d24 /* 32 bit Transmit LED Cnt Current Val */
675#define TX_LED_CTRL 0x0d28 /* 8 bit Transmit LED Cnt Control Reg */
676#define TX_LED_TST 0x0d29 /* 8 bit Transmit LED Cnt Test Reg */
677 /* 0x0d2a - 0x0d3f: reserved */
678
679/* Transmit GMAC FIFO (YUKON only), use MR_ADDR() to access */
680#define TX_GMF_EA 0x0d40 /* 32 bit Tx GMAC FIFO End Address */
681#define TX_GMF_AE_THR 0x0d44 /* 32 bit Tx GMAC FIFO Almost Empty Thresh.*/
682#define TX_GMF_CTRL_T 0x0d48 /* 32 bit Tx GMAC FIFO Control/Test */
683 /* 0x0d4c - 0x0d5f: reserved */
684#define TX_GMF_WP 0x0d60 /* 32 bit Tx GMAC FIFO Write Pointer */
685#define TX_GMF_WSP 0x0d64 /* 32 bit Tx GMAC FIFO Write Shadow Ptr. */
686#define TX_GMF_WLEV 0x0d68 /* 32 bit Tx GMAC FIFO Write Level */
687 /* 0x0d6c - 0x0d6f: reserved */
688#define TX_GMF_RP 0x0d70 /* 32 bit Tx GMAC FIFO Read Pointer */
689#define TX_GMF_RSTP 0x0d74 /* 32 bit Tx GMAC FIFO Restart Pointer */
690#define TX_GMF_RLEV 0x0d78 /* 32 bit Tx GMAC FIFO Read Level */
691 /* 0x0d7c - 0x0d7f: reserved */
692
693/*
694 * Bank 27
695 */
696 /* 0x0d80 - 0x0dbf: MAC 2 */
697 /* 0x0daa - 0x0dff: reserved */
698
699/*
700 * Bank 28
701 */
702/* Descriptor Poll Timer Registers */
703#define B28_DPT_INI 0x0e00 /* 24 bit Descriptor Poll Timer Init Val */
704#define B28_DPT_VAL 0x0e04 /* 24 bit Descriptor Poll Timer Curr Val */
705#define B28_DPT_CTRL 0x0e08 /* 8 bit Descriptor Poll Timer Ctrl Reg */
706 /* 0x0e09: reserved */
707#define B28_DPT_TST 0x0e0a /* 8 bit Descriptor Poll Timer Test Reg */
708 /* 0x0e0b: reserved */
709
710/* Time Stamp Timer Registers (YUKON only) */
711 /* 0x0e10: reserved */
712#define GMAC_TI_ST_VAL 0x0e14 /* 32 bit Time Stamp Timer Curr Val */
713#define GMAC_TI_ST_CTRL 0x0e18 /* 8 bit Time Stamp Timer Ctrl Reg */
714 /* 0x0e19: reserved */
715#define GMAC_TI_ST_TST 0x0e1a /* 8 bit Time Stamp Timer Test Reg */
716 /* 0x0e1b - 0x0e7f: reserved */
717
718/*
719 * Bank 29
720 */
721 /* 0x0e80 - 0x0efc: reserved */
722
723/*
724 * Bank 30
725 */
726/* GMAC and GPHY Control Registers (YUKON only) */
727#define GMAC_CTRL 0x0f00 /* 32 bit GMAC Control Reg */
728#define GPHY_CTRL 0x0f04 /* 32 bit GPHY Control Reg */
729#define GMAC_IRQ_SRC 0x0f08 /* 8 bit GMAC Interrupt Source Reg */
730 /* 0x0f09 - 0x0f0b: reserved */
731#define GMAC_IRQ_MSK 0x0f0c /* 8 bit GMAC Interrupt Mask Reg */
732 /* 0x0f0d - 0x0f0f: reserved */
733#define GMAC_LINK_CTRL 0x0f10 /* 16 bit Link Control Reg */
734 /* 0x0f14 - 0x0f1f: reserved */
735
736/* Wake-up Frame Pattern Match Control Registers (YUKON only) */
737
738#define WOL_REG_OFFS 0x20 /* HW-Bug: Address is + 0x20 against spec. */
739
740#define WOL_CTRL_STAT 0x0f20 /* 16 bit WOL Control/Status Reg */
741#define WOL_MATCH_CTL 0x0f22 /* 8 bit WOL Match Control Reg */
742#define WOL_MATCH_RES 0x0f23 /* 8 bit WOL Match Result Reg */
743#define WOL_MAC_ADDR_LO 0x0f24 /* 32 bit WOL MAC Address Low */
744#define WOL_MAC_ADDR_HI 0x0f28 /* 16 bit WOL MAC Address High */
745#define WOL_PATT_RPTR 0x0f2c /* 8 bit WOL Pattern Read Ptr */
746
747/* use this macro to access above registers */
748#define WOL_REG(Reg) ((Reg) + (pAC->GIni.GIWolOffs))
749
750
751/* WOL Pattern Length Registers (YUKON only) */
752
753#define WOL_PATT_LEN_LO 0x0f30 /* 32 bit WOL Pattern Length 3..0 */
754#define WOL_PATT_LEN_HI 0x0f34 /* 24 bit WOL Pattern Length 6..4 */
755
756/* WOL Pattern Counter Registers (YUKON only) */
757
758#define WOL_PATT_CNT_0 0x0f38 /* 32 bit WOL Pattern Counter 3..0 */
759#define WOL_PATT_CNT_4 0x0f3c /* 24 bit WOL Pattern Counter 6..4 */
760 /* 0x0f40 - 0x0f7f: reserved */
761
762/*
763 * Bank 31
764 */
765/* 0x0f80 - 0x0fff: reserved */
766
767/*
768 * Bank 32 - 33
769 */
770#define WOL_PATT_RAM_1 0x1000 /* WOL Pattern RAM Link 1 */
771
772/*
773 * Bank 0x22 - 0x3f
774 */
775/* 0x1100 - 0x1fff: reserved */
776
777/*
778 * Bank 0x40 - 0x4f
779 */
780#define BASE_XMAC_1 0x2000 /* XMAC 1 registers */
781
782/*
783 * Bank 0x50 - 0x5f
784 */
785
786#define BASE_GMAC_1 0x2800 /* GMAC 1 registers */
787
788/*
789 * Bank 0x60 - 0x6f
790 */
791#define BASE_XMAC_2 0x3000 /* XMAC 2 registers */
792
793/*
794 * Bank 0x70 - 0x7f
795 */
796#define BASE_GMAC_2 0x3800 /* GMAC 2 registers */
797
798/*
799 * Control Register Bit Definitions:
800 */
801/* B0_RAP 8 bit Register Address Port */
802 /* Bit 7: reserved */
803#define RAP_RAP 0x3f /* Bit 6..0: 0 = block 0,..,6f = block 6f */
804
805/* B0_CTST 16 bit Control/Status register */
806 /* Bit 15..14: reserved */
807#define CS_CLK_RUN_HOT BIT_13S /* CLK_RUN hot m. (YUKON-Lite only) */
808#define CS_CLK_RUN_RST BIT_12S /* CLK_RUN reset (YUKON-Lite only) */
809#define CS_CLK_RUN_ENA BIT_11S /* CLK_RUN enable (YUKON-Lite only) */
810#define CS_VAUX_AVAIL BIT_10S /* VAUX available (YUKON only) */
811#define CS_BUS_CLOCK BIT_9S /* Bus Clock 0/1 = 33/66 MHz */
812#define CS_BUS_SLOT_SZ BIT_8S /* Slot Size 0/1 = 32/64 bit slot */
813#define CS_ST_SW_IRQ BIT_7S /* Set IRQ SW Request */
814#define CS_CL_SW_IRQ BIT_6S /* Clear IRQ SW Request */
815#define CS_STOP_DONE BIT_5S /* Stop Master is finished */
816#define CS_STOP_MAST BIT_4S /* Command Bit to stop the master */
817#define CS_MRST_CLR BIT_3S /* Clear Master reset */
818#define CS_MRST_SET BIT_2S /* Set Master reset */
819#define CS_RST_CLR BIT_1S /* Clear Software reset */
820#define CS_RST_SET BIT_0S /* Set Software reset */
821
822/* B0_LED 8 Bit LED register */
823 /* Bit 7.. 2: reserved */
824#define LED_STAT_ON BIT_1S /* Status LED on */
825#define LED_STAT_OFF BIT_0S /* Status LED off */
826
827/* B0_POWER_CTRL 8 Bit Power Control reg (YUKON only) */
828#define PC_VAUX_ENA BIT_7 /* Switch VAUX Enable */
829#define PC_VAUX_DIS BIT_6 /* Switch VAUX Disable */
830#define PC_VCC_ENA BIT_5 /* Switch VCC Enable */
831#define PC_VCC_DIS BIT_4 /* Switch VCC Disable */
832#define PC_VAUX_ON BIT_3 /* Switch VAUX On */
833#define PC_VAUX_OFF BIT_2 /* Switch VAUX Off */
834#define PC_VCC_ON BIT_1 /* Switch VCC On */
835#define PC_VCC_OFF BIT_0 /* Switch VCC Off */
836
837/* B0_ISRC 32 bit Interrupt Source Register */
838/* B0_IMSK 32 bit Interrupt Mask Register */
839/* B0_SP_ISRC 32 bit Special Interrupt Source Reg */
840/* B2_IRQM_MSK 32 bit IRQ Moderation Mask */
841#define IS_ALL_MSK 0xbfffffffUL /* All Interrupt bits */
842#define IS_HW_ERR BIT_31 /* Interrupt HW Error */
843 /* Bit 30: reserved */
844#define IS_PA_TO_RX1 BIT_29 /* Packet Arb Timeout Rx1 */
845#define IS_PA_TO_RX2 BIT_28 /* Packet Arb Timeout Rx2 */
846#define IS_PA_TO_TX1 BIT_27 /* Packet Arb Timeout Tx1 */
847#define IS_PA_TO_TX2 BIT_26 /* Packet Arb Timeout Tx2 */
848#define IS_I2C_READY BIT_25 /* IRQ on end of I2C Tx */
849#define IS_IRQ_SW BIT_24 /* SW forced IRQ */
850#define IS_EXT_REG BIT_23 /* IRQ from LM80 or PHY (GENESIS only) */
851 /* IRQ from PHY (YUKON only) */
852#define IS_TIMINT BIT_22 /* IRQ from Timer */
853#define IS_MAC1 BIT_21 /* IRQ from MAC 1 */
854#define IS_LNK_SYNC_M1 BIT_20 /* Link Sync Cnt wrap MAC 1 */
855#define IS_MAC2 BIT_19 /* IRQ from MAC 2 */
856#define IS_LNK_SYNC_M2 BIT_18 /* Link Sync Cnt wrap MAC 2 */
857/* Receive Queue 1 */
858#define IS_R1_B BIT_17 /* Q_R1 End of Buffer */
859#define IS_R1_F BIT_16 /* Q_R1 End of Frame */
860#define IS_R1_C BIT_15 /* Q_R1 Encoding Error */
861/* Receive Queue 2 */
862#define IS_R2_B BIT_14 /* Q_R2 End of Buffer */
863#define IS_R2_F BIT_13 /* Q_R2 End of Frame */
864#define IS_R2_C BIT_12 /* Q_R2 Encoding Error */
865/* Synchronous Transmit Queue 1 */
866#define IS_XS1_B BIT_11 /* Q_XS1 End of Buffer */
867#define IS_XS1_F BIT_10 /* Q_XS1 End of Frame */
868#define IS_XS1_C BIT_9 /* Q_XS1 Encoding Error */
869/* Asynchronous Transmit Queue 1 */
870#define IS_XA1_B BIT_8 /* Q_XA1 End of Buffer */
871#define IS_XA1_F BIT_7 /* Q_XA1 End of Frame */
872#define IS_XA1_C BIT_6 /* Q_XA1 Encoding Error */
873/* Synchronous Transmit Queue 2 */
874#define IS_XS2_B BIT_5 /* Q_XS2 End of Buffer */
875#define IS_XS2_F BIT_4 /* Q_XS2 End of Frame */
876#define IS_XS2_C BIT_3 /* Q_XS2 Encoding Error */
877/* Asynchronous Transmit Queue 2 */
878#define IS_XA2_B BIT_2 /* Q_XA2 End of Buffer */
879#define IS_XA2_F BIT_1 /* Q_XA2 End of Frame */
880#define IS_XA2_C BIT_0 /* Q_XA2 Encoding Error */
881
882
883/* B0_HWE_ISRC 32 bit HW Error Interrupt Src Reg */
884/* B0_HWE_IMSK 32 bit HW Error Interrupt Mask Reg */
885/* B2_IRQM_HWE_MSK 32 bit IRQ Moderation HW Error Mask */
886#define IS_ERR_MSK 0x00000fffL /* All Error bits */
887 /* Bit 31..14: reserved */
888#define IS_IRQ_TIST_OV BIT_13 /* Time Stamp Timer Overflow (YUKON only) */
889#define IS_IRQ_SENSOR BIT_12 /* IRQ from Sensor (YUKON only) */
890#define IS_IRQ_MST_ERR BIT_11 /* IRQ master error detected */
891#define IS_IRQ_STAT BIT_10 /* IRQ status exception */
892#define IS_NO_STAT_M1 BIT_9 /* No Rx Status from MAC 1 */
893#define IS_NO_STAT_M2 BIT_8 /* No Rx Status from MAC 2 */
894#define IS_NO_TIST_M1 BIT_7 /* No Time Stamp from MAC 1 */
895#define IS_NO_TIST_M2 BIT_6 /* No Time Stamp from MAC 2 */
896#define IS_RAM_RD_PAR BIT_5 /* RAM Read Parity Error */
897#define IS_RAM_WR_PAR BIT_4 /* RAM Write Parity Error */
898#define IS_M1_PAR_ERR BIT_3 /* MAC 1 Parity Error */
899#define IS_M2_PAR_ERR BIT_2 /* MAC 2 Parity Error */
900#define IS_R1_PAR_ERR BIT_1 /* Queue R1 Parity Error */
901#define IS_R2_PAR_ERR BIT_0 /* Queue R2 Parity Error */
902
903/* B2_CONN_TYP 8 bit Connector type */
904/* B2_PMD_TYP 8 bit PMD type */
905/* Values of connector and PMD type comply to SysKonnect internal std */
906
907/* B2_MAC_CFG 8 bit MAC Configuration / Chip Revision */
908#define CFG_CHIP_R_MSK (0xf<<4) /* Bit 7.. 4: Chip Revision */
909 /* Bit 3.. 2: reserved */
910#define CFG_DIS_M2_CLK BIT_1S /* Disable Clock for 2nd MAC */
911#define CFG_SNG_MAC BIT_0S /* MAC Config: 0=2 MACs / 1=1 MAC*/
912
913/* B2_CHIP_ID 8 bit Chip Identification Number */
914#define CHIP_ID_GENESIS 0x0a /* Chip ID for GENESIS */
915#define CHIP_ID_YUKON 0xb0 /* Chip ID for YUKON */
916#define CHIP_ID_YUKON_LITE 0xb1 /* Chip ID for YUKON-Lite (Rev. A1-A3) */
917#define CHIP_ID_YUKON_LP 0xb2 /* Chip ID for YUKON-LP */
918
919#define CHIP_REV_YU_LITE_A1 3 /* Chip Rev. for YUKON-Lite A1,A2 */
920#define CHIP_REV_YU_LITE_A3 7 /* Chip Rev. for YUKON-Lite A3 */
921
922/* B2_FAR 32 bit Flash-Prom Addr Reg/Cnt */
923#define FAR_ADDR 0x1ffffL /* Bit 16.. 0: FPROM Address mask */
924
925/* B2_LD_CTRL 8 bit EPROM loader control register */
926/* Bits are currently reserved */
927
928/* B2_LD_TEST 8 bit EPROM loader test register */
929 /* Bit 7.. 4: reserved */
930#define LD_T_ON BIT_3S /* Loader Test mode on */
931#define LD_T_OFF BIT_2S /* Loader Test mode off */
932#define LD_T_STEP BIT_1S /* Decrement FPROM addr. Counter */
933#define LD_START BIT_0S /* Start loading FPROM */
934
935/*
936 * Timer Section
937 */
938/* B2_TI_CTRL 8 bit Timer control */
939/* B2_IRQM_CTRL 8 bit IRQ Moderation Timer Control */
940 /* Bit 7.. 3: reserved */
941#define TIM_START BIT_2S /* Start Timer */
942#define TIM_STOP BIT_1S /* Stop Timer */
943#define TIM_CLR_IRQ BIT_0S /* Clear Timer IRQ (!IRQM) */
944
945/* B2_TI_TEST 8 Bit Timer Test */
946/* B2_IRQM_TEST 8 bit IRQ Moderation Timer Test */
947/* B28_DPT_TST 8 bit Descriptor Poll Timer Test Reg */
948 /* Bit 7.. 3: reserved */
949#define TIM_T_ON BIT_2S /* Test mode on */
950#define TIM_T_OFF BIT_1S /* Test mode off */
951#define TIM_T_STEP BIT_0S /* Test step */
952
953/* B28_DPT_INI 32 bit Descriptor Poll Timer Init Val */
954/* B28_DPT_VAL 32 bit Descriptor Poll Timer Curr Val */
955 /* Bit 31..24: reserved */
956#define DPT_MSK 0x00ffffffL /* Bit 23.. 0: Desc Poll Timer Bits */
957
958/* B28_DPT_CTRL 8 bit Descriptor Poll Timer Ctrl Reg */
959 /* Bit 7.. 2: reserved */
960#define DPT_START BIT_1S /* Start Descriptor Poll Timer */
961#define DPT_STOP BIT_0S /* Stop Descriptor Poll Timer */
962
963/* B2_E_3 8 bit lower 4 bits used for HW self test result */
964#define B2_E3_RES_MASK 0x0f
965
966/* B2_TST_CTRL1 8 bit Test Control Register 1 */
967#define TST_FRC_DPERR_MR BIT_7S /* force DATAPERR on MST RD */
968#define TST_FRC_DPERR_MW BIT_6S /* force DATAPERR on MST WR */
969#define TST_FRC_DPERR_TR BIT_5S /* force DATAPERR on TRG RD */
970#define TST_FRC_DPERR_TW BIT_4S /* force DATAPERR on TRG WR */
971#define TST_FRC_APERR_M BIT_3S /* force ADDRPERR on MST */
972#define TST_FRC_APERR_T BIT_2S /* force ADDRPERR on TRG */
973#define TST_CFG_WRITE_ON BIT_1S /* Enable Config Reg WR */
974#define TST_CFG_WRITE_OFF BIT_0S /* Disable Config Reg WR */
975
976/* B2_TST_CTRL2 8 bit Test Control Register 2 */
977 /* Bit 7.. 4: reserved */
978 /* force the following error on the next master read/write */
979#define TST_FRC_DPERR_MR64 BIT_3S /* DataPERR RD 64 */
980#define TST_FRC_DPERR_MW64 BIT_2S /* DataPERR WR 64 */
981#define TST_FRC_APERR_1M64 BIT_1S /* AddrPERR on 1. phase */
982#define TST_FRC_APERR_2M64 BIT_0S /* AddrPERR on 2. phase */
983
984/* B2_GP_IO 32 bit General Purpose I/O Register */
985 /* Bit 31..26: reserved */
986#define GP_DIR_9 BIT_25 /* IO_9 direct, 0=In/1=Out */
987#define GP_DIR_8 BIT_24 /* IO_8 direct, 0=In/1=Out */
988#define GP_DIR_7 BIT_23 /* IO_7 direct, 0=In/1=Out */
989#define GP_DIR_6 BIT_22 /* IO_6 direct, 0=In/1=Out */
990#define GP_DIR_5 BIT_21 /* IO_5 direct, 0=In/1=Out */
991#define GP_DIR_4 BIT_20 /* IO_4 direct, 0=In/1=Out */
992#define GP_DIR_3 BIT_19 /* IO_3 direct, 0=In/1=Out */
993#define GP_DIR_2 BIT_18 /* IO_2 direct, 0=In/1=Out */
994#define GP_DIR_1 BIT_17 /* IO_1 direct, 0=In/1=Out */
995#define GP_DIR_0 BIT_16 /* IO_0 direct, 0=In/1=Out */
996 /* Bit 15..10: reserved */
997#define GP_IO_9 BIT_9 /* IO_9 pin */
998#define GP_IO_8 BIT_8 /* IO_8 pin */
999#define GP_IO_7 BIT_7 /* IO_7 pin */
1000#define GP_IO_6 BIT_6 /* IO_6 pin */
1001#define GP_IO_5 BIT_5 /* IO_5 pin */
1002#define GP_IO_4 BIT_4 /* IO_4 pin */
1003#define GP_IO_3 BIT_3 /* IO_3 pin */
1004#define GP_IO_2 BIT_2 /* IO_2 pin */
1005#define GP_IO_1 BIT_1 /* IO_1 pin */
1006#define GP_IO_0 BIT_0 /* IO_0 pin */
1007
1008/* B2_I2C_CTRL 32 bit I2C HW Control Register */
1009#define I2C_FLAG BIT_31 /* Start read/write if WR */
1010#define I2C_ADDR (0x7fffL<<16) /* Bit 30..16: Addr to be RD/WR */
1011#define I2C_DEV_SEL (0x7fL<<9) /* Bit 15.. 9: I2C Device Select */
1012 /* Bit 8.. 5: reserved */
1013#define I2C_BURST_LEN BIT_4 /* Burst Len, 1/4 bytes */
1014#define I2C_DEV_SIZE (7<<1) /* Bit 3.. 1: I2C Device Size */
1015#define I2C_025K_DEV (0<<1) /* 0: 256 Bytes or smal. */
1016#define I2C_05K_DEV (1<<1) /* 1: 512 Bytes */
1017#define I2C_1K_DEV (2<<1) /* 2: 1024 Bytes */
1018#define I2C_2K_DEV (3<<1) /* 3: 2048 Bytes */
1019#define I2C_4K_DEV (4<<1) /* 4: 4096 Bytes */
1020#define I2C_8K_DEV (5<<1) /* 5: 8192 Bytes */
1021#define I2C_16K_DEV (6<<1) /* 6: 16384 Bytes */
1022#define I2C_32K_DEV (7<<1) /* 7: 32768 Bytes */
1023#define I2C_STOP BIT_0 /* Interrupt I2C transfer */
1024
1025/* B2_I2C_IRQ 32 bit I2C HW IRQ Register */
1026 /* Bit 31.. 1 reserved */
1027#define I2C_CLR_IRQ BIT_0 /* Clear I2C IRQ */
1028
1029/* B2_I2C_SW 32 bit (8 bit access) I2C HW SW Port Register */
1030 /* Bit 7.. 3: reserved */
1031#define I2C_DATA_DIR BIT_2S /* direction of I2C_DATA */
1032#define I2C_DATA BIT_1S /* I2C Data Port */
1033#define I2C_CLK BIT_0S /* I2C Clock Port */
1034
1035/*
1036 * I2C Address
1037 */
1038#define I2C_SENS_ADDR LM80_ADDR /* I2C Sensor Address, (Volt and Temp)*/
1039
1040
1041/* B2_BSC_CTRL 8 bit Blink Source Counter Control */
1042 /* Bit 7.. 2: reserved */
1043#define BSC_START BIT_1S /* Start Blink Source Counter */
1044#define BSC_STOP BIT_0S /* Stop Blink Source Counter */
1045
1046/* B2_BSC_STAT 8 bit Blink Source Counter Status */
1047 /* Bit 7.. 1: reserved */
1048#define BSC_SRC BIT_0S /* Blink Source, 0=Off / 1=On */
1049
1050/* B2_BSC_TST 16 bit Blink Source Counter Test Reg */
1051#define BSC_T_ON BIT_2S /* Test mode on */
1052#define BSC_T_OFF BIT_1S /* Test mode off */
1053#define BSC_T_STEP BIT_0S /* Test step */
1054
1055
1056/* B3_RAM_ADDR 32 bit RAM Address, to read or write */
1057 /* Bit 31..19: reserved */
1058#define RAM_ADR_RAN 0x0007ffffL /* Bit 18.. 0: RAM Address Range */
1059
1060/* RAM Interface Registers */
1061/* B3_RI_CTRL 16 bit RAM Iface Control Register */
1062 /* Bit 15..10: reserved */
1063#define RI_CLR_RD_PERR BIT_9S /* Clear IRQ RAM Read Parity Err */
1064#define RI_CLR_WR_PERR BIT_8S /* Clear IRQ RAM Write Parity Err*/
1065 /* Bit 7.. 2: reserved */
1066#define RI_RST_CLR BIT_1S /* Clear RAM Interface Reset */
1067#define RI_RST_SET BIT_0S /* Set RAM Interface Reset */
1068
1069/* B3_RI_TEST 8 bit RAM Iface Test Register */
1070 /* Bit 15.. 4: reserved */
1071#define RI_T_EV BIT_3S /* Timeout Event occured */
1072#define RI_T_ON BIT_2S /* Timeout Timer Test On */
1073#define RI_T_OFF BIT_1S /* Timeout Timer Test Off */
1074#define RI_T_STEP BIT_0S /* Timeout Timer Step */
1075
1076/* MAC Arbiter Registers */
1077/* B3_MA_TO_CTRL 16 bit MAC Arbiter Timeout Ctrl Reg */
1078 /* Bit 15.. 4: reserved */
1079#define MA_FOE_ON BIT_3S /* XMAC Fast Output Enable ON */
1080#define MA_FOE_OFF BIT_2S /* XMAC Fast Output Enable OFF */
1081#define MA_RST_CLR BIT_1S /* Clear MAC Arbiter Reset */
1082#define MA_RST_SET BIT_0S /* Set MAC Arbiter Reset */
1083
1084/* B3_MA_RC_CTRL 16 bit MAC Arbiter Recovery Ctrl Reg */
1085 /* Bit 15.. 8: reserved */
1086#define MA_ENA_REC_TX2 BIT_7S /* Enable Recovery Timer TX2 */
1087#define MA_DIS_REC_TX2 BIT_6S /* Disable Recovery Timer TX2 */
1088#define MA_ENA_REC_TX1 BIT_5S /* Enable Recovery Timer TX1 */
1089#define MA_DIS_REC_TX1 BIT_4S /* Disable Recovery Timer TX1 */
1090#define MA_ENA_REC_RX2 BIT_3S /* Enable Recovery Timer RX2 */
1091#define MA_DIS_REC_RX2 BIT_2S /* Disable Recovery Timer RX2 */
1092#define MA_ENA_REC_RX1 BIT_1S /* Enable Recovery Timer RX1 */
1093#define MA_DIS_REC_RX1 BIT_0S /* Disable Recovery Timer RX1 */
1094
1095/* Packet Arbiter Registers */
1096/* B3_PA_CTRL 16 bit Packet Arbiter Ctrl Register */
1097 /* Bit 15..14: reserved */
1098#define PA_CLR_TO_TX2 BIT_13S /* Clear IRQ Packet Timeout TX2 */
1099#define PA_CLR_TO_TX1 BIT_12S /* Clear IRQ Packet Timeout TX1 */
1100#define PA_CLR_TO_RX2 BIT_11S /* Clear IRQ Packet Timeout RX2 */
1101#define PA_CLR_TO_RX1 BIT_10S /* Clear IRQ Packet Timeout RX1 */
1102#define PA_ENA_TO_TX2 BIT_9S /* Enable Timeout Timer TX2 */
1103#define PA_DIS_TO_TX2 BIT_8S /* Disable Timeout Timer TX2 */
1104#define PA_ENA_TO_TX1 BIT_7S /* Enable Timeout Timer TX1 */
1105#define PA_DIS_TO_TX1 BIT_6S /* Disable Timeout Timer TX1 */
1106#define PA_ENA_TO_RX2 BIT_5S /* Enable Timeout Timer RX2 */
1107#define PA_DIS_TO_RX2 BIT_4S /* Disable Timeout Timer RX2 */
1108#define PA_ENA_TO_RX1 BIT_3S /* Enable Timeout Timer RX1 */
1109#define PA_DIS_TO_RX1 BIT_2S /* Disable Timeout Timer RX1 */
1110#define PA_RST_CLR BIT_1S /* Clear MAC Arbiter Reset */
1111#define PA_RST_SET BIT_0S /* Set MAC Arbiter Reset */
1112
1113#define PA_ENA_TO_ALL (PA_ENA_TO_RX1 | PA_ENA_TO_RX2 |\
1114 PA_ENA_TO_TX1 | PA_ENA_TO_TX2)
1115
1116/* Rx/Tx Path related Arbiter Test Registers */
1117/* B3_MA_TO_TEST 16 bit MAC Arbiter Timeout Test Reg */
1118/* B3_MA_RC_TEST 16 bit MAC Arbiter Recovery Test Reg */
1119/* B3_PA_TEST 16 bit Packet Arbiter Test Register */
1120/* Bit 15, 11, 7, and 3 are reserved in B3_PA_TEST */
1121#define TX2_T_EV BIT_15S /* TX2 Timeout/Recv Event occured */
1122#define TX2_T_ON BIT_14S /* TX2 Timeout/Recv Timer Test On */
1123#define TX2_T_OFF BIT_13S /* TX2 Timeout/Recv Timer Tst Off */
1124#define TX2_T_STEP BIT_12S /* TX2 Timeout/Recv Timer Step */
1125#define TX1_T_EV BIT_11S /* TX1 Timeout/Recv Event occured */
1126#define TX1_T_ON BIT_10S /* TX1 Timeout/Recv Timer Test On */
1127#define TX1_T_OFF BIT_9S /* TX1 Timeout/Recv Timer Tst Off */
1128#define TX1_T_STEP BIT_8S /* TX1 Timeout/Recv Timer Step */
1129#define RX2_T_EV BIT_7S /* RX2 Timeout/Recv Event occured */
1130#define RX2_T_ON BIT_6S /* RX2 Timeout/Recv Timer Test On */
1131#define RX2_T_OFF BIT_5S /* RX2 Timeout/Recv Timer Tst Off */
1132#define RX2_T_STEP BIT_4S /* RX2 Timeout/Recv Timer Step */
1133#define RX1_T_EV BIT_3S /* RX1 Timeout/Recv Event occured */
1134#define RX1_T_ON BIT_2S /* RX1 Timeout/Recv Timer Test On */
1135#define RX1_T_OFF BIT_1S /* RX1 Timeout/Recv Timer Tst Off */
1136#define RX1_T_STEP BIT_0S /* RX1 Timeout/Recv Timer Step */
1137
1138
1139/* Transmit Arbiter Registers MAC 1 and 2, use MR_ADDR() to access */
1140/* TXA_ITI_INI 32 bit Tx Arb Interval Timer Init Val */
1141/* TXA_ITI_VAL 32 bit Tx Arb Interval Timer Value */
1142/* TXA_LIM_INI 32 bit Tx Arb Limit Counter Init Val */
1143/* TXA_LIM_VAL 32 bit Tx Arb Limit Counter Value */
1144 /* Bit 31..24: reserved */
1145#define TXA_MAX_VAL 0x00ffffffUL/* Bit 23.. 0: Max TXA Timer/Cnt Val */
1146
1147/* TXA_CTRL 8 bit Tx Arbiter Control Register */
1148#define TXA_ENA_FSYNC BIT_7S /* Enable force of sync Tx queue */
1149#define TXA_DIS_FSYNC BIT_6S /* Disable force of sync Tx queue */
1150#define TXA_ENA_ALLOC BIT_5S /* Enable alloc of free bandwidth */
1151#define TXA_DIS_ALLOC BIT_4S /* Disable alloc of free bandwidth */
1152#define TXA_START_RC BIT_3S /* Start sync Rate Control */
1153#define TXA_STOP_RC BIT_2S /* Stop sync Rate Control */
1154#define TXA_ENA_ARB BIT_1S /* Enable Tx Arbiter */
1155#define TXA_DIS_ARB BIT_0S /* Disable Tx Arbiter */
1156
1157/* TXA_TEST 8 bit Tx Arbiter Test Register */
1158 /* Bit 7.. 6: reserved */
1159#define TXA_INT_T_ON BIT_5S /* Tx Arb Interval Timer Test On */
1160#define TXA_INT_T_OFF BIT_4S /* Tx Arb Interval Timer Test Off */
1161#define TXA_INT_T_STEP BIT_3S /* Tx Arb Interval Timer Step */
1162#define TXA_LIM_T_ON BIT_2S /* Tx Arb Limit Timer Test On */
1163#define TXA_LIM_T_OFF BIT_1S /* Tx Arb Limit Timer Test Off */
1164#define TXA_LIM_T_STEP BIT_0S /* Tx Arb Limit Timer Step */
1165
1166/* TXA_STAT 8 bit Tx Arbiter Status Register */
1167 /* Bit 7.. 1: reserved */
1168#define TXA_PRIO_XS BIT_0S /* sync queue has prio to send */
1169
1170/* Q_BC 32 bit Current Byte Counter */
1171 /* Bit 31..16: reserved */
1172#define BC_MAX 0xffff /* Bit 15.. 0: Byte counter */
1173
1174/* BMU Control Status Registers */
1175/* B0_R1_CSR 32 bit BMU Ctrl/Stat Rx Queue 1 */
1176/* B0_R2_CSR 32 bit BMU Ctrl/Stat Rx Queue 2 */
1177/* B0_XA1_CSR 32 bit BMU Ctrl/Stat Sync Tx Queue 1 */
1178/* B0_XS1_CSR 32 bit BMU Ctrl/Stat Async Tx Queue 1 */
1179/* B0_XA2_CSR 32 bit BMU Ctrl/Stat Sync Tx Queue 2 */
1180/* B0_XS2_CSR 32 bit BMU Ctrl/Stat Async Tx Queue 2 */
1181/* Q_CSR 32 bit BMU Control/Status Register */
1182 /* Bit 31..25: reserved */
1183#define CSR_SV_IDLE BIT_24 /* BMU SM Idle */
1184 /* Bit 23..22: reserved */
1185#define CSR_DESC_CLR BIT_21 /* Clear Reset for Descr */
1186#define CSR_DESC_SET BIT_20 /* Set Reset for Descr */
1187#define CSR_FIFO_CLR BIT_19 /* Clear Reset for FIFO */
1188#define CSR_FIFO_SET BIT_18 /* Set Reset for FIFO */
1189#define CSR_HPI_RUN BIT_17 /* Release HPI SM */
1190#define CSR_HPI_RST BIT_16 /* Reset HPI SM to Idle */
1191#define CSR_SV_RUN BIT_15 /* Release Supervisor SM */
1192#define CSR_SV_RST BIT_14 /* Reset Supervisor SM */
1193#define CSR_DREAD_RUN BIT_13 /* Release Descr Read SM */
1194#define CSR_DREAD_RST BIT_12 /* Reset Descr Read SM */
1195#define CSR_DWRITE_RUN BIT_11 /* Release Descr Write SM */
1196#define CSR_DWRITE_RST BIT_10 /* Reset Descr Write SM */
1197#define CSR_TRANS_RUN BIT_9 /* Release Transfer SM */
1198#define CSR_TRANS_RST BIT_8 /* Reset Transfer SM */
1199#define CSR_ENA_POL BIT_7 /* Enable Descr Polling */
1200#define CSR_DIS_POL BIT_6 /* Disable Descr Polling */
1201#define CSR_STOP BIT_5 /* Stop Rx/Tx Queue */
1202#define CSR_START BIT_4 /* Start Rx/Tx Queue */
1203#define CSR_IRQ_CL_P BIT_3 /* (Rx) Clear Parity IRQ */
1204#define CSR_IRQ_CL_B BIT_2 /* Clear EOB IRQ */
1205#define CSR_IRQ_CL_F BIT_1 /* Clear EOF IRQ */
1206#define CSR_IRQ_CL_C BIT_0 /* Clear ERR IRQ */
1207
1208#define CSR_SET_RESET (CSR_DESC_SET | CSR_FIFO_SET | CSR_HPI_RST |\
1209 CSR_SV_RST | CSR_DREAD_RST | CSR_DWRITE_RST |\
1210 CSR_TRANS_RST)
1211#define CSR_CLR_RESET (CSR_DESC_CLR | CSR_FIFO_CLR | CSR_HPI_RUN |\
1212 CSR_SV_RUN | CSR_DREAD_RUN | CSR_DWRITE_RUN |\
1213 CSR_TRANS_RUN)
1214
1215/* Q_F 32 bit Flag Register */
1216 /* Bit 31..28: reserved */
1217#define F_ALM_FULL BIT_27 /* Rx FIFO: almost full */
1218#define F_EMPTY BIT_27 /* Tx FIFO: empty flag */
1219#define F_FIFO_EOF BIT_26 /* Tag (EOF Flag) bit in FIFO */
1220#define F_WM_REACHED BIT_25 /* Watermark reached */
1221 /* reserved */
1222#define F_FIFO_LEVEL (0x1fL<<16) /* Bit 23..16: # of Qwords in FIFO */
1223 /* Bit 15..11: reserved */
1224#define F_WATER_MARK 0x0007ffL /* Bit 10.. 0: Watermark */
1225
1226/* Q_T1 32 bit Test Register 1 */
1227/* Holds four State Machine control Bytes */
1228#define SM_CTRL_SV_MSK (0xffL<<24) /* Bit 31..24: Control Supervisor SM */
1229#define SM_CTRL_RD_MSK (0xffL<<16) /* Bit 23..16: Control Read Desc SM */
1230#define SM_CTRL_WR_MSK (0xffL<<8) /* Bit 15.. 8: Control Write Desc SM */
1231#define SM_CTRL_TR_MSK 0xffL /* Bit 7.. 0: Control Transfer SM */
1232
1233/* Q_T1_TR 8 bit Test Register 1 Transfer SM */
1234/* Q_T1_WR 8 bit Test Register 1 Write Descriptor SM */
1235/* Q_T1_RD 8 bit Test Register 1 Read Descriptor SM */
1236/* Q_T1_SV 8 bit Test Register 1 Supervisor SM */
1237
1238/* The control status byte of each machine looks like ... */
1239#define SM_STATE 0xf0 /* Bit 7.. 4: State which shall be loaded */
1240#define SM_LOAD BIT_3S /* Load the SM with SM_STATE */
1241#define SM_TEST_ON BIT_2S /* Switch on SM Test Mode */
1242#define SM_TEST_OFF BIT_1S /* Go off the Test Mode */
1243#define SM_STEP BIT_0S /* Step the State Machine */
1244/* The encoding of the states is not supported by the Diagnostics Tool */
1245
1246/* Q_T2 32 bit Test Register 2 */
1247 /* Bit 31.. 8: reserved */
1248#define T2_AC_T_ON BIT_7 /* Address Counter Test Mode on */
1249#define T2_AC_T_OFF BIT_6 /* Address Counter Test Mode off */
1250#define T2_BC_T_ON BIT_5 /* Byte Counter Test Mode on */
1251#define T2_BC_T_OFF BIT_4 /* Byte Counter Test Mode off */
1252#define T2_STEP04 BIT_3 /* Inc AC/Dec BC by 4 */
1253#define T2_STEP03 BIT_2 /* Inc AC/Dec BC by 3 */
1254#define T2_STEP02 BIT_1 /* Inc AC/Dec BC by 2 */
1255#define T2_STEP01 BIT_0 /* Inc AC/Dec BC by 1 */
1256
1257/* Q_T3 32 bit Test Register 3 */
1258 /* Bit 31.. 7: reserved */
1259#define T3_MUX_MSK (7<<4) /* Bit 6.. 4: Mux Position */
1260 /* Bit 3: reserved */
1261#define T3_VRAM_MSK 7 /* Bit 2.. 0: Virtual RAM Buffer Address */
1262
1263/* RAM Buffer Register Offsets, use RB_ADDR(Queue, Offs) to access */
1264/* RB_START 32 bit RAM Buffer Start Address */
1265/* RB_END 32 bit RAM Buffer End Address */
1266/* RB_WP 32 bit RAM Buffer Write Pointer */
1267/* RB_RP 32 bit RAM Buffer Read Pointer */
1268/* RB_RX_UTPP 32 bit Rx Upper Threshold, Pause Pack */
1269/* RB_RX_LTPP 32 bit Rx Lower Threshold, Pause Pack */
1270/* RB_RX_UTHP 32 bit Rx Upper Threshold, High Prio */
1271/* RB_RX_LTHP 32 bit Rx Lower Threshold, High Prio */
1272/* RB_PC 32 bit RAM Buffer Packet Counter */
1273/* RB_LEV 32 bit RAM Buffer Level Register */
1274 /* Bit 31..19: reserved */
1275#define RB_MSK 0x0007ffff /* Bit 18.. 0: RAM Buffer Pointer Bits */
1276
1277/* RB_TST2 8 bit RAM Buffer Test Register 2 */
1278 /* Bit 7.. 4: reserved */
1279#define RB_PC_DEC BIT_3S /* Packet Counter Decrem */
1280#define RB_PC_T_ON BIT_2S /* Packet Counter Test On */
1281#define RB_PC_T_OFF BIT_1S /* Packet Counter Tst Off */
1282#define RB_PC_INC BIT_0S /* Packet Counter Increm */
1283
1284/* RB_TST1 8 bit RAM Buffer Test Register 1 */
1285 /* Bit 7: reserved */
1286#define RB_WP_T_ON BIT_6S /* Write Pointer Test On */
1287#define RB_WP_T_OFF BIT_5S /* Write Pointer Test Off */
1288#define RB_WP_INC BIT_4S /* Write Pointer Increm */
1289 /* Bit 3: reserved */
1290#define RB_RP_T_ON BIT_2S /* Read Pointer Test On */
1291#define RB_RP_T_OFF BIT_1S /* Read Pointer Test Off */
1292#define RB_RP_DEC BIT_0S /* Read Pointer Decrement */
1293
1294/* RB_CTRL 8 bit RAM Buffer Control Register */
1295 /* Bit 7.. 6: reserved */
1296#define RB_ENA_STFWD BIT_5S /* Enable Store & Forward */
1297#define RB_DIS_STFWD BIT_4S /* Disable Store & Forward */
1298#define RB_ENA_OP_MD BIT_3S /* Enable Operation Mode */
1299#define RB_DIS_OP_MD BIT_2S /* Disable Operation Mode */
1300#define RB_RST_CLR BIT_1S /* Clear RAM Buf STM Reset */
1301#define RB_RST_SET BIT_0S /* Set RAM Buf STM Reset */
1302
1303
1304/* Receive and Transmit MAC FIFO Registers (GENESIS only) */
1305
1306/* RX_MFF_EA 32 bit Receive MAC FIFO End Address */
1307/* RX_MFF_WP 32 bit Receive MAC FIFO Write Pointer */
1308/* RX_MFF_RP 32 bit Receive MAC FIFO Read Pointer */
1309/* RX_MFF_PC 32 bit Receive MAC FIFO Packet Counter */
1310/* RX_MFF_LEV 32 bit Receive MAC FIFO Level */
1311/* TX_MFF_EA 32 bit Transmit MAC FIFO End Address */
1312/* TX_MFF_WP 32 bit Transmit MAC FIFO Write Pointer */
1313/* TX_MFF_WSP 32 bit Transmit MAC FIFO WR Shadow Pointer */
1314/* TX_MFF_RP 32 bit Transmit MAC FIFO Read Pointer */
1315/* TX_MFF_PC 32 bit Transmit MAC FIFO Packet Cnt */
1316/* TX_MFF_LEV 32 bit Transmit MAC FIFO Level */
1317 /* Bit 31.. 6: reserved */
1318#define MFF_MSK 0x007fL /* Bit 5.. 0: MAC FIFO Address/Ptr Bits */
1319
1320/* RX_MFF_CTRL1 16 bit Receive MAC FIFO Control Reg 1 */
1321 /* Bit 15..14: reserved */
1322#define MFF_ENA_RDY_PAT BIT_13S /* Enable Ready Patch */
1323#define MFF_DIS_RDY_PAT BIT_12S /* Disable Ready Patch */
1324#define MFF_ENA_TIM_PAT BIT_11S /* Enable Timing Patch */
1325#define MFF_DIS_TIM_PAT BIT_10S /* Disable Timing Patch */
1326#define MFF_ENA_ALM_FUL BIT_9S /* Enable AlmostFull Sign */
1327#define MFF_DIS_ALM_FUL BIT_8S /* Disable AlmostFull Sign */
1328#define MFF_ENA_PAUSE BIT_7S /* Enable Pause Signaling */
1329#define MFF_DIS_PAUSE BIT_6S /* Disable Pause Signaling */
1330#define MFF_ENA_FLUSH BIT_5S /* Enable Frame Flushing */
1331#define MFF_DIS_FLUSH BIT_4S /* Disable Frame Flushing */
1332#define MFF_ENA_TIST BIT_3S /* Enable Time Stamp Gener */
1333#define MFF_DIS_TIST BIT_2S /* Disable Time Stamp Gener */
1334#define MFF_CLR_INTIST BIT_1S /* Clear IRQ No Time Stamp */
1335#define MFF_CLR_INSTAT BIT_0S /* Clear IRQ No Status */
1336
1337#define MFF_RX_CTRL_DEF MFF_ENA_TIM_PAT
1338
1339/* TX_MFF_CTRL1 16 bit Transmit MAC FIFO Control Reg 1 */
1340#define MFF_CLR_PERR BIT_15S /* Clear Parity Error IRQ */
1341 /* Bit 14: reserved */
1342#define MFF_ENA_PKT_REC BIT_13S /* Enable Packet Recovery */
1343#define MFF_DIS_PKT_REC BIT_12S /* Disable Packet Recovery */
1344/* MFF_ENA_TIM_PAT (see RX_MFF_CTRL1) Bit 11: Enable Timing Patch */
1345/* MFF_DIS_TIM_PAT (see RX_MFF_CTRL1) Bit 10: Disable Timing Patch */
1346/* MFF_ENA_ALM_FUL (see RX_MFF_CTRL1) Bit 9: Enable Almost Full Sign */
1347/* MFF_DIS_ALM_FUL (see RX_MFF_CTRL1) Bit 8: Disable Almost Full Sign */
1348#define MFF_ENA_W4E BIT_7S /* Enable Wait for Empty */
1349#define MFF_DIS_W4E BIT_6S /* Disable Wait for Empty */
1350/* MFF_ENA_FLUSH (see RX_MFF_CTRL1) Bit 5: Enable Frame Flushing */
1351/* MFF_DIS_FLUSH (see RX_MFF_CTRL1) Bit 4: Disable Frame Flushing */
1352#define MFF_ENA_LOOPB BIT_3S /* Enable Loopback */
1353#define MFF_DIS_LOOPB BIT_2S /* Disable Loopback */
1354#define MFF_CLR_MAC_RST BIT_1S /* Clear XMAC Reset */
1355#define MFF_SET_MAC_RST BIT_0S /* Set XMAC Reset */
1356
1357#define MFF_TX_CTRL_DEF (MFF_ENA_PKT_REC | MFF_ENA_TIM_PAT | MFF_ENA_FLUSH)
1358
1359/* RX_MFF_TST2 8 bit Receive MAC FIFO Test Register 2 */
1360/* TX_MFF_TST2 8 bit Transmit MAC FIFO Test Register 2 */
1361 /* Bit 7: reserved */
1362#define MFF_WSP_T_ON BIT_6S /* Tx: Write Shadow Ptr TestOn */
1363#define MFF_WSP_T_OFF BIT_5S /* Tx: Write Shadow Ptr TstOff */
1364#define MFF_WSP_INC BIT_4S /* Tx: Write Shadow Ptr Increment */
1365#define MFF_PC_DEC BIT_3S /* Packet Counter Decrement */
1366#define MFF_PC_T_ON BIT_2S /* Packet Counter Test On */
1367#define MFF_PC_T_OFF BIT_1S /* Packet Counter Test Off */
1368#define MFF_PC_INC BIT_0S /* Packet Counter Increment */
1369
1370/* RX_MFF_TST1 8 bit Receive MAC FIFO Test Register 1 */
1371/* TX_MFF_TST1 8 bit Transmit MAC FIFO Test Register 1 */
1372 /* Bit 7: reserved */
1373#define MFF_WP_T_ON BIT_6S /* Write Pointer Test On */
1374#define MFF_WP_T_OFF BIT_5S /* Write Pointer Test Off */
1375#define MFF_WP_INC BIT_4S /* Write Pointer Increm */
1376 /* Bit 3: reserved */
1377#define MFF_RP_T_ON BIT_2S /* Read Pointer Test On */
1378#define MFF_RP_T_OFF BIT_1S /* Read Pointer Test Off */
1379#define MFF_RP_DEC BIT_0S /* Read Pointer Decrement */
1380
1381/* RX_MFF_CTRL2 8 bit Receive MAC FIFO Control Reg 2 */
1382/* TX_MFF_CTRL2 8 bit Transmit MAC FIFO Control Reg 2 */
1383 /* Bit 7..4: reserved */
1384#define MFF_ENA_OP_MD BIT_3S /* Enable Operation Mode */
1385#define MFF_DIS_OP_MD BIT_2S /* Disable Operation Mode */
1386#define MFF_RST_CLR BIT_1S /* Clear MAC FIFO Reset */
1387#define MFF_RST_SET BIT_0S /* Set MAC FIFO Reset */
1388
1389
1390/* Link LED Counter Registers (GENESIS only) */
1391
1392/* RX_LED_CTRL 8 bit Receive LED Cnt Control Reg */
1393/* TX_LED_CTRL 8 bit Transmit LED Cnt Control Reg */
1394/* LNK_SYNC_CTRL 8 bit Link Sync Cnt Control Register */
1395 /* Bit 7.. 3: reserved */
1396#define LED_START BIT_2S /* Start Timer */
1397#define LED_STOP BIT_1S /* Stop Timer */
1398#define LED_STATE BIT_0S /* Rx/Tx: LED State, 1=LED on */
1399#define LED_CLR_IRQ BIT_0S /* Lnk: Clear Link IRQ */
1400
1401/* RX_LED_TST 8 bit Receive LED Cnt Test Register */
1402/* TX_LED_TST 8 bit Transmit LED Cnt Test Register */
1403/* LNK_SYNC_TST 8 bit Link Sync Cnt Test Register */
1404 /* Bit 7.. 3: reserved */
1405#define LED_T_ON BIT_2S /* LED Counter Test mode On */
1406#define LED_T_OFF BIT_1S /* LED Counter Test mode Off */
1407#define LED_T_STEP BIT_0S /* LED Counter Step */
1408
1409/* LNK_LED_REG 8 bit Link LED Register */
1410 /* Bit 7.. 6: reserved */
1411#define LED_BLK_ON BIT_5S /* Link LED Blinking On */
1412#define LED_BLK_OFF BIT_4S /* Link LED Blinking Off */
1413#define LED_SYNC_ON BIT_3S /* Use Sync Wire to switch LED */
1414#define LED_SYNC_OFF BIT_2S /* Disable Sync Wire Input */
1415#define LED_ON BIT_1S /* switch LED on */
1416#define LED_OFF BIT_0S /* switch LED off */
1417
1418/* Receive and Transmit GMAC FIFO Registers (YUKON only) */
1419
1420/* RX_GMF_EA 32 bit Rx GMAC FIFO End Address */
1421/* RX_GMF_AF_THR 32 bit Rx GMAC FIFO Almost Full Thresh. */
1422/* RX_GMF_WP 32 bit Rx GMAC FIFO Write Pointer */
1423/* RX_GMF_WLEV 32 bit Rx GMAC FIFO Write Level */
1424/* RX_GMF_RP 32 bit Rx GMAC FIFO Read Pointer */
1425/* RX_GMF_RLEV 32 bit Rx GMAC FIFO Read Level */
1426/* TX_GMF_EA 32 bit Tx GMAC FIFO End Address */
1427/* TX_GMF_AE_THR 32 bit Tx GMAC FIFO Almost Empty Thresh.*/
1428/* TX_GMF_WP 32 bit Tx GMAC FIFO Write Pointer */
1429/* TX_GMF_WSP 32 bit Tx GMAC FIFO Write Shadow Ptr. */
1430/* TX_GMF_WLEV 32 bit Tx GMAC FIFO Write Level */
1431/* TX_GMF_RP 32 bit Tx GMAC FIFO Read Pointer */
1432/* TX_GMF_RSTP 32 bit Tx GMAC FIFO Restart Pointer */
1433/* TX_GMF_RLEV 32 bit Tx GMAC FIFO Read Level */
1434
1435/* RX_GMF_CTRL_T 32 bit Rx GMAC FIFO Control/Test */
1436 /* Bits 31..15: reserved */
1437#define GMF_WP_TST_ON BIT_14 /* Write Pointer Test On */
1438#define GMF_WP_TST_OFF BIT_13 /* Write Pointer Test Off */
1439#define GMF_WP_STEP BIT_12 /* Write Pointer Step/Increment */
1440 /* Bit 11: reserved */
1441#define GMF_RP_TST_ON BIT_10 /* Read Pointer Test On */
1442#define GMF_RP_TST_OFF BIT_9 /* Read Pointer Test Off */
1443#define GMF_RP_STEP BIT_8 /* Read Pointer Step/Increment */
1444#define GMF_RX_F_FL_ON BIT_7 /* Rx FIFO Flush Mode On */
1445#define GMF_RX_F_FL_OFF BIT_6 /* Rx FIFO Flush Mode Off */
1446#define GMF_CLI_RX_FO BIT_5 /* Clear IRQ Rx FIFO Overrun */
1447#define GMF_CLI_RX_FC BIT_4 /* Clear IRQ Rx Frame Complete */
1448#define GMF_OPER_ON BIT_3 /* Operational Mode On */
1449#define GMF_OPER_OFF BIT_2 /* Operational Mode Off */
1450#define GMF_RST_CLR BIT_1 /* Clear GMAC FIFO Reset */
1451#define GMF_RST_SET BIT_0 /* Set GMAC FIFO Reset */
1452
1453/* TX_GMF_CTRL_T 32 bit Tx GMAC FIFO Control/Test */
1454 /* Bits 31..19: reserved */
1455#define GMF_WSP_TST_ON BIT_18 /* Write Shadow Pointer Test On */
1456#define GMF_WSP_TST_OFF BIT_17 /* Write Shadow Pointer Test Off */
1457#define GMF_WSP_STEP BIT_16 /* Write Shadow Pointer Step/Increment */
1458 /* Bits 15..7: same as for RX_GMF_CTRL_T */
1459#define GMF_CLI_TX_FU BIT_6 /* Clear IRQ Tx FIFO Underrun */
1460#define GMF_CLI_TX_FC BIT_5 /* Clear IRQ Tx Frame Complete */
1461#define GMF_CLI_TX_PE BIT_4 /* Clear IRQ Tx Parity Error */
1462 /* Bits 3..0: same as for RX_GMF_CTRL_T */
1463
1464#define GMF_RX_CTRL_DEF (GMF_OPER_ON | GMF_RX_F_FL_ON)
1465#define GMF_TX_CTRL_DEF GMF_OPER_ON
1466
1467#define RX_GMF_FL_THR_DEF 0x0a /* Rx GMAC FIFO Flush Threshold default */
1468
1469/* GMAC_TI_ST_CTRL 8 bit Time Stamp Timer Ctrl Reg (YUKON only) */
1470 /* Bit 7.. 3: reserved */
1471#define GMT_ST_START BIT_2S /* Start Time Stamp Timer */
1472#define GMT_ST_STOP BIT_1S /* Stop Time Stamp Timer */
1473#define GMT_ST_CLR_IRQ BIT_0S /* Clear Time Stamp Timer IRQ */
1474
1475/* GMAC_CTRL 32 bit GMAC Control Reg (YUKON only) */
1476 /* Bits 31.. 8: reserved */
1477#define GMC_H_BURST_ON BIT_7 /* Half Duplex Burst Mode On */
1478#define GMC_H_BURST_OFF BIT_6 /* Half Duplex Burst Mode Off */
1479#define GMC_F_LOOPB_ON BIT_5 /* FIFO Loopback On */
1480#define GMC_F_LOOPB_OFF BIT_4 /* FIFO Loopback Off */
1481#define GMC_PAUSE_ON BIT_3 /* Pause On */
1482#define GMC_PAUSE_OFF BIT_2 /* Pause Off */
1483#define GMC_RST_CLR BIT_1 /* Clear GMAC Reset */
1484#define GMC_RST_SET BIT_0 /* Set GMAC Reset */
1485
1486/* GPHY_CTRL 32 bit GPHY Control Reg (YUKON only) */
1487 /* Bits 31..29: reserved */
1488#define GPC_SEL_BDT BIT_28 /* Select Bi-Dir. Transfer for MDC/MDIO */
1489#define GPC_INT_POL_HI BIT_27 /* IRQ Polarity is Active HIGH */
1490#define GPC_75_OHM BIT_26 /* Use 75 Ohm Termination instead of 50 */
1491#define GPC_DIS_FC BIT_25 /* Disable Automatic Fiber/Copper Detection */
1492#define GPC_DIS_SLEEP BIT_24 /* Disable Energy Detect */
1493#define GPC_HWCFG_M_3 BIT_23 /* HWCFG_MODE[3] */
1494#define GPC_HWCFG_M_2 BIT_22 /* HWCFG_MODE[2] */
1495#define GPC_HWCFG_M_1 BIT_21 /* HWCFG_MODE[1] */
1496#define GPC_HWCFG_M_0 BIT_20 /* HWCFG_MODE[0] */
1497#define GPC_ANEG_0 BIT_19 /* ANEG[0] */
1498#define GPC_ENA_XC BIT_18 /* Enable MDI crossover */
1499#define GPC_DIS_125 BIT_17 /* Disable 125 MHz clock */
1500#define GPC_ANEG_3 BIT_16 /* ANEG[3] */
1501#define GPC_ANEG_2 BIT_15 /* ANEG[2] */
1502#define GPC_ANEG_1 BIT_14 /* ANEG[1] */
1503#define GPC_ENA_PAUSE BIT_13 /* Enable Pause (SYM_OR_REM) */
1504#define GPC_PHYADDR_4 BIT_12 /* Bit 4 of Phy Addr */
1505#define GPC_PHYADDR_3 BIT_11 /* Bit 3 of Phy Addr */
1506#define GPC_PHYADDR_2 BIT_10 /* Bit 2 of Phy Addr */
1507#define GPC_PHYADDR_1 BIT_9 /* Bit 1 of Phy Addr */
1508#define GPC_PHYADDR_0 BIT_8 /* Bit 0 of Phy Addr */
1509 /* Bits 7..2: reserved */
1510#define GPC_RST_CLR BIT_1 /* Clear GPHY Reset */
1511#define GPC_RST_SET BIT_0 /* Set GPHY Reset */
1512
1513#define GPC_HWCFG_GMII_COP (GPC_HWCFG_M_3 | GPC_HWCFG_M_2 | \
1514 GPC_HWCFG_M_1 | GPC_HWCFG_M_0)
1515
1516#define GPC_HWCFG_GMII_FIB ( GPC_HWCFG_M_2 | \
1517 GPC_HWCFG_M_1 | GPC_HWCFG_M_0)
1518
1519#define GPC_ANEG_ADV_ALL_M (GPC_ANEG_3 | GPC_ANEG_2 | \
1520 GPC_ANEG_1 | GPC_ANEG_0)
1521
1522/* forced speed and duplex mode (don't mix with other ANEG bits) */
1523#define GPC_FRC10MBIT_HALF 0
1524#define GPC_FRC10MBIT_FULL GPC_ANEG_0
1525#define GPC_FRC100MBIT_HALF GPC_ANEG_1
1526#define GPC_FRC100MBIT_FULL (GPC_ANEG_0 | GPC_ANEG_1)
1527
1528/* auto-negotiation with limited advertised speeds */
1529/* mix only with master/slave settings (for copper) */
1530#define GPC_ADV_1000_HALF GPC_ANEG_2
1531#define GPC_ADV_1000_FULL GPC_ANEG_3
1532#define GPC_ADV_ALL (GPC_ANEG_2 | GPC_ANEG_3)
1533
1534/* master/slave settings */
1535/* only for copper with 1000 Mbps */
1536#define GPC_FORCE_MASTER 0
1537#define GPC_FORCE_SLAVE GPC_ANEG_0
1538#define GPC_PREF_MASTER GPC_ANEG_1
1539#define GPC_PREF_SLAVE (GPC_ANEG_1 | GPC_ANEG_0)
1540
1541/* GMAC_IRQ_SRC 8 bit GMAC Interrupt Source Reg (YUKON only) */
1542/* GMAC_IRQ_MSK 8 bit GMAC Interrupt Mask Reg (YUKON only) */
1543#define GM_IS_TX_CO_OV BIT_5 /* Transmit Counter Overflow IRQ */
1544#define GM_IS_RX_CO_OV BIT_4 /* Receive Counter Overflow IRQ */
1545#define GM_IS_TX_FF_UR BIT_3 /* Transmit FIFO Underrun */
1546#define GM_IS_TX_COMPL BIT_2 /* Frame Transmission Complete */
1547#define GM_IS_RX_FF_OR BIT_1 /* Receive FIFO Overrun */
1548#define GM_IS_RX_COMPL BIT_0 /* Frame Reception Complete */
1549
1550#define GMAC_DEF_MSK (GM_IS_TX_CO_OV | GM_IS_RX_CO_OV | \
1551 GM_IS_TX_FF_UR)
1552
1553/* GMAC_LINK_CTRL 16 bit GMAC Link Control Reg (YUKON only) */
1554 /* Bits 15.. 2: reserved */
1555#define GMLC_RST_CLR BIT_1S /* Clear GMAC Link Reset */
1556#define GMLC_RST_SET BIT_0S /* Set GMAC Link Reset */
1557
1558
1559/* WOL_CTRL_STAT 16 bit WOL Control/Status Reg */
1560#define WOL_CTL_LINK_CHG_OCC BIT_15S
1561#define WOL_CTL_MAGIC_PKT_OCC BIT_14S
1562#define WOL_CTL_PATTERN_OCC BIT_13S
1563
1564#define WOL_CTL_CLEAR_RESULT BIT_12S
1565
1566#define WOL_CTL_ENA_PME_ON_LINK_CHG BIT_11S
1567#define WOL_CTL_DIS_PME_ON_LINK_CHG BIT_10S
1568#define WOL_CTL_ENA_PME_ON_MAGIC_PKT BIT_9S
1569#define WOL_CTL_DIS_PME_ON_MAGIC_PKT BIT_8S
1570#define WOL_CTL_ENA_PME_ON_PATTERN BIT_7S
1571#define WOL_CTL_DIS_PME_ON_PATTERN BIT_6S
1572
1573#define WOL_CTL_ENA_LINK_CHG_UNIT BIT_5S
1574#define WOL_CTL_DIS_LINK_CHG_UNIT BIT_4S
1575#define WOL_CTL_ENA_MAGIC_PKT_UNIT BIT_3S
1576#define WOL_CTL_DIS_MAGIC_PKT_UNIT BIT_2S
1577#define WOL_CTL_ENA_PATTERN_UNIT BIT_1S
1578#define WOL_CTL_DIS_PATTERN_UNIT BIT_0S
1579
1580#define WOL_CTL_DEFAULT \
1581 (WOL_CTL_DIS_PME_ON_LINK_CHG | \
1582 WOL_CTL_DIS_PME_ON_PATTERN | \
1583 WOL_CTL_DIS_PME_ON_MAGIC_PKT | \
1584 WOL_CTL_DIS_LINK_CHG_UNIT | \
1585 WOL_CTL_DIS_PATTERN_UNIT | \
1586 WOL_CTL_DIS_MAGIC_PKT_UNIT)
1587
1588/* WOL_MATCH_CTL 8 bit WOL Match Control Reg */
1589#define WOL_CTL_PATT_ENA(x) (BIT_0 << (x))
1590
1591#define SK_NUM_WOL_PATTERN 7
1592#define SK_PATTERN_PER_WORD 4
1593#define SK_BITMASK_PATTERN 7
1594#define SK_POW_PATTERN_LENGTH 128
1595
1596#define WOL_LENGTH_MSK 0x7f
1597#define WOL_LENGTH_SHIFT 8
1598
1599
1600/* Receive and Transmit Descriptors ******************************************/
1601
1602/* Transmit Descriptor struct */
1603typedef struct s_HwTxd {
1604 SK_U32 volatile TxCtrl; /* Transmit Buffer Control Field */
1605 SK_U32 TxNext; /* Physical Address Pointer to the next TxD */
1606 SK_U32 TxAdrLo; /* Physical Tx Buffer Address lower dword */
1607 SK_U32 TxAdrHi; /* Physical Tx Buffer Address upper dword */
1608 SK_U32 TxStat; /* Transmit Frame Status Word */
1609#ifndef SK_USE_REV_DESC
1610 SK_U16 TxTcpOffs; /* TCP Checksum Calculation Start Value */
1611 SK_U16 TxRes1; /* 16 bit reserved field */
1612 SK_U16 TxTcpWp; /* TCP Checksum Write Position */
1613 SK_U16 TxTcpSp; /* TCP Checksum Calculation Start Position */
1614#else /* SK_USE_REV_DESC */
1615 SK_U16 TxRes1; /* 16 bit reserved field */
1616 SK_U16 TxTcpOffs; /* TCP Checksum Calculation Start Value */
1617 SK_U16 TxTcpSp; /* TCP Checksum Calculation Start Position */
1618 SK_U16 TxTcpWp; /* TCP Checksum Write Position */
1619#endif /* SK_USE_REV_DESC */
1620 SK_U32 TxRes2; /* 32 bit reserved field */
1621} SK_HWTXD;
1622
1623/* Receive Descriptor struct */
1624typedef struct s_HwRxd {
1625 SK_U32 volatile RxCtrl; /* Receive Buffer Control Field */
1626 SK_U32 RxNext; /* Physical Address Pointer to the next RxD */
1627 SK_U32 RxAdrLo; /* Physical Rx Buffer Address lower dword */
1628 SK_U32 RxAdrHi; /* Physical Rx Buffer Address upper dword */
1629 SK_U32 RxStat; /* Receive Frame Status Word */
1630 SK_U32 RxTiSt; /* Receive Time Stamp (from XMAC on GENESIS) */
1631#ifndef SK_USE_REV_DESC
1632 SK_U16 RxTcpSum1; /* TCP Checksum 1 */
1633 SK_U16 RxTcpSum2; /* TCP Checksum 2 */
1634 SK_U16 RxTcpSp1; /* TCP Checksum Calculation Start Position 1 */
1635 SK_U16 RxTcpSp2; /* TCP Checksum Calculation Start Position 2 */
1636#else /* SK_USE_REV_DESC */
1637 SK_U16 RxTcpSum2; /* TCP Checksum 2 */
1638 SK_U16 RxTcpSum1; /* TCP Checksum 1 */
1639 SK_U16 RxTcpSp2; /* TCP Checksum Calculation Start Position 2 */
1640 SK_U16 RxTcpSp1; /* TCP Checksum Calculation Start Position 1 */
1641#endif /* SK_USE_REV_DESC */
1642} SK_HWRXD;
1643
1644/*
1645 * Drivers which use the reverse descriptor feature (PCI_OUR_REG_2)
1646 * should set the define SK_USE_REV_DESC.
1647 * Structures are 'normaly' not endianess dependent. But in
1648 * this case the SK_U16 fields are bound to bit positions inside the
1649 * descriptor. RxTcpSum1 e.g. must start at bit 0 within the 6.th DWord.
1650 * The bit positions inside a DWord are of course endianess dependent and
1651 * swaps if the DWord is swapped by the hardware.
1652 */
1653
1654
1655/* Descriptor Bit Definition */
1656/* TxCtrl Transmit Buffer Control Field */
1657/* RxCtrl Receive Buffer Control Field */
1658#define BMU_OWN BIT_31 /* OWN bit: 0=host/1=BMU */
1659#define BMU_STF BIT_30 /* Start of Frame */
1660#define BMU_EOF BIT_29 /* End of Frame */
1661#define BMU_IRQ_EOB BIT_28 /* Req "End of Buffer" IRQ */
1662#define BMU_IRQ_EOF BIT_27 /* Req "End of Frame" IRQ */
1663/* TxCtrl specific bits */
1664#define BMU_STFWD BIT_26 /* (Tx) Store & Forward Frame */
1665#define BMU_NO_FCS BIT_25 /* (Tx) Disable MAC FCS (CRC) generation */
1666#define BMU_SW BIT_24 /* (Tx) 1 bit res. for SW use */
1667/* RxCtrl specific bits */
1668#define BMU_DEV_0 BIT_26 /* (Rx) Transfer data to Dev0 */
1669#define BMU_STAT_VAL BIT_25 /* (Rx) Rx Status Valid */
1670#define BMU_TIST_VAL BIT_24 /* (Rx) Rx TimeStamp Valid */
1671 /* Bit 23..16: BMU Check Opcodes */
1672#define BMU_CHECK (0x55L<<16) /* Default BMU check */
1673#define BMU_TCP_CHECK (0x56L<<16) /* Descr with TCP ext */
1674#define BMU_UDP_CHECK (0x57L<<16) /* Descr with UDP ext (YUKON only) */
1675#define BMU_BBC 0xffffL /* Bit 15.. 0: Buffer Byte Counter */
1676
1677/* TxStat Transmit Frame Status Word */
1678/* RxStat Receive Frame Status Word */
1679/*
1680 *Note: TxStat is reserved for ASIC loopback mode only
1681 *
1682 * The Bits of the Status words are defined in xmac_ii.h
1683 * (see XMR_FS bits)
1684 */
1685
1686/* macros ********************************************************************/
1687
1688/* Receive and Transmit Queues */
1689#define Q_R1 0x0000 /* Receive Queue 1 */
1690#define Q_R2 0x0080 /* Receive Queue 2 */
1691#define Q_XS1 0x0200 /* Synchronous Transmit Queue 1 */
1692#define Q_XA1 0x0280 /* Asynchronous Transmit Queue 1 */
1693#define Q_XS2 0x0300 /* Synchronous Transmit Queue 2 */
1694#define Q_XA2 0x0380 /* Asynchronous Transmit Queue 2 */
1695
1696/*
1697 * Macro Q_ADDR()
1698 *
1699 * Use this macro to access the Receive and Transmit Queue Registers.
1700 *
1701 * para:
1702 * Queue Queue to access.
1703 * Values: Q_R1, Q_R2, Q_XS1, Q_XA1, Q_XS2, and Q_XA2
1704 * Offs Queue register offset.
1705 * Values: Q_D, Q_DA_L ... Q_T2, Q_T3
1706 *
1707 * usage SK_IN32(pAC, Q_ADDR(Q_R2, Q_BC), pVal)
1708 */
1709#define Q_ADDR(Queue, Offs) (B8_Q_REGS + (Queue) + (Offs))
1710
1711/*
1712 * Macro RB_ADDR()
1713 *
1714 * Use this macro to access the RAM Buffer Registers.
1715 *
1716 * para:
1717 * Queue Queue to access.
1718 * Values: Q_R1, Q_R2, Q_XS1, Q_XA1, Q_XS2, and Q_XA2
1719 * Offs Queue register offset.
1720 * Values: RB_START, RB_END ... RB_LEV, RB_CTRL
1721 *
1722 * usage SK_IN32(pAC, RB_ADDR(Q_R2, RB_RP), pVal)
1723 */
1724#define RB_ADDR(Queue, Offs) (B16_RAM_REGS + (Queue) + (Offs))
1725
1726
1727/* MAC Related Registers */
1728#define MAC_1 0 /* belongs to the port near the slot */
1729#define MAC_2 1 /* belongs to the port far away from the slot */
1730
1731/*
1732 * Macro MR_ADDR()
1733 *
1734 * Use this macro to access a MAC Related Registers inside the ASIC.
1735 *
1736 * para:
1737 * Mac MAC to access.
1738 * Values: MAC_1, MAC_2
1739 * Offs MAC register offset.
1740 * Values: RX_MFF_EA, RX_MFF_WP ... LNK_LED_REG,
1741 * TX_MFF_EA, TX_MFF_WP ... TX_LED_TST
1742 *
1743 * usage SK_IN32(pAC, MR_ADDR(MAC_1, TX_MFF_EA), pVal)
1744 */
1745#define MR_ADDR(Mac, Offs) (((Mac) << 7) + (Offs))
1746
1747#ifdef SK_LITTLE_ENDIAN
1748#define XM_WORD_LO 0
1749#define XM_WORD_HI 1
1750#else /* !SK_LITTLE_ENDIAN */
1751#define XM_WORD_LO 1
1752#define XM_WORD_HI 0
1753#endif /* !SK_LITTLE_ENDIAN */
1754
1755
1756/*
1757 * macros to access the XMAC (GENESIS only)
1758 *
1759 * XM_IN16(), to read a 16 bit register (e.g. XM_MMU_CMD)
1760 * XM_OUT16(), to write a 16 bit register (e.g. XM_MMU_CMD)
1761 * XM_IN32(), to read a 32 bit register (e.g. XM_TX_EV_CNT)
1762 * XM_OUT32(), to write a 32 bit register (e.g. XM_TX_EV_CNT)
1763 * XM_INADDR(), to read a network address register (e.g. XM_SRC_CHK)
1764 * XM_OUTADDR(), to write a network address register (e.g. XM_SRC_CHK)
1765 * XM_INHASH(), to read the XM_HSM_CHK register
1766 * XM_OUTHASH() to write the XM_HSM_CHK register
1767 *
1768 * para:
1769 * Mac XMAC to access values: MAC_1 or MAC_2
1770 * IoC I/O context needed for SK I/O macros
1771 * Reg XMAC Register to read or write
1772 * (p)Val Value or pointer to the value which should be read or written
1773 *
1774 * usage: XM_OUT16(IoC, MAC_1, XM_MMU_CMD, Value);
1775 */
1776
1777#define XMA(Mac, Reg) \
1778 ((BASE_XMAC_1 + (Mac) * (BASE_XMAC_2 - BASE_XMAC_1)) | ((Reg) << 1))
1779
1780#define XM_IN16(IoC, Mac, Reg, pVal) \
1781 SK_IN16((IoC), XMA((Mac), (Reg)), (pVal))
1782
1783#define XM_OUT16(IoC, Mac, Reg, Val) \
1784 SK_OUT16((IoC), XMA((Mac), (Reg)), (Val))
1785
1786#define XM_IN32(IoC, Mac, Reg, pVal) { \
1787 SK_IN16((IoC), XMA((Mac), (Reg)), \
1788 (SK_U16 SK_FAR*)&((SK_U16 SK_FAR*)(pVal))[XM_WORD_LO]); \
1789 SK_IN16((IoC), XMA((Mac), (Reg+2)), \
1790 (SK_U16 SK_FAR*)&((SK_U16 SK_FAR*)(pVal))[XM_WORD_HI]); \
1791}
1792
1793#define XM_OUT32(IoC, Mac, Reg, Val) { \
1794 SK_OUT16((IoC), XMA((Mac), (Reg)), (SK_U16)((Val) & 0xffffL)); \
1795 SK_OUT16((IoC), XMA((Mac), (Reg+2)), (SK_U16)(((Val) >> 16) & 0xffffL));\
1796}
1797
1798/* Remember: we are always writing to / reading from LITTLE ENDIAN memory */
1799
1800#define XM_INADDR(IoC, Mac, Reg, pVal) { \
1801 SK_U16 Word; \
1802 SK_U8 *pByte; \
1803 pByte = (SK_U8 *)&((SK_U8 *)(pVal))[0]; \
1804 SK_IN16((IoC), XMA((Mac), (Reg)), &Word); \
1805 pByte[0] = (SK_U8)(Word & 0x00ff); \
1806 pByte[1] = (SK_U8)((Word >> 8) & 0x00ff); \
1807 SK_IN16((IoC), XMA((Mac), (Reg+2)), &Word); \
1808 pByte[2] = (SK_U8)(Word & 0x00ff); \
1809 pByte[3] = (SK_U8)((Word >> 8) & 0x00ff); \
1810 SK_IN16((IoC), XMA((Mac), (Reg+4)), &Word); \
1811 pByte[4] = (SK_U8)(Word & 0x00ff); \
1812 pByte[5] = (SK_U8)((Word >> 8) & 0x00ff); \
1813}
1814
1815#define XM_OUTADDR(IoC, Mac, Reg, pVal) { \
1816 SK_U8 SK_FAR *pByte; \
1817 pByte = (SK_U8 SK_FAR *)&((SK_U8 SK_FAR *)(pVal))[0]; \
1818 SK_OUT16((IoC), XMA((Mac), (Reg)), (SK_U16) \
1819 (((SK_U16)(pByte[0]) & 0x00ff) | \
1820 (((SK_U16)(pByte[1]) << 8) & 0xff00))); \
1821 SK_OUT16((IoC), XMA((Mac), (Reg+2)), (SK_U16) \
1822 (((SK_U16)(pByte[2]) & 0x00ff) | \
1823 (((SK_U16)(pByte[3]) << 8) & 0xff00))); \
1824 SK_OUT16((IoC), XMA((Mac), (Reg+4)), (SK_U16) \
1825 (((SK_U16)(pByte[4]) & 0x00ff) | \
1826 (((SK_U16)(pByte[5]) << 8) & 0xff00))); \
1827}
1828
1829#define XM_INHASH(IoC, Mac, Reg, pVal) { \
1830 SK_U16 Word; \
1831 SK_U8 SK_FAR *pByte; \
1832 pByte = (SK_U8 SK_FAR *)&((SK_U8 SK_FAR *)(pVal))[0]; \
1833 SK_IN16((IoC), XMA((Mac), (Reg)), &Word); \
1834 pByte[0] = (SK_U8)(Word & 0x00ff); \
1835 pByte[1] = (SK_U8)((Word >> 8) & 0x00ff); \
1836 SK_IN16((IoC), XMA((Mac), (Reg+2)), &Word); \
1837 pByte[2] = (SK_U8)(Word & 0x00ff); \
1838 pByte[3] = (SK_U8)((Word >> 8) & 0x00ff); \
1839 SK_IN16((IoC), XMA((Mac), (Reg+4)), &Word); \
1840 pByte[4] = (SK_U8)(Word & 0x00ff); \
1841 pByte[5] = (SK_U8)((Word >> 8) & 0x00ff); \
1842 SK_IN16((IoC), XMA((Mac), (Reg+6)), &Word); \
1843 pByte[6] = (SK_U8)(Word & 0x00ff); \
1844 pByte[7] = (SK_U8)((Word >> 8) & 0x00ff); \
1845}
1846
1847#define XM_OUTHASH(IoC, Mac, Reg, pVal) { \
1848 SK_U8 SK_FAR *pByte; \
1849 pByte = (SK_U8 SK_FAR *)&((SK_U8 SK_FAR *)(pVal))[0]; \
1850 SK_OUT16((IoC), XMA((Mac), (Reg)), (SK_U16) \
1851 (((SK_U16)(pByte[0]) & 0x00ff)| \
1852 (((SK_U16)(pByte[1]) << 8) & 0xff00))); \
1853 SK_OUT16((IoC), XMA((Mac), (Reg+2)), (SK_U16) \
1854 (((SK_U16)(pByte[2]) & 0x00ff)| \
1855 (((SK_U16)(pByte[3]) << 8) & 0xff00))); \
1856 SK_OUT16((IoC), XMA((Mac), (Reg+4)), (SK_U16) \
1857 (((SK_U16)(pByte[4]) & 0x00ff)| \
1858 (((SK_U16)(pByte[5]) << 8) & 0xff00))); \
1859 SK_OUT16((IoC), XMA((Mac), (Reg+6)), (SK_U16) \
1860 (((SK_U16)(pByte[6]) & 0x00ff)| \
1861 (((SK_U16)(pByte[7]) << 8) & 0xff00))); \
1862}
1863
1864/*
1865 * macros to access the GMAC (YUKON only)
1866 *
1867 * GM_IN16(), to read a 16 bit register (e.g. GM_GP_STAT)
1868 * GM_OUT16(), to write a 16 bit register (e.g. GM_GP_CTRL)
1869 * GM_IN32(), to read a 32 bit register (e.g. GM_)
1870 * GM_OUT32(), to write a 32 bit register (e.g. GM_)
1871 * GM_INADDR(), to read a network address register (e.g. GM_SRC_ADDR_1L)
1872 * GM_OUTADDR(), to write a network address register (e.g. GM_SRC_ADDR_2L)
1873 * GM_INHASH(), to read the GM_MC_ADDR_H1 register
1874 * GM_OUTHASH() to write the GM_MC_ADDR_H1 register
1875 *
1876 * para:
1877 * Mac GMAC to access values: MAC_1 or MAC_2
1878 * IoC I/O context needed for SK I/O macros
1879 * Reg GMAC Register to read or write
1880 * (p)Val Value or pointer to the value which should be read or written
1881 *
1882 * usage: GM_OUT16(IoC, MAC_1, GM_GP_CTRL, Value);
1883 */
1884
1885#define GMA(Mac, Reg) \
1886 ((BASE_GMAC_1 + (Mac) * (BASE_GMAC_2 - BASE_GMAC_1)) | (Reg))
1887
1888#define GM_IN16(IoC, Mac, Reg, pVal) \
1889 SK_IN16((IoC), GMA((Mac), (Reg)), (pVal))
1890
1891#define GM_OUT16(IoC, Mac, Reg, Val) \
1892 SK_OUT16((IoC), GMA((Mac), (Reg)), (Val))
1893
1894#define GM_IN32(IoC, Mac, Reg, pVal) { \
1895 SK_IN16((IoC), GMA((Mac), (Reg)), \
1896 (SK_U16 SK_FAR*)&((SK_U16 SK_FAR*)(pVal))[XM_WORD_LO]); \
1897 SK_IN16((IoC), GMA((Mac), (Reg+4)), \
1898 (SK_U16 SK_FAR*)&((SK_U16 SK_FAR*)(pVal))[XM_WORD_HI]); \
1899}
1900
1901#define GM_OUT32(IoC, Mac, Reg, Val) { \
1902 SK_OUT16((IoC), GMA((Mac), (Reg)), (SK_U16)((Val) & 0xffffL)); \
1903 SK_OUT16((IoC), GMA((Mac), (Reg+4)), (SK_U16)(((Val) >> 16) & 0xffffL));\
1904}
1905
1906#define GM_INADDR(IoC, Mac, Reg, pVal) { \
1907 SK_U16 Word; \
1908 SK_U8 *pByte; \
1909 pByte = (SK_U8 *)&((SK_U8 *)(pVal))[0]; \
1910 SK_IN16((IoC), GMA((Mac), (Reg)), &Word); \
1911 pByte[0] = (SK_U8)(Word & 0x00ff); \
1912 pByte[1] = (SK_U8)((Word >> 8) & 0x00ff); \
1913 SK_IN16((IoC), GMA((Mac), (Reg+4)), &Word); \
1914 pByte[2] = (SK_U8)(Word & 0x00ff); \
1915 pByte[3] = (SK_U8)((Word >> 8) & 0x00ff); \
1916 SK_IN16((IoC), GMA((Mac), (Reg+8)), &Word); \
1917 pByte[4] = (SK_U8)(Word & 0x00ff); \
1918 pByte[5] = (SK_U8)((Word >> 8) & 0x00ff); \
1919}
1920
1921#define GM_OUTADDR(IoC, Mac, Reg, pVal) { \
1922 SK_U8 SK_FAR *pByte; \
1923 pByte = (SK_U8 SK_FAR *)&((SK_U8 SK_FAR *)(pVal))[0]; \
1924 SK_OUT16((IoC), GMA((Mac), (Reg)), (SK_U16) \
1925 (((SK_U16)(pByte[0]) & 0x00ff) | \
1926 (((SK_U16)(pByte[1]) << 8) & 0xff00))); \
1927 SK_OUT16((IoC), GMA((Mac), (Reg+4)), (SK_U16) \
1928 (((SK_U16)(pByte[2]) & 0x00ff) | \
1929 (((SK_U16)(pByte[3]) << 8) & 0xff00))); \
1930 SK_OUT16((IoC), GMA((Mac), (Reg+8)), (SK_U16) \
1931 (((SK_U16)(pByte[4]) & 0x00ff) | \
1932 (((SK_U16)(pByte[5]) << 8) & 0xff00))); \
1933}
1934
1935#define GM_INHASH(IoC, Mac, Reg, pVal) { \
1936 SK_U16 Word; \
1937 SK_U8 *pByte; \
1938 pByte = (SK_U8 *)&((SK_U8 *)(pVal))[0]; \
1939 SK_IN16((IoC), GMA((Mac), (Reg)), &Word); \
1940 pByte[0] = (SK_U8)(Word & 0x00ff); \
1941 pByte[1] = (SK_U8)((Word >> 8) & 0x00ff); \
1942 SK_IN16((IoC), GMA((Mac), (Reg+4)), &Word); \
1943 pByte[2] = (SK_U8)(Word & 0x00ff); \
1944 pByte[3] = (SK_U8)((Word >> 8) & 0x00ff); \
1945 SK_IN16((IoC), GMA((Mac), (Reg+8)), &Word); \
1946 pByte[4] = (SK_U8)(Word & 0x00ff); \
1947 pByte[5] = (SK_U8)((Word >> 8) & 0x00ff); \
1948 SK_IN16((IoC), GMA((Mac), (Reg+12)), &Word); \
1949 pByte[6] = (SK_U8)(Word & 0x00ff); \
1950 pByte[7] = (SK_U8)((Word >> 8) & 0x00ff); \
1951}
1952
1953#define GM_OUTHASH(IoC, Mac, Reg, pVal) { \
1954 SK_U8 *pByte; \
1955 pByte = (SK_U8 *)&((SK_U8 *)(pVal))[0]; \
1956 SK_OUT16((IoC), GMA((Mac), (Reg)), (SK_U16) \
1957 (((SK_U16)(pByte[0]) & 0x00ff)| \
1958 (((SK_U16)(pByte[1]) << 8) & 0xff00))); \
1959 SK_OUT16((IoC), GMA((Mac), (Reg+4)), (SK_U16) \
1960 (((SK_U16)(pByte[2]) & 0x00ff)| \
1961 (((SK_U16)(pByte[3]) << 8) & 0xff00))); \
1962 SK_OUT16((IoC), GMA((Mac), (Reg+8)), (SK_U16) \
1963 (((SK_U16)(pByte[4]) & 0x00ff)| \
1964 (((SK_U16)(pByte[5]) << 8) & 0xff00))); \
1965 SK_OUT16((IoC), GMA((Mac), (Reg+12)), (SK_U16) \
1966 (((SK_U16)(pByte[6]) & 0x00ff)| \
1967 (((SK_U16)(pByte[7]) << 8) & 0xff00))); \
1968}
1969
1970/*
1971 * Different MAC Types
1972 */
1973#define SK_MAC_XMAC 0 /* Xaqti XMAC II */
1974#define SK_MAC_GMAC 1 /* Marvell GMAC */
1975
1976/*
1977 * Different PHY Types
1978 */
1979#define SK_PHY_XMAC 0 /* integrated in XMAC II */
1980#define SK_PHY_BCOM 1 /* Broadcom BCM5400 */
1981#define SK_PHY_LONE 2 /* Level One LXT1000 */
1982#define SK_PHY_NAT 3 /* National DP83891 */
1983#define SK_PHY_MARV_COPPER 4 /* Marvell 88E1011S */
1984#define SK_PHY_MARV_FIBER 5 /* Marvell 88E1011S working on fiber */
1985
1986/*
1987 * PHY addresses (bits 12..8 of PHY address reg)
1988 */
1989#define PHY_ADDR_XMAC (0<<8)
1990#define PHY_ADDR_BCOM (1<<8)
1991#define PHY_ADDR_LONE (3<<8)
1992#define PHY_ADDR_NAT (0<<8)
1993
1994/* GPHY address (bits 15..11 of SMI control reg) */
1995#define PHY_ADDR_MARV 0
1996
1997/*
1998 * macros to access the PHY
1999 *
2000 * PHY_READ() read a 16 bit value from the PHY
2001 * PHY_WRITE() write a 16 bit value to the PHY
2002 *
2003 * para:
2004 * IoC I/O context needed for SK I/O macros
2005 * pPort Pointer to port struct for PhyAddr
2006 * Mac XMAC to access values: MAC_1 or MAC_2
2007 * PhyReg PHY Register to read or write
2008 * (p)Val Value or pointer to the value which should be read or
2009 * written.
2010 *
2011 * usage: PHY_READ(IoC, pPort, MAC_1, PHY_CTRL, Value);
2012 * Warning: a PHY_READ on an uninitialized PHY (PHY still in reset) never
2013 * comes back. This is checked in DEBUG mode.
2014 */
2015#ifndef DEBUG
2016#define PHY_READ(IoC, pPort, Mac, PhyReg, pVal) { \
2017 SK_U16 Mmu; \
2018 \
2019 XM_OUT16((IoC), (Mac), XM_PHY_ADDR, (PhyReg) | (pPort)->PhyAddr); \
2020 XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \
2021 if ((pPort)->PhyType != SK_PHY_XMAC) { \
2022 do { \
2023 XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \
2024 } while ((Mmu & XM_MMU_PHY_RDY) == 0); \
2025 XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \
2026 } \
2027}
2028#else
2029#define PHY_READ(IoC, pPort, Mac, PhyReg, pVal) { \
2030 SK_U16 Mmu; \
2031 int __i = 0; \
2032 \
2033 XM_OUT16((IoC), (Mac), XM_PHY_ADDR, (PhyReg) | (pPort)->PhyAddr); \
2034 XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \
2035 if ((pPort)->PhyType != SK_PHY_XMAC) { \
2036 do { \
2037 XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \
2038 __i++; \
2039 if (__i > 100000) { \
2040 SK_DBG_PRINTF("*****************************\n"); \
2041 SK_DBG_PRINTF("PHY_READ on uninitialized PHY\n"); \
2042 SK_DBG_PRINTF("*****************************\n"); \
2043 break; \
2044 } \
2045 } while ((Mmu & XM_MMU_PHY_RDY) == 0); \
2046 XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \
2047 } \
2048}
2049#endif /* DEBUG */
2050
2051#define PHY_WRITE(IoC, pPort, Mac, PhyReg, Val) { \
2052 SK_U16 Mmu; \
2053 \
2054 if ((pPort)->PhyType != SK_PHY_XMAC) { \
2055 do { \
2056 XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \
2057 } while ((Mmu & XM_MMU_PHY_BUSY) != 0); \
2058 } \
2059 XM_OUT16((IoC), (Mac), XM_PHY_ADDR, (PhyReg) | (pPort)->PhyAddr); \
2060 XM_OUT16((IoC), (Mac), XM_PHY_DATA, (Val)); \
2061 if ((pPort)->PhyType != SK_PHY_XMAC) { \
2062 do { \
2063 XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \
2064 } while ((Mmu & XM_MMU_PHY_BUSY) != 0); \
2065 } \
2066}
2067
2068/*
2069 * Macro PCI_C()
2070 *
2071 * Use this macro to access PCI config register from the I/O space.
2072 *
2073 * para:
2074 * Addr PCI configuration register to access.
2075 * Values: PCI_VENDOR_ID ... PCI_VPD_ADR_REG,
2076 *
2077 * usage SK_IN16(pAC, PCI_C(PCI_VENDOR_ID), pVal);
2078 */
2079#define PCI_C(Addr) (B7_CFG_SPC + (Addr)) /* PCI Config Space */
2080
2081/*
2082 * Macro SK_HW_ADDR(Base, Addr)
2083 *
2084 * Calculates the effective HW address
2085 *
2086 * para:
2087 * Base I/O or memory base address
2088 * Addr Address offset
2089 *
2090 * usage: May be used in SK_INxx and SK_OUTxx macros
2091 * #define SK_IN8(pAC, Addr, pVal) ...\
2092 * *pVal = (SK_U8)inp(SK_HW_ADDR(pAC->Hw.Iop, Addr)))
2093 */
2094#ifdef SK_MEM_MAPPED_IO
2095#define SK_HW_ADDR(Base, Addr) ((Base) + (Addr))
2096#else /* SK_MEM_MAPPED_IO */
2097#define SK_HW_ADDR(Base, Addr) \
2098 ((Base) + (((Addr) & 0x7f) | (((Addr) >> 7 > 0) ? 0x80 : 0)))
2099#endif /* SK_MEM_MAPPED_IO */
2100
2101#define SZ_LONG (sizeof(SK_U32))
2102
2103/*
2104 * Macro SK_HWAC_LINK_LED()
2105 *
2106 * Use this macro to set the link LED mode.
2107 * para:
2108 * pAC Pointer to adapter context struct
2109 * IoC I/O context needed for SK I/O macros
2110 * Port Port number
2111 * Mode Mode to set for this LED
2112 */
2113#define SK_HWAC_LINK_LED(pAC, IoC, Port, Mode) \
2114 SK_OUT8(IoC, MR_ADDR(Port, LNK_LED_REG), Mode);
2115
2116
2117/* typedefs *******************************************************************/
2118
2119
2120/* function prototypes ********************************************************/
2121
2122#ifdef __cplusplus
2123}
2124#endif /* __cplusplus */
2125
2126#endif /* __INC_SKGEHW_H */
diff --git a/drivers/net/sk98lin/h/skgehwt.h b/drivers/net/sk98lin/h/skgehwt.h
new file mode 100644
index 0000000000..e6b0016a69
--- /dev/null
+++ b/drivers/net/sk98lin/h/skgehwt.h
@@ -0,0 +1,48 @@
1/******************************************************************************
2 *
3 * Name: skhwt.h
4 * Project: Gigabit Ethernet Adapters, Event Scheduler Module
5 * Version: $Revision: 1.7 $
6 * Date: $Date: 2003/09/16 12:55:08 $
7 * Purpose: Defines for the hardware timer functions
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/*
26 * SKGEHWT.H contains all defines and types for the timer functions
27 */
28
29#ifndef _SKGEHWT_H_
30#define _SKGEHWT_H_
31
32/*
33 * SK Hardware Timer
34 * - needed wherever the HWT module is used
35 * - use in Adapters context name pAC->Hwt
36 */
37typedef struct s_Hwt {
38 SK_U32 TStart; /* HWT start */
39 SK_U32 TStop; /* HWT stop */
40 int TActive; /* HWT: flag : active/inactive */
41} SK_HWT;
42
43extern void SkHwtInit(SK_AC *pAC, SK_IOC Ioc);
44extern void SkHwtStart(SK_AC *pAC, SK_IOC Ioc, SK_U32 Time);
45extern void SkHwtStop(SK_AC *pAC, SK_IOC Ioc);
46extern SK_U32 SkHwtRead(SK_AC *pAC, SK_IOC Ioc);
47extern void SkHwtIsr(SK_AC *pAC, SK_IOC Ioc);
48#endif /* _SKGEHWT_H_ */
diff --git a/drivers/net/sk98lin/h/skgei2c.h b/drivers/net/sk98lin/h/skgei2c.h
new file mode 100644
index 0000000000..d9b6f6d8df
--- /dev/null
+++ b/drivers/net/sk98lin/h/skgei2c.h
@@ -0,0 +1,210 @@
1/******************************************************************************
2 *
3 * Name: skgei2c.h
4 * Project: Gigabit Ethernet Adapters, TWSI-Module
5 * Version: $Revision: 1.25 $
6 * Date: $Date: 2003/10/20 09:06:05 $
7 * Purpose: Special defines for TWSI
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/*
26 * SKGEI2C.H contains all SK-98xx specific defines for the TWSI handling
27 */
28
29#ifndef _INC_SKGEI2C_H_
30#define _INC_SKGEI2C_H_
31
32/*
33 * Macros to access the B2_I2C_CTRL
34 */
35#define SK_I2C_CTL(IoC, flag, dev, dev_size, reg, burst) \
36 SK_OUT32(IoC, B2_I2C_CTRL,\
37 (flag ? 0x80000000UL : 0x0L) | \
38 (((SK_U32)reg << 16) & I2C_ADDR) | \
39 (((SK_U32)dev << 9) & I2C_DEV_SEL) | \
40 (dev_size & I2C_DEV_SIZE) | \
41 ((burst << 4) & I2C_BURST_LEN))
42
43#define SK_I2C_STOP(IoC) { \
44 SK_U32 I2cCtrl; \
45 SK_IN32(IoC, B2_I2C_CTRL, &I2cCtrl); \
46 SK_OUT32(IoC, B2_I2C_CTRL, I2cCtrl | I2C_STOP); \
47}
48
49#define SK_I2C_GET_CTL(IoC, pI2cCtrl) SK_IN32(IoC, B2_I2C_CTRL, pI2cCtrl)
50
51/*
52 * Macros to access the TWSI SW Registers
53 */
54#define SK_I2C_SET_BIT(IoC, SetBits) { \
55 SK_U8 OrgBits; \
56 SK_IN8(IoC, B2_I2C_SW, &OrgBits); \
57 SK_OUT8(IoC, B2_I2C_SW, OrgBits | (SK_U8)(SetBits)); \
58}
59
60#define SK_I2C_CLR_BIT(IoC, ClrBits) { \
61 SK_U8 OrgBits; \
62 SK_IN8(IoC, B2_I2C_SW, &OrgBits); \
63 SK_OUT8(IoC, B2_I2C_SW, OrgBits & ~((SK_U8)(ClrBits))); \
64}
65
66#define SK_I2C_GET_SW(IoC, pI2cSw) SK_IN8(IoC, B2_I2C_SW, pI2cSw)
67
68/*
69 * define the possible sensor states
70 */
71#define SK_SEN_IDLE 0 /* Idle: sensor not read */
72#define SK_SEN_VALUE 1 /* Value Read cycle */
73#define SK_SEN_VALEXT 2 /* Extended Value Read cycle */
74
75/*
76 * Conversion factor to convert read Voltage sensor to milli Volt
77 * Conversion factor to convert read Temperature sensor to 10th degree Celsius
78 */
79#define SK_LM80_VT_LSB 22 /* 22mV LSB resolution */
80#define SK_LM80_TEMP_LSB 10 /* 1 degree LSB resolution */
81#define SK_LM80_TEMPEXT_LSB 5 /* 0.5 degree LSB resolution for ext. val. */
82
83/*
84 * formula: counter = (22500*60)/(rpm * divisor * pulses/2)
85 * assuming: 6500rpm, 4 pulses, divisor 1
86 */
87#define SK_LM80_FAN_FAKTOR ((22500L*60)/(1*2))
88
89/*
90 * Define sensor management data
91 * Maximum is reached on Genesis copper dual port and Yukon-64
92 * Board specific maximum is in pAC->I2c.MaxSens
93 */
94#define SK_MAX_SENSORS 8 /* maximal no. of installed sensors */
95#define SK_MIN_SENSORS 5 /* minimal no. of installed sensors */
96
97/*
98 * To watch the state machine (SM) use the timer in two ways
99 * instead of one as hitherto
100 */
101#define SK_TIMER_WATCH_SM 0 /* Watch the SM to finish in a spec. time */
102#define SK_TIMER_NEW_GAUGING 1 /* Start a new gauging when timer expires */
103
104/*
105 * Defines for the individual thresholds
106 */
107
108/* Temperature sensor */
109#define SK_SEN_TEMP_HIGH_ERR 800 /* Temperature High Err Threshold */
110#define SK_SEN_TEMP_HIGH_WARN 700 /* Temperature High Warn Threshold */
111#define SK_SEN_TEMP_LOW_WARN 100 /* Temperature Low Warn Threshold */
112#define SK_SEN_TEMP_LOW_ERR 0 /* Temperature Low Err Threshold */
113
114/* VCC which should be 5 V */
115#define SK_SEN_PCI_5V_HIGH_ERR 5588 /* Voltage PCI High Err Threshold */
116#define SK_SEN_PCI_5V_HIGH_WARN 5346 /* Voltage PCI High Warn Threshold */
117#define SK_SEN_PCI_5V_LOW_WARN 4664 /* Voltage PCI Low Warn Threshold */
118#define SK_SEN_PCI_5V_LOW_ERR 4422 /* Voltage PCI Low Err Threshold */
119
120/*
121 * VIO may be 5 V or 3.3 V. Initialization takes two parts:
122 * 1. Initialize lowest lower limit and highest higher limit.
123 * 2. After the first value is read correct the upper or the lower limit to
124 * the appropriate C constant.
125 *
126 * Warning limits are +-5% of the exepected voltage.
127 * Error limits are +-10% of the expected voltage.
128 */
129
130/* Bug fix AF: 16.Aug.2001: Correct the init base of LM80 sensor */
131
132#define SK_SEN_PCI_IO_5V_HIGH_ERR 5566 /* + 10% V PCI-IO High Err Threshold */
133#define SK_SEN_PCI_IO_5V_HIGH_WARN 5324 /* + 5% V PCI-IO High Warn Threshold */
134 /* 5000 mVolt */
135#define SK_SEN_PCI_IO_5V_LOW_WARN 4686 /* - 5% V PCI-IO Low Warn Threshold */
136#define SK_SEN_PCI_IO_5V_LOW_ERR 4444 /* - 10% V PCI-IO Low Err Threshold */
137
138#define SK_SEN_PCI_IO_RANGE_LIMITER 4000 /* 4000 mV range delimiter */
139
140/* correction values for the second pass */
141#define SK_SEN_PCI_IO_3V3_HIGH_ERR 3850 /* + 15% V PCI-IO High Err Threshold */
142#define SK_SEN_PCI_IO_3V3_HIGH_WARN 3674 /* + 10% V PCI-IO High Warn Threshold */
143 /* 3300 mVolt */
144#define SK_SEN_PCI_IO_3V3_LOW_WARN 2926 /* - 10% V PCI-IO Low Warn Threshold */
145#define SK_SEN_PCI_IO_3V3_LOW_ERR 2772 /* - 15% V PCI-IO Low Err Threshold */
146
147/*
148 * VDD voltage
149 */
150#define SK_SEN_VDD_HIGH_ERR 3630 /* Voltage ASIC High Err Threshold */
151#define SK_SEN_VDD_HIGH_WARN 3476 /* Voltage ASIC High Warn Threshold */
152#define SK_SEN_VDD_LOW_WARN 3146 /* Voltage ASIC Low Warn Threshold */
153#define SK_SEN_VDD_LOW_ERR 2970 /* Voltage ASIC Low Err Threshold */
154
155/*
156 * PHY PLL 3V3 voltage
157 */
158#define SK_SEN_PLL_3V3_HIGH_ERR 3630 /* Voltage PMA High Err Threshold */
159#define SK_SEN_PLL_3V3_HIGH_WARN 3476 /* Voltage PMA High Warn Threshold */
160#define SK_SEN_PLL_3V3_LOW_WARN 3146 /* Voltage PMA Low Warn Threshold */
161#define SK_SEN_PLL_3V3_LOW_ERR 2970 /* Voltage PMA Low Err Threshold */
162
163/*
164 * VAUX (YUKON only)
165 */
166#define SK_SEN_VAUX_3V3_HIGH_ERR 3630 /* Voltage VAUX High Err Threshold */
167#define SK_SEN_VAUX_3V3_HIGH_WARN 3476 /* Voltage VAUX High Warn Threshold */
168#define SK_SEN_VAUX_3V3_LOW_WARN 3146 /* Voltage VAUX Low Warn Threshold */
169#define SK_SEN_VAUX_3V3_LOW_ERR 2970 /* Voltage VAUX Low Err Threshold */
170#define SK_SEN_VAUX_0V_WARN_ERR 0 /* if VAUX not present */
171#define SK_SEN_VAUX_RANGE_LIMITER 1000 /* 1000 mV range delimiter */
172
173/*
174 * PHY 2V5 voltage
175 */
176#define SK_SEN_PHY_2V5_HIGH_ERR 2750 /* Voltage PHY High Err Threshold */
177#define SK_SEN_PHY_2V5_HIGH_WARN 2640 /* Voltage PHY High Warn Threshold */
178#define SK_SEN_PHY_2V5_LOW_WARN 2376 /* Voltage PHY Low Warn Threshold */
179#define SK_SEN_PHY_2V5_LOW_ERR 2222 /* Voltage PHY Low Err Threshold */
180
181/*
182 * ASIC Core 1V5 voltage (YUKON only)
183 */
184#define SK_SEN_CORE_1V5_HIGH_ERR 1650 /* Voltage ASIC Core High Err Threshold */
185#define SK_SEN_CORE_1V5_HIGH_WARN 1575 /* Voltage ASIC Core High Warn Threshold */
186#define SK_SEN_CORE_1V5_LOW_WARN 1425 /* Voltage ASIC Core Low Warn Threshold */
187#define SK_SEN_CORE_1V5_LOW_ERR 1350 /* Voltage ASIC Core Low Err Threshold */
188
189/*
190 * FAN 1 speed
191 */
192/* assuming: 6500rpm +-15%, 4 pulses,
193 * warning at: 80 %
194 * error at: 70 %
195 * no upper limit
196 */
197#define SK_SEN_FAN_HIGH_ERR 20000 /* FAN Speed High Err Threshold */
198#define SK_SEN_FAN_HIGH_WARN 20000 /* FAN Speed High Warn Threshold */
199#define SK_SEN_FAN_LOW_WARN 5200 /* FAN Speed Low Warn Threshold */
200#define SK_SEN_FAN_LOW_ERR 4550 /* FAN Speed Low Err Threshold */
201
202/*
203 * Some Voltages need dynamic thresholds
204 */
205#define SK_SEN_DYN_INIT_NONE 0 /* No dynamic init of thresholds */
206#define SK_SEN_DYN_INIT_PCI_IO 10 /* Init PCI-IO with new thresholds */
207#define SK_SEN_DYN_INIT_VAUX 11 /* Init VAUX with new thresholds */
208
209extern int SkLm80ReadSensor(SK_AC *pAC, SK_IOC IoC, SK_SENSOR *pSen);
210#endif /* n_INC_SKGEI2C_H */
diff --git a/drivers/net/sk98lin/h/skgeinit.h b/drivers/net/sk98lin/h/skgeinit.h
new file mode 100644
index 0000000000..143e635ec2
--- /dev/null
+++ b/drivers/net/sk98lin/h/skgeinit.h
@@ -0,0 +1,797 @@
1/******************************************************************************
2 *
3 * Name: skgeinit.h
4 * Project: Gigabit Ethernet Adapters, Common Modules
5 * Version: $Revision: 1.83 $
6 * Date: $Date: 2003/09/16 14:07:37 $
7 * Purpose: Structures and prototypes for the GE Init Module
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25#ifndef __INC_SKGEINIT_H_
26#define __INC_SKGEINIT_H_
27
28#ifdef __cplusplus
29extern "C" {
30#endif /* __cplusplus */
31
32/* defines ********************************************************************/
33
34#define SK_TEST_VAL 0x11335577UL
35
36/* modifying Link LED behaviour (used with SkGeLinkLED()) */
37#define SK_LNK_OFF LED_OFF
38#define SK_LNK_ON (LED_ON | LED_BLK_OFF | LED_SYNC_OFF)
39#define SK_LNK_BLINK (LED_ON | LED_BLK_ON | LED_SYNC_ON)
40#define SK_LNK_PERM (LED_ON | LED_BLK_OFF | LED_SYNC_ON)
41#define SK_LNK_TST (LED_ON | LED_BLK_ON | LED_SYNC_OFF)
42
43/* parameter 'Mode' when calling SK_HWAC_LINK_LED() */
44#define SK_LED_OFF LED_OFF
45#define SK_LED_ACTIVE (LED_ON | LED_BLK_OFF | LED_SYNC_OFF)
46#define SK_LED_STANDBY (LED_ON | LED_BLK_ON | LED_SYNC_OFF)
47
48/* addressing LED Registers in SkGeXmitLED() */
49#define XMIT_LED_INI 0
50#define XMIT_LED_CNT (RX_LED_VAL - RX_LED_INI)
51#define XMIT_LED_CTRL (RX_LED_CTRL- RX_LED_INI)
52#define XMIT_LED_TST (RX_LED_TST - RX_LED_INI)
53
54/* parameter 'Mode' when calling SkGeXmitLED() */
55#define SK_LED_DIS 0
56#define SK_LED_ENA 1
57#define SK_LED_TST 2
58
59/* Counter and Timer constants, for a host clock of 62.5 MHz */
60#define SK_XMIT_DUR 0x002faf08UL /* 50 ms */
61#define SK_BLK_DUR 0x01dcd650UL /* 500 ms */
62
63#define SK_DPOLL_DEF 0x00ee6b28UL /* 250 ms at 62.5 MHz */
64
65#define SK_DPOLL_MAX 0x00ffffffUL /* 268 ms at 62.5 MHz */
66 /* 215 ms at 78.12 MHz */
67
68#define SK_FACT_62 100 /* is given in percent */
69#define SK_FACT_53 85 /* on GENESIS: 53.12 MHz */
70#define SK_FACT_78 125 /* on YUKON: 78.12 MHz */
71
72/* Timeout values */
73#define SK_MAC_TO_53 72 /* MAC arbiter timeout */
74#define SK_PKT_TO_53 0x2000 /* Packet arbiter timeout */
75#define SK_PKT_TO_MAX 0xffff /* Maximum value */
76#define SK_RI_TO_53 36 /* RAM interface timeout */
77
78#define SK_PHY_ACC_TO 600000 /* PHY access timeout */
79
80/* RAM Buffer High Pause Threshold values */
81#define SK_RB_ULPP ( 8 * 1024) /* Upper Level in kB/8 */
82#define SK_RB_LLPP_S (10 * 1024) /* Lower Level for small Queues */
83#define SK_RB_LLPP_B (16 * 1024) /* Lower Level for big Queues */
84
85#ifndef SK_BMU_RX_WM
86#define SK_BMU_RX_WM 0x600 /* BMU Rx Watermark */
87#endif
88#ifndef SK_BMU_TX_WM
89#define SK_BMU_TX_WM 0x600 /* BMU Tx Watermark */
90#endif
91
92/* XMAC II Rx High Watermark */
93#define SK_XM_RX_HI_WM 0x05aa /* 1450 */
94
95/* XMAC II Tx Threshold */
96#define SK_XM_THR_REDL 0x01fb /* .. for redundant link usage */
97#define SK_XM_THR_SL 0x01fb /* .. for single link adapters */
98#define SK_XM_THR_MULL 0x01fb /* .. for multiple link usage */
99#define SK_XM_THR_JUMBO 0x03fc /* .. for jumbo frame usage */
100
101/* values for GIPortUsage */
102#define SK_RED_LINK 1 /* redundant link usage */
103#define SK_MUL_LINK 2 /* multiple link usage */
104#define SK_JUMBO_LINK 3 /* driver uses jumbo frames */
105
106/* Minimum RAM Buffer Rx Queue Size */
107#define SK_MIN_RXQ_SIZE 16 /* 16 kB */
108
109/* Minimum RAM Buffer Tx Queue Size */
110#define SK_MIN_TXQ_SIZE 16 /* 16 kB */
111
112/* Queue Size units */
113#define QZ_UNITS 0x7
114#define QZ_STEP 8
115
116/* Percentage of queue size from whole memory */
117/* 80 % for receive */
118#define RAM_QUOTA_RX 80L
119/* 0% for sync transfer */
120#define RAM_QUOTA_SYNC 0L
121/* the rest (20%) is taken for async transfer */
122
123/* Get the rounded queue size in Bytes in 8k steps */
124#define ROUND_QUEUE_SIZE(SizeInBytes) \
125 ((((unsigned long) (SizeInBytes) + (QZ_STEP*1024L)-1) / 1024) & \
126 ~(QZ_STEP-1))
127
128/* Get the rounded queue size in KBytes in 8k steps */
129#define ROUND_QUEUE_SIZE_KB(Kilobytes) \
130 ROUND_QUEUE_SIZE((Kilobytes) * 1024L)
131
132/* Types of RAM Buffer Queues */
133#define SK_RX_SRAM_Q 1 /* small receive queue */
134#define SK_RX_BRAM_Q 2 /* big receive queue */
135#define SK_TX_RAM_Q 3 /* small or big transmit queue */
136
137/* parameter 'Dir' when calling SkGeStopPort() */
138#define SK_STOP_TX 1 /* Stops the transmit path, resets the XMAC */
139#define SK_STOP_RX 2 /* Stops the receive path */
140#define SK_STOP_ALL 3 /* Stops Rx and Tx path, resets the XMAC */
141
142/* parameter 'RstMode' when calling SkGeStopPort() */
143#define SK_SOFT_RST 1 /* perform a software reset */
144#define SK_HARD_RST 2 /* perform a hardware reset */
145
146/* Init Levels */
147#define SK_INIT_DATA 0 /* Init level 0: init data structures */
148#define SK_INIT_IO 1 /* Init level 1: init with IOs */
149#define SK_INIT_RUN 2 /* Init level 2: init for run time */
150
151/* Link Mode Parameter */
152#define SK_LMODE_HALF 1 /* Half Duplex Mode */
153#define SK_LMODE_FULL 2 /* Full Duplex Mode */
154#define SK_LMODE_AUTOHALF 3 /* AutoHalf Duplex Mode */
155#define SK_LMODE_AUTOFULL 4 /* AutoFull Duplex Mode */
156#define SK_LMODE_AUTOBOTH 5 /* AutoBoth Duplex Mode */
157#define SK_LMODE_AUTOSENSE 6 /* configured mode auto sensing */
158#define SK_LMODE_INDETERMINATED 7 /* indeterminated */
159
160/* Auto-negotiation timeout in 100ms granularity */
161#define SK_AND_MAX_TO 6 /* Wait 600 msec before link comes up */
162
163/* Auto-negotiation error codes */
164#define SK_AND_OK 0 /* no error */
165#define SK_AND_OTHER 1 /* other error than below */
166#define SK_AND_DUP_CAP 2 /* Duplex capabilities error */
167
168
169/* Link Speed Capabilities */
170#define SK_LSPEED_CAP_AUTO (1<<0) /* Automatic resolution */
171#define SK_LSPEED_CAP_10MBPS (1<<1) /* 10 Mbps */
172#define SK_LSPEED_CAP_100MBPS (1<<2) /* 100 Mbps */
173#define SK_LSPEED_CAP_1000MBPS (1<<3) /* 1000 Mbps */
174#define SK_LSPEED_CAP_INDETERMINATED (1<<4) /* indeterminated */
175
176/* Link Speed Parameter */
177#define SK_LSPEED_AUTO 1 /* Automatic resolution */
178#define SK_LSPEED_10MBPS 2 /* 10 Mbps */
179#define SK_LSPEED_100MBPS 3 /* 100 Mbps */
180#define SK_LSPEED_1000MBPS 4 /* 1000 Mbps */
181#define SK_LSPEED_INDETERMINATED 5 /* indeterminated */
182
183/* Link Speed Current State */
184#define SK_LSPEED_STAT_UNKNOWN 1
185#define SK_LSPEED_STAT_10MBPS 2
186#define SK_LSPEED_STAT_100MBPS 3
187#define SK_LSPEED_STAT_1000MBPS 4
188#define SK_LSPEED_STAT_INDETERMINATED 5
189
190
191/* Link Capability Parameter */
192#define SK_LMODE_CAP_HALF (1<<0) /* Half Duplex Mode */
193#define SK_LMODE_CAP_FULL (1<<1) /* Full Duplex Mode */
194#define SK_LMODE_CAP_AUTOHALF (1<<2) /* AutoHalf Duplex Mode */
195#define SK_LMODE_CAP_AUTOFULL (1<<3) /* AutoFull Duplex Mode */
196#define SK_LMODE_CAP_INDETERMINATED (1<<4) /* indeterminated */
197
198/* Link Mode Current State */
199#define SK_LMODE_STAT_UNKNOWN 1 /* Unknown Duplex Mode */
200#define SK_LMODE_STAT_HALF 2 /* Half Duplex Mode */
201#define SK_LMODE_STAT_FULL 3 /* Full Duplex Mode */
202#define SK_LMODE_STAT_AUTOHALF 4 /* Half Duplex Mode obtained by Auto-Neg */
203#define SK_LMODE_STAT_AUTOFULL 5 /* Full Duplex Mode obtained by Auto-Neg */
204#define SK_LMODE_STAT_INDETERMINATED 6 /* indeterminated */
205
206/* Flow Control Mode Parameter (and capabilities) */
207#define SK_FLOW_MODE_NONE 1 /* No Flow-Control */
208#define SK_FLOW_MODE_LOC_SEND 2 /* Local station sends PAUSE */
209#define SK_FLOW_MODE_SYMMETRIC 3 /* Both stations may send PAUSE */
210#define SK_FLOW_MODE_SYM_OR_REM 4 /* Both stations may send PAUSE or
211 * just the remote station may send PAUSE
212 */
213#define SK_FLOW_MODE_INDETERMINATED 5 /* indeterminated */
214
215/* Flow Control Status Parameter */
216#define SK_FLOW_STAT_NONE 1 /* No Flow Control */
217#define SK_FLOW_STAT_REM_SEND 2 /* Remote Station sends PAUSE */
218#define SK_FLOW_STAT_LOC_SEND 3 /* Local station sends PAUSE */
219#define SK_FLOW_STAT_SYMMETRIC 4 /* Both station may send PAUSE */
220#define SK_FLOW_STAT_INDETERMINATED 5 /* indeterminated */
221
222/* Master/Slave Mode Capabilities */
223#define SK_MS_CAP_AUTO (1<<0) /* Automatic resolution */
224#define SK_MS_CAP_MASTER (1<<1) /* This station is master */
225#define SK_MS_CAP_SLAVE (1<<2) /* This station is slave */
226#define SK_MS_CAP_INDETERMINATED (1<<3) /* indeterminated */
227
228/* Set Master/Slave Mode Parameter (and capabilities) */
229#define SK_MS_MODE_AUTO 1 /* Automatic resolution */
230#define SK_MS_MODE_MASTER 2 /* This station is master */
231#define SK_MS_MODE_SLAVE 3 /* This station is slave */
232#define SK_MS_MODE_INDETERMINATED 4 /* indeterminated */
233
234/* Master/Slave Status Parameter */
235#define SK_MS_STAT_UNSET 1 /* The M/S status is not set */
236#define SK_MS_STAT_MASTER 2 /* This station is master */
237#define SK_MS_STAT_SLAVE 3 /* This station is slave */
238#define SK_MS_STAT_FAULT 4 /* M/S resolution failed */
239#define SK_MS_STAT_INDETERMINATED 5 /* indeterminated */
240
241/* parameter 'Mode' when calling SkXmSetRxCmd() */
242#define SK_STRIP_FCS_ON (1<<0) /* Enable FCS stripping of Rx frames */
243#define SK_STRIP_FCS_OFF (1<<1) /* Disable FCS stripping of Rx frames */
244#define SK_STRIP_PAD_ON (1<<2) /* Enable pad byte stripping of Rx fr */
245#define SK_STRIP_PAD_OFF (1<<3) /* Disable pad byte stripping of Rx fr */
246#define SK_LENERR_OK_ON (1<<4) /* Don't chk fr for in range len error */
247#define SK_LENERR_OK_OFF (1<<5) /* Check frames for in range len error */
248#define SK_BIG_PK_OK_ON (1<<6) /* Don't set Rx Error bit for big frames */
249#define SK_BIG_PK_OK_OFF (1<<7) /* Set Rx Error bit for big frames */
250#define SK_SELF_RX_ON (1<<8) /* Enable Rx of own packets */
251#define SK_SELF_RX_OFF (1<<9) /* Disable Rx of own packets */
252
253/* parameter 'Para' when calling SkMacSetRxTxEn() */
254#define SK_MAC_LOOPB_ON (1<<0) /* Enable MAC Loopback Mode */
255#define SK_MAC_LOOPB_OFF (1<<1) /* Disable MAC Loopback Mode */
256#define SK_PHY_LOOPB_ON (1<<2) /* Enable PHY Loopback Mode */
257#define SK_PHY_LOOPB_OFF (1<<3) /* Disable PHY Loopback Mode */
258#define SK_PHY_FULLD_ON (1<<4) /* Enable GMII Full Duplex */
259#define SK_PHY_FULLD_OFF (1<<5) /* Disable GMII Full Duplex */
260
261/* States of PState */
262#define SK_PRT_RESET 0 /* the port is reset */
263#define SK_PRT_STOP 1 /* the port is stopped (similar to SW reset) */
264#define SK_PRT_INIT 2 /* the port is initialized */
265#define SK_PRT_RUN 3 /* the port has an active link */
266
267/* PHY power down modes */
268#define PHY_PM_OPERATIONAL_MODE 0 /* PHY operational mode */
269#define PHY_PM_DEEP_SLEEP 1 /* coma mode --> minimal power */
270#define PHY_PM_IEEE_POWER_DOWN 2 /* IEEE 22.2.4.1.5 compl. power down */
271#define PHY_PM_ENERGY_DETECT 3 /* energy detect */
272#define PHY_PM_ENERGY_DETECT_PLUS 4 /* energy detect plus */
273
274/* Default receive frame limit for Workaround of XMAC Errata */
275#define SK_DEF_RX_WA_LIM SK_CONSTU64(100)
276
277/* values for GILedBlinkCtrl (LED Blink Control) */
278#define SK_ACT_LED_BLINK (1<<0) /* Active LED blinking */
279#define SK_DUP_LED_NORMAL (1<<1) /* Duplex LED normal */
280#define SK_LED_LINK100_ON (1<<2) /* Link 100M LED on */
281
282/* Link Partner Status */
283#define SK_LIPA_UNKNOWN 0 /* Link partner is in unknown state */
284#define SK_LIPA_MANUAL 1 /* Link partner is in detected manual state */
285#define SK_LIPA_AUTO 2 /* Link partner is in auto-negotiation state */
286
287/* Maximum Restarts before restart is ignored (3Com WA) */
288#define SK_MAX_LRESTART 3 /* Max. 3 times the link is restarted */
289
290/* Max. Auto-neg. timeouts before link detection in sense mode is reset */
291#define SK_MAX_ANEG_TO 10 /* Max. 10 times the sense mode is reset */
292
293/* structures *****************************************************************/
294
295/*
296 * MAC specific functions
297 */
298typedef struct s_GeMacFunc {
299 int (*pFnMacUpdateStats)(SK_AC *pAC, SK_IOC IoC, unsigned int Port);
300 int (*pFnMacStatistic)(SK_AC *pAC, SK_IOC IoC, unsigned int Port,
301 SK_U16 StatAddr, SK_U32 SK_FAR *pVal);
302 int (*pFnMacResetCounter)(SK_AC *pAC, SK_IOC IoC, unsigned int Port);
303 int (*pFnMacOverflow)(SK_AC *pAC, SK_IOC IoC, unsigned int Port,
304 SK_U16 IStatus, SK_U64 SK_FAR *pVal);
305} SK_GEMACFUNC;
306
307/*
308 * Port Structure
309 */
310typedef struct s_GePort {
311#ifndef SK_DIAG
312 SK_TIMER PWaTimer; /* Workaround Timer */
313 SK_TIMER HalfDupChkTimer;
314#endif /* SK_DIAG */
315 SK_U32 PPrevShorts; /* Previous Short Counter checking */
316 SK_U32 PPrevFcs; /* Previous FCS Error Counter checking */
317 SK_U64 PPrevRx; /* Previous RxOk Counter checking */
318 SK_U64 PRxLim; /* Previous RxOk Counter checking */
319 SK_U64 LastOctets; /* For half duplex hang check */
320 int PLinkResCt; /* Link Restart Counter */
321 int PAutoNegTimeOut;/* Auto-negotiation timeout current value */
322 int PAutoNegTOCt; /* Auto-negotiation Timeout Counter */
323 int PRxQSize; /* Port Rx Queue Size in kB */
324 int PXSQSize; /* Port Synchronous Transmit Queue Size in kB */
325 int PXAQSize; /* Port Asynchronous Transmit Queue Size in kB */
326 SK_U32 PRxQRamStart; /* Receive Queue RAM Buffer Start Address */
327 SK_U32 PRxQRamEnd; /* Receive Queue RAM Buffer End Address */
328 SK_U32 PXsQRamStart; /* Sync Tx Queue RAM Buffer Start Address */
329 SK_U32 PXsQRamEnd; /* Sync Tx Queue RAM Buffer End Address */
330 SK_U32 PXaQRamStart; /* Async Tx Queue RAM Buffer Start Address */
331 SK_U32 PXaQRamEnd; /* Async Tx Queue RAM Buffer End Address */
332 SK_U32 PRxOverCnt; /* Receive Overflow Counter */
333 int PRxQOff; /* Rx Queue Address Offset */
334 int PXsQOff; /* Synchronous Tx Queue Address Offset */
335 int PXaQOff; /* Asynchronous Tx Queue Address Offset */
336 int PhyType; /* PHY used on this port */
337 int PState; /* Port status (reset, stop, init, run) */
338 SK_U16 PhyId1; /* PHY Id1 on this port */
339 SK_U16 PhyAddr; /* MDIO/MDC PHY address */
340 SK_U16 PIsave; /* Saved Interrupt status word */
341 SK_U16 PSsave; /* Saved PHY status word */
342 SK_U16 PGmANegAdv; /* Saved GPhy AutoNegAdvertisment register */
343 SK_BOOL PHWLinkUp; /* The hardware Link is up (wiring) */
344 SK_BOOL PLinkBroken; /* Is Link broken ? */
345 SK_BOOL PCheckPar; /* Do we check for parity errors ? */
346 SK_BOOL HalfDupTimerActive;
347 SK_U8 PLinkCap; /* Link Capabilities */
348 SK_U8 PLinkModeConf; /* Link Mode configured */
349 SK_U8 PLinkMode; /* Link Mode currently used */
350 SK_U8 PLinkModeStatus;/* Link Mode Status */
351 SK_U8 PLinkSpeedCap; /* Link Speed Capabilities(10/100/1000 Mbps) */
352 SK_U8 PLinkSpeed; /* configured Link Speed (10/100/1000 Mbps) */
353 SK_U8 PLinkSpeedUsed; /* current Link Speed (10/100/1000 Mbps) */
354 SK_U8 PFlowCtrlCap; /* Flow Control Capabilities */
355 SK_U8 PFlowCtrlMode; /* Flow Control Mode */
356 SK_U8 PFlowCtrlStatus;/* Flow Control Status */
357 SK_U8 PMSCap; /* Master/Slave Capabilities */
358 SK_U8 PMSMode; /* Master/Slave Mode */
359 SK_U8 PMSStatus; /* Master/Slave Status */
360 SK_BOOL PAutoNegFail; /* Auto-negotiation fail flag */
361 SK_U8 PLipaAutoNeg; /* Auto-negotiation possible with Link Partner */
362 SK_U8 PCableLen; /* Cable Length */
363 SK_U8 PMdiPairLen[4]; /* MDI[0..3] Pair Length */
364 SK_U8 PMdiPairSts[4]; /* MDI[0..3] Pair Diagnostic Status */
365 SK_U8 PPhyPowerState; /* PHY current power state */
366 int PMacColThres; /* MAC Collision Threshold */
367 int PMacJamLen; /* MAC Jam length */
368 int PMacJamIpgVal; /* MAC Jam IPG */
369 int PMacJamIpgData; /* MAC IPG Jam to Data */
370 int PMacIpgData; /* MAC Data IPG */
371 SK_BOOL PMacLimit4; /* reset collision counter and backoff algorithm */
372} SK_GEPORT;
373
374/*
375 * Gigabit Ethernet Initialization Struct
376 * (has to be included in the adapter context)
377 */
378typedef struct s_GeInit {
379 int GIChipId; /* Chip Identification Number */
380 int GIChipRev; /* Chip Revision Number */
381 SK_U8 GIPciHwRev; /* PCI HW Revision Number */
382 SK_BOOL GIGenesis; /* Genesis adapter ? */
383 SK_BOOL GIYukon; /* YUKON-A1/Bx chip */
384 SK_BOOL GIYukonLite; /* YUKON-Lite chip */
385 SK_BOOL GICopperType; /* Copper Type adapter ? */
386 SK_BOOL GIPciSlot64; /* 64-bit PCI Slot */
387 SK_BOOL GIPciClock66; /* 66 MHz PCI Clock */
388 SK_BOOL GIVauxAvail; /* VAUX available (YUKON) */
389 SK_BOOL GIYukon32Bit; /* 32-Bit YUKON adapter */
390 SK_U16 GILedBlinkCtrl; /* LED Blink Control */
391 int GIMacsFound; /* Number of MACs found on this adapter */
392 int GIMacType; /* MAC Type used on this adapter */
393 int GIHstClkFact; /* Host Clock Factor (62.5 / HstClk * 100) */
394 int GIPortUsage; /* Driver Port Usage */
395 int GILevel; /* Initialization Level completed */
396 int GIRamSize; /* The RAM size of the adapter in kB */
397 int GIWolOffs; /* WOL Register Offset (HW-Bug in Rev. A) */
398 SK_U32 GIRamOffs; /* RAM Address Offset for addr calculation */
399 SK_U32 GIPollTimerVal; /* Descr. Poll Timer Init Val (HstClk ticks) */
400 SK_U32 GIValIrqMask; /* Value for Interrupt Mask */
401 SK_U32 GITimeStampCnt; /* Time Stamp High Counter (YUKON only) */
402 SK_GEPORT GP[SK_MAX_MACS];/* Port Dependent Information */
403 SK_GEMACFUNC GIFunc; /* MAC depedent functions */
404} SK_GEINIT;
405
406/*
407 * Error numbers and messages for skxmac2.c and skgeinit.c
408 */
409#define SKERR_HWI_E001 (SK_ERRBASE_HWINIT)
410#define SKERR_HWI_E001MSG "SkXmClrExactAddr() has got illegal parameters"
411#define SKERR_HWI_E002 (SKERR_HWI_E001+1)
412#define SKERR_HWI_E002MSG "SkGeInit(): Level 1 call missing"
413#define SKERR_HWI_E003 (SKERR_HWI_E002+1)
414#define SKERR_HWI_E003MSG "SkGeInit() called with illegal init Level"
415#define SKERR_HWI_E004 (SKERR_HWI_E003+1)
416#define SKERR_HWI_E004MSG "SkGeInitPort(): Queue Size illegal configured"
417#define SKERR_HWI_E005 (SKERR_HWI_E004+1)
418#define SKERR_HWI_E005MSG "SkGeInitPort(): cannot init running ports"
419#define SKERR_HWI_E006 (SKERR_HWI_E005+1)
420#define SKERR_HWI_E006MSG "SkGeMacInit(): PState does not match HW state"
421#define SKERR_HWI_E007 (SKERR_HWI_E006+1)
422#define SKERR_HWI_E007MSG "SkXmInitDupMd() called with invalid Dup Mode"
423#define SKERR_HWI_E008 (SKERR_HWI_E007+1)
424#define SKERR_HWI_E008MSG "SkXmSetRxCmd() called with invalid Mode"
425#define SKERR_HWI_E009 (SKERR_HWI_E008+1)
426#define SKERR_HWI_E009MSG "SkGeCfgSync() called although PXSQSize zero"
427#define SKERR_HWI_E010 (SKERR_HWI_E009+1)
428#define SKERR_HWI_E010MSG "SkGeCfgSync() called with invalid parameters"
429#define SKERR_HWI_E011 (SKERR_HWI_E010+1)
430#define SKERR_HWI_E011MSG "SkGeInitPort(): Receive Queue Size too small"
431#define SKERR_HWI_E012 (SKERR_HWI_E011+1)
432#define SKERR_HWI_E012MSG "SkGeInitPort(): invalid Queue Size specified"
433#define SKERR_HWI_E013 (SKERR_HWI_E012+1)
434#define SKERR_HWI_E013MSG "SkGeInitPort(): cfg changed for running queue"
435#define SKERR_HWI_E014 (SKERR_HWI_E013+1)
436#define SKERR_HWI_E014MSG "SkGeInitPort(): unknown GIPortUsage specified"
437#define SKERR_HWI_E015 (SKERR_HWI_E014+1)
438#define SKERR_HWI_E015MSG "Illegal Link mode parameter"
439#define SKERR_HWI_E016 (SKERR_HWI_E015+1)
440#define SKERR_HWI_E016MSG "Illegal Flow control mode parameter"
441#define SKERR_HWI_E017 (SKERR_HWI_E016+1)
442#define SKERR_HWI_E017MSG "Illegal value specified for GIPollTimerVal"
443#define SKERR_HWI_E018 (SKERR_HWI_E017+1)
444#define SKERR_HWI_E018MSG "FATAL: SkGeStopPort() does not terminate (Tx)"
445#define SKERR_HWI_E019 (SKERR_HWI_E018+1)
446#define SKERR_HWI_E019MSG "Illegal Speed parameter"
447#define SKERR_HWI_E020 (SKERR_HWI_E019+1)
448#define SKERR_HWI_E020MSG "Illegal Master/Slave parameter"
449#define SKERR_HWI_E021 (SKERR_HWI_E020+1)
450#define SKERR_HWI_E021MSG "MacUpdateStats(): cannot update statistic counter"
451#define SKERR_HWI_E022 (SKERR_HWI_E021+1)
452#define SKERR_HWI_E022MSG "MacStatistic(): illegal statistic base address"
453#define SKERR_HWI_E023 (SKERR_HWI_E022+1)
454#define SKERR_HWI_E023MSG "SkGeInitPort(): Transmit Queue Size too small"
455#define SKERR_HWI_E024 (SKERR_HWI_E023+1)
456#define SKERR_HWI_E024MSG "FATAL: SkGeStopPort() does not terminate (Rx)"
457#define SKERR_HWI_E025 (SKERR_HWI_E024+1)
458#define SKERR_HWI_E025MSG ""
459
460/* function prototypes ********************************************************/
461
462#ifndef SK_KR_PROTO
463
464/*
465 * public functions in skgeinit.c
466 */
467extern void SkGePollTxD(
468 SK_AC *pAC,
469 SK_IOC IoC,
470 int Port,
471 SK_BOOL PollTxD);
472
473extern void SkGeYellowLED(
474 SK_AC *pAC,
475 SK_IOC IoC,
476 int State);
477
478extern int SkGeCfgSync(
479 SK_AC *pAC,
480 SK_IOC IoC,
481 int Port,
482 SK_U32 IntTime,
483 SK_U32 LimCount,
484 int SyncMode);
485
486extern void SkGeLoadLnkSyncCnt(
487 SK_AC *pAC,
488 SK_IOC IoC,
489 int Port,
490 SK_U32 CntVal);
491
492extern void SkGeStopPort(
493 SK_AC *pAC,
494 SK_IOC IoC,
495 int Port,
496 int Dir,
497 int RstMode);
498
499extern int SkGeInit(
500 SK_AC *pAC,
501 SK_IOC IoC,
502 int Level);
503
504extern void SkGeDeInit(
505 SK_AC *pAC,
506 SK_IOC IoC);
507
508extern int SkGeInitPort(
509 SK_AC *pAC,
510 SK_IOC IoC,
511 int Port);
512
513extern void SkGeXmitLED(
514 SK_AC *pAC,
515 SK_IOC IoC,
516 int Led,
517 int Mode);
518
519extern int SkGeInitAssignRamToQueues(
520 SK_AC *pAC,
521 int ActivePort,
522 SK_BOOL DualNet);
523
524/*
525 * public functions in skxmac2.c
526 */
527extern void SkMacRxTxDisable(
528 SK_AC *pAC,
529 SK_IOC IoC,
530 int Port);
531
532extern void SkMacSoftRst(
533 SK_AC *pAC,
534 SK_IOC IoC,
535 int Port);
536
537extern void SkMacHardRst(
538 SK_AC *pAC,
539 SK_IOC IoC,
540 int Port);
541
542extern void SkXmInitMac(
543 SK_AC *pAC,
544 SK_IOC IoC,
545 int Port);
546
547extern void SkGmInitMac(
548 SK_AC *pAC,
549 SK_IOC IoC,
550 int Port);
551
552extern void SkMacInitPhy(
553 SK_AC *pAC,
554 SK_IOC IoC,
555 int Port,
556 SK_BOOL DoLoop);
557
558extern void SkMacIrqDisable(
559 SK_AC *pAC,
560 SK_IOC IoC,
561 int Port);
562
563extern void SkMacFlushTxFifo(
564 SK_AC *pAC,
565 SK_IOC IoC,
566 int Port);
567
568extern void SkMacIrq(
569 SK_AC *pAC,
570 SK_IOC IoC,
571 int Port);
572
573extern int SkMacAutoNegDone(
574 SK_AC *pAC,
575 SK_IOC IoC,
576 int Port);
577
578extern void SkMacAutoNegLipaPhy(
579 SK_AC *pAC,
580 SK_IOC IoC,
581 int Port,
582 SK_U16 IStatus);
583
584extern int SkMacRxTxEnable(
585 SK_AC *pAC,
586 SK_IOC IoC,
587 int Port);
588
589extern void SkMacPromiscMode(
590 SK_AC *pAC,
591 SK_IOC IoC,
592 int Port,
593 SK_BOOL Enable);
594
595extern void SkMacHashing(
596 SK_AC *pAC,
597 SK_IOC IoC,
598 int Port,
599 SK_BOOL Enable);
600
601extern void SkXmPhyRead(
602 SK_AC *pAC,
603 SK_IOC IoC,
604 int Port,
605 int Addr,
606 SK_U16 SK_FAR *pVal);
607
608extern void SkXmPhyWrite(
609 SK_AC *pAC,
610 SK_IOC IoC,
611 int Port,
612 int Addr,
613 SK_U16 Val);
614
615extern void SkGmPhyRead(
616 SK_AC *pAC,
617 SK_IOC IoC,
618 int Port,
619 int Addr,
620 SK_U16 SK_FAR *pVal);
621
622extern void SkGmPhyWrite(
623 SK_AC *pAC,
624 SK_IOC IoC,
625 int Port,
626 int Addr,
627 SK_U16 Val);
628
629extern void SkXmClrExactAddr(
630 SK_AC *pAC,
631 SK_IOC IoC,
632 int Port,
633 int StartNum,
634 int StopNum);
635
636extern void SkXmAutoNegLipaXmac(
637 SK_AC *pAC,
638 SK_IOC IoC,
639 int Port,
640 SK_U16 IStatus);
641
642extern int SkXmUpdateStats(
643 SK_AC *pAC,
644 SK_IOC IoC,
645 unsigned int Port);
646
647extern int SkGmUpdateStats(
648 SK_AC *pAC,
649 SK_IOC IoC,
650 unsigned int Port);
651
652extern int SkXmMacStatistic(
653 SK_AC *pAC,
654 SK_IOC IoC,
655 unsigned int Port,
656 SK_U16 StatAddr,
657 SK_U32 SK_FAR *pVal);
658
659extern int SkGmMacStatistic(
660 SK_AC *pAC,
661 SK_IOC IoC,
662 unsigned int Port,
663 SK_U16 StatAddr,
664 SK_U32 SK_FAR *pVal);
665
666extern int SkXmResetCounter(
667 SK_AC *pAC,
668 SK_IOC IoC,
669 unsigned int Port);
670
671extern int SkGmResetCounter(
672 SK_AC *pAC,
673 SK_IOC IoC,
674 unsigned int Port);
675
676extern int SkXmOverflowStatus(
677 SK_AC *pAC,
678 SK_IOC IoC,
679 unsigned int Port,
680 SK_U16 IStatus,
681 SK_U64 SK_FAR *pStatus);
682
683extern int SkGmOverflowStatus(
684 SK_AC *pAC,
685 SK_IOC IoC,
686 unsigned int Port,
687 SK_U16 MacStatus,
688 SK_U64 SK_FAR *pStatus);
689
690extern int SkGmCableDiagStatus(
691 SK_AC *pAC,
692 SK_IOC IoC,
693 int Port,
694 SK_BOOL StartTest);
695
696#ifdef SK_DIAG
697extern void SkGePhyRead(
698 SK_AC *pAC,
699 SK_IOC IoC,
700 int Port,
701 int Addr,
702 SK_U16 *pVal);
703
704extern void SkGePhyWrite(
705 SK_AC *pAC,
706 SK_IOC IoC,
707 int Port,
708 int Addr,
709 SK_U16 Val);
710
711extern void SkMacSetRxCmd(
712 SK_AC *pAC,
713 SK_IOC IoC,
714 int Port,
715 int Mode);
716extern void SkMacCrcGener(
717 SK_AC *pAC,
718 SK_IOC IoC,
719 int Port,
720 SK_BOOL Enable);
721extern void SkMacTimeStamp(
722 SK_AC *pAC,
723 SK_IOC IoC,
724 int Port,
725 SK_BOOL Enable);
726extern void SkXmSendCont(
727 SK_AC *pAC,
728 SK_IOC IoC,
729 int Port,
730 SK_BOOL Enable);
731#endif /* SK_DIAG */
732
733#else /* SK_KR_PROTO */
734
735/*
736 * public functions in skgeinit.c
737 */
738extern void SkGePollTxD();
739extern void SkGeYellowLED();
740extern int SkGeCfgSync();
741extern void SkGeLoadLnkSyncCnt();
742extern void SkGeStopPort();
743extern int SkGeInit();
744extern void SkGeDeInit();
745extern int SkGeInitPort();
746extern void SkGeXmitLED();
747extern int SkGeInitAssignRamToQueues();
748
749/*
750 * public functions in skxmac2.c
751 */
752extern void SkMacRxTxDisable();
753extern void SkMacSoftRst();
754extern void SkMacHardRst();
755extern void SkMacInitPhy();
756extern int SkMacRxTxEnable();
757extern void SkMacPromiscMode();
758extern void SkMacHashing();
759extern void SkMacIrqDisable();
760extern void SkMacFlushTxFifo();
761extern void SkMacIrq();
762extern int SkMacAutoNegDone();
763extern void SkMacAutoNegLipaPhy();
764extern void SkXmInitMac();
765extern void SkXmPhyRead();
766extern void SkXmPhyWrite();
767extern void SkGmInitMac();
768extern void SkGmPhyRead();
769extern void SkGmPhyWrite();
770extern void SkXmClrExactAddr();
771extern void SkXmAutoNegLipaXmac();
772extern int SkXmUpdateStats();
773extern int SkGmUpdateStats();
774extern int SkXmMacStatistic();
775extern int SkGmMacStatistic();
776extern int SkXmResetCounter();
777extern int SkGmResetCounter();
778extern int SkXmOverflowStatus();
779extern int SkGmOverflowStatus();
780extern int SkGmCableDiagStatus();
781
782#ifdef SK_DIAG
783extern void SkGePhyRead();
784extern void SkGePhyWrite();
785extern void SkMacSetRxCmd();
786extern void SkMacCrcGener();
787extern void SkMacTimeStamp();
788extern void SkXmSendCont();
789#endif /* SK_DIAG */
790
791#endif /* SK_KR_PROTO */
792
793#ifdef __cplusplus
794}
795#endif /* __cplusplus */
796
797#endif /* __INC_SKGEINIT_H_ */
diff --git a/drivers/net/sk98lin/h/skgepnm2.h b/drivers/net/sk98lin/h/skgepnm2.h
new file mode 100644
index 0000000000..ddd304f1a4
--- /dev/null
+++ b/drivers/net/sk98lin/h/skgepnm2.h
@@ -0,0 +1,334 @@
1/*****************************************************************************
2 *
3 * Name: skgepnm2.h
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.36 $
6 * Date: $Date: 2003/05/23 12:45:13 $
7 * Purpose: Defines for Private Network Management Interface
8 *
9 ****************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25#ifndef _SKGEPNM2_H_
26#define _SKGEPNM2_H_
27
28/*
29 * General definitions
30 */
31#define SK_PNMI_CHIPSET_XMAC 1 /* XMAC11800FP */
32#define SK_PNMI_CHIPSET_YUKON 2 /* YUKON */
33
34#define SK_PNMI_BUS_PCI 1 /* PCI bus*/
35
36/*
37 * Actions
38 */
39#define SK_PNMI_ACT_IDLE 1
40#define SK_PNMI_ACT_RESET 2
41#define SK_PNMI_ACT_SELFTEST 3
42#define SK_PNMI_ACT_RESETCNT 4
43
44/*
45 * VPD releated defines
46 */
47
48#define SK_PNMI_VPD_RW 1
49#define SK_PNMI_VPD_RO 2
50
51#define SK_PNMI_VPD_OK 0
52#define SK_PNMI_VPD_NOTFOUND 1
53#define SK_PNMI_VPD_CUT 2
54#define SK_PNMI_VPD_TIMEOUT 3
55#define SK_PNMI_VPD_FULL 4
56#define SK_PNMI_VPD_NOWRITE 5
57#define SK_PNMI_VPD_FATAL 6
58
59#define SK_PNMI_VPD_IGNORE 0
60#define SK_PNMI_VPD_CREATE 1
61#define SK_PNMI_VPD_DELETE 2
62
63
64/*
65 * RLMT related defines
66 */
67#define SK_PNMI_DEF_RLMT_CHG_THRES 240 /* 4 changes per minute */
68
69
70/*
71 * VCT internal status values
72 */
73#define SK_PNMI_VCT_PENDING 32
74#define SK_PNMI_VCT_TEST_DONE 64
75#define SK_PNMI_VCT_LINK 128
76
77/*
78 * Internal table definitions
79 */
80#define SK_PNMI_GET 0
81#define SK_PNMI_PRESET 1
82#define SK_PNMI_SET 2
83
84#define SK_PNMI_RO 0
85#define SK_PNMI_RW 1
86#define SK_PNMI_WO 2
87
88typedef struct s_OidTabEntry {
89 SK_U32 Id;
90 SK_U32 InstanceNo;
91 unsigned int StructSize;
92 unsigned int Offset;
93 int Access;
94 int (* Func)(SK_AC *pAc, SK_IOC pIo, int action,
95 SK_U32 Id, char* pBuf, unsigned int* pLen,
96 SK_U32 Instance, unsigned int TableIndex,
97 SK_U32 NetNumber);
98 SK_U16 Param;
99} SK_PNMI_TAB_ENTRY;
100
101
102/*
103 * Trap lengths
104 */
105#define SK_PNMI_TRAP_SIMPLE_LEN 17
106#define SK_PNMI_TRAP_SENSOR_LEN_BASE 46
107#define SK_PNMI_TRAP_RLMT_CHANGE_LEN 23
108#define SK_PNMI_TRAP_RLMT_PORT_LEN 23
109
110/*
111 * Number of MAC types supported
112 */
113#define SK_PNMI_MAC_TYPES (SK_MAC_GMAC + 1)
114
115/*
116 * MAC statistic data list (overall set for MAC types used)
117 */
118enum SK_MACSTATS {
119 SK_PNMI_HTX = 0,
120 SK_PNMI_HTX_OCTET,
121 SK_PNMI_HTX_OCTETHIGH = SK_PNMI_HTX_OCTET,
122 SK_PNMI_HTX_OCTETLOW,
123 SK_PNMI_HTX_BROADCAST,
124 SK_PNMI_HTX_MULTICAST,
125 SK_PNMI_HTX_UNICAST,
126 SK_PNMI_HTX_BURST,
127 SK_PNMI_HTX_PMACC,
128 SK_PNMI_HTX_MACC,
129 SK_PNMI_HTX_COL,
130 SK_PNMI_HTX_SINGLE_COL,
131 SK_PNMI_HTX_MULTI_COL,
132 SK_PNMI_HTX_EXCESS_COL,
133 SK_PNMI_HTX_LATE_COL,
134 SK_PNMI_HTX_DEFFERAL,
135 SK_PNMI_HTX_EXCESS_DEF,
136 SK_PNMI_HTX_UNDERRUN,
137 SK_PNMI_HTX_CARRIER,
138 SK_PNMI_HTX_UTILUNDER,
139 SK_PNMI_HTX_UTILOVER,
140 SK_PNMI_HTX_64,
141 SK_PNMI_HTX_127,
142 SK_PNMI_HTX_255,
143 SK_PNMI_HTX_511,
144 SK_PNMI_HTX_1023,
145 SK_PNMI_HTX_MAX,
146 SK_PNMI_HTX_LONGFRAMES,
147 SK_PNMI_HTX_SYNC,
148 SK_PNMI_HTX_SYNC_OCTET,
149 SK_PNMI_HTX_RESERVED,
150
151 SK_PNMI_HRX,
152 SK_PNMI_HRX_OCTET,
153 SK_PNMI_HRX_OCTETHIGH = SK_PNMI_HRX_OCTET,
154 SK_PNMI_HRX_OCTETLOW,
155 SK_PNMI_HRX_BADOCTET,
156 SK_PNMI_HRX_BADOCTETHIGH = SK_PNMI_HRX_BADOCTET,
157 SK_PNMI_HRX_BADOCTETLOW,
158 SK_PNMI_HRX_BROADCAST,
159 SK_PNMI_HRX_MULTICAST,
160 SK_PNMI_HRX_UNICAST,
161 SK_PNMI_HRX_PMACC,
162 SK_PNMI_HRX_MACC,
163 SK_PNMI_HRX_PMACC_ERR,
164 SK_PNMI_HRX_MACC_UNKWN,
165 SK_PNMI_HRX_BURST,
166 SK_PNMI_HRX_MISSED,
167 SK_PNMI_HRX_FRAMING,
168 SK_PNMI_HRX_UNDERSIZE,
169 SK_PNMI_HRX_OVERFLOW,
170 SK_PNMI_HRX_JABBER,
171 SK_PNMI_HRX_CARRIER,
172 SK_PNMI_HRX_IRLENGTH,
173 SK_PNMI_HRX_SYMBOL,
174 SK_PNMI_HRX_SHORTS,
175 SK_PNMI_HRX_RUNT,
176 SK_PNMI_HRX_TOO_LONG,
177 SK_PNMI_HRX_FCS,
178 SK_PNMI_HRX_CEXT,
179 SK_PNMI_HRX_UTILUNDER,
180 SK_PNMI_HRX_UTILOVER,
181 SK_PNMI_HRX_64,
182 SK_PNMI_HRX_127,
183 SK_PNMI_HRX_255,
184 SK_PNMI_HRX_511,
185 SK_PNMI_HRX_1023,
186 SK_PNMI_HRX_MAX,
187 SK_PNMI_HRX_LONGFRAMES,
188
189 SK_PNMI_HRX_RESERVED,
190
191 SK_PNMI_MAX_IDX /* NOTE: Ensure SK_PNMI_CNT_NO is set to this value */
192};
193
194/*
195 * MAC specific data
196 */
197typedef struct s_PnmiStatAddr {
198 SK_U16 Reg; /* MAC register containing the value */
199 SK_BOOL GetOffset; /* TRUE: Offset managed by PNMI (call GetStatVal())*/
200} SK_PNMI_STATADDR;
201
202
203/*
204 * SK_PNMI_STRUCT_DATA copy offset evaluation macros
205 */
206#define SK_PNMI_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_STRUCT_DATA *)0)->e))
207#define SK_PNMI_MAI_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_STRUCT_DATA *)0)->e))
208#define SK_PNMI_VPD_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_VPD *)0)->e))
209#define SK_PNMI_SEN_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_SENSOR *)0)->e))
210#define SK_PNMI_CHK_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_CHECKSUM *)0)->e))
211#define SK_PNMI_STA_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_STAT *)0)->e))
212#define SK_PNMI_CNF_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_CONF *)0)->e))
213#define SK_PNMI_RLM_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_RLMT *)0)->e))
214#define SK_PNMI_MON_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_RLMT_MONITOR *)0)->e))
215#define SK_PNMI_TRP_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_TRAP *)0)->e))
216
217#define SK_PNMI_SET_STAT(b,s,o) {SK_U32 Val32; char *pVal; \
218 Val32 = (s); \
219 pVal = (char *)(b) + ((SK_U32)(SK_UPTR) \
220 &(((SK_PNMI_STRUCT_DATA *)0)-> \
221 ReturnStatus.ErrorStatus)); \
222 SK_PNMI_STORE_U32(pVal, Val32); \
223 Val32 = (o); \
224 pVal = (char *)(b) + ((SK_U32)(SK_UPTR) \
225 &(((SK_PNMI_STRUCT_DATA *)0)-> \
226 ReturnStatus.ErrorOffset)); \
227 SK_PNMI_STORE_U32(pVal, Val32);}
228
229/*
230 * Time macros
231 */
232#ifndef SK_PNMI_HUNDREDS_SEC
233#if SK_TICKS_PER_SEC == 100
234#define SK_PNMI_HUNDREDS_SEC(t) (t)
235#else
236#define SK_PNMI_HUNDREDS_SEC(t) (((t) * 100) / (SK_TICKS_PER_SEC))
237#endif /* !SK_TICKS_PER_SEC */
238#endif /* !SK_PNMI_HUNDREDS_SEC */
239
240/*
241 * Macros to work around alignment problems
242 */
243#ifndef SK_PNMI_STORE_U16
244#define SK_PNMI_STORE_U16(p,v) {*(char *)(p) = *((char *)&(v)); \
245 *((char *)(p) + 1) = \
246 *(((char *)&(v)) + 1);}
247#endif
248
249#ifndef SK_PNMI_STORE_U32
250#define SK_PNMI_STORE_U32(p,v) {*(char *)(p) = *((char *)&(v)); \
251 *((char *)(p) + 1) = \
252 *(((char *)&(v)) + 1); \
253 *((char *)(p) + 2) = \
254 *(((char *)&(v)) + 2); \
255 *((char *)(p) + 3) = \
256 *(((char *)&(v)) + 3);}
257#endif
258
259#ifndef SK_PNMI_STORE_U64
260#define SK_PNMI_STORE_U64(p,v) {*(char *)(p) = *((char *)&(v)); \
261 *((char *)(p) + 1) = \
262 *(((char *)&(v)) + 1); \
263 *((char *)(p) + 2) = \
264 *(((char *)&(v)) + 2); \
265 *((char *)(p) + 3) = \
266 *(((char *)&(v)) + 3); \
267 *((char *)(p) + 4) = \
268 *(((char *)&(v)) + 4); \
269 *((char *)(p) + 5) = \
270 *(((char *)&(v)) + 5); \
271 *((char *)(p) + 6) = \
272 *(((char *)&(v)) + 6); \
273 *((char *)(p) + 7) = \
274 *(((char *)&(v)) + 7);}
275#endif
276
277#ifndef SK_PNMI_READ_U16
278#define SK_PNMI_READ_U16(p,v) {*((char *)&(v)) = *(char *)(p); \
279 *(((char *)&(v)) + 1) = \
280 *((char *)(p) + 1);}
281#endif
282
283#ifndef SK_PNMI_READ_U32
284#define SK_PNMI_READ_U32(p,v) {*((char *)&(v)) = *(char *)(p); \
285 *(((char *)&(v)) + 1) = \
286 *((char *)(p) + 1); \
287 *(((char *)&(v)) + 2) = \
288 *((char *)(p) + 2); \
289 *(((char *)&(v)) + 3) = \
290 *((char *)(p) + 3);}
291#endif
292
293#ifndef SK_PNMI_READ_U64
294#define SK_PNMI_READ_U64(p,v) {*((char *)&(v)) = *(char *)(p); \
295 *(((char *)&(v)) + 1) = \
296 *((char *)(p) + 1); \
297 *(((char *)&(v)) + 2) = \
298 *((char *)(p) + 2); \
299 *(((char *)&(v)) + 3) = \
300 *((char *)(p) + 3); \
301 *(((char *)&(v)) + 4) = \
302 *((char *)(p) + 4); \
303 *(((char *)&(v)) + 5) = \
304 *((char *)(p) + 5); \
305 *(((char *)&(v)) + 6) = \
306 *((char *)(p) + 6); \
307 *(((char *)&(v)) + 7) = \
308 *((char *)(p) + 7);}
309#endif
310
311/*
312 * Macros for Debug
313 */
314#ifdef DEBUG
315
316#define SK_PNMI_CHECKFLAGS(vSt) {if (pAC->Pnmi.MacUpdatedFlag > 0 || \
317 pAC->Pnmi.RlmtUpdatedFlag > 0 || \
318 pAC->Pnmi.SirqUpdatedFlag > 0) { \
319 SK_DBG_MSG(pAC, \
320 SK_DBGMOD_PNMI, \
321 SK_DBGCAT_CTRL, \
322 ("PNMI: ERR: %s MacUFlag=%d, RlmtUFlag=%d, SirqUFlag=%d\n", \
323 vSt, \
324 pAC->Pnmi.MacUpdatedFlag, \
325 pAC->Pnmi.RlmtUpdatedFlag, \
326 pAC->Pnmi.SirqUpdatedFlag))}}
327
328#else /* !DEBUG */
329
330#define SK_PNMI_CHECKFLAGS(vSt) /* Nothing */
331
332#endif /* !DEBUG */
333
334#endif /* _SKGEPNM2_H_ */
diff --git a/drivers/net/sk98lin/h/skgepnmi.h b/drivers/net/sk98lin/h/skgepnmi.h
new file mode 100644
index 0000000000..1ed214ccb2
--- /dev/null
+++ b/drivers/net/sk98lin/h/skgepnmi.h
@@ -0,0 +1,962 @@
1/*****************************************************************************
2 *
3 * Name: skgepnmi.h
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.62 $
6 * Date: $Date: 2003/08/15 12:31:52 $
7 * Purpose: Defines for Private Network Management Interface
8 *
9 ****************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25#ifndef _SKGEPNMI_H_
26#define _SKGEPNMI_H_
27
28/*
29 * Include dependencies
30 */
31#include "h/sktypes.h"
32#include "h/skerror.h"
33#include "h/sktimer.h"
34#include "h/ski2c.h"
35#include "h/skaddr.h"
36#include "h/skrlmt.h"
37#include "h/skvpd.h"
38
39/*
40 * Management Database Version
41 */
42#define SK_PNMI_MDB_VERSION 0x00030001 /* 3.1 */
43
44
45/*
46 * Event definitions
47 */
48#define SK_PNMI_EVT_SIRQ_OVERFLOW 1 /* Counter overflow */
49#define SK_PNMI_EVT_SEN_WAR_LOW 2 /* Lower war thres exceeded */
50#define SK_PNMI_EVT_SEN_WAR_UPP 3 /* Upper war thres exceeded */
51#define SK_PNMI_EVT_SEN_ERR_LOW 4 /* Lower err thres exceeded */
52#define SK_PNMI_EVT_SEN_ERR_UPP 5 /* Upper err thres exceeded */
53#define SK_PNMI_EVT_CHG_EST_TIMER 6 /* Timer event for RLMT Chg */
54#define SK_PNMI_EVT_UTILIZATION_TIMER 7 /* Timer event for Utiliza. */
55#define SK_PNMI_EVT_CLEAR_COUNTER 8 /* Clear statistic counters */
56#define SK_PNMI_EVT_XMAC_RESET 9 /* XMAC will be reset */
57
58#define SK_PNMI_EVT_RLMT_PORT_UP 10 /* Port came logically up */
59#define SK_PNMI_EVT_RLMT_PORT_DOWN 11 /* Port went logically down */
60#define SK_PNMI_EVT_RLMT_SEGMENTATION 13 /* Two SP root bridges found */
61#define SK_PNMI_EVT_RLMT_ACTIVE_DOWN 14 /* Port went logically down */
62#define SK_PNMI_EVT_RLMT_ACTIVE_UP 15 /* Port came logically up */
63#define SK_PNMI_EVT_RLMT_SET_NETS 16 /* 1. Parameter is number of nets
64 1 = single net; 2 = dual net */
65#define SK_PNMI_EVT_VCT_RESET 17 /* VCT port reset timer event started with SET. */
66
67
68/*
69 * Return values
70 */
71#define SK_PNMI_ERR_OK 0
72#define SK_PNMI_ERR_GENERAL 1
73#define SK_PNMI_ERR_TOO_SHORT 2
74#define SK_PNMI_ERR_BAD_VALUE 3
75#define SK_PNMI_ERR_READ_ONLY 4
76#define SK_PNMI_ERR_UNKNOWN_OID 5
77#define SK_PNMI_ERR_UNKNOWN_INST 6
78#define SK_PNMI_ERR_UNKNOWN_NET 7
79#define SK_PNMI_ERR_NOT_SUPPORTED 10
80
81
82/*
83 * Return values of driver reset function SK_DRIVER_RESET() and
84 * driver event function SK_DRIVER_EVENT()
85 */
86#define SK_PNMI_ERR_OK 0
87#define SK_PNMI_ERR_FAIL 1
88
89
90/*
91 * Return values of driver test function SK_DRIVER_SELFTEST()
92 */
93#define SK_PNMI_TST_UNKNOWN (1 << 0)
94#define SK_PNMI_TST_TRANCEIVER (1 << 1)
95#define SK_PNMI_TST_ASIC (1 << 2)
96#define SK_PNMI_TST_SENSOR (1 << 3)
97#define SK_PNMI_TST_POWERMGMT (1 << 4)
98#define SK_PNMI_TST_PCI (1 << 5)
99#define SK_PNMI_TST_MAC (1 << 6)
100
101
102/*
103 * RLMT specific definitions
104 */
105#define SK_PNMI_RLMT_STATUS_STANDBY 1
106#define SK_PNMI_RLMT_STATUS_ACTIVE 2
107#define SK_PNMI_RLMT_STATUS_ERROR 3
108
109#define SK_PNMI_RLMT_LSTAT_PHY_DOWN 1
110#define SK_PNMI_RLMT_LSTAT_AUTONEG 2
111#define SK_PNMI_RLMT_LSTAT_LOG_DOWN 3
112#define SK_PNMI_RLMT_LSTAT_LOG_UP 4
113#define SK_PNMI_RLMT_LSTAT_INDETERMINATED 5
114
115#define SK_PNMI_RLMT_MODE_CHK_LINK (SK_RLMT_CHECK_LINK)
116#define SK_PNMI_RLMT_MODE_CHK_RX (SK_RLMT_CHECK_LOC_LINK)
117#define SK_PNMI_RLMT_MODE_CHK_SPT (SK_RLMT_CHECK_SEG)
118/* #define SK_PNMI_RLMT_MODE_CHK_EX */
119
120/*
121 * OID definition
122 */
123#ifndef _NDIS_ /* Check, whether NDIS already included OIDs */
124
125#define OID_GEN_XMIT_OK 0x00020101
126#define OID_GEN_RCV_OK 0x00020102
127#define OID_GEN_XMIT_ERROR 0x00020103
128#define OID_GEN_RCV_ERROR 0x00020104
129#define OID_GEN_RCV_NO_BUFFER 0x00020105
130
131/* #define OID_GEN_DIRECTED_BYTES_XMIT 0x00020201 */
132#define OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202
133/* #define OID_GEN_MULTICAST_BYTES_XMIT 0x00020203 */
134#define OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204
135/* #define OID_GEN_BROADCAST_BYTES_XMIT 0x00020205 */
136#define OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206
137/* #define OID_GEN_DIRECTED_BYTES_RCV 0x00020207 */
138#define OID_GEN_DIRECTED_FRAMES_RCV 0x00020208
139/* #define OID_GEN_MULTICAST_BYTES_RCV 0x00020209 */
140#define OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A
141/* #define OID_GEN_BROADCAST_BYTES_RCV 0x0002020B */
142#define OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C
143#define OID_GEN_RCV_CRC_ERROR 0x0002020D
144#define OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E
145
146#define OID_802_3_PERMANENT_ADDRESS 0x01010101
147#define OID_802_3_CURRENT_ADDRESS 0x01010102
148/* #define OID_802_3_MULTICAST_LIST 0x01010103 */
149/* #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 */
150/* #define OID_802_3_MAC_OPTIONS 0x01010105 */
151
152#define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101
153#define OID_802_3_XMIT_ONE_COLLISION 0x01020102
154#define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103
155#define OID_802_3_XMIT_DEFERRED 0x01020201
156#define OID_802_3_XMIT_MAX_COLLISIONS 0x01020202
157#define OID_802_3_RCV_OVERRUN 0x01020203
158#define OID_802_3_XMIT_UNDERRUN 0x01020204
159#define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206
160#define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207
161
162/*
163 * PnP and PM OIDs
164 */
165#ifdef SK_POWER_MGMT
166#define OID_PNP_CAPABILITIES 0xFD010100
167#define OID_PNP_SET_POWER 0xFD010101
168#define OID_PNP_QUERY_POWER 0xFD010102
169#define OID_PNP_ADD_WAKE_UP_PATTERN 0xFD010103
170#define OID_PNP_REMOVE_WAKE_UP_PATTERN 0xFD010104
171#define OID_PNP_ENABLE_WAKE_UP 0xFD010106
172#endif /* SK_POWER_MGMT */
173
174#endif /* _NDIS_ */
175
176#define OID_SKGE_MDB_VERSION 0xFF010100
177#define OID_SKGE_SUPPORTED_LIST 0xFF010101
178#define OID_SKGE_VPD_FREE_BYTES 0xFF010102
179#define OID_SKGE_VPD_ENTRIES_LIST 0xFF010103
180#define OID_SKGE_VPD_ENTRIES_NUMBER 0xFF010104
181#define OID_SKGE_VPD_KEY 0xFF010105
182#define OID_SKGE_VPD_VALUE 0xFF010106
183#define OID_SKGE_VPD_ACCESS 0xFF010107
184#define OID_SKGE_VPD_ACTION 0xFF010108
185
186#define OID_SKGE_PORT_NUMBER 0xFF010110
187#define OID_SKGE_DEVICE_TYPE 0xFF010111
188#define OID_SKGE_DRIVER_DESCR 0xFF010112
189#define OID_SKGE_DRIVER_VERSION 0xFF010113
190#define OID_SKGE_HW_DESCR 0xFF010114
191#define OID_SKGE_HW_VERSION 0xFF010115
192#define OID_SKGE_CHIPSET 0xFF010116
193#define OID_SKGE_ACTION 0xFF010117
194#define OID_SKGE_RESULT 0xFF010118
195#define OID_SKGE_BUS_TYPE 0xFF010119
196#define OID_SKGE_BUS_SPEED 0xFF01011A
197#define OID_SKGE_BUS_WIDTH 0xFF01011B
198/* 0xFF01011C unused */
199#define OID_SKGE_DIAG_ACTION 0xFF01011D
200#define OID_SKGE_DIAG_RESULT 0xFF01011E
201#define OID_SKGE_MTU 0xFF01011F
202#define OID_SKGE_PHYS_CUR_ADDR 0xFF010120
203#define OID_SKGE_PHYS_FAC_ADDR 0xFF010121
204#define OID_SKGE_PMD 0xFF010122
205#define OID_SKGE_CONNECTOR 0xFF010123
206#define OID_SKGE_LINK_CAP 0xFF010124
207#define OID_SKGE_LINK_MODE 0xFF010125
208#define OID_SKGE_LINK_MODE_STATUS 0xFF010126
209#define OID_SKGE_LINK_STATUS 0xFF010127
210#define OID_SKGE_FLOWCTRL_CAP 0xFF010128
211#define OID_SKGE_FLOWCTRL_MODE 0xFF010129
212#define OID_SKGE_FLOWCTRL_STATUS 0xFF01012A
213#define OID_SKGE_PHY_OPERATION_CAP 0xFF01012B
214#define OID_SKGE_PHY_OPERATION_MODE 0xFF01012C
215#define OID_SKGE_PHY_OPERATION_STATUS 0xFF01012D
216#define OID_SKGE_MULTICAST_LIST 0xFF01012E
217#define OID_SKGE_CURRENT_PACKET_FILTER 0xFF01012F
218
219#define OID_SKGE_TRAP 0xFF010130
220#define OID_SKGE_TRAP_NUMBER 0xFF010131
221
222#define OID_SKGE_RLMT_MODE 0xFF010140
223#define OID_SKGE_RLMT_PORT_NUMBER 0xFF010141
224#define OID_SKGE_RLMT_PORT_ACTIVE 0xFF010142
225#define OID_SKGE_RLMT_PORT_PREFERRED 0xFF010143
226#define OID_SKGE_INTERMEDIATE_SUPPORT 0xFF010160
227
228#define OID_SKGE_SPEED_CAP 0xFF010170
229#define OID_SKGE_SPEED_MODE 0xFF010171
230#define OID_SKGE_SPEED_STATUS 0xFF010172
231
232#define OID_SKGE_BOARDLEVEL 0xFF010180
233
234#define OID_SKGE_SENSOR_NUMBER 0xFF020100
235#define OID_SKGE_SENSOR_INDEX 0xFF020101
236#define OID_SKGE_SENSOR_DESCR 0xFF020102
237#define OID_SKGE_SENSOR_TYPE 0xFF020103
238#define OID_SKGE_SENSOR_VALUE 0xFF020104
239#define OID_SKGE_SENSOR_WAR_THRES_LOW 0xFF020105
240#define OID_SKGE_SENSOR_WAR_THRES_UPP 0xFF020106
241#define OID_SKGE_SENSOR_ERR_THRES_LOW 0xFF020107
242#define OID_SKGE_SENSOR_ERR_THRES_UPP 0xFF020108
243#define OID_SKGE_SENSOR_STATUS 0xFF020109
244#define OID_SKGE_SENSOR_WAR_CTS 0xFF02010A
245#define OID_SKGE_SENSOR_ERR_CTS 0xFF02010B
246#define OID_SKGE_SENSOR_WAR_TIME 0xFF02010C
247#define OID_SKGE_SENSOR_ERR_TIME 0xFF02010D
248
249#define OID_SKGE_CHKSM_NUMBER 0xFF020110
250#define OID_SKGE_CHKSM_RX_OK_CTS 0xFF020111
251#define OID_SKGE_CHKSM_RX_UNABLE_CTS 0xFF020112
252#define OID_SKGE_CHKSM_RX_ERR_CTS 0xFF020113
253#define OID_SKGE_CHKSM_TX_OK_CTS 0xFF020114
254#define OID_SKGE_CHKSM_TX_UNABLE_CTS 0xFF020115
255
256#define OID_SKGE_STAT_TX 0xFF020120
257#define OID_SKGE_STAT_TX_OCTETS 0xFF020121
258#define OID_SKGE_STAT_TX_BROADCAST 0xFF020122
259#define OID_SKGE_STAT_TX_MULTICAST 0xFF020123
260#define OID_SKGE_STAT_TX_UNICAST 0xFF020124
261#define OID_SKGE_STAT_TX_LONGFRAMES 0xFF020125
262#define OID_SKGE_STAT_TX_BURST 0xFF020126
263#define OID_SKGE_STAT_TX_PFLOWC 0xFF020127
264#define OID_SKGE_STAT_TX_FLOWC 0xFF020128
265#define OID_SKGE_STAT_TX_SINGLE_COL 0xFF020129
266#define OID_SKGE_STAT_TX_MULTI_COL 0xFF02012A
267#define OID_SKGE_STAT_TX_EXCESS_COL 0xFF02012B
268#define OID_SKGE_STAT_TX_LATE_COL 0xFF02012C
269#define OID_SKGE_STAT_TX_DEFFERAL 0xFF02012D
270#define OID_SKGE_STAT_TX_EXCESS_DEF 0xFF02012E
271#define OID_SKGE_STAT_TX_UNDERRUN 0xFF02012F
272#define OID_SKGE_STAT_TX_CARRIER 0xFF020130
273/* #define OID_SKGE_STAT_TX_UTIL 0xFF020131 */
274#define OID_SKGE_STAT_TX_64 0xFF020132
275#define OID_SKGE_STAT_TX_127 0xFF020133
276#define OID_SKGE_STAT_TX_255 0xFF020134
277#define OID_SKGE_STAT_TX_511 0xFF020135
278#define OID_SKGE_STAT_TX_1023 0xFF020136
279#define OID_SKGE_STAT_TX_MAX 0xFF020137
280#define OID_SKGE_STAT_TX_SYNC 0xFF020138
281#define OID_SKGE_STAT_TX_SYNC_OCTETS 0xFF020139
282#define OID_SKGE_STAT_RX 0xFF02013A
283#define OID_SKGE_STAT_RX_OCTETS 0xFF02013B
284#define OID_SKGE_STAT_RX_BROADCAST 0xFF02013C
285#define OID_SKGE_STAT_RX_MULTICAST 0xFF02013D
286#define OID_SKGE_STAT_RX_UNICAST 0xFF02013E
287#define OID_SKGE_STAT_RX_PFLOWC 0xFF02013F
288#define OID_SKGE_STAT_RX_FLOWC 0xFF020140
289#define OID_SKGE_STAT_RX_PFLOWC_ERR 0xFF020141
290#define OID_SKGE_STAT_RX_FLOWC_UNKWN 0xFF020142
291#define OID_SKGE_STAT_RX_BURST 0xFF020143
292#define OID_SKGE_STAT_RX_MISSED 0xFF020144
293#define OID_SKGE_STAT_RX_FRAMING 0xFF020145
294#define OID_SKGE_STAT_RX_OVERFLOW 0xFF020146
295#define OID_SKGE_STAT_RX_JABBER 0xFF020147
296#define OID_SKGE_STAT_RX_CARRIER 0xFF020148
297#define OID_SKGE_STAT_RX_IR_LENGTH 0xFF020149
298#define OID_SKGE_STAT_RX_SYMBOL 0xFF02014A
299#define OID_SKGE_STAT_RX_SHORTS 0xFF02014B
300#define OID_SKGE_STAT_RX_RUNT 0xFF02014C
301#define OID_SKGE_STAT_RX_CEXT 0xFF02014D
302#define OID_SKGE_STAT_RX_TOO_LONG 0xFF02014E
303#define OID_SKGE_STAT_RX_FCS 0xFF02014F
304/* #define OID_SKGE_STAT_RX_UTIL 0xFF020150 */
305#define OID_SKGE_STAT_RX_64 0xFF020151
306#define OID_SKGE_STAT_RX_127 0xFF020152
307#define OID_SKGE_STAT_RX_255 0xFF020153
308#define OID_SKGE_STAT_RX_511 0xFF020154
309#define OID_SKGE_STAT_RX_1023 0xFF020155
310#define OID_SKGE_STAT_RX_MAX 0xFF020156
311#define OID_SKGE_STAT_RX_LONGFRAMES 0xFF020157
312
313#define OID_SKGE_RLMT_CHANGE_CTS 0xFF020160
314#define OID_SKGE_RLMT_CHANGE_TIME 0xFF020161
315#define OID_SKGE_RLMT_CHANGE_ESTIM 0xFF020162
316#define OID_SKGE_RLMT_CHANGE_THRES 0xFF020163
317
318#define OID_SKGE_RLMT_PORT_INDEX 0xFF020164
319#define OID_SKGE_RLMT_STATUS 0xFF020165
320#define OID_SKGE_RLMT_TX_HELLO_CTS 0xFF020166
321#define OID_SKGE_RLMT_RX_HELLO_CTS 0xFF020167
322#define OID_SKGE_RLMT_TX_SP_REQ_CTS 0xFF020168
323#define OID_SKGE_RLMT_RX_SP_CTS 0xFF020169
324
325#define OID_SKGE_RLMT_MONITOR_NUMBER 0xFF010150
326#define OID_SKGE_RLMT_MONITOR_INDEX 0xFF010151
327#define OID_SKGE_RLMT_MONITOR_ADDR 0xFF010152
328#define OID_SKGE_RLMT_MONITOR_ERRS 0xFF010153
329#define OID_SKGE_RLMT_MONITOR_TIMESTAMP 0xFF010154
330#define OID_SKGE_RLMT_MONITOR_ADMIN 0xFF010155
331
332#define OID_SKGE_TX_SW_QUEUE_LEN 0xFF020170
333#define OID_SKGE_TX_SW_QUEUE_MAX 0xFF020171
334#define OID_SKGE_TX_RETRY 0xFF020172
335#define OID_SKGE_RX_INTR_CTS 0xFF020173
336#define OID_SKGE_TX_INTR_CTS 0xFF020174
337#define OID_SKGE_RX_NO_BUF_CTS 0xFF020175
338#define OID_SKGE_TX_NO_BUF_CTS 0xFF020176
339#define OID_SKGE_TX_USED_DESCR_NO 0xFF020177
340#define OID_SKGE_RX_DELIVERED_CTS 0xFF020178
341#define OID_SKGE_RX_OCTETS_DELIV_CTS 0xFF020179
342#define OID_SKGE_RX_HW_ERROR_CTS 0xFF02017A
343#define OID_SKGE_TX_HW_ERROR_CTS 0xFF02017B
344#define OID_SKGE_IN_ERRORS_CTS 0xFF02017C
345#define OID_SKGE_OUT_ERROR_CTS 0xFF02017D
346#define OID_SKGE_ERR_RECOVERY_CTS 0xFF02017E
347#define OID_SKGE_SYSUPTIME 0xFF02017F
348
349#define OID_SKGE_ALL_DATA 0xFF020190
350
351/* Defines for VCT. */
352#define OID_SKGE_VCT_GET 0xFF020200
353#define OID_SKGE_VCT_SET 0xFF020201
354#define OID_SKGE_VCT_STATUS 0xFF020202
355
356#ifdef SK_DIAG_SUPPORT
357/* Defines for driver DIAG mode. */
358#define OID_SKGE_DIAG_MODE 0xFF020204
359#endif /* SK_DIAG_SUPPORT */
360
361/* New OIDs */
362#define OID_SKGE_DRIVER_RELDATE 0xFF020210
363#define OID_SKGE_DRIVER_FILENAME 0xFF020211
364#define OID_SKGE_CHIPID 0xFF020212
365#define OID_SKGE_RAMSIZE 0xFF020213
366#define OID_SKGE_VAUXAVAIL 0xFF020214
367#define OID_SKGE_PHY_TYPE 0xFF020215
368#define OID_SKGE_PHY_LP_MODE 0xFF020216
369
370/* VCT struct to store a backup copy of VCT data after a port reset. */
371typedef struct s_PnmiVct {
372 SK_U8 VctStatus;
373 SK_U8 PCableLen;
374 SK_U32 PMdiPairLen[4];
375 SK_U8 PMdiPairSts[4];
376} SK_PNMI_VCT;
377
378
379/* VCT status values (to be given to CPA via OID_SKGE_VCT_STATUS). */
380#define SK_PNMI_VCT_NONE 0
381#define SK_PNMI_VCT_OLD_VCT_DATA 1
382#define SK_PNMI_VCT_NEW_VCT_DATA 2
383#define SK_PNMI_VCT_OLD_DSP_DATA 4
384#define SK_PNMI_VCT_NEW_DSP_DATA 8
385#define SK_PNMI_VCT_RUNNING 16
386
387
388/* VCT cable test status. */
389#define SK_PNMI_VCT_NORMAL_CABLE 0
390#define SK_PNMI_VCT_SHORT_CABLE 1
391#define SK_PNMI_VCT_OPEN_CABLE 2
392#define SK_PNMI_VCT_TEST_FAIL 3
393#define SK_PNMI_VCT_IMPEDANCE_MISMATCH 4
394
395#define OID_SKGE_TRAP_SEN_WAR_LOW 500
396#define OID_SKGE_TRAP_SEN_WAR_UPP 501
397#define OID_SKGE_TRAP_SEN_ERR_LOW 502
398#define OID_SKGE_TRAP_SEN_ERR_UPP 503
399#define OID_SKGE_TRAP_RLMT_CHANGE_THRES 520
400#define OID_SKGE_TRAP_RLMT_CHANGE_PORT 521
401#define OID_SKGE_TRAP_RLMT_PORT_DOWN 522
402#define OID_SKGE_TRAP_RLMT_PORT_UP 523
403#define OID_SKGE_TRAP_RLMT_SEGMENTATION 524
404
405#ifdef SK_DIAG_SUPPORT
406/* Defines for driver DIAG mode. */
407#define SK_DIAG_ATTACHED 2
408#define SK_DIAG_RUNNING 1
409#define SK_DIAG_IDLE 0
410#endif /* SK_DIAG_SUPPORT */
411
412/*
413 * Generic PNMI IOCTL subcommand definitions.
414 */
415#define SK_GET_SINGLE_VAR 1
416#define SK_SET_SINGLE_VAR 2
417#define SK_PRESET_SINGLE_VAR 3
418#define SK_GET_FULL_MIB 4
419#define SK_SET_FULL_MIB 5
420#define SK_PRESET_FULL_MIB 6
421
422
423/*
424 * Define error numbers and messages for syslog
425 */
426#define SK_PNMI_ERR001 (SK_ERRBASE_PNMI + 1)
427#define SK_PNMI_ERR001MSG "SkPnmiGetStruct: Unknown OID"
428#define SK_PNMI_ERR002 (SK_ERRBASE_PNMI + 2)
429#define SK_PNMI_ERR002MSG "SkPnmiGetStruct: Cannot read VPD keys"
430#define SK_PNMI_ERR003 (SK_ERRBASE_PNMI + 3)
431#define SK_PNMI_ERR003MSG "OidStruct: Called with wrong OID"
432#define SK_PNMI_ERR004 (SK_ERRBASE_PNMI + 4)
433#define SK_PNMI_ERR004MSG "OidStruct: Called with wrong action"
434#define SK_PNMI_ERR005 (SK_ERRBASE_PNMI + 5)
435#define SK_PNMI_ERR005MSG "Perform: Cannot reset driver"
436#define SK_PNMI_ERR006 (SK_ERRBASE_PNMI + 6)
437#define SK_PNMI_ERR006MSG "Perform: Unknown OID action command"
438#define SK_PNMI_ERR007 (SK_ERRBASE_PNMI + 7)
439#define SK_PNMI_ERR007MSG "General: Driver description not initialized"
440#define SK_PNMI_ERR008 (SK_ERRBASE_PNMI + 8)
441#define SK_PNMI_ERR008MSG "Addr: Tried to get unknown OID"
442#define SK_PNMI_ERR009 (SK_ERRBASE_PNMI + 9)
443#define SK_PNMI_ERR009MSG "Addr: Unknown OID"
444#define SK_PNMI_ERR010 (SK_ERRBASE_PNMI + 10)
445#define SK_PNMI_ERR010MSG "CsumStat: Unknown OID"
446#define SK_PNMI_ERR011 (SK_ERRBASE_PNMI + 11)
447#define SK_PNMI_ERR011MSG "SensorStat: Sensor descr string too long"
448#define SK_PNMI_ERR012 (SK_ERRBASE_PNMI + 12)
449#define SK_PNMI_ERR012MSG "SensorStat: Unknown OID"
450#define SK_PNMI_ERR013 (SK_ERRBASE_PNMI + 13)
451#define SK_PNMI_ERR013MSG ""
452#define SK_PNMI_ERR014 (SK_ERRBASE_PNMI + 14)
453#define SK_PNMI_ERR014MSG "Vpd: Cannot read VPD keys"
454#define SK_PNMI_ERR015 (SK_ERRBASE_PNMI + 15)
455#define SK_PNMI_ERR015MSG "Vpd: Internal array for VPD keys to small"
456#define SK_PNMI_ERR016 (SK_ERRBASE_PNMI + 16)
457#define SK_PNMI_ERR016MSG "Vpd: Key string too long"
458#define SK_PNMI_ERR017 (SK_ERRBASE_PNMI + 17)
459#define SK_PNMI_ERR017MSG "Vpd: Invalid VPD status pointer"
460#define SK_PNMI_ERR018 (SK_ERRBASE_PNMI + 18)
461#define SK_PNMI_ERR018MSG "Vpd: VPD data not valid"
462#define SK_PNMI_ERR019 (SK_ERRBASE_PNMI + 19)
463#define SK_PNMI_ERR019MSG "Vpd: VPD entries list string too long"
464#define SK_PNMI_ERR021 (SK_ERRBASE_PNMI + 21)
465#define SK_PNMI_ERR021MSG "Vpd: VPD data string too long"
466#define SK_PNMI_ERR022 (SK_ERRBASE_PNMI + 22)
467#define SK_PNMI_ERR022MSG "Vpd: VPD data string too long should be errored before"
468#define SK_PNMI_ERR023 (SK_ERRBASE_PNMI + 23)
469#define SK_PNMI_ERR023MSG "Vpd: Unknown OID in get action"
470#define SK_PNMI_ERR024 (SK_ERRBASE_PNMI + 24)
471#define SK_PNMI_ERR024MSG "Vpd: Unknown OID in preset/set action"
472#define SK_PNMI_ERR025 (SK_ERRBASE_PNMI + 25)
473#define SK_PNMI_ERR025MSG "Vpd: Cannot write VPD after modify entry"
474#define SK_PNMI_ERR026 (SK_ERRBASE_PNMI + 26)
475#define SK_PNMI_ERR026MSG "Vpd: Cannot update VPD"
476#define SK_PNMI_ERR027 (SK_ERRBASE_PNMI + 27)
477#define SK_PNMI_ERR027MSG "Vpd: Cannot delete VPD entry"
478#define SK_PNMI_ERR028 (SK_ERRBASE_PNMI + 28)
479#define SK_PNMI_ERR028MSG "Vpd: Cannot update VPD after delete entry"
480#define SK_PNMI_ERR029 (SK_ERRBASE_PNMI + 29)
481#define SK_PNMI_ERR029MSG "General: Driver description string too long"
482#define SK_PNMI_ERR030 (SK_ERRBASE_PNMI + 30)
483#define SK_PNMI_ERR030MSG "General: Driver version not initialized"
484#define SK_PNMI_ERR031 (SK_ERRBASE_PNMI + 31)
485#define SK_PNMI_ERR031MSG "General: Driver version string too long"
486#define SK_PNMI_ERR032 (SK_ERRBASE_PNMI + 32)
487#define SK_PNMI_ERR032MSG "General: Cannot read VPD Name for HW descr"
488#define SK_PNMI_ERR033 (SK_ERRBASE_PNMI + 33)
489#define SK_PNMI_ERR033MSG "General: HW description string too long"
490#define SK_PNMI_ERR034 (SK_ERRBASE_PNMI + 34)
491#define SK_PNMI_ERR034MSG "General: Unknown OID"
492#define SK_PNMI_ERR035 (SK_ERRBASE_PNMI + 35)
493#define SK_PNMI_ERR035MSG "Rlmt: Unknown OID"
494#define SK_PNMI_ERR036 (SK_ERRBASE_PNMI + 36)
495#define SK_PNMI_ERR036MSG ""
496#define SK_PNMI_ERR037 (SK_ERRBASE_PNMI + 37)
497#define SK_PNMI_ERR037MSG "Rlmt: SK_RLMT_MODE_CHANGE event return not 0"
498#define SK_PNMI_ERR038 (SK_ERRBASE_PNMI + 38)
499#define SK_PNMI_ERR038MSG "Rlmt: SK_RLMT_PREFPORT_CHANGE event return not 0"
500#define SK_PNMI_ERR039 (SK_ERRBASE_PNMI + 39)
501#define SK_PNMI_ERR039MSG "RlmtStat: Unknown OID"
502#define SK_PNMI_ERR040 (SK_ERRBASE_PNMI + 40)
503#define SK_PNMI_ERR040MSG "PowerManagement: Unknown OID"
504#define SK_PNMI_ERR041 (SK_ERRBASE_PNMI + 41)
505#define SK_PNMI_ERR041MSG "MacPrivateConf: Unknown OID"
506#define SK_PNMI_ERR042 (SK_ERRBASE_PNMI + 42)
507#define SK_PNMI_ERR042MSG "MacPrivateConf: SK_HWEV_SET_ROLE returned not 0"
508#define SK_PNMI_ERR043 (SK_ERRBASE_PNMI + 43)
509#define SK_PNMI_ERR043MSG "MacPrivateConf: SK_HWEV_SET_LMODE returned not 0"
510#define SK_PNMI_ERR044 (SK_ERRBASE_PNMI + 44)
511#define SK_PNMI_ERR044MSG "MacPrivateConf: SK_HWEV_SET_FLOWMODE returned not 0"
512#define SK_PNMI_ERR045 (SK_ERRBASE_PNMI + 45)
513#define SK_PNMI_ERR045MSG "MacPrivateConf: SK_HWEV_SET_SPEED returned not 0"
514#define SK_PNMI_ERR046 (SK_ERRBASE_PNMI + 46)
515#define SK_PNMI_ERR046MSG "Monitor: Unknown OID"
516#define SK_PNMI_ERR047 (SK_ERRBASE_PNMI + 47)
517#define SK_PNMI_ERR047MSG "SirqUpdate: Event function returns not 0"
518#define SK_PNMI_ERR048 (SK_ERRBASE_PNMI + 48)
519#define SK_PNMI_ERR048MSG "RlmtUpdate: Event function returns not 0"
520#define SK_PNMI_ERR049 (SK_ERRBASE_PNMI + 49)
521#define SK_PNMI_ERR049MSG "SkPnmiInit: Invalid size of 'CounterOffset' struct!!"
522#define SK_PNMI_ERR050 (SK_ERRBASE_PNMI + 50)
523#define SK_PNMI_ERR050MSG "SkPnmiInit: Invalid size of 'StatAddr' table!!"
524#define SK_PNMI_ERR051 (SK_ERRBASE_PNMI + 51)
525#define SK_PNMI_ERR051MSG "SkPnmiEvent: Port switch suspicious"
526#define SK_PNMI_ERR052 (SK_ERRBASE_PNMI + 52)
527#define SK_PNMI_ERR052MSG ""
528#define SK_PNMI_ERR053 (SK_ERRBASE_PNMI + 53)
529#define SK_PNMI_ERR053MSG "General: Driver release date not initialized"
530#define SK_PNMI_ERR054 (SK_ERRBASE_PNMI + 54)
531#define SK_PNMI_ERR054MSG "General: Driver release date string too long"
532#define SK_PNMI_ERR055 (SK_ERRBASE_PNMI + 55)
533#define SK_PNMI_ERR055MSG "General: Driver file name not initialized"
534#define SK_PNMI_ERR056 (SK_ERRBASE_PNMI + 56)
535#define SK_PNMI_ERR056MSG "General: Driver file name string too long"
536
537/*
538 * Management counter macros called by the driver
539 */
540#define SK_PNMI_SET_DRIVER_DESCR(pAC,v) ((pAC)->Pnmi.pDriverDescription = \
541 (char *)(v))
542
543#define SK_PNMI_SET_DRIVER_VER(pAC,v) ((pAC)->Pnmi.pDriverVersion = \
544 (char *)(v))
545
546#define SK_PNMI_SET_DRIVER_RELDATE(pAC,v) ((pAC)->Pnmi.pDriverReleaseDate = \
547 (char *)(v))
548
549#define SK_PNMI_SET_DRIVER_FILENAME(pAC,v) ((pAC)->Pnmi.pDriverFileName = \
550 (char *)(v))
551
552#define SK_PNMI_CNT_TX_QUEUE_LEN(pAC,v,p) \
553 { \
554 (pAC)->Pnmi.Port[p].TxSwQueueLen = (SK_U64)(v); \
555 if ((pAC)->Pnmi.Port[p].TxSwQueueLen > (pAC)->Pnmi.Port[p].TxSwQueueMax) { \
556 (pAC)->Pnmi.Port[p].TxSwQueueMax = (pAC)->Pnmi.Port[p].TxSwQueueLen; \
557 } \
558 }
559#define SK_PNMI_CNT_TX_RETRY(pAC,p) (((pAC)->Pnmi.Port[p].TxRetryCts)++)
560#define SK_PNMI_CNT_RX_INTR(pAC,p) (((pAC)->Pnmi.Port[p].RxIntrCts)++)
561#define SK_PNMI_CNT_TX_INTR(pAC,p) (((pAC)->Pnmi.Port[p].TxIntrCts)++)
562#define SK_PNMI_CNT_NO_RX_BUF(pAC,p) (((pAC)->Pnmi.Port[p].RxNoBufCts)++)
563#define SK_PNMI_CNT_NO_TX_BUF(pAC,p) (((pAC)->Pnmi.Port[p].TxNoBufCts)++)
564#define SK_PNMI_CNT_USED_TX_DESCR(pAC,v,p) \
565 ((pAC)->Pnmi.Port[p].TxUsedDescrNo=(SK_U64)(v));
566#define SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC,v,p) \
567 { \
568 ((pAC)->Pnmi.Port[p].RxDeliveredCts)++; \
569 (pAC)->Pnmi.Port[p].RxOctetsDeliveredCts += (SK_U64)(v); \
570 }
571#define SK_PNMI_CNT_ERR_RECOVERY(pAC,p) (((pAC)->Pnmi.Port[p].ErrRecoveryCts)++);
572
573#define SK_PNMI_CNT_SYNC_OCTETS(pAC,p,v) \
574 { \
575 if ((p) < SK_MAX_MACS) { \
576 ((pAC)->Pnmi.Port[p].StatSyncCts)++; \
577 (pAC)->Pnmi.Port[p].StatSyncOctetsCts += (SK_U64)(v); \
578 } \
579 }
580
581#define SK_PNMI_CNT_RX_LONGFRAMES(pAC,p) \
582 { \
583 if ((p) < SK_MAX_MACS) { \
584 ((pAC)->Pnmi.Port[p].StatRxLongFrameCts++); \
585 } \
586 }
587
588#define SK_PNMI_CNT_RX_FRAMETOOLONG(pAC,p) \
589 { \
590 if ((p) < SK_MAX_MACS) { \
591 ((pAC)->Pnmi.Port[p].StatRxFrameTooLongCts++); \
592 } \
593 }
594
595#define SK_PNMI_CNT_RX_PMACC_ERR(pAC,p) \
596 { \
597 if ((p) < SK_MAX_MACS) { \
598 ((pAC)->Pnmi.Port[p].StatRxPMaccErr++); \
599 } \
600 }
601
602/*
603 * Conversion Macros
604 */
605#define SK_PNMI_PORT_INST2LOG(i) ((unsigned int)(i) - 1)
606#define SK_PNMI_PORT_LOG2INST(l) ((unsigned int)(l) + 1)
607#define SK_PNMI_PORT_PHYS2LOG(p) ((unsigned int)(p) + 1)
608#define SK_PNMI_PORT_LOG2PHYS(pAC,l) ((unsigned int)(l) - 1)
609#define SK_PNMI_PORT_PHYS2INST(pAC,p) \
610 (pAC->Pnmi.DualNetActiveFlag ? 2 : ((unsigned int)(p) + 2))
611#define SK_PNMI_PORT_INST2PHYS(pAC,i) ((unsigned int)(i) - 2)
612
613/*
614 * Structure definition for SkPnmiGetStruct and SkPnmiSetStruct
615 */
616#define SK_PNMI_VPD_KEY_SIZE 5
617#define SK_PNMI_VPD_BUFSIZE (VPD_SIZE)
618#define SK_PNMI_VPD_ENTRIES (VPD_SIZE / 4)
619#define SK_PNMI_VPD_DATALEN 128 /* Number of data bytes */
620
621#define SK_PNMI_MULTICAST_LISTLEN 64
622#define SK_PNMI_SENSOR_ENTRIES (SK_MAX_SENSORS)
623#define SK_PNMI_CHECKSUM_ENTRIES 3
624#define SK_PNMI_MAC_ENTRIES (SK_MAX_MACS + 1)
625#define SK_PNMI_MONITOR_ENTRIES 20
626#define SK_PNMI_TRAP_ENTRIES 10
627#define SK_PNMI_TRAPLEN 128
628#define SK_PNMI_STRINGLEN1 80
629#define SK_PNMI_STRINGLEN2 25
630#define SK_PNMI_TRAP_QUEUE_LEN 512
631
632typedef struct s_PnmiVpd {
633 char VpdKey[SK_PNMI_VPD_KEY_SIZE];
634 char VpdValue[SK_PNMI_VPD_DATALEN];
635 SK_U8 VpdAccess;
636 SK_U8 VpdAction;
637} SK_PNMI_VPD;
638
639typedef struct s_PnmiSensor {
640 SK_U8 SensorIndex;
641 char SensorDescr[SK_PNMI_STRINGLEN2];
642 SK_U8 SensorType;
643 SK_U32 SensorValue;
644 SK_U32 SensorWarningThresholdLow;
645 SK_U32 SensorWarningThresholdHigh;
646 SK_U32 SensorErrorThresholdLow;
647 SK_U32 SensorErrorThresholdHigh;
648 SK_U8 SensorStatus;
649 SK_U64 SensorWarningCts;
650 SK_U64 SensorErrorCts;
651 SK_U64 SensorWarningTimestamp;
652 SK_U64 SensorErrorTimestamp;
653} SK_PNMI_SENSOR;
654
655typedef struct s_PnmiChecksum {
656 SK_U64 ChecksumRxOkCts;
657 SK_U64 ChecksumRxUnableCts;
658 SK_U64 ChecksumRxErrCts;
659 SK_U64 ChecksumTxOkCts;
660 SK_U64 ChecksumTxUnableCts;
661} SK_PNMI_CHECKSUM;
662
663typedef struct s_PnmiStat {
664 SK_U64 StatTxOkCts;
665 SK_U64 StatTxOctetsOkCts;
666 SK_U64 StatTxBroadcastOkCts;
667 SK_U64 StatTxMulticastOkCts;
668 SK_U64 StatTxUnicastOkCts;
669 SK_U64 StatTxLongFramesCts;
670 SK_U64 StatTxBurstCts;
671 SK_U64 StatTxPauseMacCtrlCts;
672 SK_U64 StatTxMacCtrlCts;
673 SK_U64 StatTxSingleCollisionCts;
674 SK_U64 StatTxMultipleCollisionCts;
675 SK_U64 StatTxExcessiveCollisionCts;
676 SK_U64 StatTxLateCollisionCts;
677 SK_U64 StatTxDeferralCts;
678 SK_U64 StatTxExcessiveDeferralCts;
679 SK_U64 StatTxFifoUnderrunCts;
680 SK_U64 StatTxCarrierCts;
681 SK_U64 Dummy1; /* StatTxUtilization */
682 SK_U64 StatTx64Cts;
683 SK_U64 StatTx127Cts;
684 SK_U64 StatTx255Cts;
685 SK_U64 StatTx511Cts;
686 SK_U64 StatTx1023Cts;
687 SK_U64 StatTxMaxCts;
688 SK_U64 StatTxSyncCts;
689 SK_U64 StatTxSyncOctetsCts;
690 SK_U64 StatRxOkCts;
691 SK_U64 StatRxOctetsOkCts;
692 SK_U64 StatRxBroadcastOkCts;
693 SK_U64 StatRxMulticastOkCts;
694 SK_U64 StatRxUnicastOkCts;
695 SK_U64 StatRxLongFramesCts;
696 SK_U64 StatRxPauseMacCtrlCts;
697 SK_U64 StatRxMacCtrlCts;
698 SK_U64 StatRxPauseMacCtrlErrorCts;
699 SK_U64 StatRxMacCtrlUnknownCts;
700 SK_U64 StatRxBurstCts;
701 SK_U64 StatRxMissedCts;
702 SK_U64 StatRxFramingCts;
703 SK_U64 StatRxFifoOverflowCts;
704 SK_U64 StatRxJabberCts;
705 SK_U64 StatRxCarrierCts;
706 SK_U64 StatRxIRLengthCts;
707 SK_U64 StatRxSymbolCts;
708 SK_U64 StatRxShortsCts;
709 SK_U64 StatRxRuntCts;
710 SK_U64 StatRxCextCts;
711 SK_U64 StatRxTooLongCts;
712 SK_U64 StatRxFcsCts;
713 SK_U64 Dummy2; /* StatRxUtilization */
714 SK_U64 StatRx64Cts;
715 SK_U64 StatRx127Cts;
716 SK_U64 StatRx255Cts;
717 SK_U64 StatRx511Cts;
718 SK_U64 StatRx1023Cts;
719 SK_U64 StatRxMaxCts;
720} SK_PNMI_STAT;
721
722typedef struct s_PnmiConf {
723 char ConfMacCurrentAddr[6];
724 char ConfMacFactoryAddr[6];
725 SK_U8 ConfPMD;
726 SK_U8 ConfConnector;
727 SK_U32 ConfPhyType;
728 SK_U32 ConfPhyMode;
729 SK_U8 ConfLinkCapability;
730 SK_U8 ConfLinkMode;
731 SK_U8 ConfLinkModeStatus;
732 SK_U8 ConfLinkStatus;
733 SK_U8 ConfFlowCtrlCapability;
734 SK_U8 ConfFlowCtrlMode;
735 SK_U8 ConfFlowCtrlStatus;
736 SK_U8 ConfPhyOperationCapability;
737 SK_U8 ConfPhyOperationMode;
738 SK_U8 ConfPhyOperationStatus;
739 SK_U8 ConfSpeedCapability;
740 SK_U8 ConfSpeedMode;
741 SK_U8 ConfSpeedStatus;
742} SK_PNMI_CONF;
743
744typedef struct s_PnmiRlmt {
745 SK_U32 RlmtIndex;
746 SK_U32 RlmtStatus;
747 SK_U64 RlmtTxHelloCts;
748 SK_U64 RlmtRxHelloCts;
749 SK_U64 RlmtTxSpHelloReqCts;
750 SK_U64 RlmtRxSpHelloCts;
751} SK_PNMI_RLMT;
752
753typedef struct s_PnmiRlmtMonitor {
754 SK_U32 RlmtMonitorIndex;
755 char RlmtMonitorAddr[6];
756 SK_U64 RlmtMonitorErrorCts;
757 SK_U64 RlmtMonitorTimestamp;
758 SK_U8 RlmtMonitorAdmin;
759} SK_PNMI_RLMT_MONITOR;
760
761typedef struct s_PnmiRequestStatus {
762 SK_U32 ErrorStatus;
763 SK_U32 ErrorOffset;
764} SK_PNMI_REQUEST_STATUS;
765
766typedef struct s_PnmiStrucData {
767 SK_U32 MgmtDBVersion;
768 SK_PNMI_REQUEST_STATUS ReturnStatus;
769 SK_U32 VpdFreeBytes;
770 char VpdEntriesList[SK_PNMI_VPD_ENTRIES * SK_PNMI_VPD_KEY_SIZE];
771 SK_U32 VpdEntriesNumber;
772 SK_PNMI_VPD Vpd[SK_PNMI_VPD_ENTRIES];
773 SK_U32 PortNumber;
774 SK_U32 DeviceType;
775 char DriverDescr[SK_PNMI_STRINGLEN1];
776 char DriverVersion[SK_PNMI_STRINGLEN2];
777 char DriverReleaseDate[SK_PNMI_STRINGLEN1];
778 char DriverFileName[SK_PNMI_STRINGLEN1];
779 char HwDescr[SK_PNMI_STRINGLEN1];
780 char HwVersion[SK_PNMI_STRINGLEN2];
781 SK_U16 Chipset;
782 SK_U32 ChipId;
783 SK_U8 VauxAvail;
784 SK_U32 RamSize;
785 SK_U32 MtuSize;
786 SK_U32 Action;
787 SK_U32 TestResult;
788 SK_U8 BusType;
789 SK_U8 BusSpeed;
790 SK_U8 BusWidth;
791 SK_U8 SensorNumber;
792 SK_PNMI_SENSOR Sensor[SK_PNMI_SENSOR_ENTRIES];
793 SK_U8 ChecksumNumber;
794 SK_PNMI_CHECKSUM Checksum[SK_PNMI_CHECKSUM_ENTRIES];
795 SK_PNMI_STAT Stat[SK_PNMI_MAC_ENTRIES];
796 SK_PNMI_CONF Conf[SK_PNMI_MAC_ENTRIES];
797 SK_U8 RlmtMode;
798 SK_U32 RlmtPortNumber;
799 SK_U8 RlmtPortActive;
800 SK_U8 RlmtPortPreferred;
801 SK_U64 RlmtChangeCts;
802 SK_U64 RlmtChangeTime;
803 SK_U64 RlmtChangeEstimate;
804 SK_U64 RlmtChangeThreshold;
805 SK_PNMI_RLMT Rlmt[SK_MAX_MACS];
806 SK_U32 RlmtMonitorNumber;
807 SK_PNMI_RLMT_MONITOR RlmtMonitor[SK_PNMI_MONITOR_ENTRIES];
808 SK_U32 TrapNumber;
809 SK_U8 Trap[SK_PNMI_TRAP_QUEUE_LEN];
810 SK_U64 TxSwQueueLen;
811 SK_U64 TxSwQueueMax;
812 SK_U64 TxRetryCts;
813 SK_U64 RxIntrCts;
814 SK_U64 TxIntrCts;
815 SK_U64 RxNoBufCts;
816 SK_U64 TxNoBufCts;
817 SK_U64 TxUsedDescrNo;
818 SK_U64 RxDeliveredCts;
819 SK_U64 RxOctetsDeliveredCts;
820 SK_U64 RxHwErrorsCts;
821 SK_U64 TxHwErrorsCts;
822 SK_U64 InErrorsCts;
823 SK_U64 OutErrorsCts;
824 SK_U64 ErrRecoveryCts;
825 SK_U64 SysUpTime;
826} SK_PNMI_STRUCT_DATA;
827
828#define SK_PNMI_STRUCT_SIZE (sizeof(SK_PNMI_STRUCT_DATA))
829#define SK_PNMI_MIN_STRUCT_SIZE ((unsigned int)(SK_UPTR)\
830 &(((SK_PNMI_STRUCT_DATA *)0)->VpdFreeBytes))
831 /*
832 * ReturnStatus field
833 * must be located
834 * before VpdFreeBytes
835 */
836
837/*
838 * Various definitions
839 */
840#define SK_PNMI_MAX_PROTOS 3
841
842#define SK_PNMI_CNT_NO 66 /* Must have the value of the enum
843 * SK_PNMI_MAX_IDX. Define SK_PNMI_CHECK
844 * for check while init phase 1
845 */
846
847/*
848 * Estimate data structure
849 */
850typedef struct s_PnmiEstimate {
851 unsigned int EstValueIndex;
852 SK_U64 EstValue[7];
853 SK_U64 Estimate;
854 SK_TIMER EstTimer;
855} SK_PNMI_ESTIMATE;
856
857
858/*
859 * VCT timer data structure
860 */
861typedef struct s_VctTimer {
862 SK_TIMER VctTimer;
863} SK_PNMI_VCT_TIMER;
864
865
866/*
867 * PNMI specific adapter context structure
868 */
869typedef struct s_PnmiPort {
870 SK_U64 StatSyncCts;
871 SK_U64 StatSyncOctetsCts;
872 SK_U64 StatRxLongFrameCts;
873 SK_U64 StatRxFrameTooLongCts;
874 SK_U64 StatRxPMaccErr;
875 SK_U64 TxSwQueueLen;
876 SK_U64 TxSwQueueMax;
877 SK_U64 TxRetryCts;
878 SK_U64 RxIntrCts;
879 SK_U64 TxIntrCts;
880 SK_U64 RxNoBufCts;
881 SK_U64 TxNoBufCts;
882 SK_U64 TxUsedDescrNo;
883 SK_U64 RxDeliveredCts;
884 SK_U64 RxOctetsDeliveredCts;
885 SK_U64 RxHwErrorsCts;
886 SK_U64 TxHwErrorsCts;
887 SK_U64 InErrorsCts;
888 SK_U64 OutErrorsCts;
889 SK_U64 ErrRecoveryCts;
890 SK_U64 RxShortZeroMark;
891 SK_U64 CounterOffset[SK_PNMI_CNT_NO];
892 SK_U32 CounterHigh[SK_PNMI_CNT_NO];
893 SK_BOOL ActiveFlag;
894 SK_U8 Align[3];
895} SK_PNMI_PORT;
896
897
898typedef struct s_PnmiData {
899 SK_PNMI_PORT Port [SK_MAX_MACS];
900 SK_PNMI_PORT BufPort [SK_MAX_MACS]; /* 2002-09-13 pweber */
901 SK_U64 VirtualCounterOffset[SK_PNMI_CNT_NO];
902 SK_U32 TestResult;
903 char HwVersion[10];
904 SK_U16 Align01;
905
906 char *pDriverDescription;
907 char *pDriverVersion;
908 char *pDriverReleaseDate;
909 char *pDriverFileName;
910
911 int MacUpdatedFlag;
912 int RlmtUpdatedFlag;
913 int SirqUpdatedFlag;
914
915 SK_U64 RlmtChangeCts;
916 SK_U64 RlmtChangeTime;
917 SK_PNMI_ESTIMATE RlmtChangeEstimate;
918 SK_U64 RlmtChangeThreshold;
919
920 SK_U64 StartUpTime;
921 SK_U32 DeviceType;
922 char PciBusSpeed;
923 char PciBusWidth;
924 char Chipset;
925 char PMD;
926 char Connector;
927 SK_BOOL DualNetActiveFlag;
928 SK_U16 Align02;
929
930 char TrapBuf[SK_PNMI_TRAP_QUEUE_LEN];
931 unsigned int TrapBufFree;
932 unsigned int TrapQueueBeg;
933 unsigned int TrapQueueEnd;
934 unsigned int TrapBufPad;
935 unsigned int TrapUnique;
936 SK_U8 VctStatus[SK_MAX_MACS];
937 SK_PNMI_VCT VctBackup[SK_MAX_MACS];
938 SK_PNMI_VCT_TIMER VctTimeout[SK_MAX_MACS];
939#ifdef SK_DIAG_SUPPORT
940 SK_U32 DiagAttached;
941#endif /* SK_DIAG_SUPPORT */
942} SK_PNMI;
943
944
945/*
946 * Function prototypes
947 */
948extern int SkPnmiInit(SK_AC *pAC, SK_IOC IoC, int Level);
949extern int SkPnmiSetVar(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, void* pBuf,
950 unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex);
951extern int SkPnmiGetStruct(SK_AC *pAC, SK_IOC IoC, void* pBuf,
952 unsigned int *pLen, SK_U32 NetIndex);
953extern int SkPnmiPreSetStruct(SK_AC *pAC, SK_IOC IoC, void* pBuf,
954 unsigned int *pLen, SK_U32 NetIndex);
955extern int SkPnmiSetStruct(SK_AC *pAC, SK_IOC IoC, void* pBuf,
956 unsigned int *pLen, SK_U32 NetIndex);
957extern int SkPnmiEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event,
958 SK_EVPARA Param);
959extern int SkPnmiGenIoctl(SK_AC *pAC, SK_IOC IoC, void * pBuf,
960 unsigned int * pLen, SK_U32 NetIndex);
961
962#endif
diff --git a/drivers/net/sk98lin/h/skgesirq.h b/drivers/net/sk98lin/h/skgesirq.h
new file mode 100644
index 0000000000..3eec6274e4
--- /dev/null
+++ b/drivers/net/sk98lin/h/skgesirq.h
@@ -0,0 +1,110 @@
1/******************************************************************************
2 *
3 * Name: skgesirq.h
4 * Project: Gigabit Ethernet Adapters, Common Modules
5 * Version: $Revision: 1.30 $
6 * Date: $Date: 2003/07/04 12:34:13 $
7 * Purpose: SK specific Gigabit Ethernet special IRQ functions
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25#ifndef _INC_SKGESIRQ_H_
26#define _INC_SKGESIRQ_H_
27
28/* Define return codes of SkGePortCheckUp and CheckShort */
29#define SK_HW_PS_NONE 0 /* No action needed */
30#define SK_HW_PS_RESTART 1 /* Restart needed */
31#define SK_HW_PS_LINK 2 /* Link Up actions needed */
32
33/*
34 * Define the Event the special IRQ/INI module can handle
35 */
36#define SK_HWEV_WATIM 1 /* Timeout for WA Errata #2 XMAC */
37#define SK_HWEV_PORT_START 2 /* Port Start Event by RLMT */
38#define SK_HWEV_PORT_STOP 3 /* Port Stop Event by RLMT */
39#define SK_HWEV_CLEAR_STAT 4 /* Clear Statistics by PNMI */
40#define SK_HWEV_UPDATE_STAT 5 /* Update Statistics by PNMI */
41#define SK_HWEV_SET_LMODE 6 /* Set Link Mode by PNMI */
42#define SK_HWEV_SET_FLOWMODE 7 /* Set Flow Control Mode by PNMI */
43#define SK_HWEV_SET_ROLE 8 /* Set Master/Slave (Role) by PNMI */
44#define SK_HWEV_SET_SPEED 9 /* Set Link Speed by PNMI */
45#define SK_HWEV_HALFDUP_CHK 10 /* Half Duplex Hangup Workaround */
46
47#define SK_WA_ACT_TIME (5000000UL) /* 5 sec */
48#define SK_WA_INA_TIME (100000UL) /* 100 msec */
49
50#define SK_HALFDUP_CHK_TIME (10000UL) /* 10 msec */
51
52/*
53 * Define the error numbers and messages
54 */
55#define SKERR_SIRQ_E001 (SK_ERRBASE_SIRQ+0)
56#define SKERR_SIRQ_E001MSG "Unknown event"
57#define SKERR_SIRQ_E002 (SKERR_SIRQ_E001+1)
58#define SKERR_SIRQ_E002MSG "Packet timeout RX1"
59#define SKERR_SIRQ_E003 (SKERR_SIRQ_E002+1)
60#define SKERR_SIRQ_E003MSG "Packet timeout RX2"
61#define SKERR_SIRQ_E004 (SKERR_SIRQ_E003+1)
62#define SKERR_SIRQ_E004MSG "MAC 1 not correctly initialized"
63#define SKERR_SIRQ_E005 (SKERR_SIRQ_E004+1)
64#define SKERR_SIRQ_E005MSG "MAC 2 not correctly initialized"
65#define SKERR_SIRQ_E006 (SKERR_SIRQ_E005+1)
66#define SKERR_SIRQ_E006MSG "CHECK failure R1"
67#define SKERR_SIRQ_E007 (SKERR_SIRQ_E006+1)
68#define SKERR_SIRQ_E007MSG "CHECK failure R2"
69#define SKERR_SIRQ_E008 (SKERR_SIRQ_E007+1)
70#define SKERR_SIRQ_E008MSG "CHECK failure XS1"
71#define SKERR_SIRQ_E009 (SKERR_SIRQ_E008+1)
72#define SKERR_SIRQ_E009MSG "CHECK failure XA1"
73#define SKERR_SIRQ_E010 (SKERR_SIRQ_E009+1)
74#define SKERR_SIRQ_E010MSG "CHECK failure XS2"
75#define SKERR_SIRQ_E011 (SKERR_SIRQ_E010+1)
76#define SKERR_SIRQ_E011MSG "CHECK failure XA2"
77#define SKERR_SIRQ_E012 (SKERR_SIRQ_E011+1)
78#define SKERR_SIRQ_E012MSG "unexpected IRQ Master error"
79#define SKERR_SIRQ_E013 (SKERR_SIRQ_E012+1)
80#define SKERR_SIRQ_E013MSG "unexpected IRQ Status error"
81#define SKERR_SIRQ_E014 (SKERR_SIRQ_E013+1)
82#define SKERR_SIRQ_E014MSG "Parity error on RAM (read)"
83#define SKERR_SIRQ_E015 (SKERR_SIRQ_E014+1)
84#define SKERR_SIRQ_E015MSG "Parity error on RAM (write)"
85#define SKERR_SIRQ_E016 (SKERR_SIRQ_E015+1)
86#define SKERR_SIRQ_E016MSG "Parity error MAC 1"
87#define SKERR_SIRQ_E017 (SKERR_SIRQ_E016+1)
88#define SKERR_SIRQ_E017MSG "Parity error MAC 2"
89#define SKERR_SIRQ_E018 (SKERR_SIRQ_E017+1)
90#define SKERR_SIRQ_E018MSG "Parity error RX 1"
91#define SKERR_SIRQ_E019 (SKERR_SIRQ_E018+1)
92#define SKERR_SIRQ_E019MSG "Parity error RX 2"
93#define SKERR_SIRQ_E020 (SKERR_SIRQ_E019+1)
94#define SKERR_SIRQ_E020MSG "MAC transmit FIFO underrun"
95#define SKERR_SIRQ_E021 (SKERR_SIRQ_E020+1)
96#define SKERR_SIRQ_E021MSG "Spurious TWSI interrupt"
97#define SKERR_SIRQ_E022 (SKERR_SIRQ_E021+1)
98#define SKERR_SIRQ_E022MSG "Cable pair swap error"
99#define SKERR_SIRQ_E023 (SKERR_SIRQ_E022+1)
100#define SKERR_SIRQ_E023MSG "Auto-negotiation error"
101#define SKERR_SIRQ_E024 (SKERR_SIRQ_E023+1)
102#define SKERR_SIRQ_E024MSG "FIFO overflow error"
103#define SKERR_SIRQ_E025 (SKERR_SIRQ_E024+1)
104#define SKERR_SIRQ_E025MSG "2 Pair Downshift detected"
105
106extern void SkGeSirqIsr(SK_AC *pAC, SK_IOC IoC, SK_U32 Istatus);
107extern int SkGeSirqEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event, SK_EVPARA Para);
108extern void SkHWLinkDown(SK_AC *pAC, SK_IOC IoC, int Port);
109
110#endif /* _INC_SKGESIRQ_H_ */
diff --git a/drivers/net/sk98lin/h/ski2c.h b/drivers/net/sk98lin/h/ski2c.h
new file mode 100644
index 0000000000..6a63f4a15d
--- /dev/null
+++ b/drivers/net/sk98lin/h/ski2c.h
@@ -0,0 +1,174 @@
1/******************************************************************************
2 *
3 * Name: ski2c.h
4 * Project: Gigabit Ethernet Adapters, TWSI-Module
5 * Version: $Revision: 1.35 $
6 * Date: $Date: 2003/10/20 09:06:30 $
7 * Purpose: Defines to access Voltage and Temperature Sensor
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/*
26 * SKI2C.H contains all I2C specific defines
27 */
28
29#ifndef _SKI2C_H_
30#define _SKI2C_H_
31
32typedef struct s_Sensor SK_SENSOR;
33
34#include "h/skgei2c.h"
35
36/*
37 * Define the I2C events.
38 */
39#define SK_I2CEV_IRQ 1 /* IRQ happened Event */
40#define SK_I2CEV_TIM 2 /* Timeout event */
41#define SK_I2CEV_CLEAR 3 /* Clear MIB Values */
42
43/*
44 * Define READ and WRITE Constants.
45 */
46#define I2C_READ 0
47#define I2C_WRITE 1
48#define I2C_BURST 1
49#define I2C_SINGLE 0
50
51#define SKERR_I2C_E001 (SK_ERRBASE_I2C+0)
52#define SKERR_I2C_E001MSG "Sensor index unknown"
53#define SKERR_I2C_E002 (SKERR_I2C_E001+1)
54#define SKERR_I2C_E002MSG "TWSI: transfer does not complete"
55#define SKERR_I2C_E003 (SKERR_I2C_E002+1)
56#define SKERR_I2C_E003MSG "LM80: NAK on device send"
57#define SKERR_I2C_E004 (SKERR_I2C_E003+1)
58#define SKERR_I2C_E004MSG "LM80: NAK on register send"
59#define SKERR_I2C_E005 (SKERR_I2C_E004+1)
60#define SKERR_I2C_E005MSG "LM80: NAK on device (2) send"
61#define SKERR_I2C_E006 (SKERR_I2C_E005+1)
62#define SKERR_I2C_E006MSG "Unknown event"
63#define SKERR_I2C_E007 (SKERR_I2C_E006+1)
64#define SKERR_I2C_E007MSG "LM80 read out of state"
65#define SKERR_I2C_E008 (SKERR_I2C_E007+1)
66#define SKERR_I2C_E008MSG "Unexpected sensor read completed"
67#define SKERR_I2C_E009 (SKERR_I2C_E008+1)
68#define SKERR_I2C_E009MSG "WARNING: temperature sensor out of range"
69#define SKERR_I2C_E010 (SKERR_I2C_E009+1)
70#define SKERR_I2C_E010MSG "WARNING: voltage sensor out of range"
71#define SKERR_I2C_E011 (SKERR_I2C_E010+1)
72#define SKERR_I2C_E011MSG "ERROR: temperature sensor out of range"
73#define SKERR_I2C_E012 (SKERR_I2C_E011+1)
74#define SKERR_I2C_E012MSG "ERROR: voltage sensor out of range"
75#define SKERR_I2C_E013 (SKERR_I2C_E012+1)
76#define SKERR_I2C_E013MSG "ERROR: couldn't init sensor"
77#define SKERR_I2C_E014 (SKERR_I2C_E013+1)
78#define SKERR_I2C_E014MSG "WARNING: fan sensor out of range"
79#define SKERR_I2C_E015 (SKERR_I2C_E014+1)
80#define SKERR_I2C_E015MSG "ERROR: fan sensor out of range"
81#define SKERR_I2C_E016 (SKERR_I2C_E015+1)
82#define SKERR_I2C_E016MSG "TWSI: active transfer does not complete"
83
84/*
85 * Define Timeout values
86 */
87#define SK_I2C_TIM_LONG 2000000L /* 2 seconds */
88#define SK_I2C_TIM_SHORT 100000L /* 100 milliseconds */
89#define SK_I2C_TIM_WATCH 1000000L /* 1 second */
90
91/*
92 * Define trap and error log hold times
93 */
94#ifndef SK_SEN_ERR_TR_HOLD
95#define SK_SEN_ERR_TR_HOLD (4*SK_TICKS_PER_SEC)
96#endif
97#ifndef SK_SEN_ERR_LOG_HOLD
98#define SK_SEN_ERR_LOG_HOLD (60*SK_TICKS_PER_SEC)
99#endif
100#ifndef SK_SEN_WARN_TR_HOLD
101#define SK_SEN_WARN_TR_HOLD (15*SK_TICKS_PER_SEC)
102#endif
103#ifndef SK_SEN_WARN_LOG_HOLD
104#define SK_SEN_WARN_LOG_HOLD (15*60*SK_TICKS_PER_SEC)
105#endif
106
107/*
108 * Defines for SenType
109 */
110#define SK_SEN_UNKNOWN 0
111#define SK_SEN_TEMP 1
112#define SK_SEN_VOLT 2
113#define SK_SEN_FAN 3
114
115/*
116 * Define for the SenErrorFlag
117 */
118#define SK_SEN_ERR_NOT_PRESENT 0 /* Error Flag: Sensor not present */
119#define SK_SEN_ERR_OK 1 /* Error Flag: O.K. */
120#define SK_SEN_ERR_WARN 2 /* Error Flag: Warning */
121#define SK_SEN_ERR_ERR 3 /* Error Flag: Error */
122#define SK_SEN_ERR_FAULTY 4 /* Error Flag: Faulty */
123
124/*
125 * Define the Sensor struct
126 */
127struct s_Sensor {
128 char *SenDesc; /* Description */
129 int SenType; /* Voltage or Temperature */
130 SK_I32 SenValue; /* Current value of the sensor */
131 SK_I32 SenThreErrHigh; /* High error Threshhold of this sensor */
132 SK_I32 SenThreWarnHigh; /* High warning Threshhold of this sensor */
133 SK_I32 SenThreErrLow; /* Lower error Threshold of the sensor */
134 SK_I32 SenThreWarnLow; /* Lower warning Threshold of the sensor */
135 int SenErrFlag; /* Sensor indicated an error */
136 SK_BOOL SenInit; /* Is sensor initialized ? */
137 SK_U64 SenErrCts; /* Error trap counter */
138 SK_U64 SenWarnCts; /* Warning trap counter */
139 SK_U64 SenBegErrTS; /* Begin error timestamp */
140 SK_U64 SenBegWarnTS; /* Begin warning timestamp */
141 SK_U64 SenLastErrTrapTS; /* Last error trap timestamp */
142 SK_U64 SenLastErrLogTS; /* Last error log timestamp */
143 SK_U64 SenLastWarnTrapTS; /* Last warning trap timestamp */
144 SK_U64 SenLastWarnLogTS; /* Last warning log timestamp */
145 int SenState; /* Sensor State (see HW specific include) */
146 int (*SenRead)(SK_AC *pAC, SK_IOC IoC, struct s_Sensor *pSen);
147 /* Sensors read function */
148 SK_U16 SenReg; /* Register Address for this sensor */
149 SK_U8 SenDev; /* Device Selection for this sensor */
150};
151
152typedef struct s_I2c {
153 SK_SENSOR SenTable[SK_MAX_SENSORS]; /* Sensor Table */
154 int CurrSens; /* Which sensor is currently queried */
155 int MaxSens; /* Max. number of sensors */
156 int TimerMode; /* Use the timer also to watch the state machine */
157 int InitLevel; /* Initialized Level */
158#ifndef SK_DIAG
159 int DummyReads; /* Number of non-checked dummy reads */
160 SK_TIMER SenTimer; /* Sensors timer */
161#endif /* !SK_DIAG */
162} SK_I2C;
163
164extern int SkI2cInit(SK_AC *pAC, SK_IOC IoC, int Level);
165#ifdef SK_DIAG
166extern SK_U32 SkI2cRead(SK_AC *pAC, SK_IOC IoC, int Dev, int Size, int Reg,
167 int Burst);
168#else /* !SK_DIAG */
169extern int SkI2cEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event, SK_EVPARA Para);
170extern void SkI2cWaitIrq(SK_AC *pAC, SK_IOC IoC);
171extern void SkI2cIsr(SK_AC *pAC, SK_IOC IoC);
172#endif /* !SK_DIAG */
173#endif /* n_SKI2C_H */
174
diff --git a/drivers/net/sk98lin/h/skqueue.h b/drivers/net/sk98lin/h/skqueue.h
new file mode 100644
index 0000000000..2ec40d4fdf
--- /dev/null
+++ b/drivers/net/sk98lin/h/skqueue.h
@@ -0,0 +1,94 @@
1/******************************************************************************
2 *
3 * Name: skqueue.h
4 * Project: Gigabit Ethernet Adapters, Event Scheduler Module
5 * Version: $Revision: 1.16 $
6 * Date: $Date: 2003/09/16 12:50:32 $
7 * Purpose: Defines for the Event queue
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/*
26 * SKQUEUE.H contains all defines and types for the event queue
27 */
28
29#ifndef _SKQUEUE_H_
30#define _SKQUEUE_H_
31
32
33/*
34 * define the event classes to be served
35 */
36#define SKGE_DRV 1 /* Driver Event Class */
37#define SKGE_RLMT 2 /* RLMT Event Class */
38#define SKGE_I2C 3 /* I2C Event Class */
39#define SKGE_PNMI 4 /* PNMI Event Class */
40#define SKGE_CSUM 5 /* Checksum Event Class */
41#define SKGE_HWAC 6 /* Hardware Access Event Class */
42
43#define SKGE_SWT 9 /* Software Timer Event Class */
44#define SKGE_LACP 10 /* LACP Aggregation Event Class */
45#define SKGE_RSF 11 /* RSF Aggregation Event Class */
46#define SKGE_MARKER 12 /* MARKER Aggregation Event Class */
47#define SKGE_FD 13 /* FD Distributor Event Class */
48
49/*
50 * define event queue as circular buffer
51 */
52#define SK_MAX_EVENT 64
53
54/*
55 * Parameter union for the Para stuff
56 */
57typedef union u_EvPara {
58 void *pParaPtr; /* Parameter Pointer */
59 SK_U64 Para64; /* Parameter 64bit version */
60 SK_U32 Para32[2]; /* Parameter Array of 32bit parameters */
61} SK_EVPARA;
62
63/*
64 * Event Queue
65 * skqueue.c
66 * events are class/value pairs
67 * class is addressee, e.g. RLMT, PNMI etc.
68 * value is command, e.g. line state change, ring op change etc.
69 */
70typedef struct s_EventElem {
71 SK_U32 Class; /* Event class */
72 SK_U32 Event; /* Event value */
73 SK_EVPARA Para; /* Event parameter */
74} SK_EVENTELEM;
75
76typedef struct s_Queue {
77 SK_EVENTELEM EvQueue[SK_MAX_EVENT];
78 SK_EVENTELEM *EvPut;
79 SK_EVENTELEM *EvGet;
80} SK_QUEUE;
81
82extern void SkEventInit(SK_AC *pAC, SK_IOC Ioc, int Level);
83extern void SkEventQueue(SK_AC *pAC, SK_U32 Class, SK_U32 Event,
84 SK_EVPARA Para);
85extern int SkEventDispatcher(SK_AC *pAC, SK_IOC Ioc);
86
87
88/* Define Error Numbers and messages */
89#define SKERR_Q_E001 (SK_ERRBASE_QUEUE+0)
90#define SKERR_Q_E001MSG "Event queue overflow"
91#define SKERR_Q_E002 (SKERR_Q_E001+1)
92#define SKERR_Q_E002MSG "Undefined event class"
93#endif /* _SKQUEUE_H_ */
94
diff --git a/drivers/net/sk98lin/h/skrlmt.h b/drivers/net/sk98lin/h/skrlmt.h
new file mode 100644
index 0000000000..ca75dfdcf2
--- /dev/null
+++ b/drivers/net/sk98lin/h/skrlmt.h
@@ -0,0 +1,438 @@
1/******************************************************************************
2 *
3 * Name: skrlmt.h
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.37 $
6 * Date: $Date: 2003/04/15 09:43:43 $
7 * Purpose: Header file for Redundant Link ManagemenT.
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/******************************************************************************
26 *
27 * Description:
28 *
29 * This is the header file for Redundant Link ManagemenT.
30 *
31 * Include File Hierarchy:
32 *
33 * "skdrv1st.h"
34 * ...
35 * "sktypes.h"
36 * "skqueue.h"
37 * "skaddr.h"
38 * "skrlmt.h"
39 * ...
40 * "skdrv2nd.h"
41 *
42 ******************************************************************************/
43
44#ifndef __INC_SKRLMT_H
45#define __INC_SKRLMT_H
46
47#ifdef __cplusplus
48extern "C" {
49#endif /* cplusplus */
50
51/* defines ********************************************************************/
52
53#define SK_RLMT_NET_DOWN_TEMP 1 /* NET_DOWN due to last port down. */
54#define SK_RLMT_NET_DOWN_FINAL 2 /* NET_DOWN due to RLMT_STOP. */
55
56/* ----- Default queue sizes - must be multiples of 8 KB ----- */
57
58/* Less than 8 KB free in RX queue => pause frames. */
59#define SK_RLMT_STANDBY_QRXSIZE 128 /* Size of rx standby queue in KB. */
60#define SK_RLMT_STANDBY_QXASIZE 32 /* Size of async standby queue in KB. */
61#define SK_RLMT_STANDBY_QXSSIZE 0 /* Size of sync standby queue in KB. */
62
63#define SK_RLMT_MAX_TX_BUF_SIZE 60 /* Maximum RLMT transmit size. */
64
65/* ----- PORT states ----- */
66
67#define SK_RLMT_PS_INIT 0 /* Port state: Init. */
68#define SK_RLMT_PS_LINK_DOWN 1 /* Port state: Link down. */
69#define SK_RLMT_PS_DOWN 2 /* Port state: Port down. */
70#define SK_RLMT_PS_GOING_UP 3 /* Port state: Going up. */
71#define SK_RLMT_PS_UP 4 /* Port state: Up. */
72
73/* ----- RLMT states ----- */
74
75#define SK_RLMT_RS_INIT 0 /* RLMT state: Init. */
76#define SK_RLMT_RS_NET_DOWN 1 /* RLMT state: Net down. */
77#define SK_RLMT_RS_NET_UP 2 /* RLMT state: Net up. */
78
79/* ----- PORT events ----- */
80
81#define SK_RLMT_LINK_UP 1001 /* Link came up. */
82#define SK_RLMT_LINK_DOWN 1002 /* Link went down. */
83#define SK_RLMT_PORT_ADDR 1003 /* Port address changed. */
84
85/* ----- RLMT events ----- */
86
87#define SK_RLMT_START 2001 /* Start RLMT. */
88#define SK_RLMT_STOP 2002 /* Stop RLMT. */
89#define SK_RLMT_PACKET_RECEIVED 2003 /* Packet was received for RLMT. */
90#define SK_RLMT_STATS_CLEAR 2004 /* Clear statistics. */
91#define SK_RLMT_STATS_UPDATE 2005 /* Update statistics. */
92#define SK_RLMT_PREFPORT_CHANGE 2006 /* Change preferred port. */
93#define SK_RLMT_MODE_CHANGE 2007 /* New RlmtMode. */
94#define SK_RLMT_SET_NETS 2008 /* Number of Nets (1 or 2). */
95
96/* ----- RLMT mode bits ----- */
97
98/*
99 * CAUTION: These defines are private to RLMT.
100 * Please use the RLMT mode defines below.
101 */
102
103#define SK_RLMT_CHECK_LINK 1 /* Check Link. */
104#define SK_RLMT_CHECK_LOC_LINK 2 /* Check other link on same adapter. */
105#define SK_RLMT_CHECK_SEG 4 /* Check segmentation. */
106
107#ifndef RLMT_CHECK_REMOTE
108#define SK_RLMT_CHECK_OTHERS SK_RLMT_CHECK_LOC_LINK
109#else /* RLMT_CHECK_REMOTE */
110#define SK_RLMT_CHECK_REM_LINK 8 /* Check link(s) on other adapter(s). */
111#define SK_RLMT_MAX_REMOTE_PORTS_CHECKED 3
112#define SK_RLMT_CHECK_OTHERS \
113 (SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_REM_LINK)
114#endif /* RLMT_CHECK_REMOTE */
115
116#ifndef SK_RLMT_ENABLE_TRANSPARENT
117#define SK_RLMT_TRANSPARENT 0 /* RLMT transparent - inactive. */
118#else /* SK_RLMT_ENABLE_TRANSPARENT */
119#define SK_RLMT_TRANSPARENT 128 /* RLMT transparent. */
120#endif /* SK_RLMT_ENABLE_TRANSPARENT */
121
122/* ----- RLMT modes ----- */
123
124/* Check Link State. */
125#define SK_RLMT_MODE_CLS (SK_RLMT_CHECK_LINK)
126
127/* Check Local Ports: check other links on the same adapter. */
128#define SK_RLMT_MODE_CLP (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK)
129
130/* Check Local Ports and Segmentation Status. */
131#define SK_RLMT_MODE_CLPSS \
132 (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_SEG)
133
134#ifdef RLMT_CHECK_REMOTE
135/* Check Local and Remote Ports: check links (local or remote). */
136 Name of define TBD!
137#define SK_RLMT_MODE_CRP \
138 (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_REM_LINK)
139
140/* Check Local and Remote Ports and Segmentation Status. */
141 Name of define TBD!
142#define SK_RLMT_MODE_CRPSS \
143 (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK | \
144 SK_RLMT_CHECK_REM_LINK | SK_RLMT_CHECK_SEG)
145#endif /* RLMT_CHECK_REMOTE */
146
147/* ----- RLMT lookahead result bits ----- */
148
149#define SK_RLMT_RX_RLMT 1 /* Give packet to RLMT. */
150#define SK_RLMT_RX_PROTOCOL 2 /* Give packet to protocol. */
151
152/* Macros */
153
154#if 0
155SK_AC *pAC /* adapter context */
156SK_U32 PortNum /* receiving port */
157unsigned PktLen /* received packet's length */
158SK_BOOL IsBc /* Flag: packet is broadcast */
159unsigned *pOffset /* offs. of bytes to present to SK_RLMT_LOOKAHEAD */
160unsigned *pNumBytes /* #Bytes to present to SK_RLMT_LOOKAHEAD */
161#endif /* 0 */
162
163#define SK_RLMT_PRE_LOOKAHEAD(pAC,PortNum,PktLen,IsBc,pOffset,pNumBytes) { \
164 SK_AC *_pAC; \
165 SK_U32 _PortNum; \
166 _pAC = (pAC); \
167 _PortNum = (SK_U32)(PortNum); \
168 /* _pAC->Rlmt.Port[_PortNum].PacketsRx++; */ \
169 _pAC->Rlmt.Port[_PortNum].PacketsPerTimeSlot++; \
170 if (_pAC->Rlmt.RlmtOff) { \
171 *(pNumBytes) = 0; \
172 } \
173 else {\
174 if ((_pAC->Rlmt.Port[_PortNum].Net->RlmtMode & SK_RLMT_TRANSPARENT) != 0) { \
175 *(pNumBytes) = 0; \
176 } \
177 else if (IsBc) { \
178 if (_pAC->Rlmt.Port[_PortNum].Net->RlmtMode != SK_RLMT_MODE_CLS) { \
179 *(pNumBytes) = 6; \
180 *(pOffset) = 6; \
181 } \
182 else { \
183 *(pNumBytes) = 0; \
184 } \
185 } \
186 else { \
187 if ((PktLen) > SK_RLMT_MAX_TX_BUF_SIZE) { \
188 /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
189 *(pNumBytes) = 0; \
190 } \
191 else { \
192 *(pNumBytes) = 6; \
193 *(pOffset) = 0; \
194 } \
195 } \
196 } \
197}
198
199#if 0
200SK_AC *pAC /* adapter context */
201SK_U32 PortNum /* receiving port */
202SK_U8 *pLaPacket, /* received packet's data (points to pOffset) */
203SK_BOOL IsBc /* Flag: packet is broadcast */
204SK_BOOL IsMc /* Flag: packet is multicast */
205unsigned *pForRlmt /* Result: bits SK_RLMT_RX_RLMT, SK_RLMT_RX_PROTOCOL */
206SK_RLMT_LOOKAHEAD() expects *pNumBytes from
207packet offset *pOffset (s.a.) at *pLaPacket.
208
209If you use SK_RLMT_LOOKAHEAD in a path where you already know if the packet is
210BC, MC, or UC, you should use constants for IsBc and IsMc, so that your compiler
211can trash unneeded parts of the if construction.
212#endif /* 0 */
213
214#define SK_RLMT_LOOKAHEAD(pAC,PortNum,pLaPacket,IsBc,IsMc,pForRlmt) { \
215 SK_AC *_pAC; \
216 SK_U32 _PortNum; \
217 SK_U8 *_pLaPacket; \
218 _pAC = (pAC); \
219 _PortNum = (SK_U32)(PortNum); \
220 _pLaPacket = (SK_U8 *)(pLaPacket); \
221 if (IsBc) {\
222 if (!SK_ADDR_EQUAL(_pLaPacket, _pAC->Addr.Net[_pAC->Rlmt.Port[ \
223 _PortNum].Net->NetNumber].CurrentMacAddress.a)) { \
224 _pAC->Rlmt.Port[_PortNum].BcTimeStamp = SkOsGetTime(_pAC); \
225 _pAC->Rlmt.CheckSwitch = SK_TRUE; \
226 } \
227 /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
228 *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \
229 } \
230 else if (IsMc) { \
231 if (SK_ADDR_EQUAL(_pLaPacket, BridgeMcAddr.a)) { \
232 _pAC->Rlmt.Port[_PortNum].BpduPacketsPerTimeSlot++; \
233 if (_pAC->Rlmt.Port[_PortNum].Net->RlmtMode & SK_RLMT_CHECK_SEG) { \
234 *(pForRlmt) = SK_RLMT_RX_RLMT | SK_RLMT_RX_PROTOCOL; \
235 } \
236 else { \
237 *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \
238 } \
239 } \
240 else if (SK_ADDR_EQUAL(_pLaPacket, SkRlmtMcAddr.a)) { \
241 *(pForRlmt) = SK_RLMT_RX_RLMT; \
242 } \
243 else { \
244 /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
245 *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \
246 } \
247 } \
248 else { \
249 if (SK_ADDR_EQUAL( \
250 _pLaPacket, \
251 _pAC->Addr.Port[_PortNum].CurrentMacAddress.a)) { \
252 *(pForRlmt) = SK_RLMT_RX_RLMT; \
253 } \
254 else { \
255 /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
256 *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \
257 } \
258 } \
259}
260
261#ifdef SK_RLMT_FAST_LOOKAHEAD
262Error: SK_RLMT_FAST_LOOKAHEAD no longer used. Use new macros for lookahead.
263#endif /* SK_RLMT_FAST_LOOKAHEAD */
264#ifdef SK_RLMT_SLOW_LOOKAHEAD
265Error: SK_RLMT_SLOW_LOOKAHEAD no longer used. Use new macros for lookahead.
266#endif /* SK_RLMT_SLOW_LOOKAHEAD */
267
268/* typedefs *******************************************************************/
269
270#ifdef SK_RLMT_MBUF_PRIVATE
271typedef struct s_RlmtMbuf {
272 some content
273} SK_RLMT_MBUF;
274#endif /* SK_RLMT_MBUF_PRIVATE */
275
276
277#ifdef SK_LA_INFO
278typedef struct s_Rlmt_PacketInfo {
279 unsigned PacketLength; /* Length of packet. */
280 unsigned PacketType; /* Directed/Multicast/Broadcast. */
281} SK_RLMT_PINFO;
282#endif /* SK_LA_INFO */
283
284
285typedef struct s_RootId {
286 SK_U8 Id[8]; /* Root Bridge Id. */
287} SK_RLMT_ROOT_ID;
288
289
290typedef struct s_port {
291 SK_MAC_ADDR CheckAddr;
292 SK_BOOL SuspectTx;
293} SK_PORT_CHECK;
294
295
296typedef struct s_RlmtNet SK_RLMT_NET;
297
298
299typedef struct s_RlmtPort {
300
301/* ----- Public part (read-only) ----- */
302
303 SK_U8 PortState; /* Current state of this port. */
304
305 /* For PNMI */
306 SK_BOOL LinkDown;
307 SK_BOOL PortDown;
308 SK_U8 Align01;
309
310 SK_U32 PortNumber; /* Number of port on adapter. */
311 SK_RLMT_NET * Net; /* Net port belongs to. */
312
313 SK_U64 TxHelloCts;
314 SK_U64 RxHelloCts;
315 SK_U64 TxSpHelloReqCts;
316 SK_U64 RxSpHelloCts;
317
318/* ----- Private part ----- */
319
320/* SK_U64 PacketsRx; */ /* Total packets received. */
321 SK_U32 PacketsPerTimeSlot; /* Packets rxed between TOs. */
322/* SK_U32 DataPacketsPerTimeSlot; */ /* Data packets ... */
323 SK_U32 BpduPacketsPerTimeSlot; /* BPDU packets rxed in TS. */
324 SK_U64 BcTimeStamp; /* Time of last BC receive. */
325 SK_U64 GuTimeStamp; /* Time of entering GOING_UP. */
326
327 SK_TIMER UpTimer; /* Timer struct Link/Port up. */
328 SK_TIMER DownRxTimer; /* Timer struct down rx. */
329 SK_TIMER DownTxTimer; /* Timer struct down tx. */
330
331 SK_U32 CheckingState; /* Checking State. */
332
333 SK_ADDR_PORT * AddrPort;
334
335 SK_U8 Random[4]; /* Random value. */
336 unsigned PortsChecked; /* #ports checked. */
337 unsigned PortsSuspect; /* #ports checked that are s. */
338 SK_PORT_CHECK PortCheck[1];
339/* SK_PORT_CHECK PortCheck[SK_MAX_MACS - 1]; */
340
341 SK_BOOL PortStarted; /* Port is started. */
342 SK_BOOL PortNoRx; /* NoRx for >= 1 time slot. */
343 SK_BOOL RootIdSet;
344 SK_RLMT_ROOT_ID Root; /* Root Bridge Id. */
345} SK_RLMT_PORT;
346
347
348struct s_RlmtNet {
349
350/* ----- Public part (read-only) ----- */
351
352 SK_U32 NetNumber; /* Number of net. */
353
354 SK_RLMT_PORT * Port[SK_MAX_MACS]; /* Ports that belong to this net. */
355 SK_U32 NumPorts; /* Number of ports. */
356 SK_U32 PrefPort; /* Preferred port. */
357
358 /* For PNMI */
359
360 SK_U32 ChgBcPrio; /* Change Priority of last broadcast received */
361 SK_U32 RlmtMode; /* Check ... */
362 SK_U32 ActivePort; /* Active port. */
363 SK_U32 Preference; /* 0xFFFFFFFF: Automatic. */
364
365 SK_U8 RlmtState; /* Current RLMT state. */
366
367/* ----- Private part ----- */
368 SK_BOOL RootIdSet;
369 SK_U16 Align01;
370
371 int LinksUp; /* #Links up. */
372 int PortsUp; /* #Ports up. */
373 SK_U32 TimeoutValue; /* RLMT timeout value. */
374
375 SK_U32 CheckingState; /* Checking State. */
376 SK_RLMT_ROOT_ID Root; /* Root Bridge Id. */
377
378 SK_TIMER LocTimer; /* Timer struct. */
379 SK_TIMER SegTimer; /* Timer struct. */
380};
381
382
383typedef struct s_Rlmt {
384
385/* ----- Public part (read-only) ----- */
386
387 SK_U32 NumNets; /* Number of nets. */
388 SK_U32 NetsStarted; /* Number of nets started. */
389 SK_RLMT_NET Net[SK_MAX_NETS]; /* Array of available nets. */
390 SK_RLMT_PORT Port[SK_MAX_MACS]; /* Array of available ports. */
391
392/* ----- Private part ----- */
393 SK_BOOL CheckSwitch;
394 SK_BOOL RlmtOff; /* set to zero if the Mac addresses
395 are equal or the second one
396 is zero */
397 SK_U16 Align01;
398
399} SK_RLMT;
400
401
402extern SK_MAC_ADDR BridgeMcAddr;
403extern SK_MAC_ADDR SkRlmtMcAddr;
404
405/* function prototypes ********************************************************/
406
407
408#ifndef SK_KR_PROTO
409
410/* Functions provided by SkRlmt */
411
412/* ANSI/C++ compliant function prototypes */
413
414extern void SkRlmtInit(
415 SK_AC *pAC,
416 SK_IOC IoC,
417 int Level);
418
419extern int SkRlmtEvent(
420 SK_AC *pAC,
421 SK_IOC IoC,
422 SK_U32 Event,
423 SK_EVPARA Para);
424
425#else /* defined(SK_KR_PROTO) */
426
427/* Non-ANSI/C++ compliant function prototypes */
428
429#error KR-style function prototypes are not yet provided.
430
431#endif /* defined(SK_KR_PROTO)) */
432
433
434#ifdef __cplusplus
435}
436#endif /* __cplusplus */
437
438#endif /* __INC_SKRLMT_H */
diff --git a/drivers/net/sk98lin/h/sktimer.h b/drivers/net/sk98lin/h/sktimer.h
new file mode 100644
index 0000000000..04e6d7c1ec
--- /dev/null
+++ b/drivers/net/sk98lin/h/sktimer.h
@@ -0,0 +1,63 @@
1/******************************************************************************
2 *
3 * Name: sktimer.h
4 * Project: Gigabit Ethernet Adapters, Event Scheduler Module
5 * Version: $Revision: 1.11 $
6 * Date: $Date: 2003/09/16 12:58:18 $
7 * Purpose: Defines for the timer functions
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/*
26 * SKTIMER.H contains all defines and types for the timer functions
27 */
28
29#ifndef _SKTIMER_H_
30#define _SKTIMER_H_
31
32#include "h/skqueue.h"
33
34/*
35 * SK timer
36 * - needed wherever a timer is used. Put this in your data structure
37 * wherever you want.
38 */
39typedef struct s_Timer SK_TIMER;
40
41struct s_Timer {
42 SK_TIMER *TmNext; /* linked list */
43 SK_U32 TmClass; /* Timer Event class */
44 SK_U32 TmEvent; /* Timer Event value */
45 SK_EVPARA TmPara; /* Timer Event parameter */
46 SK_U32 TmDelta; /* delta time */
47 int TmActive; /* flag: active/inactive */
48};
49
50/*
51 * Timer control struct.
52 * - use in Adapters context name pAC->Tim
53 */
54typedef struct s_TimCtrl {
55 SK_TIMER *StQueue; /* Head of Timer queue */
56} SK_TIMCTRL;
57
58extern void SkTimerInit(SK_AC *pAC, SK_IOC Ioc, int Level);
59extern void SkTimerStop(SK_AC *pAC, SK_IOC Ioc, SK_TIMER *pTimer);
60extern void SkTimerStart(SK_AC *pAC, SK_IOC Ioc, SK_TIMER *pTimer,
61 SK_U32 Time, SK_U32 Class, SK_U32 Event, SK_EVPARA Para);
62extern void SkTimerDone(SK_AC *pAC, SK_IOC Ioc);
63#endif /* _SKTIMER_H_ */
diff --git a/drivers/net/sk98lin/h/sktypes.h b/drivers/net/sk98lin/h/sktypes.h
new file mode 100644
index 0000000000..40edc96e10
--- /dev/null
+++ b/drivers/net/sk98lin/h/sktypes.h
@@ -0,0 +1,69 @@
1/******************************************************************************
2 *
3 * Name: sktypes.h
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.2 $
6 * Date: $Date: 2003/10/07 08:16:51 $
7 * Purpose: Define data types for Linux
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/******************************************************************************
26 *
27 * Description:
28 *
29 * In this file, all data types that are needed by the common modules
30 * are mapped to Linux data types.
31 *
32 *
33 * Include File Hierarchy:
34 *
35 *
36 ******************************************************************************/
37
38#ifndef __INC_SKTYPES_H
39#define __INC_SKTYPES_H
40
41
42/* defines *******************************************************************/
43
44/*
45 * Data types with a specific size. 'I' = signed, 'U' = unsigned.
46 */
47#define SK_I8 s8
48#define SK_U8 u8
49#define SK_I16 s16
50#define SK_U16 u16
51#define SK_I32 s32
52#define SK_U32 u32
53#define SK_I64 s64
54#define SK_U64 u64
55
56#define SK_UPTR ulong /* casting pointer <-> integral */
57
58/*
59* Boolean type.
60*/
61#define SK_BOOL SK_U8
62#define SK_FALSE 0
63#define SK_TRUE (!SK_FALSE)
64
65/* typedefs *******************************************************************/
66
67/* function prototypes ********************************************************/
68
69#endif /* __INC_SKTYPES_H */
diff --git a/drivers/net/sk98lin/h/skversion.h b/drivers/net/sk98lin/h/skversion.h
new file mode 100644
index 0000000000..a1a7294828
--- /dev/null
+++ b/drivers/net/sk98lin/h/skversion.h
@@ -0,0 +1,38 @@
1/******************************************************************************
2 *
3 * Name: version.h
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.5 $
6 * Date: $Date: 2003/10/07 08:16:51 $
7 * Purpose: SK specific Error log support
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25#ifdef lint
26static const char SysKonnectFileId[] = "@(#) (C) SysKonnect GmbH.";
27static const char SysKonnectBuildNumber[] =
28 "@(#)SK-BUILD: 6.23 PL: 01";
29#endif /* !defined(lint) */
30
31#define BOOT_STRING "sk98lin: Network Device Driver v6.23\n" \
32 "(C)Copyright 1999-2004 Marvell(R)."
33
34#define VER_STRING "6.23"
35#define DRIVER_FILE_NAME "sk98lin"
36#define DRIVER_REL_DATE "Feb-13-2004"
37
38
diff --git a/drivers/net/sk98lin/h/skvpd.h b/drivers/net/sk98lin/h/skvpd.h
new file mode 100644
index 0000000000..fdd9e48e80
--- /dev/null
+++ b/drivers/net/sk98lin/h/skvpd.h
@@ -0,0 +1,248 @@
1/******************************************************************************
2 *
3 * Name: skvpd.h
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.15 $
6 * Date: $Date: 2003/01/13 10:39:38 $
7 * Purpose: Defines and Macros for VPD handling
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2003 SysKonnect GmbH.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * The information in this file is provided "AS IS" without warranty.
21 *
22 ******************************************************************************/
23
24/*
25 * skvpd.h contains Diagnostic specific defines for VPD handling
26 */
27
28#ifndef __INC_SKVPD_H_
29#define __INC_SKVPD_H_
30
31/*
32 * Define Resource Type Identifiers and VPD keywords
33 */
34#define RES_ID 0x82 /* Resource Type ID String (Product Name) */
35#define RES_VPD_R 0x90 /* start of VPD read only area */
36#define RES_VPD_W 0x91 /* start of VPD read/write area */
37#define RES_END 0x78 /* Resource Type End Tag */
38
39#ifndef VPD_NAME
40#define VPD_NAME "Name" /* Product Name, VPD name of RES_ID */
41#endif /* VPD_NAME */
42#define VPD_PN "PN" /* Adapter Part Number */
43#define VPD_EC "EC" /* Adapter Engineering Level */
44#define VPD_MN "MN" /* Manufacture ID */
45#define VPD_SN "SN" /* Serial Number */
46#define VPD_CP "CP" /* Extended Capability */
47#define VPD_RV "RV" /* Checksum and Reserved */
48#define VPD_YA "YA" /* Asset Tag Identifier */
49#define VPD_VL "VL" /* First Error Log Message (SK specific) */
50#define VPD_VF "VF" /* Second Error Log Message (SK specific) */
51#define VPD_RW "RW" /* Remaining Read / Write Area */
52
53/* 'type' values for vpd_setup_para() */
54#define VPD_RO_KEY 1 /* RO keys are "PN", "EC", "MN", "SN", "RV" */
55#define VPD_RW_KEY 2 /* RW keys are "Yx", "Vx", and "RW" */
56
57/* 'op' values for vpd_setup_para() */
58#define ADD_KEY 1 /* add the key at the pos "RV" or "RW" */
59#define OWR_KEY 2 /* overwrite key if already exists */
60
61/*
62 * Define READ and WRITE Constants.
63 */
64
65#define VPD_DEV_ID_GENESIS 0x4300
66
67#define VPD_SIZE_YUKON 256
68#define VPD_SIZE_GENESIS 512
69#define VPD_SIZE 512
70#define VPD_READ 0x0000
71#define VPD_WRITE 0x8000
72
73#define VPD_STOP(pAC,IoC) VPD_OUT16(pAC,IoC,PCI_VPD_ADR_REG,VPD_WRITE)
74
75#define VPD_GET_RES_LEN(p) ((unsigned int) \
76 (* (SK_U8 *)&(p)[1]) |\
77 ((* (SK_U8 *)&(p)[2]) << 8))
78#define VPD_GET_VPD_LEN(p) ((unsigned int)(* (SK_U8 *)&(p)[2]))
79#define VPD_GET_VAL(p) ((char *)&(p)[3])
80
81#define VPD_MAX_LEN 50
82
83/* VPD status */
84 /* bit 7..1 reserved */
85#define VPD_VALID (1<<0) /* VPD data buffer, vpd_free_ro, */
86 /* and vpd_free_rw valid */
87
88/*
89 * VPD structs
90 */
91typedef struct s_vpd_status {
92 unsigned short Align01; /* Alignment */
93 unsigned short vpd_status; /* VPD status, description see above */
94 int vpd_free_ro; /* unused bytes in read only area */
95 int vpd_free_rw; /* bytes available in read/write area */
96} SK_VPD_STATUS;
97
98typedef struct s_vpd {
99 SK_VPD_STATUS v; /* VPD status structure */
100 char vpd_buf[VPD_SIZE]; /* VPD buffer */
101 int rom_size; /* VPD ROM Size from PCI_OUR_REG_2 */
102 int vpd_size; /* saved VPD-size */
103} SK_VPD;
104
105typedef struct s_vpd_para {
106 unsigned int p_len; /* parameter length */
107 char *p_val; /* points to the value */
108} SK_VPD_PARA;
109
110/*
111 * structure of Large Resource Type Identifiers
112 */
113
114/* was removed because of alignment problems */
115
116/*
117 * structure of VPD keywords
118 */
119typedef struct s_vpd_key {
120 char p_key[2]; /* 2 bytes ID string */
121 unsigned char p_len; /* 1 byte length */
122 char p_val; /* start of the value string */
123} SK_VPD_KEY;
124
125
126/*
127 * System specific VPD macros
128 */
129#ifndef SKDIAG
130#ifndef VPD_DO_IO
131#define VPD_OUT8(pAC,IoC,Addr,Val) (void)SkPciWriteCfgByte(pAC,Addr,Val)
132#define VPD_OUT16(pAC,IoC,Addr,Val) (void)SkPciWriteCfgWord(pAC,Addr,Val)
133#define VPD_IN8(pAC,IoC,Addr,pVal) (void)SkPciReadCfgByte(pAC,Addr,pVal)
134#define VPD_IN16(pAC,IoC,Addr,pVal) (void)SkPciReadCfgWord(pAC,Addr,pVal)
135#define VPD_IN32(pAC,IoC,Addr,pVal) (void)SkPciReadCfgDWord(pAC,Addr,pVal)
136#else /* VPD_DO_IO */
137#define VPD_OUT8(pAC,IoC,Addr,Val) SK_OUT8(IoC,PCI_C(Addr),Val)
138#define VPD_OUT16(pAC,IoC,Addr,Val) SK_OUT16(IoC,PCI_C(Addr),Val)
139#define VPD_IN8(pAC,IoC,Addr,pVal) SK_IN8(IoC,PCI_C(Addr),pVal)
140#define VPD_IN16(pAC,IoC,Addr,pVal) SK_IN16(IoC,PCI_C(Addr),pVal)
141#define VPD_IN32(pAC,IoC,Addr,pVal) SK_IN32(IoC,PCI_C(Addr),pVal)
142#endif /* VPD_DO_IO */
143#else /* SKDIAG */
144#define VPD_OUT8(pAC,Ioc,Addr,Val) { \
145 if ((pAC)->DgT.DgUseCfgCycle) \
146 SkPciWriteCfgByte(pAC,Addr,Val); \
147 else \
148 SK_OUT8(pAC,PCI_C(Addr),Val); \
149 }
150#define VPD_OUT16(pAC,Ioc,Addr,Val) { \
151 if ((pAC)->DgT.DgUseCfgCycle) \
152 SkPciWriteCfgWord(pAC,Addr,Val); \
153 else \
154 SK_OUT16(pAC,PCI_C(Addr),Val); \
155 }
156#define VPD_IN8(pAC,Ioc,Addr,pVal) { \
157 if ((pAC)->DgT.DgUseCfgCycle) \
158 SkPciReadCfgByte(pAC,Addr,pVal); \
159 else \
160 SK_IN8(pAC,PCI_C(Addr),pVal); \
161 }
162#define VPD_IN16(pAC,Ioc,Addr,pVal) { \
163 if ((pAC)->DgT.DgUseCfgCycle) \
164 SkPciReadCfgWord(pAC,Addr,pVal); \
165 else \
166 SK_IN16(pAC,PCI_C(Addr),pVal); \
167 }
168#define VPD_IN32(pAC,Ioc,Addr,pVal) { \
169 if ((pAC)->DgT.DgUseCfgCycle) \
170 SkPciReadCfgDWord(pAC,Addr,pVal); \
171 else \
172 SK_IN32(pAC,PCI_C(Addr),pVal); \
173 }
174#endif /* nSKDIAG */
175
176/* function prototypes ********************************************************/
177
178#ifndef SK_KR_PROTO
179#ifdef SKDIAG
180extern SK_U32 VpdReadDWord(
181 SK_AC *pAC,
182 SK_IOC IoC,
183 int addr);
184#endif /* SKDIAG */
185
186extern SK_VPD_STATUS *VpdStat(
187 SK_AC *pAC,
188 SK_IOC IoC);
189
190extern int VpdKeys(
191 SK_AC *pAC,
192 SK_IOC IoC,
193 char *buf,
194 int *len,
195 int *elements);
196
197extern int VpdRead(
198 SK_AC *pAC,
199 SK_IOC IoC,
200 const char *key,
201 char *buf,
202 int *len);
203
204extern SK_BOOL VpdMayWrite(
205 char *key);
206
207extern int VpdWrite(
208 SK_AC *pAC,
209 SK_IOC IoC,
210 const char *key,
211 const char *buf);
212
213extern int VpdDelete(
214 SK_AC *pAC,
215 SK_IOC IoC,
216 char *key);
217
218extern int VpdUpdate(
219 SK_AC *pAC,
220 SK_IOC IoC);
221
222#ifdef SKDIAG
223extern int VpdReadBlock(
224 SK_AC *pAC,
225 SK_IOC IoC,
226 char *buf,
227 int addr,
228 int len);
229
230extern int VpdWriteBlock(
231 SK_AC *pAC,
232 SK_IOC IoC,
233 char *buf,
234 int addr,
235 int len);
236#endif /* SKDIAG */
237#else /* SK_KR_PROTO */
238extern SK_U32 VpdReadDWord();
239extern SK_VPD_STATUS *VpdStat();
240extern int VpdKeys();
241extern int VpdRead();
242extern SK_BOOL VpdMayWrite();
243extern int VpdWrite();
244extern int VpdDelete();
245extern int VpdUpdate();
246#endif /* SK_KR_PROTO */
247
248#endif /* __INC_SKVPD_H_ */
diff --git a/drivers/net/sk98lin/h/xmac_ii.h b/drivers/net/sk98lin/h/xmac_ii.h
new file mode 100644
index 0000000000..7f8e6d0084
--- /dev/null
+++ b/drivers/net/sk98lin/h/xmac_ii.h
@@ -0,0 +1,1579 @@
1/******************************************************************************
2 *
3 * Name: xmac_ii.h
4 * Project: Gigabit Ethernet Adapters, Common Modules
5 * Version: $Revision: 1.52 $
6 * Date: $Date: 2003/10/02 16:35:50 $
7 * Purpose: Defines and Macros for Gigabit Ethernet Controller
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25#ifndef __INC_XMAC_H
26#define __INC_XMAC_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif /* __cplusplus */
31
32/* defines ********************************************************************/
33
34/*
35 * XMAC II registers
36 *
37 * The XMAC registers are 16 or 32 bits wide.
38 * The XMACs host processor interface is set to 16 bit mode,
39 * therefore ALL registers will be addressed with 16 bit accesses.
40 *
41 * The following macros are provided to access the XMAC registers
42 * XM_IN16(), XM_OUT16, XM_IN32(), XM_OUT32(), XM_INADR(), XM_OUTADR(),
43 * XM_INHASH(), and XM_OUTHASH().
44 * The macros are defined in SkGeHw.h.
45 *
46 * Note: NA reg = Network Address e.g DA, SA etc.
47 *
48 */
49#define XM_MMU_CMD 0x0000 /* 16 bit r/w MMU Command Register */
50 /* 0x0004: reserved */
51#define XM_POFF 0x0008 /* 32 bit r/w Packet Offset Register */
52#define XM_BURST 0x000c /* 32 bit r/w Burst Register for half duplex*/
53#define XM_1L_VLAN_TAG 0x0010 /* 16 bit r/w One Level VLAN Tag ID */
54#define XM_2L_VLAN_TAG 0x0014 /* 16 bit r/w Two Level VLAN Tag ID */
55 /* 0x0018 - 0x001e: reserved */
56#define XM_TX_CMD 0x0020 /* 16 bit r/w Transmit Command Register */
57#define XM_TX_RT_LIM 0x0024 /* 16 bit r/w Transmit Retry Limit Register */
58#define XM_TX_STIME 0x0028 /* 16 bit r/w Transmit Slottime Register */
59#define XM_TX_IPG 0x002c /* 16 bit r/w Transmit Inter Packet Gap */
60#define XM_RX_CMD 0x0030 /* 16 bit r/w Receive Command Register */
61#define XM_PHY_ADDR 0x0034 /* 16 bit r/w PHY Address Register */
62#define XM_PHY_DATA 0x0038 /* 16 bit r/w PHY Data Register */
63 /* 0x003c: reserved */
64#define XM_GP_PORT 0x0040 /* 32 bit r/w General Purpose Port Register */
65#define XM_IMSK 0x0044 /* 16 bit r/w Interrupt Mask Register */
66#define XM_ISRC 0x0048 /* 16 bit r/o Interrupt Status Register */
67#define XM_HW_CFG 0x004c /* 16 bit r/w Hardware Config Register */
68 /* 0x0050 - 0x005e: reserved */
69#define XM_TX_LO_WM 0x0060 /* 16 bit r/w Tx FIFO Low Water Mark */
70#define XM_TX_HI_WM 0x0062 /* 16 bit r/w Tx FIFO High Water Mark */
71#define XM_TX_THR 0x0064 /* 16 bit r/w Tx Request Threshold */
72#define XM_HT_THR 0x0066 /* 16 bit r/w Host Request Threshold */
73#define XM_PAUSE_DA 0x0068 /* NA reg r/w Pause Destination Address */
74 /* 0x006e: reserved */
75#define XM_CTL_PARA 0x0070 /* 32 bit r/w Control Parameter Register */
76#define XM_MAC_OPCODE 0x0074 /* 16 bit r/w Opcode for MAC control frames */
77#define XM_MAC_PTIME 0x0076 /* 16 bit r/w Pause time for MAC ctrl frames*/
78#define XM_TX_STAT 0x0078 /* 32 bit r/o Tx Status LIFO Register */
79
80 /* 0x0080 - 0x00fc: 16 NA reg r/w Exact Match Address Registers */
81 /* use the XM_EXM() macro to address */
82#define XM_EXM_START 0x0080 /* r/w Start Address of the EXM Regs */
83
84 /*
85 * XM_EXM(Reg)
86 *
87 * returns the XMAC address offset of specified Exact Match Addr Reg
88 *
89 * para: Reg EXM register to addr (0 .. 15)
90 *
91 * usage: XM_INADDR(IoC, MAC_1, XM_EXM(i), &val[i]);
92 */
93#define XM_EXM(Reg) (XM_EXM_START + ((Reg) << 3))
94
95#define XM_SRC_CHK 0x0100 /* NA reg r/w Source Check Address Register */
96#define XM_SA 0x0108 /* NA reg r/w Station Address Register */
97#define XM_HSM 0x0110 /* 64 bit r/w Hash Match Address Registers */
98#define XM_RX_LO_WM 0x0118 /* 16 bit r/w Receive Low Water Mark */
99#define XM_RX_HI_WM 0x011a /* 16 bit r/w Receive High Water Mark */
100#define XM_RX_THR 0x011c /* 32 bit r/w Receive Request Threshold */
101#define XM_DEV_ID 0x0120 /* 32 bit r/o Device ID Register */
102#define XM_MODE 0x0124 /* 32 bit r/w Mode Register */
103#define XM_LSA 0x0128 /* NA reg r/o Last Source Register */
104 /* 0x012e: reserved */
105#define XM_TS_READ 0x0130 /* 32 bit r/o Time Stamp Read Register */
106#define XM_TS_LOAD 0x0134 /* 32 bit r/o Time Stamp Load Value */
107 /* 0x0138 - 0x01fe: reserved */
108#define XM_STAT_CMD 0x0200 /* 16 bit r/w Statistics Command Register */
109#define XM_RX_CNT_EV 0x0204 /* 32 bit r/o Rx Counter Event Register */
110#define XM_TX_CNT_EV 0x0208 /* 32 bit r/o Tx Counter Event Register */
111#define XM_RX_EV_MSK 0x020c /* 32 bit r/w Rx Counter Event Mask */
112#define XM_TX_EV_MSK 0x0210 /* 32 bit r/w Tx Counter Event Mask */
113 /* 0x0204 - 0x027e: reserved */
114#define XM_TXF_OK 0x0280 /* 32 bit r/o Frames Transmitted OK Conuter */
115#define XM_TXO_OK_HI 0x0284 /* 32 bit r/o Octets Transmitted OK High Cnt*/
116#define XM_TXO_OK_LO 0x0288 /* 32 bit r/o Octets Transmitted OK Low Cnt */
117#define XM_TXF_BC_OK 0x028c /* 32 bit r/o Broadcast Frames Xmitted OK */
118#define XM_TXF_MC_OK 0x0290 /* 32 bit r/o Multicast Frames Xmitted OK */
119#define XM_TXF_UC_OK 0x0294 /* 32 bit r/o Unicast Frames Xmitted OK */
120#define XM_TXF_LONG 0x0298 /* 32 bit r/o Tx Long Frame Counter */
121#define XM_TXE_BURST 0x029c /* 32 bit r/o Tx Burst Event Counter */
122#define XM_TXF_MPAUSE 0x02a0 /* 32 bit r/o Tx Pause MAC Ctrl Frame Cnt */
123#define XM_TXF_MCTRL 0x02a4 /* 32 bit r/o Tx MAC Ctrl Frame Counter */
124#define XM_TXF_SNG_COL 0x02a8 /* 32 bit r/o Tx Single Collision Counter */
125#define XM_TXF_MUL_COL 0x02ac /* 32 bit r/o Tx Multiple Collision Counter */
126#define XM_TXF_ABO_COL 0x02b0 /* 32 bit r/o Tx aborted due to Exces. Col. */
127#define XM_TXF_LAT_COL 0x02b4 /* 32 bit r/o Tx Late Collision Counter */
128#define XM_TXF_DEF 0x02b8 /* 32 bit r/o Tx Deferred Frame Counter */
129#define XM_TXF_EX_DEF 0x02bc /* 32 bit r/o Tx Excessive Deferall Counter */
130#define XM_TXE_FIFO_UR 0x02c0 /* 32 bit r/o Tx FIFO Underrun Event Cnt */
131#define XM_TXE_CS_ERR 0x02c4 /* 32 bit r/o Tx Carrier Sense Error Cnt */
132#define XM_TXP_UTIL 0x02c8 /* 32 bit r/o Tx Utilization in % */
133 /* 0x02cc - 0x02ce: reserved */
134#define XM_TXF_64B 0x02d0 /* 32 bit r/o 64 Byte Tx Frame Counter */
135#define XM_TXF_127B 0x02d4 /* 32 bit r/o 65-127 Byte Tx Frame Counter */
136#define XM_TXF_255B 0x02d8 /* 32 bit r/o 128-255 Byte Tx Frame Counter */
137#define XM_TXF_511B 0x02dc /* 32 bit r/o 256-511 Byte Tx Frame Counter */
138#define XM_TXF_1023B 0x02e0 /* 32 bit r/o 512-1023 Byte Tx Frame Counter*/
139#define XM_TXF_MAX_SZ 0x02e4 /* 32 bit r/o 1024-MaxSize Byte Tx Frame Cnt*/
140 /* 0x02e8 - 0x02fe: reserved */
141#define XM_RXF_OK 0x0300 /* 32 bit r/o Frames Received OK */
142#define XM_RXO_OK_HI 0x0304 /* 32 bit r/o Octets Received OK High Cnt */
143#define XM_RXO_OK_LO 0x0308 /* 32 bit r/o Octets Received OK Low Counter*/
144#define XM_RXF_BC_OK 0x030c /* 32 bit r/o Broadcast Frames Received OK */
145#define XM_RXF_MC_OK 0x0310 /* 32 bit r/o Multicast Frames Received OK */
146#define XM_RXF_UC_OK 0x0314 /* 32 bit r/o Unicast Frames Received OK */
147#define XM_RXF_MPAUSE 0x0318 /* 32 bit r/o Rx Pause MAC Ctrl Frame Cnt */
148#define XM_RXF_MCTRL 0x031c /* 32 bit r/o Rx MAC Ctrl Frame Counter */
149#define XM_RXF_INV_MP 0x0320 /* 32 bit r/o Rx invalid Pause Frame Cnt */
150#define XM_RXF_INV_MOC 0x0324 /* 32 bit r/o Rx Frames with inv. MAC Opcode*/
151#define XM_RXE_BURST 0x0328 /* 32 bit r/o Rx Burst Event Counter */
152#define XM_RXE_FMISS 0x032c /* 32 bit r/o Rx Missed Frames Event Cnt */
153#define XM_RXF_FRA_ERR 0x0330 /* 32 bit r/o Rx Framing Error Counter */
154#define XM_RXE_FIFO_OV 0x0334 /* 32 bit r/o Rx FIFO overflow Event Cnt */
155#define XM_RXF_JAB_PKT 0x0338 /* 32 bit r/o Rx Jabber Packet Frame Cnt */
156#define XM_RXE_CAR_ERR 0x033c /* 32 bit r/o Rx Carrier Event Error Cnt */
157#define XM_RXF_LEN_ERR 0x0340 /* 32 bit r/o Rx in Range Length Error */
158#define XM_RXE_SYM_ERR 0x0344 /* 32 bit r/o Rx Symbol Error Counter */
159#define XM_RXE_SHT_ERR 0x0348 /* 32 bit r/o Rx Short Event Error Cnt */
160#define XM_RXE_RUNT 0x034c /* 32 bit r/o Rx Runt Event Counter */
161#define XM_RXF_LNG_ERR 0x0350 /* 32 bit r/o Rx Frame too Long Error Cnt */
162#define XM_RXF_FCS_ERR 0x0354 /* 32 bit r/o Rx Frame Check Seq. Error Cnt */
163 /* 0x0358 - 0x035a: reserved */
164#define XM_RXF_CEX_ERR 0x035c /* 32 bit r/o Rx Carrier Ext Error Frame Cnt*/
165#define XM_RXP_UTIL 0x0360 /* 32 bit r/o Rx Utilization in % */
166 /* 0x0364 - 0x0366: reserved */
167#define XM_RXF_64B 0x0368 /* 32 bit r/o 64 Byte Rx Frame Counter */
168#define XM_RXF_127B 0x036c /* 32 bit r/o 65-127 Byte Rx Frame Counter */
169#define XM_RXF_255B 0x0370 /* 32 bit r/o 128-255 Byte Rx Frame Counter */
170#define XM_RXF_511B 0x0374 /* 32 bit r/o 256-511 Byte Rx Frame Counter */
171#define XM_RXF_1023B 0x0378 /* 32 bit r/o 512-1023 Byte Rx Frame Counter*/
172#define XM_RXF_MAX_SZ 0x037c /* 32 bit r/o 1024-MaxSize Byte Rx Frame Cnt*/
173 /* 0x02e8 - 0x02fe: reserved */
174
175
176/*----------------------------------------------------------------------------*/
177/*
178 * XMAC Bit Definitions
179 *
180 * If the bit access behaviour differs from the register access behaviour
181 * (r/w, r/o) this is documented after the bit number.
182 * The following bit access behaviours are used:
183 * (sc) self clearing
184 * (ro) read only
185 */
186
187/* XM_MMU_CMD 16 bit r/w MMU Command Register */
188 /* Bit 15..13: reserved */
189#define XM_MMU_PHY_RDY (1<<12) /* Bit 12: PHY Read Ready */
190#define XM_MMU_PHY_BUSY (1<<11) /* Bit 11: PHY Busy */
191#define XM_MMU_IGN_PF (1<<10) /* Bit 10: Ignore Pause Frame */
192#define XM_MMU_MAC_LB (1<<9) /* Bit 9: Enable MAC Loopback */
193 /* Bit 8: reserved */
194#define XM_MMU_FRC_COL (1<<7) /* Bit 7: Force Collision */
195#define XM_MMU_SIM_COL (1<<6) /* Bit 6: Simulate Collision */
196#define XM_MMU_NO_PRE (1<<5) /* Bit 5: No MDIO Preamble */
197#define XM_MMU_GMII_FD (1<<4) /* Bit 4: GMII uses Full Duplex */
198#define XM_MMU_RAT_CTRL (1<<3) /* Bit 3: Enable Rate Control */
199#define XM_MMU_GMII_LOOP (1<<2) /* Bit 2: PHY is in Loopback Mode */
200#define XM_MMU_ENA_RX (1<<1) /* Bit 1: Enable Receiver */
201#define XM_MMU_ENA_TX (1<<0) /* Bit 0: Enable Transmitter */
202
203
204/* XM_TX_CMD 16 bit r/w Transmit Command Register */
205 /* Bit 15..7: reserved */
206#define XM_TX_BK2BK (1<<6) /* Bit 6: Ignor Carrier Sense (Tx Bk2Bk)*/
207#define XM_TX_ENC_BYP (1<<5) /* Bit 5: Set Encoder in Bypass Mode */
208#define XM_TX_SAM_LINE (1<<4) /* Bit 4: (sc) Start utilization calculation */
209#define XM_TX_NO_GIG_MD (1<<3) /* Bit 3: Disable Carrier Extension */
210#define XM_TX_NO_PRE (1<<2) /* Bit 2: Disable Preamble Generation */
211#define XM_TX_NO_CRC (1<<1) /* Bit 1: Disable CRC Generation */
212#define XM_TX_AUTO_PAD (1<<0) /* Bit 0: Enable Automatic Padding */
213
214
215/* XM_TX_RT_LIM 16 bit r/w Transmit Retry Limit Register */
216 /* Bit 15..5: reserved */
217#define XM_RT_LIM_MSK 0x1f /* Bit 4..0: Tx Retry Limit */
218
219
220/* XM_TX_STIME 16 bit r/w Transmit Slottime Register */
221 /* Bit 15..7: reserved */
222#define XM_STIME_MSK 0x7f /* Bit 6..0: Tx Slottime bits */
223
224
225/* XM_TX_IPG 16 bit r/w Transmit Inter Packet Gap */
226 /* Bit 15..8: reserved */
227#define XM_IPG_MSK 0xff /* Bit 7..0: IPG value bits */
228
229
230/* XM_RX_CMD 16 bit r/w Receive Command Register */
231 /* Bit 15..9: reserved */
232#define XM_RX_LENERR_OK (1<<8) /* Bit 8 don't set Rx Err bit for */
233 /* inrange error packets */
234#define XM_RX_BIG_PK_OK (1<<7) /* Bit 7 don't set Rx Err bit for */
235 /* jumbo packets */
236#define XM_RX_IPG_CAP (1<<6) /* Bit 6 repl. type field with IPG */
237#define XM_RX_TP_MD (1<<5) /* Bit 5: Enable transparent Mode */
238#define XM_RX_STRIP_FCS (1<<4) /* Bit 4: Enable FCS Stripping */
239#define XM_RX_SELF_RX (1<<3) /* Bit 3: Enable Rx of own packets */
240#define XM_RX_SAM_LINE (1<<2) /* Bit 2: (sc) Start utilization calculation */
241#define XM_RX_STRIP_PAD (1<<1) /* Bit 1: Strip pad bytes of Rx frames */
242#define XM_RX_DIS_CEXT (1<<0) /* Bit 0: Disable carrier ext. check */
243
244
245/* XM_PHY_ADDR 16 bit r/w PHY Address Register */
246 /* Bit 15..5: reserved */
247#define XM_PHY_ADDR_SZ 0x1f /* Bit 4..0: PHY Address bits */
248
249
250/* XM_GP_PORT 32 bit r/w General Purpose Port Register */
251 /* Bit 31..7: reserved */
252#define XM_GP_ANIP (1L<<6) /* Bit 6: (ro) Auto-Neg. in progress */
253#define XM_GP_FRC_INT (1L<<5) /* Bit 5: (sc) Force Interrupt */
254 /* Bit 4: reserved */
255#define XM_GP_RES_MAC (1L<<3) /* Bit 3: (sc) Reset MAC and FIFOs */
256#define XM_GP_RES_STAT (1L<<2) /* Bit 2: (sc) Reset the statistics module */
257 /* Bit 1: reserved */
258#define XM_GP_INP_ASS (1L<<0) /* Bit 0: (ro) GP Input Pin asserted */
259
260
261/* XM_IMSK 16 bit r/w Interrupt Mask Register */
262/* XM_ISRC 16 bit r/o Interrupt Status Register */
263 /* Bit 15: reserved */
264#define XM_IS_LNK_AE (1<<14) /* Bit 14: Link Asynchronous Event */
265#define XM_IS_TX_ABORT (1<<13) /* Bit 13: Transmit Abort, late Col. etc */
266#define XM_IS_FRC_INT (1<<12) /* Bit 12: Force INT bit set in GP */
267#define XM_IS_INP_ASS (1<<11) /* Bit 11: Input Asserted, GP bit 0 set */
268#define XM_IS_LIPA_RC (1<<10) /* Bit 10: Link Partner requests config */
269#define XM_IS_RX_PAGE (1<<9) /* Bit 9: Page Received */
270#define XM_IS_TX_PAGE (1<<8) /* Bit 8: Next Page Loaded for Transmit */
271#define XM_IS_AND (1<<7) /* Bit 7: Auto-Negotiation Done */
272#define XM_IS_TSC_OV (1<<6) /* Bit 6: Time Stamp Counter Overflow */
273#define XM_IS_RXC_OV (1<<5) /* Bit 5: Rx Counter Event Overflow */
274#define XM_IS_TXC_OV (1<<4) /* Bit 4: Tx Counter Event Overflow */
275#define XM_IS_RXF_OV (1<<3) /* Bit 3: Receive FIFO Overflow */
276#define XM_IS_TXF_UR (1<<2) /* Bit 2: Transmit FIFO Underrun */
277#define XM_IS_TX_COMP (1<<1) /* Bit 1: Frame Tx Complete */
278#define XM_IS_RX_COMP (1<<0) /* Bit 0: Frame Rx Complete */
279
280#define XM_DEF_MSK (~(XM_IS_INP_ASS | XM_IS_LIPA_RC | XM_IS_RX_PAGE |\
281 XM_IS_AND | XM_IS_RXC_OV | XM_IS_TXC_OV | XM_IS_TXF_UR))
282
283
284/* XM_HW_CFG 16 bit r/w Hardware Config Register */
285 /* Bit 15.. 4: reserved */
286#define XM_HW_GEN_EOP (1<<3) /* Bit 3: generate End of Packet pulse */
287#define XM_HW_COM4SIG (1<<2) /* Bit 2: use Comma Detect for Sig. Det.*/
288 /* Bit 1: reserved */
289#define XM_HW_GMII_MD (1<<0) /* Bit 0: GMII Interface selected */
290
291
292/* XM_TX_LO_WM 16 bit r/w Tx FIFO Low Water Mark */
293/* XM_TX_HI_WM 16 bit r/w Tx FIFO High Water Mark */
294 /* Bit 15..10 reserved */
295#define XM_TX_WM_MSK 0x01ff /* Bit 9.. 0 Tx FIFO Watermark bits */
296
297/* XM_TX_THR 16 bit r/w Tx Request Threshold */
298/* XM_HT_THR 16 bit r/w Host Request Threshold */
299/* XM_RX_THR 16 bit r/w Rx Request Threshold */
300 /* Bit 15..11 reserved */
301#define XM_THR_MSK 0x03ff /* Bit 10.. 0 Rx/Tx Request Threshold bits */
302
303
304/* XM_TX_STAT 32 bit r/o Tx Status LIFO Register */
305#define XM_ST_VALID (1UL<<31) /* Bit 31: Status Valid */
306#define XM_ST_BYTE_CNT (0x3fffL<<17) /* Bit 30..17: Tx frame Length */
307#define XM_ST_RETRY_CNT (0x1fL<<12) /* Bit 16..12: Retry Count */
308#define XM_ST_EX_COL (1L<<11) /* Bit 11: Excessive Collisions */
309#define XM_ST_EX_DEF (1L<<10) /* Bit 10: Excessive Deferral */
310#define XM_ST_BURST (1L<<9) /* Bit 9: p. xmitted in burst md*/
311#define XM_ST_DEFER (1L<<8) /* Bit 8: packet was defered */
312#define XM_ST_BC (1L<<7) /* Bit 7: Broadcast packet */
313#define XM_ST_MC (1L<<6) /* Bit 6: Multicast packet */
314#define XM_ST_UC (1L<<5) /* Bit 5: Unicast packet */
315#define XM_ST_TX_UR (1L<<4) /* Bit 4: FIFO Underrun occured */
316#define XM_ST_CS_ERR (1L<<3) /* Bit 3: Carrier Sense Error */
317#define XM_ST_LAT_COL (1L<<2) /* Bit 2: Late Collision Error */
318#define XM_ST_MUL_COL (1L<<1) /* Bit 1: Multiple Collisions */
319#define XM_ST_SGN_COL (1L<<0) /* Bit 0: Single Collision */
320
321/* XM_RX_LO_WM 16 bit r/w Receive Low Water Mark */
322/* XM_RX_HI_WM 16 bit r/w Receive High Water Mark */
323 /* Bit 15..11: reserved */
324#define XM_RX_WM_MSK 0x03ff /* Bit 11.. 0: Rx FIFO Watermark bits */
325
326
327/* XM_DEV_ID 32 bit r/o Device ID Register */
328#define XM_DEV_OUI (0x00ffffffUL<<8) /* Bit 31..8: Device OUI */
329#define XM_DEV_REV (0x07L << 5) /* Bit 7..5: Chip Rev Num */
330
331
332/* XM_MODE 32 bit r/w Mode Register */
333 /* Bit 31..27: reserved */
334#define XM_MD_ENA_REJ (1L<<26) /* Bit 26: Enable Frame Reject */
335#define XM_MD_SPOE_E (1L<<25) /* Bit 25: Send Pause on Edge */
336 /* extern generated */
337#define XM_MD_TX_REP (1L<<24) /* Bit 24: Transmit Repeater Mode */
338#define XM_MD_SPOFF_I (1L<<23) /* Bit 23: Send Pause on FIFO full */
339 /* intern generated */
340#define XM_MD_LE_STW (1L<<22) /* Bit 22: Rx Stat Word in Little Endian */
341#define XM_MD_TX_CONT (1L<<21) /* Bit 21: Send Continuous */
342#define XM_MD_TX_PAUSE (1L<<20) /* Bit 20: (sc) Send Pause Frame */
343#define XM_MD_ATS (1L<<19) /* Bit 19: Append Time Stamp */
344#define XM_MD_SPOL_I (1L<<18) /* Bit 18: Send Pause on Low */
345 /* intern generated */
346#define XM_MD_SPOH_I (1L<<17) /* Bit 17: Send Pause on High */
347 /* intern generated */
348#define XM_MD_CAP (1L<<16) /* Bit 16: Check Address Pair */
349#define XM_MD_ENA_HASH (1L<<15) /* Bit 15: Enable Hashing */
350#define XM_MD_CSA (1L<<14) /* Bit 14: Check Station Address */
351#define XM_MD_CAA (1L<<13) /* Bit 13: Check Address Array */
352#define XM_MD_RX_MCTRL (1L<<12) /* Bit 12: Rx MAC Control Frame */
353#define XM_MD_RX_RUNT (1L<<11) /* Bit 11: Rx Runt Frames */
354#define XM_MD_RX_IRLE (1L<<10) /* Bit 10: Rx in Range Len Err Frame */
355#define XM_MD_RX_LONG (1L<<9) /* Bit 9: Rx Long Frame */
356#define XM_MD_RX_CRCE (1L<<8) /* Bit 8: Rx CRC Error Frame */
357#define XM_MD_RX_ERR (1L<<7) /* Bit 7: Rx Error Frame */
358#define XM_MD_DIS_UC (1L<<6) /* Bit 6: Disable Rx Unicast */
359#define XM_MD_DIS_MC (1L<<5) /* Bit 5: Disable Rx Multicast */
360#define XM_MD_DIS_BC (1L<<4) /* Bit 4: Disable Rx Broadcast */
361#define XM_MD_ENA_PROM (1L<<3) /* Bit 3: Enable Promiscuous */
362#define XM_MD_ENA_BE (1L<<2) /* Bit 2: Enable Big Endian */
363#define XM_MD_FTF (1L<<1) /* Bit 1: (sc) Flush Tx FIFO */
364#define XM_MD_FRF (1L<<0) /* Bit 0: (sc) Flush Rx FIFO */
365
366#define XM_PAUSE_MODE (XM_MD_SPOE_E | XM_MD_SPOL_I | XM_MD_SPOH_I)
367#define XM_DEF_MODE (XM_MD_RX_RUNT | XM_MD_RX_IRLE | XM_MD_RX_LONG |\
368 XM_MD_RX_CRCE | XM_MD_RX_ERR | XM_MD_CSA | XM_MD_CAA)
369
370/* XM_STAT_CMD 16 bit r/w Statistics Command Register */
371 /* Bit 16..6: reserved */
372#define XM_SC_SNP_RXC (1<<5) /* Bit 5: (sc) Snap Rx Counters */
373#define XM_SC_SNP_TXC (1<<4) /* Bit 4: (sc) Snap Tx Counters */
374#define XM_SC_CP_RXC (1<<3) /* Bit 3: Copy Rx Counters Continuously */
375#define XM_SC_CP_TXC (1<<2) /* Bit 2: Copy Tx Counters Continuously */
376#define XM_SC_CLR_RXC (1<<1) /* Bit 1: (sc) Clear Rx Counters */
377#define XM_SC_CLR_TXC (1<<0) /* Bit 0: (sc) Clear Tx Counters */
378
379
380/* XM_RX_CNT_EV 32 bit r/o Rx Counter Event Register */
381/* XM_RX_EV_MSK 32 bit r/w Rx Counter Event Mask */
382#define XMR_MAX_SZ_OV (1UL<<31) /* Bit 31: 1024-MaxSize Rx Cnt Ov*/
383#define XMR_1023B_OV (1L<<30) /* Bit 30: 512-1023Byte Rx Cnt Ov*/
384#define XMR_511B_OV (1L<<29) /* Bit 29: 256-511 Byte Rx Cnt Ov*/
385#define XMR_255B_OV (1L<<28) /* Bit 28: 128-255 Byte Rx Cnt Ov*/
386#define XMR_127B_OV (1L<<27) /* Bit 27: 65-127 Byte Rx Cnt Ov */
387#define XMR_64B_OV (1L<<26) /* Bit 26: 64 Byte Rx Cnt Ov */
388#define XMR_UTIL_OV (1L<<25) /* Bit 25: Rx Util Cnt Overflow */
389#define XMR_UTIL_UR (1L<<24) /* Bit 24: Rx Util Cnt Underrun */
390#define XMR_CEX_ERR_OV (1L<<23) /* Bit 23: CEXT Err Cnt Ov */
391 /* Bit 22: reserved */
392#define XMR_FCS_ERR_OV (1L<<21) /* Bit 21: Rx FCS Error Cnt Ov */
393#define XMR_LNG_ERR_OV (1L<<20) /* Bit 20: Rx too Long Err Cnt Ov*/
394#define XMR_RUNT_OV (1L<<19) /* Bit 19: Runt Event Cnt Ov */
395#define XMR_SHT_ERR_OV (1L<<18) /* Bit 18: Rx Short Ev Err Cnt Ov*/
396#define XMR_SYM_ERR_OV (1L<<17) /* Bit 17: Rx Sym Err Cnt Ov */
397 /* Bit 16: reserved */
398#define XMR_CAR_ERR_OV (1L<<15) /* Bit 15: Rx Carr Ev Err Cnt Ov */
399#define XMR_JAB_PKT_OV (1L<<14) /* Bit 14: Rx Jabb Packet Cnt Ov */
400#define XMR_FIFO_OV (1L<<13) /* Bit 13: Rx FIFO Ov Ev Cnt Ov */
401#define XMR_FRA_ERR_OV (1L<<12) /* Bit 12: Rx Framing Err Cnt Ov */
402#define XMR_FMISS_OV (1L<<11) /* Bit 11: Rx Missed Ev Cnt Ov */
403#define XMR_BURST (1L<<10) /* Bit 10: Rx Burst Event Cnt Ov */
404#define XMR_INV_MOC (1L<<9) /* Bit 9: Rx with inv. MAC OC Ov*/
405#define XMR_INV_MP (1L<<8) /* Bit 8: Rx inv Pause Frame Ov */
406#define XMR_MCTRL_OV (1L<<7) /* Bit 7: Rx MAC Ctrl-F Cnt Ov */
407#define XMR_MPAUSE_OV (1L<<6) /* Bit 6: Rx Pause MAC Ctrl-F Ov*/
408#define XMR_UC_OK_OV (1L<<5) /* Bit 5: Rx Unicast Frame CntOv*/
409#define XMR_MC_OK_OV (1L<<4) /* Bit 4: Rx Multicast Cnt Ov */
410#define XMR_BC_OK_OV (1L<<3) /* Bit 3: Rx Broadcast Cnt Ov */
411#define XMR_OK_LO_OV (1L<<2) /* Bit 2: Octets Rx OK Low CntOv*/
412#define XMR_OK_HI_OV (1L<<1) /* Bit 1: Octets Rx OK Hi Cnt Ov*/
413#define XMR_OK_OV (1L<<0) /* Bit 0: Frames Received Ok Ov */
414
415#define XMR_DEF_MSK (XMR_OK_LO_OV | XMR_OK_HI_OV)
416
417/* XM_TX_CNT_EV 32 bit r/o Tx Counter Event Register */
418/* XM_TX_EV_MSK 32 bit r/w Tx Counter Event Mask */
419 /* Bit 31..26: reserved */
420#define XMT_MAX_SZ_OV (1L<<25) /* Bit 25: 1024-MaxSize Tx Cnt Ov*/
421#define XMT_1023B_OV (1L<<24) /* Bit 24: 512-1023Byte Tx Cnt Ov*/
422#define XMT_511B_OV (1L<<23) /* Bit 23: 256-511 Byte Tx Cnt Ov*/
423#define XMT_255B_OV (1L<<22) /* Bit 22: 128-255 Byte Tx Cnt Ov*/
424#define XMT_127B_OV (1L<<21) /* Bit 21: 65-127 Byte Tx Cnt Ov */
425#define XMT_64B_OV (1L<<20) /* Bit 20: 64 Byte Tx Cnt Ov */
426#define XMT_UTIL_OV (1L<<19) /* Bit 19: Tx Util Cnt Overflow */
427#define XMT_UTIL_UR (1L<<18) /* Bit 18: Tx Util Cnt Underrun */
428#define XMT_CS_ERR_OV (1L<<17) /* Bit 17: Tx Carr Sen Err Cnt Ov*/
429#define XMT_FIFO_UR_OV (1L<<16) /* Bit 16: Tx FIFO Ur Ev Cnt Ov */
430#define XMT_EX_DEF_OV (1L<<15) /* Bit 15: Tx Ex Deferall Cnt Ov */
431#define XMT_DEF (1L<<14) /* Bit 14: Tx Deferred Cnt Ov */
432#define XMT_LAT_COL_OV (1L<<13) /* Bit 13: Tx Late Col Cnt Ov */
433#define XMT_ABO_COL_OV (1L<<12) /* Bit 12: Tx abo dueto Ex Col Ov*/
434#define XMT_MUL_COL_OV (1L<<11) /* Bit 11: Tx Mult Col Cnt Ov */
435#define XMT_SNG_COL (1L<<10) /* Bit 10: Tx Single Col Cnt Ov */
436#define XMT_MCTRL_OV (1L<<9) /* Bit 9: Tx MAC Ctrl Counter Ov*/
437#define XMT_MPAUSE (1L<<8) /* Bit 8: Tx Pause MAC Ctrl-F Ov*/
438#define XMT_BURST (1L<<7) /* Bit 7: Tx Burst Event Cnt Ov */
439#define XMT_LONG (1L<<6) /* Bit 6: Tx Long Frame Cnt Ov */
440#define XMT_UC_OK_OV (1L<<5) /* Bit 5: Tx Unicast Cnt Ov */
441#define XMT_MC_OK_OV (1L<<4) /* Bit 4: Tx Multicast Cnt Ov */
442#define XMT_BC_OK_OV (1L<<3) /* Bit 3: Tx Broadcast Cnt Ov */
443#define XMT_OK_LO_OV (1L<<2) /* Bit 2: Octets Tx OK Low CntOv*/
444#define XMT_OK_HI_OV (1L<<1) /* Bit 1: Octets Tx OK Hi Cnt Ov*/
445#define XMT_OK_OV (1L<<0) /* Bit 0: Frames Tx Ok Ov */
446
447#define XMT_DEF_MSK (XMT_OK_LO_OV | XMT_OK_HI_OV)
448
449/*
450 * Receive Frame Status Encoding
451 */
452#define XMR_FS_LEN (0x3fffUL<<18) /* Bit 31..18: Rx Frame Length */
453#define XMR_FS_2L_VLAN (1L<<17) /* Bit 17: tagged wh 2Lev VLAN ID*/
454#define XMR_FS_1L_VLAN (1L<<16) /* Bit 16: tagged wh 1Lev VLAN ID*/
455#define XMR_FS_BC (1L<<15) /* Bit 15: Broadcast Frame */
456#define XMR_FS_MC (1L<<14) /* Bit 14: Multicast Frame */
457#define XMR_FS_UC (1L<<13) /* Bit 13: Unicast Frame */
458 /* Bit 12: reserved */
459#define XMR_FS_BURST (1L<<11) /* Bit 11: Burst Mode */
460#define XMR_FS_CEX_ERR (1L<<10) /* Bit 10: Carrier Ext. Error */
461#define XMR_FS_802_3 (1L<<9) /* Bit 9: 802.3 Frame */
462#define XMR_FS_COL_ERR (1L<<8) /* Bit 8: Collision Error */
463#define XMR_FS_CAR_ERR (1L<<7) /* Bit 7: Carrier Event Error */
464#define XMR_FS_LEN_ERR (1L<<6) /* Bit 6: In-Range Length Error */
465#define XMR_FS_FRA_ERR (1L<<5) /* Bit 5: Framing Error */
466#define XMR_FS_RUNT (1L<<4) /* Bit 4: Runt Frame */
467#define XMR_FS_LNG_ERR (1L<<3) /* Bit 3: Giant (Jumbo) Frame */
468#define XMR_FS_FCS_ERR (1L<<2) /* Bit 2: Frame Check Sequ Err */
469#define XMR_FS_ERR (1L<<1) /* Bit 1: Frame Error */
470#define XMR_FS_MCTRL (1L<<0) /* Bit 0: MAC Control Packet */
471
472/*
473 * XMR_FS_ERR will be set if
474 * XMR_FS_FCS_ERR, XMR_FS_LNG_ERR, XMR_FS_RUNT,
475 * XMR_FS_FRA_ERR, XMR_FS_LEN_ERR, or XMR_FS_CEX_ERR
476 * is set. XMR_FS_LNG_ERR and XMR_FS_LEN_ERR will issue
477 * XMR_FS_ERR unless the corresponding bit in the Receive Command
478 * Register is set.
479 */
480#define XMR_FS_ANY_ERR XMR_FS_ERR
481
482/*----------------------------------------------------------------------------*/
483/*
484 * XMAC-PHY Registers, indirect addressed over the XMAC
485 */
486#define PHY_XMAC_CTRL 0x00 /* 16 bit r/w PHY Control Register */
487#define PHY_XMAC_STAT 0x01 /* 16 bit r/w PHY Status Register */
488#define PHY_XMAC_ID0 0x02 /* 16 bit r/o PHY ID0 Register */
489#define PHY_XMAC_ID1 0x03 /* 16 bit r/o PHY ID1 Register */
490#define PHY_XMAC_AUNE_ADV 0x04 /* 16 bit r/w Auto-Neg. Advertisement */
491#define PHY_XMAC_AUNE_LP 0x05 /* 16 bit r/o Link Partner Abi Reg */
492#define PHY_XMAC_AUNE_EXP 0x06 /* 16 bit r/o Auto-Neg. Expansion Reg */
493#define PHY_XMAC_NEPG 0x07 /* 16 bit r/w Next Page Register */
494#define PHY_XMAC_NEPG_LP 0x08 /* 16 bit r/o Next Page Link Partner */
495 /* 0x09 - 0x0e: reserved */
496#define PHY_XMAC_EXT_STAT 0x0f /* 16 bit r/o Ext Status Register */
497#define PHY_XMAC_RES_ABI 0x10 /* 16 bit r/o PHY Resolved Ability */
498
499/*----------------------------------------------------------------------------*/
500/*
501 * Broadcom-PHY Registers, indirect addressed over XMAC
502 */
503#define PHY_BCOM_CTRL 0x00 /* 16 bit r/w PHY Control Register */
504#define PHY_BCOM_STAT 0x01 /* 16 bit r/o PHY Status Register */
505#define PHY_BCOM_ID0 0x02 /* 16 bit r/o PHY ID0 Register */
506#define PHY_BCOM_ID1 0x03 /* 16 bit r/o PHY ID1 Register */
507#define PHY_BCOM_AUNE_ADV 0x04 /* 16 bit r/w Auto-Neg. Advertisement */
508#define PHY_BCOM_AUNE_LP 0x05 /* 16 bit r/o Link Part Ability Reg */
509#define PHY_BCOM_AUNE_EXP 0x06 /* 16 bit r/o Auto-Neg. Expansion Reg */
510#define PHY_BCOM_NEPG 0x07 /* 16 bit r/w Next Page Register */
511#define PHY_BCOM_NEPG_LP 0x08 /* 16 bit r/o Next Page Link Partner */
512 /* Broadcom-specific registers */
513#define PHY_BCOM_1000T_CTRL 0x09 /* 16 bit r/w 1000Base-T Ctrl Reg */
514#define PHY_BCOM_1000T_STAT 0x0a /* 16 bit r/o 1000Base-T Status Reg */
515 /* 0x0b - 0x0e: reserved */
516#define PHY_BCOM_EXT_STAT 0x0f /* 16 bit r/o Extended Status Reg */
517#define PHY_BCOM_P_EXT_CTRL 0x10 /* 16 bit r/w PHY Extended Ctrl Reg */
518#define PHY_BCOM_P_EXT_STAT 0x11 /* 16 bit r/o PHY Extended Stat Reg */
519#define PHY_BCOM_RE_CTR 0x12 /* 16 bit r/w Receive Error Counter */
520#define PHY_BCOM_FC_CTR 0x13 /* 16 bit r/w False Carrier Sense Cnt */
521#define PHY_BCOM_RNO_CTR 0x14 /* 16 bit r/w Receiver NOT_OK Cnt */
522 /* 0x15 - 0x17: reserved */
523#define PHY_BCOM_AUX_CTRL 0x18 /* 16 bit r/w Auxiliary Control Reg */
524#define PHY_BCOM_AUX_STAT 0x19 /* 16 bit r/o Auxiliary Stat Summary */
525#define PHY_BCOM_INT_STAT 0x1a /* 16 bit r/o Interrupt Status Reg */
526#define PHY_BCOM_INT_MASK 0x1b /* 16 bit r/w Interrupt Mask Reg */
527 /* 0x1c: reserved */
528 /* 0x1d - 0x1f: test registers */
529
530/*----------------------------------------------------------------------------*/
531/*
532 * Marvel-PHY Registers, indirect addressed over GMAC
533 */
534#define PHY_MARV_CTRL 0x00 /* 16 bit r/w PHY Control Register */
535#define PHY_MARV_STAT 0x01 /* 16 bit r/o PHY Status Register */
536#define PHY_MARV_ID0 0x02 /* 16 bit r/o PHY ID0 Register */
537#define PHY_MARV_ID1 0x03 /* 16 bit r/o PHY ID1 Register */
538#define PHY_MARV_AUNE_ADV 0x04 /* 16 bit r/w Auto-Neg. Advertisement */
539#define PHY_MARV_AUNE_LP 0x05 /* 16 bit r/o Link Part Ability Reg */
540#define PHY_MARV_AUNE_EXP 0x06 /* 16 bit r/o Auto-Neg. Expansion Reg */
541#define PHY_MARV_NEPG 0x07 /* 16 bit r/w Next Page Register */
542#define PHY_MARV_NEPG_LP 0x08 /* 16 bit r/o Next Page Link Partner */
543 /* Marvel-specific registers */
544#define PHY_MARV_1000T_CTRL 0x09 /* 16 bit r/w 1000Base-T Ctrl Reg */
545#define PHY_MARV_1000T_STAT 0x0a /* 16 bit r/o 1000Base-T Status Reg */
546 /* 0x0b - 0x0e: reserved */
547#define PHY_MARV_EXT_STAT 0x0f /* 16 bit r/o Extended Status Reg */
548#define PHY_MARV_PHY_CTRL 0x10 /* 16 bit r/w PHY Specific Ctrl Reg */
549#define PHY_MARV_PHY_STAT 0x11 /* 16 bit r/o PHY Specific Stat Reg */
550#define PHY_MARV_INT_MASK 0x12 /* 16 bit r/w Interrupt Mask Reg */
551#define PHY_MARV_INT_STAT 0x13 /* 16 bit r/o Interrupt Status Reg */
552#define PHY_MARV_EXT_CTRL 0x14 /* 16 bit r/w Ext. PHY Specific Ctrl */
553#define PHY_MARV_RXE_CNT 0x15 /* 16 bit r/w Receive Error Counter */
554#define PHY_MARV_EXT_ADR 0x16 /* 16 bit r/w Ext. Ad. for Cable Diag. */
555 /* 0x17: reserved */
556#define PHY_MARV_LED_CTRL 0x18 /* 16 bit r/w LED Control Reg */
557#define PHY_MARV_LED_OVER 0x19 /* 16 bit r/w Manual LED Override Reg */
558#define PHY_MARV_EXT_CTRL_2 0x1a /* 16 bit r/w Ext. PHY Specific Ctrl 2 */
559#define PHY_MARV_EXT_P_STAT 0x1b /* 16 bit r/w Ext. PHY Spec. Stat Reg */
560#define PHY_MARV_CABLE_DIAG 0x1c /* 16 bit r/o Cable Diagnostic Reg */
561 /* 0x1d - 0x1f: reserved */
562
563/*----------------------------------------------------------------------------*/
564/*
565 * Level One-PHY Registers, indirect addressed over XMAC
566 */
567#define PHY_LONE_CTRL 0x00 /* 16 bit r/w PHY Control Register */
568#define PHY_LONE_STAT 0x01 /* 16 bit r/o PHY Status Register */
569#define PHY_LONE_ID0 0x02 /* 16 bit r/o PHY ID0 Register */
570#define PHY_LONE_ID1 0x03 /* 16 bit r/o PHY ID1 Register */
571#define PHY_LONE_AUNE_ADV 0x04 /* 16 bit r/w Auto-Neg. Advertisement */
572#define PHY_LONE_AUNE_LP 0x05 /* 16 bit r/o Link Part Ability Reg */
573#define PHY_LONE_AUNE_EXP 0x06 /* 16 bit r/o Auto-Neg. Expansion Reg */
574#define PHY_LONE_NEPG 0x07 /* 16 bit r/w Next Page Register */
575#define PHY_LONE_NEPG_LP 0x08 /* 16 bit r/o Next Page Link Partner */
576 /* Level One-specific registers */
577#define PHY_LONE_1000T_CTRL 0x09 /* 16 bit r/w 1000Base-T Control Reg*/
578#define PHY_LONE_1000T_STAT 0x0a /* 16 bit r/o 1000Base-T Status Reg */
579 /* 0x0b -0x0e: reserved */
580#define PHY_LONE_EXT_STAT 0x0f /* 16 bit r/o Extended Status Reg */
581#define PHY_LONE_PORT_CFG 0x10 /* 16 bit r/w Port Configuration Reg*/
582#define PHY_LONE_Q_STAT 0x11 /* 16 bit r/o Quick Status Reg */
583#define PHY_LONE_INT_ENAB 0x12 /* 16 bit r/w Interrupt Enable Reg */
584#define PHY_LONE_INT_STAT 0x13 /* 16 bit r/o Interrupt Status Reg */
585#define PHY_LONE_LED_CFG 0x14 /* 16 bit r/w LED Configuration Reg */
586#define PHY_LONE_PORT_CTRL 0x15 /* 16 bit r/w Port Control Reg */
587#define PHY_LONE_CIM 0x16 /* 16 bit r/o CIM Reg */
588 /* 0x17 -0x1c: reserved */
589
590/*----------------------------------------------------------------------------*/
591/*
592 * National-PHY Registers, indirect addressed over XMAC
593 */
594#define PHY_NAT_CTRL 0x00 /* 16 bit r/w PHY Control Register */
595#define PHY_NAT_STAT 0x01 /* 16 bit r/w PHY Status Register */
596#define PHY_NAT_ID0 0x02 /* 16 bit r/o PHY ID0 Register */
597#define PHY_NAT_ID1 0x03 /* 16 bit r/o PHY ID1 Register */
598#define PHY_NAT_AUNE_ADV 0x04 /* 16 bit r/w Auto-Neg. Advertisement */
599#define PHY_NAT_AUNE_LP 0x05 /* 16 bit r/o Link Partner Ability Reg */
600#define PHY_NAT_AUNE_EXP 0x06 /* 16 bit r/o Auto-Neg. Expansion Reg */
601#define PHY_NAT_NEPG 0x07 /* 16 bit r/w Next Page Register */
602#define PHY_NAT_NEPG_LP 0x08 /* 16 bit r/o Next Page Link Partner Reg */
603 /* National-specific registers */
604#define PHY_NAT_1000T_CTRL 0x09 /* 16 bit r/w 1000Base-T Control Reg */
605#define PHY_NAT_1000T_STAT 0x0a /* 16 bit r/o 1000Base-T Status Reg */
606 /* 0x0b -0x0e: reserved */
607#define PHY_NAT_EXT_STAT 0x0f /* 16 bit r/o Extended Status Register */
608#define PHY_NAT_EXT_CTRL1 0x10 /* 16 bit r/o Extended Control Reg1 */
609#define PHY_NAT_Q_STAT1 0x11 /* 16 bit r/o Quick Status Reg1 */
610#define PHY_NAT_10B_OP 0x12 /* 16 bit r/o 10Base-T Operations Reg */
611#define PHY_NAT_EXT_CTRL2 0x13 /* 16 bit r/o Extended Control Reg1 */
612#define PHY_NAT_Q_STAT2 0x14 /* 16 bit r/o Quick Status Reg2 */
613 /* 0x15 -0x18: reserved */
614#define PHY_NAT_PHY_ADDR 0x19 /* 16 bit r/o PHY Address Register */
615
616
617/*----------------------------------------------------------------------------*/
618
619/*
620 * PHY bit definitions
621 * Bits defined as PHY_X_..., PHY_B_..., PHY_L_... or PHY_N_... are
622 * XMAC/Broadcom/LevelOne/National/Marvell-specific.
623 * All other are general.
624 */
625
626/***** PHY_XMAC_CTRL 16 bit r/w PHY Control Register *****/
627/***** PHY_BCOM_CTRL 16 bit r/w PHY Control Register *****/
628/***** PHY_MARV_CTRL 16 bit r/w PHY Status Register *****/
629/***** PHY_LONE_CTRL 16 bit r/w PHY Control Register *****/
630#define PHY_CT_RESET (1<<15) /* Bit 15: (sc) clear all PHY related regs */
631#define PHY_CT_LOOP (1<<14) /* Bit 14: enable Loopback over PHY */
632#define PHY_CT_SPS_LSB (1<<13) /* Bit 13: (BC,L1) Speed select, lower bit */
633#define PHY_CT_ANE (1<<12) /* Bit 12: Auto-Negotiation Enabled */
634#define PHY_CT_PDOWN (1<<11) /* Bit 11: (BC,L1) Power Down Mode */
635#define PHY_CT_ISOL (1<<10) /* Bit 10: (BC,L1) Isolate Mode */
636#define PHY_CT_RE_CFG (1<<9) /* Bit 9: (sc) Restart Auto-Negotiation */
637#define PHY_CT_DUP_MD (1<<8) /* Bit 8: Duplex Mode */
638#define PHY_CT_COL_TST (1<<7) /* Bit 7: (BC,L1) Collision Test enabled */
639#define PHY_CT_SPS_MSB (1<<6) /* Bit 6: (BC,L1) Speed select, upper bit */
640 /* Bit 5..0: reserved */
641
642#define PHY_CT_SP1000 PHY_CT_SPS_MSB /* enable speed of 1000 Mbps */
643#define PHY_CT_SP100 PHY_CT_SPS_LSB /* enable speed of 100 Mbps */
644#define PHY_CT_SP10 (0) /* enable speed of 10 Mbps */
645
646
647/***** PHY_XMAC_STAT 16 bit r/w PHY Status Register *****/
648/***** PHY_BCOM_STAT 16 bit r/w PHY Status Register *****/
649/***** PHY_MARV_STAT 16 bit r/w PHY Status Register *****/
650/***** PHY_LONE_STAT 16 bit r/w PHY Status Register *****/
651 /* Bit 15..9: reserved */
652 /* (BC/L1) 100/10 Mbps cap bits ignored*/
653#define PHY_ST_EXT_ST (1<<8) /* Bit 8: Extended Status Present */
654 /* Bit 7: reserved */
655#define PHY_ST_PRE_SUP (1<<6) /* Bit 6: (BC/L1) preamble suppression */
656#define PHY_ST_AN_OVER (1<<5) /* Bit 5: Auto-Negotiation Over */
657#define PHY_ST_REM_FLT (1<<4) /* Bit 4: Remote Fault Condition Occured */
658#define PHY_ST_AN_CAP (1<<3) /* Bit 3: Auto-Negotiation Capability */
659#define PHY_ST_LSYNC (1<<2) /* Bit 2: Link Synchronized */
660#define PHY_ST_JAB_DET (1<<1) /* Bit 1: (BC/L1) Jabber Detected */
661#define PHY_ST_EXT_REG (1<<0) /* Bit 0: Extended Register available */
662
663
664/***** PHY_XMAC_ID1 16 bit r/o PHY ID1 Register */
665/***** PHY_BCOM_ID1 16 bit r/o PHY ID1 Register */
666/***** PHY_MARV_ID1 16 bit r/o PHY ID1 Register */
667/***** PHY_LONE_ID1 16 bit r/o PHY ID1 Register */
668#define PHY_I1_OUI_MSK (0x3f<<10) /* Bit 15..10: Organization Unique ID */
669#define PHY_I1_MOD_NUM (0x3f<<4) /* Bit 9.. 4: Model Number */
670#define PHY_I1_REV_MSK 0x0f /* Bit 3.. 0: Revision Number */
671
672/* different Broadcom PHY Ids */
673#define PHY_BCOM_ID1_A1 0x6041
674#define PHY_BCOM_ID1_B2 0x6043
675#define PHY_BCOM_ID1_C0 0x6044
676#define PHY_BCOM_ID1_C5 0x6047
677
678
679/***** PHY_XMAC_AUNE_ADV 16 bit r/w Auto-Negotiation Advertisement *****/
680/***** PHY_XMAC_AUNE_LP 16 bit r/o Link Partner Ability Reg *****/
681#define PHY_AN_NXT_PG (1<<15) /* Bit 15: Request Next Page */
682#define PHY_X_AN_ACK (1<<14) /* Bit 14: (ro) Acknowledge Received */
683#define PHY_X_AN_RFB (3<<12) /* Bit 13..12: Remote Fault Bits */
684 /* Bit 11.. 9: reserved */
685#define PHY_X_AN_PAUSE (3<<7) /* Bit 8.. 7: Pause Bits */
686#define PHY_X_AN_HD (1<<6) /* Bit 6: Half Duplex */
687#define PHY_X_AN_FD (1<<5) /* Bit 5: Full Duplex */
688 /* Bit 4.. 0: reserved */
689
690/***** PHY_BCOM_AUNE_ADV 16 bit r/w Auto-Negotiation Advertisement *****/
691/***** PHY_BCOM_AUNE_LP 16 bit r/o Link Partner Ability Reg *****/
692/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */
693 /* Bit 14: reserved */
694#define PHY_B_AN_RF (1<<13) /* Bit 13: Remote Fault */
695 /* Bit 12: reserved */
696#define PHY_B_AN_ASP (1<<11) /* Bit 11: Asymmetric Pause */
697#define PHY_B_AN_PC (1<<10) /* Bit 10: Pause Capable */
698 /* Bit 9..5: 100/10 BT cap bits ingnored */
699#define PHY_B_AN_SEL 0x1f /* Bit 4..0: Selector Field, 00001=Ethernet*/
700
701/***** PHY_LONE_AUNE_ADV 16 bit r/w Auto-Negotiation Advertisement *****/
702/***** PHY_LONE_AUNE_LP 16 bit r/o Link Partner Ability Reg *****/
703/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */
704 /* Bit 14: reserved */
705#define PHY_L_AN_RF (1<<13) /* Bit 13: Remote Fault */
706 /* Bit 12: reserved */
707#define PHY_L_AN_ASP (1<<11) /* Bit 11: Asymmetric Pause */
708#define PHY_L_AN_PC (1<<10) /* Bit 10: Pause Capable */
709 /* Bit 9..5: 100/10 BT cap bits ingnored */
710#define PHY_L_AN_SEL 0x1f /* Bit 4..0: Selector Field, 00001=Ethernet*/
711
712/***** PHY_NAT_AUNE_ADV 16 bit r/w Auto-Negotiation Advertisement *****/
713/***** PHY_NAT_AUNE_LP 16 bit r/o Link Partner Ability Reg *****/
714/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */
715 /* Bit 14: reserved */
716#define PHY_N_AN_RF (1<<13) /* Bit 13: Remote Fault */
717 /* Bit 12: reserved */
718#define PHY_N_AN_100F (1<<11) /* Bit 11: 100Base-T2 FD Support */
719#define PHY_N_AN_100H (1<<10) /* Bit 10: 100Base-T2 HD Support */
720 /* Bit 9..5: 100/10 BT cap bits ingnored */
721#define PHY_N_AN_SEL 0x1f /* Bit 4..0: Selector Field, 00001=Ethernet*/
722
723/* field type definition for PHY_x_AN_SEL */
724#define PHY_SEL_TYPE 0x01 /* 00001 = Ethernet */
725
726/***** PHY_XMAC_AUNE_EXP 16 bit r/o Auto-Negotiation Expansion Reg *****/
727 /* Bit 15..4: reserved */
728#define PHY_ANE_LP_NP (1<<3) /* Bit 3: Link Partner can Next Page */
729#define PHY_ANE_LOC_NP (1<<2) /* Bit 2: Local PHY can Next Page */
730#define PHY_ANE_RX_PG (1<<1) /* Bit 1: Page Received */
731 /* Bit 0: reserved */
732
733/***** PHY_BCOM_AUNE_EXP 16 bit r/o Auto-Negotiation Expansion Reg *****/
734/***** PHY_LONE_AUNE_EXP 16 bit r/o Auto-Negotiation Expansion Reg *****/
735/***** PHY_MARV_AUNE_EXP 16 bit r/o Auto-Negotiation Expansion Reg *****/
736 /* Bit 15..5: reserved */
737#define PHY_ANE_PAR_DF (1<<4) /* Bit 4: Parallel Detection Fault */
738/* PHY_ANE_LP_NP (see XMAC) Bit 3: Link Partner can Next Page */
739/* PHY_ANE_LOC_NP (see XMAC) Bit 2: Local PHY can Next Page */
740/* PHY_ANE_RX_PG (see XMAC) Bit 1: Page Received */
741#define PHY_ANE_LP_CAP (1<<0) /* Bit 0: Link Partner Auto-Neg. Cap. */
742
743/***** PHY_XMAC_NEPG 16 bit r/w Next Page Register *****/
744/***** PHY_BCOM_NEPG 16 bit r/w Next Page Register *****/
745/***** PHY_LONE_NEPG 16 bit r/w Next Page Register *****/
746/***** PHY_XMAC_NEPG_LP 16 bit r/o Next Page Link Partner *****/
747/***** PHY_BCOM_NEPG_LP 16 bit r/o Next Page Link Partner *****/
748/***** PHY_LONE_NEPG_LP 16 bit r/o Next Page Link Partner *****/
749#define PHY_NP_MORE (1<<15) /* Bit 15: More, Next Pages to follow */
750#define PHY_NP_ACK1 (1<<14) /* Bit 14: (ro) Ack1, for receiving a message */
751#define PHY_NP_MSG_VAL (1<<13) /* Bit 13: Message Page valid */
752#define PHY_NP_ACK2 (1<<12) /* Bit 12: Ack2, comply with msg content */
753#define PHY_NP_TOG (1<<11) /* Bit 11: Toggle Bit, ensure sync */
754#define PHY_NP_MSG 0x07ff /* Bit 10..0: Message from/to Link Partner */
755
756/*
757 * XMAC-Specific
758 */
759/***** PHY_XMAC_EXT_STAT 16 bit r/w Extended Status Register *****/
760#define PHY_X_EX_FD (1<<15) /* Bit 15: Device Supports Full Duplex */
761#define PHY_X_EX_HD (1<<14) /* Bit 14: Device Supports Half Duplex */
762 /* Bit 13..0: reserved */
763
764/***** PHY_XMAC_RES_ABI 16 bit r/o PHY Resolved Ability *****/
765 /* Bit 15..9: reserved */
766#define PHY_X_RS_PAUSE (3<<7) /* Bit 8..7: selected Pause Mode */
767#define PHY_X_RS_HD (1<<6) /* Bit 6: Half Duplex Mode selected */
768#define PHY_X_RS_FD (1<<5) /* Bit 5: Full Duplex Mode selected */
769#define PHY_X_RS_ABLMIS (1<<4) /* Bit 4: duplex or pause cap mismatch */
770#define PHY_X_RS_PAUMIS (1<<3) /* Bit 3: pause capability mismatch */
771 /* Bit 2..0: reserved */
772/*
773 * Remote Fault Bits (PHY_X_AN_RFB) encoding
774 */
775#define X_RFB_OK (0<<12) /* Bit 13..12 No errors, Link OK */
776#define X_RFB_LF (1<<12) /* Bit 13..12 Link Failure */
777#define X_RFB_OFF (2<<12) /* Bit 13..12 Offline */
778#define X_RFB_AN_ERR (3<<12) /* Bit 13..12 Auto-Negotiation Error */
779
780/*
781 * Pause Bits (PHY_X_AN_PAUSE and PHY_X_RS_PAUSE) encoding
782 */
783#define PHY_X_P_NO_PAUSE (0<<7) /* Bit 8..7: no Pause Mode */
784#define PHY_X_P_SYM_MD (1<<7) /* Bit 8..7: symmetric Pause Mode */
785#define PHY_X_P_ASYM_MD (2<<7) /* Bit 8..7: asymmetric Pause Mode */
786#define PHY_X_P_BOTH_MD (3<<7) /* Bit 8..7: both Pause Mode */
787
788
789/*
790 * Broadcom-Specific
791 */
792/***** PHY_BCOM_1000T_CTRL 16 bit r/w 1000Base-T Control Reg *****/
793#define PHY_B_1000C_TEST (7<<13) /* Bit 15..13: Test Modes */
794#define PHY_B_1000C_MSE (1<<12) /* Bit 12: Master/Slave Enable */
795#define PHY_B_1000C_MSC (1<<11) /* Bit 11: M/S Configuration */
796#define PHY_B_1000C_RD (1<<10) /* Bit 10: Repeater/DTE */
797#define PHY_B_1000C_AFD (1<<9) /* Bit 9: Advertise Full Duplex */
798#define PHY_B_1000C_AHD (1<<8) /* Bit 8: Advertise Half Duplex */
799 /* Bit 7..0: reserved */
800
801/***** PHY_BCOM_1000T_STAT 16 bit r/o 1000Base-T Status Reg *****/
802/***** PHY_MARV_1000T_STAT 16 bit r/o 1000Base-T Status Reg *****/
803#define PHY_B_1000S_MSF (1<<15) /* Bit 15: Master/Slave Fault */
804#define PHY_B_1000S_MSR (1<<14) /* Bit 14: Master/Slave Result */
805#define PHY_B_1000S_LRS (1<<13) /* Bit 13: Local Receiver Status */
806#define PHY_B_1000S_RRS (1<<12) /* Bit 12: Remote Receiver Status */
807#define PHY_B_1000S_LP_FD (1<<11) /* Bit 11: Link Partner can FD */
808#define PHY_B_1000S_LP_HD (1<<10) /* Bit 10: Link Partner can HD */
809 /* Bit 9..8: reserved */
810#define PHY_B_1000S_IEC 0xff /* Bit 7..0: Idle Error Count */
811
812/***** PHY_BCOM_EXT_STAT 16 bit r/o Extended Status Register *****/
813#define PHY_B_ES_X_FD_CAP (1<<15) /* Bit 15: 1000Base-X FD capable */
814#define PHY_B_ES_X_HD_CAP (1<<14) /* Bit 14: 1000Base-X HD capable */
815#define PHY_B_ES_T_FD_CAP (1<<13) /* Bit 13: 1000Base-T FD capable */
816#define PHY_B_ES_T_HD_CAP (1<<12) /* Bit 12: 1000Base-T HD capable */
817 /* Bit 11..0: reserved */
818
819/***** PHY_BCOM_P_EXT_CTRL 16 bit r/w PHY Extended Control Reg *****/
820#define PHY_B_PEC_MAC_PHY (1<<15) /* Bit 15: 10BIT/GMI-Interface */
821#define PHY_B_PEC_DIS_CROSS (1<<14) /* Bit 14: Disable MDI Crossover */
822#define PHY_B_PEC_TX_DIS (1<<13) /* Bit 13: Tx output Disabled */
823#define PHY_B_PEC_INT_DIS (1<<12) /* Bit 12: Interrupts Disabled */
824#define PHY_B_PEC_F_INT (1<<11) /* Bit 11: Force Interrupt */
825#define PHY_B_PEC_BY_45 (1<<10) /* Bit 10: Bypass 4B5B-Decoder */
826#define PHY_B_PEC_BY_SCR (1<<9) /* Bit 9: Bypass Scrambler */
827#define PHY_B_PEC_BY_MLT3 (1<<8) /* Bit 8: Bypass MLT3 Encoder */
828#define PHY_B_PEC_BY_RXA (1<<7) /* Bit 7: Bypass Rx Alignm. */
829#define PHY_B_PEC_RES_SCR (1<<6) /* Bit 6: Reset Scrambler */
830#define PHY_B_PEC_EN_LTR (1<<5) /* Bit 5: Ena LED Traffic Mode */
831#define PHY_B_PEC_LED_ON (1<<4) /* Bit 4: Force LED's on */
832#define PHY_B_PEC_LED_OFF (1<<3) /* Bit 3: Force LED's off */
833#define PHY_B_PEC_EX_IPG (1<<2) /* Bit 2: Extend Tx IPG Mode */
834#define PHY_B_PEC_3_LED (1<<1) /* Bit 1: Three Link LED mode */
835#define PHY_B_PEC_HIGH_LA (1<<0) /* Bit 0: GMII FIFO Elasticy */
836
837/***** PHY_BCOM_P_EXT_STAT 16 bit r/o PHY Extended Status Reg *****/
838 /* Bit 15..14: reserved */
839#define PHY_B_PES_CROSS_STAT (1<<13) /* Bit 13: MDI Crossover Status */
840#define PHY_B_PES_INT_STAT (1<<12) /* Bit 12: Interrupt Status */
841#define PHY_B_PES_RRS (1<<11) /* Bit 11: Remote Receiver Stat. */
842#define PHY_B_PES_LRS (1<<10) /* Bit 10: Local Receiver Stat. */
843#define PHY_B_PES_LOCKED (1<<9) /* Bit 9: Locked */
844#define PHY_B_PES_LS (1<<8) /* Bit 8: Link Status */
845#define PHY_B_PES_RF (1<<7) /* Bit 7: Remote Fault */
846#define PHY_B_PES_CE_ER (1<<6) /* Bit 6: Carrier Ext Error */
847#define PHY_B_PES_BAD_SSD (1<<5) /* Bit 5: Bad SSD */
848#define PHY_B_PES_BAD_ESD (1<<4) /* Bit 4: Bad ESD */
849#define PHY_B_PES_RX_ER (1<<3) /* Bit 3: Receive Error */
850#define PHY_B_PES_TX_ER (1<<2) /* Bit 2: Transmit Error */
851#define PHY_B_PES_LOCK_ER (1<<1) /* Bit 1: Lock Error */
852#define PHY_B_PES_MLT3_ER (1<<0) /* Bit 0: MLT3 code Error */
853
854/***** PHY_BCOM_FC_CTR 16 bit r/w False Carrier Counter *****/
855 /* Bit 15..8: reserved */
856#define PHY_B_FC_CTR 0xff /* Bit 7..0: False Carrier Counter */
857
858/***** PHY_BCOM_RNO_CTR 16 bit r/w Receive NOT_OK Counter *****/
859#define PHY_B_RC_LOC_MSK 0xff00 /* Bit 15..8: Local Rx NOT_OK cnt */
860#define PHY_B_RC_REM_MSK 0x00ff /* Bit 7..0: Remote Rx NOT_OK cnt */
861
862/***** PHY_BCOM_AUX_CTRL 16 bit r/w Auxiliary Control Reg *****/
863#define PHY_B_AC_L_SQE (1<<15) /* Bit 15: Low Squelch */
864#define PHY_B_AC_LONG_PACK (1<<14) /* Bit 14: Rx Long Packets */
865#define PHY_B_AC_ER_CTRL (3<<12) /* Bit 13..12: Edgerate Control */
866 /* Bit 11: reserved */
867#define PHY_B_AC_TX_TST (1<<10) /* Bit 10: Tx test bit, always 1 */
868 /* Bit 9.. 8: reserved */
869#define PHY_B_AC_DIS_PRF (1<<7) /* Bit 7: dis part resp filter */
870 /* Bit 6: reserved */
871#define PHY_B_AC_DIS_PM (1<<5) /* Bit 5: dis power management */
872 /* Bit 4: reserved */
873#define PHY_B_AC_DIAG (1<<3) /* Bit 3: Diagnostic Mode */
874 /* Bit 2.. 0: reserved */
875
876/***** PHY_BCOM_AUX_STAT 16 bit r/o Auxiliary Status Reg *****/
877#define PHY_B_AS_AN_C (1<<15) /* Bit 15: AutoNeg complete */
878#define PHY_B_AS_AN_CA (1<<14) /* Bit 14: AN Complete Ack */
879#define PHY_B_AS_ANACK_D (1<<13) /* Bit 13: AN Ack Detect */
880#define PHY_B_AS_ANAB_D (1<<12) /* Bit 12: AN Ability Detect */
881#define PHY_B_AS_NPW (1<<11) /* Bit 11: AN Next Page Wait */
882#define PHY_B_AS_AN_RES_MSK (7<<8) /* Bit 10..8: AN HDC */
883#define PHY_B_AS_PDF (1<<7) /* Bit 7: Parallel Detect. Fault */
884#define PHY_B_AS_RF (1<<6) /* Bit 6: Remote Fault */
885#define PHY_B_AS_ANP_R (1<<5) /* Bit 5: AN Page Received */
886#define PHY_B_AS_LP_ANAB (1<<4) /* Bit 4: LP AN Ability */
887#define PHY_B_AS_LP_NPAB (1<<3) /* Bit 3: LP Next Page Ability */
888#define PHY_B_AS_LS (1<<2) /* Bit 2: Link Status */
889#define PHY_B_AS_PRR (1<<1) /* Bit 1: Pause Resolution-Rx */
890#define PHY_B_AS_PRT (1<<0) /* Bit 0: Pause Resolution-Tx */
891
892#define PHY_B_AS_PAUSE_MSK (PHY_B_AS_PRR | PHY_B_AS_PRT)
893
894/***** PHY_BCOM_INT_STAT 16 bit r/o Interrupt Status Reg *****/
895/***** PHY_BCOM_INT_MASK 16 bit r/w Interrupt Mask Reg *****/
896 /* Bit 15: reserved */
897#define PHY_B_IS_PSE (1<<14) /* Bit 14: Pair Swap Error */
898#define PHY_B_IS_MDXI_SC (1<<13) /* Bit 13: MDIX Status Change */
899#define PHY_B_IS_HCT (1<<12) /* Bit 12: counter above 32k */
900#define PHY_B_IS_LCT (1<<11) /* Bit 11: counter above 128 */
901#define PHY_B_IS_AN_PR (1<<10) /* Bit 10: Page Received */
902#define PHY_B_IS_NO_HDCL (1<<9) /* Bit 9: No HCD Link */
903#define PHY_B_IS_NO_HDC (1<<8) /* Bit 8: No HCD */
904#define PHY_B_IS_NEG_USHDC (1<<7) /* Bit 7: Negotiated Unsup. HCD */
905#define PHY_B_IS_SCR_S_ER (1<<6) /* Bit 6: Scrambler Sync Error */
906#define PHY_B_IS_RRS_CHANGE (1<<5) /* Bit 5: Remote Rx Stat Change */
907#define PHY_B_IS_LRS_CHANGE (1<<4) /* Bit 4: Local Rx Stat Change */
908#define PHY_B_IS_DUP_CHANGE (1<<3) /* Bit 3: Duplex Mode Change */
909#define PHY_B_IS_LSP_CHANGE (1<<2) /* Bit 2: Link Speed Change */
910#define PHY_B_IS_LST_CHANGE (1<<1) /* Bit 1: Link Status Changed */
911#define PHY_B_IS_CRC_ER (1<<0) /* Bit 0: CRC Error */
912
913#define PHY_B_DEF_MSK (~(PHY_B_IS_AN_PR | PHY_B_IS_LST_CHANGE))
914
915/* Pause Bits (PHY_B_AN_ASP and PHY_B_AN_PC) encoding */
916#define PHY_B_P_NO_PAUSE (0<<10) /* Bit 11..10: no Pause Mode */
917#define PHY_B_P_SYM_MD (1<<10) /* Bit 11..10: symmetric Pause Mode */
918#define PHY_B_P_ASYM_MD (2<<10) /* Bit 11..10: asymmetric Pause Mode */
919#define PHY_B_P_BOTH_MD (3<<10) /* Bit 11..10: both Pause Mode */
920
921/*
922 * Resolved Duplex mode and Capabilities (Aux Status Summary Reg)
923 */
924#define PHY_B_RES_1000FD (7<<8) /* Bit 10..8: 1000Base-T Full Dup. */
925#define PHY_B_RES_1000HD (6<<8) /* Bit 10..8: 1000Base-T Half Dup. */
926/* others: 100/10: invalid for us */
927
928/*
929 * Level One-Specific
930 */
931/***** PHY_LONE_1000T_CTRL 16 bit r/w 1000Base-T Control Reg *****/
932#define PHY_L_1000C_TEST (7<<13) /* Bit 15..13: Test Modes */
933#define PHY_L_1000C_MSE (1<<12) /* Bit 12: Master/Slave Enable */
934#define PHY_L_1000C_MSC (1<<11) /* Bit 11: M/S Configuration */
935#define PHY_L_1000C_RD (1<<10) /* Bit 10: Repeater/DTE */
936#define PHY_L_1000C_AFD (1<<9) /* Bit 9: Advertise Full Duplex */
937#define PHY_L_1000C_AHD (1<<8) /* Bit 8: Advertise Half Duplex */
938 /* Bit 7..0: reserved */
939
940/***** PHY_LONE_1000T_STAT 16 bit r/o 1000Base-T Status Reg *****/
941#define PHY_L_1000S_MSF (1<<15) /* Bit 15: Master/Slave Fault */
942#define PHY_L_1000S_MSR (1<<14) /* Bit 14: Master/Slave Result */
943#define PHY_L_1000S_LRS (1<<13) /* Bit 13: Local Receiver Status */
944#define PHY_L_1000S_RRS (1<<12) /* Bit 12: Remote Receiver Status */
945#define PHY_L_1000S_LP_FD (1<<11) /* Bit 11: Link Partner can FD */
946#define PHY_L_1000S_LP_HD (1<<10) /* Bit 10: Link Partner can HD */
947 /* Bit 9..8: reserved */
948#define PHY_B_1000S_IEC 0xff /* Bit 7..0: Idle Error Count */
949
950/***** PHY_LONE_EXT_STAT 16 bit r/o Extended Status Register *****/
951#define PHY_L_ES_X_FD_CAP (1<<15) /* Bit 15: 1000Base-X FD capable */
952#define PHY_L_ES_X_HD_CAP (1<<14) /* Bit 14: 1000Base-X HD capable */
953#define PHY_L_ES_T_FD_CAP (1<<13) /* Bit 13: 1000Base-T FD capable */
954#define PHY_L_ES_T_HD_CAP (1<<12) /* Bit 12: 1000Base-T HD capable */
955 /* Bit 11..0: reserved */
956
957/***** PHY_LONE_PORT_CFG 16 bit r/w Port Configuration Reg *****/
958#define PHY_L_PC_REP_MODE (1<<15) /* Bit 15: Repeater Mode */
959 /* Bit 14: reserved */
960#define PHY_L_PC_TX_DIS (1<<13) /* Bit 13: Tx output Disabled */
961#define PHY_L_PC_BY_SCR (1<<12) /* Bit 12: Bypass Scrambler */
962#define PHY_L_PC_BY_45 (1<<11) /* Bit 11: Bypass 4B5B-Decoder */
963#define PHY_L_PC_JAB_DIS (1<<10) /* Bit 10: Jabber Disabled */
964#define PHY_L_PC_SQE (1<<9) /* Bit 9: Enable Heartbeat */
965#define PHY_L_PC_TP_LOOP (1<<8) /* Bit 8: TP Loopback */
966#define PHY_L_PC_SSS (1<<7) /* Bit 7: Smart Speed Selection */
967#define PHY_L_PC_FIFO_SIZE (1<<6) /* Bit 6: FIFO Size */
968#define PHY_L_PC_PRE_EN (1<<5) /* Bit 5: Preamble Enable */
969#define PHY_L_PC_CIM (1<<4) /* Bit 4: Carrier Integrity Mon */
970#define PHY_L_PC_10_SER (1<<3) /* Bit 3: Use Serial Output */
971#define PHY_L_PC_ANISOL (1<<2) /* Bit 2: Unisolate Port */
972#define PHY_L_PC_TEN_BIT (1<<1) /* Bit 1: 10bit iface mode on */
973#define PHY_L_PC_ALTCLOCK (1<<0) /* Bit 0: (ro) ALTCLOCK Mode on */
974
975/***** PHY_LONE_Q_STAT 16 bit r/o Quick Status Reg *****/
976#define PHY_L_QS_D_RATE (3<<14) /* Bit 15..14: Data Rate */
977#define PHY_L_QS_TX_STAT (1<<13) /* Bit 13: Transmitting */
978#define PHY_L_QS_RX_STAT (1<<12) /* Bit 12: Receiving */
979#define PHY_L_QS_COL_STAT (1<<11) /* Bit 11: Collision */
980#define PHY_L_QS_L_STAT (1<<10) /* Bit 10: Link is up */
981#define PHY_L_QS_DUP_MOD (1<<9) /* Bit 9: Full/Half Duplex */
982#define PHY_L_QS_AN (1<<8) /* Bit 8: AutoNeg is On */
983#define PHY_L_QS_AN_C (1<<7) /* Bit 7: AN is Complete */
984#define PHY_L_QS_LLE (7<<4) /* Bit 6: Line Length Estim. */
985#define PHY_L_QS_PAUSE (1<<3) /* Bit 3: LP advertised Pause */
986#define PHY_L_QS_AS_PAUSE (1<<2) /* Bit 2: LP adv. asym. Pause */
987#define PHY_L_QS_ISOLATE (1<<1) /* Bit 1: CIM Isolated */
988#define PHY_L_QS_EVENT (1<<0) /* Bit 0: Event has occurred */
989
990/***** PHY_LONE_INT_ENAB 16 bit r/w Interrupt Enable Reg *****/
991/***** PHY_LONE_INT_STAT 16 bit r/o Interrupt Status Reg *****/
992 /* Bit 15..14: reserved */
993#define PHY_L_IS_AN_F (1<<13) /* Bit 13: Auto-Negotiation fault */
994 /* Bit 12: not described */
995#define PHY_L_IS_CROSS (1<<11) /* Bit 11: Crossover used */
996#define PHY_L_IS_POL (1<<10) /* Bit 10: Polarity correct. used */
997#define PHY_L_IS_SS (1<<9) /* Bit 9: Smart Speed Downgrade */
998#define PHY_L_IS_CFULL (1<<8) /* Bit 8: Counter Full */
999#define PHY_L_IS_AN_C (1<<7) /* Bit 7: AutoNeg Complete */
1000#define PHY_L_IS_SPEED (1<<6) /* Bit 6: Speed Changed */
1001#define PHY_L_IS_DUP (1<<5) /* Bit 5: Duplex Changed */
1002#define PHY_L_IS_LS (1<<4) /* Bit 4: Link Status Changed */
1003#define PHY_L_IS_ISOL (1<<3) /* Bit 3: Isolate Occured */
1004#define PHY_L_IS_MDINT (1<<2) /* Bit 2: (ro) STAT: MII Int Pending */
1005#define PHY_L_IS_INTEN (1<<1) /* Bit 1: ENAB: Enable IRQs */
1006#define PHY_L_IS_FORCE (1<<0) /* Bit 0: ENAB: Force Interrupt */
1007
1008/* int. mask */
1009#define PHY_L_DEF_MSK (PHY_L_IS_LS | PHY_L_IS_ISOL | PHY_L_IS_INTEN)
1010
1011/***** PHY_LONE_LED_CFG 16 bit r/w LED Configuration Reg *****/
1012#define PHY_L_LC_LEDC (3<<14) /* Bit 15..14: Col/Blink/On/Off */
1013#define PHY_L_LC_LEDR (3<<12) /* Bit 13..12: Rx/Blink/On/Off */
1014#define PHY_L_LC_LEDT (3<<10) /* Bit 11..10: Tx/Blink/On/Off */
1015#define PHY_L_LC_LEDG (3<<8) /* Bit 9..8: Giga/Blink/On/Off */
1016#define PHY_L_LC_LEDS (3<<6) /* Bit 7..6: 10-100/Blink/On/Off */
1017#define PHY_L_LC_LEDL (3<<4) /* Bit 5..4: Link/Blink/On/Off */
1018#define PHY_L_LC_LEDF (3<<2) /* Bit 3..2: Duplex/Blink/On/Off */
1019#define PHY_L_LC_PSTRECH (1<<1) /* Bit 1: Strech LED Pulses */
1020#define PHY_L_LC_FREQ (1<<0) /* Bit 0: 30/100 ms */
1021
1022/***** PHY_LONE_PORT_CTRL 16 bit r/w Port Control Reg *****/
1023#define PHY_L_PC_TX_TCLK (1<<15) /* Bit 15: Enable TX_TCLK */
1024 /* Bit 14: reserved */
1025#define PHY_L_PC_ALT_NP (1<<13) /* Bit 14: Alternate Next Page */
1026#define PHY_L_PC_GMII_ALT (1<<12) /* Bit 13: Alternate GMII driver */
1027 /* Bit 11: reserved */
1028#define PHY_L_PC_TEN_CRS (1<<10) /* Bit 10: Extend CRS*/
1029 /* Bit 9..0: not described */
1030
1031/***** PHY_LONE_CIM 16 bit r/o CIM Reg *****/
1032#define PHY_L_CIM_ISOL (255<<8)/* Bit 15..8: Isolate Count */
1033#define PHY_L_CIM_FALSE_CAR (255<<0)/* Bit 7..0: False Carrier Count */
1034
1035
1036/*
1037 * Pause Bits (PHY_L_AN_ASP and PHY_L_AN_PC) encoding
1038 */
1039#define PHY_L_P_NO_PAUSE (0<<10) /* Bit 11..10: no Pause Mode */
1040#define PHY_L_P_SYM_MD (1<<10) /* Bit 11..10: symmetric Pause Mode */
1041#define PHY_L_P_ASYM_MD (2<<10) /* Bit 11..10: asymmetric Pause Mode */
1042#define PHY_L_P_BOTH_MD (3<<10) /* Bit 11..10: both Pause Mode */
1043
1044
1045/*
1046 * National-Specific
1047 */
1048/***** PHY_NAT_1000T_CTRL 16 bit r/w 1000Base-T Control Reg *****/
1049#define PHY_N_1000C_TEST (7<<13) /* Bit 15..13: Test Modes */
1050#define PHY_N_1000C_MSE (1<<12) /* Bit 12: Master/Slave Enable */
1051#define PHY_N_1000C_MSC (1<<11) /* Bit 11: M/S Configuration */
1052#define PHY_N_1000C_RD (1<<10) /* Bit 10: Repeater/DTE */
1053#define PHY_N_1000C_AFD (1<<9) /* Bit 9: Advertise Full Duplex */
1054#define PHY_N_1000C_AHD (1<<8) /* Bit 8: Advertise Half Duplex */
1055#define PHY_N_1000C_APC (1<<7) /* Bit 7: Asymmetric Pause Cap. */
1056 /* Bit 6..0: reserved */
1057
1058/***** PHY_NAT_1000T_STAT 16 bit r/o 1000Base-T Status Reg *****/
1059#define PHY_N_1000S_MSF (1<<15) /* Bit 15: Master/Slave Fault */
1060#define PHY_N_1000S_MSR (1<<14) /* Bit 14: Master/Slave Result */
1061#define PHY_N_1000S_LRS (1<<13) /* Bit 13: Local Receiver Status */
1062#define PHY_N_1000S_RRS (1<<12) /* Bit 12: Remote Receiver Status*/
1063#define PHY_N_1000S_LP_FD (1<<11) /* Bit 11: Link Partner can FD */
1064#define PHY_N_1000S_LP_HD (1<<10) /* Bit 10: Link Partner can HD */
1065#define PHY_N_1000C_LP_APC (1<<9) /* Bit 9: LP Asym. Pause Cap. */
1066 /* Bit 8: reserved */
1067#define PHY_N_1000S_IEC 0xff /* Bit 7..0: Idle Error Count */
1068
1069/***** PHY_NAT_EXT_STAT 16 bit r/o Extended Status Register *****/
1070#define PHY_N_ES_X_FD_CAP (1<<15) /* Bit 15: 1000Base-X FD capable */
1071#define PHY_N_ES_X_HD_CAP (1<<14) /* Bit 14: 1000Base-X HD capable */
1072#define PHY_N_ES_T_FD_CAP (1<<13) /* Bit 13: 1000Base-T FD capable */
1073#define PHY_N_ES_T_HD_CAP (1<<12) /* Bit 12: 1000Base-T HD capable */
1074 /* Bit 11..0: reserved */
1075
1076/* todo: those are still missing */
1077/***** PHY_NAT_EXT_CTRL1 16 bit r/o Extended Control Reg1 *****/
1078/***** PHY_NAT_Q_STAT1 16 bit r/o Quick Status Reg1 *****/
1079/***** PHY_NAT_10B_OP 16 bit r/o 10Base-T Operations Reg *****/
1080/***** PHY_NAT_EXT_CTRL2 16 bit r/o Extended Control Reg1 *****/
1081/***** PHY_NAT_Q_STAT2 16 bit r/o Quick Status Reg2 *****/
1082/***** PHY_NAT_PHY_ADDR 16 bit r/o PHY Address Register *****/
1083
1084/*
1085 * Marvell-Specific
1086 */
1087/***** PHY_MARV_AUNE_ADV 16 bit r/w Auto-Negotiation Advertisement *****/
1088/***** PHY_MARV_AUNE_LP 16 bit r/w Link Part Ability Reg *****/
1089#define PHY_M_AN_NXT_PG BIT_15 /* Request Next Page */
1090#define PHY_M_AN_ACK BIT_14 /* (ro) Acknowledge Received */
1091#define PHY_M_AN_RF BIT_13 /* Remote Fault */
1092 /* Bit 12: reserved */
1093#define PHY_M_AN_ASP BIT_11 /* Asymmetric Pause */
1094#define PHY_M_AN_PC BIT_10 /* MAC Pause implemented */
1095#define PHY_M_AN_100_FD BIT_8 /* Advertise 100Base-TX Full Duplex */
1096#define PHY_M_AN_100_HD BIT_7 /* Advertise 100Base-TX Half Duplex */
1097#define PHY_M_AN_10_FD BIT_6 /* Advertise 10Base-TX Full Duplex */
1098#define PHY_M_AN_10_HD BIT_5 /* Advertise 10Base-TX Half Duplex */
1099
1100/* special defines for FIBER (88E1011S only) */
1101#define PHY_M_AN_ASP_X BIT_8 /* Asymmetric Pause */
1102#define PHY_M_AN_PC_X BIT_7 /* MAC Pause implemented */
1103#define PHY_M_AN_1000X_AHD BIT_6 /* Advertise 10000Base-X Half Duplex */
1104#define PHY_M_AN_1000X_AFD BIT_5 /* Advertise 10000Base-X Full Duplex */
1105
1106/* Pause Bits (PHY_M_AN_ASP_X and PHY_M_AN_PC_X) encoding */
1107#define PHY_M_P_NO_PAUSE_X (0<<7) /* Bit 8.. 7: no Pause Mode */
1108#define PHY_M_P_SYM_MD_X (1<<7) /* Bit 8.. 7: symmetric Pause Mode */
1109#define PHY_M_P_ASYM_MD_X (2<<7) /* Bit 8.. 7: asymmetric Pause Mode */
1110#define PHY_M_P_BOTH_MD_X (3<<7) /* Bit 8.. 7: both Pause Mode */
1111
1112/***** PHY_MARV_1000T_CTRL 16 bit r/w 1000Base-T Control Reg *****/
1113#define PHY_M_1000C_TEST (7<<13) /* Bit 15..13: Test Modes */
1114#define PHY_M_1000C_MSE (1<<12) /* Bit 12: Manual Master/Slave Enable */
1115#define PHY_M_1000C_MSC (1<<11) /* Bit 11: M/S Configuration (1=Master) */
1116#define PHY_M_1000C_MPD (1<<10) /* Bit 10: Multi-Port Device */
1117#define PHY_M_1000C_AFD (1<<9) /* Bit 9: Advertise Full Duplex */
1118#define PHY_M_1000C_AHD (1<<8) /* Bit 8: Advertise Half Duplex */
1119 /* Bit 7..0: reserved */
1120
1121/***** PHY_MARV_PHY_CTRL 16 bit r/w PHY Specific Ctrl Reg *****/
1122#define PHY_M_PC_TX_FFD_MSK (3<<14) /* Bit 15..14: Tx FIFO Depth Mask */
1123#define PHY_M_PC_RX_FFD_MSK (3<<12) /* Bit 13..12: Rx FIFO Depth Mask */
1124#define PHY_M_PC_ASS_CRS_TX (1<<11) /* Bit 11: Assert CRS on Transmit */
1125#define PHY_M_PC_FL_GOOD (1<<10) /* Bit 10: Force Link Good */
1126#define PHY_M_PC_EN_DET_MSK (3<<8) /* Bit 9.. 8: Energy Detect Mask */
1127#define PHY_M_PC_ENA_EXT_D (1<<7) /* Bit 7: Enable Ext. Distance (10BT) */
1128#define PHY_M_PC_MDIX_MSK (3<<5) /* Bit 6.. 5: MDI/MDIX Config. Mask */
1129#define PHY_M_PC_DIS_125CLK (1<<4) /* Bit 4: Disable 125 CLK */
1130#define PHY_M_PC_MAC_POW_UP (1<<3) /* Bit 3: MAC Power up */
1131#define PHY_M_PC_SQE_T_ENA (1<<2) /* Bit 2: SQE Test Enabled */
1132#define PHY_M_PC_POL_R_DIS (1<<1) /* Bit 1: Polarity Reversal Disabled */
1133#define PHY_M_PC_DIS_JABBER (1<<0) /* Bit 0: Disable Jabber */
1134
1135#define PHY_M_PC_EN_DET SHIFT8(2) /* Energy Detect (Mode 1) */
1136#define PHY_M_PC_EN_DET_PLUS SHIFT8(3) /* Energy Detect Plus (Mode 2) */
1137
1138#define PHY_M_PC_MDI_XMODE(x) SHIFT5(x)
1139#define PHY_M_PC_MAN_MDI 0 /* 00 = Manual MDI configuration */
1140#define PHY_M_PC_MAN_MDIX 1 /* 01 = Manual MDIX configuration */
1141#define PHY_M_PC_ENA_AUTO 3 /* 11 = Enable Automatic Crossover */
1142
1143/***** PHY_MARV_PHY_STAT 16 bit r/o PHY Specific Status Reg *****/
1144#define PHY_M_PS_SPEED_MSK (3<<14) /* Bit 15..14: Speed Mask */
1145#define PHY_M_PS_SPEED_1000 (1<<15) /* 10 = 1000 Mbps */
1146#define PHY_M_PS_SPEED_100 (1<<14) /* 01 = 100 Mbps */
1147#define PHY_M_PS_SPEED_10 0 /* 00 = 10 Mbps */
1148#define PHY_M_PS_FULL_DUP (1<<13) /* Bit 13: Full Duplex */
1149#define PHY_M_PS_PAGE_REC (1<<12) /* Bit 12: Page Received */
1150#define PHY_M_PS_SPDUP_RES (1<<11) /* Bit 11: Speed & Duplex Resolved */
1151#define PHY_M_PS_LINK_UP (1<<10) /* Bit 10: Link Up */
1152#define PHY_M_PS_CABLE_MSK (3<<7) /* Bit 9.. 7: Cable Length Mask */
1153#define PHY_M_PS_MDI_X_STAT (1<<6) /* Bit 6: MDI Crossover Stat (1=MDIX) */
1154#define PHY_M_PS_DOWNS_STAT (1<<5) /* Bit 5: Downshift Status (1=downsh.) */
1155#define PHY_M_PS_ENDET_STAT (1<<4) /* Bit 4: Energy Detect Status (1=act) */
1156#define PHY_M_PS_TX_P_EN (1<<3) /* Bit 3: Tx Pause Enabled */
1157#define PHY_M_PS_RX_P_EN (1<<2) /* Bit 2: Rx Pause Enabled */
1158#define PHY_M_PS_POL_REV (1<<1) /* Bit 1: Polarity Reversed */
1159#define PHY_M_PC_JABBER (1<<0) /* Bit 0: Jabber */
1160
1161#define PHY_M_PS_PAUSE_MSK (PHY_M_PS_TX_P_EN | PHY_M_PS_RX_P_EN)
1162
1163/***** PHY_MARV_INT_MASK 16 bit r/w Interrupt Mask Reg *****/
1164/***** PHY_MARV_INT_STAT 16 bit r/o Interrupt Status Reg *****/
1165#define PHY_M_IS_AN_ERROR (1<<15) /* Bit 15: Auto-Negotiation Error */
1166#define PHY_M_IS_LSP_CHANGE (1<<14) /* Bit 14: Link Speed Changed */
1167#define PHY_M_IS_DUP_CHANGE (1<<13) /* Bit 13: Duplex Mode Changed */
1168#define PHY_M_IS_AN_PR (1<<12) /* Bit 12: Page Received */
1169#define PHY_M_IS_AN_COMPL (1<<11) /* Bit 11: Auto-Negotiation Completed */
1170#define PHY_M_IS_LST_CHANGE (1<<10) /* Bit 10: Link Status Changed */
1171#define PHY_M_IS_SYMB_ERROR (1<<9) /* Bit 9: Symbol Error */
1172#define PHY_M_IS_FALSE_CARR (1<<8) /* Bit 8: False Carrier */
1173#define PHY_M_IS_FIFO_ERROR (1<<7) /* Bit 7: FIFO Overflow/Underrun Error */
1174#define PHY_M_IS_MDI_CHANGE (1<<6) /* Bit 6: MDI Crossover Changed */
1175#define PHY_M_IS_DOWNSH_DET (1<<5) /* Bit 5: Downshift Detected */
1176#define PHY_M_IS_END_CHANGE (1<<4) /* Bit 4: Energy Detect Changed */
1177 /* Bit 3..2: reserved */
1178#define PHY_M_IS_POL_CHANGE (1<<1) /* Bit 1: Polarity Changed */
1179#define PHY_M_IS_JABBER (1<<0) /* Bit 0: Jabber */
1180
1181#define PHY_M_DEF_MSK (PHY_M_IS_AN_ERROR | PHY_M_IS_AN_PR | \
1182 PHY_M_IS_LST_CHANGE | PHY_M_IS_FIFO_ERROR)
1183
1184/***** PHY_MARV_EXT_CTRL 16 bit r/w Ext. PHY Specific Ctrl *****/
1185#define PHY_M_EC_M_DSC_MSK (3<<10) /* Bit 11..10: Master downshift counter */
1186#define PHY_M_EC_S_DSC_MSK (3<<8) /* Bit 9.. 8: Slave downshift counter */
1187#define PHY_M_EC_MAC_S_MSK (7<<4) /* Bit 6.. 4: Def. MAC interface speed */
1188#define PHY_M_EC_FIB_AN_ENA (1<<3) /* Bit 3: Fiber Auto-Neg. Enable */
1189
1190#define PHY_M_EC_M_DSC(x) SHIFT10(x) /* 00=1x; 01=2x; 10=3x; 11=4x */
1191#define PHY_M_EC_S_DSC(x) SHIFT8(x) /* 00=dis; 01=1x; 10=2x; 11=3x */
1192#define PHY_M_EC_MAC_S(x) SHIFT4(x) /* 01X=0; 110=2.5; 111=25 (MHz) */
1193
1194#define MAC_TX_CLK_0_MHZ 2
1195#define MAC_TX_CLK_2_5_MHZ 6
1196#define MAC_TX_CLK_25_MHZ 7
1197
1198/***** PHY_MARV_LED_CTRL 16 bit r/w LED Control Reg *****/
1199#define PHY_M_LEDC_DIS_LED (1<<15) /* Bit 15: Disable LED */
1200#define PHY_M_LEDC_PULS_MSK (7<<12) /* Bit 14..12: Pulse Stretch Mask */
1201#define PHY_M_LEDC_F_INT (1<<11) /* Bit 11: Force Interrupt */
1202#define PHY_M_LEDC_BL_R_MSK (7<<8) /* Bit 10.. 8: Blink Rate Mask */
1203 /* Bit 7.. 5: reserved */
1204#define PHY_M_LEDC_LINK_MSK (3<<3) /* Bit 4.. 3: Link Control Mask */
1205#define PHY_M_LEDC_DP_CTRL (1<<2) /* Bit 2: Duplex Control */
1206#define PHY_M_LEDC_RX_CTRL (1<<1) /* Bit 1: Rx activity / Link */
1207#define PHY_M_LEDC_TX_CTRL (1<<0) /* Bit 0: Tx activity / Link */
1208
1209#define PHY_M_LED_PULS_DUR(x) SHIFT12(x) /* Pulse Stretch Duration */
1210
1211#define PULS_NO_STR 0 /* no pulse stretching */
1212#define PULS_21MS 1 /* 21 ms to 42 ms */
1213#define PULS_42MS 2 /* 42 ms to 84 ms */
1214#define PULS_84MS 3 /* 84 ms to 170 ms */
1215#define PULS_170MS 4 /* 170 ms to 340 ms */
1216#define PULS_340MS 5 /* 340 ms to 670 ms */
1217#define PULS_670MS 6 /* 670 ms to 1.3 s */
1218#define PULS_1300MS 7 /* 1.3 s to 2.7 s */
1219
1220#define PHY_M_LED_BLINK_RT(x) SHIFT8(x) /* Blink Rate */
1221
1222#define BLINK_42MS 0 /* 42 ms */
1223#define BLINK_84MS 1 /* 84 ms */
1224#define BLINK_170MS 2 /* 170 ms */
1225#define BLINK_340MS 3 /* 340 ms */
1226#define BLINK_670MS 4 /* 670 ms */
1227 /* values 5 - 7: reserved */
1228
1229/***** PHY_MARV_LED_OVER 16 bit r/w Manual LED Override Reg *****/
1230#define PHY_M_LED_MO_DUP(x) SHIFT10(x) /* Bit 11..10: Duplex */
1231#define PHY_M_LED_MO_10(x) SHIFT8(x) /* Bit 9.. 8: Link 10 */
1232#define PHY_M_LED_MO_100(x) SHIFT6(x) /* Bit 7.. 6: Link 100 */
1233#define PHY_M_LED_MO_1000(x) SHIFT4(x) /* Bit 5.. 4: Link 1000 */
1234#define PHY_M_LED_MO_RX(x) SHIFT2(x) /* Bit 3.. 2: Rx */
1235#define PHY_M_LED_MO_TX(x) SHIFT0(x) /* Bit 1.. 0: Tx */
1236
1237#define MO_LED_NORM 0
1238#define MO_LED_BLINK 1
1239#define MO_LED_OFF 2
1240#define MO_LED_ON 3
1241
1242/***** PHY_MARV_EXT_CTRL_2 16 bit r/w Ext. PHY Specific Ctrl 2 *****/
1243 /* Bit 15.. 7: reserved */
1244#define PHY_M_EC2_FI_IMPED (1<<6) /* Bit 6: Fiber Input Impedance */
1245#define PHY_M_EC2_FO_IMPED (1<<5) /* Bit 5: Fiber Output Impedance */
1246#define PHY_M_EC2_FO_M_CLK (1<<4) /* Bit 4: Fiber Mode Clock Enable */
1247#define PHY_M_EC2_FO_BOOST (1<<3) /* Bit 3: Fiber Output Boost */
1248#define PHY_M_EC2_FO_AM_MSK 7 /* Bit 2.. 0: Fiber Output Amplitude */
1249
1250/***** PHY_MARV_EXT_P_STAT 16 bit r/w Ext. PHY Specific Status *****/
1251#define PHY_M_FC_AUTO_SEL (1<<15) /* Bit 15: Fiber/Copper Auto Sel. dis. */
1252#define PHY_M_FC_AN_REG_ACC (1<<14) /* Bit 14: Fiber/Copper Autoneg. reg acc */
1253#define PHY_M_FC_RESULUTION (1<<13) /* Bit 13: Fiber/Copper Resulution */
1254#define PHY_M_SER_IF_AN_BP (1<<12) /* Bit 12: Ser IF autoneg. bypass enable */
1255#define PHY_M_SER_IF_BP_ST (1<<11) /* Bit 11: Ser IF autoneg. bypass status */
1256#define PHY_M_IRQ_POLARITY (1<<10) /* Bit 10: IRQ polarity */
1257 /* Bit 9..4: reserved */
1258#define PHY_M_UNDOC1 (1<< 7) /* undocumented bit !! */
1259#define PHY_M_MODE_MASK (0xf<<0)/* Bit 3..0: copy of HWCFG MODE[3:0] */
1260
1261
1262/***** PHY_MARV_CABLE_DIAG 16 bit r/o Cable Diagnostic Reg *****/
1263#define PHY_M_CABD_ENA_TEST (1<<15) /* Bit 15: Enable Test */
1264#define PHY_M_CABD_STAT_MSK (3<<13) /* Bit 14..13: Status */
1265 /* Bit 12.. 8: reserved */
1266#define PHY_M_CABD_DIST_MSK 0xff /* Bit 7.. 0: Distance */
1267
1268/* values for Cable Diagnostic Status (11=fail; 00=OK; 10=open; 01=short) */
1269#define CABD_STAT_NORMAL 0
1270#define CABD_STAT_SHORT 1
1271#define CABD_STAT_OPEN 2
1272#define CABD_STAT_FAIL 3
1273
1274
1275/*
1276 * GMAC registers
1277 *
1278 * The GMAC registers are 16 or 32 bits wide.
1279 * The GMACs host processor interface is 16 bits wide,
1280 * therefore ALL registers will be addressed with 16 bit accesses.
1281 *
1282 * The following macros are provided to access the GMAC registers
1283 * GM_IN16(), GM_OUT16, GM_IN32(), GM_OUT32(), GM_INADR(), GM_OUTADR(),
1284 * GM_INHASH(), and GM_OUTHASH().
1285 * The macros are defined in SkGeHw.h.
1286 *
1287 * Note: NA reg = Network Address e.g DA, SA etc.
1288 *
1289 */
1290
1291/* Port Registers */
1292#define GM_GP_STAT 0x0000 /* 16 bit r/o General Purpose Status */
1293#define GM_GP_CTRL 0x0004 /* 16 bit r/w General Purpose Control */
1294#define GM_TX_CTRL 0x0008 /* 16 bit r/w Transmit Control Reg. */
1295#define GM_RX_CTRL 0x000c /* 16 bit r/w Receive Control Reg. */
1296#define GM_TX_FLOW_CTRL 0x0010 /* 16 bit r/w Transmit Flow-Control */
1297#define GM_TX_PARAM 0x0014 /* 16 bit r/w Transmit Parameter Reg. */
1298#define GM_SERIAL_MODE 0x0018 /* 16 bit r/w Serial Mode Register */
1299
1300/* Source Address Registers */
1301#define GM_SRC_ADDR_1L 0x001c /* 16 bit r/w Source Address 1 (low) */
1302#define GM_SRC_ADDR_1M 0x0020 /* 16 bit r/w Source Address 1 (middle) */
1303#define GM_SRC_ADDR_1H 0x0024 /* 16 bit r/w Source Address 1 (high) */
1304#define GM_SRC_ADDR_2L 0x0028 /* 16 bit r/w Source Address 2 (low) */
1305#define GM_SRC_ADDR_2M 0x002c /* 16 bit r/w Source Address 2 (middle) */
1306#define GM_SRC_ADDR_2H 0x0030 /* 16 bit r/w Source Address 2 (high) */
1307
1308/* Multicast Address Hash Registers */
1309#define GM_MC_ADDR_H1 0x0034 /* 16 bit r/w Multicast Address Hash 1 */
1310#define GM_MC_ADDR_H2 0x0038 /* 16 bit r/w Multicast Address Hash 2 */
1311#define GM_MC_ADDR_H3 0x003c /* 16 bit r/w Multicast Address Hash 3 */
1312#define GM_MC_ADDR_H4 0x0040 /* 16 bit r/w Multicast Address Hash 4 */
1313
1314/* Interrupt Source Registers */
1315#define GM_TX_IRQ_SRC 0x0044 /* 16 bit r/o Tx Overflow IRQ Source */
1316#define GM_RX_IRQ_SRC 0x0048 /* 16 bit r/o Rx Overflow IRQ Source */
1317#define GM_TR_IRQ_SRC 0x004c /* 16 bit r/o Tx/Rx Over. IRQ Source */
1318
1319/* Interrupt Mask Registers */
1320#define GM_TX_IRQ_MSK 0x0050 /* 16 bit r/w Tx Overflow IRQ Mask */
1321#define GM_RX_IRQ_MSK 0x0054 /* 16 bit r/w Rx Overflow IRQ Mask */
1322#define GM_TR_IRQ_MSK 0x0058 /* 16 bit r/w Tx/Rx Over. IRQ Mask */
1323
1324/* Serial Management Interface (SMI) Registers */
1325#define GM_SMI_CTRL 0x0080 /* 16 bit r/w SMI Control Register */
1326#define GM_SMI_DATA 0x0084 /* 16 bit r/w SMI Data Register */
1327#define GM_PHY_ADDR 0x0088 /* 16 bit r/w GPHY Address Register */
1328
1329/* MIB Counters */
1330#define GM_MIB_CNT_BASE 0x0100 /* Base Address of MIB Counters */
1331#define GM_MIB_CNT_SIZE 44 /* Number of MIB Counters */
1332
1333/*
1334 * MIB Counters base address definitions (low word) -
1335 * use offset 4 for access to high word (32 bit r/o)
1336 */
1337#define GM_RXF_UC_OK \
1338 (GM_MIB_CNT_BASE + 0) /* Unicast Frames Received OK */
1339#define GM_RXF_BC_OK \
1340 (GM_MIB_CNT_BASE + 8) /* Broadcast Frames Received OK */
1341#define GM_RXF_MPAUSE \
1342 (GM_MIB_CNT_BASE + 16) /* Pause MAC Ctrl Frames Received */
1343#define GM_RXF_MC_OK \
1344 (GM_MIB_CNT_BASE + 24) /* Multicast Frames Received OK */
1345#define GM_RXF_FCS_ERR \
1346 (GM_MIB_CNT_BASE + 32) /* Rx Frame Check Seq. Error */
1347 /* GM_MIB_CNT_BASE + 40: reserved */
1348#define GM_RXO_OK_LO \
1349 (GM_MIB_CNT_BASE + 48) /* Octets Received OK Low */
1350#define GM_RXO_OK_HI \
1351 (GM_MIB_CNT_BASE + 56) /* Octets Received OK High */
1352#define GM_RXO_ERR_LO \
1353 (GM_MIB_CNT_BASE + 64) /* Octets Received Invalid Low */
1354#define GM_RXO_ERR_HI \
1355 (GM_MIB_CNT_BASE + 72) /* Octets Received Invalid High */
1356#define GM_RXF_SHT \
1357 (GM_MIB_CNT_BASE + 80) /* Frames <64 Byte Received OK */
1358#define GM_RXE_FRAG \
1359 (GM_MIB_CNT_BASE + 88) /* Frames <64 Byte Received with FCS Err */
1360#define GM_RXF_64B \
1361 (GM_MIB_CNT_BASE + 96) /* 64 Byte Rx Frame */
1362#define GM_RXF_127B \
1363 (GM_MIB_CNT_BASE + 104) /* 65-127 Byte Rx Frame */
1364#define GM_RXF_255B \
1365 (GM_MIB_CNT_BASE + 112) /* 128-255 Byte Rx Frame */
1366#define GM_RXF_511B \
1367 (GM_MIB_CNT_BASE + 120) /* 256-511 Byte Rx Frame */
1368#define GM_RXF_1023B \
1369 (GM_MIB_CNT_BASE + 128) /* 512-1023 Byte Rx Frame */
1370#define GM_RXF_1518B \
1371 (GM_MIB_CNT_BASE + 136) /* 1024-1518 Byte Rx Frame */
1372#define GM_RXF_MAX_SZ \
1373 (GM_MIB_CNT_BASE + 144) /* 1519-MaxSize Byte Rx Frame */
1374#define GM_RXF_LNG_ERR \
1375 (GM_MIB_CNT_BASE + 152) /* Rx Frame too Long Error */
1376#define GM_RXF_JAB_PKT \
1377 (GM_MIB_CNT_BASE + 160) /* Rx Jabber Packet Frame */
1378 /* GM_MIB_CNT_BASE + 168: reserved */
1379#define GM_RXE_FIFO_OV \
1380 (GM_MIB_CNT_BASE + 176) /* Rx FIFO overflow Event */
1381 /* GM_MIB_CNT_BASE + 184: reserved */
1382#define GM_TXF_UC_OK \
1383 (GM_MIB_CNT_BASE + 192) /* Unicast Frames Xmitted OK */
1384#define GM_TXF_BC_OK \
1385 (GM_MIB_CNT_BASE + 200) /* Broadcast Frames Xmitted OK */
1386#define GM_TXF_MPAUSE \
1387 (GM_MIB_CNT_BASE + 208) /* Pause MAC Ctrl Frames Xmitted */
1388#define GM_TXF_MC_OK \
1389 (GM_MIB_CNT_BASE + 216) /* Multicast Frames Xmitted OK */
1390#define GM_TXO_OK_LO \
1391 (GM_MIB_CNT_BASE + 224) /* Octets Transmitted OK Low */
1392#define GM_TXO_OK_HI \
1393 (GM_MIB_CNT_BASE + 232) /* Octets Transmitted OK High */
1394#define GM_TXF_64B \
1395 (GM_MIB_CNT_BASE + 240) /* 64 Byte Tx Frame */
1396#define GM_TXF_127B \
1397 (GM_MIB_CNT_BASE + 248) /* 65-127 Byte Tx Frame */
1398#define GM_TXF_255B \
1399 (GM_MIB_CNT_BASE + 256) /* 128-255 Byte Tx Frame */
1400#define GM_TXF_511B \
1401 (GM_MIB_CNT_BASE + 264) /* 256-511 Byte Tx Frame */
1402#define GM_TXF_1023B \
1403 (GM_MIB_CNT_BASE + 272) /* 512-1023 Byte Tx Frame */
1404#define GM_TXF_1518B \
1405 (GM_MIB_CNT_BASE + 280) /* 1024-1518 Byte Tx Frame */
1406#define GM_TXF_MAX_SZ \
1407 (GM_MIB_CNT_BASE + 288) /* 1519-MaxSize Byte Tx Frame */
1408 /* GM_MIB_CNT_BASE + 296: reserved */
1409#define GM_TXF_COL \
1410 (GM_MIB_CNT_BASE + 304) /* Tx Collision */
1411#define GM_TXF_LAT_COL \
1412 (GM_MIB_CNT_BASE + 312) /* Tx Late Collision */
1413#define GM_TXF_ABO_COL \
1414 (GM_MIB_CNT_BASE + 320) /* Tx aborted due to Exces. Col. */
1415#define GM_TXF_MUL_COL \
1416 (GM_MIB_CNT_BASE + 328) /* Tx Multiple Collision */
1417#define GM_TXF_SNG_COL \
1418 (GM_MIB_CNT_BASE + 336) /* Tx Single Collision */
1419#define GM_TXE_FIFO_UR \
1420 (GM_MIB_CNT_BASE + 344) /* Tx FIFO Underrun Event */
1421
1422/*----------------------------------------------------------------------------*/
1423/*
1424 * GMAC Bit Definitions
1425 *
1426 * If the bit access behaviour differs from the register access behaviour
1427 * (r/w, r/o) this is documented after the bit number.
1428 * The following bit access behaviours are used:
1429 * (sc) self clearing
1430 * (r/o) read only
1431 */
1432
1433/* GM_GP_STAT 16 bit r/o General Purpose Status Register */
1434#define GM_GPSR_SPEED (1<<15) /* Bit 15: Port Speed (1 = 100 Mbps) */
1435#define GM_GPSR_DUPLEX (1<<14) /* Bit 14: Duplex Mode (1 = Full) */
1436#define GM_GPSR_FC_TX_DIS (1<<13) /* Bit 13: Tx Flow-Control Mode Disabled */
1437#define GM_GPSR_LINK_UP (1<<12) /* Bit 12: Link Up Status */
1438#define GM_GPSR_PAUSE (1<<11) /* Bit 11: Pause State */
1439#define GM_GPSR_TX_ACTIVE (1<<10) /* Bit 10: Tx in Progress */
1440#define GM_GPSR_EXC_COL (1<<9) /* Bit 9: Excessive Collisions Occured */
1441#define GM_GPSR_LAT_COL (1<<8) /* Bit 8: Late Collisions Occured */
1442 /* Bit 7..6: reserved */
1443#define GM_GPSR_PHY_ST_CH (1<<5) /* Bit 5: PHY Status Change */
1444#define GM_GPSR_GIG_SPEED (1<<4) /* Bit 4: Gigabit Speed (1 = 1000 Mbps) */
1445#define GM_GPSR_PART_MODE (1<<3) /* Bit 3: Partition mode */
1446#define GM_GPSR_FC_RX_DIS (1<<2) /* Bit 2: Rx Flow-Control Mode Disabled */
1447#define GM_GPSR_PROM_EN (1<<1) /* Bit 1: Promiscuous Mode Enabled */
1448 /* Bit 0: reserved */
1449
1450/* GM_GP_CTRL 16 bit r/w General Purpose Control Register */
1451 /* Bit 15: reserved */
1452#define GM_GPCR_PROM_ENA (1<<14) /* Bit 14: Enable Promiscuous Mode */
1453#define GM_GPCR_FC_TX_DIS (1<<13) /* Bit 13: Disable Tx Flow-Control Mode */
1454#define GM_GPCR_TX_ENA (1<<12) /* Bit 12: Enable Transmit */
1455#define GM_GPCR_RX_ENA (1<<11) /* Bit 11: Enable Receive */
1456#define GM_GPCR_BURST_ENA (1<<10) /* Bit 10: Enable Burst Mode */
1457#define GM_GPCR_LOOP_ENA (1<<9) /* Bit 9: Enable MAC Loopback Mode */
1458#define GM_GPCR_PART_ENA (1<<8) /* Bit 8: Enable Partition Mode */
1459#define GM_GPCR_GIGS_ENA (1<<7) /* Bit 7: Gigabit Speed (1000 Mbps) */
1460#define GM_GPCR_FL_PASS (1<<6) /* Bit 6: Force Link Pass */
1461#define GM_GPCR_DUP_FULL (1<<5) /* Bit 5: Full Duplex Mode */
1462#define GM_GPCR_FC_RX_DIS (1<<4) /* Bit 4: Disable Rx Flow-Control Mode */
1463#define GM_GPCR_SPEED_100 (1<<3) /* Bit 3: Port Speed 100 Mbps */
1464#define GM_GPCR_AU_DUP_DIS (1<<2) /* Bit 2: Disable Auto-Update Duplex */
1465#define GM_GPCR_AU_FCT_DIS (1<<1) /* Bit 1: Disable Auto-Update Flow-C. */
1466#define GM_GPCR_AU_SPD_DIS (1<<0) /* Bit 0: Disable Auto-Update Speed */
1467
1468#define GM_GPCR_SPEED_1000 (GM_GPCR_GIGS_ENA | GM_GPCR_SPEED_100)
1469#define GM_GPCR_AU_ALL_DIS (GM_GPCR_AU_DUP_DIS | GM_GPCR_AU_FCT_DIS |\
1470 GM_GPCR_AU_SPD_DIS)
1471
1472/* GM_TX_CTRL 16 bit r/w Transmit Control Register */
1473#define GM_TXCR_FORCE_JAM (1<<15) /* Bit 15: Force Jam / Flow-Control */
1474#define GM_TXCR_CRC_DIS (1<<14) /* Bit 14: Disable insertion of CRC */
1475#define GM_TXCR_PAD_DIS (1<<13) /* Bit 13: Disable padding of packets */
1476#define GM_TXCR_COL_THR_MSK (7<<10) /* Bit 12..10: Collision Threshold */
1477
1478#define TX_COL_THR(x) (SHIFT10(x) & GM_TXCR_COL_THR_MSK)
1479
1480#define TX_COL_DEF 0x04
1481
1482/* GM_RX_CTRL 16 bit r/w Receive Control Register */
1483#define GM_RXCR_UCF_ENA (1<<15) /* Bit 15: Enable Unicast filtering */
1484#define GM_RXCR_MCF_ENA (1<<14) /* Bit 14: Enable Multicast filtering */
1485#define GM_RXCR_CRC_DIS (1<<13) /* Bit 13: Remove 4-byte CRC */
1486#define GM_RXCR_PASS_FC (1<<12) /* Bit 12: Pass FC packets to FIFO */
1487
1488/* GM_TX_PARAM 16 bit r/w Transmit Parameter Register */
1489#define GM_TXPA_JAMLEN_MSK (0x03<<14) /* Bit 15..14: Jam Length */
1490#define GM_TXPA_JAMIPG_MSK (0x1f<<9) /* Bit 13..9: Jam IPG */
1491#define GM_TXPA_JAMDAT_MSK (0x1f<<4) /* Bit 8..4: IPG Jam to Data */
1492 /* Bit 3..0: reserved */
1493
1494#define TX_JAM_LEN_VAL(x) (SHIFT14(x) & GM_TXPA_JAMLEN_MSK)
1495#define TX_JAM_IPG_VAL(x) (SHIFT9(x) & GM_TXPA_JAMIPG_MSK)
1496#define TX_IPG_JAM_DATA(x) (SHIFT4(x) & GM_TXPA_JAMDAT_MSK)
1497
1498#define TX_JAM_LEN_DEF 0x03
1499#define TX_JAM_IPG_DEF 0x0b
1500#define TX_IPG_JAM_DEF 0x1c
1501
1502/* GM_SERIAL_MODE 16 bit r/w Serial Mode Register */
1503#define GM_SMOD_DATABL_MSK (0x1f<<11) /* Bit 15..11: Data Blinder (r/o) */
1504#define GM_SMOD_LIMIT_4 (1<<10) /* Bit 10: 4 consecutive Tx trials */
1505#define GM_SMOD_VLAN_ENA (1<<9) /* Bit 9: Enable VLAN (Max. Frame Len) */
1506#define GM_SMOD_JUMBO_ENA (1<<8) /* Bit 8: Enable Jumbo (Max. Frame Len) */
1507 /* Bit 7..5: reserved */
1508#define GM_SMOD_IPG_MSK 0x1f /* Bit 4..0: Inter-Packet Gap (IPG) */
1509
1510#define DATA_BLIND_VAL(x) (SHIFT11(x) & GM_SMOD_DATABL_MSK)
1511#define DATA_BLIND_DEF 0x04
1512
1513#define IPG_DATA_VAL(x) (x & GM_SMOD_IPG_MSK)
1514#define IPG_DATA_DEF 0x1e
1515
1516/* GM_SMI_CTRL 16 bit r/w SMI Control Register */
1517#define GM_SMI_CT_PHY_A_MSK (0x1f<<11) /* Bit 15..11: PHY Device Address */
1518#define GM_SMI_CT_REG_A_MSK (0x1f<<6) /* Bit 10.. 6: PHY Register Address */
1519#define GM_SMI_CT_OP_RD (1<<5) /* Bit 5: OpCode Read (0=Write)*/
1520#define GM_SMI_CT_RD_VAL (1<<4) /* Bit 4: Read Valid (Read completed) */
1521#define GM_SMI_CT_BUSY (1<<3) /* Bit 3: Busy (Operation in progress) */
1522 /* Bit 2..0: reserved */
1523
1524#define GM_SMI_CT_PHY_AD(x) (SHIFT11(x) & GM_SMI_CT_PHY_A_MSK)
1525#define GM_SMI_CT_REG_AD(x) (SHIFT6(x) & GM_SMI_CT_REG_A_MSK)
1526
1527 /* GM_PHY_ADDR 16 bit r/w GPHY Address Register */
1528 /* Bit 15..6: reserved */
1529#define GM_PAR_MIB_CLR (1<<5) /* Bit 5: Set MIB Clear Counter Mode */
1530#define GM_PAR_MIB_TST (1<<4) /* Bit 4: MIB Load Counter (Test Mode) */
1531 /* Bit 3..0: reserved */
1532
1533/* Receive Frame Status Encoding */
1534#define GMR_FS_LEN (0xffffUL<<16) /* Bit 31..16: Rx Frame Length */
1535 /* Bit 15..14: reserved */
1536#define GMR_FS_VLAN (1L<<13) /* Bit 13: VLAN Packet */
1537#define GMR_FS_JABBER (1L<<12) /* Bit 12: Jabber Packet */
1538#define GMR_FS_UN_SIZE (1L<<11) /* Bit 11: Undersize Packet */
1539#define GMR_FS_MC (1L<<10) /* Bit 10: Multicast Packet */
1540#define GMR_FS_BC (1L<<9) /* Bit 9: Broadcast Packet */
1541#define GMR_FS_RX_OK (1L<<8) /* Bit 8: Receive OK (Good Packet) */
1542#define GMR_FS_GOOD_FC (1L<<7) /* Bit 7: Good Flow-Control Packet */
1543#define GMR_FS_BAD_FC (1L<<6) /* Bit 6: Bad Flow-Control Packet */
1544#define GMR_FS_MII_ERR (1L<<5) /* Bit 5: MII Error */
1545#define GMR_FS_LONG_ERR (1L<<4) /* Bit 4: Too Long Packet */
1546#define GMR_FS_FRAGMENT (1L<<3) /* Bit 3: Fragment */
1547 /* Bit 2: reserved */
1548#define GMR_FS_CRC_ERR (1L<<1) /* Bit 1: CRC Error */
1549#define GMR_FS_RX_FF_OV (1L<<0) /* Bit 0: Rx FIFO Overflow */
1550
1551/*
1552 * GMR_FS_ANY_ERR (analogous to XMR_FS_ANY_ERR)
1553 */
1554#define GMR_FS_ANY_ERR (GMR_FS_CRC_ERR | \
1555 GMR_FS_LONG_ERR | \
1556 GMR_FS_MII_ERR | \
1557 GMR_FS_BAD_FC | \
1558 GMR_FS_GOOD_FC | \
1559 GMR_FS_JABBER)
1560
1561/* Rx GMAC FIFO Flush Mask (default) */
1562#define RX_FF_FL_DEF_MSK (GMR_FS_CRC_ERR | \
1563 GMR_FS_RX_FF_OV | \
1564 GMR_FS_MII_ERR | \
1565 GMR_FS_BAD_FC | \
1566 GMR_FS_GOOD_FC | \
1567 GMR_FS_UN_SIZE | \
1568 GMR_FS_JABBER)
1569
1570/* typedefs *******************************************************************/
1571
1572
1573/* function prototypes ********************************************************/
1574
1575#ifdef __cplusplus
1576}
1577#endif /* __cplusplus */
1578
1579#endif /* __INC_XMAC_H */
diff --git a/drivers/net/sk98lin/skaddr.c b/drivers/net/sk98lin/skaddr.c
new file mode 100644
index 0000000000..6e6c56aa6d
--- /dev/null
+++ b/drivers/net/sk98lin/skaddr.c
@@ -0,0 +1,1788 @@
1/******************************************************************************
2 *
3 * Name: skaddr.c
4 * Project: Gigabit Ethernet Adapters, ADDR-Module
5 * Version: $Revision: 1.52 $
6 * Date: $Date: 2003/06/02 13:46:15 $
7 * Purpose: Manage Addresses (Multicast and Unicast) and Promiscuous Mode.
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/******************************************************************************
26 *
27 * Description:
28 *
29 * This module is intended to manage multicast addresses, address override,
30 * and promiscuous mode on GEnesis and Yukon adapters.
31 *
32 * Address Layout:
33 * port address: physical MAC address
34 * 1st exact match: logical MAC address (GEnesis only)
35 * 2nd exact match: RLMT multicast (GEnesis only)
36 * exact match 3-13: OS-specific multicasts (GEnesis only)
37 *
38 * Include File Hierarchy:
39 *
40 * "skdrv1st.h"
41 * "skdrv2nd.h"
42 *
43 ******************************************************************************/
44
45#if (defined(DEBUG) || ((!defined(LINT)) && (!defined(SK_SLIM))))
46static const char SysKonnectFileId[] =
47 "@(#) $Id: skaddr.c,v 1.52 2003/06/02 13:46:15 tschilli Exp $ (C) Marvell.";
48#endif /* DEBUG ||!LINT || !SK_SLIM */
49
50#define __SKADDR_C
51
52#ifdef __cplusplus
53extern "C" {
54#endif /* cplusplus */
55
56#include "h/skdrv1st.h"
57#include "h/skdrv2nd.h"
58
59/* defines ********************************************************************/
60
61
62#define XMAC_POLY 0xEDB88320UL /* CRC32-Poly - XMAC: Little Endian */
63#define GMAC_POLY 0x04C11DB7L /* CRC16-Poly - GMAC: Little Endian */
64#define HASH_BITS 6 /* #bits in hash */
65#define SK_MC_BIT 0x01
66
67/* Error numbers and messages. */
68
69#define SKERR_ADDR_E001 (SK_ERRBASE_ADDR + 0)
70#define SKERR_ADDR_E001MSG "Bad Flags."
71#define SKERR_ADDR_E002 (SKERR_ADDR_E001 + 1)
72#define SKERR_ADDR_E002MSG "New Error."
73
74/* typedefs *******************************************************************/
75
76/* None. */
77
78/* global variables ***********************************************************/
79
80/* 64-bit hash values with all bits set. */
81
82static const SK_U16 OnesHash[4] = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF};
83
84/* local variables ************************************************************/
85
86#ifdef DEBUG
87static int Next0[SK_MAX_MACS] = {0};
88#endif /* DEBUG */
89
90static int SkAddrGmacMcAdd(SK_AC *pAC, SK_IOC IoC, SK_U32 PortNumber,
91 SK_MAC_ADDR *pMc, int Flags);
92static int SkAddrGmacMcClear(SK_AC *pAC, SK_IOC IoC, SK_U32 PortNumber,
93 int Flags);
94static int SkAddrGmacMcUpdate(SK_AC *pAC, SK_IOC IoC, SK_U32 PortNumber);
95static int SkAddrGmacPromiscuousChange(SK_AC *pAC, SK_IOC IoC,
96 SK_U32 PortNumber, int NewPromMode);
97static int SkAddrXmacMcAdd(SK_AC *pAC, SK_IOC IoC, SK_U32 PortNumber,
98 SK_MAC_ADDR *pMc, int Flags);
99static int SkAddrXmacMcClear(SK_AC *pAC, SK_IOC IoC, SK_U32 PortNumber,
100 int Flags);
101static int SkAddrXmacMcUpdate(SK_AC *pAC, SK_IOC IoC, SK_U32 PortNumber);
102static int SkAddrXmacPromiscuousChange(SK_AC *pAC, SK_IOC IoC,
103 SK_U32 PortNumber, int NewPromMode);
104
105/* functions ******************************************************************/
106
107/******************************************************************************
108 *
109 * SkAddrInit - initialize data, set state to init
110 *
111 * Description:
112 *
113 * SK_INIT_DATA
114 * ============
115 *
116 * This routine clears the multicast tables and resets promiscuous mode.
117 * Some entries are reserved for the "logical MAC address", the
118 * SK-RLMT multicast address, and the BPDU multicast address.
119 *
120 *
121 * SK_INIT_IO
122 * ==========
123 *
124 * All permanent MAC addresses are read from EPROM.
125 * If the current MAC addresses are not already set in software,
126 * they are set to the values of the permanent addresses.
127 * The current addresses are written to the corresponding MAC.
128 *
129 *
130 * SK_INIT_RUN
131 * ===========
132 *
133 * Nothing.
134 *
135 * Context:
136 * init, pageable
137 *
138 * Returns:
139 * SK_ADDR_SUCCESS
140 */
141int SkAddrInit(
142SK_AC *pAC, /* the adapter context */
143SK_IOC IoC, /* I/O context */
144int Level) /* initialization level */
145{
146 int j;
147 SK_U32 i;
148 SK_U8 *InAddr;
149 SK_U16 *OutAddr;
150 SK_ADDR_PORT *pAPort;
151
152 switch (Level) {
153 case SK_INIT_DATA:
154 SK_MEMSET((char *) &pAC->Addr, (SK_U8) 0,
155 (SK_U16) sizeof(SK_ADDR));
156
157 for (i = 0; i < SK_MAX_MACS; i++) {
158 pAPort = &pAC->Addr.Port[i];
159 pAPort->PromMode = SK_PROM_MODE_NONE;
160
161 pAPort->FirstExactMatchRlmt = SK_ADDR_FIRST_MATCH_RLMT;
162 pAPort->FirstExactMatchDrv = SK_ADDR_FIRST_MATCH_DRV;
163 pAPort->NextExactMatchRlmt = SK_ADDR_FIRST_MATCH_RLMT;
164 pAPort->NextExactMatchDrv = SK_ADDR_FIRST_MATCH_DRV;
165 }
166#ifdef xDEBUG
167 for (i = 0; i < SK_MAX_MACS; i++) {
168 if (pAC->Addr.Port[i].NextExactMatchRlmt <
169 SK_ADDR_FIRST_MATCH_RLMT) {
170 Next0[i] |= 4;
171 }
172 }
173#endif /* DEBUG */
174 /* pAC->Addr.InitDone = SK_INIT_DATA; */
175 break;
176
177 case SK_INIT_IO:
178#ifndef SK_NO_RLMT
179 for (i = 0; i < SK_MAX_NETS; i++) {
180 pAC->Addr.Net[i].ActivePort = pAC->Rlmt.Net[i].ActivePort;
181 }
182#endif /* !SK_NO_RLMT */
183#ifdef xDEBUG
184 for (i = 0; i < SK_MAX_MACS; i++) {
185 if (pAC->Addr.Port[i].NextExactMatchRlmt <
186 SK_ADDR_FIRST_MATCH_RLMT) {
187 Next0[i] |= 8;
188 }
189 }
190#endif /* DEBUG */
191
192 /* Read permanent logical MAC address from Control Register File. */
193 for (j = 0; j < SK_MAC_ADDR_LEN; j++) {
194 InAddr = (SK_U8 *) &pAC->Addr.Net[0].PermanentMacAddress.a[j];
195 SK_IN8(IoC, B2_MAC_1 + j, InAddr);
196 }
197
198 if (!pAC->Addr.Net[0].CurrentMacAddressSet) {
199 /* Set the current logical MAC address to the permanent one. */
200 pAC->Addr.Net[0].CurrentMacAddress =
201 pAC->Addr.Net[0].PermanentMacAddress;
202 pAC->Addr.Net[0].CurrentMacAddressSet = SK_TRUE;
203 }
204
205 /* Set the current logical MAC address. */
206 pAC->Addr.Port[pAC->Addr.Net[0].ActivePort].Exact[0] =
207 pAC->Addr.Net[0].CurrentMacAddress;
208#if SK_MAX_NETS > 1
209 /* Set logical MAC address for net 2 to (log | 3). */
210 if (!pAC->Addr.Net[1].CurrentMacAddressSet) {
211 pAC->Addr.Net[1].PermanentMacAddress =
212 pAC->Addr.Net[0].PermanentMacAddress;
213 pAC->Addr.Net[1].PermanentMacAddress.a[5] |= 3;
214 /* Set the current logical MAC address to the permanent one. */
215 pAC->Addr.Net[1].CurrentMacAddress =
216 pAC->Addr.Net[1].PermanentMacAddress;
217 pAC->Addr.Net[1].CurrentMacAddressSet = SK_TRUE;
218 }
219#endif /* SK_MAX_NETS > 1 */
220
221#ifdef DEBUG
222 for (i = 0; i < (SK_U32) pAC->GIni.GIMacsFound; i++) {
223 SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_INIT,
224 ("Permanent MAC Address (Net%d): %02X %02X %02X %02X %02X %02X\n",
225 i,
226 pAC->Addr.Net[i].PermanentMacAddress.a[0],
227 pAC->Addr.Net[i].PermanentMacAddress.a[1],
228 pAC->Addr.Net[i].PermanentMacAddress.a[2],
229 pAC->Addr.Net[i].PermanentMacAddress.a[3],
230 pAC->Addr.Net[i].PermanentMacAddress.a[4],
231 pAC->Addr.Net[i].PermanentMacAddress.a[5]))
232
233 SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_INIT,
234 ("Logical MAC Address (Net%d): %02X %02X %02X %02X %02X %02X\n",
235 i,
236 pAC->Addr.Net[i].CurrentMacAddress.a[0],
237 pAC->Addr.Net[i].CurrentMacAddress.a[1],
238 pAC->Addr.Net[i].CurrentMacAddress.a[2],
239 pAC->Addr.Net[i].CurrentMacAddress.a[3],
240 pAC->Addr.Net[i].CurrentMacAddress.a[4],
241 pAC->Addr.Net[i].CurrentMacAddress.a[5]))
242 }
243#endif /* DEBUG */
244
245 for (i = 0; i < (SK_U32) pAC->GIni.GIMacsFound; i++) {
246 pAPort = &pAC->Addr.Port[i];
247
248 /* Read permanent port addresses from Control Register File. */
249 for (j = 0; j < SK_MAC_ADDR_LEN; j++) {
250 InAddr = (SK_U8 *) &pAPort->PermanentMacAddress.a[j];
251 SK_IN8(IoC, B2_MAC_2 + 8 * i + j, InAddr);
252 }
253
254 if (!pAPort->CurrentMacAddressSet) {
255 /*
256 * Set the current and previous physical MAC address
257 * of this port to its permanent MAC address.
258 */
259 pAPort->CurrentMacAddress = pAPort->PermanentMacAddress;
260 pAPort->PreviousMacAddress = pAPort->PermanentMacAddress;
261 pAPort->CurrentMacAddressSet = SK_TRUE;
262 }
263
264 /* Set port's current physical MAC address. */
265 OutAddr = (SK_U16 *) &pAPort->CurrentMacAddress.a[0];
266#ifdef GENESIS
267 if (pAC->GIni.GIGenesis) {
268 XM_OUTADDR(IoC, i, XM_SA, OutAddr);
269 }
270#endif /* GENESIS */
271#ifdef YUKON
272 if (!pAC->GIni.GIGenesis) {
273 GM_OUTADDR(IoC, i, GM_SRC_ADDR_1L, OutAddr);
274 }
275#endif /* YUKON */
276#ifdef DEBUG
277 SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_INIT,
278 ("SkAddrInit: Permanent Physical MAC Address: %02X %02X %02X %02X %02X %02X\n",
279 pAPort->PermanentMacAddress.a[0],
280 pAPort->PermanentMacAddress.a[1],
281 pAPort->PermanentMacAddress.a[2],
282 pAPort->PermanentMacAddress.a[3],
283 pAPort->PermanentMacAddress.a[4],
284 pAPort->PermanentMacAddress.a[5]))
285
286 SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_INIT,
287 ("SkAddrInit: Physical MAC Address: %02X %02X %02X %02X %02X %02X\n",
288 pAPort->CurrentMacAddress.a[0],
289 pAPort->CurrentMacAddress.a[1],
290 pAPort->CurrentMacAddress.a[2],
291 pAPort->CurrentMacAddress.a[3],
292 pAPort->CurrentMacAddress.a[4],
293 pAPort->CurrentMacAddress.a[5]))
294#endif /* DEBUG */
295 }
296 /* pAC->Addr.InitDone = SK_INIT_IO; */
297 break;
298
299 case SK_INIT_RUN:
300#ifdef xDEBUG
301 for (i = 0; i < SK_MAX_MACS; i++) {
302 if (pAC->Addr.Port[i].NextExactMatchRlmt <
303 SK_ADDR_FIRST_MATCH_RLMT) {
304 Next0[i] |= 16;
305 }
306 }
307#endif /* DEBUG */
308
309 /* pAC->Addr.InitDone = SK_INIT_RUN; */
310 break;
311
312 default: /* error */
313 break;
314 }
315
316 return (SK_ADDR_SUCCESS);
317
318} /* SkAddrInit */
319
320#ifndef SK_SLIM
321
322/******************************************************************************
323 *
324 * SkAddrMcClear - clear the multicast table
325 *
326 * Description:
327 * This routine clears the multicast table.
328 *
329 * If not suppressed by Flag SK_MC_SW_ONLY, the hardware is updated
330 * immediately.
331 *
332 * It calls either SkAddrXmacMcClear or SkAddrGmacMcClear, according
333 * to the adapter in use. The real work is done there.
334 *
335 * Context:
336 * runtime, pageable
337 * may be called starting with SK_INIT_DATA with flag SK_MC_SW_ONLY
338 * may be called after SK_INIT_IO without limitation
339 *
340 * Returns:
341 * SK_ADDR_SUCCESS
342 * SK_ADDR_ILLEGAL_PORT
343 */
344int SkAddrMcClear(
345SK_AC *pAC, /* adapter context */
346SK_IOC IoC, /* I/O context */
347SK_U32 PortNumber, /* Index of affected port */
348int Flags) /* permanent/non-perm, sw-only */
349{
350 int ReturnCode;
351
352 if (PortNumber >= (SK_U32) pAC->GIni.GIMacsFound) {
353 return (SK_ADDR_ILLEGAL_PORT);
354 }
355
356 if (pAC->GIni.GIGenesis) {
357 ReturnCode = SkAddrXmacMcClear(pAC, IoC, PortNumber, Flags);
358 }
359 else {
360 ReturnCode = SkAddrGmacMcClear(pAC, IoC, PortNumber, Flags);
361 }
362
363 return (ReturnCode);
364
365} /* SkAddrMcClear */
366
367#endif /* !SK_SLIM */
368
369#ifndef SK_SLIM
370
371/******************************************************************************
372 *
373 * SkAddrXmacMcClear - clear the multicast table
374 *
375 * Description:
376 * This routine clears the multicast table
377 * (either entry 2 or entries 3-16 and InexactFilter) of the given port.
378 * If not suppressed by Flag SK_MC_SW_ONLY, the hardware is updated
379 * immediately.
380 *
381 * Context:
382 * runtime, pageable
383 * may be called starting with SK_INIT_DATA with flag SK_MC_SW_ONLY
384 * may be called after SK_INIT_IO without limitation
385 *
386 * Returns:
387 * SK_ADDR_SUCCESS
388 * SK_ADDR_ILLEGAL_PORT
389 */
390static int SkAddrXmacMcClear(
391SK_AC *pAC, /* adapter context */
392SK_IOC IoC, /* I/O context */
393SK_U32 PortNumber, /* Index of affected port */
394int Flags) /* permanent/non-perm, sw-only */
395{
396 int i;
397
398 if (Flags & SK_ADDR_PERMANENT) { /* permanent => RLMT */
399
400 /* Clear RLMT multicast addresses. */
401 pAC->Addr.Port[PortNumber].NextExactMatchRlmt = SK_ADDR_FIRST_MATCH_RLMT;
402 }
403 else { /* not permanent => DRV */
404
405 /* Clear InexactFilter */
406 for (i = 0; i < 8; i++) {
407 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0;
408 }
409
410 /* Clear DRV multicast addresses. */
411
412 pAC->Addr.Port[PortNumber].NextExactMatchDrv = SK_ADDR_FIRST_MATCH_DRV;
413 }
414
415 if (!(Flags & SK_MC_SW_ONLY)) {
416 (void) SkAddrXmacMcUpdate(pAC, IoC, PortNumber);
417 }
418
419 return (SK_ADDR_SUCCESS);
420
421} /* SkAddrXmacMcClear */
422
423#endif /* !SK_SLIM */
424
425#ifndef SK_SLIM
426
427/******************************************************************************
428 *
429 * SkAddrGmacMcClear - clear the multicast table
430 *
431 * Description:
432 * This routine clears the multicast hashing table (InexactFilter)
433 * (either the RLMT or the driver bits) of the given port.
434 *
435 * If not suppressed by Flag SK_MC_SW_ONLY, the hardware is updated
436 * immediately.
437 *
438 * Context:
439 * runtime, pageable
440 * may be called starting with SK_INIT_DATA with flag SK_MC_SW_ONLY
441 * may be called after SK_INIT_IO without limitation
442 *
443 * Returns:
444 * SK_ADDR_SUCCESS
445 * SK_ADDR_ILLEGAL_PORT
446 */
447static int SkAddrGmacMcClear(
448SK_AC *pAC, /* adapter context */
449SK_IOC IoC, /* I/O context */
450SK_U32 PortNumber, /* Index of affected port */
451int Flags) /* permanent/non-perm, sw-only */
452{
453 int i;
454
455#ifdef DEBUG
456 SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
457 ("GMAC InexactFilter (not cleared): %02X %02X %02X %02X %02X %02X %02X %02X\n",
458 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[0],
459 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[1],
460 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[2],
461 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[3],
462 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[4],
463 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[5],
464 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[6],
465 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[7]))
466#endif /* DEBUG */
467
468 /* Clear InexactFilter */
469 for (i = 0; i < 8; i++) {
470 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0;
471 }
472
473 if (Flags & SK_ADDR_PERMANENT) { /* permanent => RLMT */
474
475 /* Copy DRV bits to InexactFilter. */
476 for (i = 0; i < 8; i++) {
477 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] |=
478 pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[i];
479
480 /* Clear InexactRlmtFilter. */
481 pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[i] = 0;
482
483 }
484 }
485 else { /* not permanent => DRV */
486
487 /* Copy RLMT bits to InexactFilter. */
488 for (i = 0; i < 8; i++) {
489 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] |=
490 pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[i];
491
492 /* Clear InexactDrvFilter. */
493 pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[i] = 0;
494 }
495 }
496
497#ifdef DEBUG
498 SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
499 ("GMAC InexactFilter (cleared): %02X %02X %02X %02X %02X %02X %02X %02X\n",
500 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[0],
501 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[1],
502 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[2],
503 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[3],
504 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[4],
505 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[5],
506 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[6],
507 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[7]))
508#endif /* DEBUG */
509
510 if (!(Flags & SK_MC_SW_ONLY)) {
511 (void) SkAddrGmacMcUpdate(pAC, IoC, PortNumber);
512 }
513
514 return (SK_ADDR_SUCCESS);
515
516} /* SkAddrGmacMcClear */
517
518#ifndef SK_ADDR_CHEAT
519
520/******************************************************************************
521 *
522 * SkXmacMcHash - hash multicast address
523 *
524 * Description:
525 * This routine computes the hash value for a multicast address.
526 * A CRC32 algorithm is used.
527 *
528 * Notes:
529 * The code was adapted from the XaQti data sheet.
530 *
531 * Context:
532 * runtime, pageable
533 *
534 * Returns:
535 * Hash value of multicast address.
536 */
537static SK_U32 SkXmacMcHash(
538unsigned char *pMc) /* Multicast address */
539{
540 SK_U32 Idx;
541 SK_U32 Bit;
542 SK_U32 Data;
543 SK_U32 Crc;
544
545 Crc = 0xFFFFFFFFUL;
546 for (Idx = 0; Idx < SK_MAC_ADDR_LEN; Idx++) {
547 Data = *pMc++;
548 for (Bit = 0; Bit < 8; Bit++, Data >>= 1) {
549 Crc = (Crc >> 1) ^ (((Crc ^ Data) & 1) ? XMAC_POLY : 0);
550 }
551 }
552
553 return (Crc & ((1 << HASH_BITS) - 1));
554
555} /* SkXmacMcHash */
556
557
558/******************************************************************************
559 *
560 * SkGmacMcHash - hash multicast address
561 *
562 * Description:
563 * This routine computes the hash value for a multicast address.
564 * A CRC16 algorithm is used.
565 *
566 * Notes:
567 *
568 *
569 * Context:
570 * runtime, pageable
571 *
572 * Returns:
573 * Hash value of multicast address.
574 */
575static SK_U32 SkGmacMcHash(
576unsigned char *pMc) /* Multicast address */
577{
578 SK_U32 Data;
579 SK_U32 TmpData;
580 SK_U32 Crc;
581 int Byte;
582 int Bit;
583
584 Crc = 0xFFFFFFFFUL;
585 for (Byte = 0; Byte < 6; Byte++) {
586 /* Get next byte. */
587 Data = (SK_U32) pMc[Byte];
588
589 /* Change bit order in byte. */
590 TmpData = Data;
591 for (Bit = 0; Bit < 8; Bit++) {
592 if (TmpData & 1L) {
593 Data |= 1L << (7 - Bit);
594 }
595 else {
596 Data &= ~(1L << (7 - Bit));
597 }
598 TmpData >>= 1;
599 }
600
601 Crc ^= (Data << 24);
602 for (Bit = 0; Bit < 8; Bit++) {
603 if (Crc & 0x80000000) {
604 Crc = (Crc << 1) ^ GMAC_POLY;
605 }
606 else {
607 Crc <<= 1;
608 }
609 }
610 }
611
612 return (Crc & ((1 << HASH_BITS) - 1));
613
614} /* SkGmacMcHash */
615
616#endif /* !SK_ADDR_CHEAT */
617
618/******************************************************************************
619 *
620 * SkAddrMcAdd - add a multicast address to a port
621 *
622 * Description:
623 * This routine enables reception for a given address on the given port.
624 *
625 * It calls either SkAddrXmacMcAdd or SkAddrGmacMcAdd, according to the
626 * adapter in use. The real work is done there.
627 *
628 * Notes:
629 * The return code is only valid for SK_PROM_MODE_NONE.
630 *
631 * Context:
632 * runtime, pageable
633 * may be called after SK_INIT_DATA
634 *
635 * Returns:
636 * SK_MC_FILTERING_EXACT
637 * SK_MC_FILTERING_INEXACT
638 * SK_MC_ILLEGAL_ADDRESS
639 * SK_MC_ILLEGAL_PORT
640 * SK_MC_RLMT_OVERFLOW
641 */
642int SkAddrMcAdd(
643SK_AC *pAC, /* adapter context */
644SK_IOC IoC, /* I/O context */
645SK_U32 PortNumber, /* Port Number */
646SK_MAC_ADDR *pMc, /* multicast address to be added */
647int Flags) /* permanent/non-permanent */
648{
649 int ReturnCode;
650
651 if (PortNumber >= (SK_U32) pAC->GIni.GIMacsFound) {
652 return (SK_ADDR_ILLEGAL_PORT);
653 }
654
655 if (pAC->GIni.GIGenesis) {
656 ReturnCode = SkAddrXmacMcAdd(pAC, IoC, PortNumber, pMc, Flags);
657 }
658 else {
659 ReturnCode = SkAddrGmacMcAdd(pAC, IoC, PortNumber, pMc, Flags);
660 }
661
662 return (ReturnCode);
663
664} /* SkAddrMcAdd */
665
666
667/******************************************************************************
668 *
669 * SkAddrXmacMcAdd - add a multicast address to a port
670 *
671 * Description:
672 * This routine enables reception for a given address on the given port.
673 *
674 * Notes:
675 * The return code is only valid for SK_PROM_MODE_NONE.
676 *
677 * The multicast bit is only checked if there are no free exact match
678 * entries.
679 *
680 * Context:
681 * runtime, pageable
682 * may be called after SK_INIT_DATA
683 *
684 * Returns:
685 * SK_MC_FILTERING_EXACT
686 * SK_MC_FILTERING_INEXACT
687 * SK_MC_ILLEGAL_ADDRESS
688 * SK_MC_RLMT_OVERFLOW
689 */
690static int SkAddrXmacMcAdd(
691SK_AC *pAC, /* adapter context */
692SK_IOC IoC, /* I/O context */
693SK_U32 PortNumber, /* Port Number */
694SK_MAC_ADDR *pMc, /* multicast address to be added */
695int Flags) /* permanent/non-permanent */
696{
697 int i;
698 SK_U8 Inexact;
699#ifndef SK_ADDR_CHEAT
700 SK_U32 HashBit;
701#endif /* !defined(SK_ADDR_CHEAT) */
702
703 if (Flags & SK_ADDR_PERMANENT) { /* permanent => RLMT */
704#ifdef xDEBUG
705 if (pAC->Addr.Port[PortNumber].NextExactMatchRlmt <
706 SK_ADDR_FIRST_MATCH_RLMT) {
707 Next0[PortNumber] |= 1;
708 return (SK_MC_RLMT_OVERFLOW);
709 }
710#endif /* DEBUG */
711
712 if (pAC->Addr.Port[PortNumber].NextExactMatchRlmt >
713 SK_ADDR_LAST_MATCH_RLMT) {
714 return (SK_MC_RLMT_OVERFLOW);
715 }
716
717 /* Set a RLMT multicast address. */
718
719 pAC->Addr.Port[PortNumber].Exact[
720 pAC->Addr.Port[PortNumber].NextExactMatchRlmt++] = *pMc;
721
722 return (SK_MC_FILTERING_EXACT);
723 }
724
725#ifdef xDEBUG
726 if (pAC->Addr.Port[PortNumber].NextExactMatchDrv <
727 SK_ADDR_FIRST_MATCH_DRV) {
728 Next0[PortNumber] |= 2;
729 return (SK_MC_RLMT_OVERFLOW);
730 }
731#endif /* DEBUG */
732
733 if (pAC->Addr.Port[PortNumber].NextExactMatchDrv <= SK_ADDR_LAST_MATCH_DRV) {
734
735 /* Set exact match entry. */
736 pAC->Addr.Port[PortNumber].Exact[
737 pAC->Addr.Port[PortNumber].NextExactMatchDrv++] = *pMc;
738
739 /* Clear InexactFilter */
740 for (i = 0; i < 8; i++) {
741 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0;
742 }
743 }
744 else {
745 if (!(pMc->a[0] & SK_MC_BIT)) {
746 /* Hashing only possible with multicast addresses */
747 return (SK_MC_ILLEGAL_ADDRESS);
748 }
749#ifndef SK_ADDR_CHEAT
750 /* Compute hash value of address. */
751 HashBit = 63 - SkXmacMcHash(&pMc->a[0]);
752
753 /* Add bit to InexactFilter. */
754 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[HashBit / 8] |=
755 1 << (HashBit % 8);
756#else /* SK_ADDR_CHEAT */
757 /* Set all bits in InexactFilter. */
758 for (i = 0; i < 8; i++) {
759 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0xFF;
760 }
761#endif /* SK_ADDR_CHEAT */
762 }
763
764 for (Inexact = 0, i = 0; i < 8; i++) {
765 Inexact |= pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i];
766 }
767
768 if (Inexact == 0 && pAC->Addr.Port[PortNumber].PromMode == 0) {
769 return (SK_MC_FILTERING_EXACT);
770 }
771 else {
772 return (SK_MC_FILTERING_INEXACT);
773 }
774
775} /* SkAddrXmacMcAdd */
776
777
778/******************************************************************************
779 *
780 * SkAddrGmacMcAdd - add a multicast address to a port
781 *
782 * Description:
783 * This routine enables reception for a given address on the given port.
784 *
785 * Notes:
786 * The return code is only valid for SK_PROM_MODE_NONE.
787 *
788 * Context:
789 * runtime, pageable
790 * may be called after SK_INIT_DATA
791 *
792 * Returns:
793 * SK_MC_FILTERING_INEXACT
794 * SK_MC_ILLEGAL_ADDRESS
795 */
796static int SkAddrGmacMcAdd(
797SK_AC *pAC, /* adapter context */
798SK_IOC IoC, /* I/O context */
799SK_U32 PortNumber, /* Port Number */
800SK_MAC_ADDR *pMc, /* multicast address to be added */
801int Flags) /* permanent/non-permanent */
802{
803 int i;
804#ifndef SK_ADDR_CHEAT
805 SK_U32 HashBit;
806#endif /* !defined(SK_ADDR_CHEAT) */
807
808 if (!(pMc->a[0] & SK_MC_BIT)) {
809 /* Hashing only possible with multicast addresses */
810 return (SK_MC_ILLEGAL_ADDRESS);
811 }
812
813#ifndef SK_ADDR_CHEAT
814
815 /* Compute hash value of address. */
816 HashBit = SkGmacMcHash(&pMc->a[0]);
817
818 if (Flags & SK_ADDR_PERMANENT) { /* permanent => RLMT */
819
820 /* Add bit to InexactRlmtFilter. */
821 pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[HashBit / 8] |=
822 1 << (HashBit % 8);
823
824 /* Copy bit to InexactFilter. */
825 for (i = 0; i < 8; i++) {
826 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] |=
827 pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[i];
828 }
829#ifdef DEBUG
830 SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
831 ("GMAC InexactRlmtFilter: %02X %02X %02X %02X %02X %02X %02X %02X\n",
832 pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[0],
833 pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[1],
834 pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[2],
835 pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[3],
836 pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[4],
837 pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[5],
838 pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[6],
839 pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[7]))
840#endif /* DEBUG */
841 }
842 else { /* not permanent => DRV */
843
844 /* Add bit to InexactDrvFilter. */
845 pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[HashBit / 8] |=
846 1 << (HashBit % 8);
847
848 /* Copy bit to InexactFilter. */
849 for (i = 0; i < 8; i++) {
850 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] |=
851 pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[i];
852 }
853#ifdef DEBUG
854 SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
855 ("GMAC InexactDrvFilter: %02X %02X %02X %02X %02X %02X %02X %02X\n",
856 pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[0],
857 pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[1],
858 pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[2],
859 pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[3],
860 pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[4],
861 pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[5],
862 pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[6],
863 pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[7]))
864#endif /* DEBUG */
865 }
866
867#else /* SK_ADDR_CHEAT */
868
869 /* Set all bits in InexactFilter. */
870 for (i = 0; i < 8; i++) {
871 pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0xFF;
872 }
873#endif /* SK_ADDR_CHEAT */
874
875 return (SK_MC_FILTERING_INEXACT);
876
877} /* SkAddrGmacMcAdd */
878
879#endif /* !SK_SLIM */
880
881/******************************************************************************
882 *
883 * SkAddrMcUpdate - update the HW MC address table and set the MAC address
884 *
885 * Description:
886 * This routine enables reception of the addresses contained in a local
887 * table for a given port.
888 * It also programs the port's current physical MAC address.
889 *
890 * It calls either SkAddrXmacMcUpdate or SkAddrGmacMcUpdate, according
891 * to the adapter in use. The real work is done there.
892 *
893 * Notes:
894 * The return code is only valid for SK_PROM_MODE_NONE.
895 *
896 * Context:
897 * runtime, pageable
898 * may be called after SK_INIT_IO
899 *
900 * Returns:
901 * SK_MC_FILTERING_EXACT
902 * SK_MC_FILTERING_INEXACT
903 * SK_ADDR_ILLEGAL_PORT
904 */
905int SkAddrMcUpdate(
906SK_AC *pAC, /* adapter context */
907SK_IOC IoC, /* I/O context */
908SK_U32 PortNumber) /* Port Number */
909{
910 int ReturnCode = 0;
911#if (!defined(SK_SLIM) || defined(DEBUG))
912 if (PortNumber >= (SK_U32) pAC->GIni.GIMacsFound) {
913 return (SK_ADDR_ILLEGAL_PORT);
914 }
915#endif /* !SK_SLIM || DEBUG */
916
917#ifdef GENESIS
918 if (pAC->GIni.GIGenesis) {
919 ReturnCode = SkAddrXmacMcUpdate(pAC, IoC, PortNumber);
920 }
921#endif /* GENESIS */
922#ifdef YUKON
923 if (!pAC->GIni.GIGenesis) {
924 ReturnCode = SkAddrGmacMcUpdate(pAC, IoC, PortNumber);
925 }
926#endif /* YUKON */
927 return (ReturnCode);
928
929} /* SkAddrMcUpdate */
930
931
932#ifdef GENESIS
933
934/******************************************************************************
935 *
936 * SkAddrXmacMcUpdate - update the HW MC address table and set the MAC address
937 *
938 * Description:
939 * This routine enables reception of the addresses contained in a local
940 * table for a given port.
941 * It also programs the port's current physical MAC address.
942 *
943 * Notes:
944 * The return code is only valid for SK_PROM_MODE_NONE.
945 *
946 * Context:
947 * runtime, pageable
948 * may be called after SK_INIT_IO
949 *
950 * Returns:
951 * SK_MC_FILTERING_EXACT
952 * SK_MC_FILTERING_INEXACT
953 * SK_ADDR_ILLEGAL_PORT
954 */
955static int SkAddrXmacMcUpdate(
956SK_AC *pAC, /* adapter context */
957SK_IOC IoC, /* I/O context */
958SK_U32 PortNumber) /* Port Number */
959{
960 SK_U32 i;
961 SK_U8 Inexact;
962 SK_U16 *OutAddr;
963 SK_ADDR_PORT *pAPort;
964
965 SK_DBG_MSG(pAC,SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
966 ("SkAddrXmacMcUpdate on Port %u.\n", PortNumber))
967
968 pAPort = &pAC->Addr.Port[PortNumber];
969
970#ifdef DEBUG
971 SK_DBG_MSG(pAC,SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
972 ("Next0 on Port %d: %d\n", PortNumber, Next0[PortNumber]))
973#endif /* DEBUG */
974
975 /* Start with 0 to also program the logical MAC address. */
976 for (i = 0; i < pAPort->NextExactMatchRlmt; i++) {
977 /* Set exact match address i on XMAC */
978 OutAddr = (SK_U16 *) &pAPort->Exact[i].a[0];
979 XM_OUTADDR(IoC, PortNumber, XM_EXM(i), OutAddr);
980 }
981
982 /* Clear other permanent exact match addresses on XMAC */
983 if (pAPort->NextExactMatchRlmt <= SK_ADDR_LAST_MATCH_RLMT) {
984
985 SkXmClrExactAddr(pAC, IoC, PortNumber, pAPort->NextExactMatchRlmt,
986 SK_ADDR_LAST_MATCH_RLMT);
987 }
988
989 for (i = pAPort->FirstExactMatchDrv; i < pAPort->NextExactMatchDrv; i++) {
990 OutAddr = (SK_U16 *) &pAPort->Exact[i].a[0];
991 XM_OUTADDR(IoC, PortNumber, XM_EXM(i), OutAddr);
992 }
993
994 /* Clear other non-permanent exact match addresses on XMAC */
995 if (pAPort->NextExactMatchDrv <= SK_ADDR_LAST_MATCH_DRV) {
996
997 SkXmClrExactAddr(pAC, IoC, PortNumber, pAPort->NextExactMatchDrv,
998 SK_ADDR_LAST_MATCH_DRV);
999 }
1000
1001 for (Inexact = 0, i = 0; i < 8; i++) {
1002 Inexact |= pAPort->InexactFilter.Bytes[i];
1003 }
1004
1005 if (pAPort->PromMode & SK_PROM_MODE_ALL_MC) {
1006
1007 /* Set all bits in 64-bit hash register. */
1008 XM_OUTHASH(IoC, PortNumber, XM_HSM, &OnesHash);
1009
1010 /* Enable Hashing */
1011 SkMacHashing(pAC, IoC, (int) PortNumber, SK_TRUE);
1012 }
1013 else if (Inexact != 0) {
1014
1015 /* Set 64-bit hash register to InexactFilter. */
1016 XM_OUTHASH(IoC, PortNumber, XM_HSM, &pAPort->InexactFilter.Bytes[0]);
1017
1018 /* Enable Hashing */
1019 SkMacHashing(pAC, IoC, (int) PortNumber, SK_TRUE);
1020 }
1021 else {
1022 /* Disable Hashing */
1023 SkMacHashing(pAC, IoC, (int) PortNumber, SK_FALSE);
1024 }
1025
1026 if (pAPort->PromMode != SK_PROM_MODE_NONE) {
1027 (void) SkAddrXmacPromiscuousChange(pAC, IoC, PortNumber, pAPort->PromMode);
1028 }
1029
1030 /* Set port's current physical MAC address. */
1031 OutAddr = (SK_U16 *) &pAPort->CurrentMacAddress.a[0];
1032
1033 XM_OUTADDR(IoC, PortNumber, XM_SA, OutAddr);
1034
1035#ifdef xDEBUG
1036 for (i = 0; i < pAPort->NextExactMatchRlmt; i++) {
1037 SK_U8 InAddr8[6];
1038 SK_U16 *InAddr;
1039
1040 /* Get exact match address i from port PortNumber. */
1041 InAddr = (SK_U16 *) &InAddr8[0];
1042
1043 XM_INADDR(IoC, PortNumber, XM_EXM(i), InAddr);
1044
1045 SK_DBG_MSG(pAC,SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
1046 ("SkAddrXmacMcUpdate: MC address %d on Port %u: ",
1047 "%02x %02x %02x %02x %02x %02x -- %02x %02x %02x %02x %02x %02x\n",
1048 i,
1049 PortNumber,
1050 InAddr8[0],
1051 InAddr8[1],
1052 InAddr8[2],
1053 InAddr8[3],
1054 InAddr8[4],
1055 InAddr8[5],
1056 pAPort->Exact[i].a[0],
1057 pAPort->Exact[i].a[1],
1058 pAPort->Exact[i].a[2],
1059 pAPort->Exact[i].a[3],
1060 pAPort->Exact[i].a[4],
1061 pAPort->Exact[i].a[5]))
1062 }
1063#endif /* DEBUG */
1064
1065 /* Determine return value. */
1066 if (Inexact == 0 && pAPort->PromMode == 0) {
1067 return (SK_MC_FILTERING_EXACT);
1068 }
1069 else {
1070 return (SK_MC_FILTERING_INEXACT);
1071 }
1072
1073} /* SkAddrXmacMcUpdate */
1074
1075#endif /* GENESIS */
1076
1077#ifdef YUKON
1078
1079/******************************************************************************
1080 *
1081 * SkAddrGmacMcUpdate - update the HW MC address table and set the MAC address
1082 *
1083 * Description:
1084 * This routine enables reception of the addresses contained in a local
1085 * table for a given port.
1086 * It also programs the port's current physical MAC address.
1087 *
1088 * Notes:
1089 * The return code is only valid for SK_PROM_MODE_NONE.
1090 *
1091 * Context:
1092 * runtime, pageable
1093 * may be called after SK_INIT_IO
1094 *
1095 * Returns:
1096 * SK_MC_FILTERING_EXACT
1097 * SK_MC_FILTERING_INEXACT
1098 * SK_ADDR_ILLEGAL_PORT
1099 */
1100static int SkAddrGmacMcUpdate(
1101SK_AC *pAC, /* adapter context */
1102SK_IOC IoC, /* I/O context */
1103SK_U32 PortNumber) /* Port Number */
1104{
1105#ifndef SK_SLIM
1106 SK_U32 i;
1107 SK_U8 Inexact;
1108#endif /* not SK_SLIM */
1109 SK_U16 *OutAddr;
1110 SK_ADDR_PORT *pAPort;
1111
1112 SK_DBG_MSG(pAC,SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
1113 ("SkAddrGmacMcUpdate on Port %u.\n", PortNumber))
1114
1115 pAPort = &pAC->Addr.Port[PortNumber];
1116
1117#ifdef DEBUG
1118 SK_DBG_MSG(pAC,SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
1119 ("Next0 on Port %d: %d\n", PortNumber, Next0[PortNumber]))
1120#endif /* DEBUG */
1121
1122#ifndef SK_SLIM
1123 for (Inexact = 0, i = 0; i < 8; i++) {
1124 Inexact |= pAPort->InexactFilter.Bytes[i];
1125 }
1126
1127 /* Set 64-bit hash register to InexactFilter. */
1128 GM_OUTHASH(IoC, PortNumber, GM_MC_ADDR_H1,
1129 &pAPort->InexactFilter.Bytes[0]);
1130
1131 if (pAPort->PromMode & SK_PROM_MODE_ALL_MC) {
1132
1133 /* Set all bits in 64-bit hash register. */
1134 GM_OUTHASH(IoC, PortNumber, GM_MC_ADDR_H1, &OnesHash);
1135
1136 /* Enable Hashing */
1137 SkMacHashing(pAC, IoC, (int) PortNumber, SK_TRUE);
1138 }
1139 else {
1140 /* Enable Hashing. */
1141 SkMacHashing(pAC, IoC, (int) PortNumber, SK_TRUE);
1142 }
1143
1144 if (pAPort->PromMode != SK_PROM_MODE_NONE) {
1145 (void) SkAddrGmacPromiscuousChange(pAC, IoC, PortNumber, pAPort->PromMode);
1146 }
1147#else /* SK_SLIM */
1148
1149 /* Set all bits in 64-bit hash register. */
1150 GM_OUTHASH(IoC, PortNumber, GM_MC_ADDR_H1, &OnesHash);
1151
1152 /* Enable Hashing */
1153 SkMacHashing(pAC, IoC, (int) PortNumber, SK_TRUE);
1154
1155 (void) SkAddrGmacPromiscuousChange(pAC, IoC, PortNumber, pAPort->PromMode);
1156
1157#endif /* SK_SLIM */
1158
1159 /* Set port's current physical MAC address. */
1160 OutAddr = (SK_U16 *) &pAPort->CurrentMacAddress.a[0];
1161 GM_OUTADDR(IoC, PortNumber, GM_SRC_ADDR_1L, OutAddr);
1162
1163 /* Set port's current logical MAC address. */
1164 OutAddr = (SK_U16 *) &pAPort->Exact[0].a[0];
1165 GM_OUTADDR(IoC, PortNumber, GM_SRC_ADDR_2L, OutAddr);
1166
1167#ifdef DEBUG
1168 SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
1169 ("SkAddrGmacMcUpdate: Permanent Physical MAC Address: %02X %02X %02X %02X %02X %02X\n",
1170 pAPort->Exact[0].a[0],
1171 pAPort->Exact[0].a[1],
1172 pAPort->Exact[0].a[2],
1173 pAPort->Exact[0].a[3],
1174 pAPort->Exact[0].a[4],
1175 pAPort->Exact[0].a[5]))
1176
1177 SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
1178 ("SkAddrGmacMcUpdate: Physical MAC Address: %02X %02X %02X %02X %02X %02X\n",
1179 pAPort->CurrentMacAddress.a[0],
1180 pAPort->CurrentMacAddress.a[1],
1181 pAPort->CurrentMacAddress.a[2],
1182 pAPort->CurrentMacAddress.a[3],
1183 pAPort->CurrentMacAddress.a[4],
1184 pAPort->CurrentMacAddress.a[5]))
1185#endif /* DEBUG */
1186
1187#ifndef SK_SLIM
1188 /* Determine return value. */
1189 if (Inexact == 0 && pAPort->PromMode == 0) {
1190 return (SK_MC_FILTERING_EXACT);
1191 }
1192 else {
1193 return (SK_MC_FILTERING_INEXACT);
1194 }
1195#else /* SK_SLIM */
1196 return (SK_MC_FILTERING_INEXACT);
1197#endif /* SK_SLIM */
1198
1199} /* SkAddrGmacMcUpdate */
1200
1201#endif /* YUKON */
1202
1203#ifndef SK_NO_MAO
1204
1205/******************************************************************************
1206 *
1207 * SkAddrOverride - override a port's MAC address
1208 *
1209 * Description:
1210 * This routine overrides the MAC address of one port.
1211 *
1212 * Context:
1213 * runtime, pageable
1214 * may be called after SK_INIT_IO
1215 *
1216 * Returns:
1217 * SK_ADDR_SUCCESS if successful.
1218 * SK_ADDR_DUPLICATE_ADDRESS if duplicate MAC address.
1219 * SK_ADDR_MULTICAST_ADDRESS if multicast or broadcast address.
1220 * SK_ADDR_TOO_EARLY if SK_INIT_IO was not executed before.
1221 */
1222int SkAddrOverride(
1223SK_AC *pAC, /* adapter context */
1224SK_IOC IoC, /* I/O context */
1225SK_U32 PortNumber, /* Port Number */
1226SK_MAC_ADDR SK_FAR *pNewAddr, /* new MAC address */
1227int Flags) /* logical/physical MAC address */
1228{
1229#ifndef SK_NO_RLMT
1230 SK_EVPARA Para;
1231#endif /* !SK_NO_RLMT */
1232 SK_U32 NetNumber;
1233 SK_U32 i;
1234 SK_U16 SK_FAR *OutAddr;
1235
1236#ifndef SK_NO_RLMT
1237 NetNumber = pAC->Rlmt.Port[PortNumber].Net->NetNumber;
1238#else
1239 NetNumber = 0;
1240#endif /* SK_NO_RLMT */
1241#if (!defined(SK_SLIM) || defined(DEBUG))
1242 if (PortNumber >= (SK_U32) pAC->GIni.GIMacsFound) {
1243 return (SK_ADDR_ILLEGAL_PORT);
1244 }
1245#endif /* !SK_SLIM || DEBUG */
1246 if (pNewAddr != NULL && (pNewAddr->a[0] & SK_MC_BIT) != 0) {
1247 return (SK_ADDR_MULTICAST_ADDRESS);
1248 }
1249
1250 if (!pAC->Addr.Net[NetNumber].CurrentMacAddressSet) {
1251 return (SK_ADDR_TOO_EARLY);
1252 }
1253
1254 if (Flags & SK_ADDR_SET_LOGICAL) { /* Activate logical MAC address. */
1255 /* Parameter *pNewAddr is ignored. */
1256 for (i = 0; i < (SK_U32) pAC->GIni.GIMacsFound; i++) {
1257 if (!pAC->Addr.Port[i].CurrentMacAddressSet) {
1258 return (SK_ADDR_TOO_EARLY);
1259 }
1260 }
1261#ifndef SK_NO_RLMT
1262 /* Set PortNumber to number of net's active port. */
1263 PortNumber = pAC->Rlmt.Net[NetNumber].
1264 Port[pAC->Addr.Net[NetNumber].ActivePort]->PortNumber;
1265#endif /* !SK_NO_RLMT */
1266 pAC->Addr.Port[PortNumber].Exact[0] =
1267 pAC->Addr.Net[NetNumber].CurrentMacAddress;
1268
1269 /* Write address to first exact match entry of active port. */
1270 (void) SkAddrMcUpdate(pAC, IoC, PortNumber);
1271 }
1272 else if (Flags & SK_ADDR_CLEAR_LOGICAL) {
1273 /* Deactivate logical MAC address. */
1274 /* Parameter *pNewAddr is ignored. */
1275 for (i = 0; i < (SK_U32) pAC->GIni.GIMacsFound; i++) {
1276 if (!pAC->Addr.Port[i].CurrentMacAddressSet) {
1277 return (SK_ADDR_TOO_EARLY);
1278 }
1279 }
1280#ifndef SK_NO_RLMT
1281 /* Set PortNumber to number of net's active port. */
1282 PortNumber = pAC->Rlmt.Net[NetNumber].
1283 Port[pAC->Addr.Net[NetNumber].ActivePort]->PortNumber;
1284#endif /* !SK_NO_RLMT */
1285 for (i = 0; i < SK_MAC_ADDR_LEN; i++ ) {
1286 pAC->Addr.Port[PortNumber].Exact[0].a[i] = 0;
1287 }
1288
1289 /* Write address to first exact match entry of active port. */
1290 (void) SkAddrMcUpdate(pAC, IoC, PortNumber);
1291 }
1292 else if (Flags & SK_ADDR_PHYSICAL_ADDRESS) { /* Physical MAC address. */
1293 if (SK_ADDR_EQUAL(pNewAddr->a,
1294 pAC->Addr.Net[NetNumber].CurrentMacAddress.a)) {
1295 return (SK_ADDR_DUPLICATE_ADDRESS);
1296 }
1297
1298 for (i = 0; i < (SK_U32) pAC->GIni.GIMacsFound; i++) {
1299 if (!pAC->Addr.Port[i].CurrentMacAddressSet) {
1300 return (SK_ADDR_TOO_EARLY);
1301 }
1302
1303 if (SK_ADDR_EQUAL(pNewAddr->a,
1304 pAC->Addr.Port[i].CurrentMacAddress.a)) {
1305 if (i == PortNumber) {
1306 return (SK_ADDR_SUCCESS);
1307 }
1308 else {
1309 return (SK_ADDR_DUPLICATE_ADDRESS);
1310 }
1311 }
1312 }
1313
1314 pAC->Addr.Port[PortNumber].PreviousMacAddress =
1315 pAC->Addr.Port[PortNumber].CurrentMacAddress;
1316 pAC->Addr.Port[PortNumber].CurrentMacAddress = *pNewAddr;
1317
1318 /* Change port's physical MAC address. */
1319 OutAddr = (SK_U16 SK_FAR *) pNewAddr;
1320#ifdef GENESIS
1321 if (pAC->GIni.GIGenesis) {
1322 XM_OUTADDR(IoC, PortNumber, XM_SA, OutAddr);
1323 }
1324#endif /* GENESIS */
1325#ifdef YUKON
1326 if (!pAC->GIni.GIGenesis) {
1327 GM_OUTADDR(IoC, PortNumber, GM_SRC_ADDR_1L, OutAddr);
1328 }
1329#endif /* YUKON */
1330
1331#ifndef SK_NO_RLMT
1332 /* Report address change to RLMT. */
1333 Para.Para32[0] = PortNumber;
1334 Para.Para32[0] = -1;
1335 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_PORT_ADDR, Para);
1336#endif /* !SK_NO_RLMT */
1337 }
1338 else { /* Logical MAC address. */
1339 if (SK_ADDR_EQUAL(pNewAddr->a,
1340 pAC->Addr.Net[NetNumber].CurrentMacAddress.a)) {
1341 return (SK_ADDR_SUCCESS);
1342 }
1343
1344 for (i = 0; i < (SK_U32) pAC->GIni.GIMacsFound; i++) {
1345 if (!pAC->Addr.Port[i].CurrentMacAddressSet) {
1346 return (SK_ADDR_TOO_EARLY);
1347 }
1348
1349 if (SK_ADDR_EQUAL(pNewAddr->a,
1350 pAC->Addr.Port[i].CurrentMacAddress.a)) {
1351 return (SK_ADDR_DUPLICATE_ADDRESS);
1352 }
1353 }
1354
1355 /*
1356 * In case that the physical and the logical MAC addresses are equal
1357 * we must also change the physical MAC address here.
1358 * In this case we have an adapter which initially was programmed with
1359 * two identical MAC addresses.
1360 */
1361 if (SK_ADDR_EQUAL(pAC->Addr.Port[PortNumber].CurrentMacAddress.a,
1362 pAC->Addr.Port[PortNumber].Exact[0].a)) {
1363
1364 pAC->Addr.Port[PortNumber].PreviousMacAddress =
1365 pAC->Addr.Port[PortNumber].CurrentMacAddress;
1366 pAC->Addr.Port[PortNumber].CurrentMacAddress = *pNewAddr;
1367
1368#ifndef SK_NO_RLMT
1369 /* Report address change to RLMT. */
1370 Para.Para32[0] = PortNumber;
1371 Para.Para32[0] = -1;
1372 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_PORT_ADDR, Para);
1373#endif /* !SK_NO_RLMT */
1374 }
1375
1376#ifndef SK_NO_RLMT
1377 /* Set PortNumber to number of net's active port. */
1378 PortNumber = pAC->Rlmt.Net[NetNumber].
1379 Port[pAC->Addr.Net[NetNumber].ActivePort]->PortNumber;
1380#endif /* !SK_NO_RLMT */
1381 pAC->Addr.Net[NetNumber].CurrentMacAddress = *pNewAddr;
1382 pAC->Addr.Port[PortNumber].Exact[0] = *pNewAddr;
1383#ifdef DEBUG
1384 SK_DBG_MSG(pAC,SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
1385 ("SkAddrOverride: Permanent MAC Address: %02X %02X %02X %02X %02X %02X\n",
1386 pAC->Addr.Net[NetNumber].PermanentMacAddress.a[0],
1387 pAC->Addr.Net[NetNumber].PermanentMacAddress.a[1],
1388 pAC->Addr.Net[NetNumber].PermanentMacAddress.a[2],
1389 pAC->Addr.Net[NetNumber].PermanentMacAddress.a[3],
1390 pAC->Addr.Net[NetNumber].PermanentMacAddress.a[4],
1391 pAC->Addr.Net[NetNumber].PermanentMacAddress.a[5]))
1392
1393 SK_DBG_MSG(pAC,SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
1394 ("SkAddrOverride: New logical MAC Address: %02X %02X %02X %02X %02X %02X\n",
1395 pAC->Addr.Net[NetNumber].CurrentMacAddress.a[0],
1396 pAC->Addr.Net[NetNumber].CurrentMacAddress.a[1],
1397 pAC->Addr.Net[NetNumber].CurrentMacAddress.a[2],
1398 pAC->Addr.Net[NetNumber].CurrentMacAddress.a[3],
1399 pAC->Addr.Net[NetNumber].CurrentMacAddress.a[4],
1400 pAC->Addr.Net[NetNumber].CurrentMacAddress.a[5]))
1401#endif /* DEBUG */
1402
1403 /* Write address to first exact match entry of active port. */
1404 (void) SkAddrMcUpdate(pAC, IoC, PortNumber);
1405 }
1406
1407 return (SK_ADDR_SUCCESS);
1408
1409} /* SkAddrOverride */
1410
1411
1412#endif /* SK_NO_MAO */
1413
1414/******************************************************************************
1415 *
1416 * SkAddrPromiscuousChange - set promiscuous mode for given port
1417 *
1418 * Description:
1419 * This routine manages promiscuous mode:
1420 * - none
1421 * - all LLC frames
1422 * - all MC frames
1423 *
1424 * It calls either SkAddrXmacPromiscuousChange or
1425 * SkAddrGmacPromiscuousChange, according to the adapter in use.
1426 * The real work is done there.
1427 *
1428 * Context:
1429 * runtime, pageable
1430 * may be called after SK_INIT_IO
1431 *
1432 * Returns:
1433 * SK_ADDR_SUCCESS
1434 * SK_ADDR_ILLEGAL_PORT
1435 */
1436int SkAddrPromiscuousChange(
1437SK_AC *pAC, /* adapter context */
1438SK_IOC IoC, /* I/O context */
1439SK_U32 PortNumber, /* port whose promiscuous mode changes */
1440int NewPromMode) /* new promiscuous mode */
1441{
1442 int ReturnCode = 0;
1443#if (!defined(SK_SLIM) || defined(DEBUG))
1444 if (PortNumber >= (SK_U32) pAC->GIni.GIMacsFound) {
1445 return (SK_ADDR_ILLEGAL_PORT);
1446 }
1447#endif /* !SK_SLIM || DEBUG */
1448
1449#ifdef GENESIS
1450 if (pAC->GIni.GIGenesis) {
1451 ReturnCode =
1452 SkAddrXmacPromiscuousChange(pAC, IoC, PortNumber, NewPromMode);
1453 }
1454#endif /* GENESIS */
1455#ifdef YUKON
1456 if (!pAC->GIni.GIGenesis) {
1457 ReturnCode =
1458 SkAddrGmacPromiscuousChange(pAC, IoC, PortNumber, NewPromMode);
1459 }
1460#endif /* YUKON */
1461
1462 return (ReturnCode);
1463
1464} /* SkAddrPromiscuousChange */
1465
1466#ifdef GENESIS
1467
1468/******************************************************************************
1469 *
1470 * SkAddrXmacPromiscuousChange - set promiscuous mode for given port
1471 *
1472 * Description:
1473 * This routine manages promiscuous mode:
1474 * - none
1475 * - all LLC frames
1476 * - all MC frames
1477 *
1478 * Context:
1479 * runtime, pageable
1480 * may be called after SK_INIT_IO
1481 *
1482 * Returns:
1483 * SK_ADDR_SUCCESS
1484 * SK_ADDR_ILLEGAL_PORT
1485 */
1486static int SkAddrXmacPromiscuousChange(
1487SK_AC *pAC, /* adapter context */
1488SK_IOC IoC, /* I/O context */
1489SK_U32 PortNumber, /* port whose promiscuous mode changes */
1490int NewPromMode) /* new promiscuous mode */
1491{
1492 int i;
1493 SK_BOOL InexactModeBit;
1494 SK_U8 Inexact;
1495 SK_U8 HwInexact;
1496 SK_FILTER64 HwInexactFilter;
1497 SK_U16 LoMode; /* Lower 16 bits of XMAC Mode Register. */
1498 int CurPromMode = SK_PROM_MODE_NONE;
1499
1500 /* Read CurPromMode from Hardware. */
1501 XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
1502
1503 if ((LoMode & XM_MD_ENA_PROM) != 0) {
1504 /* Promiscuous mode! */
1505 CurPromMode |= SK_PROM_MODE_LLC;
1506 }
1507
1508 for (Inexact = 0xFF, i = 0; i < 8; i++) {
1509 Inexact &= pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i];
1510 }
1511 if (Inexact == 0xFF) {
1512 CurPromMode |= (pAC->Addr.Port[PortNumber].PromMode & SK_PROM_MODE_ALL_MC);
1513 }
1514 else {
1515 /* Get InexactModeBit (bit XM_MD_ENA_HASH in mode register) */
1516 XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
1517
1518 InexactModeBit = (LoMode & XM_MD_ENA_HASH) != 0;
1519
1520 /* Read 64-bit hash register from XMAC */
1521 XM_INHASH(IoC, PortNumber, XM_HSM, &HwInexactFilter.Bytes[0]);
1522
1523 for (HwInexact = 0xFF, i = 0; i < 8; i++) {
1524 HwInexact &= HwInexactFilter.Bytes[i];
1525 }
1526
1527 if (InexactModeBit && (HwInexact == 0xFF)) {
1528 CurPromMode |= SK_PROM_MODE_ALL_MC;
1529 }
1530 }
1531
1532 pAC->Addr.Port[PortNumber].PromMode = NewPromMode;
1533
1534 if (NewPromMode == CurPromMode) {
1535 return (SK_ADDR_SUCCESS);
1536 }
1537
1538 if ((NewPromMode & SK_PROM_MODE_ALL_MC) &&
1539 !(CurPromMode & SK_PROM_MODE_ALL_MC)) { /* All MC. */
1540
1541 /* Set all bits in 64-bit hash register. */
1542 XM_OUTHASH(IoC, PortNumber, XM_HSM, &OnesHash);
1543
1544 /* Enable Hashing */
1545 SkMacHashing(pAC, IoC, (int) PortNumber, SK_TRUE);
1546 }
1547 else if ((CurPromMode & SK_PROM_MODE_ALL_MC) &&
1548 !(NewPromMode & SK_PROM_MODE_ALL_MC)) { /* Norm MC. */
1549 for (Inexact = 0, i = 0; i < 8; i++) {
1550 Inexact |= pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i];
1551 }
1552 if (Inexact == 0) {
1553 /* Disable Hashing */
1554 SkMacHashing(pAC, IoC, (int) PortNumber, SK_FALSE);
1555 }
1556 else {
1557 /* Set 64-bit hash register to InexactFilter. */
1558 XM_OUTHASH(IoC, PortNumber, XM_HSM,
1559 &pAC->Addr.Port[PortNumber].InexactFilter.Bytes[0]);
1560
1561 /* Enable Hashing */
1562 SkMacHashing(pAC, IoC, (int) PortNumber, SK_TRUE);
1563 }
1564 }
1565
1566 if ((NewPromMode & SK_PROM_MODE_LLC) &&
1567 !(CurPromMode & SK_PROM_MODE_LLC)) { /* Prom. LLC */
1568 /* Set the MAC in Promiscuous Mode */
1569 SkMacPromiscMode(pAC, IoC, (int) PortNumber, SK_TRUE);
1570 }
1571 else if ((CurPromMode & SK_PROM_MODE_LLC) &&
1572 !(NewPromMode & SK_PROM_MODE_LLC)) { /* Norm. LLC. */
1573 /* Clear Promiscuous Mode */
1574 SkMacPromiscMode(pAC, IoC, (int) PortNumber, SK_FALSE);
1575 }
1576
1577 return (SK_ADDR_SUCCESS);
1578
1579} /* SkAddrXmacPromiscuousChange */
1580
1581#endif /* GENESIS */
1582
1583#ifdef YUKON
1584
1585/******************************************************************************
1586 *
1587 * SkAddrGmacPromiscuousChange - set promiscuous mode for given port
1588 *
1589 * Description:
1590 * This routine manages promiscuous mode:
1591 * - none
1592 * - all LLC frames
1593 * - all MC frames
1594 *
1595 * Context:
1596 * runtime, pageable
1597 * may be called after SK_INIT_IO
1598 *
1599 * Returns:
1600 * SK_ADDR_SUCCESS
1601 * SK_ADDR_ILLEGAL_PORT
1602 */
1603static int SkAddrGmacPromiscuousChange(
1604SK_AC *pAC, /* adapter context */
1605SK_IOC IoC, /* I/O context */
1606SK_U32 PortNumber, /* port whose promiscuous mode changes */
1607int NewPromMode) /* new promiscuous mode */
1608{
1609 SK_U16 ReceiveControl; /* GMAC Receive Control Register */
1610 int CurPromMode = SK_PROM_MODE_NONE;
1611
1612 /* Read CurPromMode from Hardware. */
1613 GM_IN16(IoC, PortNumber, GM_RX_CTRL, &ReceiveControl);
1614
1615 if ((ReceiveControl & (GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA)) == 0) {
1616 /* Promiscuous mode! */
1617 CurPromMode |= SK_PROM_MODE_LLC;
1618 }
1619
1620 if ((ReceiveControl & GM_RXCR_MCF_ENA) == 0) {
1621 /* All Multicast mode! */
1622 CurPromMode |= (pAC->Addr.Port[PortNumber].PromMode & SK_PROM_MODE_ALL_MC);
1623 }
1624
1625 pAC->Addr.Port[PortNumber].PromMode = NewPromMode;
1626
1627 if (NewPromMode == CurPromMode) {
1628 return (SK_ADDR_SUCCESS);
1629 }
1630
1631 if ((NewPromMode & SK_PROM_MODE_ALL_MC) &&
1632 !(CurPromMode & SK_PROM_MODE_ALL_MC)) { /* All MC */
1633
1634 /* Set all bits in 64-bit hash register. */
1635 GM_OUTHASH(IoC, PortNumber, GM_MC_ADDR_H1, &OnesHash);
1636
1637 /* Enable Hashing */
1638 SkMacHashing(pAC, IoC, (int) PortNumber, SK_TRUE);
1639 }
1640
1641 if ((CurPromMode & SK_PROM_MODE_ALL_MC) &&
1642 !(NewPromMode & SK_PROM_MODE_ALL_MC)) { /* Norm. MC */
1643
1644 /* Set 64-bit hash register to InexactFilter. */
1645 GM_OUTHASH(IoC, PortNumber, GM_MC_ADDR_H1,
1646 &pAC->Addr.Port[PortNumber].InexactFilter.Bytes[0]);
1647
1648 /* Enable Hashing. */
1649 SkMacHashing(pAC, IoC, (int) PortNumber, SK_TRUE);
1650 }
1651
1652 if ((NewPromMode & SK_PROM_MODE_LLC) &&
1653 !(CurPromMode & SK_PROM_MODE_LLC)) { /* Prom. LLC */
1654
1655 /* Set the MAC to Promiscuous Mode. */
1656 SkMacPromiscMode(pAC, IoC, (int) PortNumber, SK_TRUE);
1657 }
1658 else if ((CurPromMode & SK_PROM_MODE_LLC) &&
1659 !(NewPromMode & SK_PROM_MODE_LLC)) { /* Norm. LLC */
1660
1661 /* Clear Promiscuous Mode. */
1662 SkMacPromiscMode(pAC, IoC, (int) PortNumber, SK_FALSE);
1663 }
1664
1665 return (SK_ADDR_SUCCESS);
1666
1667} /* SkAddrGmacPromiscuousChange */
1668
1669#endif /* YUKON */
1670
1671#ifndef SK_SLIM
1672
1673/******************************************************************************
1674 *
1675 * SkAddrSwap - swap address info
1676 *
1677 * Description:
1678 * This routine swaps address info of two ports.
1679 *
1680 * Context:
1681 * runtime, pageable
1682 * may be called after SK_INIT_IO
1683 *
1684 * Returns:
1685 * SK_ADDR_SUCCESS
1686 * SK_ADDR_ILLEGAL_PORT
1687 */
1688int SkAddrSwap(
1689SK_AC *pAC, /* adapter context */
1690SK_IOC IoC, /* I/O context */
1691SK_U32 FromPortNumber, /* Port1 Index */
1692SK_U32 ToPortNumber) /* Port2 Index */
1693{
1694 int i;
1695 SK_U8 Byte;
1696 SK_MAC_ADDR MacAddr;
1697 SK_U32 DWord;
1698
1699 if (FromPortNumber >= (SK_U32) pAC->GIni.GIMacsFound) {
1700 return (SK_ADDR_ILLEGAL_PORT);
1701 }
1702
1703 if (ToPortNumber >= (SK_U32) pAC->GIni.GIMacsFound) {
1704 return (SK_ADDR_ILLEGAL_PORT);
1705 }
1706
1707 if (pAC->Rlmt.Port[FromPortNumber].Net != pAC->Rlmt.Port[ToPortNumber].Net) {
1708 return (SK_ADDR_ILLEGAL_PORT);
1709 }
1710
1711 /*
1712 * Swap:
1713 * - Exact Match Entries (GEnesis and Yukon)
1714 * Yukon uses first entry for the logical MAC
1715 * address (stored in the second GMAC register).
1716 * - FirstExactMatchRlmt (GEnesis only)
1717 * - NextExactMatchRlmt (GEnesis only)
1718 * - FirstExactMatchDrv (GEnesis only)
1719 * - NextExactMatchDrv (GEnesis only)
1720 * - 64-bit filter (InexactFilter)
1721 * - Promiscuous Mode
1722 * of ports.
1723 */
1724
1725 for (i = 0; i < SK_ADDR_EXACT_MATCHES; i++) {
1726 MacAddr = pAC->Addr.Port[FromPortNumber].Exact[i];
1727 pAC->Addr.Port[FromPortNumber].Exact[i] =
1728 pAC->Addr.Port[ToPortNumber].Exact[i];
1729 pAC->Addr.Port[ToPortNumber].Exact[i] = MacAddr;
1730 }
1731
1732 for (i = 0; i < 8; i++) {
1733 Byte = pAC->Addr.Port[FromPortNumber].InexactFilter.Bytes[i];
1734 pAC->Addr.Port[FromPortNumber].InexactFilter.Bytes[i] =
1735 pAC->Addr.Port[ToPortNumber].InexactFilter.Bytes[i];
1736 pAC->Addr.Port[ToPortNumber].InexactFilter.Bytes[i] = Byte;
1737 }
1738
1739 i = pAC->Addr.Port[FromPortNumber].PromMode;
1740 pAC->Addr.Port[FromPortNumber].PromMode = pAC->Addr.Port[ToPortNumber].PromMode;
1741 pAC->Addr.Port[ToPortNumber].PromMode = i;
1742
1743 if (pAC->GIni.GIGenesis) {
1744 DWord = pAC->Addr.Port[FromPortNumber].FirstExactMatchRlmt;
1745 pAC->Addr.Port[FromPortNumber].FirstExactMatchRlmt =
1746 pAC->Addr.Port[ToPortNumber].FirstExactMatchRlmt;
1747 pAC->Addr.Port[ToPortNumber].FirstExactMatchRlmt = DWord;
1748
1749 DWord = pAC->Addr.Port[FromPortNumber].NextExactMatchRlmt;
1750 pAC->Addr.Port[FromPortNumber].NextExactMatchRlmt =
1751 pAC->Addr.Port[ToPortNumber].NextExactMatchRlmt;
1752 pAC->Addr.Port[ToPortNumber].NextExactMatchRlmt = DWord;
1753
1754 DWord = pAC->Addr.Port[FromPortNumber].FirstExactMatchDrv;
1755 pAC->Addr.Port[FromPortNumber].FirstExactMatchDrv =
1756 pAC->Addr.Port[ToPortNumber].FirstExactMatchDrv;
1757 pAC->Addr.Port[ToPortNumber].FirstExactMatchDrv = DWord;
1758
1759 DWord = pAC->Addr.Port[FromPortNumber].NextExactMatchDrv;
1760 pAC->Addr.Port[FromPortNumber].NextExactMatchDrv =
1761 pAC->Addr.Port[ToPortNumber].NextExactMatchDrv;
1762 pAC->Addr.Port[ToPortNumber].NextExactMatchDrv = DWord;
1763 }
1764
1765 /* CAUTION: Solution works if only ports of one adapter are in use. */
1766 for (i = 0; (SK_U32) i < pAC->Rlmt.Net[pAC->Rlmt.Port[ToPortNumber].
1767 Net->NetNumber].NumPorts; i++) {
1768 if (pAC->Rlmt.Net[pAC->Rlmt.Port[ToPortNumber].Net->NetNumber].
1769 Port[i]->PortNumber == ToPortNumber) {
1770 pAC->Addr.Net[pAC->Rlmt.Port[ToPortNumber].Net->NetNumber].
1771 ActivePort = i;
1772 /* 20001207 RA: Was "ToPortNumber;". */
1773 }
1774 }
1775
1776 (void) SkAddrMcUpdate(pAC, IoC, FromPortNumber);
1777 (void) SkAddrMcUpdate(pAC, IoC, ToPortNumber);
1778
1779 return (SK_ADDR_SUCCESS);
1780
1781} /* SkAddrSwap */
1782
1783#endif /* !SK_SLIM */
1784
1785#ifdef __cplusplus
1786}
1787#endif /* __cplusplus */
1788
diff --git a/drivers/net/sk98lin/skdim.c b/drivers/net/sk98lin/skdim.c
new file mode 100644
index 0000000000..37ce03fb8d
--- /dev/null
+++ b/drivers/net/sk98lin/skdim.c
@@ -0,0 +1,742 @@
1/******************************************************************************
2 *
3 * Name: skdim.c
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.5 $
6 * Date: $Date: 2003/11/28 12:55:40 $
7 * Purpose: All functions to maintain interrupt moderation
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/******************************************************************************
26 *
27 * Description:
28 *
29 * This module is intended to manage the dynamic interrupt moderation on both
30 * GEnesis and Yukon adapters.
31 *
32 * Include File Hierarchy:
33 *
34 * "skdrv1st.h"
35 * "skdrv2nd.h"
36 *
37 ******************************************************************************/
38
39#ifndef lint
40static const char SysKonnectFileId[] =
41 "@(#) $Id: skdim.c,v 1.5 2003/11/28 12:55:40 rroesler Exp $ (C) SysKonnect.";
42#endif
43
44#define __SKADDR_C
45
46#ifdef __cplusplus
47#error C++ is not yet supported.
48extern "C" {
49#endif
50
51/*******************************************************************************
52**
53** Includes
54**
55*******************************************************************************/
56
57#ifndef __INC_SKDRV1ST_H
58#include "h/skdrv1st.h"
59#endif
60
61#ifndef __INC_SKDRV2ND_H
62#include "h/skdrv2nd.h"
63#endif
64
65#include <linux/kernel_stat.h>
66
67/*******************************************************************************
68**
69** Defines
70**
71*******************************************************************************/
72
73/*******************************************************************************
74**
75** Typedefs
76**
77*******************************************************************************/
78
79/*******************************************************************************
80**
81** Local function prototypes
82**
83*******************************************************************************/
84
85static unsigned int GetCurrentSystemLoad(SK_AC *pAC);
86static SK_U64 GetIsrCalls(SK_AC *pAC);
87static SK_BOOL IsIntModEnabled(SK_AC *pAC);
88static void SetCurrIntCtr(SK_AC *pAC);
89static void EnableIntMod(SK_AC *pAC);
90static void DisableIntMod(SK_AC *pAC);
91static void ResizeDimTimerDuration(SK_AC *pAC);
92static void DisplaySelectedModerationType(SK_AC *pAC);
93static void DisplaySelectedModerationMask(SK_AC *pAC);
94static void DisplayDescrRatio(SK_AC *pAC);
95
96/*******************************************************************************
97**
98** Global variables
99**
100*******************************************************************************/
101
102/*******************************************************************************
103**
104** Local variables
105**
106*******************************************************************************/
107
108/*******************************************************************************
109**
110** Global functions
111**
112*******************************************************************************/
113
114/*******************************************************************************
115** Function : SkDimModerate
116** Description : Called in every ISR to check if moderation is to be applied
117** or not for the current number of interrupts
118** Programmer : Ralph Roesler
119** Last Modified: 22-mar-03
120** Returns : void (!)
121** Notes : -
122*******************************************************************************/
123
124void
125SkDimModerate(SK_AC *pAC) {
126 unsigned int CurrSysLoad = 0; /* expressed in percent */
127 unsigned int LoadIncrease = 0; /* expressed in percent */
128 SK_U64 ThresholdInts = 0;
129 SK_U64 IsrCallsPerSec = 0;
130
131#define M_DIMINFO pAC->DynIrqModInfo
132
133 if (!IsIntModEnabled(pAC)) {
134 if (M_DIMINFO.IntModTypeSelect == C_INT_MOD_DYNAMIC) {
135 CurrSysLoad = GetCurrentSystemLoad(pAC);
136 if (CurrSysLoad > 75) {
137 /*
138 ** More than 75% total system load! Enable the moderation
139 ** to shield the system against too many interrupts.
140 */
141 EnableIntMod(pAC);
142 } else if (CurrSysLoad > M_DIMINFO.PrevSysLoad) {
143 LoadIncrease = (CurrSysLoad - M_DIMINFO.PrevSysLoad);
144 if (LoadIncrease > ((M_DIMINFO.PrevSysLoad *
145 C_INT_MOD_ENABLE_PERCENTAGE) / 100)) {
146 if (CurrSysLoad > 10) {
147 /*
148 ** More than 50% increase with respect to the
149 ** previous load of the system. Most likely this
150 ** is due to our ISR-proc...
151 */
152 EnableIntMod(pAC);
153 }
154 }
155 } else {
156 /*
157 ** Neither too much system load at all nor too much increase
158 ** with respect to the previous system load. Hence, we can leave
159 ** the ISR-handling like it is without enabling moderation.
160 */
161 }
162 M_DIMINFO.PrevSysLoad = CurrSysLoad;
163 }
164 } else {
165 if (M_DIMINFO.IntModTypeSelect == C_INT_MOD_DYNAMIC) {
166 ThresholdInts = ((M_DIMINFO.MaxModIntsPerSec *
167 C_INT_MOD_DISABLE_PERCENTAGE) / 100);
168 IsrCallsPerSec = GetIsrCalls(pAC);
169 if (IsrCallsPerSec <= ThresholdInts) {
170 /*
171 ** The number of interrupts within the last second is
172 ** lower than the disable_percentage of the desried
173 ** maxrate. Therefore we can disable the moderation.
174 */
175 DisableIntMod(pAC);
176 M_DIMINFO.MaxModIntsPerSec =
177 (M_DIMINFO.MaxModIntsPerSecUpperLimit +
178 M_DIMINFO.MaxModIntsPerSecLowerLimit) / 2;
179 } else {
180 /*
181 ** The number of interrupts per sec is the same as expected.
182 ** Evalulate the descriptor-ratio. If it has changed, a resize
183 ** in the moderation timer might be useful
184 */
185 if (M_DIMINFO.AutoSizing) {
186 ResizeDimTimerDuration(pAC);
187 }
188 }
189 }
190 }
191
192 /*
193 ** Some information to the log...
194 */
195 if (M_DIMINFO.DisplayStats) {
196 DisplaySelectedModerationType(pAC);
197 DisplaySelectedModerationMask(pAC);
198 DisplayDescrRatio(pAC);
199 }
200
201 M_DIMINFO.NbrProcessedDescr = 0;
202 SetCurrIntCtr(pAC);
203}
204
205/*******************************************************************************
206** Function : SkDimStartModerationTimer
207** Description : Starts the audit-timer for the dynamic interrupt moderation
208** Programmer : Ralph Roesler
209** Last Modified: 22-mar-03
210** Returns : void (!)
211** Notes : -
212*******************************************************************************/
213
214void
215SkDimStartModerationTimer(SK_AC *pAC) {
216 SK_EVPARA EventParam; /* Event struct for timer event */
217
218 SK_MEMSET((char *) &EventParam, 0, sizeof(EventParam));
219 EventParam.Para32[0] = SK_DRV_MODERATION_TIMER;
220 SkTimerStart(pAC, pAC->IoBase, &pAC->DynIrqModInfo.ModTimer,
221 SK_DRV_MODERATION_TIMER_LENGTH,
222 SKGE_DRV, SK_DRV_TIMER, EventParam);
223}
224
225/*******************************************************************************
226** Function : SkDimEnableModerationIfNeeded
227** Description : Either enables or disables moderation
228** Programmer : Ralph Roesler
229** Last Modified: 22-mar-03
230** Returns : void (!)
231** Notes : This function is called when a particular adapter is opened
232** There is no Disable function, because when all interrupts
233** might be disable, the moderation timer has no meaning at all
234******************************************************************************/
235
236void
237SkDimEnableModerationIfNeeded(SK_AC *pAC) {
238
239 if (M_DIMINFO.IntModTypeSelect == C_INT_MOD_STATIC) {
240 EnableIntMod(pAC); /* notification print in this function */
241 } else if (M_DIMINFO.IntModTypeSelect == C_INT_MOD_DYNAMIC) {
242 SkDimStartModerationTimer(pAC);
243 if (M_DIMINFO.DisplayStats) {
244 printk("Dynamic moderation has been enabled\n");
245 }
246 } else {
247 if (M_DIMINFO.DisplayStats) {
248 printk("No moderation has been enabled\n");
249 }
250 }
251}
252
253/*******************************************************************************
254** Function : SkDimDisplayModerationSettings
255** Description : Displays the current settings regarding interrupt moderation
256** Programmer : Ralph Roesler
257** Last Modified: 22-mar-03
258** Returns : void (!)
259** Notes : -
260*******************************************************************************/
261
262void
263SkDimDisplayModerationSettings(SK_AC *pAC) {
264 DisplaySelectedModerationType(pAC);
265 DisplaySelectedModerationMask(pAC);
266}
267
268/*******************************************************************************
269**
270** Local functions
271**
272*******************************************************************************/
273
274/*******************************************************************************
275** Function : GetCurrentSystemLoad
276** Description : Retrieves the current system load of the system. This load
277** is evaluated for all processors within the system.
278** Programmer : Ralph Roesler
279** Last Modified: 22-mar-03
280** Returns : unsigned int: load expressed in percentage
281** Notes : The possible range being returned is from 0 up to 100.
282** Whereas 0 means 'no load at all' and 100 'system fully loaded'
283** It is impossible to determine what actually causes the system
284** to be in 100%, but maybe that is due to too much interrupts.
285*******************************************************************************/
286
287static unsigned int
288GetCurrentSystemLoad(SK_AC *pAC) {
289 unsigned long jif = jiffies;
290 unsigned int UserTime = 0;
291 unsigned int SystemTime = 0;
292 unsigned int NiceTime = 0;
293 unsigned int IdleTime = 0;
294 unsigned int TotalTime = 0;
295 unsigned int UsedTime = 0;
296 unsigned int SystemLoad = 0;
297
298 /* unsigned int NbrCpu = 0; */
299
300 /*
301 ** The following lines have been commented out, because
302 ** from kernel 2.5.44 onwards, the kernel-owned structure
303 **
304 ** struct kernel_stat kstat
305 **
306 ** is not marked as an exported symbol in the file
307 **
308 ** kernel/ksyms.c
309 **
310 ** As a consequence, using this driver as KLM is not possible
311 ** and any access of the structure kernel_stat via the
312 ** dedicated macros kstat_cpu(i).cpustat.xxx is to be avoided.
313 **
314 ** The kstat-information might be added again in future
315 ** versions of the 2.5.xx kernel, but for the time being,
316 ** number of interrupts will serve as indication how much
317 ** load we currently have...
318 **
319 ** for (NbrCpu = 0; NbrCpu < num_online_cpus(); NbrCpu++) {
320 ** UserTime = UserTime + kstat_cpu(NbrCpu).cpustat.user;
321 ** NiceTime = NiceTime + kstat_cpu(NbrCpu).cpustat.nice;
322 ** SystemTime = SystemTime + kstat_cpu(NbrCpu).cpustat.system;
323 ** }
324 */
325 SK_U64 ThresholdInts = 0;
326 SK_U64 IsrCallsPerSec = 0;
327
328 ThresholdInts = ((M_DIMINFO.MaxModIntsPerSec *
329 C_INT_MOD_ENABLE_PERCENTAGE) + 100);
330 IsrCallsPerSec = GetIsrCalls(pAC);
331 if (IsrCallsPerSec >= ThresholdInts) {
332 /*
333 ** We do not know how much the real CPU-load is!
334 ** Return 80% as a default in order to activate DIM
335 */
336 SystemLoad = 80;
337 return (SystemLoad);
338 }
339
340 UsedTime = UserTime + NiceTime + SystemTime;
341
342 IdleTime = jif * num_online_cpus() - UsedTime;
343 TotalTime = UsedTime + IdleTime;
344
345 SystemLoad = ( 100 * (UsedTime - M_DIMINFO.PrevUsedTime) ) /
346 (TotalTime - M_DIMINFO.PrevTotalTime);
347
348 if (M_DIMINFO.DisplayStats) {
349 printk("Current system load is: %u\n", SystemLoad);
350 }
351
352 M_DIMINFO.PrevTotalTime = TotalTime;
353 M_DIMINFO.PrevUsedTime = UsedTime;
354
355 return (SystemLoad);
356}
357
358/*******************************************************************************
359** Function : GetIsrCalls
360** Description : Depending on the selected moderation mask, this function will
361** return the number of interrupts handled in the previous time-
362** frame. This evaluated number is based on the current number
363** of interrupts stored in PNMI-context and the previous stored
364** interrupts.
365** Programmer : Ralph Roesler
366** Last Modified: 23-mar-03
367** Returns : int: the number of interrupts being executed in the last
368** timeframe
369** Notes : It makes only sense to call this function, when dynamic
370** interrupt moderation is applied
371*******************************************************************************/
372
373static SK_U64
374GetIsrCalls(SK_AC *pAC) {
375 SK_U64 RxPort0IntDiff = 0;
376 SK_U64 RxPort1IntDiff = 0;
377 SK_U64 TxPort0IntDiff = 0;
378 SK_U64 TxPort1IntDiff = 0;
379
380 if (pAC->DynIrqModInfo.MaskIrqModeration == IRQ_MASK_TX_ONLY) {
381 if (pAC->GIni.GIMacsFound == 2) {
382 TxPort1IntDiff = pAC->Pnmi.Port[1].TxIntrCts -
383 pAC->DynIrqModInfo.PrevPort1TxIntrCts;
384 }
385 TxPort0IntDiff = pAC->Pnmi.Port[0].TxIntrCts -
386 pAC->DynIrqModInfo.PrevPort0TxIntrCts;
387 } else if (pAC->DynIrqModInfo.MaskIrqModeration == IRQ_MASK_RX_ONLY) {
388 if (pAC->GIni.GIMacsFound == 2) {
389 RxPort1IntDiff = pAC->Pnmi.Port[1].RxIntrCts -
390 pAC->DynIrqModInfo.PrevPort1RxIntrCts;
391 }
392 RxPort0IntDiff = pAC->Pnmi.Port[0].RxIntrCts -
393 pAC->DynIrqModInfo.PrevPort0RxIntrCts;
394 } else {
395 if (pAC->GIni.GIMacsFound == 2) {
396 RxPort1IntDiff = pAC->Pnmi.Port[1].RxIntrCts -
397 pAC->DynIrqModInfo.PrevPort1RxIntrCts;
398 TxPort1IntDiff = pAC->Pnmi.Port[1].TxIntrCts -
399 pAC->DynIrqModInfo.PrevPort1TxIntrCts;
400 }
401 RxPort0IntDiff = pAC->Pnmi.Port[0].RxIntrCts -
402 pAC->DynIrqModInfo.PrevPort0RxIntrCts;
403 TxPort0IntDiff = pAC->Pnmi.Port[0].TxIntrCts -
404 pAC->DynIrqModInfo.PrevPort0TxIntrCts;
405 }
406
407 return (RxPort0IntDiff + RxPort1IntDiff + TxPort0IntDiff + TxPort1IntDiff);
408}
409
410/*******************************************************************************
411** Function : GetRxCalls
412** Description : This function will return the number of times a receive inter-
413** rupt was processed. This is needed to evaluate any resizing
414** factor.
415** Programmer : Ralph Roesler
416** Last Modified: 23-mar-03
417** Returns : SK_U64: the number of RX-ints being processed
418** Notes : It makes only sense to call this function, when dynamic
419** interrupt moderation is applied
420*******************************************************************************/
421
422static SK_U64
423GetRxCalls(SK_AC *pAC) {
424 SK_U64 RxPort0IntDiff = 0;
425 SK_U64 RxPort1IntDiff = 0;
426
427 if (pAC->GIni.GIMacsFound == 2) {
428 RxPort1IntDiff = pAC->Pnmi.Port[1].RxIntrCts -
429 pAC->DynIrqModInfo.PrevPort1RxIntrCts;
430 }
431 RxPort0IntDiff = pAC->Pnmi.Port[0].RxIntrCts -
432 pAC->DynIrqModInfo.PrevPort0RxIntrCts;
433
434 return (RxPort0IntDiff + RxPort1IntDiff);
435}
436
437/*******************************************************************************
438** Function : SetCurrIntCtr
439** Description : Will store the current number orf occured interrupts in the
440** adapter context. This is needed to evaluated the number of
441** interrupts within a current timeframe.
442** Programmer : Ralph Roesler
443** Last Modified: 23-mar-03
444** Returns : void (!)
445** Notes : -
446*******************************************************************************/
447
448static void
449SetCurrIntCtr(SK_AC *pAC) {
450 if (pAC->GIni.GIMacsFound == 2) {
451 pAC->DynIrqModInfo.PrevPort1RxIntrCts = pAC->Pnmi.Port[1].RxIntrCts;
452 pAC->DynIrqModInfo.PrevPort1TxIntrCts = pAC->Pnmi.Port[1].TxIntrCts;
453 }
454 pAC->DynIrqModInfo.PrevPort0RxIntrCts = pAC->Pnmi.Port[0].RxIntrCts;
455 pAC->DynIrqModInfo.PrevPort0TxIntrCts = pAC->Pnmi.Port[0].TxIntrCts;
456}
457
458/*******************************************************************************
459** Function : IsIntModEnabled()
460** Description : Retrieves the current value of the interrupts moderation
461** command register. Its content determines whether any
462** moderation is running or not.
463** Programmer : Ralph Roesler
464** Last Modified: 23-mar-03
465** Returns : SK_TRUE : if mod timer running
466** SK_FALSE : if no moderation is being performed
467** Notes : -
468*******************************************************************************/
469
470static SK_BOOL
471IsIntModEnabled(SK_AC *pAC) {
472 unsigned long CtrCmd;
473
474 SK_IN32(pAC->IoBase, B2_IRQM_CTRL, &CtrCmd);
475 if ((CtrCmd & TIM_START) == TIM_START) {
476 return SK_TRUE;
477 } else {
478 return SK_FALSE;
479 }
480}
481
482/*******************************************************************************
483** Function : EnableIntMod()
484** Description : Enables the interrupt moderation using the values stored in
485** in the pAC->DynIntMod data structure
486** Programmer : Ralph Roesler
487** Last Modified: 22-mar-03
488** Returns : -
489** Notes : -
490*******************************************************************************/
491
492static void
493EnableIntMod(SK_AC *pAC) {
494 unsigned long ModBase;
495
496 if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
497 ModBase = C_CLK_FREQ_GENESIS / pAC->DynIrqModInfo.MaxModIntsPerSec;
498 } else {
499 ModBase = C_CLK_FREQ_YUKON / pAC->DynIrqModInfo.MaxModIntsPerSec;
500 }
501
502 SK_OUT32(pAC->IoBase, B2_IRQM_INI, ModBase);
503 SK_OUT32(pAC->IoBase, B2_IRQM_MSK, pAC->DynIrqModInfo.MaskIrqModeration);
504 SK_OUT32(pAC->IoBase, B2_IRQM_CTRL, TIM_START);
505 if (M_DIMINFO.DisplayStats) {
506 printk("Enabled interrupt moderation (%i ints/sec)\n",
507 M_DIMINFO.MaxModIntsPerSec);
508 }
509}
510
511/*******************************************************************************
512** Function : DisableIntMod()
513** Description : Disables the interrupt moderation independent of what inter-
514** rupts are running or not
515** Programmer : Ralph Roesler
516** Last Modified: 23-mar-03
517** Returns : -
518** Notes : -
519*******************************************************************************/
520
521static void
522DisableIntMod(SK_AC *pAC) {
523
524 SK_OUT32(pAC->IoBase, B2_IRQM_CTRL, TIM_STOP);
525 if (M_DIMINFO.DisplayStats) {
526 printk("Disabled interrupt moderation\n");
527 }
528}
529
530/*******************************************************************************
531** Function : ResizeDimTimerDuration();
532** Description : Checks the current used descriptor ratio and resizes the
533** duration timer (longer/smaller) if possible.
534** Programmer : Ralph Roesler
535** Last Modified: 23-mar-03
536** Returns : -
537** Notes : There are both maximum and minimum timer duration value.
538** This function assumes that interrupt moderation is already
539** enabled!
540*******************************************************************************/
541
542static void
543ResizeDimTimerDuration(SK_AC *pAC) {
544 SK_BOOL IncreaseTimerDuration;
545 int TotalMaxNbrDescr;
546 int UsedDescrRatio;
547 int RatioDiffAbs;
548 int RatioDiffRel;
549 int NewMaxModIntsPerSec;
550 int ModAdjValue;
551 long ModBase;
552
553 /*
554 ** Check first if we are allowed to perform any modification
555 */
556 if (IsIntModEnabled(pAC)) {
557 if (M_DIMINFO.IntModTypeSelect != C_INT_MOD_DYNAMIC) {
558 return;
559 } else {
560 if (M_DIMINFO.ModJustEnabled) {
561 M_DIMINFO.ModJustEnabled = SK_FALSE;
562 return;
563 }
564 }
565 }
566
567 /*
568 ** If we got until here, we have to evaluate the amount of the
569 ** descriptor ratio change...
570 */
571 TotalMaxNbrDescr = pAC->RxDescrPerRing * GetRxCalls(pAC);
572 UsedDescrRatio = (M_DIMINFO.NbrProcessedDescr * 100) / TotalMaxNbrDescr;
573
574 if (UsedDescrRatio > M_DIMINFO.PrevUsedDescrRatio) {
575 RatioDiffAbs = (UsedDescrRatio - M_DIMINFO.PrevUsedDescrRatio);
576 RatioDiffRel = (RatioDiffAbs * 100) / UsedDescrRatio;
577 M_DIMINFO.PrevUsedDescrRatio = UsedDescrRatio;
578 IncreaseTimerDuration = SK_FALSE; /* in other words: DECREASE */
579 } else if (UsedDescrRatio < M_DIMINFO.PrevUsedDescrRatio) {
580 RatioDiffAbs = (M_DIMINFO.PrevUsedDescrRatio - UsedDescrRatio);
581 RatioDiffRel = (RatioDiffAbs * 100) / M_DIMINFO.PrevUsedDescrRatio;
582 M_DIMINFO.PrevUsedDescrRatio = UsedDescrRatio;
583 IncreaseTimerDuration = SK_TRUE; /* in other words: INCREASE */
584 } else {
585 RatioDiffAbs = (M_DIMINFO.PrevUsedDescrRatio - UsedDescrRatio);
586 RatioDiffRel = (RatioDiffAbs * 100) / M_DIMINFO.PrevUsedDescrRatio;
587 M_DIMINFO.PrevUsedDescrRatio = UsedDescrRatio;
588 IncreaseTimerDuration = SK_TRUE; /* in other words: INCREASE */
589 }
590
591 /*
592 ** Now we can determine the change in percent
593 */
594 if ((RatioDiffRel >= 0) && (RatioDiffRel <= 5) ) {
595 ModAdjValue = 1; /* 1% change - maybe some other value in future */
596 } else if ((RatioDiffRel > 5) && (RatioDiffRel <= 10) ) {
597 ModAdjValue = 1; /* 1% change - maybe some other value in future */
598 } else if ((RatioDiffRel > 10) && (RatioDiffRel <= 15) ) {
599 ModAdjValue = 1; /* 1% change - maybe some other value in future */
600 } else {
601 ModAdjValue = 1; /* 1% change - maybe some other value in future */
602 }
603
604 if (IncreaseTimerDuration) {
605 NewMaxModIntsPerSec = M_DIMINFO.MaxModIntsPerSec +
606 (M_DIMINFO.MaxModIntsPerSec * ModAdjValue) / 100;
607 } else {
608 NewMaxModIntsPerSec = M_DIMINFO.MaxModIntsPerSec -
609 (M_DIMINFO.MaxModIntsPerSec * ModAdjValue) / 100;
610 }
611
612 /*
613 ** Check if we exceed boundaries...
614 */
615 if ( (NewMaxModIntsPerSec > M_DIMINFO.MaxModIntsPerSecUpperLimit) ||
616 (NewMaxModIntsPerSec < M_DIMINFO.MaxModIntsPerSecLowerLimit)) {
617 if (M_DIMINFO.DisplayStats) {
618 printk("Cannot change ModTim from %i to %i ints/sec\n",
619 M_DIMINFO.MaxModIntsPerSec, NewMaxModIntsPerSec);
620 }
621 return;
622 } else {
623 if (M_DIMINFO.DisplayStats) {
624 printk("Resized ModTim from %i to %i ints/sec\n",
625 M_DIMINFO.MaxModIntsPerSec, NewMaxModIntsPerSec);
626 }
627 }
628
629 M_DIMINFO.MaxModIntsPerSec = NewMaxModIntsPerSec;
630
631 if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
632 ModBase = C_CLK_FREQ_GENESIS / pAC->DynIrqModInfo.MaxModIntsPerSec;
633 } else {
634 ModBase = C_CLK_FREQ_YUKON / pAC->DynIrqModInfo.MaxModIntsPerSec;
635 }
636
637 /*
638 ** We do not need to touch any other registers
639 */
640 SK_OUT32(pAC->IoBase, B2_IRQM_INI, ModBase);
641}
642
643/*******************************************************************************
644** Function : DisplaySelectedModerationType()
645** Description : Displays what type of moderation we have
646** Programmer : Ralph Roesler
647** Last Modified: 23-mar-03
648** Returns : void!
649** Notes : -
650*******************************************************************************/
651
652static void
653DisplaySelectedModerationType(SK_AC *pAC) {
654
655 if (pAC->DynIrqModInfo.DisplayStats) {
656 if (pAC->DynIrqModInfo.IntModTypeSelect == C_INT_MOD_STATIC) {
657 printk("Static int moderation runs with %i INTS/sec\n",
658 pAC->DynIrqModInfo.MaxModIntsPerSec);
659 } else if (pAC->DynIrqModInfo.IntModTypeSelect == C_INT_MOD_DYNAMIC) {
660 if (IsIntModEnabled(pAC)) {
661 printk("Dynamic int moderation runs with %i INTS/sec\n",
662 pAC->DynIrqModInfo.MaxModIntsPerSec);
663 } else {
664 printk("Dynamic int moderation currently not applied\n");
665 }
666 } else {
667 printk("No interrupt moderation selected!\n");
668 }
669 }
670}
671
672/*******************************************************************************
673** Function : DisplaySelectedModerationMask()
674** Description : Displays what interrupts are moderated
675** Programmer : Ralph Roesler
676** Last Modified: 23-mar-03
677** Returns : void!
678** Notes : -
679*******************************************************************************/
680
681static void
682DisplaySelectedModerationMask(SK_AC *pAC) {
683
684 if (pAC->DynIrqModInfo.DisplayStats) {
685 if (pAC->DynIrqModInfo.IntModTypeSelect != C_INT_MOD_NONE) {
686 switch (pAC->DynIrqModInfo.MaskIrqModeration) {
687 case IRQ_MASK_TX_ONLY:
688 printk("Only Tx-interrupts are moderated\n");
689 break;
690 case IRQ_MASK_RX_ONLY:
691 printk("Only Rx-interrupts are moderated\n");
692 break;
693 case IRQ_MASK_SP_ONLY:
694 printk("Only special-interrupts are moderated\n");
695 break;
696 case IRQ_MASK_TX_RX:
697 printk("Tx- and Rx-interrupts are moderated\n");
698 break;
699 case IRQ_MASK_SP_RX:
700 printk("Special- and Rx-interrupts are moderated\n");
701 break;
702 case IRQ_MASK_SP_TX:
703 printk("Special- and Tx-interrupts are moderated\n");
704 break;
705 case IRQ_MASK_RX_TX_SP:
706 printk("All Rx-, Tx and special-interrupts are moderated\n");
707 break;
708 default:
709 printk("Don't know what is moderated\n");
710 break;
711 }
712 } else {
713 printk("No specific interrupts masked for moderation\n");
714 }
715 }
716}
717
718/*******************************************************************************
719** Function : DisplayDescrRatio
720** Description : Like the name states...
721** Programmer : Ralph Roesler
722** Last Modified: 23-mar-03
723** Returns : void!
724** Notes : -
725*******************************************************************************/
726
727static void
728DisplayDescrRatio(SK_AC *pAC) {
729 int TotalMaxNbrDescr = 0;
730
731 if (pAC->DynIrqModInfo.DisplayStats) {
732 TotalMaxNbrDescr = pAC->RxDescrPerRing * GetRxCalls(pAC);
733 printk("Ratio descriptors: %i/%i\n",
734 M_DIMINFO.NbrProcessedDescr, TotalMaxNbrDescr);
735 }
736}
737
738/*******************************************************************************
739**
740** End of file
741**
742*******************************************************************************/
diff --git a/drivers/net/sk98lin/skethtool.c b/drivers/net/sk98lin/skethtool.c
new file mode 100644
index 0000000000..5a6da8950f
--- /dev/null
+++ b/drivers/net/sk98lin/skethtool.c
@@ -0,0 +1,627 @@
1/******************************************************************************
2 *
3 * Name: skethtool.c
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.7 $
6 * Date: $Date: 2004/09/29 13:32:07 $
7 * Purpose: All functions regarding ethtool handling
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2004 Marvell.
15 *
16 * Driver for Marvell Yukon/2 chipset and SysKonnect Gigabit Ethernet
17 * Server Adapters.
18 *
19 * Author: Ralph Roesler (rroesler@syskonnect.de)
20 * Mirko Lindner (mlindner@syskonnect.de)
21 *
22 * Address all question to: linux@syskonnect.de
23 *
24 * The technical manual for the adapters is available from SysKonnect's
25 * web pages: www.syskonnect.com
26 *
27 * This program is free software; you can redistribute it and/or modify
28 * it under the terms of the GNU General Public License as published by
29 * the Free Software Foundation; either version 2 of the License, or
30 * (at your option) any later version.
31 *
32 * The information in this file is provided "AS IS" without warranty.
33 *
34 *****************************************************************************/
35
36#include "h/skdrv1st.h"
37#include "h/skdrv2nd.h"
38#include "h/skversion.h"
39
40#include <linux/ethtool.h>
41#include <linux/timer.h>
42#include <linux/delay.h>
43
44/******************************************************************************
45 *
46 * Defines
47 *
48 *****************************************************************************/
49
50#define SUPP_COPPER_ALL (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | \
51 SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | \
52 SUPPORTED_1000baseT_Half| SUPPORTED_1000baseT_Full| \
53 SUPPORTED_TP)
54
55#define ADV_COPPER_ALL (ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | \
56 ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | \
57 ADVERTISED_1000baseT_Half| ADVERTISED_1000baseT_Full| \
58 ADVERTISED_TP)
59
60#define SUPP_FIBRE_ALL (SUPPORTED_1000baseT_Full | \
61 SUPPORTED_FIBRE | \
62 SUPPORTED_Autoneg)
63
64#define ADV_FIBRE_ALL (ADVERTISED_1000baseT_Full | \
65 ADVERTISED_FIBRE | \
66 ADVERTISED_Autoneg)
67
68
69/******************************************************************************
70 *
71 * Local Functions
72 *
73 *****************************************************************************/
74
75/*****************************************************************************
76 *
77 * getSettings - retrieves the current settings of the selected adapter
78 *
79 * Description:
80 * The current configuration of the selected adapter is returned.
81 * This configuration involves a)speed, b)duplex and c)autoneg plus
82 * a number of other variables.
83 *
84 * Returns: always 0
85 *
86 */
87static int getSettings(struct net_device *dev, struct ethtool_cmd *ecmd)
88{
89 const DEV_NET *pNet = netdev_priv(dev);
90 int port = pNet->PortNr;
91 const SK_AC *pAC = pNet->pAC;
92 const SK_GEPORT *pPort = &pAC->GIni.GP[port];
93
94 static int DuplexAutoNegConfMap[9][3]= {
95 { -1 , -1 , -1 },
96 { 0 , -1 , -1 },
97 { SK_LMODE_HALF , DUPLEX_HALF, AUTONEG_DISABLE },
98 { SK_LMODE_FULL , DUPLEX_FULL, AUTONEG_DISABLE },
99 { SK_LMODE_AUTOHALF , DUPLEX_HALF, AUTONEG_ENABLE },
100 { SK_LMODE_AUTOFULL , DUPLEX_FULL, AUTONEG_ENABLE },
101 { SK_LMODE_AUTOBOTH , DUPLEX_FULL, AUTONEG_ENABLE },
102 { SK_LMODE_AUTOSENSE , -1 , -1 },
103 { SK_LMODE_INDETERMINATED, -1 , -1 }
104 };
105 static int SpeedConfMap[6][2] = {
106 { 0 , -1 },
107 { SK_LSPEED_AUTO , -1 },
108 { SK_LSPEED_10MBPS , SPEED_10 },
109 { SK_LSPEED_100MBPS , SPEED_100 },
110 { SK_LSPEED_1000MBPS , SPEED_1000 },
111 { SK_LSPEED_INDETERMINATED, -1 }
112 };
113 static int AdvSpeedMap[6][2] = {
114 { 0 , -1 },
115 { SK_LSPEED_AUTO , -1 },
116 { SK_LSPEED_10MBPS , ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full },
117 { SK_LSPEED_100MBPS , ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full },
118 { SK_LSPEED_1000MBPS , ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full},
119 { SK_LSPEED_INDETERMINATED, -1 }
120 };
121
122 ecmd->phy_address = port;
123 ecmd->speed = SpeedConfMap[pPort->PLinkSpeedUsed][1];
124 ecmd->duplex = DuplexAutoNegConfMap[pPort->PLinkModeStatus][1];
125 ecmd->autoneg = DuplexAutoNegConfMap[pPort->PLinkModeStatus][2];
126 ecmd->transceiver = XCVR_INTERNAL;
127
128 if (pAC->GIni.GICopperType) {
129 ecmd->port = PORT_TP;
130 ecmd->supported = (SUPP_COPPER_ALL|SUPPORTED_Autoneg);
131 if (pAC->GIni.GIGenesis) {
132 ecmd->supported &= ~(SUPPORTED_10baseT_Half);
133 ecmd->supported &= ~(SUPPORTED_10baseT_Full);
134 ecmd->supported &= ~(SUPPORTED_100baseT_Half);
135 ecmd->supported &= ~(SUPPORTED_100baseT_Full);
136 } else {
137 if (pAC->GIni.GIChipId == CHIP_ID_YUKON) {
138 ecmd->supported &= ~(SUPPORTED_1000baseT_Half);
139 }
140#ifdef CHIP_ID_YUKON_FE
141 if (pAC->GIni.GIChipId == CHIP_ID_YUKON_FE) {
142 ecmd->supported &= ~(SUPPORTED_1000baseT_Half);
143 ecmd->supported &= ~(SUPPORTED_1000baseT_Full);
144 }
145#endif
146 }
147 if (pAC->GIni.GP[0].PLinkSpeed != SK_LSPEED_AUTO) {
148 ecmd->advertising = AdvSpeedMap[pPort->PLinkSpeed][1];
149 if (pAC->GIni.GIChipId == CHIP_ID_YUKON) {
150 ecmd->advertising &= ~(SUPPORTED_1000baseT_Half);
151 }
152 } else {
153 ecmd->advertising = ecmd->supported;
154 }
155
156 if (ecmd->autoneg == AUTONEG_ENABLE)
157 ecmd->advertising |= ADVERTISED_Autoneg;
158 } else {
159 ecmd->port = PORT_FIBRE;
160 ecmd->supported = SUPP_FIBRE_ALL;
161 ecmd->advertising = ADV_FIBRE_ALL;
162 }
163 return 0;
164}
165
166/*
167 * MIB infrastructure uses instance value starting at 1
168 * based on board and port.
169 */
170static inline u32 pnmiInstance(const DEV_NET *pNet)
171{
172 return 1 + (pNet->pAC->RlmtNets == 2) + pNet->PortNr;
173}
174
175/*****************************************************************************
176 *
177 * setSettings - configures the settings of a selected adapter
178 *
179 * Description:
180 * Possible settings that may be altered are a)speed, b)duplex or
181 * c)autonegotiation.
182 *
183 * Returns:
184 * 0: everything fine, no error
185 * <0: the return value is the error code of the failure
186 */
187static int setSettings(struct net_device *dev, struct ethtool_cmd *ecmd)
188{
189 DEV_NET *pNet = netdev_priv(dev);
190 SK_AC *pAC = pNet->pAC;
191 u32 instance;
192 char buf[4];
193 int len = 1;
194
195 if (ecmd->speed != SPEED_10 && ecmd->speed != SPEED_100
196 && ecmd->speed != SPEED_1000)
197 return -EINVAL;
198
199 if (ecmd->duplex != DUPLEX_HALF && ecmd->duplex != DUPLEX_FULL)
200 return -EINVAL;
201
202 if (ecmd->autoneg != AUTONEG_DISABLE && ecmd->autoneg != AUTONEG_ENABLE)
203 return -EINVAL;
204
205 if (ecmd->autoneg == AUTONEG_DISABLE)
206 *buf = (ecmd->duplex == DUPLEX_FULL)
207 ? SK_LMODE_FULL : SK_LMODE_HALF;
208 else
209 *buf = (ecmd->duplex == DUPLEX_FULL)
210 ? SK_LMODE_AUTOFULL : SK_LMODE_AUTOHALF;
211
212 instance = pnmiInstance(pNet);
213 if (SkPnmiSetVar(pAC, pAC->IoBase, OID_SKGE_LINK_MODE,
214 &buf, &len, instance, pNet->NetNr) != SK_PNMI_ERR_OK)
215 return -EINVAL;
216
217 switch(ecmd->speed) {
218 case SPEED_1000:
219 *buf = SK_LSPEED_1000MBPS;
220 break;
221 case SPEED_100:
222 *buf = SK_LSPEED_100MBPS;
223 break;
224 case SPEED_10:
225 *buf = SK_LSPEED_10MBPS;
226 }
227
228 if (SkPnmiSetVar(pAC, pAC->IoBase, OID_SKGE_SPEED_MODE,
229 &buf, &len, instance, pNet->NetNr) != SK_PNMI_ERR_OK)
230 return -EINVAL;
231
232 return 0;
233}
234
235/*****************************************************************************
236 *
237 * getDriverInfo - returns generic driver and adapter information
238 *
239 * Description:
240 * Generic driver information is returned via this function, such as
241 * the name of the driver, its version and and firmware version.
242 * In addition to this, the location of the selected adapter is
243 * returned as a bus info string (e.g. '01:05.0').
244 *
245 * Returns: N/A
246 *
247 */
248static void getDriverInfo(struct net_device *dev, struct ethtool_drvinfo *info)
249{
250 const DEV_NET *pNet = netdev_priv(dev);
251 const SK_AC *pAC = pNet->pAC;
252 char vers[32];
253
254 snprintf(vers, sizeof(vers)-1, VER_STRING "(v%d.%d)",
255 (pAC->GIni.GIPciHwRev >> 4) & 0xf, pAC->GIni.GIPciHwRev & 0xf);
256
257 strlcpy(info->driver, DRIVER_FILE_NAME, sizeof(info->driver));
258 strcpy(info->version, vers);
259 strcpy(info->fw_version, "N/A");
260 strlcpy(info->bus_info, pci_name(pAC->PciDev), ETHTOOL_BUSINFO_LEN);
261}
262
263/*
264 * Ethtool statistics support.
265 */
266static const char StringsStats[][ETH_GSTRING_LEN] = {
267 "rx_packets", "tx_packets",
268 "rx_bytes", "tx_bytes",
269 "rx_errors", "tx_errors",
270 "rx_dropped", "tx_dropped",
271 "multicasts", "collisions",
272 "rx_length_errors", "rx_buffer_overflow_errors",
273 "rx_crc_errors", "rx_frame_errors",
274 "rx_too_short_errors", "rx_too_long_errors",
275 "rx_carrier_extension_errors", "rx_symbol_errors",
276 "rx_llc_mac_size_errors", "rx_carrier_errors",
277 "rx_jabber_errors", "rx_missed_errors",
278 "tx_abort_collision_errors", "tx_carrier_errors",
279 "tx_buffer_underrun_errors", "tx_heartbeat_errors",
280 "tx_window_errors",
281};
282
283static int getStatsCount(struct net_device *dev)
284{
285 return ARRAY_SIZE(StringsStats);
286}
287
288static void getStrings(struct net_device *dev, u32 stringset, u8 *data)
289{
290 switch(stringset) {
291 case ETH_SS_STATS:
292 memcpy(data, *StringsStats, sizeof(StringsStats));
293 break;
294 }
295}
296
297static void getEthtoolStats(struct net_device *dev,
298 struct ethtool_stats *stats, u64 *data)
299{
300 const DEV_NET *pNet = netdev_priv(dev);
301 const SK_AC *pAC = pNet->pAC;
302 const SK_PNMI_STRUCT_DATA *pPnmiStruct = &pAC->PnmiStruct;
303
304 *data++ = pPnmiStruct->Stat[0].StatRxOkCts;
305 *data++ = pPnmiStruct->Stat[0].StatTxOkCts;
306 *data++ = pPnmiStruct->Stat[0].StatRxOctetsOkCts;
307 *data++ = pPnmiStruct->Stat[0].StatTxOctetsOkCts;
308 *data++ = pPnmiStruct->InErrorsCts;
309 *data++ = pPnmiStruct->Stat[0].StatTxSingleCollisionCts;
310 *data++ = pPnmiStruct->RxNoBufCts;
311 *data++ = pPnmiStruct->TxNoBufCts;
312 *data++ = pPnmiStruct->Stat[0].StatRxMulticastOkCts;
313 *data++ = pPnmiStruct->Stat[0].StatTxSingleCollisionCts;
314 *data++ = pPnmiStruct->Stat[0].StatRxRuntCts;
315 *data++ = pPnmiStruct->Stat[0].StatRxFifoOverflowCts;
316 *data++ = pPnmiStruct->Stat[0].StatRxFcsCts;
317 *data++ = pPnmiStruct->Stat[0].StatRxFramingCts;
318 *data++ = pPnmiStruct->Stat[0].StatRxShortsCts;
319 *data++ = pPnmiStruct->Stat[0].StatRxTooLongCts;
320 *data++ = pPnmiStruct->Stat[0].StatRxCextCts;
321 *data++ = pPnmiStruct->Stat[0].StatRxSymbolCts;
322 *data++ = pPnmiStruct->Stat[0].StatRxIRLengthCts;
323 *data++ = pPnmiStruct->Stat[0].StatRxCarrierCts;
324 *data++ = pPnmiStruct->Stat[0].StatRxJabberCts;
325 *data++ = pPnmiStruct->Stat[0].StatRxMissedCts;
326 *data++ = pAC->stats.tx_aborted_errors;
327 *data++ = pPnmiStruct->Stat[0].StatTxCarrierCts;
328 *data++ = pPnmiStruct->Stat[0].StatTxFifoUnderrunCts;
329 *data++ = pPnmiStruct->Stat[0].StatTxCarrierCts;
330 *data++ = pAC->stats.tx_window_errors;
331}
332
333
334/*****************************************************************************
335 *
336 * toggleLeds - Changes the LED state of an adapter
337 *
338 * Description:
339 * This function changes the current state of all LEDs of an adapter so
340 * that it can be located by a user.
341 *
342 * Returns: N/A
343 *
344 */
345static void toggleLeds(DEV_NET *pNet, int on)
346{
347 SK_AC *pAC = pNet->pAC;
348 int port = pNet->PortNr;
349 void __iomem *io = pAC->IoBase;
350
351 if (pAC->GIni.GIGenesis) {
352 SK_OUT8(io, MR_ADDR(port,LNK_LED_REG),
353 on ? SK_LNK_ON : SK_LNK_OFF);
354 SkGeYellowLED(pAC, io,
355 on ? (LED_ON >> 1) : (LED_OFF >> 1));
356 SkGeXmitLED(pAC, io, MR_ADDR(port,RX_LED_INI),
357 on ? SK_LED_TST : SK_LED_DIS);
358
359 if (pAC->GIni.GP[port].PhyType == SK_PHY_BCOM)
360 SkXmPhyWrite(pAC, io, port, PHY_BCOM_P_EXT_CTRL,
361 on ? PHY_B_PEC_LED_ON : PHY_B_PEC_LED_OFF);
362 else if (pAC->GIni.GP[port].PhyType == SK_PHY_LONE)
363 SkXmPhyWrite(pAC, io, port, PHY_LONE_LED_CFG,
364 on ? 0x0800 : PHY_L_LC_LEDT);
365 else
366 SkGeXmitLED(pAC, io, MR_ADDR(port,TX_LED_INI),
367 on ? SK_LED_TST : SK_LED_DIS);
368 } else {
369 const u16 YukLedOn = (PHY_M_LED_MO_DUP(MO_LED_ON) |
370 PHY_M_LED_MO_10(MO_LED_ON) |
371 PHY_M_LED_MO_100(MO_LED_ON) |
372 PHY_M_LED_MO_1000(MO_LED_ON) |
373 PHY_M_LED_MO_RX(MO_LED_ON));
374 const u16 YukLedOff = (PHY_M_LED_MO_DUP(MO_LED_OFF) |
375 PHY_M_LED_MO_10(MO_LED_OFF) |
376 PHY_M_LED_MO_100(MO_LED_OFF) |
377 PHY_M_LED_MO_1000(MO_LED_OFF) |
378 PHY_M_LED_MO_RX(MO_LED_OFF));
379
380
381 SkGmPhyWrite(pAC,io,port,PHY_MARV_LED_CTRL,0);
382 SkGmPhyWrite(pAC,io,port,PHY_MARV_LED_OVER,
383 on ? YukLedOn : YukLedOff);
384 }
385}
386
387/*****************************************************************************
388 *
389 * skGeBlinkTimer - Changes the LED state of an adapter
390 *
391 * Description:
392 * This function changes the current state of all LEDs of an adapter so
393 * that it can be located by a user. If the requested time interval for
394 * this test has elapsed, this function cleans up everything that was
395 * temporarily setup during the locate NIC test. This involves of course
396 * also closing or opening any adapter so that the initial board state
397 * is recovered.
398 *
399 * Returns: N/A
400 *
401 */
402void SkGeBlinkTimer(unsigned long data)
403{
404 struct net_device *dev = (struct net_device *) data;
405 DEV_NET *pNet = netdev_priv(dev);
406 SK_AC *pAC = pNet->pAC;
407
408 toggleLeds(pNet, pAC->LedsOn);
409
410 pAC->LedsOn = !pAC->LedsOn;
411 mod_timer(&pAC->BlinkTimer, jiffies + HZ/4);
412}
413
414/*****************************************************************************
415 *
416 * locateDevice - start the locate NIC feature of the elected adapter
417 *
418 * Description:
419 * This function is used if the user want to locate a particular NIC.
420 * All LEDs are regularly switched on and off, so the NIC can easily
421 * be identified.
422 *
423 * Returns:
424 * ==0: everything fine, no error, locateNIC test was started
425 * !=0: one locateNIC test runs already
426 *
427 */
428static int locateDevice(struct net_device *dev, u32 data)
429{
430 DEV_NET *pNet = netdev_priv(dev);
431 SK_AC *pAC = pNet->pAC;
432
433 if(!data || data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ))
434 data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ);
435
436 /* start blinking */
437 pAC->LedsOn = 0;
438 mod_timer(&pAC->BlinkTimer, jiffies);
439 msleep_interruptible(data * 1000);
440 del_timer_sync(&pAC->BlinkTimer);
441 toggleLeds(pNet, 0);
442
443 return 0;
444}
445
446/*****************************************************************************
447 *
448 * getPauseParams - retrieves the pause parameters
449 *
450 * Description:
451 * All current pause parameters of a selected adapter are placed
452 * in the passed ethtool_pauseparam structure and are returned.
453 *
454 * Returns: N/A
455 *
456 */
457static void getPauseParams(struct net_device *dev, struct ethtool_pauseparam *epause)
458{
459 DEV_NET *pNet = netdev_priv(dev);
460 SK_AC *pAC = pNet->pAC;
461 SK_GEPORT *pPort = &pAC->GIni.GP[pNet->PortNr];
462
463 epause->rx_pause = (pPort->PFlowCtrlMode == SK_FLOW_MODE_SYMMETRIC) ||
464 (pPort->PFlowCtrlMode == SK_FLOW_MODE_SYM_OR_REM);
465
466 epause->tx_pause = epause->rx_pause || (pPort->PFlowCtrlMode == SK_FLOW_MODE_LOC_SEND);
467 epause->autoneg = epause->rx_pause || epause->tx_pause;
468}
469
470/*****************************************************************************
471 *
472 * setPauseParams - configures the pause parameters of an adapter
473 *
474 * Description:
475 * This function sets the Rx or Tx pause parameters
476 *
477 * Returns:
478 * ==0: everything fine, no error
479 * !=0: the return value is the error code of the failure
480 */
481static int setPauseParams(struct net_device *dev , struct ethtool_pauseparam *epause)
482{
483 DEV_NET *pNet = netdev_priv(dev);
484 SK_AC *pAC = pNet->pAC;
485 SK_GEPORT *pPort = &pAC->GIni.GP[pNet->PortNr];
486 u32 instance = pnmiInstance(pNet);
487 struct ethtool_pauseparam old;
488 u8 oldspeed = pPort->PLinkSpeedUsed;
489 char buf[4];
490 int len = 1;
491 int ret;
492
493 /*
494 ** we have to determine the current settings to see if
495 ** the operator requested any modification of the flow
496 ** control parameters...
497 */
498 getPauseParams(dev, &old);
499
500 /*
501 ** perform modifications regarding the changes
502 ** requested by the operator
503 */
504 if (epause->autoneg != old.autoneg)
505 *buf = epause->autoneg ? SK_FLOW_MODE_NONE : SK_FLOW_MODE_SYMMETRIC;
506 else {
507 if (epause->rx_pause && epause->tx_pause)
508 *buf = SK_FLOW_MODE_SYMMETRIC;
509 else if (epause->rx_pause && !epause->tx_pause)
510 *buf = SK_FLOW_MODE_SYM_OR_REM;
511 else if (!epause->rx_pause && epause->tx_pause)
512 *buf = SK_FLOW_MODE_LOC_SEND;
513 else
514 *buf = SK_FLOW_MODE_NONE;
515 }
516
517 ret = SkPnmiSetVar(pAC, pAC->IoBase, OID_SKGE_FLOWCTRL_MODE,
518 &buf, &len, instance, pNet->NetNr);
519
520 if (ret != SK_PNMI_ERR_OK) {
521 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_CTRL,
522 ("ethtool (sk98lin): error changing rx/tx pause (%i)\n", ret));
523 goto err;
524 }
525
526 /*
527 ** It may be that autoneg has been disabled! Therefore
528 ** set the speed to the previously used value...
529 */
530 if (!epause->autoneg) {
531 len = 1;
532 ret = SkPnmiSetVar(pAC, pAC->IoBase, OID_SKGE_SPEED_MODE,
533 &oldspeed, &len, instance, pNet->NetNr);
534 if (ret != SK_PNMI_ERR_OK)
535 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_CTRL,
536 ("ethtool (sk98lin): error setting speed (%i)\n", ret));
537 }
538 err:
539 return ret ? -EIO : 0;
540}
541
542/* Only Yukon supports checksum offload. */
543static int setScatterGather(struct net_device *dev, u32 data)
544{
545 DEV_NET *pNet = netdev_priv(dev);
546 SK_AC *pAC = pNet->pAC;
547
548 if (pAC->GIni.GIChipId == CHIP_ID_GENESIS)
549 return -EOPNOTSUPP;
550 return ethtool_op_set_sg(dev, data);
551}
552
553static int setTxCsum(struct net_device *dev, u32 data)
554{
555 DEV_NET *pNet = netdev_priv(dev);
556 SK_AC *pAC = pNet->pAC;
557
558 if (pAC->GIni.GIChipId == CHIP_ID_GENESIS)
559 return -EOPNOTSUPP;
560
561 return ethtool_op_set_tx_csum(dev, data);
562}
563
564static u32 getRxCsum(struct net_device *dev)
565{
566 DEV_NET *pNet = netdev_priv(dev);
567 SK_AC *pAC = pNet->pAC;
568
569 return pAC->RxPort[pNet->PortNr].RxCsum;
570}
571
572static int setRxCsum(struct net_device *dev, u32 data)
573{
574 DEV_NET *pNet = netdev_priv(dev);
575 SK_AC *pAC = pNet->pAC;
576
577 if (pAC->GIni.GIChipId == CHIP_ID_GENESIS)
578 return -EOPNOTSUPP;
579
580 pAC->RxPort[pNet->PortNr].RxCsum = data != 0;
581 return 0;
582}
583
584static int getRegsLen(struct net_device *dev)
585{
586 return 0x4000;
587}
588
589/*
590 * Returns copy of whole control register region
591 * Note: skip RAM address register because accessing it will
592 * cause bus hangs!
593 */
594static void getRegs(struct net_device *dev, struct ethtool_regs *regs,
595 void *p)
596{
597 DEV_NET *pNet = netdev_priv(dev);
598 const void __iomem *io = pNet->pAC->IoBase;
599
600 regs->version = 1;
601 memset(p, 0, regs->len);
602 memcpy_fromio(p, io, B3_RAM_ADDR);
603
604 memcpy_fromio(p + B3_RI_WTO_R1, io + B3_RI_WTO_R1,
605 regs->len - B3_RI_WTO_R1);
606}
607
608const struct ethtool_ops SkGeEthtoolOps = {
609 .get_settings = getSettings,
610 .set_settings = setSettings,
611 .get_drvinfo = getDriverInfo,
612 .get_strings = getStrings,
613 .get_stats_count = getStatsCount,
614 .get_ethtool_stats = getEthtoolStats,
615 .phys_id = locateDevice,
616 .get_pauseparam = getPauseParams,
617 .set_pauseparam = setPauseParams,
618 .get_link = ethtool_op_get_link,
619 .get_sg = ethtool_op_get_sg,
620 .set_sg = setScatterGather,
621 .get_tx_csum = ethtool_op_get_tx_csum,
622 .set_tx_csum = setTxCsum,
623 .get_rx_csum = getRxCsum,
624 .set_rx_csum = setRxCsum,
625 .get_regs = getRegs,
626 .get_regs_len = getRegsLen,
627};
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
new file mode 100644
index 0000000000..7dc9c9ebf5
--- /dev/null
+++ b/drivers/net/sk98lin/skge.c
@@ -0,0 +1,5219 @@
1/******************************************************************************
2 *
3 * Name: skge.c
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.45 $
6 * Date: $Date: 2004/02/12 14:41:02 $
7 * Purpose: The main driver source module
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * Driver for Marvell Yukon chipset and SysKonnect Gigabit Ethernet
17 * Server Adapters.
18 *
19 * Created 10-Feb-1999, based on Linux' acenic.c, 3c59x.c and
20 * SysKonnects GEnesis Solaris driver
21 * Author: Christoph Goos (cgoos@syskonnect.de)
22 * Mirko Lindner (mlindner@syskonnect.de)
23 *
24 * Address all question to: linux@syskonnect.de
25 *
26 * The technical manual for the adapters is available from SysKonnect's
27 * web pages: www.syskonnect.com
28 * Goto "Support" and search Knowledge Base for "manual".
29 *
30 * This program is free software; you can redistribute it and/or modify
31 * it under the terms of the GNU General Public License as published by
32 * the Free Software Foundation; either version 2 of the License, or
33 * (at your option) any later version.
34 *
35 * The information in this file is provided "AS IS" without warranty.
36 *
37 ******************************************************************************/
38
39/******************************************************************************
40 *
41 * Possible compiler options (#define xxx / -Dxxx):
42 *
43 * debugging can be enable by changing SK_DEBUG_CHKMOD and
44 * SK_DEBUG_CHKCAT in makefile (described there).
45 *
46 ******************************************************************************/
47
48/******************************************************************************
49 *
50 * Description:
51 *
52 * This is the main module of the Linux GE driver.
53 *
54 * All source files except skge.c, skdrv1st.h, skdrv2nd.h and sktypes.h
55 * are part of SysKonnect's COMMON MODULES for the SK-98xx adapters.
56 * Those are used for drivers on multiple OS', so some thing may seem
57 * unnecessary complicated on Linux. Please do not try to 'clean up'
58 * them without VERY good reasons, because this will make it more
59 * difficult to keep the Linux driver in synchronisation with the
60 * other versions.
61 *
62 * Include file hierarchy:
63 *
64 * <linux/module.h>
65 *
66 * "h/skdrv1st.h"
67 * <linux/types.h>
68 * <linux/kernel.h>
69 * <linux/string.h>
70 * <linux/errno.h>
71 * <linux/ioport.h>
72 * <linux/slab.h>
73 * <linux/interrupt.h>
74 * <linux/pci.h>
75 * <linux/bitops.h>
76 * <asm/byteorder.h>
77 * <asm/io.h>
78 * <linux/netdevice.h>
79 * <linux/etherdevice.h>
80 * <linux/skbuff.h>
81 * those three depending on kernel version used:
82 * <linux/bios32.h>
83 * <linux/init.h>
84 * <asm/uaccess.h>
85 * <net/checksum.h>
86 *
87 * "h/skerror.h"
88 * "h/skdebug.h"
89 * "h/sktypes.h"
90 * "h/lm80.h"
91 * "h/xmac_ii.h"
92 *
93 * "h/skdrv2nd.h"
94 * "h/skqueue.h"
95 * "h/skgehwt.h"
96 * "h/sktimer.h"
97 * "h/ski2c.h"
98 * "h/skgepnmi.h"
99 * "h/skvpd.h"
100 * "h/skgehw.h"
101 * "h/skgeinit.h"
102 * "h/skaddr.h"
103 * "h/skgesirq.h"
104 * "h/skrlmt.h"
105 *
106 ******************************************************************************/
107
108#include "h/skversion.h"
109
110#include <linux/in.h>
111#include <linux/module.h>
112#include <linux/moduleparam.h>
113#include <linux/init.h>
114#include <linux/dma-mapping.h>
115#include <linux/ip.h>
116#include <linux/mii.h>
117#include <linux/mm.h>
118
119#include "h/skdrv1st.h"
120#include "h/skdrv2nd.h"
121
122/*******************************************************************************
123 *
124 * Defines
125 *
126 ******************************************************************************/
127
128/* for debuging on x86 only */
129/* #define BREAKPOINT() asm(" int $3"); */
130
131/* use the transmit hw checksum driver functionality */
132#define USE_SK_TX_CHECKSUM
133
134/* use the receive hw checksum driver functionality */
135#define USE_SK_RX_CHECKSUM
136
137/* use the scatter-gather functionality with sendfile() */
138#define SK_ZEROCOPY
139
140/* use of a transmit complete interrupt */
141#define USE_TX_COMPLETE
142
143/*
144 * threshold for copying small receive frames
145 * set to 0 to avoid copying, set to 9001 to copy all frames
146 */
147#define SK_COPY_THRESHOLD 50
148
149/* number of adapters that can be configured via command line params */
150#define SK_MAX_CARD_PARAM 16
151
152
153
154/*
155 * use those defines for a compile-in version of the driver instead
156 * of command line parameters
157 */
158// #define LINK_SPEED_A {"Auto", }
159// #define LINK_SPEED_B {"Auto", }
160// #define AUTO_NEG_A {"Sense", }
161// #define AUTO_NEG_B {"Sense", }
162// #define DUP_CAP_A {"Both", }
163// #define DUP_CAP_B {"Both", }
164// #define FLOW_CTRL_A {"SymOrRem", }
165// #define FLOW_CTRL_B {"SymOrRem", }
166// #define ROLE_A {"Auto", }
167// #define ROLE_B {"Auto", }
168// #define PREF_PORT {"A", }
169// #define CON_TYPE {"Auto", }
170// #define RLMT_MODE {"CheckLinkState", }
171
172#define DEV_KFREE_SKB(skb) dev_kfree_skb(skb)
173#define DEV_KFREE_SKB_IRQ(skb) dev_kfree_skb_irq(skb)
174#define DEV_KFREE_SKB_ANY(skb) dev_kfree_skb_any(skb)
175
176
177/* Set blink mode*/
178#define OEM_CONFIG_VALUE ( SK_ACT_LED_BLINK | \
179 SK_DUP_LED_NORMAL | \
180 SK_LED_LINK100_ON)
181
182
183/* Isr return value */
184#define SkIsrRetVar irqreturn_t
185#define SkIsrRetNone IRQ_NONE
186#define SkIsrRetHandled IRQ_HANDLED
187
188
189/*******************************************************************************
190 *
191 * Local Function Prototypes
192 *
193 ******************************************************************************/
194
195static void FreeResources(struct SK_NET_DEVICE *dev);
196static int SkGeBoardInit(struct SK_NET_DEVICE *dev, SK_AC *pAC);
197static SK_BOOL BoardAllocMem(SK_AC *pAC);
198static void BoardFreeMem(SK_AC *pAC);
199static void BoardInitMem(SK_AC *pAC);
200static void SetupRing(SK_AC*, void*, uintptr_t, RXD**, RXD**, RXD**, int*, SK_BOOL);
201static SkIsrRetVar SkGeIsr(int irq, void *dev_id);
202static SkIsrRetVar SkGeIsrOnePort(int irq, void *dev_id);
203static int SkGeOpen(struct SK_NET_DEVICE *dev);
204static int SkGeClose(struct SK_NET_DEVICE *dev);
205static int SkGeXmit(struct sk_buff *skb, struct SK_NET_DEVICE *dev);
206static int SkGeSetMacAddr(struct SK_NET_DEVICE *dev, void *p);
207static void SkGeSetRxMode(struct SK_NET_DEVICE *dev);
208static struct net_device_stats *SkGeStats(struct SK_NET_DEVICE *dev);
209static int SkGeIoctl(struct SK_NET_DEVICE *dev, struct ifreq *rq, int cmd);
210static void GetConfiguration(SK_AC*);
211static int XmitFrame(SK_AC*, TX_PORT*, struct sk_buff*);
212static void FreeTxDescriptors(SK_AC*pAC, TX_PORT*);
213static void FillRxRing(SK_AC*, RX_PORT*);
214static SK_BOOL FillRxDescriptor(SK_AC*, RX_PORT*);
215static void ReceiveIrq(SK_AC*, RX_PORT*, SK_BOOL);
216static void ClearAndStartRx(SK_AC*, int);
217static void ClearTxIrq(SK_AC*, int, int);
218static void ClearRxRing(SK_AC*, RX_PORT*);
219static void ClearTxRing(SK_AC*, TX_PORT*);
220static int SkGeChangeMtu(struct SK_NET_DEVICE *dev, int new_mtu);
221static void PortReInitBmu(SK_AC*, int);
222static int SkGeIocMib(DEV_NET*, unsigned int, int);
223static int SkGeInitPCI(SK_AC *pAC);
224static void StartDrvCleanupTimer(SK_AC *pAC);
225static void StopDrvCleanupTimer(SK_AC *pAC);
226static int XmitFrameSG(SK_AC*, TX_PORT*, struct sk_buff*);
227
228#ifdef SK_DIAG_SUPPORT
229static SK_U32 ParseDeviceNbrFromSlotName(const char *SlotName);
230static int SkDrvInitAdapter(SK_AC *pAC, int devNbr);
231static int SkDrvDeInitAdapter(SK_AC *pAC, int devNbr);
232#endif
233
234/*******************************************************************************
235 *
236 * Extern Function Prototypes
237 *
238 ******************************************************************************/
239extern void SkDimEnableModerationIfNeeded(SK_AC *pAC);
240extern void SkDimDisplayModerationSettings(SK_AC *pAC);
241extern void SkDimStartModerationTimer(SK_AC *pAC);
242extern void SkDimModerate(SK_AC *pAC);
243extern void SkGeBlinkTimer(unsigned long data);
244
245#ifdef DEBUG
246static void DumpMsg(struct sk_buff*, char*);
247static void DumpData(char*, int);
248static void DumpLong(char*, int);
249#endif
250
251/* global variables *********************************************************/
252static SK_BOOL DoPrintInterfaceChange = SK_TRUE;
253extern const struct ethtool_ops SkGeEthtoolOps;
254
255/* local variables **********************************************************/
256static uintptr_t TxQueueAddr[SK_MAX_MACS][2] = {{0x680, 0x600},{0x780, 0x700}};
257static uintptr_t RxQueueAddr[SK_MAX_MACS] = {0x400, 0x480};
258
259/*****************************************************************************
260 *
261 * SkPciWriteCfgDWord - write a 32 bit value to pci config space
262 *
263 * Description:
264 * This routine writes a 32 bit value to the pci configuration
265 * space.
266 *
267 * Returns:
268 * 0 - indicate everything worked ok.
269 * != 0 - error indication
270 */
271static inline int SkPciWriteCfgDWord(
272SK_AC *pAC, /* Adapter Control structure pointer */
273int PciAddr, /* PCI register address */
274SK_U32 Val) /* pointer to store the read value */
275{
276 pci_write_config_dword(pAC->PciDev, PciAddr, Val);
277 return(0);
278} /* SkPciWriteCfgDWord */
279
280/*****************************************************************************
281 *
282 * SkGeInitPCI - Init the PCI resources
283 *
284 * Description:
285 * This function initialize the PCI resources and IO
286 *
287 * Returns:
288 * 0 - indicate everything worked ok.
289 * != 0 - error indication
290 */
291static __devinit int SkGeInitPCI(SK_AC *pAC)
292{
293 struct SK_NET_DEVICE *dev = pAC->dev[0];
294 struct pci_dev *pdev = pAC->PciDev;
295 int retval;
296
297 dev->mem_start = pci_resource_start (pdev, 0);
298 pci_set_master(pdev);
299
300 retval = pci_request_regions(pdev, "sk98lin");
301 if (retval)
302 goto out;
303
304#ifdef SK_BIG_ENDIAN
305 /*
306 * On big endian machines, we use the adapter's aibility of
307 * reading the descriptors as big endian.
308 */
309 {
310 SK_U32 our2;
311 SkPciReadCfgDWord(pAC, PCI_OUR_REG_2, &our2);
312 our2 |= PCI_REV_DESC;
313 SkPciWriteCfgDWord(pAC, PCI_OUR_REG_2, our2);
314 }
315#endif
316
317 /*
318 * Remap the regs into kernel space.
319 */
320 pAC->IoBase = ioremap_nocache(dev->mem_start, 0x4000);
321 if (!pAC->IoBase) {
322 retval = -EIO;
323 goto out_release;
324 }
325
326 return 0;
327
328 out_release:
329 pci_release_regions(pdev);
330 out:
331 return retval;
332}
333
334
335/*****************************************************************************
336 *
337 * FreeResources - release resources allocated for adapter
338 *
339 * Description:
340 * This function releases the IRQ, unmaps the IO and
341 * frees the desriptor ring.
342 *
343 * Returns: N/A
344 *
345 */
346static void FreeResources(struct SK_NET_DEVICE *dev)
347{
348SK_U32 AllocFlag;
349DEV_NET *pNet;
350SK_AC *pAC;
351
352 pNet = netdev_priv(dev);
353 pAC = pNet->pAC;
354 AllocFlag = pAC->AllocFlag;
355 if (pAC->PciDev) {
356 pci_release_regions(pAC->PciDev);
357 }
358 if (AllocFlag & SK_ALLOC_IRQ) {
359 free_irq(dev->irq, dev);
360 }
361 if (pAC->IoBase) {
362 iounmap(pAC->IoBase);
363 }
364 if (pAC->pDescrMem) {
365 BoardFreeMem(pAC);
366 }
367
368} /* FreeResources */
369
370MODULE_AUTHOR("Mirko Lindner <mlindner@syskonnect.de>");
371MODULE_DESCRIPTION("SysKonnect SK-NET Gigabit Ethernet SK-98xx driver");
372MODULE_LICENSE("GPL");
373
374#ifdef LINK_SPEED_A
375static char *Speed_A[SK_MAX_CARD_PARAM] = LINK_SPEED;
376#else
377static char *Speed_A[SK_MAX_CARD_PARAM] = {"", };
378#endif
379
380#ifdef LINK_SPEED_B
381static char *Speed_B[SK_MAX_CARD_PARAM] = LINK_SPEED;
382#else
383static char *Speed_B[SK_MAX_CARD_PARAM] = {"", };
384#endif
385
386#ifdef AUTO_NEG_A
387static char *AutoNeg_A[SK_MAX_CARD_PARAM] = AUTO_NEG_A;
388#else
389static char *AutoNeg_A[SK_MAX_CARD_PARAM] = {"", };
390#endif
391
392#ifdef DUP_CAP_A
393static char *DupCap_A[SK_MAX_CARD_PARAM] = DUP_CAP_A;
394#else
395static char *DupCap_A[SK_MAX_CARD_PARAM] = {"", };
396#endif
397
398#ifdef FLOW_CTRL_A
399static char *FlowCtrl_A[SK_MAX_CARD_PARAM] = FLOW_CTRL_A;
400#else
401static char *FlowCtrl_A[SK_MAX_CARD_PARAM] = {"", };
402#endif
403
404#ifdef ROLE_A
405static char *Role_A[SK_MAX_CARD_PARAM] = ROLE_A;
406#else
407static char *Role_A[SK_MAX_CARD_PARAM] = {"", };
408#endif
409
410#ifdef AUTO_NEG_B
411static char *AutoNeg_B[SK_MAX_CARD_PARAM] = AUTO_NEG_B;
412#else
413static char *AutoNeg_B[SK_MAX_CARD_PARAM] = {"", };
414#endif
415
416#ifdef DUP_CAP_B
417static char *DupCap_B[SK_MAX_CARD_PARAM] = DUP_CAP_B;
418#else
419static char *DupCap_B[SK_MAX_CARD_PARAM] = {"", };
420#endif
421
422#ifdef FLOW_CTRL_B
423static char *FlowCtrl_B[SK_MAX_CARD_PARAM] = FLOW_CTRL_B;
424#else
425static char *FlowCtrl_B[SK_MAX_CARD_PARAM] = {"", };
426#endif
427
428#ifdef ROLE_B
429static char *Role_B[SK_MAX_CARD_PARAM] = ROLE_B;
430#else
431static char *Role_B[SK_MAX_CARD_PARAM] = {"", };
432#endif
433
434#ifdef CON_TYPE
435static char *ConType[SK_MAX_CARD_PARAM] = CON_TYPE;
436#else
437static char *ConType[SK_MAX_CARD_PARAM] = {"", };
438#endif
439
440#ifdef PREF_PORT
441static char *PrefPort[SK_MAX_CARD_PARAM] = PREF_PORT;
442#else
443static char *PrefPort[SK_MAX_CARD_PARAM] = {"", };
444#endif
445
446#ifdef RLMT_MODE
447static char *RlmtMode[SK_MAX_CARD_PARAM] = RLMT_MODE;
448#else
449static char *RlmtMode[SK_MAX_CARD_PARAM] = {"", };
450#endif
451
452static int IntsPerSec[SK_MAX_CARD_PARAM];
453static char *Moderation[SK_MAX_CARD_PARAM];
454static char *ModerationMask[SK_MAX_CARD_PARAM];
455static char *AutoSizing[SK_MAX_CARD_PARAM];
456static char *Stats[SK_MAX_CARD_PARAM];
457
458module_param_array(Speed_A, charp, NULL, 0);
459module_param_array(Speed_B, charp, NULL, 0);
460module_param_array(AutoNeg_A, charp, NULL, 0);
461module_param_array(AutoNeg_B, charp, NULL, 0);
462module_param_array(DupCap_A, charp, NULL, 0);
463module_param_array(DupCap_B, charp, NULL, 0);
464module_param_array(FlowCtrl_A, charp, NULL, 0);
465module_param_array(FlowCtrl_B, charp, NULL, 0);
466module_param_array(Role_A, charp, NULL, 0);
467module_param_array(Role_B, charp, NULL, 0);
468module_param_array(ConType, charp, NULL, 0);
469module_param_array(PrefPort, charp, NULL, 0);
470module_param_array(RlmtMode, charp, NULL, 0);
471/* used for interrupt moderation */
472module_param_array(IntsPerSec, int, NULL, 0);
473module_param_array(Moderation, charp, NULL, 0);
474module_param_array(Stats, charp, NULL, 0);
475module_param_array(ModerationMask, charp, NULL, 0);
476module_param_array(AutoSizing, charp, NULL, 0);
477
478/*****************************************************************************
479 *
480 * SkGeBoardInit - do level 0 and 1 initialization
481 *
482 * Description:
483 * This function prepares the board hardware for running. The desriptor
484 * ring is set up, the IRQ is allocated and the configuration settings
485 * are examined.
486 *
487 * Returns:
488 * 0, if everything is ok
489 * !=0, on error
490 */
491static int __devinit SkGeBoardInit(struct SK_NET_DEVICE *dev, SK_AC *pAC)
492{
493short i;
494unsigned long Flags;
495char *DescrString = "sk98lin: Driver for Linux"; /* this is given to PNMI */
496char *VerStr = VER_STRING;
497int Ret; /* return code of request_irq */
498SK_BOOL DualNet;
499
500 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
501 ("IoBase: %08lX\n", (unsigned long)pAC->IoBase));
502 for (i=0; i<SK_MAX_MACS; i++) {
503 pAC->TxPort[i][0].HwAddr = pAC->IoBase + TxQueueAddr[i][0];
504 pAC->TxPort[i][0].PortIndex = i;
505 pAC->RxPort[i].HwAddr = pAC->IoBase + RxQueueAddr[i];
506 pAC->RxPort[i].PortIndex = i;
507 }
508
509 /* Initialize the mutexes */
510 for (i=0; i<SK_MAX_MACS; i++) {
511 spin_lock_init(&pAC->TxPort[i][0].TxDesRingLock);
512 spin_lock_init(&pAC->RxPort[i].RxDesRingLock);
513 }
514 spin_lock_init(&pAC->SlowPathLock);
515
516 /* setup phy_id blink timer */
517 pAC->BlinkTimer.function = SkGeBlinkTimer;
518 pAC->BlinkTimer.data = (unsigned long) dev;
519 init_timer(&pAC->BlinkTimer);
520
521 /* level 0 init common modules here */
522
523 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
524 /* Does a RESET on board ...*/
525 if (SkGeInit(pAC, pAC->IoBase, SK_INIT_DATA) != 0) {
526 printk("HWInit (0) failed.\n");
527 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
528 return -EIO;
529 }
530 SkI2cInit( pAC, pAC->IoBase, SK_INIT_DATA);
531 SkEventInit(pAC, pAC->IoBase, SK_INIT_DATA);
532 SkPnmiInit( pAC, pAC->IoBase, SK_INIT_DATA);
533 SkAddrInit( pAC, pAC->IoBase, SK_INIT_DATA);
534 SkRlmtInit( pAC, pAC->IoBase, SK_INIT_DATA);
535 SkTimerInit(pAC, pAC->IoBase, SK_INIT_DATA);
536
537 pAC->BoardLevel = SK_INIT_DATA;
538 pAC->RxBufSize = ETH_BUF_SIZE;
539
540 SK_PNMI_SET_DRIVER_DESCR(pAC, DescrString);
541 SK_PNMI_SET_DRIVER_VER(pAC, VerStr);
542
543 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
544
545 /* level 1 init common modules here (HW init) */
546 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
547 if (SkGeInit(pAC, pAC->IoBase, SK_INIT_IO) != 0) {
548 printk("sk98lin: HWInit (1) failed.\n");
549 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
550 return -EIO;
551 }
552 SkI2cInit( pAC, pAC->IoBase, SK_INIT_IO);
553 SkEventInit(pAC, pAC->IoBase, SK_INIT_IO);
554 SkPnmiInit( pAC, pAC->IoBase, SK_INIT_IO);
555 SkAddrInit( pAC, pAC->IoBase, SK_INIT_IO);
556 SkRlmtInit( pAC, pAC->IoBase, SK_INIT_IO);
557 SkTimerInit(pAC, pAC->IoBase, SK_INIT_IO);
558
559 /* Set chipset type support */
560 pAC->ChipsetType = 0;
561 if ((pAC->GIni.GIChipId == CHIP_ID_YUKON) ||
562 (pAC->GIni.GIChipId == CHIP_ID_YUKON_LITE)) {
563 pAC->ChipsetType = 1;
564 }
565
566 GetConfiguration(pAC);
567 if (pAC->RlmtNets == 2) {
568 pAC->GIni.GIPortUsage = SK_MUL_LINK;
569 }
570
571 pAC->BoardLevel = SK_INIT_IO;
572 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
573
574 if (pAC->GIni.GIMacsFound == 2) {
575 Ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", dev);
576 } else if (pAC->GIni.GIMacsFound == 1) {
577 Ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED,
578 "sk98lin", dev);
579 } else {
580 printk(KERN_WARNING "sk98lin: Illegal number of ports: %d\n",
581 pAC->GIni.GIMacsFound);
582 return -EIO;
583 }
584
585 if (Ret) {
586 printk(KERN_WARNING "sk98lin: Requested IRQ %d is busy.\n",
587 dev->irq);
588 return Ret;
589 }
590 pAC->AllocFlag |= SK_ALLOC_IRQ;
591
592 /* Alloc memory for this board (Mem for RxD/TxD) : */
593 if(!BoardAllocMem(pAC)) {
594 printk("No memory for descriptor rings.\n");
595 return -ENOMEM;
596 }
597
598 BoardInitMem(pAC);
599 /* tschilling: New common function with minimum size check. */
600 DualNet = SK_FALSE;
601 if (pAC->RlmtNets == 2) {
602 DualNet = SK_TRUE;
603 }
604
605 if (SkGeInitAssignRamToQueues(
606 pAC,
607 pAC->ActivePort,
608 DualNet)) {
609 BoardFreeMem(pAC);
610 printk("sk98lin: SkGeInitAssignRamToQueues failed.\n");
611 return -EIO;
612 }
613
614 return (0);
615} /* SkGeBoardInit */
616
617
618/*****************************************************************************
619 *
620 * BoardAllocMem - allocate the memory for the descriptor rings
621 *
622 * Description:
623 * This function allocates the memory for all descriptor rings.
624 * Each ring is aligned for the desriptor alignment and no ring
625 * has a 4 GByte boundary in it (because the upper 32 bit must
626 * be constant for all descriptiors in one rings).
627 *
628 * Returns:
629 * SK_TRUE, if all memory could be allocated
630 * SK_FALSE, if not
631 */
632static __devinit SK_BOOL BoardAllocMem(SK_AC *pAC)
633{
634caddr_t pDescrMem; /* pointer to descriptor memory area */
635size_t AllocLength; /* length of complete descriptor area */
636int i; /* loop counter */
637unsigned long BusAddr;
638
639
640 /* rings plus one for alignment (do not cross 4 GB boundary) */
641 /* RX_RING_SIZE is assumed bigger than TX_RING_SIZE */
642#if (BITS_PER_LONG == 32)
643 AllocLength = (RX_RING_SIZE + TX_RING_SIZE) * pAC->GIni.GIMacsFound + 8;
644#else
645 AllocLength = (RX_RING_SIZE + TX_RING_SIZE) * pAC->GIni.GIMacsFound
646 + RX_RING_SIZE + 8;
647#endif
648
649 pDescrMem = pci_alloc_consistent(pAC->PciDev, AllocLength,
650 &pAC->pDescrMemDMA);
651
652 if (pDescrMem == NULL) {
653 return (SK_FALSE);
654 }
655 pAC->pDescrMem = pDescrMem;
656 BusAddr = (unsigned long) pAC->pDescrMemDMA;
657
658 /* Descriptors need 8 byte alignment, and this is ensured
659 * by pci_alloc_consistent.
660 */
661 for (i=0; i<pAC->GIni.GIMacsFound; i++) {
662 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_TX_PROGRESS,
663 ("TX%d/A: pDescrMem: %lX, PhysDescrMem: %lX\n",
664 i, (unsigned long) pDescrMem,
665 BusAddr));
666 pAC->TxPort[i][0].pTxDescrRing = pDescrMem;
667 pAC->TxPort[i][0].VTxDescrRing = BusAddr;
668 pDescrMem += TX_RING_SIZE;
669 BusAddr += TX_RING_SIZE;
670
671 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_TX_PROGRESS,
672 ("RX%d: pDescrMem: %lX, PhysDescrMem: %lX\n",
673 i, (unsigned long) pDescrMem,
674 (unsigned long)BusAddr));
675 pAC->RxPort[i].pRxDescrRing = pDescrMem;
676 pAC->RxPort[i].VRxDescrRing = BusAddr;
677 pDescrMem += RX_RING_SIZE;
678 BusAddr += RX_RING_SIZE;
679 } /* for */
680
681 return (SK_TRUE);
682} /* BoardAllocMem */
683
684
685/****************************************************************************
686 *
687 * BoardFreeMem - reverse of BoardAllocMem
688 *
689 * Description:
690 * Free all memory allocated in BoardAllocMem: adapter context,
691 * descriptor rings, locks.
692 *
693 * Returns: N/A
694 */
695static void BoardFreeMem(
696SK_AC *pAC)
697{
698size_t AllocLength; /* length of complete descriptor area */
699
700 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
701 ("BoardFreeMem\n"));
702#if (BITS_PER_LONG == 32)
703 AllocLength = (RX_RING_SIZE + TX_RING_SIZE) * pAC->GIni.GIMacsFound + 8;
704#else
705 AllocLength = (RX_RING_SIZE + TX_RING_SIZE) * pAC->GIni.GIMacsFound
706 + RX_RING_SIZE + 8;
707#endif
708
709 pci_free_consistent(pAC->PciDev, AllocLength,
710 pAC->pDescrMem, pAC->pDescrMemDMA);
711 pAC->pDescrMem = NULL;
712} /* BoardFreeMem */
713
714
715/*****************************************************************************
716 *
717 * BoardInitMem - initiate the descriptor rings
718 *
719 * Description:
720 * This function sets the descriptor rings up in memory.
721 * The adapter is initialized with the descriptor start addresses.
722 *
723 * Returns: N/A
724 */
725static __devinit void BoardInitMem(SK_AC *pAC)
726{
727int i; /* loop counter */
728int RxDescrSize; /* the size of a rx descriptor rounded up to alignment*/
729int TxDescrSize; /* the size of a tx descriptor rounded up to alignment*/
730
731 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
732 ("BoardInitMem\n"));
733
734 RxDescrSize = (((sizeof(RXD) - 1) / DESCR_ALIGN) + 1) * DESCR_ALIGN;
735 pAC->RxDescrPerRing = RX_RING_SIZE / RxDescrSize;
736 TxDescrSize = (((sizeof(TXD) - 1) / DESCR_ALIGN) + 1) * DESCR_ALIGN;
737 pAC->TxDescrPerRing = TX_RING_SIZE / RxDescrSize;
738
739 for (i=0; i<pAC->GIni.GIMacsFound; i++) {
740 SetupRing(
741 pAC,
742 pAC->TxPort[i][0].pTxDescrRing,
743 pAC->TxPort[i][0].VTxDescrRing,
744 (RXD**)&pAC->TxPort[i][0].pTxdRingHead,
745 (RXD**)&pAC->TxPort[i][0].pTxdRingTail,
746 (RXD**)&pAC->TxPort[i][0].pTxdRingPrev,
747 &pAC->TxPort[i][0].TxdRingFree,
748 SK_TRUE);
749 SetupRing(
750 pAC,
751 pAC->RxPort[i].pRxDescrRing,
752 pAC->RxPort[i].VRxDescrRing,
753 &pAC->RxPort[i].pRxdRingHead,
754 &pAC->RxPort[i].pRxdRingTail,
755 &pAC->RxPort[i].pRxdRingPrev,
756 &pAC->RxPort[i].RxdRingFree,
757 SK_FALSE);
758 }
759} /* BoardInitMem */
760
761
762/*****************************************************************************
763 *
764 * SetupRing - create one descriptor ring
765 *
766 * Description:
767 * This function creates one descriptor ring in the given memory area.
768 * The head, tail and number of free descriptors in the ring are set.
769 *
770 * Returns:
771 * none
772 */
773static void SetupRing(
774SK_AC *pAC,
775void *pMemArea, /* a pointer to the memory area for the ring */
776uintptr_t VMemArea, /* the virtual bus address of the memory area */
777RXD **ppRingHead, /* address where the head should be written */
778RXD **ppRingTail, /* address where the tail should be written */
779RXD **ppRingPrev, /* address where the tail should be written */
780int *pRingFree, /* address where the # of free descr. goes */
781SK_BOOL IsTx) /* flag: is this a tx ring */
782{
783int i; /* loop counter */
784int DescrSize; /* the size of a descriptor rounded up to alignment*/
785int DescrNum; /* number of descriptors per ring */
786RXD *pDescr; /* pointer to a descriptor (receive or transmit) */
787RXD *pNextDescr; /* pointer to the next descriptor */
788RXD *pPrevDescr; /* pointer to the previous descriptor */
789uintptr_t VNextDescr; /* the virtual bus address of the next descriptor */
790
791 if (IsTx == SK_TRUE) {
792 DescrSize = (((sizeof(TXD) - 1) / DESCR_ALIGN) + 1) *
793 DESCR_ALIGN;
794 DescrNum = TX_RING_SIZE / DescrSize;
795 } else {
796 DescrSize = (((sizeof(RXD) - 1) / DESCR_ALIGN) + 1) *
797 DESCR_ALIGN;
798 DescrNum = RX_RING_SIZE / DescrSize;
799 }
800
801 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_TX_PROGRESS,
802 ("Descriptor size: %d Descriptor Number: %d\n",
803 DescrSize,DescrNum));
804
805 pDescr = (RXD*) pMemArea;
806 pPrevDescr = NULL;
807 pNextDescr = (RXD*) (((char*)pDescr) + DescrSize);
808 VNextDescr = VMemArea + DescrSize;
809 for(i=0; i<DescrNum; i++) {
810 /* set the pointers right */
811 pDescr->VNextRxd = VNextDescr & 0xffffffffULL;
812 pDescr->pNextRxd = pNextDescr;
813 if (!IsTx) pDescr->TcpSumStarts = ETH_HLEN << 16 | ETH_HLEN;
814
815 /* advance one step */
816 pPrevDescr = pDescr;
817 pDescr = pNextDescr;
818 pNextDescr = (RXD*) (((char*)pDescr) + DescrSize);
819 VNextDescr += DescrSize;
820 }
821 pPrevDescr->pNextRxd = (RXD*) pMemArea;
822 pPrevDescr->VNextRxd = VMemArea;
823 pDescr = (RXD*) pMemArea;
824 *ppRingHead = (RXD*) pMemArea;
825 *ppRingTail = *ppRingHead;
826 *ppRingPrev = pPrevDescr;
827 *pRingFree = DescrNum;
828} /* SetupRing */
829
830
831/*****************************************************************************
832 *
833 * PortReInitBmu - re-initiate the descriptor rings for one port
834 *
835 * Description:
836 * This function reinitializes the descriptor rings of one port
837 * in memory. The port must be stopped before.
838 * The HW is initialized with the descriptor start addresses.
839 *
840 * Returns:
841 * none
842 */
843static void PortReInitBmu(
844SK_AC *pAC, /* pointer to adapter context */
845int PortIndex) /* index of the port for which to re-init */
846{
847 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
848 ("PortReInitBmu "));
849
850 /* set address of first descriptor of ring in BMU */
851 SK_OUT32(pAC->IoBase, TxQueueAddr[PortIndex][TX_PRIO_LOW]+ Q_DA_L,
852 (uint32_t)(((caddr_t)
853 (pAC->TxPort[PortIndex][TX_PRIO_LOW].pTxdRingHead) -
854 pAC->TxPort[PortIndex][TX_PRIO_LOW].pTxDescrRing +
855 pAC->TxPort[PortIndex][TX_PRIO_LOW].VTxDescrRing) &
856 0xFFFFFFFF));
857 SK_OUT32(pAC->IoBase, TxQueueAddr[PortIndex][TX_PRIO_LOW]+ Q_DA_H,
858 (uint32_t)(((caddr_t)
859 (pAC->TxPort[PortIndex][TX_PRIO_LOW].pTxdRingHead) -
860 pAC->TxPort[PortIndex][TX_PRIO_LOW].pTxDescrRing +
861 pAC->TxPort[PortIndex][TX_PRIO_LOW].VTxDescrRing) >> 32));
862 SK_OUT32(pAC->IoBase, RxQueueAddr[PortIndex]+Q_DA_L,
863 (uint32_t)(((caddr_t)(pAC->RxPort[PortIndex].pRxdRingHead) -
864 pAC->RxPort[PortIndex].pRxDescrRing +
865 pAC->RxPort[PortIndex].VRxDescrRing) & 0xFFFFFFFF));
866 SK_OUT32(pAC->IoBase, RxQueueAddr[PortIndex]+Q_DA_H,
867 (uint32_t)(((caddr_t)(pAC->RxPort[PortIndex].pRxdRingHead) -
868 pAC->RxPort[PortIndex].pRxDescrRing +
869 pAC->RxPort[PortIndex].VRxDescrRing) >> 32));
870} /* PortReInitBmu */
871
872
873/****************************************************************************
874 *
875 * SkGeIsr - handle adapter interrupts
876 *
877 * Description:
878 * The interrupt routine is called when the network adapter
879 * generates an interrupt. It may also be called if another device
880 * shares this interrupt vector with the driver.
881 *
882 * Returns: N/A
883 *
884 */
885static SkIsrRetVar SkGeIsr(int irq, void *dev_id)
886{
887struct SK_NET_DEVICE *dev = (struct SK_NET_DEVICE *)dev_id;
888DEV_NET *pNet;
889SK_AC *pAC;
890SK_U32 IntSrc; /* interrupts source register contents */
891
892 pNet = netdev_priv(dev);
893 pAC = pNet->pAC;
894
895 /*
896 * Check and process if its our interrupt
897 */
898 SK_IN32(pAC->IoBase, B0_SP_ISRC, &IntSrc);
899 if (IntSrc == 0) {
900 return SkIsrRetNone;
901 }
902
903 while (((IntSrc & IRQ_MASK) & ~SPECIAL_IRQS) != 0) {
904#if 0 /* software irq currently not used */
905 if (IntSrc & IS_IRQ_SW) {
906 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
907 SK_DBGCAT_DRV_INT_SRC,
908 ("Software IRQ\n"));
909 }
910#endif
911 if (IntSrc & IS_R1_F) {
912 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
913 SK_DBGCAT_DRV_INT_SRC,
914 ("EOF RX1 IRQ\n"));
915 ReceiveIrq(pAC, &pAC->RxPort[0], SK_TRUE);
916 SK_PNMI_CNT_RX_INTR(pAC, 0);
917 }
918 if (IntSrc & IS_R2_F) {
919 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
920 SK_DBGCAT_DRV_INT_SRC,
921 ("EOF RX2 IRQ\n"));
922 ReceiveIrq(pAC, &pAC->RxPort[1], SK_TRUE);
923 SK_PNMI_CNT_RX_INTR(pAC, 1);
924 }
925#ifdef USE_TX_COMPLETE /* only if tx complete interrupt used */
926 if (IntSrc & IS_XA1_F) {
927 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
928 SK_DBGCAT_DRV_INT_SRC,
929 ("EOF AS TX1 IRQ\n"));
930 SK_PNMI_CNT_TX_INTR(pAC, 0);
931 spin_lock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock);
932 FreeTxDescriptors(pAC, &pAC->TxPort[0][TX_PRIO_LOW]);
933 spin_unlock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock);
934 }
935 if (IntSrc & IS_XA2_F) {
936 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
937 SK_DBGCAT_DRV_INT_SRC,
938 ("EOF AS TX2 IRQ\n"));
939 SK_PNMI_CNT_TX_INTR(pAC, 1);
940 spin_lock(&pAC->TxPort[1][TX_PRIO_LOW].TxDesRingLock);
941 FreeTxDescriptors(pAC, &pAC->TxPort[1][TX_PRIO_LOW]);
942 spin_unlock(&pAC->TxPort[1][TX_PRIO_LOW].TxDesRingLock);
943 }
944#if 0 /* only if sync. queues used */
945 if (IntSrc & IS_XS1_F) {
946 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
947 SK_DBGCAT_DRV_INT_SRC,
948 ("EOF SY TX1 IRQ\n"));
949 SK_PNMI_CNT_TX_INTR(pAC, 1);
950 spin_lock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock);
951 FreeTxDescriptors(pAC, 0, TX_PRIO_HIGH);
952 spin_unlock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock);
953 ClearTxIrq(pAC, 0, TX_PRIO_HIGH);
954 }
955 if (IntSrc & IS_XS2_F) {
956 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
957 SK_DBGCAT_DRV_INT_SRC,
958 ("EOF SY TX2 IRQ\n"));
959 SK_PNMI_CNT_TX_INTR(pAC, 1);
960 spin_lock(&pAC->TxPort[1][TX_PRIO_HIGH].TxDesRingLock);
961 FreeTxDescriptors(pAC, 1, TX_PRIO_HIGH);
962 spin_unlock(&pAC->TxPort[1][TX_PRIO_HIGH].TxDesRingLock);
963 ClearTxIrq(pAC, 1, TX_PRIO_HIGH);
964 }
965#endif
966#endif
967
968 /* do all IO at once */
969 if (IntSrc & IS_R1_F)
970 ClearAndStartRx(pAC, 0);
971 if (IntSrc & IS_R2_F)
972 ClearAndStartRx(pAC, 1);
973#ifdef USE_TX_COMPLETE /* only if tx complete interrupt used */
974 if (IntSrc & IS_XA1_F)
975 ClearTxIrq(pAC, 0, TX_PRIO_LOW);
976 if (IntSrc & IS_XA2_F)
977 ClearTxIrq(pAC, 1, TX_PRIO_LOW);
978#endif
979 SK_IN32(pAC->IoBase, B0_ISRC, &IntSrc);
980 } /* while (IntSrc & IRQ_MASK != 0) */
981
982 IntSrc &= pAC->GIni.GIValIrqMask;
983 if ((IntSrc & SPECIAL_IRQS) || pAC->CheckQueue) {
984 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC,
985 ("SPECIAL IRQ DP-Cards => %x\n", IntSrc));
986 pAC->CheckQueue = SK_FALSE;
987 spin_lock(&pAC->SlowPathLock);
988 if (IntSrc & SPECIAL_IRQS)
989 SkGeSirqIsr(pAC, pAC->IoBase, IntSrc);
990
991 SkEventDispatcher(pAC, pAC->IoBase);
992 spin_unlock(&pAC->SlowPathLock);
993 }
994 /*
995 * do it all again is case we cleared an interrupt that
996 * came in after handling the ring (OUTs may be delayed
997 * in hardware buffers, but are through after IN)
998 *
999 * rroesler: has been commented out and shifted to
1000 * SkGeDrvEvent(), because it is timer
1001 * guarded now
1002 *
1003 ReceiveIrq(pAC, &pAC->RxPort[0], SK_TRUE);
1004 ReceiveIrq(pAC, &pAC->RxPort[1], SK_TRUE);
1005 */
1006
1007 if (pAC->CheckQueue) {
1008 pAC->CheckQueue = SK_FALSE;
1009 spin_lock(&pAC->SlowPathLock);
1010 SkEventDispatcher(pAC, pAC->IoBase);
1011 spin_unlock(&pAC->SlowPathLock);
1012 }
1013
1014 /* IRQ is processed - Enable IRQs again*/
1015 SK_OUT32(pAC->IoBase, B0_IMSK, pAC->GIni.GIValIrqMask);
1016
1017 return SkIsrRetHandled;
1018} /* SkGeIsr */
1019
1020
1021/****************************************************************************
1022 *
1023 * SkGeIsrOnePort - handle adapter interrupts for single port adapter
1024 *
1025 * Description:
1026 * The interrupt routine is called when the network adapter
1027 * generates an interrupt. It may also be called if another device
1028 * shares this interrupt vector with the driver.
1029 * This is the same as above, but handles only one port.
1030 *
1031 * Returns: N/A
1032 *
1033 */
1034static SkIsrRetVar SkGeIsrOnePort(int irq, void *dev_id)
1035{
1036struct SK_NET_DEVICE *dev = (struct SK_NET_DEVICE *)dev_id;
1037DEV_NET *pNet;
1038SK_AC *pAC;
1039SK_U32 IntSrc; /* interrupts source register contents */
1040
1041 pNet = netdev_priv(dev);
1042 pAC = pNet->pAC;
1043
1044 /*
1045 * Check and process if its our interrupt
1046 */
1047 SK_IN32(pAC->IoBase, B0_SP_ISRC, &IntSrc);
1048 if (IntSrc == 0) {
1049 return SkIsrRetNone;
1050 }
1051
1052 while (((IntSrc & IRQ_MASK) & ~SPECIAL_IRQS) != 0) {
1053#if 0 /* software irq currently not used */
1054 if (IntSrc & IS_IRQ_SW) {
1055 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
1056 SK_DBGCAT_DRV_INT_SRC,
1057 ("Software IRQ\n"));
1058 }
1059#endif
1060 if (IntSrc & IS_R1_F) {
1061 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
1062 SK_DBGCAT_DRV_INT_SRC,
1063 ("EOF RX1 IRQ\n"));
1064 ReceiveIrq(pAC, &pAC->RxPort[0], SK_TRUE);
1065 SK_PNMI_CNT_RX_INTR(pAC, 0);
1066 }
1067#ifdef USE_TX_COMPLETE /* only if tx complete interrupt used */
1068 if (IntSrc & IS_XA1_F) {
1069 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
1070 SK_DBGCAT_DRV_INT_SRC,
1071 ("EOF AS TX1 IRQ\n"));
1072 SK_PNMI_CNT_TX_INTR(pAC, 0);
1073 spin_lock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock);
1074 FreeTxDescriptors(pAC, &pAC->TxPort[0][TX_PRIO_LOW]);
1075 spin_unlock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock);
1076 }
1077#if 0 /* only if sync. queues used */
1078 if (IntSrc & IS_XS1_F) {
1079 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
1080 SK_DBGCAT_DRV_INT_SRC,
1081 ("EOF SY TX1 IRQ\n"));
1082 SK_PNMI_CNT_TX_INTR(pAC, 0);
1083 spin_lock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock);
1084 FreeTxDescriptors(pAC, 0, TX_PRIO_HIGH);
1085 spin_unlock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock);
1086 ClearTxIrq(pAC, 0, TX_PRIO_HIGH);
1087 }
1088#endif
1089#endif
1090
1091 /* do all IO at once */
1092 if (IntSrc & IS_R1_F)
1093 ClearAndStartRx(pAC, 0);
1094#ifdef USE_TX_COMPLETE /* only if tx complete interrupt used */
1095 if (IntSrc & IS_XA1_F)
1096 ClearTxIrq(pAC, 0, TX_PRIO_LOW);
1097#endif
1098 SK_IN32(pAC->IoBase, B0_ISRC, &IntSrc);
1099 } /* while (IntSrc & IRQ_MASK != 0) */
1100
1101 IntSrc &= pAC->GIni.GIValIrqMask;
1102 if ((IntSrc & SPECIAL_IRQS) || pAC->CheckQueue) {
1103 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC,
1104 ("SPECIAL IRQ SP-Cards => %x\n", IntSrc));
1105 pAC->CheckQueue = SK_FALSE;
1106 spin_lock(&pAC->SlowPathLock);
1107 if (IntSrc & SPECIAL_IRQS)
1108 SkGeSirqIsr(pAC, pAC->IoBase, IntSrc);
1109
1110 SkEventDispatcher(pAC, pAC->IoBase);
1111 spin_unlock(&pAC->SlowPathLock);
1112 }
1113 /*
1114 * do it all again is case we cleared an interrupt that
1115 * came in after handling the ring (OUTs may be delayed
1116 * in hardware buffers, but are through after IN)
1117 *
1118 * rroesler: has been commented out and shifted to
1119 * SkGeDrvEvent(), because it is timer
1120 * guarded now
1121 *
1122 ReceiveIrq(pAC, &pAC->RxPort[0], SK_TRUE);
1123 */
1124
1125 /* IRQ is processed - Enable IRQs again*/
1126 SK_OUT32(pAC->IoBase, B0_IMSK, pAC->GIni.GIValIrqMask);
1127
1128 return SkIsrRetHandled;
1129} /* SkGeIsrOnePort */
1130
1131#ifdef CONFIG_NET_POLL_CONTROLLER
1132/****************************************************************************
1133 *
1134 * SkGePollController - polling receive, for netconsole
1135 *
1136 * Description:
1137 * Polling receive - used by netconsole and other diagnostic tools
1138 * to allow network i/o with interrupts disabled.
1139 *
1140 * Returns: N/A
1141 */
1142static void SkGePollController(struct net_device *dev)
1143{
1144 disable_irq(dev->irq);
1145 SkGeIsr(dev->irq, dev);
1146 enable_irq(dev->irq);
1147}
1148#endif
1149
1150/****************************************************************************
1151 *
1152 * SkGeOpen - handle start of initialized adapter
1153 *
1154 * Description:
1155 * This function starts the initialized adapter.
1156 * The board level variable is set and the adapter is
1157 * brought to full functionality.
1158 * The device flags are set for operation.
1159 * Do all necessary level 2 initialization, enable interrupts and
1160 * give start command to RLMT.
1161 *
1162 * Returns:
1163 * 0 on success
1164 * != 0 on error
1165 */
1166static int SkGeOpen(
1167struct SK_NET_DEVICE *dev)
1168{
1169 DEV_NET *pNet;
1170 SK_AC *pAC;
1171 unsigned long Flags; /* for spin lock */
1172 int i;
1173 SK_EVPARA EvPara; /* an event parameter union */
1174
1175 pNet = netdev_priv(dev);
1176 pAC = pNet->pAC;
1177
1178 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
1179 ("SkGeOpen: pAC=0x%lX:\n", (unsigned long)pAC));
1180
1181#ifdef SK_DIAG_SUPPORT
1182 if (pAC->DiagModeActive == DIAG_ACTIVE) {
1183 if (pAC->Pnmi.DiagAttached == SK_DIAG_RUNNING) {
1184 return (-1); /* still in use by diag; deny actions */
1185 }
1186 }
1187#endif
1188
1189 /* Set blink mode */
1190 if ((pAC->PciDev->vendor == 0x1186) || (pAC->PciDev->vendor == 0x11ab ))
1191 pAC->GIni.GILedBlinkCtrl = OEM_CONFIG_VALUE;
1192
1193 if (pAC->BoardLevel == SK_INIT_DATA) {
1194 /* level 1 init common modules here */
1195 if (SkGeInit(pAC, pAC->IoBase, SK_INIT_IO) != 0) {
1196 printk("%s: HWInit (1) failed.\n", pAC->dev[pNet->PortNr]->name);
1197 return (-1);
1198 }
1199 SkI2cInit (pAC, pAC->IoBase, SK_INIT_IO);
1200 SkEventInit (pAC, pAC->IoBase, SK_INIT_IO);
1201 SkPnmiInit (pAC, pAC->IoBase, SK_INIT_IO);
1202 SkAddrInit (pAC, pAC->IoBase, SK_INIT_IO);
1203 SkRlmtInit (pAC, pAC->IoBase, SK_INIT_IO);
1204 SkTimerInit (pAC, pAC->IoBase, SK_INIT_IO);
1205 pAC->BoardLevel = SK_INIT_IO;
1206 }
1207
1208 if (pAC->BoardLevel != SK_INIT_RUN) {
1209 /* tschilling: Level 2 init modules here, check return value. */
1210 if (SkGeInit(pAC, pAC->IoBase, SK_INIT_RUN) != 0) {
1211 printk("%s: HWInit (2) failed.\n", pAC->dev[pNet->PortNr]->name);
1212 return (-1);
1213 }
1214 SkI2cInit (pAC, pAC->IoBase, SK_INIT_RUN);
1215 SkEventInit (pAC, pAC->IoBase, SK_INIT_RUN);
1216 SkPnmiInit (pAC, pAC->IoBase, SK_INIT_RUN);
1217 SkAddrInit (pAC, pAC->IoBase, SK_INIT_RUN);
1218 SkRlmtInit (pAC, pAC->IoBase, SK_INIT_RUN);
1219 SkTimerInit (pAC, pAC->IoBase, SK_INIT_RUN);
1220 pAC->BoardLevel = SK_INIT_RUN;
1221 }
1222
1223 for (i=0; i<pAC->GIni.GIMacsFound; i++) {
1224 /* Enable transmit descriptor polling. */
1225 SkGePollTxD(pAC, pAC->IoBase, i, SK_TRUE);
1226 FillRxRing(pAC, &pAC->RxPort[i]);
1227 }
1228 SkGeYellowLED(pAC, pAC->IoBase, 1);
1229
1230 StartDrvCleanupTimer(pAC);
1231 SkDimEnableModerationIfNeeded(pAC);
1232 SkDimDisplayModerationSettings(pAC);
1233
1234 pAC->GIni.GIValIrqMask &= IRQ_MASK;
1235
1236 /* enable Interrupts */
1237 SK_OUT32(pAC->IoBase, B0_IMSK, pAC->GIni.GIValIrqMask);
1238 SK_OUT32(pAC->IoBase, B0_HWE_IMSK, IRQ_HWE_MASK);
1239
1240 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
1241
1242 if ((pAC->RlmtMode != 0) && (pAC->MaxPorts == 0)) {
1243 EvPara.Para32[0] = pAC->RlmtNets;
1244 EvPara.Para32[1] = -1;
1245 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_SET_NETS,
1246 EvPara);
1247 EvPara.Para32[0] = pAC->RlmtMode;
1248 EvPara.Para32[1] = 0;
1249 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_MODE_CHANGE,
1250 EvPara);
1251 }
1252
1253 EvPara.Para32[0] = pNet->NetNr;
1254 EvPara.Para32[1] = -1;
1255 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara);
1256 SkEventDispatcher(pAC, pAC->IoBase);
1257 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
1258
1259 pAC->MaxPorts++;
1260
1261
1262 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
1263 ("SkGeOpen suceeded\n"));
1264
1265 return (0);
1266} /* SkGeOpen */
1267
1268
1269/****************************************************************************
1270 *
1271 * SkGeClose - Stop initialized adapter
1272 *
1273 * Description:
1274 * Close initialized adapter.
1275 *
1276 * Returns:
1277 * 0 - on success
1278 * error code - on error
1279 */
1280static int SkGeClose(
1281struct SK_NET_DEVICE *dev)
1282{
1283 DEV_NET *pNet;
1284 DEV_NET *newPtrNet;
1285 SK_AC *pAC;
1286
1287 unsigned long Flags; /* for spin lock */
1288 int i;
1289 int PortIdx;
1290 SK_EVPARA EvPara;
1291
1292 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
1293 ("SkGeClose: pAC=0x%lX ", (unsigned long)pAC));
1294
1295 pNet = netdev_priv(dev);
1296 pAC = pNet->pAC;
1297
1298#ifdef SK_DIAG_SUPPORT
1299 if (pAC->DiagModeActive == DIAG_ACTIVE) {
1300 if (pAC->DiagFlowCtrl == SK_FALSE) {
1301 /*
1302 ** notify that the interface which has been closed
1303 ** by operator interaction must not be started up
1304 ** again when the DIAG has finished.
1305 */
1306 newPtrNet = netdev_priv(pAC->dev[0]);
1307 if (newPtrNet == pNet) {
1308 pAC->WasIfUp[0] = SK_FALSE;
1309 } else {
1310 pAC->WasIfUp[1] = SK_FALSE;
1311 }
1312 return 0; /* return to system everything is fine... */
1313 } else {
1314 pAC->DiagFlowCtrl = SK_FALSE;
1315 }
1316 }
1317#endif
1318
1319 netif_stop_queue(dev);
1320
1321 if (pAC->RlmtNets == 1)
1322 PortIdx = pAC->ActivePort;
1323 else
1324 PortIdx = pNet->NetNr;
1325
1326 StopDrvCleanupTimer(pAC);
1327
1328 /*
1329 * Clear multicast table, promiscuous mode ....
1330 */
1331 SkAddrMcClear(pAC, pAC->IoBase, PortIdx, 0);
1332 SkAddrPromiscuousChange(pAC, pAC->IoBase, PortIdx,
1333 SK_PROM_MODE_NONE);
1334
1335 if (pAC->MaxPorts == 1) {
1336 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
1337 /* disable interrupts */
1338 SK_OUT32(pAC->IoBase, B0_IMSK, 0);
1339 EvPara.Para32[0] = pNet->NetNr;
1340 EvPara.Para32[1] = -1;
1341 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
1342 SkEventDispatcher(pAC, pAC->IoBase);
1343 SK_OUT32(pAC->IoBase, B0_IMSK, 0);
1344 /* stop the hardware */
1345 SkGeDeInit(pAC, pAC->IoBase);
1346 pAC->BoardLevel = SK_INIT_DATA;
1347 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
1348 } else {
1349
1350 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
1351 EvPara.Para32[0] = pNet->NetNr;
1352 EvPara.Para32[1] = -1;
1353 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
1354 SkPnmiEvent(pAC, pAC->IoBase, SK_PNMI_EVT_XMAC_RESET, EvPara);
1355 SkEventDispatcher(pAC, pAC->IoBase);
1356 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
1357
1358 /* Stop port */
1359 spin_lock_irqsave(&pAC->TxPort[pNet->PortNr]
1360 [TX_PRIO_LOW].TxDesRingLock, Flags);
1361 SkGeStopPort(pAC, pAC->IoBase, pNet->PortNr,
1362 SK_STOP_ALL, SK_HARD_RST);
1363 spin_unlock_irqrestore(&pAC->TxPort[pNet->PortNr]
1364 [TX_PRIO_LOW].TxDesRingLock, Flags);
1365 }
1366
1367 if (pAC->RlmtNets == 1) {
1368 /* clear all descriptor rings */
1369 for (i=0; i<pAC->GIni.GIMacsFound; i++) {
1370 ReceiveIrq(pAC, &pAC->RxPort[i], SK_TRUE);
1371 ClearRxRing(pAC, &pAC->RxPort[i]);
1372 ClearTxRing(pAC, &pAC->TxPort[i][TX_PRIO_LOW]);
1373 }
1374 } else {
1375 /* clear port descriptor rings */
1376 ReceiveIrq(pAC, &pAC->RxPort[pNet->PortNr], SK_TRUE);
1377 ClearRxRing(pAC, &pAC->RxPort[pNet->PortNr]);
1378 ClearTxRing(pAC, &pAC->TxPort[pNet->PortNr][TX_PRIO_LOW]);
1379 }
1380
1381 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
1382 ("SkGeClose: done "));
1383
1384 SK_MEMSET(&(pAC->PnmiBackup), 0, sizeof(SK_PNMI_STRUCT_DATA));
1385 SK_MEMCPY(&(pAC->PnmiBackup), &(pAC->PnmiStruct),
1386 sizeof(SK_PNMI_STRUCT_DATA));
1387
1388 pAC->MaxPorts--;
1389
1390 return (0);
1391} /* SkGeClose */
1392
1393
1394/*****************************************************************************
1395 *
1396 * SkGeXmit - Linux frame transmit function
1397 *
1398 * Description:
1399 * The system calls this function to send frames onto the wire.
1400 * It puts the frame in the tx descriptor ring. If the ring is
1401 * full then, the 'tbusy' flag is set.
1402 *
1403 * Returns:
1404 * 0, if everything is ok
1405 * !=0, on error
1406 * WARNING: returning 1 in 'tbusy' case caused system crashes (double
1407 * allocated skb's) !!!
1408 */
1409static int SkGeXmit(struct sk_buff *skb, struct SK_NET_DEVICE *dev)
1410{
1411DEV_NET *pNet;
1412SK_AC *pAC;
1413int Rc; /* return code of XmitFrame */
1414
1415 pNet = netdev_priv(dev);
1416 pAC = pNet->pAC;
1417
1418 if ((!skb_shinfo(skb)->nr_frags) ||
1419 (pAC->GIni.GIChipId == CHIP_ID_GENESIS)) {
1420 /* Don't activate scatter-gather and hardware checksum */
1421
1422 if (pAC->RlmtNets == 2)
1423 Rc = XmitFrame(
1424 pAC,
1425 &pAC->TxPort[pNet->PortNr][TX_PRIO_LOW],
1426 skb);
1427 else
1428 Rc = XmitFrame(
1429 pAC,
1430 &pAC->TxPort[pAC->ActivePort][TX_PRIO_LOW],
1431 skb);
1432 } else {
1433 /* scatter-gather and hardware TCP checksumming anabled*/
1434 if (pAC->RlmtNets == 2)
1435 Rc = XmitFrameSG(
1436 pAC,
1437 &pAC->TxPort[pNet->PortNr][TX_PRIO_LOW],
1438 skb);
1439 else
1440 Rc = XmitFrameSG(
1441 pAC,
1442 &pAC->TxPort[pAC->ActivePort][TX_PRIO_LOW],
1443 skb);
1444 }
1445
1446 /* Transmitter out of resources? */
1447 if (Rc <= 0) {
1448 netif_stop_queue(dev);
1449 }
1450
1451 /* If not taken, give buffer ownership back to the
1452 * queueing layer.
1453 */
1454 if (Rc < 0)
1455 return (1);
1456
1457 dev->trans_start = jiffies;
1458 return (0);
1459} /* SkGeXmit */
1460
1461
1462/*****************************************************************************
1463 *
1464 * XmitFrame - fill one socket buffer into the transmit ring
1465 *
1466 * Description:
1467 * This function puts a message into the transmit descriptor ring
1468 * if there is a descriptors left.
1469 * Linux skb's consist of only one continuous buffer.
1470 * The first step locks the ring. It is held locked
1471 * all time to avoid problems with SWITCH_../PORT_RESET.
1472 * Then the descriptoris allocated.
1473 * The second part is linking the buffer to the descriptor.
1474 * At the very last, the Control field of the descriptor
1475 * is made valid for the BMU and a start TX command is given
1476 * if necessary.
1477 *
1478 * Returns:
1479 * > 0 - on succes: the number of bytes in the message
1480 * = 0 - on resource shortage: this frame sent or dropped, now
1481 * the ring is full ( -> set tbusy)
1482 * < 0 - on failure: other problems ( -> return failure to upper layers)
1483 */
1484static int XmitFrame(
1485SK_AC *pAC, /* pointer to adapter context */
1486TX_PORT *pTxPort, /* pointer to struct of port to send to */
1487struct sk_buff *pMessage) /* pointer to send-message */
1488{
1489 TXD *pTxd; /* the rxd to fill */
1490 TXD *pOldTxd;
1491 unsigned long Flags;
1492 SK_U64 PhysAddr;
1493 int BytesSend = pMessage->len;
1494
1495 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_TX_PROGRESS, ("X"));
1496
1497 spin_lock_irqsave(&pTxPort->TxDesRingLock, Flags);
1498#ifndef USE_TX_COMPLETE
1499 FreeTxDescriptors(pAC, pTxPort);
1500#endif
1501 if (pTxPort->TxdRingFree == 0) {
1502 /*
1503 ** no enough free descriptors in ring at the moment.
1504 ** Maybe free'ing some old one help?
1505 */
1506 FreeTxDescriptors(pAC, pTxPort);
1507 if (pTxPort->TxdRingFree == 0) {
1508 spin_unlock_irqrestore(&pTxPort->TxDesRingLock, Flags);
1509 SK_PNMI_CNT_NO_TX_BUF(pAC, pTxPort->PortIndex);
1510 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
1511 SK_DBGCAT_DRV_TX_PROGRESS,
1512 ("XmitFrame failed\n"));
1513 /*
1514 ** the desired message can not be sent
1515 ** Because tbusy seems to be set, the message
1516 ** should not be freed here. It will be used
1517 ** by the scheduler of the ethernet handler
1518 */
1519 return (-1);
1520 }
1521 }
1522
1523 /*
1524 ** If the passed socket buffer is of smaller MTU-size than 60,
1525 ** copy everything into new buffer and fill all bytes between
1526 ** the original packet end and the new packet end of 60 with 0x00.
1527 ** This is to resolve faulty padding by the HW with 0xaa bytes.
1528 */
1529 if (BytesSend < C_LEN_ETHERNET_MINSIZE) {
1530 if (skb_padto(pMessage, C_LEN_ETHERNET_MINSIZE)) {
1531 spin_unlock_irqrestore(&pTxPort->TxDesRingLock, Flags);
1532 return 0;
1533 }
1534 pMessage->len = C_LEN_ETHERNET_MINSIZE;
1535 }
1536
1537 /*
1538 ** advance head counter behind descriptor needed for this frame,
1539 ** so that needed descriptor is reserved from that on. The next
1540 ** action will be to add the passed buffer to the TX-descriptor
1541 */
1542 pTxd = pTxPort->pTxdRingHead;
1543 pTxPort->pTxdRingHead = pTxd->pNextTxd;
1544 pTxPort->TxdRingFree--;
1545
1546#ifdef SK_DUMP_TX
1547 DumpMsg(pMessage, "XmitFrame");
1548#endif
1549
1550 /*
1551 ** First step is to map the data to be sent via the adapter onto
1552 ** the DMA memory. Kernel 2.2 uses virt_to_bus(), but kernels 2.4
1553 ** and 2.6 need to use pci_map_page() for that mapping.
1554 */
1555 PhysAddr = (SK_U64) pci_map_page(pAC->PciDev,
1556 virt_to_page(pMessage->data),
1557 ((unsigned long) pMessage->data & ~PAGE_MASK),
1558 pMessage->len,
1559 PCI_DMA_TODEVICE);
1560 pTxd->VDataLow = (SK_U32) (PhysAddr & 0xffffffff);
1561 pTxd->VDataHigh = (SK_U32) (PhysAddr >> 32);
1562 pTxd->pMBuf = pMessage;
1563
1564 if (pMessage->ip_summed == CHECKSUM_PARTIAL) {
1565 u16 hdrlen = skb_transport_offset(pMessage);
1566 u16 offset = hdrlen + pMessage->csum_offset;
1567
1568 if ((ipip_hdr(pMessage)->protocol == IPPROTO_UDP) &&
1569 (pAC->GIni.GIChipRev == 0) &&
1570 (pAC->GIni.GIChipId == CHIP_ID_YUKON)) {
1571 pTxd->TBControl = BMU_TCP_CHECK;
1572 } else {
1573 pTxd->TBControl = BMU_UDP_CHECK;
1574 }
1575
1576 pTxd->TcpSumOfs = 0;
1577 pTxd->TcpSumSt = hdrlen;
1578 pTxd->TcpSumWr = offset;
1579
1580 pTxd->TBControl |= BMU_OWN | BMU_STF |
1581 BMU_SW | BMU_EOF |
1582#ifdef USE_TX_COMPLETE
1583 BMU_IRQ_EOF |
1584#endif
1585 pMessage->len;
1586 } else {
1587 pTxd->TBControl = BMU_OWN | BMU_STF | BMU_CHECK |
1588 BMU_SW | BMU_EOF |
1589#ifdef USE_TX_COMPLETE
1590 BMU_IRQ_EOF |
1591#endif
1592 pMessage->len;
1593 }
1594
1595 /*
1596 ** If previous descriptor already done, give TX start cmd
1597 */
1598 pOldTxd = xchg(&pTxPort->pTxdRingPrev, pTxd);
1599 if ((pOldTxd->TBControl & BMU_OWN) == 0) {
1600 SK_OUT8(pTxPort->HwAddr, Q_CSR, CSR_START);
1601 }
1602
1603 /*
1604 ** after releasing the lock, the skb may immediately be free'd
1605 */
1606 spin_unlock_irqrestore(&pTxPort->TxDesRingLock, Flags);
1607 if (pTxPort->TxdRingFree != 0) {
1608 return (BytesSend);
1609 } else {
1610 return (0);
1611 }
1612
1613} /* XmitFrame */
1614
1615/*****************************************************************************
1616 *
1617 * XmitFrameSG - fill one socket buffer into the transmit ring
1618 * (use SG and TCP/UDP hardware checksumming)
1619 *
1620 * Description:
1621 * This function puts a message into the transmit descriptor ring
1622 * if there is a descriptors left.
1623 *
1624 * Returns:
1625 * > 0 - on succes: the number of bytes in the message
1626 * = 0 - on resource shortage: this frame sent or dropped, now
1627 * the ring is full ( -> set tbusy)
1628 * < 0 - on failure: other problems ( -> return failure to upper layers)
1629 */
1630static int XmitFrameSG(
1631SK_AC *pAC, /* pointer to adapter context */
1632TX_PORT *pTxPort, /* pointer to struct of port to send to */
1633struct sk_buff *pMessage) /* pointer to send-message */
1634{
1635
1636 TXD *pTxd;
1637 TXD *pTxdFst;
1638 TXD *pTxdLst;
1639 int CurrFrag;
1640 int BytesSend;
1641 skb_frag_t *sk_frag;
1642 SK_U64 PhysAddr;
1643 unsigned long Flags;
1644 SK_U32 Control;
1645
1646 spin_lock_irqsave(&pTxPort->TxDesRingLock, Flags);
1647#ifndef USE_TX_COMPLETE
1648 FreeTxDescriptors(pAC, pTxPort);
1649#endif
1650 if ((skb_shinfo(pMessage)->nr_frags +1) > pTxPort->TxdRingFree) {
1651 FreeTxDescriptors(pAC, pTxPort);
1652 if ((skb_shinfo(pMessage)->nr_frags + 1) > pTxPort->TxdRingFree) {
1653 spin_unlock_irqrestore(&pTxPort->TxDesRingLock, Flags);
1654 SK_PNMI_CNT_NO_TX_BUF(pAC, pTxPort->PortIndex);
1655 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
1656 SK_DBGCAT_DRV_TX_PROGRESS,
1657 ("XmitFrameSG failed - Ring full\n"));
1658 /* this message can not be sent now */
1659 return(-1);
1660 }
1661 }
1662
1663 pTxd = pTxPort->pTxdRingHead;
1664 pTxdFst = pTxd;
1665 pTxdLst = pTxd;
1666 BytesSend = 0;
1667
1668 /*
1669 ** Map the first fragment (header) into the DMA-space
1670 */
1671 PhysAddr = (SK_U64) pci_map_page(pAC->PciDev,
1672 virt_to_page(pMessage->data),
1673 ((unsigned long) pMessage->data & ~PAGE_MASK),
1674 skb_headlen(pMessage),
1675 PCI_DMA_TODEVICE);
1676
1677 pTxd->VDataLow = (SK_U32) (PhysAddr & 0xffffffff);
1678 pTxd->VDataHigh = (SK_U32) (PhysAddr >> 32);
1679
1680 /*
1681 ** Does the HW need to evaluate checksum for TCP or UDP packets?
1682 */
1683 if (pMessage->ip_summed == CHECKSUM_PARTIAL) {
1684 u16 hdrlen = skb_transport_offset(pMessage);
1685 u16 offset = hdrlen + pMessage->csum_offset;
1686
1687 Control = BMU_STFWD;
1688
1689 /*
1690 ** We have to use the opcode for tcp here, because the
1691 ** opcode for udp is not working in the hardware yet
1692 ** (Revision 2.0)
1693 */
1694 if ((ipip_hdr(pMessage)->protocol == IPPROTO_UDP) &&
1695 (pAC->GIni.GIChipRev == 0) &&
1696 (pAC->GIni.GIChipId == CHIP_ID_YUKON)) {
1697 Control |= BMU_TCP_CHECK;
1698 } else {
1699 Control |= BMU_UDP_CHECK;
1700 }
1701
1702 pTxd->TcpSumOfs = 0;
1703 pTxd->TcpSumSt = hdrlen;
1704 pTxd->TcpSumWr = offset;
1705 } else
1706 Control = BMU_CHECK | BMU_SW;
1707
1708 pTxd->TBControl = BMU_STF | Control | skb_headlen(pMessage);
1709
1710 pTxd = pTxd->pNextTxd;
1711 pTxPort->TxdRingFree--;
1712 BytesSend += skb_headlen(pMessage);
1713
1714 /*
1715 ** Browse over all SG fragments and map each of them into the DMA space
1716 */
1717 for (CurrFrag = 0; CurrFrag < skb_shinfo(pMessage)->nr_frags; CurrFrag++) {
1718 sk_frag = &skb_shinfo(pMessage)->frags[CurrFrag];
1719 /*
1720 ** we already have the proper value in entry
1721 */
1722 PhysAddr = (SK_U64) pci_map_page(pAC->PciDev,
1723 sk_frag->page,
1724 sk_frag->page_offset,
1725 sk_frag->size,
1726 PCI_DMA_TODEVICE);
1727
1728 pTxd->VDataLow = (SK_U32) (PhysAddr & 0xffffffff);
1729 pTxd->VDataHigh = (SK_U32) (PhysAddr >> 32);
1730 pTxd->pMBuf = pMessage;
1731
1732 pTxd->TBControl = Control | BMU_OWN | sk_frag->size;
1733
1734 /*
1735 ** Do we have the last fragment?
1736 */
1737 if( (CurrFrag+1) == skb_shinfo(pMessage)->nr_frags ) {
1738#ifdef USE_TX_COMPLETE
1739 pTxd->TBControl |= BMU_EOF | BMU_IRQ_EOF;
1740#else
1741 pTxd->TBControl |= BMU_EOF;
1742#endif
1743 pTxdFst->TBControl |= BMU_OWN | BMU_SW;
1744 }
1745 pTxdLst = pTxd;
1746 pTxd = pTxd->pNextTxd;
1747 pTxPort->TxdRingFree--;
1748 BytesSend += sk_frag->size;
1749 }
1750
1751 /*
1752 ** If previous descriptor already done, give TX start cmd
1753 */
1754 if ((pTxPort->pTxdRingPrev->TBControl & BMU_OWN) == 0) {
1755 SK_OUT8(pTxPort->HwAddr, Q_CSR, CSR_START);
1756 }
1757
1758 pTxPort->pTxdRingPrev = pTxdLst;
1759 pTxPort->pTxdRingHead = pTxd;
1760
1761 spin_unlock_irqrestore(&pTxPort->TxDesRingLock, Flags);
1762
1763 if (pTxPort->TxdRingFree > 0) {
1764 return (BytesSend);
1765 } else {
1766 return (0);
1767 }
1768}
1769
1770/*****************************************************************************
1771 *
1772 * FreeTxDescriptors - release descriptors from the descriptor ring
1773 *
1774 * Description:
1775 * This function releases descriptors from a transmit ring if they
1776 * have been sent by the BMU.
1777 * If a descriptors is sent, it can be freed and the message can
1778 * be freed, too.
1779 * The SOFTWARE controllable bit is used to prevent running around a
1780 * completely free ring for ever. If this bit is no set in the
1781 * frame (by XmitFrame), this frame has never been sent or is
1782 * already freed.
1783 * The Tx descriptor ring lock must be held while calling this function !!!
1784 *
1785 * Returns:
1786 * none
1787 */
1788static void FreeTxDescriptors(
1789SK_AC *pAC, /* pointer to the adapter context */
1790TX_PORT *pTxPort) /* pointer to destination port structure */
1791{
1792TXD *pTxd; /* pointer to the checked descriptor */
1793TXD *pNewTail; /* pointer to 'end' of the ring */
1794SK_U32 Control; /* TBControl field of descriptor */
1795SK_U64 PhysAddr; /* address of DMA mapping */
1796
1797 pNewTail = pTxPort->pTxdRingTail;
1798 pTxd = pNewTail;
1799 /*
1800 ** loop forever; exits if BMU_SW bit not set in start frame
1801 ** or BMU_OWN bit set in any frame
1802 */
1803 while (1) {
1804 Control = pTxd->TBControl;
1805 if ((Control & BMU_SW) == 0) {
1806 /*
1807 ** software controllable bit is set in first
1808 ** fragment when given to BMU. Not set means that
1809 ** this fragment was never sent or is already
1810 ** freed ( -> ring completely free now).
1811 */
1812 pTxPort->pTxdRingTail = pTxd;
1813 netif_wake_queue(pAC->dev[pTxPort->PortIndex]);
1814 return;
1815 }
1816 if (Control & BMU_OWN) {
1817 pTxPort->pTxdRingTail = pTxd;
1818 if (pTxPort->TxdRingFree > 0) {
1819 netif_wake_queue(pAC->dev[pTxPort->PortIndex]);
1820 }
1821 return;
1822 }
1823
1824 /*
1825 ** release the DMA mapping, because until not unmapped
1826 ** this buffer is considered being under control of the
1827 ** adapter card!
1828 */
1829 PhysAddr = ((SK_U64) pTxd->VDataHigh) << (SK_U64) 32;
1830 PhysAddr |= (SK_U64) pTxd->VDataLow;
1831 pci_unmap_page(pAC->PciDev, PhysAddr,
1832 pTxd->pMBuf->len,
1833 PCI_DMA_TODEVICE);
1834
1835 if (Control & BMU_EOF)
1836 DEV_KFREE_SKB_ANY(pTxd->pMBuf); /* free message */
1837
1838 pTxPort->TxdRingFree++;
1839 pTxd->TBControl &= ~BMU_SW;
1840 pTxd = pTxd->pNextTxd; /* point behind fragment with EOF */
1841 } /* while(forever) */
1842} /* FreeTxDescriptors */
1843
1844/*****************************************************************************
1845 *
1846 * FillRxRing - fill the receive ring with valid descriptors
1847 *
1848 * Description:
1849 * This function fills the receive ring descriptors with data
1850 * segments and makes them valid for the BMU.
1851 * The active ring is filled completely, if possible.
1852 * The non-active ring is filled only partial to save memory.
1853 *
1854 * Description of rx ring structure:
1855 * head - points to the descriptor which will be used next by the BMU
1856 * tail - points to the next descriptor to give to the BMU
1857 *
1858 * Returns: N/A
1859 */
1860static void FillRxRing(
1861SK_AC *pAC, /* pointer to the adapter context */
1862RX_PORT *pRxPort) /* ptr to port struct for which the ring
1863 should be filled */
1864{
1865unsigned long Flags;
1866
1867 spin_lock_irqsave(&pRxPort->RxDesRingLock, Flags);
1868 while (pRxPort->RxdRingFree > pRxPort->RxFillLimit) {
1869 if(!FillRxDescriptor(pAC, pRxPort))
1870 break;
1871 }
1872 spin_unlock_irqrestore(&pRxPort->RxDesRingLock, Flags);
1873} /* FillRxRing */
1874
1875
1876/*****************************************************************************
1877 *
1878 * FillRxDescriptor - fill one buffer into the receive ring
1879 *
1880 * Description:
1881 * The function allocates a new receive buffer and
1882 * puts it into the next descriptor.
1883 *
1884 * Returns:
1885 * SK_TRUE - a buffer was added to the ring
1886 * SK_FALSE - a buffer could not be added
1887 */
1888static SK_BOOL FillRxDescriptor(
1889SK_AC *pAC, /* pointer to the adapter context struct */
1890RX_PORT *pRxPort) /* ptr to port struct of ring to fill */
1891{
1892struct sk_buff *pMsgBlock; /* pointer to a new message block */
1893RXD *pRxd; /* the rxd to fill */
1894SK_U16 Length; /* data fragment length */
1895SK_U64 PhysAddr; /* physical address of a rx buffer */
1896
1897 pMsgBlock = alloc_skb(pAC->RxBufSize, GFP_ATOMIC);
1898 if (pMsgBlock == NULL) {
1899 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
1900 SK_DBGCAT_DRV_ENTRY,
1901 ("%s: Allocation of rx buffer failed !\n",
1902 pAC->dev[pRxPort->PortIndex]->name));
1903 SK_PNMI_CNT_NO_RX_BUF(pAC, pRxPort->PortIndex);
1904 return(SK_FALSE);
1905 }
1906 skb_reserve(pMsgBlock, 2); /* to align IP frames */
1907 /* skb allocated ok, so add buffer */
1908 pRxd = pRxPort->pRxdRingTail;
1909 pRxPort->pRxdRingTail = pRxd->pNextRxd;
1910 pRxPort->RxdRingFree--;
1911 Length = pAC->RxBufSize;
1912 PhysAddr = (SK_U64) pci_map_page(pAC->PciDev,
1913 virt_to_page(pMsgBlock->data),
1914 ((unsigned long) pMsgBlock->data &
1915 ~PAGE_MASK),
1916 pAC->RxBufSize - 2,
1917 PCI_DMA_FROMDEVICE);
1918
1919 pRxd->VDataLow = (SK_U32) (PhysAddr & 0xffffffff);
1920 pRxd->VDataHigh = (SK_U32) (PhysAddr >> 32);
1921 pRxd->pMBuf = pMsgBlock;
1922 pRxd->RBControl = BMU_OWN |
1923 BMU_STF |
1924 BMU_IRQ_EOF |
1925 BMU_TCP_CHECK |
1926 Length;
1927 return (SK_TRUE);
1928
1929} /* FillRxDescriptor */
1930
1931
1932/*****************************************************************************
1933 *
1934 * ReQueueRxBuffer - fill one buffer back into the receive ring
1935 *
1936 * Description:
1937 * Fill a given buffer back into the rx ring. The buffer
1938 * has been previously allocated and aligned, and its phys.
1939 * address calculated, so this is no more necessary.
1940 *
1941 * Returns: N/A
1942 */
1943static void ReQueueRxBuffer(
1944SK_AC *pAC, /* pointer to the adapter context struct */
1945RX_PORT *pRxPort, /* ptr to port struct of ring to fill */
1946struct sk_buff *pMsg, /* pointer to the buffer */
1947SK_U32 PhysHigh, /* phys address high dword */
1948SK_U32 PhysLow) /* phys address low dword */
1949{
1950RXD *pRxd; /* the rxd to fill */
1951SK_U16 Length; /* data fragment length */
1952
1953 pRxd = pRxPort->pRxdRingTail;
1954 pRxPort->pRxdRingTail = pRxd->pNextRxd;
1955 pRxPort->RxdRingFree--;
1956 Length = pAC->RxBufSize;
1957
1958 pRxd->VDataLow = PhysLow;
1959 pRxd->VDataHigh = PhysHigh;
1960 pRxd->pMBuf = pMsg;
1961 pRxd->RBControl = BMU_OWN |
1962 BMU_STF |
1963 BMU_IRQ_EOF |
1964 BMU_TCP_CHECK |
1965 Length;
1966 return;
1967} /* ReQueueRxBuffer */
1968
1969/*****************************************************************************
1970 *
1971 * ReceiveIrq - handle a receive IRQ
1972 *
1973 * Description:
1974 * This function is called when a receive IRQ is set.
1975 * It walks the receive descriptor ring and sends up all
1976 * frames that are complete.
1977 *
1978 * Returns: N/A
1979 */
1980static void ReceiveIrq(
1981 SK_AC *pAC, /* pointer to adapter context */
1982 RX_PORT *pRxPort, /* pointer to receive port struct */
1983 SK_BOOL SlowPathLock) /* indicates if SlowPathLock is needed */
1984{
1985RXD *pRxd; /* pointer to receive descriptors */
1986SK_U32 Control; /* control field of descriptor */
1987struct sk_buff *pMsg; /* pointer to message holding frame */
1988struct sk_buff *pNewMsg; /* pointer to a new message for copying frame */
1989int FrameLength; /* total length of received frame */
1990SK_MBUF *pRlmtMbuf; /* ptr to a buffer for giving a frame to rlmt */
1991SK_EVPARA EvPara; /* an event parameter union */
1992unsigned long Flags; /* for spin lock */
1993int PortIndex = pRxPort->PortIndex;
1994unsigned int Offset;
1995unsigned int NumBytes;
1996unsigned int ForRlmt;
1997SK_BOOL IsBc;
1998SK_BOOL IsMc;
1999SK_BOOL IsBadFrame; /* Bad frame */
2000
2001SK_U32 FrameStat;
2002SK_U64 PhysAddr;
2003
2004rx_start:
2005 /* do forever; exit if BMU_OWN found */
2006 for ( pRxd = pRxPort->pRxdRingHead ;
2007 pRxPort->RxdRingFree < pAC->RxDescrPerRing ;
2008 pRxd = pRxd->pNextRxd,
2009 pRxPort->pRxdRingHead = pRxd,
2010 pRxPort->RxdRingFree ++) {
2011
2012 /*
2013 * For a better understanding of this loop
2014 * Go through every descriptor beginning at the head
2015 * Please note: the ring might be completely received so the OWN bit
2016 * set is not a good crirteria to leave that loop.
2017 * Therefore the RingFree counter is used.
2018 * On entry of this loop pRxd is a pointer to the Rxd that needs
2019 * to be checked next.
2020 */
2021
2022 Control = pRxd->RBControl;
2023
2024 /* check if this descriptor is ready */
2025 if ((Control & BMU_OWN) != 0) {
2026 /* this descriptor is not yet ready */
2027 /* This is the usual end of the loop */
2028 /* We don't need to start the ring again */
2029 FillRxRing(pAC, pRxPort);
2030 return;
2031 }
2032 pAC->DynIrqModInfo.NbrProcessedDescr++;
2033
2034 /* get length of frame and check it */
2035 FrameLength = Control & BMU_BBC;
2036 if (FrameLength > pAC->RxBufSize) {
2037 goto rx_failed;
2038 }
2039
2040 /* check for STF and EOF */
2041 if ((Control & (BMU_STF | BMU_EOF)) != (BMU_STF | BMU_EOF)) {
2042 goto rx_failed;
2043 }
2044
2045 /* here we have a complete frame in the ring */
2046 pMsg = pRxd->pMBuf;
2047
2048 FrameStat = pRxd->FrameStat;
2049
2050 /* check for frame length mismatch */
2051#define XMR_FS_LEN_SHIFT 18
2052#define GMR_FS_LEN_SHIFT 16
2053 if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
2054 if (FrameLength != (SK_U32) (FrameStat >> XMR_FS_LEN_SHIFT)) {
2055 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
2056 SK_DBGCAT_DRV_RX_PROGRESS,
2057 ("skge: Frame length mismatch (%u/%u).\n",
2058 FrameLength,
2059 (SK_U32) (FrameStat >> XMR_FS_LEN_SHIFT)));
2060 goto rx_failed;
2061 }
2062 }
2063 else {
2064 if (FrameLength != (SK_U32) (FrameStat >> GMR_FS_LEN_SHIFT)) {
2065 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
2066 SK_DBGCAT_DRV_RX_PROGRESS,
2067 ("skge: Frame length mismatch (%u/%u).\n",
2068 FrameLength,
2069 (SK_U32) (FrameStat >> XMR_FS_LEN_SHIFT)));
2070 goto rx_failed;
2071 }
2072 }
2073
2074 /* Set Rx Status */
2075 if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
2076 IsBc = (FrameStat & XMR_FS_BC) != 0;
2077 IsMc = (FrameStat & XMR_FS_MC) != 0;
2078 IsBadFrame = (FrameStat &
2079 (XMR_FS_ANY_ERR | XMR_FS_2L_VLAN)) != 0;
2080 } else {
2081 IsBc = (FrameStat & GMR_FS_BC) != 0;
2082 IsMc = (FrameStat & GMR_FS_MC) != 0;
2083 IsBadFrame = (((FrameStat & GMR_FS_ANY_ERR) != 0) ||
2084 ((FrameStat & GMR_FS_RX_OK) == 0));
2085 }
2086
2087 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 0,
2088 ("Received frame of length %d on port %d\n",
2089 FrameLength, PortIndex));
2090 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 0,
2091 ("Number of free rx descriptors: %d\n",
2092 pRxPort->RxdRingFree));
2093/* DumpMsg(pMsg, "Rx"); */
2094
2095 if ((Control & BMU_STAT_VAL) != BMU_STAT_VAL || (IsBadFrame)) {
2096#if 0
2097 (FrameStat & (XMR_FS_ANY_ERR | XMR_FS_2L_VLAN)) != 0) {
2098#endif
2099 /* there is a receive error in this frame */
2100 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
2101 SK_DBGCAT_DRV_RX_PROGRESS,
2102 ("skge: Error in received frame, dropped!\n"
2103 "Control: %x\nRxStat: %x\n",
2104 Control, FrameStat));
2105
2106 ReQueueRxBuffer(pAC, pRxPort, pMsg,
2107 pRxd->VDataHigh, pRxd->VDataLow);
2108
2109 continue;
2110 }
2111
2112 /*
2113 * if short frame then copy data to reduce memory waste
2114 */
2115 if ((FrameLength < SK_COPY_THRESHOLD) &&
2116 ((pNewMsg = alloc_skb(FrameLength+2, GFP_ATOMIC)) != NULL)) {
2117 /*
2118 * Short frame detected and allocation successfull
2119 */
2120 /* use new skb and copy data */
2121 skb_reserve(pNewMsg, 2);
2122 skb_put(pNewMsg, FrameLength);
2123 PhysAddr = ((SK_U64) pRxd->VDataHigh) << (SK_U64)32;
2124 PhysAddr |= (SK_U64) pRxd->VDataLow;
2125
2126 pci_dma_sync_single_for_cpu(pAC->PciDev,
2127 (dma_addr_t) PhysAddr,
2128 FrameLength,
2129 PCI_DMA_FROMDEVICE);
2130 skb_copy_to_linear_data(pNewMsg, pMsg, FrameLength);
2131
2132 pci_dma_sync_single_for_device(pAC->PciDev,
2133 (dma_addr_t) PhysAddr,
2134 FrameLength,
2135 PCI_DMA_FROMDEVICE);
2136 ReQueueRxBuffer(pAC, pRxPort, pMsg,
2137 pRxd->VDataHigh, pRxd->VDataLow);
2138
2139 pMsg = pNewMsg;
2140
2141 }
2142 else {
2143 /*
2144 * if large frame, or SKB allocation failed, pass
2145 * the SKB directly to the networking
2146 */
2147
2148 PhysAddr = ((SK_U64) pRxd->VDataHigh) << (SK_U64)32;
2149 PhysAddr |= (SK_U64) pRxd->VDataLow;
2150
2151 /* release the DMA mapping */
2152 pci_unmap_single(pAC->PciDev,
2153 PhysAddr,
2154 pAC->RxBufSize - 2,
2155 PCI_DMA_FROMDEVICE);
2156
2157 /* set length in message */
2158 skb_put(pMsg, FrameLength);
2159 } /* frame > SK_COPY_TRESHOLD */
2160
2161#ifdef USE_SK_RX_CHECKSUM
2162 pMsg->csum = pRxd->TcpSums & 0xffff;
2163 pMsg->ip_summed = CHECKSUM_COMPLETE;
2164#else
2165 pMsg->ip_summed = CHECKSUM_NONE;
2166#endif
2167
2168 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("V"));
2169 ForRlmt = SK_RLMT_RX_PROTOCOL;
2170#if 0
2171 IsBc = (FrameStat & XMR_FS_BC)==XMR_FS_BC;
2172#endif
2173 SK_RLMT_PRE_LOOKAHEAD(pAC, PortIndex, FrameLength,
2174 IsBc, &Offset, &NumBytes);
2175 if (NumBytes != 0) {
2176#if 0
2177 IsMc = (FrameStat & XMR_FS_MC)==XMR_FS_MC;
2178#endif
2179 SK_RLMT_LOOKAHEAD(pAC, PortIndex,
2180 &pMsg->data[Offset],
2181 IsBc, IsMc, &ForRlmt);
2182 }
2183 if (ForRlmt == SK_RLMT_RX_PROTOCOL) {
2184 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("W"));
2185 /* send up only frames from active port */
2186 if ((PortIndex == pAC->ActivePort) ||
2187 (pAC->RlmtNets == 2)) {
2188 /* frame for upper layer */
2189 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("U"));
2190#ifdef xDEBUG
2191 DumpMsg(pMsg, "Rx");
2192#endif
2193 SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC,
2194 FrameLength, pRxPort->PortIndex);
2195
2196 pMsg->protocol = eth_type_trans(pMsg,
2197 pAC->dev[pRxPort->PortIndex]);
2198 netif_rx(pMsg);
2199 pAC->dev[pRxPort->PortIndex]->last_rx = jiffies;
2200 }
2201 else {
2202 /* drop frame */
2203 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
2204 SK_DBGCAT_DRV_RX_PROGRESS,
2205 ("D"));
2206 DEV_KFREE_SKB(pMsg);
2207 }
2208
2209 } /* if not for rlmt */
2210 else {
2211 /* packet for rlmt */
2212 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
2213 SK_DBGCAT_DRV_RX_PROGRESS, ("R"));
2214 pRlmtMbuf = SkDrvAllocRlmtMbuf(pAC,
2215 pAC->IoBase, FrameLength);
2216 if (pRlmtMbuf != NULL) {
2217 pRlmtMbuf->pNext = NULL;
2218 pRlmtMbuf->Length = FrameLength;
2219 pRlmtMbuf->PortIdx = PortIndex;
2220 EvPara.pParaPtr = pRlmtMbuf;
2221 memcpy((char*)(pRlmtMbuf->pData),
2222 (char*)(pMsg->data),
2223 FrameLength);
2224
2225 /* SlowPathLock needed? */
2226 if (SlowPathLock == SK_TRUE) {
2227 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
2228 SkEventQueue(pAC, SKGE_RLMT,
2229 SK_RLMT_PACKET_RECEIVED,
2230 EvPara);
2231 pAC->CheckQueue = SK_TRUE;
2232 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
2233 } else {
2234 SkEventQueue(pAC, SKGE_RLMT,
2235 SK_RLMT_PACKET_RECEIVED,
2236 EvPara);
2237 pAC->CheckQueue = SK_TRUE;
2238 }
2239
2240 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
2241 SK_DBGCAT_DRV_RX_PROGRESS,
2242 ("Q"));
2243 }
2244 if ((pAC->dev[pRxPort->PortIndex]->flags &
2245 (IFF_PROMISC | IFF_ALLMULTI)) != 0 ||
2246 (ForRlmt & SK_RLMT_RX_PROTOCOL) ==
2247 SK_RLMT_RX_PROTOCOL) {
2248 pMsg->protocol = eth_type_trans(pMsg,
2249 pAC->dev[pRxPort->PortIndex]);
2250 netif_rx(pMsg);
2251 pAC->dev[pRxPort->PortIndex]->last_rx = jiffies;
2252 }
2253 else {
2254 DEV_KFREE_SKB(pMsg);
2255 }
2256
2257 } /* if packet for rlmt */
2258 } /* for ... scanning the RXD ring */
2259
2260 /* RXD ring is empty -> fill and restart */
2261 FillRxRing(pAC, pRxPort);
2262 /* do not start if called from Close */
2263 if (pAC->BoardLevel > SK_INIT_DATA) {
2264 ClearAndStartRx(pAC, PortIndex);
2265 }
2266 return;
2267
2268rx_failed:
2269 /* remove error frame */
2270 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ERROR,
2271 ("Schrottdescriptor, length: 0x%x\n", FrameLength));
2272
2273 /* release the DMA mapping */
2274
2275 PhysAddr = ((SK_U64) pRxd->VDataHigh) << (SK_U64)32;
2276 PhysAddr |= (SK_U64) pRxd->VDataLow;
2277 pci_unmap_page(pAC->PciDev,
2278 PhysAddr,
2279 pAC->RxBufSize - 2,
2280 PCI_DMA_FROMDEVICE);
2281 DEV_KFREE_SKB_IRQ(pRxd->pMBuf);
2282 pRxd->pMBuf = NULL;
2283 pRxPort->RxdRingFree++;
2284 pRxPort->pRxdRingHead = pRxd->pNextRxd;
2285 goto rx_start;
2286
2287} /* ReceiveIrq */
2288
2289
2290/*****************************************************************************
2291 *
2292 * ClearAndStartRx - give a start receive command to BMU, clear IRQ
2293 *
2294 * Description:
2295 * This function sends a start command and a clear interrupt
2296 * command for one receive queue to the BMU.
2297 *
2298 * Returns: N/A
2299 * none
2300 */
2301static void ClearAndStartRx(
2302SK_AC *pAC, /* pointer to the adapter context */
2303int PortIndex) /* index of the receive port (XMAC) */
2304{
2305 SK_OUT8(pAC->IoBase,
2306 RxQueueAddr[PortIndex]+Q_CSR,
2307 CSR_START | CSR_IRQ_CL_F);
2308} /* ClearAndStartRx */
2309
2310
2311/*****************************************************************************
2312 *
2313 * ClearTxIrq - give a clear transmit IRQ command to BMU
2314 *
2315 * Description:
2316 * This function sends a clear tx IRQ command for one
2317 * transmit queue to the BMU.
2318 *
2319 * Returns: N/A
2320 */
2321static void ClearTxIrq(
2322SK_AC *pAC, /* pointer to the adapter context */
2323int PortIndex, /* index of the transmit port (XMAC) */
2324int Prio) /* priority or normal queue */
2325{
2326 SK_OUT8(pAC->IoBase,
2327 TxQueueAddr[PortIndex][Prio]+Q_CSR,
2328 CSR_IRQ_CL_F);
2329} /* ClearTxIrq */
2330
2331
2332/*****************************************************************************
2333 *
2334 * ClearRxRing - remove all buffers from the receive ring
2335 *
2336 * Description:
2337 * This function removes all receive buffers from the ring.
2338 * The receive BMU must be stopped before calling this function.
2339 *
2340 * Returns: N/A
2341 */
2342static void ClearRxRing(
2343SK_AC *pAC, /* pointer to adapter context */
2344RX_PORT *pRxPort) /* pointer to rx port struct */
2345{
2346RXD *pRxd; /* pointer to the current descriptor */
2347unsigned long Flags;
2348SK_U64 PhysAddr;
2349
2350 if (pRxPort->RxdRingFree == pAC->RxDescrPerRing) {
2351 return;
2352 }
2353 spin_lock_irqsave(&pRxPort->RxDesRingLock, Flags);
2354 pRxd = pRxPort->pRxdRingHead;
2355 do {
2356 if (pRxd->pMBuf != NULL) {
2357
2358 PhysAddr = ((SK_U64) pRxd->VDataHigh) << (SK_U64)32;
2359 PhysAddr |= (SK_U64) pRxd->VDataLow;
2360 pci_unmap_page(pAC->PciDev,
2361 PhysAddr,
2362 pAC->RxBufSize - 2,
2363 PCI_DMA_FROMDEVICE);
2364 DEV_KFREE_SKB(pRxd->pMBuf);
2365 pRxd->pMBuf = NULL;
2366 }
2367 pRxd->RBControl &= BMU_OWN;
2368 pRxd = pRxd->pNextRxd;
2369 pRxPort->RxdRingFree++;
2370 } while (pRxd != pRxPort->pRxdRingTail);
2371 pRxPort->pRxdRingTail = pRxPort->pRxdRingHead;
2372 spin_unlock_irqrestore(&pRxPort->RxDesRingLock, Flags);
2373} /* ClearRxRing */
2374
2375/*****************************************************************************
2376 *
2377 * ClearTxRing - remove all buffers from the transmit ring
2378 *
2379 * Description:
2380 * This function removes all transmit buffers from the ring.
2381 * The transmit BMU must be stopped before calling this function
2382 * and transmitting at the upper level must be disabled.
2383 * The BMU own bit of all descriptors is cleared, the rest is
2384 * done by calling FreeTxDescriptors.
2385 *
2386 * Returns: N/A
2387 */
2388static void ClearTxRing(
2389SK_AC *pAC, /* pointer to adapter context */
2390TX_PORT *pTxPort) /* pointer to tx prt struct */
2391{
2392TXD *pTxd; /* pointer to the current descriptor */
2393int i;
2394unsigned long Flags;
2395
2396 spin_lock_irqsave(&pTxPort->TxDesRingLock, Flags);
2397 pTxd = pTxPort->pTxdRingHead;
2398 for (i=0; i<pAC->TxDescrPerRing; i++) {
2399 pTxd->TBControl &= ~BMU_OWN;
2400 pTxd = pTxd->pNextTxd;
2401 }
2402 FreeTxDescriptors(pAC, pTxPort);
2403 spin_unlock_irqrestore(&pTxPort->TxDesRingLock, Flags);
2404} /* ClearTxRing */
2405
2406/*****************************************************************************
2407 *
2408 * SkGeSetMacAddr - Set the hardware MAC address
2409 *
2410 * Description:
2411 * This function sets the MAC address used by the adapter.
2412 *
2413 * Returns:
2414 * 0, if everything is ok
2415 * !=0, on error
2416 */
2417static int SkGeSetMacAddr(struct SK_NET_DEVICE *dev, void *p)
2418{
2419
2420DEV_NET *pNet = netdev_priv(dev);
2421SK_AC *pAC = pNet->pAC;
2422
2423struct sockaddr *addr = p;
2424unsigned long Flags;
2425
2426 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
2427 ("SkGeSetMacAddr starts now...\n"));
2428 if(netif_running(dev))
2429 return -EBUSY;
2430
2431 memcpy(dev->dev_addr, addr->sa_data,dev->addr_len);
2432
2433 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
2434
2435 if (pAC->RlmtNets == 2)
2436 SkAddrOverride(pAC, pAC->IoBase, pNet->NetNr,
2437 (SK_MAC_ADDR*)dev->dev_addr, SK_ADDR_VIRTUAL_ADDRESS);
2438 else
2439 SkAddrOverride(pAC, pAC->IoBase, pAC->ActivePort,
2440 (SK_MAC_ADDR*)dev->dev_addr, SK_ADDR_VIRTUAL_ADDRESS);
2441
2442
2443
2444 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
2445 return 0;
2446} /* SkGeSetMacAddr */
2447
2448
2449/*****************************************************************************
2450 *
2451 * SkGeSetRxMode - set receive mode
2452 *
2453 * Description:
2454 * This function sets the receive mode of an adapter. The adapter
2455 * supports promiscuous mode, allmulticast mode and a number of
2456 * multicast addresses. If more multicast addresses the available
2457 * are selected, a hash function in the hardware is used.
2458 *
2459 * Returns:
2460 * 0, if everything is ok
2461 * !=0, on error
2462 */
2463static void SkGeSetRxMode(struct SK_NET_DEVICE *dev)
2464{
2465
2466DEV_NET *pNet;
2467SK_AC *pAC;
2468
2469struct dev_mc_list *pMcList;
2470int i;
2471int PortIdx;
2472unsigned long Flags;
2473
2474 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
2475 ("SkGeSetRxMode starts now... "));
2476
2477 pNet = netdev_priv(dev);
2478 pAC = pNet->pAC;
2479 if (pAC->RlmtNets == 1)
2480 PortIdx = pAC->ActivePort;
2481 else
2482 PortIdx = pNet->NetNr;
2483
2484 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
2485 if (dev->flags & IFF_PROMISC) {
2486 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
2487 ("PROMISCUOUS mode\n"));
2488 SkAddrPromiscuousChange(pAC, pAC->IoBase, PortIdx,
2489 SK_PROM_MODE_LLC);
2490 } else if (dev->flags & IFF_ALLMULTI) {
2491 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
2492 ("ALLMULTI mode\n"));
2493 SkAddrPromiscuousChange(pAC, pAC->IoBase, PortIdx,
2494 SK_PROM_MODE_ALL_MC);
2495 } else {
2496 SkAddrPromiscuousChange(pAC, pAC->IoBase, PortIdx,
2497 SK_PROM_MODE_NONE);
2498 SkAddrMcClear(pAC, pAC->IoBase, PortIdx, 0);
2499
2500 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
2501 ("Number of MC entries: %d ", dev->mc_count));
2502
2503 pMcList = dev->mc_list;
2504 for (i=0; i<dev->mc_count; i++, pMcList = pMcList->next) {
2505 SkAddrMcAdd(pAC, pAC->IoBase, PortIdx,
2506 (SK_MAC_ADDR*)pMcList->dmi_addr, 0);
2507 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_MCA,
2508 ("%02x:%02x:%02x:%02x:%02x:%02x\n",
2509 pMcList->dmi_addr[0],
2510 pMcList->dmi_addr[1],
2511 pMcList->dmi_addr[2],
2512 pMcList->dmi_addr[3],
2513 pMcList->dmi_addr[4],
2514 pMcList->dmi_addr[5]));
2515 }
2516 SkAddrMcUpdate(pAC, pAC->IoBase, PortIdx);
2517 }
2518 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
2519
2520 return;
2521} /* SkGeSetRxMode */
2522
2523
2524/*****************************************************************************
2525 *
2526 * SkGeChangeMtu - set the MTU to another value
2527 *
2528 * Description:
2529 * This function sets is called whenever the MTU size is changed
2530 * (ifconfig mtu xxx dev ethX). If the MTU is bigger than standard
2531 * ethernet MTU size, long frame support is activated.
2532 *
2533 * Returns:
2534 * 0, if everything is ok
2535 * !=0, on error
2536 */
2537static int SkGeChangeMtu(struct SK_NET_DEVICE *dev, int NewMtu)
2538{
2539DEV_NET *pNet;
2540struct net_device *pOtherDev;
2541SK_AC *pAC;
2542unsigned long Flags;
2543int i;
2544SK_EVPARA EvPara;
2545
2546 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
2547 ("SkGeChangeMtu starts now...\n"));
2548
2549 pNet = netdev_priv(dev);
2550 pAC = pNet->pAC;
2551
2552 if ((NewMtu < 68) || (NewMtu > SK_JUMBO_MTU)) {
2553 return -EINVAL;
2554 }
2555
2556 if(pAC->BoardLevel != SK_INIT_RUN) {
2557 return -EINVAL;
2558 }
2559
2560#ifdef SK_DIAG_SUPPORT
2561 if (pAC->DiagModeActive == DIAG_ACTIVE) {
2562 if (pAC->DiagFlowCtrl == SK_FALSE) {
2563 return -1; /* still in use, deny any actions of MTU */
2564 } else {
2565 pAC->DiagFlowCtrl = SK_FALSE;
2566 }
2567 }
2568#endif
2569
2570 pOtherDev = pAC->dev[1 - pNet->NetNr];
2571
2572 if ( netif_running(pOtherDev) && (pOtherDev->mtu > 1500)
2573 && (NewMtu <= 1500))
2574 return 0;
2575
2576 pAC->RxBufSize = NewMtu + 32;
2577 dev->mtu = NewMtu;
2578
2579 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
2580 ("New MTU: %d\n", NewMtu));
2581
2582 /*
2583 ** Prevent any reconfiguration while changing the MTU
2584 ** by disabling any interrupts
2585 */
2586 SK_OUT32(pAC->IoBase, B0_IMSK, 0);
2587 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
2588
2589 /*
2590 ** Notify RLMT that any ports are to be stopped
2591 */
2592 EvPara.Para32[0] = 0;
2593 EvPara.Para32[1] = -1;
2594 if ((pAC->GIni.GIMacsFound == 2 ) && (pAC->RlmtNets == 2)) {
2595 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
2596 EvPara.Para32[0] = 1;
2597 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
2598 } else {
2599 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
2600 }
2601
2602 /*
2603 ** After calling the SkEventDispatcher(), RLMT is aware about
2604 ** the stopped ports -> configuration can take place!
2605 */
2606 SkEventDispatcher(pAC, pAC->IoBase);
2607
2608 for (i=0; i<pAC->GIni.GIMacsFound; i++) {
2609 spin_lock(&pAC->TxPort[i][TX_PRIO_LOW].TxDesRingLock);
2610 netif_stop_queue(pAC->dev[i]);
2611
2612 }
2613
2614 /*
2615 ** Depending on the desired MTU size change, a different number of
2616 ** RX buffers need to be allocated
2617 */
2618 if (NewMtu > 1500) {
2619 /*
2620 ** Use less rx buffers
2621 */
2622 for (i=0; i<pAC->GIni.GIMacsFound; i++) {
2623 if ((pAC->GIni.GIMacsFound == 2 ) && (pAC->RlmtNets == 2)) {
2624 pAC->RxPort[i].RxFillLimit = pAC->RxDescrPerRing -
2625 (pAC->RxDescrPerRing / 4);
2626 } else {
2627 if (i == pAC->ActivePort) {
2628 pAC->RxPort[i].RxFillLimit = pAC->RxDescrPerRing -
2629 (pAC->RxDescrPerRing / 4);
2630 } else {
2631 pAC->RxPort[i].RxFillLimit = pAC->RxDescrPerRing -
2632 (pAC->RxDescrPerRing / 10);
2633 }
2634 }
2635 }
2636 } else {
2637 /*
2638 ** Use the normal amount of rx buffers
2639 */
2640 for (i=0; i<pAC->GIni.GIMacsFound; i++) {
2641 if ((pAC->GIni.GIMacsFound == 2 ) && (pAC->RlmtNets == 2)) {
2642 pAC->RxPort[i].RxFillLimit = 1;
2643 } else {
2644 if (i == pAC->ActivePort) {
2645 pAC->RxPort[i].RxFillLimit = 1;
2646 } else {
2647 pAC->RxPort[i].RxFillLimit = pAC->RxDescrPerRing -
2648 (pAC->RxDescrPerRing / 4);
2649 }
2650 }
2651 }
2652 }
2653
2654 SkGeDeInit(pAC, pAC->IoBase);
2655
2656 /*
2657 ** enable/disable hardware support for long frames
2658 */
2659 if (NewMtu > 1500) {
2660// pAC->JumboActivated = SK_TRUE; /* is never set back !!! */
2661 pAC->GIni.GIPortUsage = SK_JUMBO_LINK;
2662 } else {
2663 if ((pAC->GIni.GIMacsFound == 2 ) && (pAC->RlmtNets == 2)) {
2664 pAC->GIni.GIPortUsage = SK_MUL_LINK;
2665 } else {
2666 pAC->GIni.GIPortUsage = SK_RED_LINK;
2667 }
2668 }
2669
2670 SkGeInit( pAC, pAC->IoBase, SK_INIT_IO);
2671 SkI2cInit( pAC, pAC->IoBase, SK_INIT_IO);
2672 SkEventInit(pAC, pAC->IoBase, SK_INIT_IO);
2673 SkPnmiInit( pAC, pAC->IoBase, SK_INIT_IO);
2674 SkAddrInit( pAC, pAC->IoBase, SK_INIT_IO);
2675 SkRlmtInit( pAC, pAC->IoBase, SK_INIT_IO);
2676 SkTimerInit(pAC, pAC->IoBase, SK_INIT_IO);
2677
2678 /*
2679 ** tschilling:
2680 ** Speed and others are set back to default in level 1 init!
2681 */
2682 GetConfiguration(pAC);
2683
2684 SkGeInit( pAC, pAC->IoBase, SK_INIT_RUN);
2685 SkI2cInit( pAC, pAC->IoBase, SK_INIT_RUN);
2686 SkEventInit(pAC, pAC->IoBase, SK_INIT_RUN);
2687 SkPnmiInit( pAC, pAC->IoBase, SK_INIT_RUN);
2688 SkAddrInit( pAC, pAC->IoBase, SK_INIT_RUN);
2689 SkRlmtInit( pAC, pAC->IoBase, SK_INIT_RUN);
2690 SkTimerInit(pAC, pAC->IoBase, SK_INIT_RUN);
2691
2692 /*
2693 ** clear and reinit the rx rings here
2694 */
2695 for (i=0; i<pAC->GIni.GIMacsFound; i++) {
2696 ReceiveIrq(pAC, &pAC->RxPort[i], SK_TRUE);
2697 ClearRxRing(pAC, &pAC->RxPort[i]);
2698 FillRxRing(pAC, &pAC->RxPort[i]);
2699
2700 /*
2701 ** Enable transmit descriptor polling
2702 */
2703 SkGePollTxD(pAC, pAC->IoBase, i, SK_TRUE);
2704 FillRxRing(pAC, &pAC->RxPort[i]);
2705 };
2706
2707 SkGeYellowLED(pAC, pAC->IoBase, 1);
2708 SkDimEnableModerationIfNeeded(pAC);
2709 SkDimDisplayModerationSettings(pAC);
2710
2711 netif_start_queue(pAC->dev[pNet->PortNr]);
2712 for (i=pAC->GIni.GIMacsFound-1; i>=0; i--) {
2713 spin_unlock(&pAC->TxPort[i][TX_PRIO_LOW].TxDesRingLock);
2714 }
2715
2716 /*
2717 ** Enable Interrupts again
2718 */
2719 SK_OUT32(pAC->IoBase, B0_IMSK, pAC->GIni.GIValIrqMask);
2720 SK_OUT32(pAC->IoBase, B0_HWE_IMSK, IRQ_HWE_MASK);
2721
2722 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara);
2723 SkEventDispatcher(pAC, pAC->IoBase);
2724
2725 /*
2726 ** Notify RLMT about the changing and restarting one (or more) ports
2727 */
2728 if ((pAC->GIni.GIMacsFound == 2 ) && (pAC->RlmtNets == 2)) {
2729 EvPara.Para32[0] = pAC->RlmtNets;
2730 EvPara.Para32[1] = -1;
2731 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_SET_NETS, EvPara);
2732 EvPara.Para32[0] = pNet->PortNr;
2733 EvPara.Para32[1] = -1;
2734 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara);
2735
2736 if (netif_running(pOtherDev)) {
2737 DEV_NET *pOtherNet = netdev_priv(pOtherDev);
2738 EvPara.Para32[0] = pOtherNet->PortNr;
2739 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara);
2740 }
2741 } else {
2742 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara);
2743 }
2744
2745 SkEventDispatcher(pAC, pAC->IoBase);
2746 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
2747
2748 /*
2749 ** While testing this driver with latest kernel 2.5 (2.5.70), it
2750 ** seems as if upper layers have a problem to handle a successful
2751 ** return value of '0'. If such a zero is returned, the complete
2752 ** system hangs for several minutes (!), which is in acceptable.
2753 **
2754 ** Currently it is not clear, what the exact reason for this problem
2755 ** is. The implemented workaround for 2.5 is to return the desired
2756 ** new MTU size if all needed changes for the new MTU size where
2757 ** performed. In kernels 2.2 and 2.4, a zero value is returned,
2758 ** which indicates the successful change of the mtu-size.
2759 */
2760 return NewMtu;
2761
2762} /* SkGeChangeMtu */
2763
2764
2765/*****************************************************************************
2766 *
2767 * SkGeStats - return ethernet device statistics
2768 *
2769 * Description:
2770 * This function return statistic data about the ethernet device
2771 * to the operating system.
2772 *
2773 * Returns:
2774 * pointer to the statistic structure.
2775 */
2776static struct net_device_stats *SkGeStats(struct SK_NET_DEVICE *dev)
2777{
2778DEV_NET *pNet = netdev_priv(dev);
2779SK_AC *pAC = pNet->pAC;
2780SK_PNMI_STRUCT_DATA *pPnmiStruct; /* structure for all Pnmi-Data */
2781SK_PNMI_STAT *pPnmiStat; /* pointer to virtual XMAC stat. data */
2782SK_PNMI_CONF *pPnmiConf; /* pointer to virtual link config. */
2783unsigned int Size; /* size of pnmi struct */
2784unsigned long Flags; /* for spin lock */
2785
2786 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
2787 ("SkGeStats starts now...\n"));
2788 pPnmiStruct = &pAC->PnmiStruct;
2789
2790#ifdef SK_DIAG_SUPPORT
2791 if ((pAC->DiagModeActive == DIAG_NOTACTIVE) &&
2792 (pAC->BoardLevel == SK_INIT_RUN)) {
2793#endif
2794 SK_MEMSET(pPnmiStruct, 0, sizeof(SK_PNMI_STRUCT_DATA));
2795 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
2796 Size = SK_PNMI_STRUCT_SIZE;
2797 SkPnmiGetStruct(pAC, pAC->IoBase, pPnmiStruct, &Size, pNet->NetNr);
2798 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
2799#ifdef SK_DIAG_SUPPORT
2800 }
2801#endif
2802
2803 pPnmiStat = &pPnmiStruct->Stat[0];
2804 pPnmiConf = &pPnmiStruct->Conf[0];
2805
2806 pAC->stats.rx_packets = (SK_U32) pPnmiStruct->RxDeliveredCts & 0xFFFFFFFF;
2807 pAC->stats.tx_packets = (SK_U32) pPnmiStat->StatTxOkCts & 0xFFFFFFFF;
2808 pAC->stats.rx_bytes = (SK_U32) pPnmiStruct->RxOctetsDeliveredCts;
2809 pAC->stats.tx_bytes = (SK_U32) pPnmiStat->StatTxOctetsOkCts;
2810
2811 if (dev->mtu <= 1500) {
2812 pAC->stats.rx_errors = (SK_U32) pPnmiStruct->InErrorsCts & 0xFFFFFFFF;
2813 } else {
2814 pAC->stats.rx_errors = (SK_U32) ((pPnmiStruct->InErrorsCts -
2815 pPnmiStat->StatRxTooLongCts) & 0xFFFFFFFF);
2816 }
2817
2818
2819 if (pAC->GIni.GP[0].PhyType == SK_PHY_XMAC && pAC->HWRevision < 12)
2820 pAC->stats.rx_errors = pAC->stats.rx_errors - pPnmiStat->StatRxShortsCts;
2821
2822 pAC->stats.tx_errors = (SK_U32) pPnmiStat->StatTxSingleCollisionCts & 0xFFFFFFFF;
2823 pAC->stats.rx_dropped = (SK_U32) pPnmiStruct->RxNoBufCts & 0xFFFFFFFF;
2824 pAC->stats.tx_dropped = (SK_U32) pPnmiStruct->TxNoBufCts & 0xFFFFFFFF;
2825 pAC->stats.multicast = (SK_U32) pPnmiStat->StatRxMulticastOkCts & 0xFFFFFFFF;
2826 pAC->stats.collisions = (SK_U32) pPnmiStat->StatTxSingleCollisionCts & 0xFFFFFFFF;
2827
2828 /* detailed rx_errors: */
2829 pAC->stats.rx_length_errors = (SK_U32) pPnmiStat->StatRxRuntCts & 0xFFFFFFFF;
2830 pAC->stats.rx_over_errors = (SK_U32) pPnmiStat->StatRxFifoOverflowCts & 0xFFFFFFFF;
2831 pAC->stats.rx_crc_errors = (SK_U32) pPnmiStat->StatRxFcsCts & 0xFFFFFFFF;
2832 pAC->stats.rx_frame_errors = (SK_U32) pPnmiStat->StatRxFramingCts & 0xFFFFFFFF;
2833 pAC->stats.rx_fifo_errors = (SK_U32) pPnmiStat->StatRxFifoOverflowCts & 0xFFFFFFFF;
2834 pAC->stats.rx_missed_errors = (SK_U32) pPnmiStat->StatRxMissedCts & 0xFFFFFFFF;
2835
2836 /* detailed tx_errors */
2837 pAC->stats.tx_aborted_errors = (SK_U32) 0;
2838 pAC->stats.tx_carrier_errors = (SK_U32) pPnmiStat->StatTxCarrierCts & 0xFFFFFFFF;
2839 pAC->stats.tx_fifo_errors = (SK_U32) pPnmiStat->StatTxFifoUnderrunCts & 0xFFFFFFFF;
2840 pAC->stats.tx_heartbeat_errors = (SK_U32) pPnmiStat->StatTxCarrierCts & 0xFFFFFFFF;
2841 pAC->stats.tx_window_errors = (SK_U32) 0;
2842
2843 return(&pAC->stats);
2844} /* SkGeStats */
2845
2846/*
2847 * Basic MII register access
2848 */
2849static int SkGeMiiIoctl(struct net_device *dev,
2850 struct mii_ioctl_data *data, int cmd)
2851{
2852 DEV_NET *pNet = netdev_priv(dev);
2853 SK_AC *pAC = pNet->pAC;
2854 SK_IOC IoC = pAC->IoBase;
2855 int Port = pNet->PortNr;
2856 SK_GEPORT *pPrt = &pAC->GIni.GP[Port];
2857 unsigned long Flags;
2858 int err = 0;
2859 int reg = data->reg_num & 0x1f;
2860 SK_U16 val = data->val_in;
2861
2862 if (!netif_running(dev))
2863 return -ENODEV; /* Phy still in reset */
2864
2865 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
2866 switch(cmd) {
2867 case SIOCGMIIPHY:
2868 data->phy_id = pPrt->PhyAddr;
2869
2870 /* fallthru */
2871 case SIOCGMIIREG:
2872 if (pAC->GIni.GIGenesis)
2873 SkXmPhyRead(pAC, IoC, Port, reg, &val);
2874 else
2875 SkGmPhyRead(pAC, IoC, Port, reg, &val);
2876
2877 data->val_out = val;
2878 break;
2879
2880 case SIOCSMIIREG:
2881 if (!capable(CAP_NET_ADMIN))
2882 err = -EPERM;
2883
2884 else if (pAC->GIni.GIGenesis)
2885 SkXmPhyWrite(pAC, IoC, Port, reg, val);
2886 else
2887 SkGmPhyWrite(pAC, IoC, Port, reg, val);
2888 break;
2889 default:
2890 err = -EOPNOTSUPP;
2891 }
2892 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
2893 return err;
2894}
2895
2896
2897/*****************************************************************************
2898 *
2899 * SkGeIoctl - IO-control function
2900 *
2901 * Description:
2902 * This function is called if an ioctl is issued on the device.
2903 * There are three subfunction for reading, writing and test-writing
2904 * the private MIB data structure (useful for SysKonnect-internal tools).
2905 *
2906 * Returns:
2907 * 0, if everything is ok
2908 * !=0, on error
2909 */
2910static int SkGeIoctl(struct SK_NET_DEVICE *dev, struct ifreq *rq, int cmd)
2911{
2912DEV_NET *pNet;
2913SK_AC *pAC;
2914void *pMemBuf;
2915struct pci_dev *pdev = NULL;
2916SK_GE_IOCTL Ioctl;
2917unsigned int Err = 0;
2918int Size = 0;
2919int Ret = 0;
2920unsigned int Length = 0;
2921int HeaderLength = sizeof(SK_U32) + sizeof(SK_U32);
2922
2923 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
2924 ("SkGeIoctl starts now...\n"));
2925
2926 pNet = netdev_priv(dev);
2927 pAC = pNet->pAC;
2928
2929 if (cmd == SIOCGMIIPHY || cmd == SIOCSMIIREG || cmd == SIOCGMIIREG)
2930 return SkGeMiiIoctl(dev, if_mii(rq), cmd);
2931
2932 if(copy_from_user(&Ioctl, rq->ifr_data, sizeof(SK_GE_IOCTL))) {
2933 return -EFAULT;
2934 }
2935
2936 switch(cmd) {
2937 case SK_IOCTL_SETMIB:
2938 case SK_IOCTL_PRESETMIB:
2939 if (!capable(CAP_NET_ADMIN)) return -EPERM;
2940 case SK_IOCTL_GETMIB:
2941 if(copy_from_user(&pAC->PnmiStruct, Ioctl.pData,
2942 Ioctl.Len<sizeof(pAC->PnmiStruct)?
2943 Ioctl.Len : sizeof(pAC->PnmiStruct))) {
2944 return -EFAULT;
2945 }
2946 Size = SkGeIocMib(pNet, Ioctl.Len, cmd);
2947 if(copy_to_user(Ioctl.pData, &pAC->PnmiStruct,
2948 Ioctl.Len<Size? Ioctl.Len : Size)) {
2949 return -EFAULT;
2950 }
2951 Ioctl.Len = Size;
2952 if(copy_to_user(rq->ifr_data, &Ioctl, sizeof(SK_GE_IOCTL))) {
2953 return -EFAULT;
2954 }
2955 break;
2956 case SK_IOCTL_GEN:
2957 if (Ioctl.Len < (sizeof(pAC->PnmiStruct) + HeaderLength)) {
2958 Length = Ioctl.Len;
2959 } else {
2960 Length = sizeof(pAC->PnmiStruct) + HeaderLength;
2961 }
2962 if (NULL == (pMemBuf = kmalloc(Length, GFP_KERNEL))) {
2963 return -ENOMEM;
2964 }
2965 if(copy_from_user(pMemBuf, Ioctl.pData, Length)) {
2966 Err = -EFAULT;
2967 goto fault_gen;
2968 }
2969 if ((Ret = SkPnmiGenIoctl(pAC, pAC->IoBase, pMemBuf, &Length, 0)) < 0) {
2970 Err = -EFAULT;
2971 goto fault_gen;
2972 }
2973 if(copy_to_user(Ioctl.pData, pMemBuf, Length) ) {
2974 Err = -EFAULT;
2975 goto fault_gen;
2976 }
2977 Ioctl.Len = Length;
2978 if(copy_to_user(rq->ifr_data, &Ioctl, sizeof(SK_GE_IOCTL))) {
2979 Err = -EFAULT;
2980 goto fault_gen;
2981 }
2982fault_gen:
2983 kfree(pMemBuf); /* cleanup everything */
2984 break;
2985#ifdef SK_DIAG_SUPPORT
2986 case SK_IOCTL_DIAG:
2987 if (!capable(CAP_NET_ADMIN)) return -EPERM;
2988 if (Ioctl.Len < (sizeof(pAC->PnmiStruct) + HeaderLength)) {
2989 Length = Ioctl.Len;
2990 } else {
2991 Length = sizeof(pAC->PnmiStruct) + HeaderLength;
2992 }
2993 if (NULL == (pMemBuf = kmalloc(Length, GFP_KERNEL))) {
2994 return -ENOMEM;
2995 }
2996 if(copy_from_user(pMemBuf, Ioctl.pData, Length)) {
2997 Err = -EFAULT;
2998 goto fault_diag;
2999 }
3000 pdev = pAC->PciDev;
3001 Length = 3 * sizeof(SK_U32); /* Error, Bus and Device */
3002 /*
3003 ** While coding this new IOCTL interface, only a few lines of code
3004 ** are to to be added. Therefore no dedicated function has been
3005 ** added. If more functionality is added, a separate function
3006 ** should be used...
3007 */
3008 * ((SK_U32 *)pMemBuf) = 0;
3009 * ((SK_U32 *)pMemBuf + 1) = pdev->bus->number;
3010 * ((SK_U32 *)pMemBuf + 2) = ParseDeviceNbrFromSlotName(pci_name(pdev));
3011 if(copy_to_user(Ioctl.pData, pMemBuf, Length) ) {
3012 Err = -EFAULT;
3013 goto fault_diag;
3014 }
3015 Ioctl.Len = Length;
3016 if(copy_to_user(rq->ifr_data, &Ioctl, sizeof(SK_GE_IOCTL))) {
3017 Err = -EFAULT;
3018 goto fault_diag;
3019 }
3020fault_diag:
3021 kfree(pMemBuf); /* cleanup everything */
3022 break;
3023#endif
3024 default:
3025 Err = -EOPNOTSUPP;
3026 }
3027
3028 return(Err);
3029
3030} /* SkGeIoctl */
3031
3032
3033/*****************************************************************************
3034 *
3035 * SkGeIocMib - handle a GetMib, SetMib- or PresetMib-ioctl message
3036 *
3037 * Description:
3038 * This function reads/writes the MIB data using PNMI (Private Network
3039 * Management Interface).
3040 * The destination for the data must be provided with the
3041 * ioctl call and is given to the driver in the form of
3042 * a user space address.
3043 * Copying from the user-provided data area into kernel messages
3044 * and back is done by copy_from_user and copy_to_user calls in
3045 * SkGeIoctl.
3046 *
3047 * Returns:
3048 * returned size from PNMI call
3049 */
3050static int SkGeIocMib(
3051DEV_NET *pNet, /* pointer to the adapter context */
3052unsigned int Size, /* length of ioctl data */
3053int mode) /* flag for set/preset */
3054{
3055unsigned long Flags; /* for spin lock */
3056SK_AC *pAC;
3057
3058 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
3059 ("SkGeIocMib starts now...\n"));
3060 pAC = pNet->pAC;
3061 /* access MIB */
3062 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
3063 switch(mode) {
3064 case SK_IOCTL_GETMIB:
3065 SkPnmiGetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size,
3066 pNet->NetNr);
3067 break;
3068 case SK_IOCTL_PRESETMIB:
3069 SkPnmiPreSetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size,
3070 pNet->NetNr);
3071 break;
3072 case SK_IOCTL_SETMIB:
3073 SkPnmiSetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size,
3074 pNet->NetNr);
3075 break;
3076 default:
3077 break;
3078 }
3079 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
3080 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
3081 ("MIB data access succeeded\n"));
3082 return (Size);
3083} /* SkGeIocMib */
3084
3085
3086/*****************************************************************************
3087 *
3088 * GetConfiguration - read configuration information
3089 *
3090 * Description:
3091 * This function reads per-adapter configuration information from
3092 * the options provided on the command line.
3093 *
3094 * Returns:
3095 * none
3096 */
3097static void GetConfiguration(
3098SK_AC *pAC) /* pointer to the adapter context structure */
3099{
3100SK_I32 Port; /* preferred port */
3101SK_BOOL AutoSet;
3102SK_BOOL DupSet;
3103int LinkSpeed = SK_LSPEED_AUTO; /* Link speed */
3104int AutoNeg = 1; /* autoneg off (0) or on (1) */
3105int DuplexCap = 0; /* 0=both,1=full,2=half */
3106int FlowCtrl = SK_FLOW_MODE_SYM_OR_REM; /* FlowControl */
3107int MSMode = SK_MS_MODE_AUTO; /* master/slave mode */
3108
3109SK_BOOL IsConTypeDefined = SK_TRUE;
3110SK_BOOL IsLinkSpeedDefined = SK_TRUE;
3111SK_BOOL IsFlowCtrlDefined = SK_TRUE;
3112SK_BOOL IsRoleDefined = SK_TRUE;
3113SK_BOOL IsModeDefined = SK_TRUE;
3114/*
3115 * The two parameters AutoNeg. and DuplexCap. map to one configuration
3116 * parameter. The mapping is described by this table:
3117 * DuplexCap -> | both | full | half |
3118 * AutoNeg | | | |
3119 * -----------------------------------------------------------------
3120 * Off | illegal | Full | Half |
3121 * -----------------------------------------------------------------
3122 * On | AutoBoth | AutoFull | AutoHalf |
3123 * -----------------------------------------------------------------
3124 * Sense | AutoSense | AutoSense | AutoSense |
3125 */
3126int Capabilities[3][3] =
3127 { { -1, SK_LMODE_FULL , SK_LMODE_HALF },
3128 {SK_LMODE_AUTOBOTH , SK_LMODE_AUTOFULL , SK_LMODE_AUTOHALF },
3129 {SK_LMODE_AUTOSENSE, SK_LMODE_AUTOSENSE, SK_LMODE_AUTOSENSE} };
3130
3131#define DC_BOTH 0
3132#define DC_FULL 1
3133#define DC_HALF 2
3134#define AN_OFF 0
3135#define AN_ON 1
3136#define AN_SENS 2
3137#define M_CurrPort pAC->GIni.GP[Port]
3138
3139
3140 /*
3141 ** Set the default values first for both ports!
3142 */
3143 for (Port = 0; Port < SK_MAX_MACS; Port++) {
3144 M_CurrPort.PLinkModeConf = Capabilities[AN_ON][DC_BOTH];
3145 M_CurrPort.PFlowCtrlMode = SK_FLOW_MODE_SYM_OR_REM;
3146 M_CurrPort.PMSMode = SK_MS_MODE_AUTO;
3147 M_CurrPort.PLinkSpeed = SK_LSPEED_AUTO;
3148 }
3149
3150 /*
3151 ** Check merged parameter ConType. If it has not been used,
3152 ** verify any other parameter (e.g. AutoNeg) and use default values.
3153 **
3154 ** Stating both ConType and other lowlevel link parameters is also
3155 ** possible. If this is the case, the passed ConType-parameter is
3156 ** overwritten by the lowlevel link parameter.
3157 **
3158 ** The following settings are used for a merged ConType-parameter:
3159 **
3160 ** ConType DupCap AutoNeg FlowCtrl Role Speed
3161 ** ------- ------ ------- -------- ---------- -----
3162 ** Auto Both On SymOrRem Auto Auto
3163 ** 100FD Full Off None <ignored> 100
3164 ** 100HD Half Off None <ignored> 100
3165 ** 10FD Full Off None <ignored> 10
3166 ** 10HD Half Off None <ignored> 10
3167 **
3168 ** This ConType parameter is used for all ports of the adapter!
3169 */
3170 if ( (ConType != NULL) &&
3171 (pAC->Index < SK_MAX_CARD_PARAM) &&
3172 (ConType[pAC->Index] != NULL) ) {
3173
3174 /* Check chipset family */
3175 if ((!pAC->ChipsetType) &&
3176 (strcmp(ConType[pAC->Index],"Auto")!=0) &&
3177 (strcmp(ConType[pAC->Index],"")!=0)) {
3178 /* Set the speed parameter back */
3179 printk("sk98lin: Illegal value \"%s\" "
3180 "for ConType."
3181 " Using Auto.\n",
3182 ConType[pAC->Index]);
3183
3184 sprintf(ConType[pAC->Index], "Auto");
3185 }
3186
3187 if (strcmp(ConType[pAC->Index],"")==0) {
3188 IsConTypeDefined = SK_FALSE; /* No ConType defined */
3189 } else if (strcmp(ConType[pAC->Index],"Auto")==0) {
3190 for (Port = 0; Port < SK_MAX_MACS; Port++) {
3191 M_CurrPort.PLinkModeConf = Capabilities[AN_ON][DC_BOTH];
3192 M_CurrPort.PFlowCtrlMode = SK_FLOW_MODE_SYM_OR_REM;
3193 M_CurrPort.PMSMode = SK_MS_MODE_AUTO;
3194 M_CurrPort.PLinkSpeed = SK_LSPEED_AUTO;
3195 }
3196 } else if (strcmp(ConType[pAC->Index],"100FD")==0) {
3197 for (Port = 0; Port < SK_MAX_MACS; Port++) {
3198 M_CurrPort.PLinkModeConf = Capabilities[AN_OFF][DC_FULL];
3199 M_CurrPort.PFlowCtrlMode = SK_FLOW_MODE_NONE;
3200 M_CurrPort.PMSMode = SK_MS_MODE_AUTO;
3201 M_CurrPort.PLinkSpeed = SK_LSPEED_100MBPS;
3202 }
3203 } else if (strcmp(ConType[pAC->Index],"100HD")==0) {
3204 for (Port = 0; Port < SK_MAX_MACS; Port++) {
3205 M_CurrPort.PLinkModeConf = Capabilities[AN_OFF][DC_HALF];
3206 M_CurrPort.PFlowCtrlMode = SK_FLOW_MODE_NONE;
3207 M_CurrPort.PMSMode = SK_MS_MODE_AUTO;
3208 M_CurrPort.PLinkSpeed = SK_LSPEED_100MBPS;
3209 }
3210 } else if (strcmp(ConType[pAC->Index],"10FD")==0) {
3211 for (Port = 0; Port < SK_MAX_MACS; Port++) {
3212 M_CurrPort.PLinkModeConf = Capabilities[AN_OFF][DC_FULL];
3213 M_CurrPort.PFlowCtrlMode = SK_FLOW_MODE_NONE;
3214 M_CurrPort.PMSMode = SK_MS_MODE_AUTO;
3215 M_CurrPort.PLinkSpeed = SK_LSPEED_10MBPS;
3216 }
3217 } else if (strcmp(ConType[pAC->Index],"10HD")==0) {
3218 for (Port = 0; Port < SK_MAX_MACS; Port++) {
3219 M_CurrPort.PLinkModeConf = Capabilities[AN_OFF][DC_HALF];
3220 M_CurrPort.PFlowCtrlMode = SK_FLOW_MODE_NONE;
3221 M_CurrPort.PMSMode = SK_MS_MODE_AUTO;
3222 M_CurrPort.PLinkSpeed = SK_LSPEED_10MBPS;
3223 }
3224 } else {
3225 printk("sk98lin: Illegal value \"%s\" for ConType\n",
3226 ConType[pAC->Index]);
3227 IsConTypeDefined = SK_FALSE; /* Wrong ConType defined */
3228 }
3229 } else {
3230 IsConTypeDefined = SK_FALSE; /* No ConType defined */
3231 }
3232
3233 /*
3234 ** Parse any parameter settings for port A:
3235 ** a) any LinkSpeed stated?
3236 */
3237 if (Speed_A != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
3238 Speed_A[pAC->Index] != NULL) {
3239 if (strcmp(Speed_A[pAC->Index],"")==0) {
3240 IsLinkSpeedDefined = SK_FALSE;
3241 } else if (strcmp(Speed_A[pAC->Index],"Auto")==0) {
3242 LinkSpeed = SK_LSPEED_AUTO;
3243 } else if (strcmp(Speed_A[pAC->Index],"10")==0) {
3244 LinkSpeed = SK_LSPEED_10MBPS;
3245 } else if (strcmp(Speed_A[pAC->Index],"100")==0) {
3246 LinkSpeed = SK_LSPEED_100MBPS;
3247 } else if (strcmp(Speed_A[pAC->Index],"1000")==0) {
3248 LinkSpeed = SK_LSPEED_1000MBPS;
3249 } else {
3250 printk("sk98lin: Illegal value \"%s\" for Speed_A\n",
3251 Speed_A[pAC->Index]);
3252 IsLinkSpeedDefined = SK_FALSE;
3253 }
3254 } else {
3255 IsLinkSpeedDefined = SK_FALSE;
3256 }
3257
3258 /*
3259 ** Check speed parameter:
3260 ** Only copper type adapter and GE V2 cards
3261 */
3262 if (((!pAC->ChipsetType) || (pAC->GIni.GICopperType != SK_TRUE)) &&
3263 ((LinkSpeed != SK_LSPEED_AUTO) &&
3264 (LinkSpeed != SK_LSPEED_1000MBPS))) {
3265 printk("sk98lin: Illegal value for Speed_A. "
3266 "Not a copper card or GE V2 card\n Using "
3267 "speed 1000\n");
3268 LinkSpeed = SK_LSPEED_1000MBPS;
3269 }
3270
3271 /*
3272 ** Decide whether to set new config value if somethig valid has
3273 ** been received.
3274 */
3275 if (IsLinkSpeedDefined) {
3276 pAC->GIni.GP[0].PLinkSpeed = LinkSpeed;
3277 }
3278
3279 /*
3280 ** b) Any Autonegotiation and DuplexCapabilities set?
3281 ** Please note that both belong together...
3282 */
3283 AutoNeg = AN_ON; /* tschilling: Default: Autonegotiation on! */
3284 AutoSet = SK_FALSE;
3285 if (AutoNeg_A != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
3286 AutoNeg_A[pAC->Index] != NULL) {
3287 AutoSet = SK_TRUE;
3288 if (strcmp(AutoNeg_A[pAC->Index],"")==0) {
3289 AutoSet = SK_FALSE;
3290 } else if (strcmp(AutoNeg_A[pAC->Index],"On")==0) {
3291 AutoNeg = AN_ON;
3292 } else if (strcmp(AutoNeg_A[pAC->Index],"Off")==0) {
3293 AutoNeg = AN_OFF;
3294 } else if (strcmp(AutoNeg_A[pAC->Index],"Sense")==0) {
3295 AutoNeg = AN_SENS;
3296 } else {
3297 printk("sk98lin: Illegal value \"%s\" for AutoNeg_A\n",
3298 AutoNeg_A[pAC->Index]);
3299 }
3300 }
3301
3302 DuplexCap = DC_BOTH;
3303 DupSet = SK_FALSE;
3304 if (DupCap_A != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
3305 DupCap_A[pAC->Index] != NULL) {
3306 DupSet = SK_TRUE;
3307 if (strcmp(DupCap_A[pAC->Index],"")==0) {
3308 DupSet = SK_FALSE;
3309 } else if (strcmp(DupCap_A[pAC->Index],"Both")==0) {
3310 DuplexCap = DC_BOTH;
3311 } else if (strcmp(DupCap_A[pAC->Index],"Full")==0) {
3312 DuplexCap = DC_FULL;
3313 } else if (strcmp(DupCap_A[pAC->Index],"Half")==0) {
3314 DuplexCap = DC_HALF;
3315 } else {
3316 printk("sk98lin: Illegal value \"%s\" for DupCap_A\n",
3317 DupCap_A[pAC->Index]);
3318 }
3319 }
3320
3321 /*
3322 ** Check for illegal combinations
3323 */
3324 if ((LinkSpeed == SK_LSPEED_1000MBPS) &&
3325 ((DuplexCap == SK_LMODE_STAT_AUTOHALF) ||
3326 (DuplexCap == SK_LMODE_STAT_HALF)) &&
3327 (pAC->ChipsetType)) {
3328 printk("sk98lin: Half Duplex not possible with Gigabit speed!\n"
3329 " Using Full Duplex.\n");
3330 DuplexCap = DC_FULL;
3331 }
3332
3333 if ( AutoSet && AutoNeg==AN_SENS && DupSet) {
3334 printk("sk98lin, Port A: DuplexCapabilities"
3335 " ignored using Sense mode\n");
3336 }
3337
3338 if (AutoSet && AutoNeg==AN_OFF && DupSet && DuplexCap==DC_BOTH){
3339 printk("sk98lin: Port A: Illegal combination"
3340 " of values AutoNeg. and DuplexCap.\n Using "
3341 "Full Duplex\n");
3342 DuplexCap = DC_FULL;
3343 }
3344
3345 if (AutoSet && AutoNeg==AN_OFF && !DupSet) {
3346 DuplexCap = DC_FULL;
3347 }
3348
3349 if (!AutoSet && DupSet) {
3350 printk("sk98lin: Port A: Duplex setting not"
3351 " possible in\n default AutoNegotiation mode"
3352 " (Sense).\n Using AutoNegotiation On\n");
3353 AutoNeg = AN_ON;
3354 }
3355
3356 /*
3357 ** set the desired mode
3358 */
3359 if (AutoSet || DupSet) {
3360 pAC->GIni.GP[0].PLinkModeConf = Capabilities[AutoNeg][DuplexCap];
3361 }
3362
3363 /*
3364 ** c) Any Flowcontrol-parameter set?
3365 */
3366 if (FlowCtrl_A != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
3367 FlowCtrl_A[pAC->Index] != NULL) {
3368 if (strcmp(FlowCtrl_A[pAC->Index],"") == 0) {
3369 IsFlowCtrlDefined = SK_FALSE;
3370 } else if (strcmp(FlowCtrl_A[pAC->Index],"SymOrRem") == 0) {
3371 FlowCtrl = SK_FLOW_MODE_SYM_OR_REM;
3372 } else if (strcmp(FlowCtrl_A[pAC->Index],"Sym")==0) {
3373 FlowCtrl = SK_FLOW_MODE_SYMMETRIC;
3374 } else if (strcmp(FlowCtrl_A[pAC->Index],"LocSend")==0) {
3375 FlowCtrl = SK_FLOW_MODE_LOC_SEND;
3376 } else if (strcmp(FlowCtrl_A[pAC->Index],"None")==0) {
3377 FlowCtrl = SK_FLOW_MODE_NONE;
3378 } else {
3379 printk("sk98lin: Illegal value \"%s\" for FlowCtrl_A\n",
3380 FlowCtrl_A[pAC->Index]);
3381 IsFlowCtrlDefined = SK_FALSE;
3382 }
3383 } else {
3384 IsFlowCtrlDefined = SK_FALSE;
3385 }
3386
3387 if (IsFlowCtrlDefined) {
3388 if ((AutoNeg == AN_OFF) && (FlowCtrl != SK_FLOW_MODE_NONE)) {
3389 printk("sk98lin: Port A: FlowControl"
3390 " impossible without AutoNegotiation,"
3391 " disabled\n");
3392 FlowCtrl = SK_FLOW_MODE_NONE;
3393 }
3394 pAC->GIni.GP[0].PFlowCtrlMode = FlowCtrl;
3395 }
3396
3397 /*
3398 ** d) What is with the RoleParameter?
3399 */
3400 if (Role_A != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
3401 Role_A[pAC->Index] != NULL) {
3402 if (strcmp(Role_A[pAC->Index],"")==0) {
3403 IsRoleDefined = SK_FALSE;
3404 } else if (strcmp(Role_A[pAC->Index],"Auto")==0) {
3405 MSMode = SK_MS_MODE_AUTO;
3406 } else if (strcmp(Role_A[pAC->Index],"Master")==0) {
3407 MSMode = SK_MS_MODE_MASTER;
3408 } else if (strcmp(Role_A[pAC->Index],"Slave")==0) {
3409 MSMode = SK_MS_MODE_SLAVE;
3410 } else {
3411 printk("sk98lin: Illegal value \"%s\" for Role_A\n",
3412 Role_A[pAC->Index]);
3413 IsRoleDefined = SK_FALSE;
3414 }
3415 } else {
3416 IsRoleDefined = SK_FALSE;
3417 }
3418
3419 if (IsRoleDefined == SK_TRUE) {
3420 pAC->GIni.GP[0].PMSMode = MSMode;
3421 }
3422
3423
3424
3425 /*
3426 ** Parse any parameter settings for port B:
3427 ** a) any LinkSpeed stated?
3428 */
3429 IsConTypeDefined = SK_TRUE;
3430 IsLinkSpeedDefined = SK_TRUE;
3431 IsFlowCtrlDefined = SK_TRUE;
3432 IsModeDefined = SK_TRUE;
3433
3434 if (Speed_B != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
3435 Speed_B[pAC->Index] != NULL) {
3436 if (strcmp(Speed_B[pAC->Index],"")==0) {
3437 IsLinkSpeedDefined = SK_FALSE;
3438 } else if (strcmp(Speed_B[pAC->Index],"Auto")==0) {
3439 LinkSpeed = SK_LSPEED_AUTO;
3440 } else if (strcmp(Speed_B[pAC->Index],"10")==0) {
3441 LinkSpeed = SK_LSPEED_10MBPS;
3442 } else if (strcmp(Speed_B[pAC->Index],"100")==0) {
3443 LinkSpeed = SK_LSPEED_100MBPS;
3444 } else if (strcmp(Speed_B[pAC->Index],"1000")==0) {
3445 LinkSpeed = SK_LSPEED_1000MBPS;
3446 } else {
3447 printk("sk98lin: Illegal value \"%s\" for Speed_B\n",
3448 Speed_B[pAC->Index]);
3449 IsLinkSpeedDefined = SK_FALSE;
3450 }
3451 } else {
3452 IsLinkSpeedDefined = SK_FALSE;
3453 }
3454
3455 /*
3456 ** Check speed parameter:
3457 ** Only copper type adapter and GE V2 cards
3458 */
3459 if (((!pAC->ChipsetType) || (pAC->GIni.GICopperType != SK_TRUE)) &&
3460 ((LinkSpeed != SK_LSPEED_AUTO) &&
3461 (LinkSpeed != SK_LSPEED_1000MBPS))) {
3462 printk("sk98lin: Illegal value for Speed_B. "
3463 "Not a copper card or GE V2 card\n Using "
3464 "speed 1000\n");
3465 LinkSpeed = SK_LSPEED_1000MBPS;
3466 }
3467
3468 /*
3469 ** Decide whether to set new config value if somethig valid has
3470 ** been received.
3471 */
3472 if (IsLinkSpeedDefined) {
3473 pAC->GIni.GP[1].PLinkSpeed = LinkSpeed;
3474 }
3475
3476 /*
3477 ** b) Any Autonegotiation and DuplexCapabilities set?
3478 ** Please note that both belong together...
3479 */
3480 AutoNeg = AN_SENS; /* default: do auto Sense */
3481 AutoSet = SK_FALSE;
3482 if (AutoNeg_B != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
3483 AutoNeg_B[pAC->Index] != NULL) {
3484 AutoSet = SK_TRUE;
3485 if (strcmp(AutoNeg_B[pAC->Index],"")==0) {
3486 AutoSet = SK_FALSE;
3487 } else if (strcmp(AutoNeg_B[pAC->Index],"On")==0) {
3488 AutoNeg = AN_ON;
3489 } else if (strcmp(AutoNeg_B[pAC->Index],"Off")==0) {
3490 AutoNeg = AN_OFF;
3491 } else if (strcmp(AutoNeg_B[pAC->Index],"Sense")==0) {
3492 AutoNeg = AN_SENS;
3493 } else {
3494 printk("sk98lin: Illegal value \"%s\" for AutoNeg_B\n",
3495 AutoNeg_B[pAC->Index]);
3496 }
3497 }
3498
3499 DuplexCap = DC_BOTH;
3500 DupSet = SK_FALSE;
3501 if (DupCap_B != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
3502 DupCap_B[pAC->Index] != NULL) {
3503 DupSet = SK_TRUE;
3504 if (strcmp(DupCap_B[pAC->Index],"")==0) {
3505 DupSet = SK_FALSE;
3506 } else if (strcmp(DupCap_B[pAC->Index],"Both")==0) {
3507 DuplexCap = DC_BOTH;
3508 } else if (strcmp(DupCap_B[pAC->Index],"Full")==0) {
3509 DuplexCap = DC_FULL;
3510 } else if (strcmp(DupCap_B[pAC->Index],"Half")==0) {
3511 DuplexCap = DC_HALF;
3512 } else {
3513 printk("sk98lin: Illegal value \"%s\" for DupCap_B\n",
3514 DupCap_B[pAC->Index]);
3515 }
3516 }
3517
3518
3519 /*
3520 ** Check for illegal combinations
3521 */
3522 if ((LinkSpeed == SK_LSPEED_1000MBPS) &&
3523 ((DuplexCap == SK_LMODE_STAT_AUTOHALF) ||
3524 (DuplexCap == SK_LMODE_STAT_HALF)) &&
3525 (pAC->ChipsetType)) {
3526 printk("sk98lin: Half Duplex not possible with Gigabit speed!\n"
3527 " Using Full Duplex.\n");
3528 DuplexCap = DC_FULL;
3529 }
3530
3531 if (AutoSet && AutoNeg==AN_SENS && DupSet) {
3532 printk("sk98lin, Port B: DuplexCapabilities"
3533 " ignored using Sense mode\n");
3534 }
3535
3536 if (AutoSet && AutoNeg==AN_OFF && DupSet && DuplexCap==DC_BOTH){
3537 printk("sk98lin: Port B: Illegal combination"
3538 " of values AutoNeg. and DuplexCap.\n Using "
3539 "Full Duplex\n");
3540 DuplexCap = DC_FULL;
3541 }
3542
3543 if (AutoSet && AutoNeg==AN_OFF && !DupSet) {
3544 DuplexCap = DC_FULL;
3545 }
3546
3547 if (!AutoSet && DupSet) {
3548 printk("sk98lin: Port B: Duplex setting not"
3549 " possible in\n default AutoNegotiation mode"
3550 " (Sense).\n Using AutoNegotiation On\n");
3551 AutoNeg = AN_ON;
3552 }
3553
3554 /*
3555 ** set the desired mode
3556 */
3557 if (AutoSet || DupSet) {
3558 pAC->GIni.GP[1].PLinkModeConf = Capabilities[AutoNeg][DuplexCap];
3559 }
3560
3561 /*
3562 ** c) Any FlowCtrl parameter set?
3563 */
3564 if (FlowCtrl_B != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
3565 FlowCtrl_B[pAC->Index] != NULL) {
3566 if (strcmp(FlowCtrl_B[pAC->Index],"") == 0) {
3567 IsFlowCtrlDefined = SK_FALSE;
3568 } else if (strcmp(FlowCtrl_B[pAC->Index],"SymOrRem") == 0) {
3569 FlowCtrl = SK_FLOW_MODE_SYM_OR_REM;
3570 } else if (strcmp(FlowCtrl_B[pAC->Index],"Sym")==0) {
3571 FlowCtrl = SK_FLOW_MODE_SYMMETRIC;
3572 } else if (strcmp(FlowCtrl_B[pAC->Index],"LocSend")==0) {
3573 FlowCtrl = SK_FLOW_MODE_LOC_SEND;
3574 } else if (strcmp(FlowCtrl_B[pAC->Index],"None")==0) {
3575 FlowCtrl = SK_FLOW_MODE_NONE;
3576 } else {
3577 printk("sk98lin: Illegal value \"%s\" for FlowCtrl_B\n",
3578 FlowCtrl_B[pAC->Index]);
3579 IsFlowCtrlDefined = SK_FALSE;
3580 }
3581 } else {
3582 IsFlowCtrlDefined = SK_FALSE;
3583 }
3584
3585 if (IsFlowCtrlDefined) {
3586 if ((AutoNeg == AN_OFF) && (FlowCtrl != SK_FLOW_MODE_NONE)) {
3587 printk("sk98lin: Port B: FlowControl"
3588 " impossible without AutoNegotiation,"
3589 " disabled\n");
3590 FlowCtrl = SK_FLOW_MODE_NONE;
3591 }
3592 pAC->GIni.GP[1].PFlowCtrlMode = FlowCtrl;
3593 }
3594
3595 /*
3596 ** d) What is the RoleParameter?
3597 */
3598 if (Role_B != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
3599 Role_B[pAC->Index] != NULL) {
3600 if (strcmp(Role_B[pAC->Index],"")==0) {
3601 IsRoleDefined = SK_FALSE;
3602 } else if (strcmp(Role_B[pAC->Index],"Auto")==0) {
3603 MSMode = SK_MS_MODE_AUTO;
3604 } else if (strcmp(Role_B[pAC->Index],"Master")==0) {
3605 MSMode = SK_MS_MODE_MASTER;
3606 } else if (strcmp(Role_B[pAC->Index],"Slave")==0) {
3607 MSMode = SK_MS_MODE_SLAVE;
3608 } else {
3609 printk("sk98lin: Illegal value \"%s\" for Role_B\n",
3610 Role_B[pAC->Index]);
3611 IsRoleDefined = SK_FALSE;
3612 }
3613 } else {
3614 IsRoleDefined = SK_FALSE;
3615 }
3616
3617 if (IsRoleDefined) {
3618 pAC->GIni.GP[1].PMSMode = MSMode;
3619 }
3620
3621 /*
3622 ** Evaluate settings for both ports
3623 */
3624 pAC->ActivePort = 0;
3625 if (PrefPort != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
3626 PrefPort[pAC->Index] != NULL) {
3627 if (strcmp(PrefPort[pAC->Index],"") == 0) { /* Auto */
3628 pAC->ActivePort = 0;
3629 pAC->Rlmt.Net[0].Preference = -1; /* auto */
3630 pAC->Rlmt.Net[0].PrefPort = 0;
3631 } else if (strcmp(PrefPort[pAC->Index],"A") == 0) {
3632 /*
3633 ** do not set ActivePort here, thus a port
3634 ** switch is issued after net up.
3635 */
3636 Port = 0;
3637 pAC->Rlmt.Net[0].Preference = Port;
3638 pAC->Rlmt.Net[0].PrefPort = Port;
3639 } else if (strcmp(PrefPort[pAC->Index],"B") == 0) {
3640 /*
3641 ** do not set ActivePort here, thus a port
3642 ** switch is issued after net up.
3643 */
3644 if (pAC->GIni.GIMacsFound == 1) {
3645 printk("sk98lin: Illegal value \"B\" for PrefPort.\n"
3646 " Port B not available on single port adapters.\n");
3647
3648 pAC->ActivePort = 0;
3649 pAC->Rlmt.Net[0].Preference = -1; /* auto */
3650 pAC->Rlmt.Net[0].PrefPort = 0;
3651 } else {
3652 Port = 1;
3653 pAC->Rlmt.Net[0].Preference = Port;
3654 pAC->Rlmt.Net[0].PrefPort = Port;
3655 }
3656 } else {
3657 printk("sk98lin: Illegal value \"%s\" for PrefPort\n",
3658 PrefPort[pAC->Index]);
3659 }
3660 }
3661
3662 pAC->RlmtNets = 1;
3663
3664 if (RlmtMode != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
3665 RlmtMode[pAC->Index] != NULL) {
3666 if (strcmp(RlmtMode[pAC->Index], "") == 0) {
3667 pAC->RlmtMode = 0;
3668 } else if (strcmp(RlmtMode[pAC->Index], "CheckLinkState") == 0) {
3669 pAC->RlmtMode = SK_RLMT_CHECK_LINK;
3670 } else if (strcmp(RlmtMode[pAC->Index], "CheckLocalPort") == 0) {
3671 pAC->RlmtMode = SK_RLMT_CHECK_LINK |
3672 SK_RLMT_CHECK_LOC_LINK;
3673 } else if (strcmp(RlmtMode[pAC->Index], "CheckSeg") == 0) {
3674 pAC->RlmtMode = SK_RLMT_CHECK_LINK |
3675 SK_RLMT_CHECK_LOC_LINK |
3676 SK_RLMT_CHECK_SEG;
3677 } else if ((strcmp(RlmtMode[pAC->Index], "DualNet") == 0) &&
3678 (pAC->GIni.GIMacsFound == 2)) {
3679 pAC->RlmtMode = SK_RLMT_CHECK_LINK;
3680 pAC->RlmtNets = 2;
3681 } else {
3682 printk("sk98lin: Illegal value \"%s\" for"
3683 " RlmtMode, using default\n",
3684 RlmtMode[pAC->Index]);
3685 pAC->RlmtMode = 0;
3686 }
3687 } else {
3688 pAC->RlmtMode = 0;
3689 }
3690
3691 /*
3692 ** Check the interrupt moderation parameters
3693 */
3694 if (Moderation[pAC->Index] != NULL) {
3695 if (strcmp(Moderation[pAC->Index], "") == 0) {
3696 pAC->DynIrqModInfo.IntModTypeSelect = C_INT_MOD_NONE;
3697 } else if (strcmp(Moderation[pAC->Index], "Static") == 0) {
3698 pAC->DynIrqModInfo.IntModTypeSelect = C_INT_MOD_STATIC;
3699 } else if (strcmp(Moderation[pAC->Index], "Dynamic") == 0) {
3700 pAC->DynIrqModInfo.IntModTypeSelect = C_INT_MOD_DYNAMIC;
3701 } else if (strcmp(Moderation[pAC->Index], "None") == 0) {
3702 pAC->DynIrqModInfo.IntModTypeSelect = C_INT_MOD_NONE;
3703 } else {
3704 printk("sk98lin: Illegal value \"%s\" for Moderation.\n"
3705 " Disable interrupt moderation.\n",
3706 Moderation[pAC->Index]);
3707 pAC->DynIrqModInfo.IntModTypeSelect = C_INT_MOD_NONE;
3708 }
3709 } else {
3710 pAC->DynIrqModInfo.IntModTypeSelect = C_INT_MOD_NONE;
3711 }
3712
3713 if (Stats[pAC->Index] != NULL) {
3714 if (strcmp(Stats[pAC->Index], "Yes") == 0) {
3715 pAC->DynIrqModInfo.DisplayStats = SK_TRUE;
3716 } else {
3717 pAC->DynIrqModInfo.DisplayStats = SK_FALSE;
3718 }
3719 } else {
3720 pAC->DynIrqModInfo.DisplayStats = SK_FALSE;
3721 }
3722
3723 if (ModerationMask[pAC->Index] != NULL) {
3724 if (strcmp(ModerationMask[pAC->Index], "Rx") == 0) {
3725 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_RX_ONLY;
3726 } else if (strcmp(ModerationMask[pAC->Index], "Tx") == 0) {
3727 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_TX_ONLY;
3728 } else if (strcmp(ModerationMask[pAC->Index], "Sp") == 0) {
3729 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_SP_ONLY;
3730 } else if (strcmp(ModerationMask[pAC->Index], "RxSp") == 0) {
3731 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_SP_RX;
3732 } else if (strcmp(ModerationMask[pAC->Index], "SpRx") == 0) {
3733 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_SP_RX;
3734 } else if (strcmp(ModerationMask[pAC->Index], "RxTx") == 0) {
3735 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_TX_RX;
3736 } else if (strcmp(ModerationMask[pAC->Index], "TxRx") == 0) {
3737 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_TX_RX;
3738 } else if (strcmp(ModerationMask[pAC->Index], "TxSp") == 0) {
3739 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_SP_TX;
3740 } else if (strcmp(ModerationMask[pAC->Index], "SpTx") == 0) {
3741 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_SP_TX;
3742 } else if (strcmp(ModerationMask[pAC->Index], "RxTxSp") == 0) {
3743 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_RX_TX_SP;
3744 } else if (strcmp(ModerationMask[pAC->Index], "RxSpTx") == 0) {
3745 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_RX_TX_SP;
3746 } else if (strcmp(ModerationMask[pAC->Index], "TxRxSp") == 0) {
3747 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_RX_TX_SP;
3748 } else if (strcmp(ModerationMask[pAC->Index], "TxSpRx") == 0) {
3749 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_RX_TX_SP;
3750 } else if (strcmp(ModerationMask[pAC->Index], "SpTxRx") == 0) {
3751 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_RX_TX_SP;
3752 } else if (strcmp(ModerationMask[pAC->Index], "SpRxTx") == 0) {
3753 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_RX_TX_SP;
3754 } else { /* some rubbish */
3755 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_RX_ONLY;
3756 }
3757 } else { /* operator has stated nothing */
3758 pAC->DynIrqModInfo.MaskIrqModeration = IRQ_MASK_TX_RX;
3759 }
3760
3761 if (AutoSizing[pAC->Index] != NULL) {
3762 if (strcmp(AutoSizing[pAC->Index], "On") == 0) {
3763 pAC->DynIrqModInfo.AutoSizing = SK_FALSE;
3764 } else {
3765 pAC->DynIrqModInfo.AutoSizing = SK_FALSE;
3766 }
3767 } else { /* operator has stated nothing */
3768 pAC->DynIrqModInfo.AutoSizing = SK_FALSE;
3769 }
3770
3771 if (IntsPerSec[pAC->Index] != 0) {
3772 if ((IntsPerSec[pAC->Index]< C_INT_MOD_IPS_LOWER_RANGE) ||
3773 (IntsPerSec[pAC->Index] > C_INT_MOD_IPS_UPPER_RANGE)) {
3774 printk("sk98lin: Illegal value \"%d\" for IntsPerSec. (Range: %d - %d)\n"
3775 " Using default value of %i.\n",
3776 IntsPerSec[pAC->Index],
3777 C_INT_MOD_IPS_LOWER_RANGE,
3778 C_INT_MOD_IPS_UPPER_RANGE,
3779 C_INTS_PER_SEC_DEFAULT);
3780 pAC->DynIrqModInfo.MaxModIntsPerSec = C_INTS_PER_SEC_DEFAULT;
3781 } else {
3782 pAC->DynIrqModInfo.MaxModIntsPerSec = IntsPerSec[pAC->Index];
3783 }
3784 } else {
3785 pAC->DynIrqModInfo.MaxModIntsPerSec = C_INTS_PER_SEC_DEFAULT;
3786 }
3787
3788 /*
3789 ** Evaluate upper and lower moderation threshold
3790 */
3791 pAC->DynIrqModInfo.MaxModIntsPerSecUpperLimit =
3792 pAC->DynIrqModInfo.MaxModIntsPerSec +
3793 (pAC->DynIrqModInfo.MaxModIntsPerSec / 2);
3794
3795 pAC->DynIrqModInfo.MaxModIntsPerSecLowerLimit =
3796 pAC->DynIrqModInfo.MaxModIntsPerSec -
3797 (pAC->DynIrqModInfo.MaxModIntsPerSec / 2);
3798
3799 pAC->DynIrqModInfo.PrevTimeVal = jiffies; /* initial value */
3800
3801
3802} /* GetConfiguration */
3803
3804
3805/*****************************************************************************
3806 *
3807 * ProductStr - return a adapter identification string from vpd
3808 *
3809 * Description:
3810 * This function reads the product name string from the vpd area
3811 * and puts it the field pAC->DeviceString.
3812 *
3813 * Returns: N/A
3814 */
3815static inline int ProductStr(
3816 SK_AC *pAC, /* pointer to adapter context */
3817 char *DeviceStr, /* result string */
3818 int StrLen /* length of the string */
3819)
3820{
3821char Keyword[] = VPD_NAME; /* vpd productname identifier */
3822int ReturnCode; /* return code from vpd_read */
3823unsigned long Flags;
3824
3825 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
3826 ReturnCode = VpdRead(pAC, pAC->IoBase, Keyword, DeviceStr, &StrLen);
3827 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
3828
3829 return ReturnCode;
3830} /* ProductStr */
3831
3832/*****************************************************************************
3833 *
3834 * StartDrvCleanupTimer - Start timer to check for descriptors which
3835 * might be placed in descriptor ring, but
3836 * havent been handled up to now
3837 *
3838 * Description:
3839 * This function requests a HW-timer fo the Yukon card. The actions to
3840 * perform when this timer expires, are located in the SkDrvEvent().
3841 *
3842 * Returns: N/A
3843 */
3844static void
3845StartDrvCleanupTimer(SK_AC *pAC) {
3846 SK_EVPARA EventParam; /* Event struct for timer event */
3847
3848 SK_MEMSET((char *) &EventParam, 0, sizeof(EventParam));
3849 EventParam.Para32[0] = SK_DRV_RX_CLEANUP_TIMER;
3850 SkTimerStart(pAC, pAC->IoBase, &pAC->DrvCleanupTimer,
3851 SK_DRV_RX_CLEANUP_TIMER_LENGTH,
3852 SKGE_DRV, SK_DRV_TIMER, EventParam);
3853}
3854
3855/*****************************************************************************
3856 *
3857 * StopDrvCleanupTimer - Stop timer to check for descriptors
3858 *
3859 * Description:
3860 * This function requests a HW-timer fo the Yukon card. The actions to
3861 * perform when this timer expires, are located in the SkDrvEvent().
3862 *
3863 * Returns: N/A
3864 */
3865static void
3866StopDrvCleanupTimer(SK_AC *pAC) {
3867 SkTimerStop(pAC, pAC->IoBase, &pAC->DrvCleanupTimer);
3868 SK_MEMSET((char *) &pAC->DrvCleanupTimer, 0, sizeof(SK_TIMER));
3869}
3870
3871/****************************************************************************/
3872/* functions for common modules *********************************************/
3873/****************************************************************************/
3874
3875
3876/*****************************************************************************
3877 *
3878 * SkDrvAllocRlmtMbuf - allocate an RLMT mbuf
3879 *
3880 * Description:
3881 * This routine returns an RLMT mbuf or NULL. The RLMT Mbuf structure
3882 * is embedded into a socket buff data area.
3883 *
3884 * Context:
3885 * runtime
3886 *
3887 * Returns:
3888 * NULL or pointer to Mbuf.
3889 */
3890SK_MBUF *SkDrvAllocRlmtMbuf(
3891SK_AC *pAC, /* pointer to adapter context */
3892SK_IOC IoC, /* the IO-context */
3893unsigned BufferSize) /* size of the requested buffer */
3894{
3895SK_MBUF *pRlmtMbuf; /* pointer to a new rlmt-mbuf structure */
3896struct sk_buff *pMsgBlock; /* pointer to a new message block */
3897
3898 pMsgBlock = alloc_skb(BufferSize + sizeof(SK_MBUF), GFP_ATOMIC);
3899 if (pMsgBlock == NULL) {
3900 return (NULL);
3901 }
3902 pRlmtMbuf = (SK_MBUF*) pMsgBlock->data;
3903 skb_reserve(pMsgBlock, sizeof(SK_MBUF));
3904 pRlmtMbuf->pNext = NULL;
3905 pRlmtMbuf->pOs = pMsgBlock;
3906 pRlmtMbuf->pData = pMsgBlock->data; /* Data buffer. */
3907 pRlmtMbuf->Size = BufferSize; /* Data buffer size. */
3908 pRlmtMbuf->Length = 0; /* Length of packet (<= Size). */
3909 return (pRlmtMbuf);
3910
3911} /* SkDrvAllocRlmtMbuf */
3912
3913
3914/*****************************************************************************
3915 *
3916 * SkDrvFreeRlmtMbuf - free an RLMT mbuf
3917 *
3918 * Description:
3919 * This routine frees one or more RLMT mbuf(s).
3920 *
3921 * Context:
3922 * runtime
3923 *
3924 * Returns:
3925 * Nothing
3926 */
3927void SkDrvFreeRlmtMbuf(
3928SK_AC *pAC, /* pointer to adapter context */
3929SK_IOC IoC, /* the IO-context */
3930SK_MBUF *pMbuf) /* size of the requested buffer */
3931{
3932SK_MBUF *pFreeMbuf;
3933SK_MBUF *pNextMbuf;
3934
3935 pFreeMbuf = pMbuf;
3936 do {
3937 pNextMbuf = pFreeMbuf->pNext;
3938 DEV_KFREE_SKB_ANY(pFreeMbuf->pOs);
3939 pFreeMbuf = pNextMbuf;
3940 } while ( pFreeMbuf != NULL );
3941} /* SkDrvFreeRlmtMbuf */
3942
3943
3944/*****************************************************************************
3945 *
3946 * SkOsGetTime - provide a time value
3947 *
3948 * Description:
3949 * This routine provides a time value. The unit is 1/HZ (defined by Linux).
3950 * It is not used for absolute time, but only for time differences.
3951 *
3952 *
3953 * Returns:
3954 * Time value
3955 */
3956SK_U64 SkOsGetTime(SK_AC *pAC)
3957{
3958 SK_U64 PrivateJiffies;
3959 SkOsGetTimeCurrent(pAC, &PrivateJiffies);
3960 return PrivateJiffies;
3961} /* SkOsGetTime */
3962
3963
3964/*****************************************************************************
3965 *
3966 * SkPciReadCfgDWord - read a 32 bit value from pci config space
3967 *
3968 * Description:
3969 * This routine reads a 32 bit value from the pci configuration
3970 * space.
3971 *
3972 * Returns:
3973 * 0 - indicate everything worked ok.
3974 * != 0 - error indication
3975 */
3976int SkPciReadCfgDWord(
3977SK_AC *pAC, /* Adapter Control structure pointer */
3978int PciAddr, /* PCI register address */
3979SK_U32 *pVal) /* pointer to store the read value */
3980{
3981 pci_read_config_dword(pAC->PciDev, PciAddr, pVal);
3982 return(0);
3983} /* SkPciReadCfgDWord */
3984
3985
3986/*****************************************************************************
3987 *
3988 * SkPciReadCfgWord - read a 16 bit value from pci config space
3989 *
3990 * Description:
3991 * This routine reads a 16 bit value from the pci configuration
3992 * space.
3993 *
3994 * Returns:
3995 * 0 - indicate everything worked ok.
3996 * != 0 - error indication
3997 */
3998int SkPciReadCfgWord(
3999SK_AC *pAC, /* Adapter Control structure pointer */
4000int PciAddr, /* PCI register address */
4001SK_U16 *pVal) /* pointer to store the read value */
4002{
4003 pci_read_config_word(pAC->PciDev, PciAddr, pVal);
4004 return(0);
4005} /* SkPciReadCfgWord */
4006
4007
4008/*****************************************************************************
4009 *
4010 * SkPciReadCfgByte - read a 8 bit value from pci config space
4011 *
4012 * Description:
4013 * This routine reads a 8 bit value from the pci configuration
4014 * space.
4015 *
4016 * Returns:
4017 * 0 - indicate everything worked ok.
4018 * != 0 - error indication
4019 */
4020int SkPciReadCfgByte(
4021SK_AC *pAC, /* Adapter Control structure pointer */
4022int PciAddr, /* PCI register address */
4023SK_U8 *pVal) /* pointer to store the read value */
4024{
4025 pci_read_config_byte(pAC->PciDev, PciAddr, pVal);
4026 return(0);
4027} /* SkPciReadCfgByte */
4028
4029
4030/*****************************************************************************
4031 *
4032 * SkPciWriteCfgWord - write a 16 bit value to pci config space
4033 *
4034 * Description:
4035 * This routine writes a 16 bit value to the pci configuration
4036 * space. The flag PciConfigUp indicates whether the config space
4037 * is accesible or must be set up first.
4038 *
4039 * Returns:
4040 * 0 - indicate everything worked ok.
4041 * != 0 - error indication
4042 */
4043int SkPciWriteCfgWord(
4044SK_AC *pAC, /* Adapter Control structure pointer */
4045int PciAddr, /* PCI register address */
4046SK_U16 Val) /* pointer to store the read value */
4047{
4048 pci_write_config_word(pAC->PciDev, PciAddr, Val);
4049 return(0);
4050} /* SkPciWriteCfgWord */
4051
4052
4053/*****************************************************************************
4054 *
4055 * SkPciWriteCfgWord - write a 8 bit value to pci config space
4056 *
4057 * Description:
4058 * This routine writes a 8 bit value to the pci configuration
4059 * space. The flag PciConfigUp indicates whether the config space
4060 * is accesible or must be set up first.
4061 *
4062 * Returns:
4063 * 0 - indicate everything worked ok.
4064 * != 0 - error indication
4065 */
4066int SkPciWriteCfgByte(
4067SK_AC *pAC, /* Adapter Control structure pointer */
4068int PciAddr, /* PCI register address */
4069SK_U8 Val) /* pointer to store the read value */
4070{
4071 pci_write_config_byte(pAC->PciDev, PciAddr, Val);
4072 return(0);
4073} /* SkPciWriteCfgByte */
4074
4075
4076/*****************************************************************************
4077 *
4078 * SkDrvEvent - handle driver events
4079 *
4080 * Description:
4081 * This function handles events from all modules directed to the driver
4082 *
4083 * Context:
4084 * Is called under protection of slow path lock.
4085 *
4086 * Returns:
4087 * 0 if everything ok
4088 * < 0 on error
4089 *
4090 */
4091int SkDrvEvent(
4092SK_AC *pAC, /* pointer to adapter context */
4093SK_IOC IoC, /* io-context */
4094SK_U32 Event, /* event-id */
4095SK_EVPARA Param) /* event-parameter */
4096{
4097SK_MBUF *pRlmtMbuf; /* pointer to a rlmt-mbuf structure */
4098struct sk_buff *pMsg; /* pointer to a message block */
4099int FromPort; /* the port from which we switch away */
4100int ToPort; /* the port we switch to */
4101SK_EVPARA NewPara; /* parameter for further events */
4102int Stat;
4103unsigned long Flags;
4104SK_BOOL DualNet;
4105
4106 switch (Event) {
4107 case SK_DRV_ADAP_FAIL:
4108 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
4109 ("ADAPTER FAIL EVENT\n"));
4110 printk("%s: Adapter failed.\n", pAC->dev[0]->name);
4111 /* disable interrupts */
4112 SK_OUT32(pAC->IoBase, B0_IMSK, 0);
4113 /* cgoos */
4114 break;
4115 case SK_DRV_PORT_FAIL:
4116 FromPort = Param.Para32[0];
4117 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
4118 ("PORT FAIL EVENT, Port: %d\n", FromPort));
4119 if (FromPort == 0) {
4120 printk("%s: Port A failed.\n", pAC->dev[0]->name);
4121 } else {
4122 printk("%s: Port B failed.\n", pAC->dev[1]->name);
4123 }
4124 /* cgoos */
4125 break;
4126 case SK_DRV_PORT_RESET: /* SK_U32 PortIdx */
4127 /* action list 4 */
4128 FromPort = Param.Para32[0];
4129 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
4130 ("PORT RESET EVENT, Port: %d ", FromPort));
4131 NewPara.Para64 = FromPort;
4132 SkPnmiEvent(pAC, IoC, SK_PNMI_EVT_XMAC_RESET, NewPara);
4133 spin_lock_irqsave(
4134 &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
4135 Flags);
4136
4137 SkGeStopPort(pAC, IoC, FromPort, SK_STOP_ALL, SK_HARD_RST);
4138 netif_carrier_off(pAC->dev[Param.Para32[0]]);
4139 spin_unlock_irqrestore(
4140 &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
4141 Flags);
4142
4143 /* clear rx ring from received frames */
4144 ReceiveIrq(pAC, &pAC->RxPort[FromPort], SK_FALSE);
4145
4146 ClearTxRing(pAC, &pAC->TxPort[FromPort][TX_PRIO_LOW]);
4147 spin_lock_irqsave(
4148 &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
4149 Flags);
4150
4151 /* tschilling: Handling of return value inserted. */
4152 if (SkGeInitPort(pAC, IoC, FromPort)) {
4153 if (FromPort == 0) {
4154 printk("%s: SkGeInitPort A failed.\n", pAC->dev[0]->name);
4155 } else {
4156 printk("%s: SkGeInitPort B failed.\n", pAC->dev[1]->name);
4157 }
4158 }
4159 SkAddrMcUpdate(pAC,IoC, FromPort);
4160 PortReInitBmu(pAC, FromPort);
4161 SkGePollTxD(pAC, IoC, FromPort, SK_TRUE);
4162 ClearAndStartRx(pAC, FromPort);
4163 spin_unlock_irqrestore(
4164 &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
4165 Flags);
4166 break;
4167 case SK_DRV_NET_UP: /* SK_U32 PortIdx */
4168 { struct net_device *dev = pAC->dev[Param.Para32[0]];
4169 /* action list 5 */
4170 FromPort = Param.Para32[0];
4171 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
4172 ("NET UP EVENT, Port: %d ", Param.Para32[0]));
4173 /* Mac update */
4174 SkAddrMcUpdate(pAC,IoC, FromPort);
4175
4176 if (DoPrintInterfaceChange) {
4177 printk("%s: network connection up using"
4178 " port %c\n", pAC->dev[Param.Para32[0]]->name, 'A'+Param.Para32[0]);
4179
4180 /* tschilling: Values changed according to LinkSpeedUsed. */
4181 Stat = pAC->GIni.GP[FromPort].PLinkSpeedUsed;
4182 if (Stat == SK_LSPEED_STAT_10MBPS) {
4183 printk(" speed: 10\n");
4184 } else if (Stat == SK_LSPEED_STAT_100MBPS) {
4185 printk(" speed: 100\n");
4186 } else if (Stat == SK_LSPEED_STAT_1000MBPS) {
4187 printk(" speed: 1000\n");
4188 } else {
4189 printk(" speed: unknown\n");
4190 }
4191
4192
4193 Stat = pAC->GIni.GP[FromPort].PLinkModeStatus;
4194 if (Stat == SK_LMODE_STAT_AUTOHALF ||
4195 Stat == SK_LMODE_STAT_AUTOFULL) {
4196 printk(" autonegotiation: yes\n");
4197 }
4198 else {
4199 printk(" autonegotiation: no\n");
4200 }
4201 if (Stat == SK_LMODE_STAT_AUTOHALF ||
4202 Stat == SK_LMODE_STAT_HALF) {
4203 printk(" duplex mode: half\n");
4204 }
4205 else {
4206 printk(" duplex mode: full\n");
4207 }
4208 Stat = pAC->GIni.GP[FromPort].PFlowCtrlStatus;
4209 if (Stat == SK_FLOW_STAT_REM_SEND ) {
4210 printk(" flowctrl: remote send\n");
4211 }
4212 else if (Stat == SK_FLOW_STAT_LOC_SEND ){
4213 printk(" flowctrl: local send\n");
4214 }
4215 else if (Stat == SK_FLOW_STAT_SYMMETRIC ){
4216 printk(" flowctrl: symmetric\n");
4217 }
4218 else {
4219 printk(" flowctrl: none\n");
4220 }
4221
4222 /* tschilling: Check against CopperType now. */
4223 if ((pAC->GIni.GICopperType == SK_TRUE) &&
4224 (pAC->GIni.GP[FromPort].PLinkSpeedUsed ==
4225 SK_LSPEED_STAT_1000MBPS)) {
4226 Stat = pAC->GIni.GP[FromPort].PMSStatus;
4227 if (Stat == SK_MS_STAT_MASTER ) {
4228 printk(" role: master\n");
4229 }
4230 else if (Stat == SK_MS_STAT_SLAVE ) {
4231 printk(" role: slave\n");
4232 }
4233 else {
4234 printk(" role: ???\n");
4235 }
4236 }
4237
4238 /*
4239 Display dim (dynamic interrupt moderation)
4240 informations
4241 */
4242 if (pAC->DynIrqModInfo.IntModTypeSelect == C_INT_MOD_STATIC)
4243 printk(" irq moderation: static (%d ints/sec)\n",
4244 pAC->DynIrqModInfo.MaxModIntsPerSec);
4245 else if (pAC->DynIrqModInfo.IntModTypeSelect == C_INT_MOD_DYNAMIC)
4246 printk(" irq moderation: dynamic (%d ints/sec)\n",
4247 pAC->DynIrqModInfo.MaxModIntsPerSec);
4248 else
4249 printk(" irq moderation: disabled\n");
4250
4251
4252 printk(" scatter-gather: %s\n",
4253 (dev->features & NETIF_F_SG) ? "enabled" : "disabled");
4254 printk(" tx-checksum: %s\n",
4255 (dev->features & NETIF_F_IP_CSUM) ? "enabled" : "disabled");
4256 printk(" rx-checksum: %s\n",
4257 pAC->RxPort[Param.Para32[0]].RxCsum ? "enabled" : "disabled");
4258
4259 } else {
4260 DoPrintInterfaceChange = SK_TRUE;
4261 }
4262
4263 if ((Param.Para32[0] != pAC->ActivePort) &&
4264 (pAC->RlmtNets == 1)) {
4265 NewPara.Para32[0] = pAC->ActivePort;
4266 NewPara.Para32[1] = Param.Para32[0];
4267 SkEventQueue(pAC, SKGE_DRV, SK_DRV_SWITCH_INTERN,
4268 NewPara);
4269 }
4270
4271 /* Inform the world that link protocol is up. */
4272 netif_carrier_on(dev);
4273 break;
4274 }
4275 case SK_DRV_NET_DOWN: /* SK_U32 Reason */
4276 /* action list 7 */
4277 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
4278 ("NET DOWN EVENT "));
4279 if (DoPrintInterfaceChange) {
4280 printk("%s: network connection down\n",
4281 pAC->dev[Param.Para32[1]]->name);
4282 } else {
4283 DoPrintInterfaceChange = SK_TRUE;
4284 }
4285 netif_carrier_off(pAC->dev[Param.Para32[1]]);
4286 break;
4287 case SK_DRV_SWITCH_HARD: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */
4288 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
4289 ("PORT SWITCH HARD "));
4290 case SK_DRV_SWITCH_SOFT: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */
4291 /* action list 6 */
4292 printk("%s: switching to port %c\n", pAC->dev[0]->name,
4293 'A'+Param.Para32[1]);
4294 case SK_DRV_SWITCH_INTERN: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */
4295 FromPort = Param.Para32[0];
4296 ToPort = Param.Para32[1];
4297 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
4298 ("PORT SWITCH EVENT, From: %d To: %d (Pref %d) ",
4299 FromPort, ToPort, pAC->Rlmt.Net[0].PrefPort));
4300 NewPara.Para64 = FromPort;
4301 SkPnmiEvent(pAC, IoC, SK_PNMI_EVT_XMAC_RESET, NewPara);
4302 NewPara.Para64 = ToPort;
4303 SkPnmiEvent(pAC, IoC, SK_PNMI_EVT_XMAC_RESET, NewPara);
4304 spin_lock_irqsave(
4305 &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
4306 Flags);
4307 spin_lock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
4308 SkGeStopPort(pAC, IoC, FromPort, SK_STOP_ALL, SK_SOFT_RST);
4309 SkGeStopPort(pAC, IoC, ToPort, SK_STOP_ALL, SK_SOFT_RST);
4310 spin_unlock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
4311 spin_unlock_irqrestore(
4312 &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
4313 Flags);
4314
4315 ReceiveIrq(pAC, &pAC->RxPort[FromPort], SK_FALSE); /* clears rx ring */
4316 ReceiveIrq(pAC, &pAC->RxPort[ToPort], SK_FALSE); /* clears rx ring */
4317
4318 ClearTxRing(pAC, &pAC->TxPort[FromPort][TX_PRIO_LOW]);
4319 ClearTxRing(pAC, &pAC->TxPort[ToPort][TX_PRIO_LOW]);
4320 spin_lock_irqsave(
4321 &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
4322 Flags);
4323 spin_lock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
4324 pAC->ActivePort = ToPort;
4325#if 0
4326 SetQueueSizes(pAC);
4327#else
4328 /* tschilling: New common function with minimum size check. */
4329 DualNet = SK_FALSE;
4330 if (pAC->RlmtNets == 2) {
4331 DualNet = SK_TRUE;
4332 }
4333
4334 if (SkGeInitAssignRamToQueues(
4335 pAC,
4336 pAC->ActivePort,
4337 DualNet)) {
4338 spin_unlock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
4339 spin_unlock_irqrestore(
4340 &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
4341 Flags);
4342 printk("SkGeInitAssignRamToQueues failed.\n");
4343 break;
4344 }
4345#endif
4346 /* tschilling: Handling of return values inserted. */
4347 if (SkGeInitPort(pAC, IoC, FromPort) ||
4348 SkGeInitPort(pAC, IoC, ToPort)) {
4349 printk("%s: SkGeInitPort failed.\n", pAC->dev[0]->name);
4350 }
4351 if (Event == SK_DRV_SWITCH_SOFT) {
4352 SkMacRxTxEnable(pAC, IoC, FromPort);
4353 }
4354 SkMacRxTxEnable(pAC, IoC, ToPort);
4355 SkAddrSwap(pAC, IoC, FromPort, ToPort);
4356 SkAddrMcUpdate(pAC, IoC, FromPort);
4357 SkAddrMcUpdate(pAC, IoC, ToPort);
4358 PortReInitBmu(pAC, FromPort);
4359 PortReInitBmu(pAC, ToPort);
4360 SkGePollTxD(pAC, IoC, FromPort, SK_TRUE);
4361 SkGePollTxD(pAC, IoC, ToPort, SK_TRUE);
4362 ClearAndStartRx(pAC, FromPort);
4363 ClearAndStartRx(pAC, ToPort);
4364 spin_unlock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
4365 spin_unlock_irqrestore(
4366 &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
4367 Flags);
4368 break;
4369 case SK_DRV_RLMT_SEND: /* SK_MBUF *pMb */
4370 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
4371 ("RLS "));
4372 pRlmtMbuf = (SK_MBUF*) Param.pParaPtr;
4373 pMsg = (struct sk_buff*) pRlmtMbuf->pOs;
4374 skb_put(pMsg, pRlmtMbuf->Length);
4375 if (XmitFrame(pAC, &pAC->TxPort[pRlmtMbuf->PortIdx][TX_PRIO_LOW],
4376 pMsg) < 0)
4377
4378 DEV_KFREE_SKB_ANY(pMsg);
4379 break;
4380 case SK_DRV_TIMER:
4381 if (Param.Para32[0] == SK_DRV_MODERATION_TIMER) {
4382 /*
4383 ** expiration of the moderation timer implies that
4384 ** dynamic moderation is to be applied
4385 */
4386 SkDimStartModerationTimer(pAC);
4387 SkDimModerate(pAC);
4388 if (pAC->DynIrqModInfo.DisplayStats) {
4389 SkDimDisplayModerationSettings(pAC);
4390 }
4391 } else if (Param.Para32[0] == SK_DRV_RX_CLEANUP_TIMER) {
4392 /*
4393 ** check if we need to check for descriptors which
4394 ** haven't been handled the last millisecs
4395 */
4396 StartDrvCleanupTimer(pAC);
4397 if (pAC->GIni.GIMacsFound == 2) {
4398 ReceiveIrq(pAC, &pAC->RxPort[1], SK_FALSE);
4399 }
4400 ReceiveIrq(pAC, &pAC->RxPort[0], SK_FALSE);
4401 } else {
4402 printk("Expiration of unknown timer\n");
4403 }
4404 break;
4405 default:
4406 break;
4407 }
4408 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
4409 ("END EVENT "));
4410
4411 return (0);
4412} /* SkDrvEvent */
4413
4414
4415/*****************************************************************************
4416 *
4417 * SkErrorLog - log errors
4418 *
4419 * Description:
4420 * This function logs errors to the system buffer and to the console
4421 *
4422 * Returns:
4423 * 0 if everything ok
4424 * < 0 on error
4425 *
4426 */
4427void SkErrorLog(
4428SK_AC *pAC,
4429int ErrClass,
4430int ErrNum,
4431char *pErrorMsg)
4432{
4433char ClassStr[80];
4434
4435 switch (ErrClass) {
4436 case SK_ERRCL_OTHER:
4437 strcpy(ClassStr, "Other error");
4438 break;
4439 case SK_ERRCL_CONFIG:
4440 strcpy(ClassStr, "Configuration error");
4441 break;
4442 case SK_ERRCL_INIT:
4443 strcpy(ClassStr, "Initialization error");
4444 break;
4445 case SK_ERRCL_NORES:
4446 strcpy(ClassStr, "Out of resources error");
4447 break;
4448 case SK_ERRCL_SW:
4449 strcpy(ClassStr, "internal Software error");
4450 break;
4451 case SK_ERRCL_HW:
4452 strcpy(ClassStr, "Hardware failure");
4453 break;
4454 case SK_ERRCL_COMM:
4455 strcpy(ClassStr, "Communication error");
4456 break;
4457 }
4458 printk(KERN_INFO "%s: -- ERROR --\n Class: %s\n"
4459 " Nr: 0x%x\n Msg: %s\n", pAC->dev[0]->name,
4460 ClassStr, ErrNum, pErrorMsg);
4461
4462} /* SkErrorLog */
4463
4464#ifdef SK_DIAG_SUPPORT
4465
4466/*****************************************************************************
4467 *
4468 * SkDrvEnterDiagMode - handles DIAG attach request
4469 *
4470 * Description:
4471 * Notify the kernel to NOT access the card any longer due to DIAG
4472 * Deinitialize the Card
4473 *
4474 * Returns:
4475 * int
4476 */
4477int SkDrvEnterDiagMode(
4478SK_AC *pAc) /* pointer to adapter context */
4479{
4480 DEV_NET *pNet = netdev_priv(pAc->dev[0]);
4481 SK_AC *pAC = pNet->pAC;
4482
4483 SK_MEMCPY(&(pAc->PnmiBackup), &(pAc->PnmiStruct),
4484 sizeof(SK_PNMI_STRUCT_DATA));
4485
4486 pAC->DiagModeActive = DIAG_ACTIVE;
4487 if (pAC->BoardLevel > SK_INIT_DATA) {
4488 if (netif_running(pAC->dev[0])) {
4489 pAC->WasIfUp[0] = SK_TRUE;
4490 pAC->DiagFlowCtrl = SK_TRUE; /* for SkGeClose */
4491 DoPrintInterfaceChange = SK_FALSE;
4492 SkDrvDeInitAdapter(pAC, 0); /* performs SkGeClose */
4493 } else {
4494 pAC->WasIfUp[0] = SK_FALSE;
4495 }
4496 if (pNet != netdev_priv(pAC->dev[1])) {
4497 pNet = netdev_priv(pAC->dev[1]);
4498 if (netif_running(pAC->dev[1])) {
4499 pAC->WasIfUp[1] = SK_TRUE;
4500 pAC->DiagFlowCtrl = SK_TRUE; /* for SkGeClose */
4501 DoPrintInterfaceChange = SK_FALSE;
4502 SkDrvDeInitAdapter(pAC, 1); /* do SkGeClose */
4503 } else {
4504 pAC->WasIfUp[1] = SK_FALSE;
4505 }
4506 }
4507 pAC->BoardLevel = SK_INIT_DATA;
4508 }
4509 return(0);
4510}
4511
4512/*****************************************************************************
4513 *
4514 * SkDrvLeaveDiagMode - handles DIAG detach request
4515 *
4516 * Description:
4517 * Notify the kernel to may access the card again after use by DIAG
4518 * Initialize the Card
4519 *
4520 * Returns:
4521 * int
4522 */
4523int SkDrvLeaveDiagMode(
4524SK_AC *pAc) /* pointer to adapter control context */
4525{
4526 SK_MEMCPY(&(pAc->PnmiStruct), &(pAc->PnmiBackup),
4527 sizeof(SK_PNMI_STRUCT_DATA));
4528 pAc->DiagModeActive = DIAG_NOTACTIVE;
4529 pAc->Pnmi.DiagAttached = SK_DIAG_IDLE;
4530 if (pAc->WasIfUp[0] == SK_TRUE) {
4531 pAc->DiagFlowCtrl = SK_TRUE; /* for SkGeClose */
4532 DoPrintInterfaceChange = SK_FALSE;
4533 SkDrvInitAdapter(pAc, 0); /* first device */
4534 }
4535 if (pAc->WasIfUp[1] == SK_TRUE) {
4536 pAc->DiagFlowCtrl = SK_TRUE; /* for SkGeClose */
4537 DoPrintInterfaceChange = SK_FALSE;
4538 SkDrvInitAdapter(pAc, 1); /* second device */
4539 }
4540 return(0);
4541}
4542
4543/*****************************************************************************
4544 *
4545 * ParseDeviceNbrFromSlotName - Evaluate PCI device number
4546 *
4547 * Description:
4548 * This function parses the PCI slot name information string and will
4549 * retrieve the devcie number out of it. The slot_name maintianed by
4550 * linux is in the form of '02:0a.0', whereas the first two characters
4551 * represent the bus number in hex (in the sample above this is
4552 * pci bus 0x02) and the next two characters the device number (0x0a).
4553 *
4554 * Returns:
4555 * SK_U32: The device number from the PCI slot name
4556 */
4557
4558static SK_U32 ParseDeviceNbrFromSlotName(
4559const char *SlotName) /* pointer to pci slot name eg. '02:0a.0' */
4560{
4561 char *CurrCharPos = (char *) SlotName;
4562 int FirstNibble = -1;
4563 int SecondNibble = -1;
4564 SK_U32 Result = 0;
4565
4566 while (*CurrCharPos != '\0') {
4567 if (*CurrCharPos == ':') {
4568 while (*CurrCharPos != '.') {
4569 CurrCharPos++;
4570 if ( (*CurrCharPos >= '0') &&
4571 (*CurrCharPos <= '9')) {
4572 if (FirstNibble == -1) {
4573 /* dec. value for '0' */
4574 FirstNibble = *CurrCharPos - 48;
4575 } else {
4576 SecondNibble = *CurrCharPos - 48;
4577 }
4578 } else if ( (*CurrCharPos >= 'a') &&
4579 (*CurrCharPos <= 'f') ) {
4580 if (FirstNibble == -1) {
4581 FirstNibble = *CurrCharPos - 87;
4582 } else {
4583 SecondNibble = *CurrCharPos - 87;
4584 }
4585 } else {
4586 Result = 0;
4587 }
4588 }
4589
4590 Result = FirstNibble;
4591 Result = Result << 4; /* first nibble is higher one */
4592 Result = Result | SecondNibble;
4593 }
4594 CurrCharPos++; /* next character */
4595 }
4596 return (Result);
4597}
4598
4599/****************************************************************************
4600 *
4601 * SkDrvDeInitAdapter - deinitialize adapter (this function is only
4602 * called if Diag attaches to that card)
4603 *
4604 * Description:
4605 * Close initialized adapter.
4606 *
4607 * Returns:
4608 * 0 - on success
4609 * error code - on error
4610 */
4611static int SkDrvDeInitAdapter(
4612SK_AC *pAC, /* pointer to adapter context */
4613int devNbr) /* what device is to be handled */
4614{
4615 struct SK_NET_DEVICE *dev;
4616
4617 dev = pAC->dev[devNbr];
4618
4619 /* On Linux 2.6 the network driver does NOT mess with reference
4620 ** counts. The driver MUST be able to be unloaded at any time
4621 ** due to the possibility of hotplug.
4622 */
4623 if (SkGeClose(dev) != 0) {
4624 return (-1);
4625 }
4626 return (0);
4627
4628} /* SkDrvDeInitAdapter() */
4629
4630/****************************************************************************
4631 *
4632 * SkDrvInitAdapter - Initialize adapter (this function is only
4633 * called if Diag deattaches from that card)
4634 *
4635 * Description:
4636 * Close initialized adapter.
4637 *
4638 * Returns:
4639 * 0 - on success
4640 * error code - on error
4641 */
4642static int SkDrvInitAdapter(
4643SK_AC *pAC, /* pointer to adapter context */
4644int devNbr) /* what device is to be handled */
4645{
4646 struct SK_NET_DEVICE *dev;
4647
4648 dev = pAC->dev[devNbr];
4649
4650 if (SkGeOpen(dev) != 0) {
4651 return (-1);
4652 }
4653
4654 /*
4655 ** Use correct MTU size and indicate to kernel TX queue can be started
4656 */
4657 if (SkGeChangeMtu(dev, dev->mtu) != 0) {
4658 return (-1);
4659 }
4660 return (0);
4661
4662} /* SkDrvInitAdapter */
4663
4664#endif
4665
4666#ifdef DEBUG
4667/****************************************************************************/
4668/* "debug only" section *****************************************************/
4669/****************************************************************************/
4670
4671
4672/*****************************************************************************
4673 *
4674 * DumpMsg - print a frame
4675 *
4676 * Description:
4677 * This function prints frames to the system logfile/to the console.
4678 *
4679 * Returns: N/A
4680 *
4681 */
4682static void DumpMsg(struct sk_buff *skb, char *str)
4683{
4684 int msglen;
4685
4686 if (skb == NULL) {
4687 printk("DumpMsg(): NULL-Message\n");
4688 return;
4689 }
4690
4691 if (skb->data == NULL) {
4692 printk("DumpMsg(): Message empty\n");
4693 return;
4694 }
4695
4696 msglen = skb->len;
4697 if (msglen > 64)
4698 msglen = 64;
4699
4700 printk("--- Begin of message from %s , len %d (from %d) ----\n", str, msglen, skb->len);
4701
4702 DumpData((char *)skb->data, msglen);
4703
4704 printk("------- End of message ---------\n");
4705} /* DumpMsg */
4706
4707
4708
4709/*****************************************************************************
4710 *
4711 * DumpData - print a data area
4712 *
4713 * Description:
4714 * This function prints a area of data to the system logfile/to the
4715 * console.
4716 *
4717 * Returns: N/A
4718 *
4719 */
4720static void DumpData(char *p, int size)
4721{
4722register int i;
4723int haddr, addr;
4724char hex_buffer[180];
4725char asc_buffer[180];
4726char HEXCHAR[] = "0123456789ABCDEF";
4727
4728 addr = 0;
4729 haddr = 0;
4730 hex_buffer[0] = 0;
4731 asc_buffer[0] = 0;
4732 for (i=0; i < size; ) {
4733 if (*p >= '0' && *p <='z')
4734 asc_buffer[addr] = *p;
4735 else
4736 asc_buffer[addr] = '.';
4737 addr++;
4738 asc_buffer[addr] = 0;
4739 hex_buffer[haddr] = HEXCHAR[(*p & 0xf0) >> 4];
4740 haddr++;
4741 hex_buffer[haddr] = HEXCHAR[*p & 0x0f];
4742 haddr++;
4743 hex_buffer[haddr] = ' ';
4744 haddr++;
4745 hex_buffer[haddr] = 0;
4746 p++;
4747 i++;
4748 if (i%16 == 0) {
4749 printk("%s %s\n", hex_buffer, asc_buffer);
4750 addr = 0;
4751 haddr = 0;
4752 }
4753 }
4754} /* DumpData */
4755
4756
4757/*****************************************************************************
4758 *
4759 * DumpLong - print a data area as long values
4760 *
4761 * Description:
4762 * This function prints a area of data to the system logfile/to the
4763 * console.
4764 *
4765 * Returns: N/A
4766 *
4767 */
4768static void DumpLong(char *pc, int size)
4769{
4770register int i;
4771int haddr, addr;
4772char hex_buffer[180];
4773char asc_buffer[180];
4774char HEXCHAR[] = "0123456789ABCDEF";
4775long *p;
4776int l;
4777
4778 addr = 0;
4779 haddr = 0;
4780 hex_buffer[0] = 0;
4781 asc_buffer[0] = 0;
4782 p = (long*) pc;
4783 for (i=0; i < size; ) {
4784 l = (long) *p;
4785 hex_buffer[haddr] = HEXCHAR[(l >> 28) & 0xf];
4786 haddr++;
4787 hex_buffer[haddr] = HEXCHAR[(l >> 24) & 0xf];
4788 haddr++;
4789 hex_buffer[haddr] = HEXCHAR[(l >> 20) & 0xf];
4790 haddr++;
4791 hex_buffer[haddr] = HEXCHAR[(l >> 16) & 0xf];
4792 haddr++;
4793 hex_buffer[haddr] = HEXCHAR[(l >> 12) & 0xf];
4794 haddr++;
4795 hex_buffer[haddr] = HEXCHAR[(l >> 8) & 0xf];
4796 haddr++;
4797 hex_buffer[haddr] = HEXCHAR[(l >> 4) & 0xf];
4798 haddr++;
4799 hex_buffer[haddr] = HEXCHAR[l & 0x0f];
4800 haddr++;
4801 hex_buffer[haddr] = ' ';
4802 haddr++;
4803 hex_buffer[haddr] = 0;
4804 p++;
4805 i++;
4806 if (i%8 == 0) {
4807 printk("%4x %s\n", (i-8)*4, hex_buffer);
4808 haddr = 0;
4809 }
4810 }
4811 printk("------------------------\n");
4812} /* DumpLong */
4813
4814#endif
4815
4816static int __devinit skge_probe_one(struct pci_dev *pdev,
4817 const struct pci_device_id *ent)
4818{
4819 SK_AC *pAC;
4820 DEV_NET *pNet = NULL;
4821 struct net_device *dev = NULL;
4822 static int boards_found = 0;
4823 int error = -ENODEV;
4824 int using_dac = 0;
4825 char DeviceStr[80];
4826
4827 if (pci_enable_device(pdev))
4828 goto out;
4829
4830 /* Configure DMA attributes. */
4831 if (sizeof(dma_addr_t) > sizeof(u32) &&
4832 !(error = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
4833 using_dac = 1;
4834 error = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
4835 if (error < 0) {
4836 printk(KERN_ERR "sk98lin %s unable to obtain 64 bit DMA "
4837 "for consistent allocations\n", pci_name(pdev));
4838 goto out_disable_device;
4839 }
4840 } else {
4841 error = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
4842 if (error) {
4843 printk(KERN_ERR "sk98lin %s no usable DMA configuration\n",
4844 pci_name(pdev));
4845 goto out_disable_device;
4846 }
4847 }
4848
4849 error = -ENOMEM;
4850 dev = alloc_etherdev(sizeof(DEV_NET));
4851 if (!dev) {
4852 printk(KERN_ERR "sk98lin: unable to allocate etherdev "
4853 "structure!\n");
4854 goto out_disable_device;
4855 }
4856
4857 pNet = netdev_priv(dev);
4858 pNet->pAC = kzalloc(sizeof(SK_AC), GFP_KERNEL);
4859 if (!pNet->pAC) {
4860 printk(KERN_ERR "sk98lin: unable to allocate adapter "
4861 "structure!\n");
4862 goto out_free_netdev;
4863 }
4864
4865 pAC = pNet->pAC;
4866 pAC->PciDev = pdev;
4867
4868 pAC->dev[0] = dev;
4869 pAC->dev[1] = dev;
4870 pAC->CheckQueue = SK_FALSE;
4871
4872 dev->irq = pdev->irq;
4873
4874 error = SkGeInitPCI(pAC);
4875 if (error) {
4876 printk(KERN_ERR "sk98lin: PCI setup failed: %i\n", error);
4877 goto out_free_netdev;
4878 }
4879
4880 SET_MODULE_OWNER(dev);
4881 dev->open = &SkGeOpen;
4882 dev->stop = &SkGeClose;
4883 dev->hard_start_xmit = &SkGeXmit;
4884 dev->get_stats = &SkGeStats;
4885 dev->set_multicast_list = &SkGeSetRxMode;
4886 dev->set_mac_address = &SkGeSetMacAddr;
4887 dev->do_ioctl = &SkGeIoctl;
4888 dev->change_mtu = &SkGeChangeMtu;
4889#ifdef CONFIG_NET_POLL_CONTROLLER
4890 dev->poll_controller = &SkGePollController;
4891#endif
4892 SET_NETDEV_DEV(dev, &pdev->dev);
4893 SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps);
4894
4895 /* Use only if yukon hardware */
4896 if (pAC->ChipsetType) {
4897#ifdef USE_SK_TX_CHECKSUM
4898 dev->features |= NETIF_F_IP_CSUM;
4899#endif
4900#ifdef SK_ZEROCOPY
4901 dev->features |= NETIF_F_SG;
4902#endif
4903#ifdef USE_SK_RX_CHECKSUM
4904 pAC->RxPort[0].RxCsum = 1;
4905#endif
4906 }
4907
4908 if (using_dac)
4909 dev->features |= NETIF_F_HIGHDMA;
4910
4911 pAC->Index = boards_found++;
4912
4913 error = SkGeBoardInit(dev, pAC);
4914 if (error)
4915 goto out_free_netdev;
4916
4917 /* Read Adapter name from VPD */
4918 if (ProductStr(pAC, DeviceStr, sizeof(DeviceStr)) != 0) {
4919 error = -EIO;
4920 printk(KERN_ERR "sk98lin: Could not read VPD data.\n");
4921 goto out_free_resources;
4922 }
4923
4924 /* Register net device */
4925 error = register_netdev(dev);
4926 if (error) {
4927 printk(KERN_ERR "sk98lin: Could not register device.\n");
4928 goto out_free_resources;
4929 }
4930
4931 /* Print adapter specific string from vpd */
4932 printk("%s: %s\n", dev->name, DeviceStr);
4933
4934 /* Print configuration settings */
4935 printk(" PrefPort:%c RlmtMode:%s\n",
4936 'A' + pAC->Rlmt.Net[0].Port[pAC->Rlmt.Net[0].PrefPort]->PortNumber,
4937 (pAC->RlmtMode==0) ? "Check Link State" :
4938 ((pAC->RlmtMode==1) ? "Check Link State" :
4939 ((pAC->RlmtMode==3) ? "Check Local Port" :
4940 ((pAC->RlmtMode==7) ? "Check Segmentation" :
4941 ((pAC->RlmtMode==17) ? "Dual Check Link State" :"Error")))));
4942
4943 SkGeYellowLED(pAC, pAC->IoBase, 1);
4944
4945 memcpy(&dev->dev_addr, &pAC->Addr.Net[0].CurrentMacAddress, 6);
4946 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
4947
4948 pNet->PortNr = 0;
4949 pNet->NetNr = 0;
4950
4951 boards_found++;
4952
4953 pci_set_drvdata(pdev, dev);
4954
4955 /* More then one port found */
4956 if ((pAC->GIni.GIMacsFound == 2 ) && (pAC->RlmtNets == 2)) {
4957 dev = alloc_etherdev(sizeof(DEV_NET));
4958 if (!dev) {
4959 printk(KERN_ERR "sk98lin: unable to allocate etherdev "
4960 "structure!\n");
4961 goto single_port;
4962 }
4963
4964 pNet = netdev_priv(dev);
4965 pNet->PortNr = 1;
4966 pNet->NetNr = 1;
4967 pNet->pAC = pAC;
4968
4969 dev->open = &SkGeOpen;
4970 dev->stop = &SkGeClose;
4971 dev->hard_start_xmit = &SkGeXmit;
4972 dev->get_stats = &SkGeStats;
4973 dev->set_multicast_list = &SkGeSetRxMode;
4974 dev->set_mac_address = &SkGeSetMacAddr;
4975 dev->do_ioctl = &SkGeIoctl;
4976 dev->change_mtu = &SkGeChangeMtu;
4977 SET_NETDEV_DEV(dev, &pdev->dev);
4978 SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps);
4979
4980 if (pAC->ChipsetType) {
4981#ifdef USE_SK_TX_CHECKSUM
4982 dev->features |= NETIF_F_IP_CSUM;
4983#endif
4984#ifdef SK_ZEROCOPY
4985 dev->features |= NETIF_F_SG;
4986#endif
4987#ifdef USE_SK_RX_CHECKSUM
4988 pAC->RxPort[1].RxCsum = 1;
4989#endif
4990 }
4991
4992 if (using_dac)
4993 dev->features |= NETIF_F_HIGHDMA;
4994
4995 error = register_netdev(dev);
4996 if (error) {
4997 printk(KERN_ERR "sk98lin: Could not register device"
4998 " for second port. (%d)\n", error);
4999 free_netdev(dev);
5000 goto single_port;
5001 }
5002
5003 pAC->dev[1] = dev;
5004 memcpy(&dev->dev_addr,
5005 &pAC->Addr.Net[1].CurrentMacAddress, 6);
5006 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
5007
5008 printk("%s: %s\n", dev->name, DeviceStr);
5009 printk(" PrefPort:B RlmtMode:Dual Check Link State\n");
5010 }
5011
5012single_port:
5013
5014 /* Save the hardware revision */
5015 pAC->HWRevision = (((pAC->GIni.GIPciHwRev >> 4) & 0x0F)*10) +
5016 (pAC->GIni.GIPciHwRev & 0x0F);
5017
5018 /* Set driver globals */
5019 pAC->Pnmi.pDriverFileName = DRIVER_FILE_NAME;
5020 pAC->Pnmi.pDriverReleaseDate = DRIVER_REL_DATE;
5021
5022 memset(&pAC->PnmiBackup, 0, sizeof(SK_PNMI_STRUCT_DATA));
5023 memcpy(&pAC->PnmiBackup, &pAC->PnmiStruct, sizeof(SK_PNMI_STRUCT_DATA));
5024
5025 return 0;
5026
5027 out_free_resources:
5028 FreeResources(dev);
5029 out_free_netdev:
5030 free_netdev(dev);
5031 out_disable_device:
5032 pci_disable_device(pdev);
5033 out:
5034 return error;
5035}
5036
5037static void __devexit skge_remove_one(struct pci_dev *pdev)
5038{
5039 struct net_device *dev = pci_get_drvdata(pdev);
5040 DEV_NET *pNet = netdev_priv(dev);
5041 SK_AC *pAC = pNet->pAC;
5042 struct net_device *otherdev = pAC->dev[1];
5043
5044 unregister_netdev(dev);
5045
5046 SkGeYellowLED(pAC, pAC->IoBase, 0);
5047
5048 if (pAC->BoardLevel == SK_INIT_RUN) {
5049 SK_EVPARA EvPara;
5050 unsigned long Flags;
5051
5052 /* board is still alive */
5053 spin_lock_irqsave(&pAC->SlowPathLock, Flags);
5054 EvPara.Para32[0] = 0;
5055 EvPara.Para32[1] = -1;
5056 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
5057 EvPara.Para32[0] = 1;
5058 EvPara.Para32[1] = -1;
5059 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
5060 SkEventDispatcher(pAC, pAC->IoBase);
5061 /* disable interrupts */
5062 SK_OUT32(pAC->IoBase, B0_IMSK, 0);
5063 SkGeDeInit(pAC, pAC->IoBase);
5064 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
5065 pAC->BoardLevel = SK_INIT_DATA;
5066 /* We do NOT check here, if IRQ was pending, of course*/
5067 }
5068
5069 if (pAC->BoardLevel == SK_INIT_IO) {
5070 /* board is still alive */
5071 SkGeDeInit(pAC, pAC->IoBase);
5072 pAC->BoardLevel = SK_INIT_DATA;
5073 }
5074
5075 FreeResources(dev);
5076 free_netdev(dev);
5077 if (otherdev != dev)
5078 free_netdev(otherdev);
5079 kfree(pAC);
5080}
5081
5082#ifdef CONFIG_PM
5083static int skge_suspend(struct pci_dev *pdev, pm_message_t state)
5084{
5085 struct net_device *dev = pci_get_drvdata(pdev);
5086 DEV_NET *pNet = netdev_priv(dev);
5087 SK_AC *pAC = pNet->pAC;
5088 struct net_device *otherdev = pAC->dev[1];
5089
5090 if (netif_running(dev)) {
5091 netif_carrier_off(dev);
5092 DoPrintInterfaceChange = SK_FALSE;
5093 SkDrvDeInitAdapter(pAC, 0); /* performs SkGeClose */
5094 netif_device_detach(dev);
5095 }
5096 if (otherdev != dev) {
5097 if (netif_running(otherdev)) {
5098 netif_carrier_off(otherdev);
5099 DoPrintInterfaceChange = SK_FALSE;
5100 SkDrvDeInitAdapter(pAC, 1); /* performs SkGeClose */
5101 netif_device_detach(otherdev);
5102 }
5103 }
5104
5105 pci_save_state(pdev);
5106 pci_enable_wake(pdev, pci_choose_state(pdev, state), 0);
5107 if (pAC->AllocFlag & SK_ALLOC_IRQ) {
5108 free_irq(dev->irq, dev);
5109 }
5110 pci_disable_device(pdev);
5111 pci_set_power_state(pdev, pci_choose_state(pdev, state));
5112
5113 return 0;
5114}
5115
5116static int skge_resume(struct pci_dev *pdev)
5117{
5118 struct net_device *dev = pci_get_drvdata(pdev);
5119 DEV_NET *pNet = netdev_priv(dev);
5120 SK_AC *pAC = pNet->pAC;
5121 struct net_device *otherdev = pAC->dev[1];
5122 int ret;
5123
5124 pci_set_power_state(pdev, PCI_D0);
5125 pci_restore_state(pdev);
5126 ret = pci_enable_device(pdev);
5127 if (ret) {
5128 printk(KERN_WARNING "sk98lin: unable to enable device %s "
5129 "in resume\n", dev->name);
5130 goto err_out;
5131 }
5132 pci_set_master(pdev);
5133 if (pAC->GIni.GIMacsFound == 2)
5134 ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", dev);
5135 else
5136 ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED, "sk98lin", dev);
5137 if (ret) {
5138 printk(KERN_WARNING "sk98lin: unable to acquire IRQ %d\n", dev->irq);
5139 ret = -EBUSY;
5140 goto err_out_disable_pdev;
5141 }
5142
5143 netif_device_attach(dev);
5144 if (netif_running(dev)) {
5145 DoPrintInterfaceChange = SK_FALSE;
5146 SkDrvInitAdapter(pAC, 0); /* first device */
5147 }
5148 if (otherdev != dev) {
5149 netif_device_attach(otherdev);
5150 if (netif_running(otherdev)) {
5151 DoPrintInterfaceChange = SK_FALSE;
5152 SkDrvInitAdapter(pAC, 1); /* second device */
5153 }
5154 }
5155
5156 return 0;
5157
5158err_out_disable_pdev:
5159 pci_disable_device(pdev);
5160err_out:
5161 pAC->AllocFlag &= ~SK_ALLOC_IRQ;
5162 dev->irq = 0;
5163 return ret;
5164}
5165#else
5166#define skge_suspend NULL
5167#define skge_resume NULL
5168#endif
5169
5170static struct pci_device_id skge_pci_tbl[] = {
5171#ifdef SK98LIN_ALL_DEVICES
5172 { PCI_VENDOR_ID_3COM, 0x1700, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
5173 { PCI_VENDOR_ID_3COM, 0x80eb, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
5174#endif
5175#ifdef GENESIS
5176 /* Generic SysKonnect SK-98xx Gigabit Ethernet Server Adapter */
5177 { PCI_VENDOR_ID_SYSKONNECT, 0x4300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
5178#endif
5179 /* Generic SysKonnect SK-98xx V2.0 Gigabit Ethernet Adapter */
5180 { PCI_VENDOR_ID_SYSKONNECT, 0x4320, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
5181#ifdef SK98LIN_ALL_DEVICES
5182/* DLink card does not have valid VPD so this driver gags
5183 * { PCI_VENDOR_ID_DLINK, 0x4c00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
5184 */
5185 { PCI_VENDOR_ID_MARVELL, 0x4320, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
5186 { PCI_VENDOR_ID_MARVELL, 0x5005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
5187 { PCI_VENDOR_ID_CNET, 0x434e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
5188 { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, 0x0015, },
5189 { PCI_VENDOR_ID_LINKSYS, 0x1064, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
5190#endif
5191 { 0 }
5192};
5193
5194MODULE_DEVICE_TABLE(pci, skge_pci_tbl);
5195
5196static struct pci_driver skge_driver = {
5197 .name = "sk98lin",
5198 .id_table = skge_pci_tbl,
5199 .probe = skge_probe_one,
5200 .remove = __devexit_p(skge_remove_one),
5201 .suspend = skge_suspend,
5202 .resume = skge_resume,
5203};
5204
5205static int __init skge_init(void)
5206{
5207 printk(KERN_NOTICE "sk98lin: driver has been replaced by the skge driver"
5208 " and is scheduled for removal\n");
5209
5210 return pci_register_driver(&skge_driver);
5211}
5212
5213static void __exit skge_exit(void)
5214{
5215 pci_unregister_driver(&skge_driver);
5216}
5217
5218module_init(skge_init);
5219module_exit(skge_exit);
diff --git a/drivers/net/sk98lin/skgehwt.c b/drivers/net/sk98lin/skgehwt.c
new file mode 100644
index 0000000000..db670993c2
--- /dev/null
+++ b/drivers/net/sk98lin/skgehwt.c
@@ -0,0 +1,171 @@
1/******************************************************************************
2 *
3 * Name: skgehwt.c
4 * Project: Gigabit Ethernet Adapters, Event Scheduler Module
5 * Version: $Revision: 1.15 $
6 * Date: $Date: 2003/09/16 13:41:23 $
7 * Purpose: Hardware Timer
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/*
26 * Event queue and dispatcher
27 */
28#if (defined(DEBUG) || ((!defined(LINT)) && (!defined(SK_SLIM))))
29static const char SysKonnectFileId[] =
30 "@(#) $Id: skgehwt.c,v 1.15 2003/09/16 13:41:23 rschmidt Exp $ (C) Marvell.";
31#endif
32
33#include "h/skdrv1st.h" /* Driver Specific Definitions */
34#include "h/skdrv2nd.h" /* Adapter Control- and Driver specific Def. */
35
36#ifdef __C2MAN__
37/*
38 * Hardware Timer function queue management.
39 */
40intro()
41{}
42#endif
43
44/*
45 * Prototypes of local functions.
46 */
47#define SK_HWT_MAX (65000)
48
49/* correction factor */
50#define SK_HWT_FAC (1000 * (SK_U32)pAC->GIni.GIHstClkFact / 100)
51
52/*
53 * Initialize hardware timer.
54 *
55 * Must be called during init level 1.
56 */
57void SkHwtInit(
58SK_AC *pAC, /* Adapters context */
59SK_IOC Ioc) /* IoContext */
60{
61 pAC->Hwt.TStart = 0 ;
62 pAC->Hwt.TStop = 0 ;
63 pAC->Hwt.TActive = SK_FALSE;
64
65 SkHwtStop(pAC, Ioc);
66}
67
68/*
69 *
70 * Start hardware timer (clock ticks are 16us).
71 *
72 */
73void SkHwtStart(
74SK_AC *pAC, /* Adapters context */
75SK_IOC Ioc, /* IoContext */
76SK_U32 Time) /* Time in units of 16us to load the timer with. */
77{
78 SK_U32 Cnt;
79
80 if (Time > SK_HWT_MAX)
81 Time = SK_HWT_MAX;
82
83 pAC->Hwt.TStart = Time;
84 pAC->Hwt.TStop = 0L;
85
86 Cnt = Time;
87
88 /*
89 * if time < 16 us
90 * time = 16 us
91 */
92 if (!Cnt) {
93 Cnt++;
94 }
95
96 SK_OUT32(Ioc, B2_TI_INI, Cnt * SK_HWT_FAC);
97
98 SK_OUT16(Ioc, B2_TI_CTRL, TIM_START); /* Start timer. */
99
100 pAC->Hwt.TActive = SK_TRUE;
101}
102
103/*
104 * Stop hardware timer.
105 * and clear the timer IRQ
106 */
107void SkHwtStop(
108SK_AC *pAC, /* Adapters context */
109SK_IOC Ioc) /* IoContext */
110{
111 SK_OUT16(Ioc, B2_TI_CTRL, TIM_STOP);
112
113 SK_OUT16(Ioc, B2_TI_CTRL, TIM_CLR_IRQ);
114
115 pAC->Hwt.TActive = SK_FALSE;
116}
117
118
119/*
120 * Stop hardware timer and read time elapsed since last start.
121 *
122 * returns
123 * The elapsed time since last start in units of 16us.
124 *
125 */
126SK_U32 SkHwtRead(
127SK_AC *pAC, /* Adapters context */
128SK_IOC Ioc) /* IoContext */
129{
130 SK_U32 TRead;
131 SK_U32 IStatus;
132
133 if (pAC->Hwt.TActive) {
134
135 SkHwtStop(pAC, Ioc);
136
137 SK_IN32(Ioc, B2_TI_VAL, &TRead);
138 TRead /= SK_HWT_FAC;
139
140 SK_IN32(Ioc, B0_ISRC, &IStatus);
141
142 /* Check if timer expired (or wraped around) */
143 if ((TRead > pAC->Hwt.TStart) || (IStatus & IS_TIMINT)) {
144
145 SkHwtStop(pAC, Ioc);
146
147 pAC->Hwt.TStop = pAC->Hwt.TStart;
148 }
149 else {
150
151 pAC->Hwt.TStop = pAC->Hwt.TStart - TRead;
152 }
153 }
154 return(pAC->Hwt.TStop);
155}
156
157/*
158 * interrupt source= timer
159 */
160void SkHwtIsr(
161SK_AC *pAC, /* Adapters context */
162SK_IOC Ioc) /* IoContext */
163{
164 SkHwtStop(pAC, Ioc);
165
166 pAC->Hwt.TStop = pAC->Hwt.TStart;
167
168 SkTimerDone(pAC, Ioc);
169}
170
171/* End of file */
diff --git a/drivers/net/sk98lin/skgeinit.c b/drivers/net/sk98lin/skgeinit.c
new file mode 100644
index 0000000000..67f1d6a5c1
--- /dev/null
+++ b/drivers/net/sk98lin/skgeinit.c
@@ -0,0 +1,2005 @@
1/******************************************************************************
2 *
3 * Name: skgeinit.c
4 * Project: Gigabit Ethernet Adapters, Common Modules
5 * Version: $Revision: 1.97 $
6 * Date: $Date: 2003/10/02 16:45:31 $
7 * Purpose: Contains functions to initialize the adapter
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25#include "h/skdrv1st.h"
26#include "h/skdrv2nd.h"
27
28/* global variables ***********************************************************/
29
30/* local variables ************************************************************/
31
32#if (defined(DEBUG) || ((!defined(LINT)) && (!defined(SK_SLIM))))
33static const char SysKonnectFileId[] =
34 "@(#) $Id: skgeinit.c,v 1.97 2003/10/02 16:45:31 rschmidt Exp $ (C) Marvell.";
35#endif
36
37struct s_QOffTab {
38 int RxQOff; /* Receive Queue Address Offset */
39 int XsQOff; /* Sync Tx Queue Address Offset */
40 int XaQOff; /* Async Tx Queue Address Offset */
41};
42static struct s_QOffTab QOffTab[] = {
43 {Q_R1, Q_XS1, Q_XA1}, {Q_R2, Q_XS2, Q_XA2}
44};
45
46struct s_Config {
47 char ScanString[8];
48 SK_U32 Value;
49};
50
51static struct s_Config OemConfig = {
52 {'O','E','M','_','C','o','n','f'},
53#ifdef SK_OEM_CONFIG
54 OEM_CONFIG_VALUE,
55#else
56 0,
57#endif
58};
59
60/******************************************************************************
61 *
62 * SkGePollTxD() - Enable / Disable Descriptor Polling of TxD Rings
63 *
64 * Description:
65 * Enable or disable the descriptor polling of the transmit descriptor
66 * ring(s) (TxD) for port 'Port'.
67 * The new configuration is *not* saved over any SkGeStopPort() and
68 * SkGeInitPort() calls.
69 *
70 * Returns:
71 * nothing
72 */
73void SkGePollTxD(
74SK_AC *pAC, /* adapter context */
75SK_IOC IoC, /* IO context */
76int Port, /* Port Index (MAC_1 + n) */
77SK_BOOL PollTxD) /* SK_TRUE (enable pol.), SK_FALSE (disable pol.) */
78{
79 SK_GEPORT *pPrt;
80 SK_U32 DWord;
81
82 pPrt = &pAC->GIni.GP[Port];
83
84 DWord = (SK_U32)(PollTxD ? CSR_ENA_POL : CSR_DIS_POL);
85
86 if (pPrt->PXSQSize != 0) {
87 SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), DWord);
88 }
89
90 if (pPrt->PXAQSize != 0) {
91 SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), DWord);
92 }
93} /* SkGePollTxD */
94
95
96/******************************************************************************
97 *
98 * SkGeYellowLED() - Switch the yellow LED on or off.
99 *
100 * Description:
101 * Switch the yellow LED on or off.
102 *
103 * Note:
104 * This function may be called any time after SkGeInit(Level 1).
105 *
106 * Returns:
107 * nothing
108 */
109void SkGeYellowLED(
110SK_AC *pAC, /* adapter context */
111SK_IOC IoC, /* IO context */
112int State) /* yellow LED state, 0 = OFF, 0 != ON */
113{
114 if (State == 0) {
115 /* Switch yellow LED OFF */
116 SK_OUT8(IoC, B0_LED, LED_STAT_OFF);
117 }
118 else {
119 /* Switch yellow LED ON */
120 SK_OUT8(IoC, B0_LED, LED_STAT_ON);
121 }
122} /* SkGeYellowLED */
123
124
125#if (!defined(SK_SLIM) || defined(GENESIS))
126/******************************************************************************
127 *
128 * SkGeXmitLED() - Modify the Operational Mode of a transmission LED.
129 *
130 * Description:
131 * The Rx or Tx LED which is specified by 'Led' will be
132 * enabled, disabled or switched on in test mode.
133 *
134 * Note:
135 * 'Led' must contain the address offset of the LEDs INI register.
136 *
137 * Usage:
138 * SkGeXmitLED(pAC, IoC, MR_ADDR(Port, TX_LED_INI), SK_LED_ENA);
139 *
140 * Returns:
141 * nothing
142 */
143void SkGeXmitLED(
144SK_AC *pAC, /* adapter context */
145SK_IOC IoC, /* IO context */
146int Led, /* offset to the LED Init Value register */
147int Mode) /* Mode may be SK_LED_DIS, SK_LED_ENA, SK_LED_TST */
148{
149 SK_U32 LedIni;
150
151 switch (Mode) {
152 case SK_LED_ENA:
153 LedIni = SK_XMIT_DUR * (SK_U32)pAC->GIni.GIHstClkFact / 100;
154 SK_OUT32(IoC, Led + XMIT_LED_INI, LedIni);
155 SK_OUT8(IoC, Led + XMIT_LED_CTRL, LED_START);
156 break;
157 case SK_LED_TST:
158 SK_OUT8(IoC, Led + XMIT_LED_TST, LED_T_ON);
159 SK_OUT32(IoC, Led + XMIT_LED_CNT, 100);
160 SK_OUT8(IoC, Led + XMIT_LED_CTRL, LED_START);
161 break;
162 case SK_LED_DIS:
163 default:
164 /*
165 * Do NOT stop the LED Timer here. The LED might be
166 * in on state. But it needs to go off.
167 */
168 SK_OUT32(IoC, Led + XMIT_LED_CNT, 0);
169 SK_OUT8(IoC, Led + XMIT_LED_TST, LED_T_OFF);
170 break;
171 }
172
173 /*
174 * 1000BT: The Transmit LED is driven by the PHY.
175 * But the default LED configuration is used for
176 * Level One and Broadcom PHYs.
177 * (Broadcom: It may be that PHY_B_PEC_EN_LTR has to be set.)
178 * (In this case it has to be added here. But we will see. XXX)
179 */
180} /* SkGeXmitLED */
181#endif /* !SK_SLIM || GENESIS */
182
183
184/******************************************************************************
185 *
186 * DoCalcAddr() - Calculates the start and the end address of a queue.
187 *
188 * Description:
189 * This function calculates the start and the end address of a queue.
190 * Afterwards the 'StartVal' is incremented to the next start position.
191 * If the port is already initialized the calculated values
192 * will be checked against the configured values and an
193 * error will be returned, if they are not equal.
194 * If the port is not initialized the values will be written to
195 * *StartAdr and *EndAddr.
196 *
197 * Returns:
198 * 0: success
199 * 1: configuration error
200 */
201static int DoCalcAddr(
202SK_AC *pAC, /* adapter context */
203SK_GEPORT SK_FAR *pPrt, /* port index */
204int QuSize, /* size of the queue to configure in kB */
205SK_U32 SK_FAR *StartVal, /* start value for address calculation */
206SK_U32 SK_FAR *QuStartAddr,/* start addr to calculate */
207SK_U32 SK_FAR *QuEndAddr) /* end address to calculate */
208{
209 SK_U32 EndVal;
210 SK_U32 NextStart;
211 int Rtv;
212
213 Rtv = 0;
214 if (QuSize == 0) {
215 EndVal = *StartVal;
216 NextStart = EndVal;
217 }
218 else {
219 EndVal = *StartVal + ((SK_U32)QuSize * 1024) - 1;
220 NextStart = EndVal + 1;
221 }
222
223 if (pPrt->PState >= SK_PRT_INIT) {
224 if (*StartVal != *QuStartAddr || EndVal != *QuEndAddr) {
225 Rtv = 1;
226 }
227 }
228 else {
229 *QuStartAddr = *StartVal;
230 *QuEndAddr = EndVal;
231 }
232
233 *StartVal = NextStart;
234 return(Rtv);
235} /* DoCalcAddr */
236
237/******************************************************************************
238 *
239 * SkGeInitAssignRamToQueues() - allocate default queue sizes
240 *
241 * Description:
242 * This function assigns the memory to the different queues and ports.
243 * When DualNet is set to SK_TRUE all ports get the same amount of memory.
244 * Otherwise the first port gets most of the memory and all the
245 * other ports just the required minimum.
246 * This function can only be called when pAC->GIni.GIRamSize and
247 * pAC->GIni.GIMacsFound have been initialized, usually this happens
248 * at init level 1
249 *
250 * Returns:
251 * 0 - ok
252 * 1 - invalid input values
253 * 2 - not enough memory
254 */
255
256int SkGeInitAssignRamToQueues(
257SK_AC *pAC, /* Adapter context */
258int ActivePort, /* Active Port in RLMT mode */
259SK_BOOL DualNet) /* adapter context */
260{
261 int i;
262 int UsedKilobytes; /* memory already assigned */
263 int ActivePortKilobytes; /* memory available for active port */
264 SK_GEPORT *pGePort;
265
266 UsedKilobytes = 0;
267
268 if (ActivePort >= pAC->GIni.GIMacsFound) {
269 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT,
270 ("SkGeInitAssignRamToQueues: ActivePort (%d) invalid\n",
271 ActivePort));
272 return(1);
273 }
274 if (((pAC->GIni.GIMacsFound * (SK_MIN_RXQ_SIZE + SK_MIN_TXQ_SIZE)) +
275 ((RAM_QUOTA_SYNC == 0) ? 0 : SK_MIN_TXQ_SIZE)) > pAC->GIni.GIRamSize) {
276 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT,
277 ("SkGeInitAssignRamToQueues: Not enough memory (%d)\n",
278 pAC->GIni.GIRamSize));
279 return(2);
280 }
281
282 if (DualNet) {
283 /* every port gets the same amount of memory */
284 ActivePortKilobytes = pAC->GIni.GIRamSize / pAC->GIni.GIMacsFound;
285 for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
286
287 pGePort = &pAC->GIni.GP[i];
288
289 /* take away the minimum memory for active queues */
290 ActivePortKilobytes -= (SK_MIN_RXQ_SIZE + SK_MIN_TXQ_SIZE);
291
292 /* receive queue gets the minimum + 80% of the rest */
293 pGePort->PRxQSize = (int) (ROUND_QUEUE_SIZE_KB((
294 ActivePortKilobytes * (unsigned long) RAM_QUOTA_RX) / 100))
295 + SK_MIN_RXQ_SIZE;
296
297 ActivePortKilobytes -= (pGePort->PRxQSize - SK_MIN_RXQ_SIZE);
298
299 /* synchronous transmit queue */
300 pGePort->PXSQSize = 0;
301
302 /* asynchronous transmit queue */
303 pGePort->PXAQSize = (int) ROUND_QUEUE_SIZE_KB(ActivePortKilobytes +
304 SK_MIN_TXQ_SIZE);
305 }
306 }
307 else {
308 /* Rlmt Mode or single link adapter */
309
310 /* Set standby queue size defaults for all standby ports */
311 for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
312
313 if (i != ActivePort) {
314 pGePort = &pAC->GIni.GP[i];
315
316 pGePort->PRxQSize = SK_MIN_RXQ_SIZE;
317 pGePort->PXAQSize = SK_MIN_TXQ_SIZE;
318 pGePort->PXSQSize = 0;
319
320 /* Count used RAM */
321 UsedKilobytes += pGePort->PRxQSize + pGePort->PXAQSize;
322 }
323 }
324 /* what's left? */
325 ActivePortKilobytes = pAC->GIni.GIRamSize - UsedKilobytes;
326
327 /* assign it to the active port */
328 /* first take away the minimum memory */
329 ActivePortKilobytes -= (SK_MIN_RXQ_SIZE + SK_MIN_TXQ_SIZE);
330 pGePort = &pAC->GIni.GP[ActivePort];
331
332 /* receive queue get's the minimum + 80% of the rest */
333 pGePort->PRxQSize = (int) (ROUND_QUEUE_SIZE_KB((ActivePortKilobytes *
334 (unsigned long) RAM_QUOTA_RX) / 100)) + SK_MIN_RXQ_SIZE;
335
336 ActivePortKilobytes -= (pGePort->PRxQSize - SK_MIN_RXQ_SIZE);
337
338 /* synchronous transmit queue */
339 pGePort->PXSQSize = 0;
340
341 /* asynchronous transmit queue */
342 pGePort->PXAQSize = (int) ROUND_QUEUE_SIZE_KB(ActivePortKilobytes) +
343 SK_MIN_TXQ_SIZE;
344 }
345#ifdef VCPU
346 VCPUprintf(0, "PRxQSize=%u, PXSQSize=%u, PXAQSize=%u\n",
347 pGePort->PRxQSize, pGePort->PXSQSize, pGePort->PXAQSize);
348#endif /* VCPU */
349
350 return(0);
351} /* SkGeInitAssignRamToQueues */
352
353/******************************************************************************
354 *
355 * SkGeCheckQSize() - Checks the Adapters Queue Size Configuration
356 *
357 * Description:
358 * This function verifies the Queue Size Configuration specified
359 * in the variables PRxQSize, PXSQSize, and PXAQSize of all
360 * used ports.
361 * This requirements must be fullfilled to have a valid configuration:
362 * - The size of all queues must not exceed GIRamSize.
363 * - The queue sizes must be specified in units of 8 kB.
364 * - The size of Rx queues of available ports must not be
365 * smaller than 16 kB.
366 * - The size of at least one Tx queue (synch. or asynch.)
367 * of available ports must not be smaller than 16 kB
368 * when Jumbo Frames are used.
369 * - The RAM start and end addresses must not be changed
370 * for ports which are already initialized.
371 * Furthermore SkGeCheckQSize() defines the Start and End Addresses
372 * of all ports and stores them into the HWAC port structure.
373 *
374 * Returns:
375 * 0: Queue Size Configuration valid
376 * 1: Queue Size Configuration invalid
377 */
378static int SkGeCheckQSize(
379SK_AC *pAC, /* adapter context */
380int Port) /* port index */
381{
382 SK_GEPORT *pPrt;
383 int i;
384 int Rtv;
385 int Rtv2;
386 SK_U32 StartAddr;
387#ifndef SK_SLIM
388 int UsedMem; /* total memory used (max. found ports) */
389#endif
390
391 Rtv = 0;
392
393#ifndef SK_SLIM
394
395 UsedMem = 0;
396 for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
397 pPrt = &pAC->GIni.GP[i];
398
399 if ((pPrt->PRxQSize & QZ_UNITS) != 0 ||
400 (pPrt->PXSQSize & QZ_UNITS) != 0 ||
401 (pPrt->PXAQSize & QZ_UNITS) != 0) {
402
403 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E012, SKERR_HWI_E012MSG);
404 return(1);
405 }
406
407 if (i == Port && pPrt->PRxQSize < SK_MIN_RXQ_SIZE) {
408 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E011, SKERR_HWI_E011MSG);
409 return(1);
410 }
411
412 /*
413 * the size of at least one Tx queue (synch. or asynch.) has to be > 0.
414 * if Jumbo Frames are used, this size has to be >= 16 kB.
415 */
416 if ((i == Port && pPrt->PXSQSize == 0 && pPrt->PXAQSize == 0) ||
417 (pAC->GIni.GIPortUsage == SK_JUMBO_LINK &&
418 ((pPrt->PXSQSize > 0 && pPrt->PXSQSize < SK_MIN_TXQ_SIZE) ||
419 (pPrt->PXAQSize > 0 && pPrt->PXAQSize < SK_MIN_TXQ_SIZE)))) {
420 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E023, SKERR_HWI_E023MSG);
421 return(1);
422 }
423
424 UsedMem += pPrt->PRxQSize + pPrt->PXSQSize + pPrt->PXAQSize;
425 }
426
427 if (UsedMem > pAC->GIni.GIRamSize) {
428 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E012, SKERR_HWI_E012MSG);
429 return(1);
430 }
431#endif /* !SK_SLIM */
432
433 /* Now start address calculation */
434 StartAddr = pAC->GIni.GIRamOffs;
435 for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
436 pPrt = &pAC->GIni.GP[i];
437
438 /* Calculate/Check values for the receive queue */
439 Rtv2 = DoCalcAddr(pAC, pPrt, pPrt->PRxQSize, &StartAddr,
440 &pPrt->PRxQRamStart, &pPrt->PRxQRamEnd);
441 Rtv |= Rtv2;
442
443 /* Calculate/Check values for the synchronous Tx queue */
444 Rtv2 = DoCalcAddr(pAC, pPrt, pPrt->PXSQSize, &StartAddr,
445 &pPrt->PXsQRamStart, &pPrt->PXsQRamEnd);
446 Rtv |= Rtv2;
447
448 /* Calculate/Check values for the asynchronous Tx queue */
449 Rtv2 = DoCalcAddr(pAC, pPrt, pPrt->PXAQSize, &StartAddr,
450 &pPrt->PXaQRamStart, &pPrt->PXaQRamEnd);
451 Rtv |= Rtv2;
452
453 if (Rtv) {
454 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E013, SKERR_HWI_E013MSG);
455 return(1);
456 }
457 }
458
459 return(0);
460} /* SkGeCheckQSize */
461
462
463#ifdef GENESIS
464/******************************************************************************
465 *
466 * SkGeInitMacArb() - Initialize the MAC Arbiter
467 *
468 * Description:
469 * This function initializes the MAC Arbiter.
470 * It must not be called if there is still an
471 * initialized or active port.
472 *
473 * Returns:
474 * nothing
475 */
476static void SkGeInitMacArb(
477SK_AC *pAC, /* adapter context */
478SK_IOC IoC) /* IO context */
479{
480 /* release local reset */
481 SK_OUT16(IoC, B3_MA_TO_CTRL, MA_RST_CLR);
482
483 /* configure timeout values */
484 SK_OUT8(IoC, B3_MA_TOINI_RX1, SK_MAC_TO_53);
485 SK_OUT8(IoC, B3_MA_TOINI_RX2, SK_MAC_TO_53);
486 SK_OUT8(IoC, B3_MA_TOINI_TX1, SK_MAC_TO_53);
487 SK_OUT8(IoC, B3_MA_TOINI_TX2, SK_MAC_TO_53);
488
489 SK_OUT8(IoC, B3_MA_RCINI_RX1, 0);
490 SK_OUT8(IoC, B3_MA_RCINI_RX2, 0);
491 SK_OUT8(IoC, B3_MA_RCINI_TX1, 0);
492 SK_OUT8(IoC, B3_MA_RCINI_TX2, 0);
493
494 /* recovery values are needed for XMAC II Rev. B2 only */
495 /* Fast Output Enable Mode was intended to use with Rev. B2, but now? */
496
497 /*
498 * There is no start or enable button to push, therefore
499 * the MAC arbiter is configured and enabled now.
500 */
501} /* SkGeInitMacArb */
502
503
504/******************************************************************************
505 *
506 * SkGeInitPktArb() - Initialize the Packet Arbiter
507 *
508 * Description:
509 * This function initializes the Packet Arbiter.
510 * It must not be called if there is still an
511 * initialized or active port.
512 *
513 * Returns:
514 * nothing
515 */
516static void SkGeInitPktArb(
517SK_AC *pAC, /* adapter context */
518SK_IOC IoC) /* IO context */
519{
520 /* release local reset */
521 SK_OUT16(IoC, B3_PA_CTRL, PA_RST_CLR);
522
523 /* configure timeout values */
524 SK_OUT16(IoC, B3_PA_TOINI_RX1, SK_PKT_TO_MAX);
525 SK_OUT16(IoC, B3_PA_TOINI_RX2, SK_PKT_TO_MAX);
526 SK_OUT16(IoC, B3_PA_TOINI_TX1, SK_PKT_TO_MAX);
527 SK_OUT16(IoC, B3_PA_TOINI_TX2, SK_PKT_TO_MAX);
528
529 /*
530 * enable timeout timers if jumbo frames not used
531 * NOTE: the packet arbiter timeout interrupt is needed for
532 * half duplex hangup workaround
533 */
534 if (pAC->GIni.GIPortUsage != SK_JUMBO_LINK) {
535 if (pAC->GIni.GIMacsFound == 1) {
536 SK_OUT16(IoC, B3_PA_CTRL, PA_ENA_TO_TX1);
537 }
538 else {
539 SK_OUT16(IoC, B3_PA_CTRL, PA_ENA_TO_TX1 | PA_ENA_TO_TX2);
540 }
541 }
542} /* SkGeInitPktArb */
543#endif /* GENESIS */
544
545
546/******************************************************************************
547 *
548 * SkGeInitMacFifo() - Initialize the MAC FIFOs
549 *
550 * Description:
551 * Initialize all MAC FIFOs of the specified port
552 *
553 * Returns:
554 * nothing
555 */
556static void SkGeInitMacFifo(
557SK_AC *pAC, /* adapter context */
558SK_IOC IoC, /* IO context */
559int Port) /* Port Index (MAC_1 + n) */
560{
561 SK_U16 Word;
562#ifdef VCPU
563 SK_U32 DWord;
564#endif /* VCPU */
565 /*
566 * For each FIFO:
567 * - release local reset
568 * - use default value for MAC FIFO size
569 * - setup defaults for the control register
570 * - enable the FIFO
571 */
572
573#ifdef GENESIS
574 if (pAC->GIni.GIGenesis) {
575 /* Configure Rx MAC FIFO */
576 SK_OUT8(IoC, MR_ADDR(Port, RX_MFF_CTRL2), MFF_RST_CLR);
577 SK_OUT16(IoC, MR_ADDR(Port, RX_MFF_CTRL1), MFF_RX_CTRL_DEF);
578 SK_OUT8(IoC, MR_ADDR(Port, RX_MFF_CTRL2), MFF_ENA_OP_MD);
579
580 /* Configure Tx MAC FIFO */
581 SK_OUT8(IoC, MR_ADDR(Port, TX_MFF_CTRL2), MFF_RST_CLR);
582 SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), MFF_TX_CTRL_DEF);
583 SK_OUT8(IoC, MR_ADDR(Port, TX_MFF_CTRL2), MFF_ENA_OP_MD);
584
585 /* Enable frame flushing if jumbo frames used */
586 if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) {
587 SK_OUT16(IoC, MR_ADDR(Port, RX_MFF_CTRL1), MFF_ENA_FLUSH);
588 }
589 }
590#endif /* GENESIS */
591
592#ifdef YUKON
593 if (pAC->GIni.GIYukon) {
594 /* set Rx GMAC FIFO Flush Mask */
595 SK_OUT16(IoC, MR_ADDR(Port, RX_GMF_FL_MSK), (SK_U16)RX_FF_FL_DEF_MSK);
596
597 Word = (SK_U16)GMF_RX_CTRL_DEF;
598
599 /* disable Rx GMAC FIFO Flush for YUKON-Lite Rev. A0 only */
600 if (pAC->GIni.GIYukonLite && pAC->GIni.GIChipId == CHIP_ID_YUKON) {
601
602 Word &= ~GMF_RX_F_FL_ON;
603 }
604
605 /* Configure Rx MAC FIFO */
606 SK_OUT8(IoC, MR_ADDR(Port, RX_GMF_CTRL_T), (SK_U8)GMF_RST_CLR);
607 SK_OUT16(IoC, MR_ADDR(Port, RX_GMF_CTRL_T), Word);
608
609 /* set Rx GMAC FIFO Flush Threshold (default: 0x0a -> 56 bytes) */
610 SK_OUT16(IoC, MR_ADDR(Port, RX_GMF_FL_THR), RX_GMF_FL_THR_DEF);
611
612 /* Configure Tx MAC FIFO */
613 SK_OUT8(IoC, MR_ADDR(Port, TX_GMF_CTRL_T), (SK_U8)GMF_RST_CLR);
614 SK_OUT16(IoC, MR_ADDR(Port, TX_GMF_CTRL_T), (SK_U16)GMF_TX_CTRL_DEF);
615
616#ifdef VCPU
617 SK_IN32(IoC, MR_ADDR(Port, RX_GMF_AF_THR), &DWord);
618 SK_IN32(IoC, MR_ADDR(Port, TX_GMF_AE_THR), &DWord);
619#endif /* VCPU */
620
621 /* set Tx GMAC FIFO Almost Empty Threshold */
622/* SK_OUT32(IoC, MR_ADDR(Port, TX_GMF_AE_THR), 0); */
623 }
624#endif /* YUKON */
625
626} /* SkGeInitMacFifo */
627
628#ifdef SK_LNK_SYNC_CNT
629/******************************************************************************
630 *
631 * SkGeLoadLnkSyncCnt() - Load the Link Sync Counter and starts counting
632 *
633 * Description:
634 * This function starts the Link Sync Counter of the specified
635 * port and enables the generation of an Link Sync IRQ.
636 * The Link Sync Counter may be used to detect an active link,
637 * if autonegotiation is not used.
638 *
639 * Note:
640 * o To ensure receiving the Link Sync Event the LinkSyncCounter
641 * should be initialized BEFORE clearing the XMAC's reset!
642 * o Enable IS_LNK_SYNC_M1 and IS_LNK_SYNC_M2 after calling this
643 * function.
644 *
645 * Returns:
646 * nothing
647 */
648void SkGeLoadLnkSyncCnt(
649SK_AC *pAC, /* adapter context */
650SK_IOC IoC, /* IO context */
651int Port, /* Port Index (MAC_1 + n) */
652SK_U32 CntVal) /* Counter value */
653{
654 SK_U32 OrgIMsk;
655 SK_U32 NewIMsk;
656 SK_U32 ISrc;
657 SK_BOOL IrqPend;
658
659 /* stop counter */
660 SK_OUT8(IoC, MR_ADDR(Port, LNK_SYNC_CTRL), LED_STOP);
661
662 /*
663 * ASIC problem:
664 * Each time starting the Link Sync Counter an IRQ is generated
665 * by the adapter. See problem report entry from 21.07.98
666 *
667 * Workaround: Disable Link Sync IRQ and clear the unexpeced IRQ
668 * if no IRQ is already pending.
669 */
670 IrqPend = SK_FALSE;
671 SK_IN32(IoC, B0_ISRC, &ISrc);
672 SK_IN32(IoC, B0_IMSK, &OrgIMsk);
673 if (Port == MAC_1) {
674 NewIMsk = OrgIMsk & ~IS_LNK_SYNC_M1;
675 if ((ISrc & IS_LNK_SYNC_M1) != 0) {
676 IrqPend = SK_TRUE;
677 }
678 }
679 else {
680 NewIMsk = OrgIMsk & ~IS_LNK_SYNC_M2;
681 if ((ISrc & IS_LNK_SYNC_M2) != 0) {
682 IrqPend = SK_TRUE;
683 }
684 }
685 if (!IrqPend) {
686 SK_OUT32(IoC, B0_IMSK, NewIMsk);
687 }
688
689 /* load counter */
690 SK_OUT32(IoC, MR_ADDR(Port, LNK_SYNC_INI), CntVal);
691
692 /* start counter */
693 SK_OUT8(IoC, MR_ADDR(Port, LNK_SYNC_CTRL), LED_START);
694
695 if (!IrqPend) {
696 /* clear the unexpected IRQ, and restore the interrupt mask */
697 SK_OUT8(IoC, MR_ADDR(Port, LNK_SYNC_CTRL), LED_CLR_IRQ);
698 SK_OUT32(IoC, B0_IMSK, OrgIMsk);
699 }
700} /* SkGeLoadLnkSyncCnt*/
701#endif /* SK_LNK_SYNC_CNT */
702
703#if defined(SK_DIAG) || defined(SK_CFG_SYNC)
704/******************************************************************************
705 *
706 * SkGeCfgSync() - Configure synchronous bandwidth for this port.
707 *
708 * Description:
709 * This function may be used to configure synchronous bandwidth
710 * to the specified port. This may be done any time after
711 * initializing the port. The configuration values are NOT saved
712 * in the HWAC port structure and will be overwritten any
713 * time when stopping and starting the port.
714 * Any values for the synchronous configuration will be ignored
715 * if the size of the synchronous queue is zero!
716 *
717 * The default configuration for the synchronous service is
718 * TXA_ENA_FSYNC. This means if the size of
719 * the synchronous queue is unequal zero but no specific
720 * synchronous bandwidth is configured, the synchronous queue
721 * will always have the 'unlimited' transmit priority!
722 *
723 * This mode will be restored if the synchronous bandwidth is
724 * deallocated ('IntTime' = 0 and 'LimCount' = 0).
725 *
726 * Returns:
727 * 0: success
728 * 1: parameter configuration error
729 * 2: try to configure quality of service although no
730 * synchronous queue is configured
731 */
732int SkGeCfgSync(
733SK_AC *pAC, /* adapter context */
734SK_IOC IoC, /* IO context */
735int Port, /* Port Index (MAC_1 + n) */
736SK_U32 IntTime, /* Interval Timer Value in units of 8ns */
737SK_U32 LimCount, /* Number of bytes to transfer during IntTime */
738int SyncMode) /* Sync Mode: TXA_ENA_ALLOC | TXA_DIS_ALLOC | 0 */
739{
740 int Rtv;
741
742 Rtv = 0;
743
744 /* check the parameters */
745 if (LimCount > IntTime ||
746 (LimCount == 0 && IntTime != 0) ||
747 (LimCount != 0 && IntTime == 0)) {
748
749 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E010, SKERR_HWI_E010MSG);
750 return(1);
751 }
752
753 if (pAC->GIni.GP[Port].PXSQSize == 0) {
754 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E009, SKERR_HWI_E009MSG);
755 return(2);
756 }
757
758 /* calculate register values */
759 IntTime = (IntTime / 2) * pAC->GIni.GIHstClkFact / 100;
760 LimCount = LimCount / 8;
761
762 if (IntTime > TXA_MAX_VAL || LimCount > TXA_MAX_VAL) {
763 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E010, SKERR_HWI_E010MSG);
764 return(1);
765 }
766
767 /*
768 * - Enable 'Force Sync' to ensure the synchronous queue
769 * has the priority while configuring the new values.
770 * - Also 'disable alloc' to ensure the settings complies
771 * to the SyncMode parameter.
772 * - Disable 'Rate Control' to configure the new values.
773 * - write IntTime and LimCount
774 * - start 'Rate Control' and disable 'Force Sync'
775 * if Interval Timer or Limit Counter not zero.
776 */
777 SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL),
778 TXA_ENA_FSYNC | TXA_DIS_ALLOC | TXA_STOP_RC);
779
780 SK_OUT32(IoC, MR_ADDR(Port, TXA_ITI_INI), IntTime);
781 SK_OUT32(IoC, MR_ADDR(Port, TXA_LIM_INI), LimCount);
782
783 SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL),
784 (SK_U8)(SyncMode & (TXA_ENA_ALLOC | TXA_DIS_ALLOC)));
785
786 if (IntTime != 0 || LimCount != 0) {
787 SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL), TXA_DIS_FSYNC | TXA_START_RC);
788 }
789
790 return(0);
791} /* SkGeCfgSync */
792#endif /* SK_DIAG || SK_CFG_SYNC*/
793
794
795/******************************************************************************
796 *
797 * DoInitRamQueue() - Initialize the RAM Buffer Address of a single Queue
798 *
799 * Desccription:
800 * If the queue is used, enable and initialize it.
801 * Make sure the queue is still reset, if it is not used.
802 *
803 * Returns:
804 * nothing
805 */
806static void DoInitRamQueue(
807SK_AC *pAC, /* adapter context */
808SK_IOC IoC, /* IO context */
809int QuIoOffs, /* Queue IO Address Offset */
810SK_U32 QuStartAddr, /* Queue Start Address */
811SK_U32 QuEndAddr, /* Queue End Address */
812int QuType) /* Queue Type (SK_RX_SRAM_Q|SK_RX_BRAM_Q|SK_TX_RAM_Q) */
813{
814 SK_U32 RxUpThresVal;
815 SK_U32 RxLoThresVal;
816
817 if (QuStartAddr != QuEndAddr) {
818 /* calculate thresholds, assume we have a big Rx queue */
819 RxUpThresVal = (QuEndAddr + 1 - QuStartAddr - SK_RB_ULPP) / 8;
820 RxLoThresVal = (QuEndAddr + 1 - QuStartAddr - SK_RB_LLPP_B)/8;
821
822 /* build HW address format */
823 QuStartAddr = QuStartAddr / 8;
824 QuEndAddr = QuEndAddr / 8;
825
826 /* release local reset */
827 SK_OUT8(IoC, RB_ADDR(QuIoOffs, RB_CTRL), RB_RST_CLR);
828
829 /* configure addresses */
830 SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_START), QuStartAddr);
831 SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_END), QuEndAddr);
832 SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_WP), QuStartAddr);
833 SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_RP), QuStartAddr);
834
835 switch (QuType) {
836 case SK_RX_SRAM_Q:
837 /* configure threshold for small Rx Queue */
838 RxLoThresVal += (SK_RB_LLPP_B - SK_RB_LLPP_S) / 8;
839
840 /* continue with SK_RX_BRAM_Q */
841 case SK_RX_BRAM_Q:
842 /* write threshold for Rx Queue */
843
844 SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_RX_UTPP), RxUpThresVal);
845 SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_RX_LTPP), RxLoThresVal);
846
847 /* the high priority threshold not used */
848 break;
849 case SK_TX_RAM_Q:
850 /*
851 * Do NOT use Store & Forward under normal operation due to
852 * performance optimization (GENESIS only).
853 * But if Jumbo Frames are configured (XMAC Tx FIFO is only 4 kB)
854 * or YUKON is used ((GMAC Tx FIFO is only 1 kB)
855 * we NEED Store & Forward of the RAM buffer.
856 */
857 if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK ||
858 pAC->GIni.GIYukon) {
859 /* enable Store & Forward Mode for the Tx Side */
860 SK_OUT8(IoC, RB_ADDR(QuIoOffs, RB_CTRL), RB_ENA_STFWD);
861 }
862 break;
863 }
864
865 /* set queue operational */
866 SK_OUT8(IoC, RB_ADDR(QuIoOffs, RB_CTRL), RB_ENA_OP_MD);
867 }
868 else {
869 /* ensure the queue is still disabled */
870 SK_OUT8(IoC, RB_ADDR(QuIoOffs, RB_CTRL), RB_RST_SET);
871 }
872} /* DoInitRamQueue */
873
874
875/******************************************************************************
876 *
877 * SkGeInitRamBufs() - Initialize the RAM Buffer Queues
878 *
879 * Description:
880 * Initialize all RAM Buffer Queues of the specified port
881 *
882 * Returns:
883 * nothing
884 */
885static void SkGeInitRamBufs(
886SK_AC *pAC, /* adapter context */
887SK_IOC IoC, /* IO context */
888int Port) /* Port Index (MAC_1 + n) */
889{
890 SK_GEPORT *pPrt;
891 int RxQType;
892
893 pPrt = &pAC->GIni.GP[Port];
894
895 if (pPrt->PRxQSize == SK_MIN_RXQ_SIZE) {
896 RxQType = SK_RX_SRAM_Q; /* small Rx Queue */
897 }
898 else {
899 RxQType = SK_RX_BRAM_Q; /* big Rx Queue */
900 }
901
902 DoInitRamQueue(pAC, IoC, pPrt->PRxQOff, pPrt->PRxQRamStart,
903 pPrt->PRxQRamEnd, RxQType);
904
905 DoInitRamQueue(pAC, IoC, pPrt->PXsQOff, pPrt->PXsQRamStart,
906 pPrt->PXsQRamEnd, SK_TX_RAM_Q);
907
908 DoInitRamQueue(pAC, IoC, pPrt->PXaQOff, pPrt->PXaQRamStart,
909 pPrt->PXaQRamEnd, SK_TX_RAM_Q);
910
911} /* SkGeInitRamBufs */
912
913
914/******************************************************************************
915 *
916 * SkGeInitRamIface() - Initialize the RAM Interface
917 *
918 * Description:
919 * This function initializes the Adapters RAM Interface.
920 *
921 * Note:
922 * This function is used in the diagnostics.
923 *
924 * Returns:
925 * nothing
926 */
927static void SkGeInitRamIface(
928SK_AC *pAC, /* adapter context */
929SK_IOC IoC) /* IO context */
930{
931 /* release local reset */
932 SK_OUT16(IoC, B3_RI_CTRL, RI_RST_CLR);
933
934 /* configure timeout values */
935 SK_OUT8(IoC, B3_RI_WTO_R1, SK_RI_TO_53);
936 SK_OUT8(IoC, B3_RI_WTO_XA1, SK_RI_TO_53);
937 SK_OUT8(IoC, B3_RI_WTO_XS1, SK_RI_TO_53);
938 SK_OUT8(IoC, B3_RI_RTO_R1, SK_RI_TO_53);
939 SK_OUT8(IoC, B3_RI_RTO_XA1, SK_RI_TO_53);
940 SK_OUT8(IoC, B3_RI_RTO_XS1, SK_RI_TO_53);
941 SK_OUT8(IoC, B3_RI_WTO_R2, SK_RI_TO_53);
942 SK_OUT8(IoC, B3_RI_WTO_XA2, SK_RI_TO_53);
943 SK_OUT8(IoC, B3_RI_WTO_XS2, SK_RI_TO_53);
944 SK_OUT8(IoC, B3_RI_RTO_R2, SK_RI_TO_53);
945 SK_OUT8(IoC, B3_RI_RTO_XA2, SK_RI_TO_53);
946 SK_OUT8(IoC, B3_RI_RTO_XS2, SK_RI_TO_53);
947
948} /* SkGeInitRamIface */
949
950
951/******************************************************************************
952 *
953 * SkGeInitBmu() - Initialize the BMU state machines
954 *
955 * Description:
956 * Initialize all BMU state machines of the specified port
957 *
958 * Returns:
959 * nothing
960 */
961static void SkGeInitBmu(
962SK_AC *pAC, /* adapter context */
963SK_IOC IoC, /* IO context */
964int Port) /* Port Index (MAC_1 + n) */
965{
966 SK_GEPORT *pPrt;
967 SK_U32 RxWm;
968 SK_U32 TxWm;
969
970 pPrt = &pAC->GIni.GP[Port];
971
972 RxWm = SK_BMU_RX_WM;
973 TxWm = SK_BMU_TX_WM;
974
975 if (!pAC->GIni.GIPciSlot64 && !pAC->GIni.GIPciClock66) {
976 /* for better performance */
977 RxWm /= 2;
978 TxWm /= 2;
979 }
980
981 /* Rx Queue: Release all local resets and set the watermark */
982 SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_CLR_RESET);
983 SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_F), RxWm);
984
985 /*
986 * Tx Queue: Release all local resets if the queue is used !
987 * set watermark
988 */
989 if (pPrt->PXSQSize != 0) {
990 SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_CLR_RESET);
991 SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_F), TxWm);
992 }
993
994 if (pPrt->PXAQSize != 0) {
995 SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_CLR_RESET);
996 SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_F), TxWm);
997 }
998 /*
999 * Do NOT enable the descriptor poll timers here, because
1000 * the descriptor addresses are not specified yet.
1001 */
1002} /* SkGeInitBmu */
1003
1004
1005/******************************************************************************
1006 *
1007 * TestStopBit() - Test the stop bit of the queue
1008 *
1009 * Description:
1010 * Stopping a queue is not as simple as it seems to be.
1011 * If descriptor polling is enabled, it may happen
1012 * that RX/TX stop is done and SV idle is NOT set.
1013 * In this case we have to issue another stop command.
1014 *
1015 * Returns:
1016 * The queues control status register
1017 */
1018static SK_U32 TestStopBit(
1019SK_AC *pAC, /* Adapter Context */
1020SK_IOC IoC, /* IO Context */
1021int QuIoOffs) /* Queue IO Address Offset */
1022{
1023 SK_U32 QuCsr; /* CSR contents */
1024
1025 SK_IN32(IoC, Q_ADDR(QuIoOffs, Q_CSR), &QuCsr);
1026
1027 if ((QuCsr & (CSR_STOP | CSR_SV_IDLE)) == 0) {
1028 /* Stop Descriptor overridden by start command */
1029 SK_OUT32(IoC, Q_ADDR(QuIoOffs, Q_CSR), CSR_STOP);
1030
1031 SK_IN32(IoC, Q_ADDR(QuIoOffs, Q_CSR), &QuCsr);
1032 }
1033
1034 return(QuCsr);
1035} /* TestStopBit */
1036
1037
1038/******************************************************************************
1039 *
1040 * SkGeStopPort() - Stop the Rx/Tx activity of the port 'Port'.
1041 *
1042 * Description:
1043 * After calling this function the descriptor rings and Rx and Tx
1044 * queues of this port may be reconfigured.
1045 *
1046 * It is possible to stop the receive and transmit path separate or
1047 * both together.
1048 *
1049 * Dir = SK_STOP_TX Stops the transmit path only and resets the MAC.
1050 * The receive queue is still active and
1051 * the pending Rx frames may be still transferred
1052 * into the RxD.
1053 * SK_STOP_RX Stop the receive path. The tansmit path
1054 * has to be stopped once before.
1055 * SK_STOP_ALL SK_STOP_TX + SK_STOP_RX
1056 *
1057 * RstMode = SK_SOFT_RST Resets the MAC. The PHY is still alive.
1058 * SK_HARD_RST Resets the MAC and the PHY.
1059 *
1060 * Example:
1061 * 1) A Link Down event was signaled for a port. Therefore the activity
1062 * of this port should be stopped and a hardware reset should be issued
1063 * to enable the workaround of XMAC Errata #2. But the received frames
1064 * should not be discarded.
1065 * ...
1066 * SkGeStopPort(pAC, IoC, Port, SK_STOP_TX, SK_HARD_RST);
1067 * (transfer all pending Rx frames)
1068 * SkGeStopPort(pAC, IoC, Port, SK_STOP_RX, SK_HARD_RST);
1069 * ...
1070 *
1071 * 2) An event was issued which request the driver to switch
1072 * the 'virtual active' link to an other already active port
1073 * as soon as possible. The frames in the receive queue of this
1074 * port may be lost. But the PHY must not be reset during this
1075 * event.
1076 * ...
1077 * SkGeStopPort(pAC, IoC, Port, SK_STOP_ALL, SK_SOFT_RST);
1078 * ...
1079 *
1080 * Extended Description:
1081 * If SK_STOP_TX is set,
1082 * o disable the MAC's receive and transmitter to prevent
1083 * from sending incomplete frames
1084 * o stop the port's transmit queues before terminating the
1085 * BMUs to prevent from performing incomplete PCI cycles
1086 * on the PCI bus
1087 * - The network Rx and Tx activity and PCI Tx transfer is
1088 * disabled now.
1089 * o reset the MAC depending on the RstMode
1090 * o Stop Interval Timer and Limit Counter of Tx Arbiter,
1091 * also disable Force Sync bit and Enable Alloc bit.
1092 * o perform a local reset of the port's Tx path
1093 * - reset the PCI FIFO of the async Tx queue
1094 * - reset the PCI FIFO of the sync Tx queue
1095 * - reset the RAM Buffer async Tx queue
1096 * - reset the RAM Buffer sync Tx queue
1097 * - reset the MAC Tx FIFO
1098 * o switch Link and Tx LED off, stop the LED counters
1099 *
1100 * If SK_STOP_RX is set,
1101 * o stop the port's receive queue
1102 * - The path data transfer activity is fully stopped now.
1103 * o perform a local reset of the port's Rx path
1104 * - reset the PCI FIFO of the Rx queue
1105 * - reset the RAM Buffer receive queue
1106 * - reset the MAC Rx FIFO
1107 * o switch Rx LED off, stop the LED counter
1108 *
1109 * If all ports are stopped,
1110 * o reset the RAM Interface.
1111 *
1112 * Notes:
1113 * o This function may be called during the driver states RESET_PORT and
1114 * SWITCH_PORT.
1115 */
1116void SkGeStopPort(
1117SK_AC *pAC, /* adapter context */
1118SK_IOC IoC, /* I/O context */
1119int Port, /* port to stop (MAC_1 + n) */
1120int Dir, /* Direction to Stop (SK_STOP_RX, SK_STOP_TX, SK_STOP_ALL) */
1121int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */
1122{
1123#ifndef SK_DIAG
1124 SK_EVPARA Para;
1125#endif /* !SK_DIAG */
1126 SK_GEPORT *pPrt;
1127 SK_U32 DWord;
1128 SK_U32 XsCsr;
1129 SK_U32 XaCsr;
1130 SK_U64 ToutStart;
1131 int i;
1132 int ToutCnt;
1133
1134 pPrt = &pAC->GIni.GP[Port];
1135
1136 if ((Dir & SK_STOP_TX) != 0) {
1137 /* disable receiver and transmitter */
1138 SkMacRxTxDisable(pAC, IoC, Port);
1139
1140 /* stop both transmit queues */
1141 /*
1142 * If the BMU is in the reset state CSR_STOP will terminate
1143 * immediately.
1144 */
1145 SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_STOP);
1146 SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_STOP);
1147
1148 ToutStart = SkOsGetTime(pAC);
1149 ToutCnt = 0;
1150 do {
1151 /*
1152 * Clear packet arbiter timeout to make sure
1153 * this loop will terminate.
1154 */
1155 SK_OUT16(IoC, B3_PA_CTRL, (SK_U16)((Port == MAC_1) ?
1156 PA_CLR_TO_TX1 : PA_CLR_TO_TX2));
1157
1158 /*
1159 * If the transfer stucks at the MAC the STOP command will not
1160 * terminate if we don't flush the XMAC's transmit FIFO !
1161 */
1162 SkMacFlushTxFifo(pAC, IoC, Port);
1163
1164 XsCsr = TestStopBit(pAC, IoC, pPrt->PXsQOff);
1165 XaCsr = TestStopBit(pAC, IoC, pPrt->PXaQOff);
1166
1167 if (SkOsGetTime(pAC) - ToutStart > (SK_TICKS_PER_SEC / 18)) {
1168 /*
1169 * Timeout of 1/18 second reached.
1170 * This needs to be checked at 1/18 sec only.
1171 */
1172 ToutCnt++;
1173 if (ToutCnt > 1) {
1174 /* Might be a problem when the driver event handler
1175 * calls StopPort again. XXX.
1176 */
1177
1178 /* Fatal Error, Loop aborted */
1179 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_HWI_E018,
1180 SKERR_HWI_E018MSG);
1181#ifndef SK_DIAG
1182 Para.Para64 = Port;
1183 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
1184#endif /* !SK_DIAG */
1185 return;
1186 }
1187 /*
1188 * Cache incoherency workaround: Assume a start command
1189 * has been lost while sending the frame.
1190 */
1191 ToutStart = SkOsGetTime(pAC);
1192
1193 if ((XsCsr & CSR_STOP) != 0) {
1194 SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_START);
1195 }
1196 if ((XaCsr & CSR_STOP) != 0) {
1197 SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_START);
1198 }
1199 }
1200
1201 /*
1202 * Because of the ASIC problem report entry from 21.08.1998 it is
1203 * required to wait until CSR_STOP is reset and CSR_SV_IDLE is set.
1204 */
1205 } while ((XsCsr & (CSR_STOP | CSR_SV_IDLE)) != CSR_SV_IDLE ||
1206 (XaCsr & (CSR_STOP | CSR_SV_IDLE)) != CSR_SV_IDLE);
1207
1208 /* Reset the MAC depending on the RstMode */
1209 if (RstMode == SK_SOFT_RST) {
1210 SkMacSoftRst(pAC, IoC, Port);
1211 }
1212 else {
1213 SkMacHardRst(pAC, IoC, Port);
1214 }
1215
1216 /* Disable Force Sync bit and Enable Alloc bit */
1217 SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL),
1218 TXA_DIS_FSYNC | TXA_DIS_ALLOC | TXA_STOP_RC);
1219
1220 /* Stop Interval Timer and Limit Counter of Tx Arbiter */
1221 SK_OUT32(IoC, MR_ADDR(Port, TXA_ITI_INI), 0L);
1222 SK_OUT32(IoC, MR_ADDR(Port, TXA_LIM_INI), 0L);
1223
1224 /* Perform a local reset of the port's Tx path */
1225
1226 /* Reset the PCI FIFO of the async Tx queue */
1227 SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_SET_RESET);
1228 /* Reset the PCI FIFO of the sync Tx queue */
1229 SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_SET_RESET);
1230 /* Reset the RAM Buffer async Tx queue */
1231 SK_OUT8(IoC, RB_ADDR(pPrt->PXaQOff, RB_CTRL), RB_RST_SET);
1232 /* Reset the RAM Buffer sync Tx queue */
1233 SK_OUT8(IoC, RB_ADDR(pPrt->PXsQOff, RB_CTRL), RB_RST_SET);
1234
1235 /* Reset Tx MAC FIFO */
1236#ifdef GENESIS
1237 if (pAC->GIni.GIGenesis) {
1238 /* Note: MFF_RST_SET does NOT reset the XMAC ! */
1239 SK_OUT8(IoC, MR_ADDR(Port, TX_MFF_CTRL2), MFF_RST_SET);
1240
1241 /* switch Link and Tx LED off, stop the LED counters */
1242 /* Link LED is switched off by the RLMT and the Diag itself */
1243 SkGeXmitLED(pAC, IoC, MR_ADDR(Port, TX_LED_INI), SK_LED_DIS);
1244 }
1245#endif /* GENESIS */
1246
1247#ifdef YUKON
1248 if (pAC->GIni.GIYukon) {
1249 /* Reset TX MAC FIFO */
1250 SK_OUT8(IoC, MR_ADDR(Port, TX_GMF_CTRL_T), (SK_U8)GMF_RST_SET);
1251 }
1252#endif /* YUKON */
1253 }
1254
1255 if ((Dir & SK_STOP_RX) != 0) {
1256 /*
1257 * The RX Stop Command will not terminate if no buffers
1258 * are queued in the RxD ring. But it will always reach
1259 * the Idle state. Therefore we can use this feature to
1260 * stop the transfer of received packets.
1261 */
1262 /* stop the port's receive queue */
1263 SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_STOP);
1264
1265 i = 100;
1266 do {
1267 /*
1268 * Clear packet arbiter timeout to make sure
1269 * this loop will terminate
1270 */
1271 SK_OUT16(IoC, B3_PA_CTRL, (SK_U16)((Port == MAC_1) ?
1272 PA_CLR_TO_RX1 : PA_CLR_TO_RX2));
1273
1274 DWord = TestStopBit(pAC, IoC, pPrt->PRxQOff);
1275
1276 /* timeout if i==0 (bug fix for #10748) */
1277 if (--i == 0) {
1278 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_HWI_E024,
1279 SKERR_HWI_E024MSG);
1280 break;
1281 }
1282 /*
1283 * because of the ASIC problem report entry from 21.08.98
1284 * it is required to wait until CSR_STOP is reset and
1285 * CSR_SV_IDLE is set.
1286 */
1287 } while ((DWord & (CSR_STOP | CSR_SV_IDLE)) != CSR_SV_IDLE);
1288
1289 /* The path data transfer activity is fully stopped now */
1290
1291 /* Perform a local reset of the port's Rx path */
1292
1293 /* Reset the PCI FIFO of the Rx queue */
1294 SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_SET_RESET);
1295 /* Reset the RAM Buffer receive queue */
1296 SK_OUT8(IoC, RB_ADDR(pPrt->PRxQOff, RB_CTRL), RB_RST_SET);
1297
1298 /* Reset Rx MAC FIFO */
1299#ifdef GENESIS
1300 if (pAC->GIni.GIGenesis) {
1301
1302 SK_OUT8(IoC, MR_ADDR(Port, RX_MFF_CTRL2), MFF_RST_SET);
1303
1304 /* switch Rx LED off, stop the LED counter */
1305 SkGeXmitLED(pAC, IoC, MR_ADDR(Port, RX_LED_INI), SK_LED_DIS);
1306 }
1307#endif /* GENESIS */
1308
1309#ifdef YUKON
1310 if (pAC->GIni.GIYukon) {
1311 /* Reset Rx MAC FIFO */
1312 SK_OUT8(IoC, MR_ADDR(Port, RX_GMF_CTRL_T), (SK_U8)GMF_RST_SET);
1313 }
1314#endif /* YUKON */
1315 }
1316} /* SkGeStopPort */
1317
1318
1319/******************************************************************************
1320 *
1321 * SkGeInit0() - Level 0 Initialization
1322 *
1323 * Description:
1324 * - Initialize the BMU address offsets
1325 *
1326 * Returns:
1327 * nothing
1328 */
1329static void SkGeInit0(
1330SK_AC *pAC, /* adapter context */
1331SK_IOC IoC) /* IO context */
1332{
1333 int i;
1334 SK_GEPORT *pPrt;
1335
1336 for (i = 0; i < SK_MAX_MACS; i++) {
1337 pPrt = &pAC->GIni.GP[i];
1338
1339 pPrt->PState = SK_PRT_RESET;
1340 pPrt->PRxQOff = QOffTab[i].RxQOff;
1341 pPrt->PXsQOff = QOffTab[i].XsQOff;
1342 pPrt->PXaQOff = QOffTab[i].XaQOff;
1343 pPrt->PCheckPar = SK_FALSE;
1344 pPrt->PIsave = 0;
1345 pPrt->PPrevShorts = 0;
1346 pPrt->PLinkResCt = 0;
1347 pPrt->PAutoNegTOCt = 0;
1348 pPrt->PPrevRx = 0;
1349 pPrt->PPrevFcs = 0;
1350 pPrt->PRxLim = SK_DEF_RX_WA_LIM;
1351 pPrt->PLinkMode = (SK_U8)SK_LMODE_AUTOFULL;
1352 pPrt->PLinkSpeedCap = (SK_U8)SK_LSPEED_CAP_1000MBPS;
1353 pPrt->PLinkSpeed = (SK_U8)SK_LSPEED_1000MBPS;
1354 pPrt->PLinkSpeedUsed = (SK_U8)SK_LSPEED_STAT_UNKNOWN;
1355 pPrt->PLinkModeConf = (SK_U8)SK_LMODE_AUTOSENSE;
1356 pPrt->PFlowCtrlMode = (SK_U8)SK_FLOW_MODE_SYM_OR_REM;
1357 pPrt->PLinkCap = (SK_U8)(SK_LMODE_CAP_HALF | SK_LMODE_CAP_FULL |
1358 SK_LMODE_CAP_AUTOHALF | SK_LMODE_CAP_AUTOFULL);
1359 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_UNKNOWN;
1360 pPrt->PFlowCtrlCap = (SK_U8)SK_FLOW_MODE_SYM_OR_REM;
1361 pPrt->PFlowCtrlStatus = (SK_U8)SK_FLOW_STAT_NONE;
1362 pPrt->PMSCap = 0;
1363 pPrt->PMSMode = (SK_U8)SK_MS_MODE_AUTO;
1364 pPrt->PMSStatus = (SK_U8)SK_MS_STAT_UNSET;
1365 pPrt->PLipaAutoNeg = (SK_U8)SK_LIPA_UNKNOWN;
1366 pPrt->PAutoNegFail = SK_FALSE;
1367 pPrt->PHWLinkUp = SK_FALSE;
1368 pPrt->PLinkBroken = SK_TRUE; /* See WA code */
1369 pPrt->PPhyPowerState = PHY_PM_OPERATIONAL_MODE;
1370 pPrt->PMacColThres = TX_COL_DEF;
1371 pPrt->PMacJamLen = TX_JAM_LEN_DEF;
1372 pPrt->PMacJamIpgVal = TX_JAM_IPG_DEF;
1373 pPrt->PMacJamIpgData = TX_IPG_JAM_DEF;
1374 pPrt->PMacIpgData = IPG_DATA_DEF;
1375 pPrt->PMacLimit4 = SK_FALSE;
1376 }
1377
1378 pAC->GIni.GIPortUsage = SK_RED_LINK;
1379 pAC->GIni.GILedBlinkCtrl = (SK_U16)OemConfig.Value;
1380 pAC->GIni.GIValIrqMask = IS_ALL_MSK;
1381
1382} /* SkGeInit0*/
1383
1384
1385/******************************************************************************
1386 *
1387 * SkGeInit1() - Level 1 Initialization
1388 *
1389 * Description:
1390 * o Do a software reset.
1391 * o Clear all reset bits.
1392 * o Verify that the detected hardware is present.
1393 * Return an error if not.
1394 * o Get the hardware configuration
1395 * + Read the number of MACs/Ports.
1396 * + Read the RAM size.
1397 * + Read the PCI Revision Id.
1398 * + Find out the adapters host clock speed
1399 * + Read and check the PHY type
1400 *
1401 * Returns:
1402 * 0: success
1403 * 5: Unexpected PHY type detected
1404 * 6: HW self test failed
1405 */
1406static int SkGeInit1(
1407SK_AC *pAC, /* adapter context */
1408SK_IOC IoC) /* IO context */
1409{
1410 SK_U8 Byte;
1411 SK_U16 Word;
1412 SK_U16 CtrlStat;
1413 SK_U32 DWord;
1414 int RetVal;
1415 int i;
1416
1417 RetVal = 0;
1418
1419 /* save CLK_RUN bits (YUKON-Lite) */
1420 SK_IN16(IoC, B0_CTST, &CtrlStat);
1421
1422 /* do the SW-reset */
1423 SK_OUT8(IoC, B0_CTST, CS_RST_SET);
1424
1425 /* release the SW-reset */
1426 SK_OUT8(IoC, B0_CTST, CS_RST_CLR);
1427
1428 /* reset all error bits in the PCI STATUS register */
1429 /*
1430 * Note: PCI Cfg cycles cannot be used, because they are not
1431 * available on some platforms after 'boot time'.
1432 */
1433 SK_IN16(IoC, PCI_C(PCI_STATUS), &Word);
1434
1435 SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_ON);
1436 SK_OUT16(IoC, PCI_C(PCI_STATUS), (SK_U16)(Word | PCI_ERRBITS));
1437 SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
1438
1439 /* release Master Reset */
1440 SK_OUT8(IoC, B0_CTST, CS_MRST_CLR);
1441
1442#ifdef CLK_RUN
1443 CtrlStat |= CS_CLK_RUN_ENA;
1444#endif /* CLK_RUN */
1445
1446 /* restore CLK_RUN bits */
1447 SK_OUT16(IoC, B0_CTST, (SK_U16)(CtrlStat &
1448 (CS_CLK_RUN_HOT | CS_CLK_RUN_RST | CS_CLK_RUN_ENA)));
1449
1450 /* read Chip Identification Number */
1451 SK_IN8(IoC, B2_CHIP_ID, &Byte);
1452 pAC->GIni.GIChipId = Byte;
1453
1454 /* read number of MACs */
1455 SK_IN8(IoC, B2_MAC_CFG, &Byte);
1456 pAC->GIni.GIMacsFound = (Byte & CFG_SNG_MAC) ? 1 : 2;
1457
1458 /* get Chip Revision Number */
1459 pAC->GIni.GIChipRev = (SK_U8)((Byte & CFG_CHIP_R_MSK) >> 4);
1460
1461 /* get diff. PCI parameters */
1462 SK_IN16(IoC, B0_CTST, &CtrlStat);
1463
1464 /* read the adapters RAM size */
1465 SK_IN8(IoC, B2_E_0, &Byte);
1466
1467 pAC->GIni.GIGenesis = SK_FALSE;
1468 pAC->GIni.GIYukon = SK_FALSE;
1469 pAC->GIni.GIYukonLite = SK_FALSE;
1470
1471#ifdef GENESIS
1472 if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
1473
1474 pAC->GIni.GIGenesis = SK_TRUE;
1475
1476 if (Byte == (SK_U8)3) {
1477 /* special case: 4 x 64k x 36, offset = 0x80000 */
1478 pAC->GIni.GIRamSize = 1024;
1479 pAC->GIni.GIRamOffs = (SK_U32)512 * 1024;
1480 }
1481 else {
1482 pAC->GIni.GIRamSize = (int)Byte * 512;
1483 pAC->GIni.GIRamOffs = 0;
1484 }
1485 /* all GE adapters work with 53.125 MHz host clock */
1486 pAC->GIni.GIHstClkFact = SK_FACT_53;
1487
1488 /* set Descr. Poll Timer Init Value to 250 ms */
1489 pAC->GIni.GIPollTimerVal =
1490 SK_DPOLL_DEF * (SK_U32)pAC->GIni.GIHstClkFact / 100;
1491 }
1492#endif /* GENESIS */
1493
1494#ifdef YUKON
1495 if (pAC->GIni.GIChipId != CHIP_ID_GENESIS) {
1496
1497 pAC->GIni.GIYukon = SK_TRUE;
1498
1499 pAC->GIni.GIRamSize = (Byte == (SK_U8)0) ? 128 : (int)Byte * 4;
1500
1501 pAC->GIni.GIRamOffs = 0;
1502
1503 /* WA for chip Rev. A */
1504 pAC->GIni.GIWolOffs = (pAC->GIni.GIChipId == CHIP_ID_YUKON &&
1505 pAC->GIni.GIChipRev == 0) ? WOL_REG_OFFS : 0;
1506
1507 /* get PM Capabilities of PCI config space */
1508 SK_IN16(IoC, PCI_C(PCI_PM_CAP_REG), &Word);
1509
1510 /* check if VAUX is available */
1511 if (((CtrlStat & CS_VAUX_AVAIL) != 0) &&
1512 /* check also if PME from D3cold is set */
1513 ((Word & PCI_PME_D3C_SUP) != 0)) {
1514 /* set entry in GE init struct */
1515 pAC->GIni.GIVauxAvail = SK_TRUE;
1516 }
1517
1518 if (pAC->GIni.GIChipId == CHIP_ID_YUKON_LITE) {
1519 /* this is Rev. A1 */
1520 pAC->GIni.GIYukonLite = SK_TRUE;
1521 }
1522 else {
1523 /* save Flash-Address Register */
1524 SK_IN32(IoC, B2_FAR, &DWord);
1525
1526 /* test Flash-Address Register */
1527 SK_OUT8(IoC, B2_FAR + 3, 0xff);
1528 SK_IN8(IoC, B2_FAR + 3, &Byte);
1529
1530 if (Byte != 0) {
1531 /* this is Rev. A0 */
1532 pAC->GIni.GIYukonLite = SK_TRUE;
1533
1534 /* restore Flash-Address Register */
1535 SK_OUT32(IoC, B2_FAR, DWord);
1536 }
1537 }
1538
1539 /* switch power to VCC (WA for VAUX problem) */
1540 SK_OUT8(IoC, B0_POWER_CTRL, (SK_U8)(PC_VAUX_ENA | PC_VCC_ENA |
1541 PC_VAUX_OFF | PC_VCC_ON));
1542
1543 /* read the Interrupt source */
1544 SK_IN32(IoC, B0_ISRC, &DWord);
1545
1546 if ((DWord & IS_HW_ERR) != 0) {
1547 /* read the HW Error Interrupt source */
1548 SK_IN32(IoC, B0_HWE_ISRC, &DWord);
1549
1550 if ((DWord & IS_IRQ_SENSOR) != 0) {
1551 /* disable HW Error IRQ */
1552 pAC->GIni.GIValIrqMask &= ~IS_HW_ERR;
1553 }
1554 }
1555
1556 for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
1557 /* set GMAC Link Control reset */
1558 SK_OUT16(IoC, MR_ADDR(i, GMAC_LINK_CTRL), GMLC_RST_SET);
1559
1560 /* clear GMAC Link Control reset */
1561 SK_OUT16(IoC, MR_ADDR(i, GMAC_LINK_CTRL), GMLC_RST_CLR);
1562 }
1563 /* all YU chips work with 78.125 MHz host clock */
1564 pAC->GIni.GIHstClkFact = SK_FACT_78;
1565
1566 pAC->GIni.GIPollTimerVal = SK_DPOLL_MAX; /* 215 ms */
1567 }
1568#endif /* YUKON */
1569
1570 /* check if 64-bit PCI Slot is present */
1571 pAC->GIni.GIPciSlot64 = (SK_BOOL)((CtrlStat & CS_BUS_SLOT_SZ) != 0);
1572
1573 /* check if 66 MHz PCI Clock is active */
1574 pAC->GIni.GIPciClock66 = (SK_BOOL)((CtrlStat & CS_BUS_CLOCK) != 0);
1575
1576 /* read PCI HW Revision Id. */
1577 SK_IN8(IoC, PCI_C(PCI_REV_ID), &Byte);
1578 pAC->GIni.GIPciHwRev = Byte;
1579
1580 /* read the PMD type */
1581 SK_IN8(IoC, B2_PMD_TYP, &Byte);
1582 pAC->GIni.GICopperType = (SK_U8)(Byte == 'T');
1583
1584 /* read the PHY type */
1585 SK_IN8(IoC, B2_E_1, &Byte);
1586
1587 Byte &= 0x0f; /* the PHY type is stored in the lower nibble */
1588 for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
1589
1590#ifdef GENESIS
1591 if (pAC->GIni.GIGenesis) {
1592 switch (Byte) {
1593 case SK_PHY_XMAC:
1594 pAC->GIni.GP[i].PhyAddr = PHY_ADDR_XMAC;
1595 break;
1596 case SK_PHY_BCOM:
1597 pAC->GIni.GP[i].PhyAddr = PHY_ADDR_BCOM;
1598 pAC->GIni.GP[i].PMSCap = (SK_U8)(SK_MS_CAP_AUTO |
1599 SK_MS_CAP_MASTER | SK_MS_CAP_SLAVE);
1600 break;
1601#ifdef OTHER_PHY
1602 case SK_PHY_LONE:
1603 pAC->GIni.GP[i].PhyAddr = PHY_ADDR_LONE;
1604 break;
1605 case SK_PHY_NAT:
1606 pAC->GIni.GP[i].PhyAddr = PHY_ADDR_NAT;
1607 break;
1608#endif /* OTHER_PHY */
1609 default:
1610 /* ERROR: unexpected PHY type detected */
1611 RetVal = 5;
1612 break;
1613 }
1614 }
1615#endif /* GENESIS */
1616
1617#ifdef YUKON
1618 if (pAC->GIni.GIYukon) {
1619
1620 if (Byte < (SK_U8)SK_PHY_MARV_COPPER) {
1621 /* if this field is not initialized */
1622 Byte = (SK_U8)SK_PHY_MARV_COPPER;
1623
1624 pAC->GIni.GICopperType = SK_TRUE;
1625 }
1626
1627 pAC->GIni.GP[i].PhyAddr = PHY_ADDR_MARV;
1628
1629 if (pAC->GIni.GICopperType) {
1630
1631 pAC->GIni.GP[i].PLinkSpeedCap = (SK_U8)(SK_LSPEED_CAP_AUTO |
1632 SK_LSPEED_CAP_10MBPS | SK_LSPEED_CAP_100MBPS |
1633 SK_LSPEED_CAP_1000MBPS);
1634
1635 pAC->GIni.GP[i].PLinkSpeed = (SK_U8)SK_LSPEED_AUTO;
1636
1637 pAC->GIni.GP[i].PMSCap = (SK_U8)(SK_MS_CAP_AUTO |
1638 SK_MS_CAP_MASTER | SK_MS_CAP_SLAVE);
1639 }
1640 else {
1641 Byte = (SK_U8)SK_PHY_MARV_FIBER;
1642 }
1643 }
1644#endif /* YUKON */
1645
1646 pAC->GIni.GP[i].PhyType = (int)Byte;
1647
1648 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT,
1649 ("PHY type: %d PHY addr: %04x\n", Byte,
1650 pAC->GIni.GP[i].PhyAddr));
1651 }
1652
1653 /* get MAC Type & set function pointers dependent on */
1654#ifdef GENESIS
1655 if (pAC->GIni.GIGenesis) {
1656
1657 pAC->GIni.GIMacType = SK_MAC_XMAC;
1658
1659 pAC->GIni.GIFunc.pFnMacUpdateStats = SkXmUpdateStats;
1660 pAC->GIni.GIFunc.pFnMacStatistic = SkXmMacStatistic;
1661 pAC->GIni.GIFunc.pFnMacResetCounter = SkXmResetCounter;
1662 pAC->GIni.GIFunc.pFnMacOverflow = SkXmOverflowStatus;
1663 }
1664#endif /* GENESIS */
1665
1666#ifdef YUKON
1667 if (pAC->GIni.GIYukon) {
1668
1669 pAC->GIni.GIMacType = SK_MAC_GMAC;
1670
1671 pAC->GIni.GIFunc.pFnMacUpdateStats = SkGmUpdateStats;
1672 pAC->GIni.GIFunc.pFnMacStatistic = SkGmMacStatistic;
1673 pAC->GIni.GIFunc.pFnMacResetCounter = SkGmResetCounter;
1674 pAC->GIni.GIFunc.pFnMacOverflow = SkGmOverflowStatus;
1675
1676#ifdef SPECIAL_HANDLING
1677 if (pAC->GIni.GIChipId == CHIP_ID_YUKON) {
1678 /* check HW self test result */
1679 SK_IN8(IoC, B2_E_3, &Byte);
1680 if (Byte & B2_E3_RES_MASK) {
1681 RetVal = 6;
1682 }
1683 }
1684#endif
1685 }
1686#endif /* YUKON */
1687
1688 return(RetVal);
1689} /* SkGeInit1 */
1690
1691
1692/******************************************************************************
1693 *
1694 * SkGeInit2() - Level 2 Initialization
1695 *
1696 * Description:
1697 * - start the Blink Source Counter
1698 * - start the Descriptor Poll Timer
1699 * - configure the MAC-Arbiter
1700 * - configure the Packet-Arbiter
1701 * - enable the Tx Arbiters
1702 * - enable the RAM Interface Arbiter
1703 *
1704 * Returns:
1705 * nothing
1706 */
1707static void SkGeInit2(
1708SK_AC *pAC, /* adapter context */
1709SK_IOC IoC) /* IO context */
1710{
1711#ifdef GENESIS
1712 SK_U32 DWord;
1713#endif /* GENESIS */
1714 int i;
1715
1716 /* start the Descriptor Poll Timer */
1717 if (pAC->GIni.GIPollTimerVal != 0) {
1718 if (pAC->GIni.GIPollTimerVal > SK_DPOLL_MAX) {
1719 pAC->GIni.GIPollTimerVal = SK_DPOLL_MAX;
1720
1721 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E017, SKERR_HWI_E017MSG);
1722 }
1723 SK_OUT32(IoC, B28_DPT_INI, pAC->GIni.GIPollTimerVal);
1724 SK_OUT8(IoC, B28_DPT_CTRL, DPT_START);
1725 }
1726
1727#ifdef GENESIS
1728 if (pAC->GIni.GIGenesis) {
1729 /* start the Blink Source Counter */
1730 DWord = SK_BLK_DUR * (SK_U32)pAC->GIni.GIHstClkFact / 100;
1731
1732 SK_OUT32(IoC, B2_BSC_INI, DWord);
1733 SK_OUT8(IoC, B2_BSC_CTRL, BSC_START);
1734
1735 /*
1736 * Configure the MAC Arbiter and the Packet Arbiter.
1737 * They will be started once and never be stopped.
1738 */
1739 SkGeInitMacArb(pAC, IoC);
1740
1741 SkGeInitPktArb(pAC, IoC);
1742 }
1743#endif /* GENESIS */
1744
1745#ifdef YUKON
1746 if (pAC->GIni.GIYukon) {
1747 /* start Time Stamp Timer */
1748 SK_OUT8(IoC, GMAC_TI_ST_CTRL, (SK_U8)GMT_ST_START);
1749 }
1750#endif /* YUKON */
1751
1752 /* enable the Tx Arbiters */
1753 for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
1754 SK_OUT8(IoC, MR_ADDR(i, TXA_CTRL), TXA_ENA_ARB);
1755 }
1756
1757 /* enable the RAM Interface Arbiter */
1758 SkGeInitRamIface(pAC, IoC);
1759
1760} /* SkGeInit2 */
1761
1762/******************************************************************************
1763 *
1764 * SkGeInit() - Initialize the GE Adapter with the specified level.
1765 *
1766 * Description:
1767 * Level 0: Initialize the Module structures.
1768 * Level 1: Generic Hardware Initialization. The IOP/MemBase pointer has
1769 * to be set before calling this level.
1770 *
1771 * o Do a software reset.
1772 * o Clear all reset bits.
1773 * o Verify that the detected hardware is present.
1774 * Return an error if not.
1775 * o Get the hardware configuration
1776 * + Set GIMacsFound with the number of MACs.
1777 * + Store the RAM size in GIRamSize.
1778 * + Save the PCI Revision ID in GIPciHwRev.
1779 * o return an error
1780 * if Number of MACs > SK_MAX_MACS
1781 *
1782 * After returning from Level 0 the adapter
1783 * may be accessed with IO operations.
1784 *
1785 * Level 2: start the Blink Source Counter
1786 *
1787 * Returns:
1788 * 0: success
1789 * 1: Number of MACs exceeds SK_MAX_MACS (after level 1)
1790 * 2: Adapter not present or not accessible
1791 * 3: Illegal initialization level
1792 * 4: Initialization Level 1 Call missing
1793 * 5: Unexpected PHY type detected
1794 * 6: HW self test failed
1795 */
1796int SkGeInit(
1797SK_AC *pAC, /* adapter context */
1798SK_IOC IoC, /* IO context */
1799int Level) /* initialization level */
1800{
1801 int RetVal; /* return value */
1802 SK_U32 DWord;
1803
1804 RetVal = 0;
1805 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT,
1806 ("SkGeInit(Level %d)\n", Level));
1807
1808 switch (Level) {
1809 case SK_INIT_DATA:
1810 /* Initialization Level 0 */
1811 SkGeInit0(pAC, IoC);
1812 pAC->GIni.GILevel = SK_INIT_DATA;
1813 break;
1814
1815 case SK_INIT_IO:
1816 /* Initialization Level 1 */
1817 RetVal = SkGeInit1(pAC, IoC);
1818 if (RetVal != 0) {
1819 break;
1820 }
1821
1822 /* check if the adapter seems to be accessible */
1823 SK_OUT32(IoC, B2_IRQM_INI, SK_TEST_VAL);
1824 SK_IN32(IoC, B2_IRQM_INI, &DWord);
1825 SK_OUT32(IoC, B2_IRQM_INI, 0L);
1826
1827 if (DWord != SK_TEST_VAL) {
1828 RetVal = 2;
1829 break;
1830 }
1831
1832 /* check if the number of GIMacsFound matches SK_MAX_MACS */
1833 if (pAC->GIni.GIMacsFound > SK_MAX_MACS) {
1834 RetVal = 1;
1835 break;
1836 }
1837
1838 /* Level 1 successfully passed */
1839 pAC->GIni.GILevel = SK_INIT_IO;
1840 break;
1841
1842 case SK_INIT_RUN:
1843 /* Initialization Level 2 */
1844 if (pAC->GIni.GILevel != SK_INIT_IO) {
1845#ifndef SK_DIAG
1846 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E002, SKERR_HWI_E002MSG);
1847#endif /* !SK_DIAG */
1848 RetVal = 4;
1849 break;
1850 }
1851 SkGeInit2(pAC, IoC);
1852
1853 /* Level 2 successfully passed */
1854 pAC->GIni.GILevel = SK_INIT_RUN;
1855 break;
1856
1857 default:
1858 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E003, SKERR_HWI_E003MSG);
1859 RetVal = 3;
1860 break;
1861 }
1862
1863 return(RetVal);
1864} /* SkGeInit */
1865
1866
1867/******************************************************************************
1868 *
1869 * SkGeDeInit() - Deinitialize the adapter
1870 *
1871 * Description:
1872 * All ports of the adapter will be stopped if not already done.
1873 * Do a software reset and switch off all LEDs.
1874 *
1875 * Returns:
1876 * nothing
1877 */
1878void SkGeDeInit(
1879SK_AC *pAC, /* adapter context */
1880SK_IOC IoC) /* IO context */
1881{
1882 int i;
1883 SK_U16 Word;
1884
1885#if (!defined(SK_SLIM) && !defined(VCPU))
1886 /* ensure I2C is ready */
1887 SkI2cWaitIrq(pAC, IoC);
1888#endif
1889
1890 /* stop all current transfer activity */
1891 for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
1892 if (pAC->GIni.GP[i].PState != SK_PRT_STOP &&
1893 pAC->GIni.GP[i].PState != SK_PRT_RESET) {
1894
1895 SkGeStopPort(pAC, IoC, i, SK_STOP_ALL, SK_HARD_RST);
1896 }
1897 }
1898
1899 /* Reset all bits in the PCI STATUS register */
1900 /*
1901 * Note: PCI Cfg cycles cannot be used, because they are not
1902 * available on some platforms after 'boot time'.
1903 */
1904 SK_IN16(IoC, PCI_C(PCI_STATUS), &Word);
1905
1906 SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_ON);
1907 SK_OUT16(IoC, PCI_C(PCI_STATUS), (SK_U16)(Word | PCI_ERRBITS));
1908 SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
1909
1910 /* do the reset, all LEDs are switched off now */
1911 SK_OUT8(IoC, B0_CTST, CS_RST_SET);
1912
1913 pAC->GIni.GILevel = SK_INIT_DATA;
1914} /* SkGeDeInit */
1915
1916
1917/******************************************************************************
1918 *
1919 * SkGeInitPort() Initialize the specified port.
1920 *
1921 * Description:
1922 * PRxQSize, PXSQSize, and PXAQSize has to be
1923 * configured for the specified port before calling this function.
1924 * The descriptor rings has to be initialized too.
1925 *
1926 * o (Re)configure queues of the specified port.
1927 * o configure the MAC of the specified port.
1928 * o put ASIC and MAC(s) in operational mode.
1929 * o initialize Rx/Tx and Sync LED
1930 * o initialize RAM Buffers and MAC FIFOs
1931 *
1932 * The port is ready to connect when returning.
1933 *
1934 * Note:
1935 * The MAC's Rx and Tx state machine is still disabled when returning.
1936 *
1937 * Returns:
1938 * 0: success
1939 * 1: Queue size initialization error. The configured values
1940 * for PRxQSize, PXSQSize, or PXAQSize are invalid for one
1941 * or more queues. The specified port was NOT initialized.
1942 * An error log entry was generated.
1943 * 2: The port has to be stopped before it can be initialized again.
1944 */
1945int SkGeInitPort(
1946SK_AC *pAC, /* adapter context */
1947SK_IOC IoC, /* IO context */
1948int Port) /* Port to configure */
1949{
1950 SK_GEPORT *pPrt;
1951
1952 pPrt = &pAC->GIni.GP[Port];
1953
1954 if (SkGeCheckQSize(pAC, Port) != 0) {
1955 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E004, SKERR_HWI_E004MSG);
1956 return(1);
1957 }
1958
1959 if (pPrt->PState == SK_PRT_INIT || pPrt->PState == SK_PRT_RUN) {
1960 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E005, SKERR_HWI_E005MSG);
1961 return(2);
1962 }
1963
1964 /* configuration ok, initialize the Port now */
1965
1966#ifdef GENESIS
1967 if (pAC->GIni.GIGenesis) {
1968 /* initialize Rx, Tx and Link LED */
1969 /*
1970 * If 1000BT Phy needs LED initialization than swap
1971 * LED and XMAC initialization order
1972 */
1973 SkGeXmitLED(pAC, IoC, MR_ADDR(Port, TX_LED_INI), SK_LED_ENA);
1974 SkGeXmitLED(pAC, IoC, MR_ADDR(Port, RX_LED_INI), SK_LED_ENA);
1975 /* The Link LED is initialized by RLMT or Diagnostics itself */
1976
1977 SkXmInitMac(pAC, IoC, Port);
1978 }
1979#endif /* GENESIS */
1980
1981#ifdef YUKON
1982 if (pAC->GIni.GIYukon) {
1983
1984 SkGmInitMac(pAC, IoC, Port);
1985 }
1986#endif /* YUKON */
1987
1988 /* do NOT initialize the Link Sync Counter */
1989
1990 SkGeInitMacFifo(pAC, IoC, Port);
1991
1992 SkGeInitRamBufs(pAC, IoC, Port);
1993
1994 if (pPrt->PXSQSize != 0) {
1995 /* enable Force Sync bit if synchronous queue available */
1996 SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL), TXA_ENA_FSYNC);
1997 }
1998
1999 SkGeInitBmu(pAC, IoC, Port);
2000
2001 /* mark port as initialized */
2002 pPrt->PState = SK_PRT_INIT;
2003
2004 return(0);
2005} /* SkGeInitPort */
diff --git a/drivers/net/sk98lin/skgemib.c b/drivers/net/sk98lin/skgemib.c
new file mode 100644
index 0000000000..0a6f67a7a3
--- /dev/null
+++ b/drivers/net/sk98lin/skgemib.c
@@ -0,0 +1,1075 @@
1/*****************************************************************************
2 *
3 * Name: skgemib.c
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.11 $
6 * Date: $Date: 2003/09/15 13:38:12 $
7 * Purpose: Private Network Management Interface Management Database
8 *
9 ****************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/*
26 * PRIVATE OID handler function prototypes
27 */
28PNMI_STATIC int Addr(SK_AC *pAC, SK_IOC IoC, int action,
29 SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance,
30 unsigned int TableIndex, SK_U32 NetIndex);
31PNMI_STATIC int CsumStat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
32 char *pBuf, unsigned int *pLen, SK_U32 Instance,
33 unsigned int TableIndex, SK_U32 NetIndex);
34PNMI_STATIC int General(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
35 char *pBuf, unsigned int *pLen, SK_U32 Instance,
36 unsigned int TableIndex, SK_U32 NetIndex);
37PNMI_STATIC int Mac8023Stat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
38 char *pBuf, unsigned int *pLen, SK_U32 Instance,
39 unsigned int TableIndex, SK_U32 NetIndex);
40PNMI_STATIC int MacPrivateConf(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
41 char *pBuf, unsigned int *pLen, SK_U32 Instance,
42 unsigned int TableIndex, SK_U32 NetIndex);
43PNMI_STATIC int MacPrivateStat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
44 char *pBuf, unsigned int *pLen, SK_U32 Instance,
45 unsigned int TableIndex, SK_U32 NetIndex);
46PNMI_STATIC int Monitor(SK_AC *pAC, SK_IOC IoC, int action,
47 SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance,
48 unsigned int TableIndex, SK_U32 NetIndex);
49PNMI_STATIC int OidStruct(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
50 char *pBuf, unsigned int *pLen, SK_U32 Instance,
51 unsigned int TableIndex, SK_U32 NetIndex);
52PNMI_STATIC int Perform(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
53 char *pBuf, unsigned int* pLen, SK_U32 Instance,
54 unsigned int TableIndex, SK_U32 NetIndex);
55PNMI_STATIC int Rlmt(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
56 char *pBuf, unsigned int *pLen, SK_U32 Instance,
57 unsigned int TableIndex, SK_U32 NetIndex);
58PNMI_STATIC int RlmtStat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
59 char *pBuf, unsigned int *pLen, SK_U32 Instance,
60 unsigned int TableIndex, SK_U32 NetIndex);
61PNMI_STATIC int SensorStat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
62 char *pBuf, unsigned int *pLen, SK_U32 Instance,
63 unsigned int TableIndex, SK_U32 NetIndex);
64PNMI_STATIC int Vpd(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
65 char *pBuf, unsigned int *pLen, SK_U32 Instance,
66 unsigned int TableIndex, SK_U32 NetIndex);
67PNMI_STATIC int Vct(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
68 char *pBuf, unsigned int *pLen, SK_U32 Instance,
69 unsigned int TableIndex, SK_U32 NetIndex);
70
71#ifdef SK_POWER_MGMT
72PNMI_STATIC int PowerManagement(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
73 char *pBuf, unsigned int *pLen, SK_U32 Instance,
74 unsigned int TableIndex, SK_U32 NetIndex);
75#endif /* SK_POWER_MGMT */
76
77#ifdef SK_DIAG_SUPPORT
78PNMI_STATIC int DiagActions(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
79 char *pBuf, unsigned int *pLen, SK_U32 Instance,
80 unsigned int TableIndex, SK_U32 NetIndex);
81#endif /* SK_DIAG_SUPPORT */
82
83
84/* defines *******************************************************************/
85#define ID_TABLE_SIZE (sizeof(IdTable)/sizeof(IdTable[0]))
86
87
88/* global variables **********************************************************/
89
90/*
91 * Table to correlate OID with handler function and index to
92 * hardware register stored in StatAddress if applicable.
93 */
94PNMI_STATIC const SK_PNMI_TAB_ENTRY IdTable[] = {
95 {OID_GEN_XMIT_OK,
96 0,
97 0,
98 0,
99 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HTX},
100 {OID_GEN_RCV_OK,
101 0,
102 0,
103 0,
104 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HRX},
105 {OID_GEN_XMIT_ERROR,
106 0,
107 0,
108 0,
109 SK_PNMI_RO, General, 0},
110 {OID_GEN_RCV_ERROR,
111 0,
112 0,
113 0,
114 SK_PNMI_RO, General, 0},
115 {OID_GEN_RCV_NO_BUFFER,
116 0,
117 0,
118 0,
119 SK_PNMI_RO, General, 0},
120 {OID_GEN_DIRECTED_FRAMES_XMIT,
121 0,
122 0,
123 0,
124 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HTX_UNICAST},
125 {OID_GEN_MULTICAST_FRAMES_XMIT,
126 0,
127 0,
128 0,
129 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HTX_MULTICAST},
130 {OID_GEN_BROADCAST_FRAMES_XMIT,
131 0,
132 0,
133 0,
134 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HTX_BROADCAST},
135 {OID_GEN_DIRECTED_FRAMES_RCV,
136 0,
137 0,
138 0,
139 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HRX_UNICAST},
140 {OID_GEN_MULTICAST_FRAMES_RCV,
141 0,
142 0,
143 0,
144 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HRX_MULTICAST},
145 {OID_GEN_BROADCAST_FRAMES_RCV,
146 0,
147 0,
148 0,
149 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HRX_BROADCAST},
150 {OID_GEN_RCV_CRC_ERROR,
151 0,
152 0,
153 0,
154 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HRX_FCS},
155 {OID_GEN_TRANSMIT_QUEUE_LENGTH,
156 0,
157 0,
158 0,
159 SK_PNMI_RO, General, 0},
160 {OID_802_3_PERMANENT_ADDRESS,
161 0,
162 0,
163 0,
164 SK_PNMI_RO, Mac8023Stat, 0},
165 {OID_802_3_CURRENT_ADDRESS,
166 0,
167 0,
168 0,
169 SK_PNMI_RO, Mac8023Stat, 0},
170 {OID_802_3_RCV_ERROR_ALIGNMENT,
171 0,
172 0,
173 0,
174 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HRX_FRAMING},
175 {OID_802_3_XMIT_ONE_COLLISION,
176 0,
177 0,
178 0,
179 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HTX_SINGLE_COL},
180 {OID_802_3_XMIT_MORE_COLLISIONS,
181 0,
182 0,
183 0,
184 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HTX_MULTI_COL},
185 {OID_802_3_XMIT_DEFERRED,
186 0,
187 0,
188 0,
189 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HTX_DEFFERAL},
190 {OID_802_3_XMIT_MAX_COLLISIONS,
191 0,
192 0,
193 0,
194 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HTX_EXCESS_COL},
195 {OID_802_3_RCV_OVERRUN,
196 0,
197 0,
198 0,
199 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HRX_OVERFLOW},
200 {OID_802_3_XMIT_UNDERRUN,
201 0,
202 0,
203 0,
204 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HTX_UNDERRUN},
205 {OID_802_3_XMIT_TIMES_CRS_LOST,
206 0,
207 0,
208 0,
209 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HTX_CARRIER},
210 {OID_802_3_XMIT_LATE_COLLISIONS,
211 0,
212 0,
213 0,
214 SK_PNMI_RO, Mac8023Stat, SK_PNMI_HTX_LATE_COL},
215#ifdef SK_POWER_MGMT
216 {OID_PNP_CAPABILITIES,
217 0,
218 0,
219 0,
220 SK_PNMI_RO, PowerManagement, 0},
221 {OID_PNP_SET_POWER,
222 0,
223 0,
224 0,
225 SK_PNMI_WO, PowerManagement, 0},
226 {OID_PNP_QUERY_POWER,
227 0,
228 0,
229 0,
230 SK_PNMI_RO, PowerManagement, 0},
231 {OID_PNP_ADD_WAKE_UP_PATTERN,
232 0,
233 0,
234 0,
235 SK_PNMI_WO, PowerManagement, 0},
236 {OID_PNP_REMOVE_WAKE_UP_PATTERN,
237 0,
238 0,
239 0,
240 SK_PNMI_WO, PowerManagement, 0},
241 {OID_PNP_ENABLE_WAKE_UP,
242 0,
243 0,
244 0,
245 SK_PNMI_RW, PowerManagement, 0},
246#endif /* SK_POWER_MGMT */
247#ifdef SK_DIAG_SUPPORT
248 {OID_SKGE_DIAG_MODE,
249 0,
250 0,
251 0,
252 SK_PNMI_RW, DiagActions, 0},
253#endif /* SK_DIAG_SUPPORT */
254 {OID_SKGE_MDB_VERSION,
255 1,
256 0,
257 SK_PNMI_MAI_OFF(MgmtDBVersion),
258 SK_PNMI_RO, General, 0},
259 {OID_SKGE_SUPPORTED_LIST,
260 0,
261 0,
262 0,
263 SK_PNMI_RO, General, 0},
264 {OID_SKGE_ALL_DATA,
265 0,
266 0,
267 0,
268 SK_PNMI_RW, OidStruct, 0},
269 {OID_SKGE_VPD_FREE_BYTES,
270 1,
271 0,
272 SK_PNMI_MAI_OFF(VpdFreeBytes),
273 SK_PNMI_RO, Vpd, 0},
274 {OID_SKGE_VPD_ENTRIES_LIST,
275 1,
276 0,
277 SK_PNMI_MAI_OFF(VpdEntriesList),
278 SK_PNMI_RO, Vpd, 0},
279 {OID_SKGE_VPD_ENTRIES_NUMBER,
280 1,
281 0,
282 SK_PNMI_MAI_OFF(VpdEntriesNumber),
283 SK_PNMI_RO, Vpd, 0},
284 {OID_SKGE_VPD_KEY,
285 SK_PNMI_VPD_ENTRIES,
286 sizeof(SK_PNMI_VPD),
287 SK_PNMI_OFF(Vpd) + SK_PNMI_VPD_OFF(VpdKey),
288 SK_PNMI_RO, Vpd, 0},
289 {OID_SKGE_VPD_VALUE,
290 SK_PNMI_VPD_ENTRIES,
291 sizeof(SK_PNMI_VPD),
292 SK_PNMI_OFF(Vpd) + SK_PNMI_VPD_OFF(VpdValue),
293 SK_PNMI_RO, Vpd, 0},
294 {OID_SKGE_VPD_ACCESS,
295 SK_PNMI_VPD_ENTRIES,
296 sizeof(SK_PNMI_VPD),
297 SK_PNMI_OFF(Vpd) + SK_PNMI_VPD_OFF(VpdAccess),
298 SK_PNMI_RO, Vpd, 0},
299 {OID_SKGE_VPD_ACTION,
300 SK_PNMI_VPD_ENTRIES,
301 sizeof(SK_PNMI_VPD),
302 SK_PNMI_OFF(Vpd) + SK_PNMI_VPD_OFF(VpdAction),
303 SK_PNMI_RW, Vpd, 0},
304 {OID_SKGE_PORT_NUMBER,
305 1,
306 0,
307 SK_PNMI_MAI_OFF(PortNumber),
308 SK_PNMI_RO, General, 0},
309 {OID_SKGE_DEVICE_TYPE,
310 1,
311 0,
312 SK_PNMI_MAI_OFF(DeviceType),
313 SK_PNMI_RO, General, 0},
314 {OID_SKGE_DRIVER_DESCR,
315 1,
316 0,
317 SK_PNMI_MAI_OFF(DriverDescr),
318 SK_PNMI_RO, General, 0},
319 {OID_SKGE_DRIVER_VERSION,
320 1,
321 0,
322 SK_PNMI_MAI_OFF(DriverVersion),
323 SK_PNMI_RO, General, 0},
324 {OID_SKGE_DRIVER_RELDATE,
325 1,
326 0,
327 SK_PNMI_MAI_OFF(DriverReleaseDate),
328 SK_PNMI_RO, General, 0},
329 {OID_SKGE_DRIVER_FILENAME,
330 1,
331 0,
332 SK_PNMI_MAI_OFF(DriverFileName),
333 SK_PNMI_RO, General, 0},
334 {OID_SKGE_HW_DESCR,
335 1,
336 0,
337 SK_PNMI_MAI_OFF(HwDescr),
338 SK_PNMI_RO, General, 0},
339 {OID_SKGE_HW_VERSION,
340 1,
341 0,
342 SK_PNMI_MAI_OFF(HwVersion),
343 SK_PNMI_RO, General, 0},
344 {OID_SKGE_CHIPSET,
345 1,
346 0,
347 SK_PNMI_MAI_OFF(Chipset),
348 SK_PNMI_RO, General, 0},
349 {OID_SKGE_CHIPID,
350 1,
351 0,
352 SK_PNMI_MAI_OFF(ChipId),
353 SK_PNMI_RO, General, 0},
354 {OID_SKGE_RAMSIZE,
355 1,
356 0,
357 SK_PNMI_MAI_OFF(RamSize),
358 SK_PNMI_RO, General, 0},
359 {OID_SKGE_VAUXAVAIL,
360 1,
361 0,
362 SK_PNMI_MAI_OFF(VauxAvail),
363 SK_PNMI_RO, General, 0},
364 {OID_SKGE_ACTION,
365 1,
366 0,
367 SK_PNMI_MAI_OFF(Action),
368 SK_PNMI_RW, Perform, 0},
369 {OID_SKGE_RESULT,
370 1,
371 0,
372 SK_PNMI_MAI_OFF(TestResult),
373 SK_PNMI_RO, General, 0},
374 {OID_SKGE_BUS_TYPE,
375 1,
376 0,
377 SK_PNMI_MAI_OFF(BusType),
378 SK_PNMI_RO, General, 0},
379 {OID_SKGE_BUS_SPEED,
380 1,
381 0,
382 SK_PNMI_MAI_OFF(BusSpeed),
383 SK_PNMI_RO, General, 0},
384 {OID_SKGE_BUS_WIDTH,
385 1,
386 0,
387 SK_PNMI_MAI_OFF(BusWidth),
388 SK_PNMI_RO, General, 0},
389 {OID_SKGE_TX_SW_QUEUE_LEN,
390 1,
391 0,
392 SK_PNMI_MAI_OFF(TxSwQueueLen),
393 SK_PNMI_RO, General, 0},
394 {OID_SKGE_TX_SW_QUEUE_MAX,
395 1,
396 0,
397 SK_PNMI_MAI_OFF(TxSwQueueMax),
398 SK_PNMI_RO, General, 0},
399 {OID_SKGE_TX_RETRY,
400 1,
401 0,
402 SK_PNMI_MAI_OFF(TxRetryCts),
403 SK_PNMI_RO, General, 0},
404 {OID_SKGE_RX_INTR_CTS,
405 1,
406 0,
407 SK_PNMI_MAI_OFF(RxIntrCts),
408 SK_PNMI_RO, General, 0},
409 {OID_SKGE_TX_INTR_CTS,
410 1,
411 0,
412 SK_PNMI_MAI_OFF(TxIntrCts),
413 SK_PNMI_RO, General, 0},
414 {OID_SKGE_RX_NO_BUF_CTS,
415 1,
416 0,
417 SK_PNMI_MAI_OFF(RxNoBufCts),
418 SK_PNMI_RO, General, 0},
419 {OID_SKGE_TX_NO_BUF_CTS,
420 1,
421 0,
422 SK_PNMI_MAI_OFF(TxNoBufCts),
423 SK_PNMI_RO, General, 0},
424 {OID_SKGE_TX_USED_DESCR_NO,
425 1,
426 0,
427 SK_PNMI_MAI_OFF(TxUsedDescrNo),
428 SK_PNMI_RO, General, 0},
429 {OID_SKGE_RX_DELIVERED_CTS,
430 1,
431 0,
432 SK_PNMI_MAI_OFF(RxDeliveredCts),
433 SK_PNMI_RO, General, 0},
434 {OID_SKGE_RX_OCTETS_DELIV_CTS,
435 1,
436 0,
437 SK_PNMI_MAI_OFF(RxOctetsDeliveredCts),
438 SK_PNMI_RO, General, 0},
439 {OID_SKGE_RX_HW_ERROR_CTS,
440 1,
441 0,
442 SK_PNMI_MAI_OFF(RxHwErrorsCts),
443 SK_PNMI_RO, General, 0},
444 {OID_SKGE_TX_HW_ERROR_CTS,
445 1,
446 0,
447 SK_PNMI_MAI_OFF(TxHwErrorsCts),
448 SK_PNMI_RO, General, 0},
449 {OID_SKGE_IN_ERRORS_CTS,
450 1,
451 0,
452 SK_PNMI_MAI_OFF(InErrorsCts),
453 SK_PNMI_RO, General, 0},
454 {OID_SKGE_OUT_ERROR_CTS,
455 1,
456 0,
457 SK_PNMI_MAI_OFF(OutErrorsCts),
458 SK_PNMI_RO, General, 0},
459 {OID_SKGE_ERR_RECOVERY_CTS,
460 1,
461 0,
462 SK_PNMI_MAI_OFF(ErrRecoveryCts),
463 SK_PNMI_RO, General, 0},
464 {OID_SKGE_SYSUPTIME,
465 1,
466 0,
467 SK_PNMI_MAI_OFF(SysUpTime),
468 SK_PNMI_RO, General, 0},
469 {OID_SKGE_SENSOR_NUMBER,
470 1,
471 0,
472 SK_PNMI_MAI_OFF(SensorNumber),
473 SK_PNMI_RO, General, 0},
474 {OID_SKGE_SENSOR_INDEX,
475 SK_PNMI_SENSOR_ENTRIES,
476 sizeof(SK_PNMI_SENSOR),
477 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorIndex),
478 SK_PNMI_RO, SensorStat, 0},
479 {OID_SKGE_SENSOR_DESCR,
480 SK_PNMI_SENSOR_ENTRIES,
481 sizeof(SK_PNMI_SENSOR),
482 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorDescr),
483 SK_PNMI_RO, SensorStat, 0},
484 {OID_SKGE_SENSOR_TYPE,
485 SK_PNMI_SENSOR_ENTRIES,
486 sizeof(SK_PNMI_SENSOR),
487 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorType),
488 SK_PNMI_RO, SensorStat, 0},
489 {OID_SKGE_SENSOR_VALUE,
490 SK_PNMI_SENSOR_ENTRIES,
491 sizeof(SK_PNMI_SENSOR),
492 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorValue),
493 SK_PNMI_RO, SensorStat, 0},
494 {OID_SKGE_SENSOR_WAR_THRES_LOW,
495 SK_PNMI_SENSOR_ENTRIES,
496 sizeof(SK_PNMI_SENSOR),
497 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorWarningThresholdLow),
498 SK_PNMI_RO, SensorStat, 0},
499 {OID_SKGE_SENSOR_WAR_THRES_UPP,
500 SK_PNMI_SENSOR_ENTRIES,
501 sizeof(SK_PNMI_SENSOR),
502 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorWarningThresholdHigh),
503 SK_PNMI_RO, SensorStat, 0},
504 {OID_SKGE_SENSOR_ERR_THRES_LOW,
505 SK_PNMI_SENSOR_ENTRIES,
506 sizeof(SK_PNMI_SENSOR),
507 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorErrorThresholdLow),
508 SK_PNMI_RO, SensorStat, 0},
509 {OID_SKGE_SENSOR_ERR_THRES_UPP,
510 SK_PNMI_SENSOR_ENTRIES,
511 sizeof(SK_PNMI_SENSOR),
512 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorErrorThresholdHigh),
513 SK_PNMI_RO, SensorStat, 0},
514 {OID_SKGE_SENSOR_STATUS,
515 SK_PNMI_SENSOR_ENTRIES,
516 sizeof(SK_PNMI_SENSOR),
517 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorStatus),
518 SK_PNMI_RO, SensorStat, 0},
519 {OID_SKGE_SENSOR_WAR_CTS,
520 SK_PNMI_SENSOR_ENTRIES,
521 sizeof(SK_PNMI_SENSOR),
522 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorWarningCts),
523 SK_PNMI_RO, SensorStat, 0},
524 {OID_SKGE_SENSOR_ERR_CTS,
525 SK_PNMI_SENSOR_ENTRIES,
526 sizeof(SK_PNMI_SENSOR),
527 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorErrorCts),
528 SK_PNMI_RO, SensorStat, 0},
529 {OID_SKGE_SENSOR_WAR_TIME,
530 SK_PNMI_SENSOR_ENTRIES,
531 sizeof(SK_PNMI_SENSOR),
532 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorWarningTimestamp),
533 SK_PNMI_RO, SensorStat, 0},
534 {OID_SKGE_SENSOR_ERR_TIME,
535 SK_PNMI_SENSOR_ENTRIES,
536 sizeof(SK_PNMI_SENSOR),
537 SK_PNMI_OFF(Sensor) + SK_PNMI_SEN_OFF(SensorErrorTimestamp),
538 SK_PNMI_RO, SensorStat, 0},
539 {OID_SKGE_CHKSM_NUMBER,
540 1,
541 0,
542 SK_PNMI_MAI_OFF(ChecksumNumber),
543 SK_PNMI_RO, General, 0},
544 {OID_SKGE_CHKSM_RX_OK_CTS,
545 SKCS_NUM_PROTOCOLS,
546 sizeof(SK_PNMI_CHECKSUM),
547 SK_PNMI_OFF(Checksum) + SK_PNMI_CHK_OFF(ChecksumRxOkCts),
548 SK_PNMI_RO, CsumStat, 0},
549 {OID_SKGE_CHKSM_RX_UNABLE_CTS,
550 SKCS_NUM_PROTOCOLS,
551 sizeof(SK_PNMI_CHECKSUM),
552 SK_PNMI_OFF(Checksum) + SK_PNMI_CHK_OFF(ChecksumRxUnableCts),
553 SK_PNMI_RO, CsumStat, 0},
554 {OID_SKGE_CHKSM_RX_ERR_CTS,
555 SKCS_NUM_PROTOCOLS,
556 sizeof(SK_PNMI_CHECKSUM),
557 SK_PNMI_OFF(Checksum) + SK_PNMI_CHK_OFF(ChecksumRxErrCts),
558 SK_PNMI_RO, CsumStat, 0},
559 {OID_SKGE_CHKSM_TX_OK_CTS,
560 SKCS_NUM_PROTOCOLS,
561 sizeof(SK_PNMI_CHECKSUM),
562 SK_PNMI_OFF(Checksum) + SK_PNMI_CHK_OFF(ChecksumTxOkCts),
563 SK_PNMI_RO, CsumStat, 0},
564 {OID_SKGE_CHKSM_TX_UNABLE_CTS,
565 SKCS_NUM_PROTOCOLS,
566 sizeof(SK_PNMI_CHECKSUM),
567 SK_PNMI_OFF(Checksum) + SK_PNMI_CHK_OFF(ChecksumTxUnableCts),
568 SK_PNMI_RO, CsumStat, 0},
569 {OID_SKGE_STAT_TX,
570 SK_PNMI_MAC_ENTRIES,
571 sizeof(SK_PNMI_STAT),
572 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxOkCts),
573 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX},
574 {OID_SKGE_STAT_TX_OCTETS,
575 SK_PNMI_MAC_ENTRIES,
576 sizeof(SK_PNMI_STAT),
577 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxOctetsOkCts),
578 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_OCTET},
579 {OID_SKGE_STAT_TX_BROADCAST,
580 SK_PNMI_MAC_ENTRIES,
581 sizeof(SK_PNMI_STAT),
582 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxBroadcastOkCts),
583 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_BROADCAST},
584 {OID_SKGE_STAT_TX_MULTICAST,
585 SK_PNMI_MAC_ENTRIES,
586 sizeof(SK_PNMI_STAT),
587 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxMulticastOkCts),
588 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_MULTICAST},
589 {OID_SKGE_STAT_TX_UNICAST,
590 SK_PNMI_MAC_ENTRIES,
591 sizeof(SK_PNMI_STAT),
592 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxUnicastOkCts),
593 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_UNICAST},
594 {OID_SKGE_STAT_TX_LONGFRAMES,
595 SK_PNMI_MAC_ENTRIES,
596 sizeof(SK_PNMI_STAT),
597 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxLongFramesCts),
598 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_LONGFRAMES},
599 {OID_SKGE_STAT_TX_BURST,
600 SK_PNMI_MAC_ENTRIES,
601 sizeof(SK_PNMI_STAT),
602 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxBurstCts),
603 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_BURST},
604 {OID_SKGE_STAT_TX_PFLOWC,
605 SK_PNMI_MAC_ENTRIES,
606 sizeof(SK_PNMI_STAT),
607 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxPauseMacCtrlCts),
608 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_PMACC},
609 {OID_SKGE_STAT_TX_FLOWC,
610 SK_PNMI_MAC_ENTRIES,
611 sizeof(SK_PNMI_STAT),
612 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxMacCtrlCts),
613 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_MACC},
614 {OID_SKGE_STAT_TX_SINGLE_COL,
615 SK_PNMI_MAC_ENTRIES,
616 sizeof(SK_PNMI_STAT),
617 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxSingleCollisionCts),
618 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_SINGLE_COL},
619 {OID_SKGE_STAT_TX_MULTI_COL,
620 SK_PNMI_MAC_ENTRIES,
621 sizeof(SK_PNMI_STAT),
622 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxMultipleCollisionCts),
623 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_MULTI_COL},
624 {OID_SKGE_STAT_TX_EXCESS_COL,
625 SK_PNMI_MAC_ENTRIES,
626 sizeof(SK_PNMI_STAT),
627 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxExcessiveCollisionCts),
628 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_EXCESS_COL},
629 {OID_SKGE_STAT_TX_LATE_COL,
630 SK_PNMI_MAC_ENTRIES,
631 sizeof(SK_PNMI_STAT),
632 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxLateCollisionCts),
633 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_LATE_COL},
634 {OID_SKGE_STAT_TX_DEFFERAL,
635 SK_PNMI_MAC_ENTRIES,
636 sizeof(SK_PNMI_STAT),
637 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxDeferralCts),
638 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_DEFFERAL},
639 {OID_SKGE_STAT_TX_EXCESS_DEF,
640 SK_PNMI_MAC_ENTRIES,
641 sizeof(SK_PNMI_STAT),
642 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxExcessiveDeferralCts),
643 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_EXCESS_DEF},
644 {OID_SKGE_STAT_TX_UNDERRUN,
645 SK_PNMI_MAC_ENTRIES,
646 sizeof(SK_PNMI_STAT),
647 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxFifoUnderrunCts),
648 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_UNDERRUN},
649 {OID_SKGE_STAT_TX_CARRIER,
650 SK_PNMI_MAC_ENTRIES,
651 sizeof(SK_PNMI_STAT),
652 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxCarrierCts),
653 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_CARRIER},
654/* {OID_SKGE_STAT_TX_UTIL,
655 SK_PNMI_MAC_ENTRIES,
656 sizeof(SK_PNMI_STAT),
657 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxUtilization),
658 SK_PNMI_RO, MacPrivateStat, (SK_U16)(-1)}, */
659 {OID_SKGE_STAT_TX_64,
660 SK_PNMI_MAC_ENTRIES,
661 sizeof(SK_PNMI_STAT),
662 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTx64Cts),
663 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_64},
664 {OID_SKGE_STAT_TX_127,
665 SK_PNMI_MAC_ENTRIES,
666 sizeof(SK_PNMI_STAT),
667 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTx127Cts),
668 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_127},
669 {OID_SKGE_STAT_TX_255,
670 SK_PNMI_MAC_ENTRIES,
671 sizeof(SK_PNMI_STAT),
672 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTx255Cts),
673 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_255},
674 {OID_SKGE_STAT_TX_511,
675 SK_PNMI_MAC_ENTRIES,
676 sizeof(SK_PNMI_STAT),
677 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTx511Cts),
678 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_511},
679 {OID_SKGE_STAT_TX_1023,
680 SK_PNMI_MAC_ENTRIES,
681 sizeof(SK_PNMI_STAT),
682 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTx1023Cts),
683 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_1023},
684 {OID_SKGE_STAT_TX_MAX,
685 SK_PNMI_MAC_ENTRIES,
686 sizeof(SK_PNMI_STAT),
687 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxMaxCts),
688 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_MAX},
689 {OID_SKGE_STAT_TX_SYNC,
690 SK_PNMI_MAC_ENTRIES,
691 sizeof(SK_PNMI_STAT),
692 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxSyncCts),
693 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_SYNC},
694 {OID_SKGE_STAT_TX_SYNC_OCTETS,
695 SK_PNMI_MAC_ENTRIES,
696 sizeof(SK_PNMI_STAT),
697 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatTxSyncOctetsCts),
698 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HTX_SYNC_OCTET},
699 {OID_SKGE_STAT_RX,
700 SK_PNMI_MAC_ENTRIES,
701 sizeof(SK_PNMI_STAT),
702 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxOkCts),
703 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX},
704 {OID_SKGE_STAT_RX_OCTETS,
705 SK_PNMI_MAC_ENTRIES,
706 sizeof(SK_PNMI_STAT),
707 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxOctetsOkCts),
708 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_OCTET},
709 {OID_SKGE_STAT_RX_BROADCAST,
710 SK_PNMI_MAC_ENTRIES,
711 sizeof(SK_PNMI_STAT),
712 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxBroadcastOkCts),
713 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_BROADCAST},
714 {OID_SKGE_STAT_RX_MULTICAST,
715 SK_PNMI_MAC_ENTRIES,
716 sizeof(SK_PNMI_STAT),
717 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxMulticastOkCts),
718 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_MULTICAST},
719 {OID_SKGE_STAT_RX_UNICAST,
720 SK_PNMI_MAC_ENTRIES,
721 sizeof(SK_PNMI_STAT),
722 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxUnicastOkCts),
723 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_UNICAST},
724 {OID_SKGE_STAT_RX_LONGFRAMES,
725 SK_PNMI_MAC_ENTRIES,
726 sizeof(SK_PNMI_STAT),
727 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxLongFramesCts),
728 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_LONGFRAMES},
729 {OID_SKGE_STAT_RX_PFLOWC,
730 SK_PNMI_MAC_ENTRIES,
731 sizeof(SK_PNMI_STAT),
732 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxPauseMacCtrlCts),
733 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_PMACC},
734 {OID_SKGE_STAT_RX_FLOWC,
735 SK_PNMI_MAC_ENTRIES,
736 sizeof(SK_PNMI_STAT),
737 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxMacCtrlCts),
738 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_MACC},
739 {OID_SKGE_STAT_RX_PFLOWC_ERR,
740 SK_PNMI_MAC_ENTRIES,
741 sizeof(SK_PNMI_STAT),
742 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxPauseMacCtrlErrorCts),
743 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_PMACC_ERR},
744 {OID_SKGE_STAT_RX_FLOWC_UNKWN,
745 SK_PNMI_MAC_ENTRIES,
746 sizeof(SK_PNMI_STAT),
747 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxMacCtrlUnknownCts),
748 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_MACC_UNKWN},
749 {OID_SKGE_STAT_RX_BURST,
750 SK_PNMI_MAC_ENTRIES,
751 sizeof(SK_PNMI_STAT),
752 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxBurstCts),
753 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_BURST},
754 {OID_SKGE_STAT_RX_MISSED,
755 SK_PNMI_MAC_ENTRIES,
756 sizeof(SK_PNMI_STAT),
757 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxMissedCts),
758 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_MISSED},
759 {OID_SKGE_STAT_RX_FRAMING,
760 SK_PNMI_MAC_ENTRIES,
761 sizeof(SK_PNMI_STAT),
762 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxFramingCts),
763 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_FRAMING},
764 {OID_SKGE_STAT_RX_OVERFLOW,
765 SK_PNMI_MAC_ENTRIES,
766 sizeof(SK_PNMI_STAT),
767 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxFifoOverflowCts),
768 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_OVERFLOW},
769 {OID_SKGE_STAT_RX_JABBER,
770 SK_PNMI_MAC_ENTRIES,
771 sizeof(SK_PNMI_STAT),
772 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxJabberCts),
773 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_JABBER},
774 {OID_SKGE_STAT_RX_CARRIER,
775 SK_PNMI_MAC_ENTRIES,
776 sizeof(SK_PNMI_STAT),
777 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxCarrierCts),
778 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_CARRIER},
779 {OID_SKGE_STAT_RX_IR_LENGTH,
780 SK_PNMI_MAC_ENTRIES,
781 sizeof(SK_PNMI_STAT),
782 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxIRLengthCts),
783 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_IRLENGTH},
784 {OID_SKGE_STAT_RX_SYMBOL,
785 SK_PNMI_MAC_ENTRIES,
786 sizeof(SK_PNMI_STAT),
787 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxSymbolCts),
788 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_SYMBOL},
789 {OID_SKGE_STAT_RX_SHORTS,
790 SK_PNMI_MAC_ENTRIES,
791 sizeof(SK_PNMI_STAT),
792 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxShortsCts),
793 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_SHORTS},
794 {OID_SKGE_STAT_RX_RUNT,
795 SK_PNMI_MAC_ENTRIES,
796 sizeof(SK_PNMI_STAT),
797 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxRuntCts),
798 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_RUNT},
799 {OID_SKGE_STAT_RX_CEXT,
800 SK_PNMI_MAC_ENTRIES,
801 sizeof(SK_PNMI_STAT),
802 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxCextCts),
803 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_CEXT},
804 {OID_SKGE_STAT_RX_TOO_LONG,
805 SK_PNMI_MAC_ENTRIES,
806 sizeof(SK_PNMI_STAT),
807 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxTooLongCts),
808 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_TOO_LONG},
809 {OID_SKGE_STAT_RX_FCS,
810 SK_PNMI_MAC_ENTRIES,
811 sizeof(SK_PNMI_STAT),
812 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxFcsCts),
813 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_FCS},
814/* {OID_SKGE_STAT_RX_UTIL,
815 SK_PNMI_MAC_ENTRIES,
816 sizeof(SK_PNMI_STAT),
817 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxUtilization),
818 SK_PNMI_RO, MacPrivateStat, (SK_U16)(-1)}, */
819 {OID_SKGE_STAT_RX_64,
820 SK_PNMI_MAC_ENTRIES,
821 sizeof(SK_PNMI_STAT),
822 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRx64Cts),
823 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_64},
824 {OID_SKGE_STAT_RX_127,
825 SK_PNMI_MAC_ENTRIES,
826 sizeof(SK_PNMI_STAT),
827 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRx127Cts),
828 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_127},
829 {OID_SKGE_STAT_RX_255,
830 SK_PNMI_MAC_ENTRIES,
831 sizeof(SK_PNMI_STAT),
832 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRx255Cts),
833 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_255},
834 {OID_SKGE_STAT_RX_511,
835 SK_PNMI_MAC_ENTRIES,
836 sizeof(SK_PNMI_STAT),
837 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRx511Cts),
838 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_511},
839 {OID_SKGE_STAT_RX_1023,
840 SK_PNMI_MAC_ENTRIES,
841 sizeof(SK_PNMI_STAT),
842 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRx1023Cts),
843 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_1023},
844 {OID_SKGE_STAT_RX_MAX,
845 SK_PNMI_MAC_ENTRIES,
846 sizeof(SK_PNMI_STAT),
847 SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxMaxCts),
848 SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_MAX},
849 {OID_SKGE_PHYS_CUR_ADDR,
850 SK_PNMI_MAC_ENTRIES,
851 sizeof(SK_PNMI_CONF),
852 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfMacCurrentAddr),
853 SK_PNMI_RW, Addr, 0},
854 {OID_SKGE_PHYS_FAC_ADDR,
855 SK_PNMI_MAC_ENTRIES,
856 sizeof(SK_PNMI_CONF),
857 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfMacFactoryAddr),
858 SK_PNMI_RO, Addr, 0},
859 {OID_SKGE_PMD,
860 SK_PNMI_MAC_ENTRIES,
861 sizeof(SK_PNMI_CONF),
862 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfPMD),
863 SK_PNMI_RO, MacPrivateConf, 0},
864 {OID_SKGE_CONNECTOR,
865 SK_PNMI_MAC_ENTRIES,
866 sizeof(SK_PNMI_CONF),
867 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfConnector),
868 SK_PNMI_RO, MacPrivateConf, 0},
869 {OID_SKGE_PHY_TYPE,
870 SK_PNMI_MAC_ENTRIES,
871 sizeof(SK_PNMI_CONF),
872 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfPhyType),
873 SK_PNMI_RO, MacPrivateConf, 0},
874 {OID_SKGE_LINK_CAP,
875 SK_PNMI_MAC_ENTRIES,
876 sizeof(SK_PNMI_CONF),
877 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfLinkCapability),
878 SK_PNMI_RO, MacPrivateConf, 0},
879 {OID_SKGE_LINK_MODE,
880 SK_PNMI_MAC_ENTRIES,
881 sizeof(SK_PNMI_CONF),
882 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfLinkMode),
883 SK_PNMI_RW, MacPrivateConf, 0},
884 {OID_SKGE_LINK_MODE_STATUS,
885 SK_PNMI_MAC_ENTRIES,
886 sizeof(SK_PNMI_CONF),
887 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfLinkModeStatus),
888 SK_PNMI_RO, MacPrivateConf, 0},
889 {OID_SKGE_LINK_STATUS,
890 SK_PNMI_MAC_ENTRIES,
891 sizeof(SK_PNMI_CONF),
892 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfLinkStatus),
893 SK_PNMI_RO, MacPrivateConf, 0},
894 {OID_SKGE_FLOWCTRL_CAP,
895 SK_PNMI_MAC_ENTRIES,
896 sizeof(SK_PNMI_CONF),
897 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfFlowCtrlCapability),
898 SK_PNMI_RO, MacPrivateConf, 0},
899 {OID_SKGE_FLOWCTRL_MODE,
900 SK_PNMI_MAC_ENTRIES,
901 sizeof(SK_PNMI_CONF),
902 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfFlowCtrlMode),
903 SK_PNMI_RW, MacPrivateConf, 0},
904 {OID_SKGE_FLOWCTRL_STATUS,
905 SK_PNMI_MAC_ENTRIES,
906 sizeof(SK_PNMI_CONF),
907 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfFlowCtrlStatus),
908 SK_PNMI_RO, MacPrivateConf, 0},
909 {OID_SKGE_PHY_OPERATION_CAP,
910 SK_PNMI_MAC_ENTRIES,
911 sizeof(SK_PNMI_CONF),
912 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfPhyOperationCapability),
913 SK_PNMI_RO, MacPrivateConf, 0},
914 {OID_SKGE_PHY_OPERATION_MODE,
915 SK_PNMI_MAC_ENTRIES,
916 sizeof(SK_PNMI_CONF),
917 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfPhyOperationMode),
918 SK_PNMI_RW, MacPrivateConf, 0},
919 {OID_SKGE_PHY_OPERATION_STATUS,
920 SK_PNMI_MAC_ENTRIES,
921 sizeof(SK_PNMI_CONF),
922 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfPhyOperationStatus),
923 SK_PNMI_RO, MacPrivateConf, 0},
924 {OID_SKGE_SPEED_CAP,
925 SK_PNMI_MAC_ENTRIES,
926 sizeof(SK_PNMI_CONF),
927 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfSpeedCapability),
928 SK_PNMI_RO, MacPrivateConf, 0},
929 {OID_SKGE_SPEED_MODE,
930 SK_PNMI_MAC_ENTRIES,
931 sizeof(SK_PNMI_CONF),
932 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfSpeedMode),
933 SK_PNMI_RW, MacPrivateConf, 0},
934 {OID_SKGE_SPEED_STATUS,
935 SK_PNMI_MAC_ENTRIES,
936 sizeof(SK_PNMI_CONF),
937 SK_PNMI_OFF(Conf) + SK_PNMI_CNF_OFF(ConfSpeedStatus),
938 SK_PNMI_RO, MacPrivateConf, 0},
939 {OID_SKGE_TRAP,
940 1,
941 0,
942 SK_PNMI_MAI_OFF(Trap),
943 SK_PNMI_RO, General, 0},
944 {OID_SKGE_TRAP_NUMBER,
945 1,
946 0,
947 SK_PNMI_MAI_OFF(TrapNumber),
948 SK_PNMI_RO, General, 0},
949 {OID_SKGE_RLMT_MODE,
950 1,
951 0,
952 SK_PNMI_MAI_OFF(RlmtMode),
953 SK_PNMI_RW, Rlmt, 0},
954 {OID_SKGE_RLMT_PORT_NUMBER,
955 1,
956 0,
957 SK_PNMI_MAI_OFF(RlmtPortNumber),
958 SK_PNMI_RO, Rlmt, 0},
959 {OID_SKGE_RLMT_PORT_ACTIVE,
960 1,
961 0,
962 SK_PNMI_MAI_OFF(RlmtPortActive),
963 SK_PNMI_RO, Rlmt, 0},
964 {OID_SKGE_RLMT_PORT_PREFERRED,
965 1,
966 0,
967 SK_PNMI_MAI_OFF(RlmtPortPreferred),
968 SK_PNMI_RW, Rlmt, 0},
969 {OID_SKGE_RLMT_CHANGE_CTS,
970 1,
971 0,
972 SK_PNMI_MAI_OFF(RlmtChangeCts),
973 SK_PNMI_RO, Rlmt, 0},
974 {OID_SKGE_RLMT_CHANGE_TIME,
975 1,
976 0,
977 SK_PNMI_MAI_OFF(RlmtChangeTime),
978 SK_PNMI_RO, Rlmt, 0},
979 {OID_SKGE_RLMT_CHANGE_ESTIM,
980 1,
981 0,
982 SK_PNMI_MAI_OFF(RlmtChangeEstimate),
983 SK_PNMI_RO, Rlmt, 0},
984 {OID_SKGE_RLMT_CHANGE_THRES,
985 1,
986 0,
987 SK_PNMI_MAI_OFF(RlmtChangeThreshold),
988 SK_PNMI_RW, Rlmt, 0},
989 {OID_SKGE_RLMT_PORT_INDEX,
990 SK_PNMI_MAC_ENTRIES,
991 sizeof(SK_PNMI_RLMT),
992 SK_PNMI_OFF(Rlmt) + SK_PNMI_RLM_OFF(RlmtIndex),
993 SK_PNMI_RO, RlmtStat, 0},
994 {OID_SKGE_RLMT_STATUS,
995 SK_PNMI_MAC_ENTRIES,
996 sizeof(SK_PNMI_RLMT),
997 SK_PNMI_OFF(Rlmt) + SK_PNMI_RLM_OFF(RlmtStatus),
998 SK_PNMI_RO, RlmtStat, 0},
999 {OID_SKGE_RLMT_TX_HELLO_CTS,
1000 SK_PNMI_MAC_ENTRIES,
1001 sizeof(SK_PNMI_RLMT),
1002 SK_PNMI_OFF(Rlmt) + SK_PNMI_RLM_OFF(RlmtTxHelloCts),
1003 SK_PNMI_RO, RlmtStat, 0},
1004 {OID_SKGE_RLMT_RX_HELLO_CTS,
1005 SK_PNMI_MAC_ENTRIES,
1006 sizeof(SK_PNMI_RLMT),
1007 SK_PNMI_OFF(Rlmt) + SK_PNMI_RLM_OFF(RlmtRxHelloCts),
1008 SK_PNMI_RO, RlmtStat, 0},
1009 {OID_SKGE_RLMT_TX_SP_REQ_CTS,
1010 SK_PNMI_MAC_ENTRIES,
1011 sizeof(SK_PNMI_RLMT),
1012 SK_PNMI_OFF(Rlmt) + SK_PNMI_RLM_OFF(RlmtTxSpHelloReqCts),
1013 SK_PNMI_RO, RlmtStat, 0},
1014 {OID_SKGE_RLMT_RX_SP_CTS,
1015 SK_PNMI_MAC_ENTRIES,
1016 sizeof(SK_PNMI_RLMT),
1017 SK_PNMI_OFF(Rlmt) + SK_PNMI_RLM_OFF(RlmtRxSpHelloCts),
1018 SK_PNMI_RO, RlmtStat, 0},
1019 {OID_SKGE_RLMT_MONITOR_NUMBER,
1020 1,
1021 0,
1022 SK_PNMI_MAI_OFF(RlmtMonitorNumber),
1023 SK_PNMI_RO, General, 0},
1024 {OID_SKGE_RLMT_MONITOR_INDEX,
1025 SK_PNMI_MONITOR_ENTRIES,
1026 sizeof(SK_PNMI_RLMT_MONITOR),
1027 SK_PNMI_OFF(RlmtMonitor) + SK_PNMI_MON_OFF(RlmtMonitorIndex),
1028 SK_PNMI_RO, Monitor, 0},
1029 {OID_SKGE_RLMT_MONITOR_ADDR,
1030 SK_PNMI_MONITOR_ENTRIES,
1031 sizeof(SK_PNMI_RLMT_MONITOR),
1032 SK_PNMI_OFF(RlmtMonitor) + SK_PNMI_MON_OFF(RlmtMonitorAddr),
1033 SK_PNMI_RO, Monitor, 0},
1034 {OID_SKGE_RLMT_MONITOR_ERRS,
1035 SK_PNMI_MONITOR_ENTRIES,
1036 sizeof(SK_PNMI_RLMT_MONITOR),
1037 SK_PNMI_OFF(RlmtMonitor) + SK_PNMI_MON_OFF(RlmtMonitorErrorCts),
1038 SK_PNMI_RO, Monitor, 0},
1039 {OID_SKGE_RLMT_MONITOR_TIMESTAMP,
1040 SK_PNMI_MONITOR_ENTRIES,
1041 sizeof(SK_PNMI_RLMT_MONITOR),
1042 SK_PNMI_OFF(RlmtMonitor) + SK_PNMI_MON_OFF(RlmtMonitorTimestamp),
1043 SK_PNMI_RO, Monitor, 0},
1044 {OID_SKGE_RLMT_MONITOR_ADMIN,
1045 SK_PNMI_MONITOR_ENTRIES,
1046 sizeof(SK_PNMI_RLMT_MONITOR),
1047 SK_PNMI_OFF(RlmtMonitor) + SK_PNMI_MON_OFF(RlmtMonitorAdmin),
1048 SK_PNMI_RW, Monitor, 0},
1049 {OID_SKGE_MTU,
1050 1,
1051 0,
1052 SK_PNMI_MAI_OFF(MtuSize),
1053 SK_PNMI_RW, MacPrivateConf, 0},
1054 {OID_SKGE_VCT_GET,
1055 0,
1056 0,
1057 0,
1058 SK_PNMI_RO, Vct, 0},
1059 {OID_SKGE_VCT_SET,
1060 0,
1061 0,
1062 0,
1063 SK_PNMI_WO, Vct, 0},
1064 {OID_SKGE_VCT_STATUS,
1065 0,
1066 0,
1067 0,
1068 SK_PNMI_RO, Vct, 0},
1069 {OID_SKGE_BOARDLEVEL,
1070 0,
1071 0,
1072 0,
1073 SK_PNMI_RO, General, 0},
1074};
1075
diff --git a/drivers/net/sk98lin/skgepnmi.c b/drivers/net/sk98lin/skgepnmi.c
new file mode 100644
index 0000000000..b36dd9ac6b
--- /dev/null
+++ b/drivers/net/sk98lin/skgepnmi.c
@@ -0,0 +1,8210 @@
1/*****************************************************************************
2 *
3 * Name: skgepnmi.c
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.111 $
6 * Date: $Date: 2003/09/15 13:35:35 $
7 * Purpose: Private Network Management Interface
8 *
9 ****************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25
26#ifndef _lint
27static const char SysKonnectFileId[] =
28 "@(#) $Id: skgepnmi.c,v 1.111 2003/09/15 13:35:35 tschilli Exp $ (C) Marvell.";
29#endif /* !_lint */
30
31#include "h/skdrv1st.h"
32#include "h/sktypes.h"
33#include "h/xmac_ii.h"
34#include "h/skdebug.h"
35#include "h/skqueue.h"
36#include "h/skgepnmi.h"
37#include "h/skgesirq.h"
38#include "h/skcsum.h"
39#include "h/skvpd.h"
40#include "h/skgehw.h"
41#include "h/skgeinit.h"
42#include "h/skdrv2nd.h"
43#include "h/skgepnm2.h"
44#ifdef SK_POWER_MGMT
45#include "h/skgepmgt.h"
46#endif
47/* defines *******************************************************************/
48
49#ifndef DEBUG
50#define PNMI_STATIC static
51#else /* DEBUG */
52#define PNMI_STATIC
53#endif /* DEBUG */
54
55/*
56 * Public Function prototypes
57 */
58int SkPnmiInit(SK_AC *pAC, SK_IOC IoC, int level);
59int SkPnmiSetVar(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, void *pBuf,
60 unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex);
61int SkPnmiGetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,
62 unsigned int *pLen, SK_U32 NetIndex);
63int SkPnmiPreSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,
64 unsigned int *pLen, SK_U32 NetIndex);
65int SkPnmiSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,
66 unsigned int *pLen, SK_U32 NetIndex);
67int SkPnmiEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event, SK_EVPARA Param);
68int SkPnmiGenIoctl(SK_AC *pAC, SK_IOC IoC, void * pBuf,
69 unsigned int * pLen, SK_U32 NetIndex);
70
71
72/*
73 * Private Function prototypes
74 */
75
76PNMI_STATIC SK_U8 CalculateLinkModeStatus(SK_AC *pAC, SK_IOC IoC, unsigned int
77 PhysPortIndex);
78PNMI_STATIC SK_U8 CalculateLinkStatus(SK_AC *pAC, SK_IOC IoC, unsigned int
79 PhysPortIndex);
80PNMI_STATIC void CopyMac(char *pDst, SK_MAC_ADDR *pMac);
81PNMI_STATIC void CopyTrapQueue(SK_AC *pAC, char *pDstBuf);
82PNMI_STATIC SK_U64 GetPhysStatVal(SK_AC *pAC, SK_IOC IoC,
83 unsigned int PhysPortIndex, unsigned int StatIndex);
84PNMI_STATIC SK_U64 GetStatVal(SK_AC *pAC, SK_IOC IoC, unsigned int LogPortIndex,
85 unsigned int StatIndex, SK_U32 NetIndex);
86PNMI_STATIC char* GetTrapEntry(SK_AC *pAC, SK_U32 TrapId, unsigned int Size);
87PNMI_STATIC void GetTrapQueueLen(SK_AC *pAC, unsigned int *pLen,
88 unsigned int *pEntries);
89PNMI_STATIC int GetVpdKeyArr(SK_AC *pAC, SK_IOC IoC, char *pKeyArr,
90 unsigned int KeyArrLen, unsigned int *pKeyNo);
91PNMI_STATIC int LookupId(SK_U32 Id);
92PNMI_STATIC int MacUpdate(SK_AC *pAC, SK_IOC IoC, unsigned int FirstMac,
93 unsigned int LastMac);
94PNMI_STATIC int PnmiStruct(SK_AC *pAC, SK_IOC IoC, int Action, char *pBuf,
95 unsigned int *pLen, SK_U32 NetIndex);
96PNMI_STATIC int PnmiVar(SK_AC *pAC, SK_IOC IoC, int Action, SK_U32 Id,
97 char *pBuf, unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex);
98PNMI_STATIC void QueueRlmtNewMacTrap(SK_AC *pAC, unsigned int ActiveMac);
99PNMI_STATIC void QueueRlmtPortTrap(SK_AC *pAC, SK_U32 TrapId,
100 unsigned int PortIndex);
101PNMI_STATIC void QueueSensorTrap(SK_AC *pAC, SK_U32 TrapId,
102 unsigned int SensorIndex);
103PNMI_STATIC void QueueSimpleTrap(SK_AC *pAC, SK_U32 TrapId);
104PNMI_STATIC void ResetCounter(SK_AC *pAC, SK_IOC IoC, SK_U32 NetIndex);
105PNMI_STATIC int RlmtUpdate(SK_AC *pAC, SK_IOC IoC, SK_U32 NetIndex);
106PNMI_STATIC int SirqUpdate(SK_AC *pAC, SK_IOC IoC);
107PNMI_STATIC void VirtualConf(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, char *pBuf);
108PNMI_STATIC int Vct(SK_AC *pAC, SK_IOC IoC, int Action, SK_U32 Id, char *pBuf,
109 unsigned int *pLen, SK_U32 Instance, unsigned int TableIndex, SK_U32 NetIndex);
110PNMI_STATIC void CheckVctStatus(SK_AC *, SK_IOC, char *, SK_U32, SK_U32);
111
112/*
113 * Table to correlate OID with handler function and index to
114 * hardware register stored in StatAddress if applicable.
115 */
116#include "skgemib.c"
117
118/* global variables **********************************************************/
119
120/*
121 * Overflow status register bit table and corresponding counter
122 * dependent on MAC type - the number relates to the size of overflow
123 * mask returned by the pFnMacOverflow function
124 */
125PNMI_STATIC const SK_U16 StatOvrflwBit[][SK_PNMI_MAC_TYPES] = {
126/* Bit0 */ { SK_PNMI_HTX, SK_PNMI_HTX_UNICAST},
127/* Bit1 */ { SK_PNMI_HTX_OCTETHIGH, SK_PNMI_HTX_BROADCAST},
128/* Bit2 */ { SK_PNMI_HTX_OCTETLOW, SK_PNMI_HTX_PMACC},
129/* Bit3 */ { SK_PNMI_HTX_BROADCAST, SK_PNMI_HTX_MULTICAST},
130/* Bit4 */ { SK_PNMI_HTX_MULTICAST, SK_PNMI_HTX_OCTETLOW},
131/* Bit5 */ { SK_PNMI_HTX_UNICAST, SK_PNMI_HTX_OCTETHIGH},
132/* Bit6 */ { SK_PNMI_HTX_LONGFRAMES, SK_PNMI_HTX_64},
133/* Bit7 */ { SK_PNMI_HTX_BURST, SK_PNMI_HTX_127},
134/* Bit8 */ { SK_PNMI_HTX_PMACC, SK_PNMI_HTX_255},
135/* Bit9 */ { SK_PNMI_HTX_MACC, SK_PNMI_HTX_511},
136/* Bit10 */ { SK_PNMI_HTX_SINGLE_COL, SK_PNMI_HTX_1023},
137/* Bit11 */ { SK_PNMI_HTX_MULTI_COL, SK_PNMI_HTX_MAX},
138/* Bit12 */ { SK_PNMI_HTX_EXCESS_COL, SK_PNMI_HTX_LONGFRAMES},
139/* Bit13 */ { SK_PNMI_HTX_LATE_COL, SK_PNMI_HTX_RESERVED},
140/* Bit14 */ { SK_PNMI_HTX_DEFFERAL, SK_PNMI_HTX_COL},
141/* Bit15 */ { SK_PNMI_HTX_EXCESS_DEF, SK_PNMI_HTX_LATE_COL},
142/* Bit16 */ { SK_PNMI_HTX_UNDERRUN, SK_PNMI_HTX_EXCESS_COL},
143/* Bit17 */ { SK_PNMI_HTX_CARRIER, SK_PNMI_HTX_MULTI_COL},
144/* Bit18 */ { SK_PNMI_HTX_UTILUNDER, SK_PNMI_HTX_SINGLE_COL},
145/* Bit19 */ { SK_PNMI_HTX_UTILOVER, SK_PNMI_HTX_UNDERRUN},
146/* Bit20 */ { SK_PNMI_HTX_64, SK_PNMI_HTX_RESERVED},
147/* Bit21 */ { SK_PNMI_HTX_127, SK_PNMI_HTX_RESERVED},
148/* Bit22 */ { SK_PNMI_HTX_255, SK_PNMI_HTX_RESERVED},
149/* Bit23 */ { SK_PNMI_HTX_511, SK_PNMI_HTX_RESERVED},
150/* Bit24 */ { SK_PNMI_HTX_1023, SK_PNMI_HTX_RESERVED},
151/* Bit25 */ { SK_PNMI_HTX_MAX, SK_PNMI_HTX_RESERVED},
152/* Bit26 */ { SK_PNMI_HTX_RESERVED, SK_PNMI_HTX_RESERVED},
153/* Bit27 */ { SK_PNMI_HTX_RESERVED, SK_PNMI_HTX_RESERVED},
154/* Bit28 */ { SK_PNMI_HTX_RESERVED, SK_PNMI_HTX_RESERVED},
155/* Bit29 */ { SK_PNMI_HTX_RESERVED, SK_PNMI_HTX_RESERVED},
156/* Bit30 */ { SK_PNMI_HTX_RESERVED, SK_PNMI_HTX_RESERVED},
157/* Bit31 */ { SK_PNMI_HTX_RESERVED, SK_PNMI_HTX_RESERVED},
158/* Bit32 */ { SK_PNMI_HRX, SK_PNMI_HRX_UNICAST},
159/* Bit33 */ { SK_PNMI_HRX_OCTETHIGH, SK_PNMI_HRX_BROADCAST},
160/* Bit34 */ { SK_PNMI_HRX_OCTETLOW, SK_PNMI_HRX_PMACC},
161/* Bit35 */ { SK_PNMI_HRX_BROADCAST, SK_PNMI_HRX_MULTICAST},
162/* Bit36 */ { SK_PNMI_HRX_MULTICAST, SK_PNMI_HRX_FCS},
163/* Bit37 */ { SK_PNMI_HRX_UNICAST, SK_PNMI_HRX_RESERVED},
164/* Bit38 */ { SK_PNMI_HRX_PMACC, SK_PNMI_HRX_OCTETLOW},
165/* Bit39 */ { SK_PNMI_HRX_MACC, SK_PNMI_HRX_OCTETHIGH},
166/* Bit40 */ { SK_PNMI_HRX_PMACC_ERR, SK_PNMI_HRX_BADOCTETLOW},
167/* Bit41 */ { SK_PNMI_HRX_MACC_UNKWN, SK_PNMI_HRX_BADOCTETHIGH},
168/* Bit42 */ { SK_PNMI_HRX_BURST, SK_PNMI_HRX_UNDERSIZE},
169/* Bit43 */ { SK_PNMI_HRX_MISSED, SK_PNMI_HRX_RUNT},
170/* Bit44 */ { SK_PNMI_HRX_FRAMING, SK_PNMI_HRX_64},
171/* Bit45 */ { SK_PNMI_HRX_OVERFLOW, SK_PNMI_HRX_127},
172/* Bit46 */ { SK_PNMI_HRX_JABBER, SK_PNMI_HRX_255},
173/* Bit47 */ { SK_PNMI_HRX_CARRIER, SK_PNMI_HRX_511},
174/* Bit48 */ { SK_PNMI_HRX_IRLENGTH, SK_PNMI_HRX_1023},
175/* Bit49 */ { SK_PNMI_HRX_SYMBOL, SK_PNMI_HRX_MAX},
176/* Bit50 */ { SK_PNMI_HRX_SHORTS, SK_PNMI_HRX_LONGFRAMES},
177/* Bit51 */ { SK_PNMI_HRX_RUNT, SK_PNMI_HRX_TOO_LONG},
178/* Bit52 */ { SK_PNMI_HRX_TOO_LONG, SK_PNMI_HRX_JABBER},
179/* Bit53 */ { SK_PNMI_HRX_FCS, SK_PNMI_HRX_RESERVED},
180/* Bit54 */ { SK_PNMI_HRX_RESERVED, SK_PNMI_HRX_OVERFLOW},
181/* Bit55 */ { SK_PNMI_HRX_CEXT, SK_PNMI_HRX_RESERVED},
182/* Bit56 */ { SK_PNMI_HRX_UTILUNDER, SK_PNMI_HRX_RESERVED},
183/* Bit57 */ { SK_PNMI_HRX_UTILOVER, SK_PNMI_HRX_RESERVED},
184/* Bit58 */ { SK_PNMI_HRX_64, SK_PNMI_HRX_RESERVED},
185/* Bit59 */ { SK_PNMI_HRX_127, SK_PNMI_HRX_RESERVED},
186/* Bit60 */ { SK_PNMI_HRX_255, SK_PNMI_HRX_RESERVED},
187/* Bit61 */ { SK_PNMI_HRX_511, SK_PNMI_HRX_RESERVED},
188/* Bit62 */ { SK_PNMI_HRX_1023, SK_PNMI_HRX_RESERVED},
189/* Bit63 */ { SK_PNMI_HRX_MAX, SK_PNMI_HRX_RESERVED}
190};
191
192/*
193 * Table for hardware register saving on resets and port switches
194 */
195PNMI_STATIC const SK_PNMI_STATADDR StatAddr[SK_PNMI_MAX_IDX][SK_PNMI_MAC_TYPES] = {
196 /* SK_PNMI_HTX */
197 {{XM_TXF_OK, SK_TRUE}, {0, SK_FALSE}},
198 /* SK_PNMI_HTX_OCTETHIGH */
199 {{XM_TXO_OK_HI, SK_TRUE}, {GM_TXO_OK_HI, SK_TRUE}},
200 /* SK_PNMI_HTX_OCTETLOW */
201 {{XM_TXO_OK_LO, SK_FALSE}, {GM_TXO_OK_LO, SK_FALSE}},
202 /* SK_PNMI_HTX_BROADCAST */
203 {{XM_TXF_BC_OK, SK_TRUE}, {GM_TXF_BC_OK, SK_TRUE}},
204 /* SK_PNMI_HTX_MULTICAST */
205 {{XM_TXF_MC_OK, SK_TRUE}, {GM_TXF_MC_OK, SK_TRUE}},
206 /* SK_PNMI_HTX_UNICAST */
207 {{XM_TXF_UC_OK, SK_TRUE}, {GM_TXF_UC_OK, SK_TRUE}},
208 /* SK_PNMI_HTX_BURST */
209 {{XM_TXE_BURST, SK_TRUE}, {0, SK_FALSE}},
210 /* SK_PNMI_HTX_PMACC */
211 {{XM_TXF_MPAUSE, SK_TRUE}, {GM_TXF_MPAUSE, SK_TRUE}},
212 /* SK_PNMI_HTX_MACC */
213 {{XM_TXF_MCTRL, SK_TRUE}, {0, SK_FALSE}},
214 /* SK_PNMI_HTX_COL */
215 {{0, SK_FALSE}, {GM_TXF_COL, SK_TRUE}},
216 /* SK_PNMI_HTX_SINGLE_COL */
217 {{XM_TXF_SNG_COL, SK_TRUE}, {GM_TXF_SNG_COL, SK_TRUE}},
218 /* SK_PNMI_HTX_MULTI_COL */
219 {{XM_TXF_MUL_COL, SK_TRUE}, {GM_TXF_MUL_COL, SK_TRUE}},
220 /* SK_PNMI_HTX_EXCESS_COL */
221 {{XM_TXF_ABO_COL, SK_TRUE}, {GM_TXF_ABO_COL, SK_TRUE}},
222 /* SK_PNMI_HTX_LATE_COL */
223 {{XM_TXF_LAT_COL, SK_TRUE}, {GM_TXF_LAT_COL, SK_TRUE}},
224 /* SK_PNMI_HTX_DEFFERAL */
225 {{XM_TXF_DEF, SK_TRUE}, {0, SK_FALSE}},
226 /* SK_PNMI_HTX_EXCESS_DEF */
227 {{XM_TXF_EX_DEF, SK_TRUE}, {0, SK_FALSE}},
228 /* SK_PNMI_HTX_UNDERRUN */
229 {{XM_TXE_FIFO_UR, SK_TRUE}, {GM_TXE_FIFO_UR, SK_TRUE}},
230 /* SK_PNMI_HTX_CARRIER */
231 {{XM_TXE_CS_ERR, SK_TRUE}, {0, SK_FALSE}},
232 /* SK_PNMI_HTX_UTILUNDER */
233 {{0, SK_FALSE}, {0, SK_FALSE}},
234 /* SK_PNMI_HTX_UTILOVER */
235 {{0, SK_FALSE}, {0, SK_FALSE}},
236 /* SK_PNMI_HTX_64 */
237 {{XM_TXF_64B, SK_TRUE}, {GM_TXF_64B, SK_TRUE}},
238 /* SK_PNMI_HTX_127 */
239 {{XM_TXF_127B, SK_TRUE}, {GM_TXF_127B, SK_TRUE}},
240 /* SK_PNMI_HTX_255 */
241 {{XM_TXF_255B, SK_TRUE}, {GM_TXF_255B, SK_TRUE}},
242 /* SK_PNMI_HTX_511 */
243 {{XM_TXF_511B, SK_TRUE}, {GM_TXF_511B, SK_TRUE}},
244 /* SK_PNMI_HTX_1023 */
245 {{XM_TXF_1023B, SK_TRUE}, {GM_TXF_1023B, SK_TRUE}},
246 /* SK_PNMI_HTX_MAX */
247 {{XM_TXF_MAX_SZ, SK_TRUE}, {GM_TXF_1518B, SK_TRUE}},
248 /* SK_PNMI_HTX_LONGFRAMES */
249 {{XM_TXF_LONG, SK_TRUE}, {GM_TXF_MAX_SZ, SK_TRUE}},
250 /* SK_PNMI_HTX_SYNC */
251 {{0, SK_FALSE}, {0, SK_FALSE}},
252 /* SK_PNMI_HTX_SYNC_OCTET */
253 {{0, SK_FALSE}, {0, SK_FALSE}},
254 /* SK_PNMI_HTX_RESERVED */
255 {{0, SK_FALSE}, {0, SK_FALSE}},
256 /* SK_PNMI_HRX */
257 {{XM_RXF_OK, SK_TRUE}, {0, SK_FALSE}},
258 /* SK_PNMI_HRX_OCTETHIGH */
259 {{XM_RXO_OK_HI, SK_TRUE}, {GM_RXO_OK_HI, SK_TRUE}},
260 /* SK_PNMI_HRX_OCTETLOW */
261 {{XM_RXO_OK_LO, SK_FALSE}, {GM_RXO_OK_LO, SK_FALSE}},
262 /* SK_PNMI_HRX_BADOCTETHIGH */
263 {{0, SK_FALSE}, {GM_RXO_ERR_HI, SK_TRUE}},
264 /* SK_PNMI_HRX_BADOCTETLOW */
265 {{0, SK_FALSE}, {GM_RXO_ERR_LO, SK_TRUE}},
266 /* SK_PNMI_HRX_BROADCAST */
267 {{XM_RXF_BC_OK, SK_TRUE}, {GM_RXF_BC_OK, SK_TRUE}},
268 /* SK_PNMI_HRX_MULTICAST */
269 {{XM_RXF_MC_OK, SK_TRUE}, {GM_RXF_MC_OK, SK_TRUE}},
270 /* SK_PNMI_HRX_UNICAST */
271 {{XM_RXF_UC_OK, SK_TRUE}, {GM_RXF_UC_OK, SK_TRUE}},
272 /* SK_PNMI_HRX_PMACC */
273 {{XM_RXF_MPAUSE, SK_TRUE}, {GM_RXF_MPAUSE, SK_TRUE}},
274 /* SK_PNMI_HRX_MACC */
275 {{XM_RXF_MCTRL, SK_TRUE}, {0, SK_FALSE}},
276 /* SK_PNMI_HRX_PMACC_ERR */
277 {{XM_RXF_INV_MP, SK_TRUE}, {0, SK_FALSE}},
278 /* SK_PNMI_HRX_MACC_UNKWN */
279 {{XM_RXF_INV_MOC, SK_TRUE}, {0, SK_FALSE}},
280 /* SK_PNMI_HRX_BURST */
281 {{XM_RXE_BURST, SK_TRUE}, {0, SK_FALSE}},
282 /* SK_PNMI_HRX_MISSED */
283 {{XM_RXE_FMISS, SK_TRUE}, {0, SK_FALSE}},
284 /* SK_PNMI_HRX_FRAMING */
285 {{XM_RXF_FRA_ERR, SK_TRUE}, {0, SK_FALSE}},
286 /* SK_PNMI_HRX_UNDERSIZE */
287 {{0, SK_FALSE}, {GM_RXF_SHT, SK_TRUE}},
288 /* SK_PNMI_HRX_OVERFLOW */
289 {{XM_RXE_FIFO_OV, SK_TRUE}, {GM_RXE_FIFO_OV, SK_TRUE}},
290 /* SK_PNMI_HRX_JABBER */
291 {{XM_RXF_JAB_PKT, SK_TRUE}, {GM_RXF_JAB_PKT, SK_TRUE}},
292 /* SK_PNMI_HRX_CARRIER */
293 {{XM_RXE_CAR_ERR, SK_TRUE}, {0, SK_FALSE}},
294 /* SK_PNMI_HRX_IRLENGTH */
295 {{XM_RXF_LEN_ERR, SK_TRUE}, {0, SK_FALSE}},
296 /* SK_PNMI_HRX_SYMBOL */
297 {{XM_RXE_SYM_ERR, SK_TRUE}, {0, SK_FALSE}},
298 /* SK_PNMI_HRX_SHORTS */
299 {{XM_RXE_SHT_ERR, SK_TRUE}, {0, SK_FALSE}},
300 /* SK_PNMI_HRX_RUNT */
301 {{XM_RXE_RUNT, SK_TRUE}, {GM_RXE_FRAG, SK_TRUE}},
302 /* SK_PNMI_HRX_TOO_LONG */
303 {{XM_RXF_LNG_ERR, SK_TRUE}, {GM_RXF_LNG_ERR, SK_TRUE}},
304 /* SK_PNMI_HRX_FCS */
305 {{XM_RXF_FCS_ERR, SK_TRUE}, {GM_RXF_FCS_ERR, SK_TRUE}},
306 /* SK_PNMI_HRX_CEXT */
307 {{XM_RXF_CEX_ERR, SK_TRUE}, {0, SK_FALSE}},
308 /* SK_PNMI_HRX_UTILUNDER */
309 {{0, SK_FALSE}, {0, SK_FALSE}},
310 /* SK_PNMI_HRX_UTILOVER */
311 {{0, SK_FALSE}, {0, SK_FALSE}},
312 /* SK_PNMI_HRX_64 */
313 {{XM_RXF_64B, SK_TRUE}, {GM_RXF_64B, SK_TRUE}},
314 /* SK_PNMI_HRX_127 */
315 {{XM_RXF_127B, SK_TRUE}, {GM_RXF_127B, SK_TRUE}},
316 /* SK_PNMI_HRX_255 */
317 {{XM_RXF_255B, SK_TRUE}, {GM_RXF_255B, SK_TRUE}},
318 /* SK_PNMI_HRX_511 */
319 {{XM_RXF_511B, SK_TRUE}, {GM_RXF_511B, SK_TRUE}},
320 /* SK_PNMI_HRX_1023 */
321 {{XM_RXF_1023B, SK_TRUE}, {GM_RXF_1023B, SK_TRUE}},
322 /* SK_PNMI_HRX_MAX */
323 {{XM_RXF_MAX_SZ, SK_TRUE}, {GM_RXF_1518B, SK_TRUE}},
324 /* SK_PNMI_HRX_LONGFRAMES */
325 {{0, SK_FALSE}, {GM_RXF_MAX_SZ, SK_TRUE}},
326 /* SK_PNMI_HRX_RESERVED */
327 {{0, SK_FALSE}, {0, SK_FALSE}}
328};
329
330
331/*****************************************************************************
332 *
333 * Public functions
334 *
335 */
336
337/*****************************************************************************
338 *
339 * SkPnmiInit - Init function of PNMI
340 *
341 * Description:
342 * SK_INIT_DATA: Initialises the data structures
343 * SK_INIT_IO: Resets the XMAC statistics, determines the device and
344 * connector type.
345 * SK_INIT_RUN: Starts a timer event for port switch per hour
346 * calculation.
347 *
348 * Returns:
349 * Always 0
350 */
351int SkPnmiInit(
352SK_AC *pAC, /* Pointer to adapter context */
353SK_IOC IoC, /* IO context handle */
354int Level) /* Initialization level */
355{
356 unsigned int PortMax; /* Number of ports */
357 unsigned int PortIndex; /* Current port index in loop */
358 SK_U16 Val16; /* Multiple purpose 16 bit variable */
359 SK_U8 Val8; /* Mulitple purpose 8 bit variable */
360 SK_EVPARA EventParam; /* Event struct for timer event */
361 SK_PNMI_VCT *pVctBackupData;
362
363
364 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
365 ("PNMI: SkPnmiInit: Called, level=%d\n", Level));
366
367 switch (Level) {
368
369 case SK_INIT_DATA:
370 SK_MEMSET((char *)&pAC->Pnmi, 0, sizeof(pAC->Pnmi));
371 pAC->Pnmi.TrapBufFree = SK_PNMI_TRAP_QUEUE_LEN;
372 pAC->Pnmi.StartUpTime = SK_PNMI_HUNDREDS_SEC(SkOsGetTime(pAC));
373 pAC->Pnmi.RlmtChangeThreshold = SK_PNMI_DEF_RLMT_CHG_THRES;
374 for (PortIndex = 0; PortIndex < SK_MAX_MACS; PortIndex ++) {
375
376 pAC->Pnmi.Port[PortIndex].ActiveFlag = SK_FALSE;
377 pAC->Pnmi.DualNetActiveFlag = SK_FALSE;
378 }
379
380#ifdef SK_PNMI_CHECK
381 if (SK_PNMI_MAX_IDX != SK_PNMI_CNT_NO) {
382
383 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR049, SK_PNMI_ERR049MSG);
384
385 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_INIT | SK_DBGCAT_FATAL,
386 ("CounterOffset struct size (%d) differs from"
387 "SK_PNMI_MAX_IDX (%d)\n",
388 SK_PNMI_CNT_NO, SK_PNMI_MAX_IDX));
389 }
390
391 if (SK_PNMI_MAX_IDX !=
392 (sizeof(StatAddr) / (sizeof(SK_PNMI_STATADDR) * SK_PNMI_MAC_TYPES))) {
393
394 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR050, SK_PNMI_ERR050MSG);
395
396 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_INIT | SK_DBGCAT_FATAL,
397 ("StatAddr table size (%d) differs from "
398 "SK_PNMI_MAX_IDX (%d)\n",
399 (sizeof(StatAddr) /
400 (sizeof(SK_PNMI_STATADDR) * SK_PNMI_MAC_TYPES)),
401 SK_PNMI_MAX_IDX));
402 }
403#endif /* SK_PNMI_CHECK */
404 break;
405
406 case SK_INIT_IO:
407 /*
408 * Reset MAC counters
409 */
410 PortMax = pAC->GIni.GIMacsFound;
411
412 for (PortIndex = 0; PortIndex < PortMax; PortIndex ++) {
413
414 pAC->GIni.GIFunc.pFnMacResetCounter(pAC, IoC, PortIndex);
415 }
416
417 /* Initialize DSP variables for Vct() to 0xff => Never written! */
418 for (PortIndex = 0; PortIndex < PortMax; PortIndex ++) {
419 pAC->GIni.GP[PortIndex].PCableLen = 0xff;
420 pVctBackupData = &pAC->Pnmi.VctBackup[PortIndex];
421 pVctBackupData->PCableLen = 0xff;
422 }
423
424 /*
425 * Get pci bus speed
426 */
427 SK_IN16(IoC, B0_CTST, &Val16);
428 if ((Val16 & CS_BUS_CLOCK) == 0) {
429
430 pAC->Pnmi.PciBusSpeed = 33;
431 }
432 else {
433 pAC->Pnmi.PciBusSpeed = 66;
434 }
435
436 /*
437 * Get pci bus width
438 */
439 SK_IN16(IoC, B0_CTST, &Val16);
440 if ((Val16 & CS_BUS_SLOT_SZ) == 0) {
441
442 pAC->Pnmi.PciBusWidth = 32;
443 }
444 else {
445 pAC->Pnmi.PciBusWidth = 64;
446 }
447
448 /*
449 * Get chipset
450 */
451 switch (pAC->GIni.GIChipId) {
452 case CHIP_ID_GENESIS:
453 pAC->Pnmi.Chipset = SK_PNMI_CHIPSET_XMAC;
454 break;
455
456 case CHIP_ID_YUKON:
457 pAC->Pnmi.Chipset = SK_PNMI_CHIPSET_YUKON;
458 break;
459
460 default:
461 break;
462 }
463
464 /*
465 * Get PMD and DeviceType
466 */
467 SK_IN8(IoC, B2_PMD_TYP, &Val8);
468 switch (Val8) {
469 case 'S':
470 pAC->Pnmi.PMD = 3;
471 if (pAC->GIni.GIMacsFound > 1) {
472
473 pAC->Pnmi.DeviceType = 0x00020002;
474 }
475 else {
476 pAC->Pnmi.DeviceType = 0x00020001;
477 }
478 break;
479
480 case 'L':
481 pAC->Pnmi.PMD = 2;
482 if (pAC->GIni.GIMacsFound > 1) {
483
484 pAC->Pnmi.DeviceType = 0x00020004;
485 }
486 else {
487 pAC->Pnmi.DeviceType = 0x00020003;
488 }
489 break;
490
491 case 'C':
492 pAC->Pnmi.PMD = 4;
493 if (pAC->GIni.GIMacsFound > 1) {
494
495 pAC->Pnmi.DeviceType = 0x00020006;
496 }
497 else {
498 pAC->Pnmi.DeviceType = 0x00020005;
499 }
500 break;
501
502 case 'T':
503 pAC->Pnmi.PMD = 5;
504 if (pAC->GIni.GIMacsFound > 1) {
505
506 pAC->Pnmi.DeviceType = 0x00020008;
507 }
508 else {
509 pAC->Pnmi.DeviceType = 0x00020007;
510 }
511 break;
512
513 default :
514 pAC->Pnmi.PMD = 1;
515 pAC->Pnmi.DeviceType = 0;
516 break;
517 }
518
519 /*
520 * Get connector
521 */
522 SK_IN8(IoC, B2_CONN_TYP, &Val8);
523 switch (Val8) {
524 case 'C':
525 pAC->Pnmi.Connector = 2;
526 break;
527
528 case 'D':
529 pAC->Pnmi.Connector = 3;
530 break;
531
532 case 'F':
533 pAC->Pnmi.Connector = 4;
534 break;
535
536 case 'J':
537 pAC->Pnmi.Connector = 5;
538 break;
539
540 case 'V':
541 pAC->Pnmi.Connector = 6;
542 break;
543
544 default:
545 pAC->Pnmi.Connector = 1;
546 break;
547 }
548 break;
549
550 case SK_INIT_RUN:
551 /*
552 * Start timer for RLMT change counter
553 */
554 SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam));
555 SkTimerStart(pAC, IoC, &pAC->Pnmi.RlmtChangeEstimate.EstTimer,
556 28125000, SKGE_PNMI, SK_PNMI_EVT_CHG_EST_TIMER,
557 EventParam);
558 break;
559
560 default:
561 break; /* Nothing todo */
562 }
563
564 return (0);
565}
566
567/*****************************************************************************
568 *
569 * SkPnmiGetVar - Retrieves the value of a single OID
570 *
571 * Description:
572 * Calls a general sub-function for all this stuff. If the instance
573 * -1 is passed, the values of all instances are returned in an
574 * array of values.
575 *
576 * Returns:
577 * SK_PNMI_ERR_OK The request was successfully performed
578 * SK_PNMI_ERR_GENERAL A general severe internal error occured
579 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to take
580 * the data.
581 * SK_PNMI_ERR_UNKNOWN_OID The requested OID is unknown
582 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
583 * exist (e.g. port instance 3 on a two port
584 * adapter.
585 */
586static int SkPnmiGetVar(
587SK_AC *pAC, /* Pointer to adapter context */
588SK_IOC IoC, /* IO context handle */
589SK_U32 Id, /* Object ID that is to be processed */
590void *pBuf, /* Buffer to which the management data will be copied */
591unsigned int *pLen, /* On call: buffer length. On return: used buffer */
592SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
593SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
594{
595 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
596 ("PNMI: SkPnmiGetVar: Called, Id=0x%x, BufLen=%d, Instance=%d, NetIndex=%d\n",
597 Id, *pLen, Instance, NetIndex));
598
599 return (PnmiVar(pAC, IoC, SK_PNMI_GET, Id, (char *)pBuf, pLen,
600 Instance, NetIndex));
601}
602
603/*****************************************************************************
604 *
605 * SkPnmiPreSetVar - Presets the value of a single OID
606 *
607 * Description:
608 * Calls a general sub-function for all this stuff. The preset does
609 * the same as a set, but returns just before finally setting the
610 * new value. This is useful to check if a set might be successfull.
611 * If the instance -1 is passed, an array of values is supposed and
612 * all instances of the OID will be set.
613 *
614 * Returns:
615 * SK_PNMI_ERR_OK The request was successfully performed.
616 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
617 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
618 * the correct data (e.g. a 32bit value is
619 * needed, but a 16 bit value was passed).
620 * SK_PNMI_ERR_BAD_VALUE The passed value is not in the valid
621 * value range.
622 * SK_PNMI_ERR_READ_ONLY The OID is read-only and cannot be set.
623 * SK_PNMI_ERR_UNKNOWN_OID The requested OID is unknown.
624 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
625 * exist (e.g. port instance 3 on a two port
626 * adapter.
627 */
628static int SkPnmiPreSetVar(
629SK_AC *pAC, /* Pointer to adapter context */
630SK_IOC IoC, /* IO context handle */
631SK_U32 Id, /* Object ID that is to be processed */
632void *pBuf, /* Buffer to which the management data will be copied */
633unsigned int *pLen, /* Total length of management data */
634SK_U32 Instance, /* Instance (1..n) that is to be set or -1 */
635SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
636{
637 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
638 ("PNMI: SkPnmiPreSetVar: Called, Id=0x%x, BufLen=%d, Instance=%d, NetIndex=%d\n",
639 Id, *pLen, Instance, NetIndex));
640
641
642 return (PnmiVar(pAC, IoC, SK_PNMI_PRESET, Id, (char *)pBuf, pLen,
643 Instance, NetIndex));
644}
645
646/*****************************************************************************
647 *
648 * SkPnmiSetVar - Sets the value of a single OID
649 *
650 * Description:
651 * Calls a general sub-function for all this stuff. The preset does
652 * the same as a set, but returns just before finally setting the
653 * new value. This is useful to check if a set might be successfull.
654 * If the instance -1 is passed, an array of values is supposed and
655 * all instances of the OID will be set.
656 *
657 * Returns:
658 * SK_PNMI_ERR_OK The request was successfully performed.
659 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
660 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
661 * the correct data (e.g. a 32bit value is
662 * needed, but a 16 bit value was passed).
663 * SK_PNMI_ERR_BAD_VALUE The passed value is not in the valid
664 * value range.
665 * SK_PNMI_ERR_READ_ONLY The OID is read-only and cannot be set.
666 * SK_PNMI_ERR_UNKNOWN_OID The requested OID is unknown.
667 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
668 * exist (e.g. port instance 3 on a two port
669 * adapter.
670 */
671int SkPnmiSetVar(
672SK_AC *pAC, /* Pointer to adapter context */
673SK_IOC IoC, /* IO context handle */
674SK_U32 Id, /* Object ID that is to be processed */
675void *pBuf, /* Buffer to which the management data will be copied */
676unsigned int *pLen, /* Total length of management data */
677SK_U32 Instance, /* Instance (1..n) that is to be set or -1 */
678SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
679{
680 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
681 ("PNMI: SkPnmiSetVar: Called, Id=0x%x, BufLen=%d, Instance=%d, NetIndex=%d\n",
682 Id, *pLen, Instance, NetIndex));
683
684 return (PnmiVar(pAC, IoC, SK_PNMI_SET, Id, (char *)pBuf, pLen,
685 Instance, NetIndex));
686}
687
688/*****************************************************************************
689 *
690 * SkPnmiGetStruct - Retrieves the management database in SK_PNMI_STRUCT_DATA
691 *
692 * Description:
693 * Runs through the IdTable, queries the single OIDs and stores the
694 * returned data into the management database structure
695 * SK_PNMI_STRUCT_DATA. The offset of the OID in the structure
696 * is stored in the IdTable. The return value of the function will also
697 * be stored in SK_PNMI_STRUCT_DATA if the passed buffer has the
698 * minimum size of SK_PNMI_MIN_STRUCT_SIZE.
699 *
700 * Returns:
701 * SK_PNMI_ERR_OK The request was successfully performed
702 * SK_PNMI_ERR_GENERAL A general severe internal error occured
703 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to take
704 * the data.
705 * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist
706 */
707int SkPnmiGetStruct(
708SK_AC *pAC, /* Pointer to adapter context */
709SK_IOC IoC, /* IO context handle */
710void *pBuf, /* Buffer to which the management data will be copied. */
711unsigned int *pLen, /* Length of buffer */
712SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
713{
714 int Ret;
715 unsigned int TableIndex;
716 unsigned int DstOffset;
717 unsigned int InstanceNo;
718 unsigned int InstanceCnt;
719 SK_U32 Instance;
720 unsigned int TmpLen;
721 char KeyArr[SK_PNMI_VPD_ENTRIES][SK_PNMI_VPD_KEY_SIZE];
722
723
724 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
725 ("PNMI: SkPnmiGetStruct: Called, BufLen=%d, NetIndex=%d\n",
726 *pLen, NetIndex));
727
728 if (*pLen < SK_PNMI_STRUCT_SIZE) {
729
730 if (*pLen >= SK_PNMI_MIN_STRUCT_SIZE) {
731
732 SK_PNMI_SET_STAT(pBuf, SK_PNMI_ERR_TOO_SHORT,
733 (SK_U32)(-1));
734 }
735
736 *pLen = SK_PNMI_STRUCT_SIZE;
737 return (SK_PNMI_ERR_TOO_SHORT);
738 }
739
740 /*
741 * Check NetIndex
742 */
743 if (NetIndex >= pAC->Rlmt.NumNets) {
744 return (SK_PNMI_ERR_UNKNOWN_NET);
745 }
746
747 /* Update statistic */
748 SK_PNMI_CHECKFLAGS("SkPnmiGetStruct: On call");
749
750 if ((Ret = MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1)) !=
751 SK_PNMI_ERR_OK) {
752
753 SK_PNMI_SET_STAT(pBuf, Ret, (SK_U32)(-1));
754 *pLen = SK_PNMI_MIN_STRUCT_SIZE;
755 return (Ret);
756 }
757
758 if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) {
759
760 SK_PNMI_SET_STAT(pBuf, Ret, (SK_U32)(-1));
761 *pLen = SK_PNMI_MIN_STRUCT_SIZE;
762 return (Ret);
763 }
764
765 if ((Ret = SirqUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) {
766
767 SK_PNMI_SET_STAT(pBuf, Ret, (SK_U32)(-1));
768 *pLen = SK_PNMI_MIN_STRUCT_SIZE;
769 return (Ret);
770 }
771
772 /*
773 * Increment semaphores to indicate that an update was
774 * already done
775 */
776 pAC->Pnmi.MacUpdatedFlag ++;
777 pAC->Pnmi.RlmtUpdatedFlag ++;
778 pAC->Pnmi.SirqUpdatedFlag ++;
779
780 /* Get vpd keys for instance calculation */
781 Ret = GetVpdKeyArr(pAC, IoC, &KeyArr[0][0], sizeof(KeyArr), &TmpLen);
782 if (Ret != SK_PNMI_ERR_OK) {
783
784 pAC->Pnmi.MacUpdatedFlag --;
785 pAC->Pnmi.RlmtUpdatedFlag --;
786 pAC->Pnmi.SirqUpdatedFlag --;
787
788 SK_PNMI_CHECKFLAGS("SkPnmiGetStruct: On return");
789 SK_PNMI_SET_STAT(pBuf, Ret, (SK_U32)(-1));
790 *pLen = SK_PNMI_MIN_STRUCT_SIZE;
791 return (SK_PNMI_ERR_GENERAL);
792 }
793
794 /* Retrieve values */
795 SK_MEMSET((char *)pBuf, 0, SK_PNMI_STRUCT_SIZE);
796 for (TableIndex = 0; TableIndex < ID_TABLE_SIZE; TableIndex ++) {
797
798 InstanceNo = IdTable[TableIndex].InstanceNo;
799 for (InstanceCnt = 1; InstanceCnt <= InstanceNo;
800 InstanceCnt ++) {
801
802 DstOffset = IdTable[TableIndex].Offset +
803 (InstanceCnt - 1) *
804 IdTable[TableIndex].StructSize;
805
806 /*
807 * For the VPD the instance is not an index number
808 * but the key itself. Determin with the instance
809 * counter the VPD key to be used.
810 */
811 if (IdTable[TableIndex].Id == OID_SKGE_VPD_KEY ||
812 IdTable[TableIndex].Id == OID_SKGE_VPD_VALUE ||
813 IdTable[TableIndex].Id == OID_SKGE_VPD_ACCESS ||
814 IdTable[TableIndex].Id == OID_SKGE_VPD_ACTION) {
815
816 SK_STRNCPY((char *)&Instance, KeyArr[InstanceCnt - 1], 4);
817 }
818 else {
819 Instance = (SK_U32)InstanceCnt;
820 }
821
822 TmpLen = *pLen - DstOffset;
823 Ret = IdTable[TableIndex].Func(pAC, IoC, SK_PNMI_GET,
824 IdTable[TableIndex].Id, (char *)pBuf +
825 DstOffset, &TmpLen, Instance, TableIndex, NetIndex);
826
827 /*
828 * An unknown instance error means that we reached
829 * the last instance of that variable. Proceed with
830 * the next OID in the table and ignore the return
831 * code.
832 */
833 if (Ret == SK_PNMI_ERR_UNKNOWN_INST) {
834
835 break;
836 }
837
838 if (Ret != SK_PNMI_ERR_OK) {
839
840 pAC->Pnmi.MacUpdatedFlag --;
841 pAC->Pnmi.RlmtUpdatedFlag --;
842 pAC->Pnmi.SirqUpdatedFlag --;
843
844 SK_PNMI_CHECKFLAGS("SkPnmiGetStruct: On return");
845 SK_PNMI_SET_STAT(pBuf, Ret, DstOffset);
846 *pLen = SK_PNMI_MIN_STRUCT_SIZE;
847 return (Ret);
848 }
849 }
850 }
851
852 pAC->Pnmi.MacUpdatedFlag --;
853 pAC->Pnmi.RlmtUpdatedFlag --;
854 pAC->Pnmi.SirqUpdatedFlag --;
855
856 *pLen = SK_PNMI_STRUCT_SIZE;
857 SK_PNMI_CHECKFLAGS("SkPnmiGetStruct: On return");
858 SK_PNMI_SET_STAT(pBuf, SK_PNMI_ERR_OK, (SK_U32)(-1));
859 return (SK_PNMI_ERR_OK);
860}
861
862/*****************************************************************************
863 *
864 * SkPnmiPreSetStruct - Presets the management database in SK_PNMI_STRUCT_DATA
865 *
866 * Description:
867 * Calls a general sub-function for all this set stuff. The preset does
868 * the same as a set, but returns just before finally setting the
869 * new value. This is useful to check if a set might be successfull.
870 * The sub-function runs through the IdTable, checks which OIDs are able
871 * to set, and calls the handler function of the OID to perform the
872 * preset. The return value of the function will also be stored in
873 * SK_PNMI_STRUCT_DATA if the passed buffer has the minimum size of
874 * SK_PNMI_MIN_STRUCT_SIZE.
875 *
876 * Returns:
877 * SK_PNMI_ERR_OK The request was successfully performed.
878 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
879 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
880 * the correct data (e.g. a 32bit value is
881 * needed, but a 16 bit value was passed).
882 * SK_PNMI_ERR_BAD_VALUE The passed value is not in the valid
883 * value range.
884 */
885int SkPnmiPreSetStruct(
886SK_AC *pAC, /* Pointer to adapter context */
887SK_IOC IoC, /* IO context handle */
888void *pBuf, /* Buffer which contains the data to be set */
889unsigned int *pLen, /* Length of buffer */
890SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
891{
892 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
893 ("PNMI: SkPnmiPreSetStruct: Called, BufLen=%d, NetIndex=%d\n",
894 *pLen, NetIndex));
895
896 return (PnmiStruct(pAC, IoC, SK_PNMI_PRESET, (char *)pBuf,
897 pLen, NetIndex));
898}
899
900/*****************************************************************************
901 *
902 * SkPnmiSetStruct - Sets the management database in SK_PNMI_STRUCT_DATA
903 *
904 * Description:
905 * Calls a general sub-function for all this set stuff. The return value
906 * of the function will also be stored in SK_PNMI_STRUCT_DATA if the
907 * passed buffer has the minimum size of SK_PNMI_MIN_STRUCT_SIZE.
908 * The sub-function runs through the IdTable, checks which OIDs are able
909 * to set, and calls the handler function of the OID to perform the
910 * set. The return value of the function will also be stored in
911 * SK_PNMI_STRUCT_DATA if the passed buffer has the minimum size of
912 * SK_PNMI_MIN_STRUCT_SIZE.
913 *
914 * Returns:
915 * SK_PNMI_ERR_OK The request was successfully performed.
916 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
917 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
918 * the correct data (e.g. a 32bit value is
919 * needed, but a 16 bit value was passed).
920 * SK_PNMI_ERR_BAD_VALUE The passed value is not in the valid
921 * value range.
922 */
923int SkPnmiSetStruct(
924SK_AC *pAC, /* Pointer to adapter context */
925SK_IOC IoC, /* IO context handle */
926void *pBuf, /* Buffer which contains the data to be set */
927unsigned int *pLen, /* Length of buffer */
928SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
929{
930 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
931 ("PNMI: SkPnmiSetStruct: Called, BufLen=%d, NetIndex=%d\n",
932 *pLen, NetIndex));
933
934 return (PnmiStruct(pAC, IoC, SK_PNMI_SET, (char *)pBuf,
935 pLen, NetIndex));
936}
937
938/*****************************************************************************
939 *
940 * SkPnmiEvent - Event handler
941 *
942 * Description:
943 * Handles the following events:
944 * SK_PNMI_EVT_SIRQ_OVERFLOW When a hardware counter overflows an
945 * interrupt will be generated which is
946 * first handled by SIRQ which generates a
947 * this event. The event increments the
948 * upper 32 bit of the 64 bit counter.
949 * SK_PNMI_EVT_SEN_XXX The event is generated by the I2C module
950 * when a sensor reports a warning or
951 * error. The event will store a trap
952 * message in the trap buffer.
953 * SK_PNMI_EVT_CHG_EST_TIMER The timer event was initiated by this
954 * module and is used to calculate the
955 * port switches per hour.
956 * SK_PNMI_EVT_CLEAR_COUNTER The event clears all counters and
957 * timestamps.
958 * SK_PNMI_EVT_XMAC_RESET The event is generated by the driver
959 * before a hard reset of the XMAC is
960 * performed. All counters will be saved
961 * and added to the hardware counter
962 * values after reset to grant continuous
963 * counter values.
964 * SK_PNMI_EVT_RLMT_PORT_UP Generated by RLMT to notify that a port
965 * went logically up. A trap message will
966 * be stored to the trap buffer.
967 * SK_PNMI_EVT_RLMT_PORT_DOWN Generated by RLMT to notify that a port
968 * went logically down. A trap message will
969 * be stored to the trap buffer.
970 * SK_PNMI_EVT_RLMT_SEGMENTATION Generated by RLMT to notify that two
971 * spanning tree root bridges were
972 * detected. A trap message will be stored
973 * to the trap buffer.
974 * SK_PNMI_EVT_RLMT_ACTIVE_DOWN Notifies PNMI that an active port went
975 * down. PNMI will not further add the
976 * statistic values to the virtual port.
977 * SK_PNMI_EVT_RLMT_ACTIVE_UP Notifies PNMI that a port went up and
978 * is now an active port. PNMI will now
979 * add the statistic data of this port to
980 * the virtual port.
981 * SK_PNMI_EVT_RLMT_SET_NETS Notifies PNMI about the net mode. The first parameter
982 * contains the number of nets. 1 means single net, 2 means
983 * dual net. The second parameter is -1
984 *
985 * Returns:
986 * Always 0
987 */
988int SkPnmiEvent(
989SK_AC *pAC, /* Pointer to adapter context */
990SK_IOC IoC, /* IO context handle */
991SK_U32 Event, /* Event-Id */
992SK_EVPARA Param) /* Event dependent parameter */
993{
994 unsigned int PhysPortIndex;
995 unsigned int MaxNetNumber;
996 int CounterIndex;
997 int Ret;
998 SK_U16 MacStatus;
999 SK_U64 OverflowStatus;
1000 SK_U64 Mask;
1001 int MacType;
1002 SK_U64 Value;
1003 SK_U32 Val32;
1004 SK_U16 Register;
1005 SK_EVPARA EventParam;
1006 SK_U64 NewestValue;
1007 SK_U64 OldestValue;
1008 SK_U64 Delta;
1009 SK_PNMI_ESTIMATE *pEst;
1010 SK_U32 NetIndex;
1011 SK_GEPORT *pPrt;
1012 SK_PNMI_VCT *pVctBackupData;
1013 SK_U32 RetCode;
1014 int i;
1015 SK_U32 CableLength;
1016
1017
1018#ifdef DEBUG
1019 if (Event != SK_PNMI_EVT_XMAC_RESET) {
1020
1021 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1022 ("PNMI: SkPnmiEvent: Called, Event=0x%x, Param=0x%x\n",
1023 (unsigned int)Event, (unsigned int)Param.Para64));
1024 }
1025#endif /* DEBUG */
1026 SK_PNMI_CHECKFLAGS("SkPnmiEvent: On call");
1027
1028 MacType = pAC->GIni.GIMacType;
1029
1030 switch (Event) {
1031
1032 case SK_PNMI_EVT_SIRQ_OVERFLOW:
1033 PhysPortIndex = (int)Param.Para32[0];
1034 MacStatus = (SK_U16)Param.Para32[1];
1035#ifdef DEBUG
1036 if (PhysPortIndex >= SK_MAX_MACS) {
1037
1038 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1039 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_SIRQ_OVERFLOW parameter"
1040 " wrong, PhysPortIndex=0x%x\n",
1041 PhysPortIndex));
1042 return (0);
1043 }
1044#endif /* DEBUG */
1045 OverflowStatus = 0;
1046
1047 /*
1048 * Check which source caused an overflow interrupt.
1049 */
1050 if ((pAC->GIni.GIFunc.pFnMacOverflow(pAC, IoC, PhysPortIndex,
1051 MacStatus, &OverflowStatus) != 0) ||
1052 (OverflowStatus == 0)) {
1053
1054 SK_PNMI_CHECKFLAGS("SkPnmiEvent: On return");
1055 return (0);
1056 }
1057
1058 /*
1059 * Check the overflow status register and increment
1060 * the upper dword of corresponding counter.
1061 */
1062 for (CounterIndex = 0; CounterIndex < sizeof(Mask) * 8;
1063 CounterIndex ++) {
1064
1065 Mask = (SK_U64)1 << CounterIndex;
1066 if ((OverflowStatus & Mask) == 0) {
1067
1068 continue;
1069 }
1070
1071 switch (StatOvrflwBit[CounterIndex][MacType]) {
1072
1073 case SK_PNMI_HTX_UTILUNDER:
1074 case SK_PNMI_HTX_UTILOVER:
1075 if (MacType == SK_MAC_XMAC) {
1076 XM_IN16(IoC, PhysPortIndex, XM_TX_CMD, &Register);
1077 Register |= XM_TX_SAM_LINE;
1078 XM_OUT16(IoC, PhysPortIndex, XM_TX_CMD, Register);
1079 }
1080 break;
1081
1082 case SK_PNMI_HRX_UTILUNDER:
1083 case SK_PNMI_HRX_UTILOVER:
1084 if (MacType == SK_MAC_XMAC) {
1085 XM_IN16(IoC, PhysPortIndex, XM_RX_CMD, &Register);
1086 Register |= XM_RX_SAM_LINE;
1087 XM_OUT16(IoC, PhysPortIndex, XM_RX_CMD, Register);
1088 }
1089 break;
1090
1091 case SK_PNMI_HTX_OCTETHIGH:
1092 case SK_PNMI_HTX_OCTETLOW:
1093 case SK_PNMI_HTX_RESERVED:
1094 case SK_PNMI_HRX_OCTETHIGH:
1095 case SK_PNMI_HRX_OCTETLOW:
1096 case SK_PNMI_HRX_IRLENGTH:
1097 case SK_PNMI_HRX_RESERVED:
1098
1099 /*
1100 * the following counters aren't be handled (id > 63)
1101 */
1102 case SK_PNMI_HTX_SYNC:
1103 case SK_PNMI_HTX_SYNC_OCTET:
1104 break;
1105
1106 case SK_PNMI_HRX_LONGFRAMES:
1107 if (MacType == SK_MAC_GMAC) {
1108 pAC->Pnmi.Port[PhysPortIndex].
1109 CounterHigh[CounterIndex] ++;
1110 }
1111 break;
1112
1113 default:
1114 pAC->Pnmi.Port[PhysPortIndex].
1115 CounterHigh[CounterIndex] ++;
1116 }
1117 }
1118 break;
1119
1120 case SK_PNMI_EVT_SEN_WAR_LOW:
1121#ifdef DEBUG
1122 if ((unsigned int)Param.Para64 >= (unsigned int)pAC->I2c.MaxSens) {
1123
1124 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1125 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_SEN_WAR_LOW parameter wrong, SensorIndex=%d\n",
1126 (unsigned int)Param.Para64));
1127 return (0);
1128 }
1129#endif /* DEBUG */
1130
1131 /*
1132 * Store a trap message in the trap buffer and generate
1133 * an event for user space applications with the
1134 * SK_DRIVER_SENDEVENT macro.
1135 */
1136 QueueSensorTrap(pAC, OID_SKGE_TRAP_SEN_WAR_LOW,
1137 (unsigned int)Param.Para64);
1138 (void)SK_DRIVER_SENDEVENT(pAC, IoC);
1139 break;
1140
1141 case SK_PNMI_EVT_SEN_WAR_UPP:
1142#ifdef DEBUG
1143 if ((unsigned int)Param.Para64 >= (unsigned int)pAC->I2c.MaxSens) {
1144
1145 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1146 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_SEN_WAR_UPP parameter wrong, SensorIndex=%d\n",
1147 (unsigned int)Param.Para64));
1148 return (0);
1149 }
1150#endif /* DEBUG */
1151
1152 /*
1153 * Store a trap message in the trap buffer and generate
1154 * an event for user space applications with the
1155 * SK_DRIVER_SENDEVENT macro.
1156 */
1157 QueueSensorTrap(pAC, OID_SKGE_TRAP_SEN_WAR_UPP,
1158 (unsigned int)Param.Para64);
1159 (void)SK_DRIVER_SENDEVENT(pAC, IoC);
1160 break;
1161
1162 case SK_PNMI_EVT_SEN_ERR_LOW:
1163#ifdef DEBUG
1164 if ((unsigned int)Param.Para64 >= (unsigned int)pAC->I2c.MaxSens) {
1165
1166 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1167 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_SEN_ERR_LOW parameter wrong, SensorIndex=%d\n",
1168 (unsigned int)Param.Para64));
1169 return (0);
1170 }
1171#endif /* DEBUG */
1172
1173 /*
1174 * Store a trap message in the trap buffer and generate
1175 * an event for user space applications with the
1176 * SK_DRIVER_SENDEVENT macro.
1177 */
1178 QueueSensorTrap(pAC, OID_SKGE_TRAP_SEN_ERR_LOW,
1179 (unsigned int)Param.Para64);
1180 (void)SK_DRIVER_SENDEVENT(pAC, IoC);
1181 break;
1182
1183 case SK_PNMI_EVT_SEN_ERR_UPP:
1184#ifdef DEBUG
1185 if ((unsigned int)Param.Para64 >= (unsigned int)pAC->I2c.MaxSens) {
1186
1187 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1188 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_SEN_ERR_UPP parameter wrong, SensorIndex=%d\n",
1189 (unsigned int)Param.Para64));
1190 return (0);
1191 }
1192#endif /* DEBUG */
1193
1194 /*
1195 * Store a trap message in the trap buffer and generate
1196 * an event for user space applications with the
1197 * SK_DRIVER_SENDEVENT macro.
1198 */
1199 QueueSensorTrap(pAC, OID_SKGE_TRAP_SEN_ERR_UPP,
1200 (unsigned int)Param.Para64);
1201 (void)SK_DRIVER_SENDEVENT(pAC, IoC);
1202 break;
1203
1204 case SK_PNMI_EVT_CHG_EST_TIMER:
1205 /*
1206 * Calculate port switch average on a per hour basis
1207 * Time interval for check : 28125 ms
1208 * Number of values for average : 8
1209 *
1210 * Be careful in changing these values, on change check
1211 * - typedef of SK_PNMI_ESTIMATE (Size of EstValue
1212 * array one less than value number)
1213 * - Timer initialization SkTimerStart() in SkPnmiInit
1214 * - Delta value below must be multiplicated with
1215 * power of 2
1216 *
1217 */
1218 pEst = &pAC->Pnmi.RlmtChangeEstimate;
1219 CounterIndex = pEst->EstValueIndex + 1;
1220 if (CounterIndex == 7) {
1221
1222 CounterIndex = 0;
1223 }
1224 pEst->EstValueIndex = CounterIndex;
1225
1226 NewestValue = pAC->Pnmi.RlmtChangeCts;
1227 OldestValue = pEst->EstValue[CounterIndex];
1228 pEst->EstValue[CounterIndex] = NewestValue;
1229
1230 /*
1231 * Calculate average. Delta stores the number of
1232 * port switches per 28125 * 8 = 225000 ms
1233 */
1234 if (NewestValue >= OldestValue) {
1235
1236 Delta = NewestValue - OldestValue;
1237 }
1238 else {
1239 /* Overflow situation */
1240 Delta = (SK_U64)(0 - OldestValue) + NewestValue;
1241 }
1242
1243 /*
1244 * Extrapolate delta to port switches per hour.
1245 * Estimate = Delta * (3600000 / 225000)
1246 * = Delta * 16
1247 * = Delta << 4
1248 */
1249 pAC->Pnmi.RlmtChangeEstimate.Estimate = Delta << 4;
1250
1251 /*
1252 * Check if threshold is exceeded. If the threshold is
1253 * permanently exceeded every 28125 ms an event will be
1254 * generated to remind the user of this condition.
1255 */
1256 if ((pAC->Pnmi.RlmtChangeThreshold != 0) &&
1257 (pAC->Pnmi.RlmtChangeEstimate.Estimate >=
1258 pAC->Pnmi.RlmtChangeThreshold)) {
1259
1260 QueueSimpleTrap(pAC, OID_SKGE_TRAP_RLMT_CHANGE_THRES);
1261 (void)SK_DRIVER_SENDEVENT(pAC, IoC);
1262 }
1263
1264 SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam));
1265 SkTimerStart(pAC, IoC, &pAC->Pnmi.RlmtChangeEstimate.EstTimer,
1266 28125000, SKGE_PNMI, SK_PNMI_EVT_CHG_EST_TIMER,
1267 EventParam);
1268 break;
1269
1270 case SK_PNMI_EVT_CLEAR_COUNTER:
1271 /*
1272 * Param.Para32[0] contains the NetIndex (0 ..1).
1273 * Param.Para32[1] is reserved, contains -1.
1274 */
1275 NetIndex = (SK_U32)Param.Para32[0];
1276
1277#ifdef DEBUG
1278 if (NetIndex >= pAC->Rlmt.NumNets) {
1279
1280 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1281 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_CLEAR_COUNTER parameter wrong, NetIndex=%d\n",
1282 NetIndex));
1283
1284 return (0);
1285 }
1286#endif /* DEBUG */
1287
1288 /*
1289 * Set all counters and timestamps to zero.
1290 * The according NetIndex is required as a
1291 * parameter of the event.
1292 */
1293 ResetCounter(pAC, IoC, NetIndex);
1294 break;
1295
1296 case SK_PNMI_EVT_XMAC_RESET:
1297 /*
1298 * To grant continuous counter values store the current
1299 * XMAC statistic values to the entries 1..n of the
1300 * CounterOffset array. XMAC Errata #2
1301 */
1302#ifdef DEBUG
1303 if ((unsigned int)Param.Para64 >= SK_MAX_MACS) {
1304
1305 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1306 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_XMAC_RESET parameter wrong, PhysPortIndex=%d\n",
1307 (unsigned int)Param.Para64));
1308 return (0);
1309 }
1310#endif
1311 PhysPortIndex = (unsigned int)Param.Para64;
1312
1313 /*
1314 * Update XMAC statistic to get fresh values
1315 */
1316 Ret = MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1);
1317 if (Ret != SK_PNMI_ERR_OK) {
1318
1319 SK_PNMI_CHECKFLAGS("SkPnmiEvent: On return");
1320 return (0);
1321 }
1322 /*
1323 * Increment semaphore to indicate that an update was
1324 * already done
1325 */
1326 pAC->Pnmi.MacUpdatedFlag ++;
1327
1328 for (CounterIndex = 0; CounterIndex < SK_PNMI_MAX_IDX;
1329 CounterIndex ++) {
1330
1331 if (!StatAddr[CounterIndex][MacType].GetOffset) {
1332
1333 continue;
1334 }
1335
1336 pAC->Pnmi.Port[PhysPortIndex].CounterOffset[CounterIndex] =
1337 GetPhysStatVal(pAC, IoC, PhysPortIndex, CounterIndex);
1338
1339 pAC->Pnmi.Port[PhysPortIndex].CounterHigh[CounterIndex] = 0;
1340 }
1341
1342 pAC->Pnmi.MacUpdatedFlag --;
1343 break;
1344
1345 case SK_PNMI_EVT_RLMT_PORT_UP:
1346 PhysPortIndex = (unsigned int)Param.Para32[0];
1347#ifdef DEBUG
1348 if (PhysPortIndex >= SK_MAX_MACS) {
1349
1350 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1351 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_PORT_UP parameter"
1352 " wrong, PhysPortIndex=%d\n", PhysPortIndex));
1353
1354 return (0);
1355 }
1356#endif /* DEBUG */
1357
1358 /*
1359 * Store a trap message in the trap buffer and generate an event for
1360 * user space applications with the SK_DRIVER_SENDEVENT macro.
1361 */
1362 QueueRlmtPortTrap(pAC, OID_SKGE_TRAP_RLMT_PORT_UP, PhysPortIndex);
1363 (void)SK_DRIVER_SENDEVENT(pAC, IoC);
1364
1365 /* Bugfix for XMAC errata (#10620)*/
1366 if (MacType == SK_MAC_XMAC) {
1367 /* Add incremental difference to offset (#10620)*/
1368 (void)pAC->GIni.GIFunc.pFnMacStatistic(pAC, IoC, PhysPortIndex,
1369 XM_RXE_SHT_ERR, &Val32);
1370
1371 Value = (((SK_U64)pAC->Pnmi.Port[PhysPortIndex].
1372 CounterHigh[SK_PNMI_HRX_SHORTS] << 32) | (SK_U64)Val32);
1373 pAC->Pnmi.Port[PhysPortIndex].CounterOffset[SK_PNMI_HRX_SHORTS] +=
1374 Value - pAC->Pnmi.Port[PhysPortIndex].RxShortZeroMark;
1375 }
1376
1377 /* Tell VctStatus() that a link was up meanwhile. */
1378 pAC->Pnmi.VctStatus[PhysPortIndex] |= SK_PNMI_VCT_LINK;
1379 break;
1380
1381 case SK_PNMI_EVT_RLMT_PORT_DOWN:
1382 PhysPortIndex = (unsigned int)Param.Para32[0];
1383
1384#ifdef DEBUG
1385 if (PhysPortIndex >= SK_MAX_MACS) {
1386
1387 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1388 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_PORT_DOWN parameter"
1389 " wrong, PhysPortIndex=%d\n", PhysPortIndex));
1390
1391 return (0);
1392 }
1393#endif /* DEBUG */
1394
1395 /*
1396 * Store a trap message in the trap buffer and generate an event for
1397 * user space applications with the SK_DRIVER_SENDEVENT macro.
1398 */
1399 QueueRlmtPortTrap(pAC, OID_SKGE_TRAP_RLMT_PORT_DOWN, PhysPortIndex);
1400 (void)SK_DRIVER_SENDEVENT(pAC, IoC);
1401
1402 /* Bugfix #10620 - get zero level for incremental difference */
1403 if (MacType == SK_MAC_XMAC) {
1404
1405 (void)pAC->GIni.GIFunc.pFnMacStatistic(pAC, IoC, PhysPortIndex,
1406 XM_RXE_SHT_ERR, &Val32);
1407
1408 pAC->Pnmi.Port[PhysPortIndex].RxShortZeroMark =
1409 (((SK_U64)pAC->Pnmi.Port[PhysPortIndex].
1410 CounterHigh[SK_PNMI_HRX_SHORTS] << 32) | (SK_U64)Val32);
1411 }
1412 break;
1413
1414 case SK_PNMI_EVT_RLMT_ACTIVE_DOWN:
1415 PhysPortIndex = (unsigned int)Param.Para32[0];
1416 NetIndex = (SK_U32)Param.Para32[1];
1417
1418#ifdef DEBUG
1419 if (PhysPortIndex >= SK_MAX_MACS) {
1420
1421 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1422 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_ACTIVE_DOWN parameter too high, PhysPort=%d\n",
1423 PhysPortIndex));
1424 }
1425
1426 if (NetIndex >= pAC->Rlmt.NumNets) {
1427
1428 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1429 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_ACTIVE_DOWN parameter too high, NetIndex=%d\n",
1430 NetIndex));
1431 }
1432#endif /* DEBUG */
1433
1434 /*
1435 * For now, ignore event if NetIndex != 0.
1436 */
1437 if (Param.Para32[1] != 0) {
1438
1439 return (0);
1440 }
1441
1442 /*
1443 * Nothing to do if port is already inactive
1444 */
1445 if (!pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) {
1446
1447 return (0);
1448 }
1449
1450 /*
1451 * Update statistic counters to calculate new offset for the virtual
1452 * port and increment semaphore to indicate that an update was already
1453 * done.
1454 */
1455 if (MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1) !=
1456 SK_PNMI_ERR_OK) {
1457
1458 SK_PNMI_CHECKFLAGS("SkPnmiEvent: On return");
1459 return (0);
1460 }
1461 pAC->Pnmi.MacUpdatedFlag ++;
1462
1463 /*
1464 * Calculate new counter offset for virtual port to grant continous
1465 * counting on port switches. The virtual port consists of all currently
1466 * active ports. The port down event indicates that a port is removed
1467 * from the virtual port. Therefore add the counter value of the removed
1468 * port to the CounterOffset for the virtual port to grant the same
1469 * counter value.
1470 */
1471 for (CounterIndex = 0; CounterIndex < SK_PNMI_MAX_IDX;
1472 CounterIndex ++) {
1473
1474 if (!StatAddr[CounterIndex][MacType].GetOffset) {
1475
1476 continue;
1477 }
1478
1479 Value = GetPhysStatVal(pAC, IoC, PhysPortIndex, CounterIndex);
1480
1481 pAC->Pnmi.VirtualCounterOffset[CounterIndex] += Value;
1482 }
1483
1484 /*
1485 * Set port to inactive
1486 */
1487 pAC->Pnmi.Port[PhysPortIndex].ActiveFlag = SK_FALSE;
1488
1489 pAC->Pnmi.MacUpdatedFlag --;
1490 break;
1491
1492 case SK_PNMI_EVT_RLMT_ACTIVE_UP:
1493 PhysPortIndex = (unsigned int)Param.Para32[0];
1494 NetIndex = (SK_U32)Param.Para32[1];
1495
1496#ifdef DEBUG
1497 if (PhysPortIndex >= SK_MAX_MACS) {
1498
1499 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1500 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_ACTIVE_UP parameter too high, PhysPort=%d\n",
1501 PhysPortIndex));
1502 }
1503
1504 if (NetIndex >= pAC->Rlmt.NumNets) {
1505
1506 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
1507 ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_ACTIVE_UP parameter too high, NetIndex=%d\n",
1508 NetIndex));
1509 }
1510#endif /* DEBUG */
1511
1512 /*
1513 * For now, ignore event if NetIndex != 0.
1514 */
1515 if (Param.Para32[1] != 0) {
1516
1517 return (0);
1518 }
1519
1520 /*
1521 * Nothing to do if port is already active
1522 */
1523 if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) {
1524
1525 return (0);
1526 }
1527
1528 /*
1529 * Statistic maintenance
1530 */
1531 pAC->Pnmi.RlmtChangeCts ++;
1532 pAC->Pnmi.RlmtChangeTime = SK_PNMI_HUNDREDS_SEC(SkOsGetTime(pAC));
1533
1534 /*
1535 * Store a trap message in the trap buffer and generate an event for
1536 * user space applications with the SK_DRIVER_SENDEVENT macro.
1537 */
1538 QueueRlmtNewMacTrap(pAC, PhysPortIndex);
1539 (void)SK_DRIVER_SENDEVENT(pAC, IoC);
1540
1541 /*
1542 * Update statistic counters to calculate new offset for the virtual
1543 * port and increment semaphore to indicate that an update was
1544 * already done.
1545 */
1546 if (MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1) !=
1547 SK_PNMI_ERR_OK) {
1548
1549 SK_PNMI_CHECKFLAGS("SkPnmiEvent: On return");
1550 return (0);
1551 }
1552 pAC->Pnmi.MacUpdatedFlag ++;
1553
1554 /*
1555 * Calculate new counter offset for virtual port to grant continous
1556 * counting on port switches. A new port is added to the virtual port.
1557 * Therefore substract the counter value of the new port from the
1558 * CounterOffset for the virtual port to grant the same value.
1559 */
1560 for (CounterIndex = 0; CounterIndex < SK_PNMI_MAX_IDX;
1561 CounterIndex ++) {
1562
1563 if (!StatAddr[CounterIndex][MacType].GetOffset) {
1564
1565 continue;
1566 }
1567
1568 Value = GetPhysStatVal(pAC, IoC, PhysPortIndex, CounterIndex);
1569
1570 pAC->Pnmi.VirtualCounterOffset[CounterIndex] -= Value;
1571 }
1572
1573 /* Set port to active */
1574 pAC->Pnmi.Port[PhysPortIndex].ActiveFlag = SK_TRUE;
1575
1576 pAC->Pnmi.MacUpdatedFlag --;
1577 break;
1578
1579 case SK_PNMI_EVT_RLMT_SEGMENTATION:
1580 /*
1581 * Para.Para32[0] contains the NetIndex.
1582 */
1583
1584 /*
1585 * Store a trap message in the trap buffer and generate an event for
1586 * user space applications with the SK_DRIVER_SENDEVENT macro.
1587 */
1588 QueueSimpleTrap(pAC, OID_SKGE_TRAP_RLMT_SEGMENTATION);
1589 (void)SK_DRIVER_SENDEVENT(pAC, IoC);
1590 break;
1591
1592 case SK_PNMI_EVT_RLMT_SET_NETS:
1593 /*
1594 * Param.Para32[0] contains the number of Nets.
1595 * Param.Para32[1] is reserved, contains -1.
1596 */
1597 /*
1598 * Check number of nets
1599 */
1600 MaxNetNumber = pAC->GIni.GIMacsFound;
1601 if (((unsigned int)Param.Para32[0] < 1)
1602 || ((unsigned int)Param.Para32[0] > MaxNetNumber)) {
1603 return (SK_PNMI_ERR_UNKNOWN_NET);
1604 }
1605
1606 if ((unsigned int)Param.Para32[0] == 1) { /* single net mode */
1607 pAC->Pnmi.DualNetActiveFlag = SK_FALSE;
1608 }
1609 else { /* dual net mode */
1610 pAC->Pnmi.DualNetActiveFlag = SK_TRUE;
1611 }
1612 break;
1613
1614 case SK_PNMI_EVT_VCT_RESET:
1615 PhysPortIndex = Param.Para32[0];
1616 pPrt = &pAC->GIni.GP[PhysPortIndex];
1617 pVctBackupData = &pAC->Pnmi.VctBackup[PhysPortIndex];
1618
1619 if (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_PENDING) {
1620 RetCode = SkGmCableDiagStatus(pAC, IoC, PhysPortIndex, SK_FALSE);
1621 if (RetCode == 2) {
1622 /*
1623 * VCT test is still running.
1624 * Start VCT timer counter again.
1625 */
1626 SK_MEMSET((char *) &Param, 0, sizeof(Param));
1627 Param.Para32[0] = PhysPortIndex;
1628 Param.Para32[1] = -1;
1629 SkTimerStart(pAC, IoC,
1630 &pAC->Pnmi.VctTimeout[PhysPortIndex].VctTimer,
1631 4000000, SKGE_PNMI, SK_PNMI_EVT_VCT_RESET, Param);
1632 break;
1633 }
1634 pAC->Pnmi.VctStatus[PhysPortIndex] &= ~SK_PNMI_VCT_PENDING;
1635 pAC->Pnmi.VctStatus[PhysPortIndex] |=
1636 (SK_PNMI_VCT_NEW_VCT_DATA | SK_PNMI_VCT_TEST_DONE);
1637
1638 /* Copy results for later use to PNMI struct. */
1639 for (i = 0; i < 4; i++) {
1640 if (pPrt->PMdiPairSts[i] == SK_PNMI_VCT_NORMAL_CABLE) {
1641 if ((pPrt->PMdiPairLen[i] > 35) &&
1642 (pPrt->PMdiPairLen[i] < 0xff)) {
1643 pPrt->PMdiPairSts[i] = SK_PNMI_VCT_IMPEDANCE_MISMATCH;
1644 }
1645 }
1646 if ((pPrt->PMdiPairLen[i] > 35) &&
1647 (pPrt->PMdiPairLen[i] != 0xff)) {
1648 CableLength = 1000 *
1649 (((175 * pPrt->PMdiPairLen[i]) / 210) - 28);
1650 }
1651 else {
1652 CableLength = 0;
1653 }
1654 pVctBackupData->PMdiPairLen[i] = CableLength;
1655 pVctBackupData->PMdiPairSts[i] = pPrt->PMdiPairSts[i];
1656 }
1657
1658 Param.Para32[0] = PhysPortIndex;
1659 Param.Para32[1] = -1;
1660 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_RESET, Param);
1661 SkEventDispatcher(pAC, IoC);
1662 }
1663
1664 break;
1665
1666 default:
1667 break;
1668 }
1669
1670 SK_PNMI_CHECKFLAGS("SkPnmiEvent: On return");
1671 return (0);
1672}
1673
1674
1675/******************************************************************************
1676 *
1677 * Private functions
1678 *
1679 */
1680
1681/*****************************************************************************
1682 *
1683 * PnmiVar - Gets, presets, and sets single OIDs
1684 *
1685 * Description:
1686 * Looks up the requested OID, calls the corresponding handler
1687 * function, and passes the parameters with the get, preset, or
1688 * set command. The function is called by SkGePnmiGetVar,
1689 * SkGePnmiPreSetVar, or SkGePnmiSetVar.
1690 *
1691 * Returns:
1692 * SK_PNMI_ERR_XXX. For details have a look at the description of the
1693 * calling functions.
1694 * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist
1695 */
1696PNMI_STATIC int PnmiVar(
1697SK_AC *pAC, /* Pointer to adapter context */
1698SK_IOC IoC, /* IO context handle */
1699int Action, /* GET/PRESET/SET action */
1700SK_U32 Id, /* Object ID that is to be processed */
1701char *pBuf, /* Buffer used for the management data transfer */
1702unsigned int *pLen, /* Total length of pBuf management data */
1703SK_U32 Instance, /* Instance (1..n) that is to be set or -1 */
1704SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
1705{
1706 unsigned int TableIndex;
1707 int Ret;
1708
1709
1710 if ((TableIndex = LookupId(Id)) == (unsigned int)(-1)) {
1711
1712 *pLen = 0;
1713 return (SK_PNMI_ERR_UNKNOWN_OID);
1714 }
1715
1716 /* Check NetIndex */
1717 if (NetIndex >= pAC->Rlmt.NumNets) {
1718 return (SK_PNMI_ERR_UNKNOWN_NET);
1719 }
1720
1721 SK_PNMI_CHECKFLAGS("PnmiVar: On call");
1722
1723 Ret = IdTable[TableIndex].Func(pAC, IoC, Action, Id, pBuf, pLen,
1724 Instance, TableIndex, NetIndex);
1725
1726 SK_PNMI_CHECKFLAGS("PnmiVar: On return");
1727
1728 return (Ret);
1729}
1730
1731/*****************************************************************************
1732 *
1733 * PnmiStruct - Presets and Sets data in structure SK_PNMI_STRUCT_DATA
1734 *
1735 * Description:
1736 * The return value of the function will also be stored in
1737 * SK_PNMI_STRUCT_DATA if the passed buffer has the minimum size of
1738 * SK_PNMI_MIN_STRUCT_SIZE. The sub-function runs through the IdTable,
1739 * checks which OIDs are able to set, and calls the handler function of
1740 * the OID to perform the set. The return value of the function will
1741 * also be stored in SK_PNMI_STRUCT_DATA if the passed buffer has the
1742 * minimum size of SK_PNMI_MIN_STRUCT_SIZE. The function is called
1743 * by SkGePnmiPreSetStruct and SkGePnmiSetStruct.
1744 *
1745 * Returns:
1746 * SK_PNMI_ERR_XXX. The codes are described in the calling functions.
1747 * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist
1748 */
1749PNMI_STATIC int PnmiStruct(
1750SK_AC *pAC, /* Pointer to adapter context */
1751SK_IOC IoC, /* IO context handle */
1752int Action, /* PRESET/SET action to be performed */
1753char *pBuf, /* Buffer used for the management data transfer */
1754unsigned int *pLen, /* Length of pBuf management data buffer */
1755SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
1756{
1757 int Ret;
1758 unsigned int TableIndex;
1759 unsigned int DstOffset;
1760 unsigned int Len;
1761 unsigned int InstanceNo;
1762 unsigned int InstanceCnt;
1763 SK_U32 Instance;
1764 SK_U32 Id;
1765
1766
1767 /* Check if the passed buffer has the right size */
1768 if (*pLen < SK_PNMI_STRUCT_SIZE) {
1769
1770 /* Check if we can return the error within the buffer */
1771 if (*pLen >= SK_PNMI_MIN_STRUCT_SIZE) {
1772
1773 SK_PNMI_SET_STAT(pBuf, SK_PNMI_ERR_TOO_SHORT,
1774 (SK_U32)(-1));
1775 }
1776
1777 *pLen = SK_PNMI_STRUCT_SIZE;
1778 return (SK_PNMI_ERR_TOO_SHORT);
1779 }
1780
1781 /* Check NetIndex */
1782 if (NetIndex >= pAC->Rlmt.NumNets) {
1783 return (SK_PNMI_ERR_UNKNOWN_NET);
1784 }
1785
1786 SK_PNMI_CHECKFLAGS("PnmiStruct: On call");
1787
1788 /*
1789 * Update the values of RLMT and SIRQ and increment semaphores to
1790 * indicate that an update was already done.
1791 */
1792 if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) {
1793
1794 SK_PNMI_SET_STAT(pBuf, Ret, (SK_U32)(-1));
1795 *pLen = SK_PNMI_MIN_STRUCT_SIZE;
1796 return (Ret);
1797 }
1798
1799 if ((Ret = SirqUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) {
1800
1801 SK_PNMI_SET_STAT(pBuf, Ret, (SK_U32)(-1));
1802 *pLen = SK_PNMI_MIN_STRUCT_SIZE;
1803 return (Ret);
1804 }
1805
1806 pAC->Pnmi.RlmtUpdatedFlag ++;
1807 pAC->Pnmi.SirqUpdatedFlag ++;
1808
1809 /* Preset/Set values */
1810 for (TableIndex = 0; TableIndex < ID_TABLE_SIZE; TableIndex ++) {
1811
1812 if ((IdTable[TableIndex].Access != SK_PNMI_RW) &&
1813 (IdTable[TableIndex].Access != SK_PNMI_WO)) {
1814
1815 continue;
1816 }
1817
1818 InstanceNo = IdTable[TableIndex].InstanceNo;
1819 Id = IdTable[TableIndex].Id;
1820
1821 for (InstanceCnt = 1; InstanceCnt <= InstanceNo;
1822 InstanceCnt ++) {
1823
1824 DstOffset = IdTable[TableIndex].Offset +
1825 (InstanceCnt - 1) *
1826 IdTable[TableIndex].StructSize;
1827
1828 /*
1829 * Because VPD multiple instance variables are
1830 * not setable we do not need to evaluate VPD
1831 * instances. Have a look to VPD instance
1832 * calculation in SkPnmiGetStruct().
1833 */
1834 Instance = (SK_U32)InstanceCnt;
1835
1836 /*
1837 * Evaluate needed buffer length
1838 */
1839 Len = 0;
1840 Ret = IdTable[TableIndex].Func(pAC, IoC,
1841 SK_PNMI_GET, IdTable[TableIndex].Id,
1842 NULL, &Len, Instance, TableIndex, NetIndex);
1843
1844 if (Ret == SK_PNMI_ERR_UNKNOWN_INST) {
1845
1846 break;
1847 }
1848 if (Ret != SK_PNMI_ERR_TOO_SHORT) {
1849
1850 pAC->Pnmi.RlmtUpdatedFlag --;
1851 pAC->Pnmi.SirqUpdatedFlag --;
1852
1853 SK_PNMI_CHECKFLAGS("PnmiStruct: On return");
1854 SK_PNMI_SET_STAT(pBuf,
1855 SK_PNMI_ERR_GENERAL, DstOffset);
1856 *pLen = SK_PNMI_MIN_STRUCT_SIZE;
1857 return (SK_PNMI_ERR_GENERAL);
1858 }
1859 if (Id == OID_SKGE_VPD_ACTION) {
1860
1861 switch (*(pBuf + DstOffset)) {
1862
1863 case SK_PNMI_VPD_CREATE:
1864 Len = 3 + *(pBuf + DstOffset + 3);
1865 break;
1866
1867 case SK_PNMI_VPD_DELETE:
1868 Len = 3;
1869 break;
1870
1871 default:
1872 Len = 1;
1873 break;
1874 }
1875 }
1876
1877 /* Call the OID handler function */
1878 Ret = IdTable[TableIndex].Func(pAC, IoC, Action,
1879 IdTable[TableIndex].Id, pBuf + DstOffset,
1880 &Len, Instance, TableIndex, NetIndex);
1881
1882 if (Ret != SK_PNMI_ERR_OK) {
1883
1884 pAC->Pnmi.RlmtUpdatedFlag --;
1885 pAC->Pnmi.SirqUpdatedFlag --;
1886
1887 SK_PNMI_CHECKFLAGS("PnmiStruct: On return");
1888 SK_PNMI_SET_STAT(pBuf, SK_PNMI_ERR_BAD_VALUE,
1889 DstOffset);
1890 *pLen = SK_PNMI_MIN_STRUCT_SIZE;
1891 return (SK_PNMI_ERR_BAD_VALUE);
1892 }
1893 }
1894 }
1895
1896 pAC->Pnmi.RlmtUpdatedFlag --;
1897 pAC->Pnmi.SirqUpdatedFlag --;
1898
1899 SK_PNMI_CHECKFLAGS("PnmiStruct: On return");
1900 SK_PNMI_SET_STAT(pBuf, SK_PNMI_ERR_OK, (SK_U32)(-1));
1901 return (SK_PNMI_ERR_OK);
1902}
1903
1904/*****************************************************************************
1905 *
1906 * LookupId - Lookup an OID in the IdTable
1907 *
1908 * Description:
1909 * Scans the IdTable to find the table entry of an OID.
1910 *
1911 * Returns:
1912 * The table index or -1 if not found.
1913 */
1914PNMI_STATIC int LookupId(
1915SK_U32 Id) /* Object identifier to be searched */
1916{
1917 int i;
1918
1919 for (i = 0; i < ID_TABLE_SIZE; i++) {
1920
1921 if (IdTable[i].Id == Id) {
1922
1923 return i;
1924 }
1925 }
1926
1927 return (-1);
1928}
1929
1930/*****************************************************************************
1931 *
1932 * OidStruct - Handler of OID_SKGE_ALL_DATA
1933 *
1934 * Description:
1935 * This OID performs a Get/Preset/SetStruct call and returns all data
1936 * in a SK_PNMI_STRUCT_DATA structure.
1937 *
1938 * Returns:
1939 * SK_PNMI_ERR_OK The request was successfully performed.
1940 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
1941 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
1942 * the correct data (e.g. a 32bit value is
1943 * needed, but a 16 bit value was passed).
1944 * SK_PNMI_ERR_BAD_VALUE The passed value is not in the valid
1945 * value range.
1946 * SK_PNMI_ERR_READ_ONLY The OID is read-only and cannot be set.
1947 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
1948 * exist (e.g. port instance 3 on a two port
1949 * adapter.
1950 */
1951PNMI_STATIC int OidStruct(
1952SK_AC *pAC, /* Pointer to adapter context */
1953SK_IOC IoC, /* IO context handle */
1954int Action, /* GET/PRESET/SET action */
1955SK_U32 Id, /* Object ID that is to be processed */
1956char *pBuf, /* Buffer used for the management data transfer */
1957unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
1958SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
1959unsigned int TableIndex, /* Index to the Id table */
1960SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
1961{
1962 if (Id != OID_SKGE_ALL_DATA) {
1963
1964 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR003,
1965 SK_PNMI_ERR003MSG);
1966
1967 *pLen = 0;
1968 return (SK_PNMI_ERR_GENERAL);
1969 }
1970
1971 /*
1972 * Check instance. We only handle single instance variables
1973 */
1974 if (Instance != (SK_U32)(-1) && Instance != 1) {
1975
1976 *pLen = 0;
1977 return (SK_PNMI_ERR_UNKNOWN_INST);
1978 }
1979
1980 switch (Action) {
1981
1982 case SK_PNMI_GET:
1983 return (SkPnmiGetStruct(pAC, IoC, pBuf, pLen, NetIndex));
1984
1985 case SK_PNMI_PRESET:
1986 return (SkPnmiPreSetStruct(pAC, IoC, pBuf, pLen, NetIndex));
1987
1988 case SK_PNMI_SET:
1989 return (SkPnmiSetStruct(pAC, IoC, pBuf, pLen, NetIndex));
1990 }
1991
1992 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR004, SK_PNMI_ERR004MSG);
1993
1994 *pLen = 0;
1995 return (SK_PNMI_ERR_GENERAL);
1996}
1997
1998/*****************************************************************************
1999 *
2000 * Perform - OID handler of OID_SKGE_ACTION
2001 *
2002 * Description:
2003 * None.
2004 *
2005 * Returns:
2006 * SK_PNMI_ERR_OK The request was successfully performed.
2007 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
2008 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
2009 * the correct data (e.g. a 32bit value is
2010 * needed, but a 16 bit value was passed).
2011 * SK_PNMI_ERR_BAD_VALUE The passed value is not in the valid
2012 * value range.
2013 * SK_PNMI_ERR_READ_ONLY The OID is read-only and cannot be set.
2014 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
2015 * exist (e.g. port instance 3 on a two port
2016 * adapter.
2017 */
2018PNMI_STATIC int Perform(
2019SK_AC *pAC, /* Pointer to adapter context */
2020SK_IOC IoC, /* IO context handle */
2021int Action, /* GET/PRESET/SET action */
2022SK_U32 Id, /* Object ID that is to be processed */
2023char *pBuf, /* Buffer used for the management data transfer */
2024unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
2025SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
2026unsigned int TableIndex, /* Index to the Id table */
2027SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
2028{
2029 int Ret;
2030 SK_U32 ActionOp;
2031
2032
2033 /*
2034 * Check instance. We only handle single instance variables
2035 */
2036 if (Instance != (SK_U32)(-1) && Instance != 1) {
2037
2038 *pLen = 0;
2039 return (SK_PNMI_ERR_UNKNOWN_INST);
2040 }
2041
2042 if (*pLen < sizeof(SK_U32)) {
2043
2044 *pLen = sizeof(SK_U32);
2045 return (SK_PNMI_ERR_TOO_SHORT);
2046 }
2047
2048 /* Check if a get should be performed */
2049 if (Action == SK_PNMI_GET) {
2050
2051 /* A get is easy. We always return the same value */
2052 ActionOp = (SK_U32)SK_PNMI_ACT_IDLE;
2053 SK_PNMI_STORE_U32(pBuf, ActionOp);
2054 *pLen = sizeof(SK_U32);
2055
2056 return (SK_PNMI_ERR_OK);
2057 }
2058
2059 /* Continue with PRESET/SET action */
2060 if (*pLen > sizeof(SK_U32)) {
2061
2062 return (SK_PNMI_ERR_BAD_VALUE);
2063 }
2064
2065 /* Check if the command is a known one */
2066 SK_PNMI_READ_U32(pBuf, ActionOp);
2067 if (*pLen > sizeof(SK_U32) ||
2068 (ActionOp != SK_PNMI_ACT_IDLE &&
2069 ActionOp != SK_PNMI_ACT_RESET &&
2070 ActionOp != SK_PNMI_ACT_SELFTEST &&
2071 ActionOp != SK_PNMI_ACT_RESETCNT)) {
2072
2073 *pLen = 0;
2074 return (SK_PNMI_ERR_BAD_VALUE);
2075 }
2076
2077 /* A preset ends here */
2078 if (Action == SK_PNMI_PRESET) {
2079
2080 return (SK_PNMI_ERR_OK);
2081 }
2082
2083 switch (ActionOp) {
2084
2085 case SK_PNMI_ACT_IDLE:
2086 /* Nothing to do */
2087 break;
2088
2089 case SK_PNMI_ACT_RESET:
2090 /*
2091 * Perform a driver reset or something that comes near
2092 * to this.
2093 */
2094 Ret = SK_DRIVER_RESET(pAC, IoC);
2095 if (Ret != 0) {
2096
2097 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR005,
2098 SK_PNMI_ERR005MSG);
2099
2100 return (SK_PNMI_ERR_GENERAL);
2101 }
2102 break;
2103
2104 case SK_PNMI_ACT_SELFTEST:
2105 /*
2106 * Perform a driver selftest or something similar to this.
2107 * Currently this feature is not used and will probably
2108 * implemented in another way.
2109 */
2110 Ret = SK_DRIVER_SELFTEST(pAC, IoC);
2111 pAC->Pnmi.TestResult = Ret;
2112 break;
2113
2114 case SK_PNMI_ACT_RESETCNT:
2115 /* Set all counters and timestamps to zero */
2116 ResetCounter(pAC, IoC, NetIndex);
2117 break;
2118
2119 default:
2120 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR006,
2121 SK_PNMI_ERR006MSG);
2122
2123 return (SK_PNMI_ERR_GENERAL);
2124 }
2125
2126 return (SK_PNMI_ERR_OK);
2127}
2128
2129/*****************************************************************************
2130 *
2131 * Mac8023Stat - OID handler of OID_GEN_XXX and OID_802_3_XXX
2132 *
2133 * Description:
2134 * Retrieves the statistic values of the virtual port (logical
2135 * index 0). Only special OIDs of NDIS are handled which consist
2136 * of a 32 bit instead of a 64 bit value. The OIDs are public
2137 * because perhaps some other platform can use them too.
2138 *
2139 * Returns:
2140 * SK_PNMI_ERR_OK The request was successfully performed.
2141 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
2142 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
2143 * the correct data (e.g. a 32bit value is
2144 * needed, but a 16 bit value was passed).
2145 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
2146 * exist (e.g. port instance 3 on a two port
2147 * adapter.
2148 */
2149PNMI_STATIC int Mac8023Stat(
2150SK_AC *pAC, /* Pointer to adapter context */
2151SK_IOC IoC, /* IO context handle */
2152int Action, /* GET/PRESET/SET action */
2153SK_U32 Id, /* Object ID that is to be processed */
2154char *pBuf, /* Buffer used for the management data transfer */
2155unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
2156SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
2157unsigned int TableIndex, /* Index to the Id table */
2158SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
2159{
2160 int Ret;
2161 SK_U64 StatVal;
2162 SK_U32 StatVal32;
2163 SK_BOOL Is64BitReq = SK_FALSE;
2164
2165 /*
2166 * Only the active Mac is returned
2167 */
2168 if (Instance != (SK_U32)(-1) && Instance != 1) {
2169
2170 *pLen = 0;
2171 return (SK_PNMI_ERR_UNKNOWN_INST);
2172 }
2173
2174 /*
2175 * Check action type
2176 */
2177 if (Action != SK_PNMI_GET) {
2178
2179 *pLen = 0;
2180 return (SK_PNMI_ERR_READ_ONLY);
2181 }
2182
2183 /* Check length */
2184 switch (Id) {
2185
2186 case OID_802_3_PERMANENT_ADDRESS:
2187 case OID_802_3_CURRENT_ADDRESS:
2188 if (*pLen < sizeof(SK_MAC_ADDR)) {
2189
2190 *pLen = sizeof(SK_MAC_ADDR);
2191 return (SK_PNMI_ERR_TOO_SHORT);
2192 }
2193 break;
2194
2195 default:
2196#ifndef SK_NDIS_64BIT_CTR
2197 if (*pLen < sizeof(SK_U32)) {
2198 *pLen = sizeof(SK_U32);
2199 return (SK_PNMI_ERR_TOO_SHORT);
2200 }
2201
2202#else /* SK_NDIS_64BIT_CTR */
2203
2204 /* for compatibility, at least 32bit are required for OID */
2205 if (*pLen < sizeof(SK_U32)) {
2206 /*
2207 * but indicate handling for 64bit values,
2208 * if insufficient space is provided
2209 */
2210 *pLen = sizeof(SK_U64);
2211 return (SK_PNMI_ERR_TOO_SHORT);
2212 }
2213
2214 Is64BitReq = (*pLen < sizeof(SK_U64)) ? SK_FALSE : SK_TRUE;
2215#endif /* SK_NDIS_64BIT_CTR */
2216 break;
2217 }
2218
2219 /*
2220 * Update all statistics, because we retrieve virtual MAC, which
2221 * consists of multiple physical statistics and increment semaphore
2222 * to indicate that an update was already done.
2223 */
2224 Ret = MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1);
2225 if ( Ret != SK_PNMI_ERR_OK) {
2226
2227 *pLen = 0;
2228 return (Ret);
2229 }
2230 pAC->Pnmi.MacUpdatedFlag ++;
2231
2232 /*
2233 * Get value (MAC Index 0 identifies the virtual MAC)
2234 */
2235 switch (Id) {
2236
2237 case OID_802_3_PERMANENT_ADDRESS:
2238 CopyMac(pBuf, &pAC->Addr.Net[NetIndex].PermanentMacAddress);
2239 *pLen = sizeof(SK_MAC_ADDR);
2240 break;
2241
2242 case OID_802_3_CURRENT_ADDRESS:
2243 CopyMac(pBuf, &pAC->Addr.Net[NetIndex].CurrentMacAddress);
2244 *pLen = sizeof(SK_MAC_ADDR);
2245 break;
2246
2247 default:
2248 StatVal = GetStatVal(pAC, IoC, 0, IdTable[TableIndex].Param, NetIndex);
2249
2250 /* by default 32bit values are evaluated */
2251 if (!Is64BitReq) {
2252 StatVal32 = (SK_U32)StatVal;
2253 SK_PNMI_STORE_U32(pBuf, StatVal32);
2254 *pLen = sizeof(SK_U32);
2255 }
2256 else {
2257 SK_PNMI_STORE_U64(pBuf, StatVal);
2258 *pLen = sizeof(SK_U64);
2259 }
2260 break;
2261 }
2262
2263 pAC->Pnmi.MacUpdatedFlag --;
2264
2265 return (SK_PNMI_ERR_OK);
2266}
2267
2268/*****************************************************************************
2269 *
2270 * MacPrivateStat - OID handler function of OID_SKGE_STAT_XXX
2271 *
2272 * Description:
2273 * Retrieves the MAC statistic data.
2274 *
2275 * Returns:
2276 * SK_PNMI_ERR_OK The request was successfully performed.
2277 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
2278 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
2279 * the correct data (e.g. a 32bit value is
2280 * needed, but a 16 bit value was passed).
2281 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
2282 * exist (e.g. port instance 3 on a two port
2283 * adapter.
2284 */
2285PNMI_STATIC int MacPrivateStat(
2286SK_AC *pAC, /* Pointer to adapter context */
2287SK_IOC IoC, /* IO context handle */
2288int Action, /* GET/PRESET/SET action */
2289SK_U32 Id, /* Object ID that is to be processed */
2290char *pBuf, /* Buffer used for the management data transfer */
2291unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
2292SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
2293unsigned int TableIndex, /* Index to the Id table */
2294SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
2295{
2296 unsigned int LogPortMax;
2297 unsigned int LogPortIndex;
2298 unsigned int PhysPortMax;
2299 unsigned int Limit;
2300 unsigned int Offset;
2301 int MacType;
2302 int Ret;
2303 SK_U64 StatVal;
2304
2305
2306
2307 /* Calculate instance if wished. MAC index 0 is the virtual MAC */
2308 PhysPortMax = pAC->GIni.GIMacsFound;
2309 LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax);
2310
2311 MacType = pAC->GIni.GIMacType;
2312
2313 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { /* Dual net mode */
2314 LogPortMax--;
2315 }
2316
2317 if ((Instance != (SK_U32)(-1))) { /* Only one specific instance is queried */
2318 /* Check instance range */
2319 if ((Instance < 1) || (Instance > LogPortMax)) {
2320
2321 *pLen = 0;
2322 return (SK_PNMI_ERR_UNKNOWN_INST);
2323 }
2324 LogPortIndex = SK_PNMI_PORT_INST2LOG(Instance);
2325 Limit = LogPortIndex + 1;
2326 }
2327
2328 else { /* Instance == (SK_U32)(-1), get all Instances of that OID */
2329
2330 LogPortIndex = 0;
2331 Limit = LogPortMax;
2332 }
2333
2334 /* Check action */
2335 if (Action != SK_PNMI_GET) {
2336
2337 *pLen = 0;
2338 return (SK_PNMI_ERR_READ_ONLY);
2339 }
2340
2341 /* Check length */
2342 if (*pLen < (Limit - LogPortIndex) * sizeof(SK_U64)) {
2343
2344 *pLen = (Limit - LogPortIndex) * sizeof(SK_U64);
2345 return (SK_PNMI_ERR_TOO_SHORT);
2346 }
2347
2348 /*
2349 * Update MAC statistic and increment semaphore to indicate that
2350 * an update was already done.
2351 */
2352 Ret = MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1);
2353 if (Ret != SK_PNMI_ERR_OK) {
2354
2355 *pLen = 0;
2356 return (Ret);
2357 }
2358 pAC->Pnmi.MacUpdatedFlag ++;
2359
2360 /* Get value */
2361 Offset = 0;
2362 for (; LogPortIndex < Limit; LogPortIndex ++) {
2363
2364 switch (Id) {
2365
2366/* XXX not yet implemented due to XMAC problems
2367 case OID_SKGE_STAT_TX_UTIL:
2368 return (SK_PNMI_ERR_GENERAL);
2369*/
2370/* XXX not yet implemented due to XMAC problems
2371 case OID_SKGE_STAT_RX_UTIL:
2372 return (SK_PNMI_ERR_GENERAL);
2373*/
2374 case OID_SKGE_STAT_RX:
2375 if (MacType == SK_MAC_GMAC) {
2376 StatVal =
2377 GetStatVal(pAC, IoC, LogPortIndex,
2378 SK_PNMI_HRX_BROADCAST, NetIndex) +
2379 GetStatVal(pAC, IoC, LogPortIndex,
2380 SK_PNMI_HRX_MULTICAST, NetIndex) +
2381 GetStatVal(pAC, IoC, LogPortIndex,
2382 SK_PNMI_HRX_UNICAST, NetIndex) +
2383 GetStatVal(pAC, IoC, LogPortIndex,
2384 SK_PNMI_HRX_UNDERSIZE, NetIndex);
2385 }
2386 else {
2387 StatVal = GetStatVal(pAC, IoC, LogPortIndex,
2388 IdTable[TableIndex].Param, NetIndex);
2389 }
2390 break;
2391
2392 case OID_SKGE_STAT_TX:
2393 if (MacType == SK_MAC_GMAC) {
2394 StatVal =
2395 GetStatVal(pAC, IoC, LogPortIndex,
2396 SK_PNMI_HTX_BROADCAST, NetIndex) +
2397 GetStatVal(pAC, IoC, LogPortIndex,
2398 SK_PNMI_HTX_MULTICAST, NetIndex) +
2399 GetStatVal(pAC, IoC, LogPortIndex,
2400 SK_PNMI_HTX_UNICAST, NetIndex);
2401 }
2402 else {
2403 StatVal = GetStatVal(pAC, IoC, LogPortIndex,
2404 IdTable[TableIndex].Param, NetIndex);
2405 }
2406 break;
2407
2408 default:
2409 StatVal = GetStatVal(pAC, IoC, LogPortIndex,
2410 IdTable[TableIndex].Param, NetIndex);
2411 }
2412 SK_PNMI_STORE_U64(pBuf + Offset, StatVal);
2413
2414 Offset += sizeof(SK_U64);
2415 }
2416 *pLen = Offset;
2417
2418 pAC->Pnmi.MacUpdatedFlag --;
2419
2420 return (SK_PNMI_ERR_OK);
2421}
2422
2423/*****************************************************************************
2424 *
2425 * Addr - OID handler function of OID_SKGE_PHYS_CUR_ADDR and _FAC_ADDR
2426 *
2427 * Description:
2428 * Get/Presets/Sets the current and factory MAC address. The MAC
2429 * address of the virtual port, which is reported to the OS, may
2430 * not be changed, but the physical ones. A set to the virtual port
2431 * will be ignored. No error should be reported because otherwise
2432 * a multiple instance set (-1) would always fail.
2433 *
2434 * Returns:
2435 * SK_PNMI_ERR_OK The request was successfully performed.
2436 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
2437 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
2438 * the correct data (e.g. a 32bit value is
2439 * needed, but a 16 bit value was passed).
2440 * SK_PNMI_ERR_BAD_VALUE The passed value is not in the valid
2441 * value range.
2442 * SK_PNMI_ERR_READ_ONLY The OID is read-only and cannot be set.
2443 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
2444 * exist (e.g. port instance 3 on a two port
2445 * adapter.
2446 */
2447PNMI_STATIC int Addr(
2448SK_AC *pAC, /* Pointer to adapter context */
2449SK_IOC IoC, /* IO context handle */
2450int Action, /* GET/PRESET/SET action */
2451SK_U32 Id, /* Object ID that is to be processed */
2452char *pBuf, /* Buffer used for the management data transfer */
2453unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
2454SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
2455unsigned int TableIndex, /* Index to the Id table */
2456SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
2457{
2458 int Ret;
2459 unsigned int LogPortMax;
2460 unsigned int PhysPortMax;
2461 unsigned int LogPortIndex;
2462 unsigned int PhysPortIndex;
2463 unsigned int Limit;
2464 unsigned int Offset = 0;
2465
2466 /*
2467 * Calculate instance if wished. MAC index 0 is the virtual
2468 * MAC.
2469 */
2470 PhysPortMax = pAC->GIni.GIMacsFound;
2471 LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax);
2472
2473 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { /* Dual net mode */
2474 LogPortMax--;
2475 }
2476
2477 if ((Instance != (SK_U32)(-1))) { /* Only one specific instance is queried */
2478 /* Check instance range */
2479 if ((Instance < 1) || (Instance > LogPortMax)) {
2480
2481 *pLen = 0;
2482 return (SK_PNMI_ERR_UNKNOWN_INST);
2483 }
2484 LogPortIndex = SK_PNMI_PORT_INST2LOG(Instance);
2485 Limit = LogPortIndex + 1;
2486 }
2487 else { /* Instance == (SK_U32)(-1), get all Instances of that OID */
2488
2489 LogPortIndex = 0;
2490 Limit = LogPortMax;
2491 }
2492
2493 /*
2494 * Perform Action
2495 */
2496 if (Action == SK_PNMI_GET) {
2497
2498 /* Check length */
2499 if (*pLen < (Limit - LogPortIndex) * 6) {
2500
2501 *pLen = (Limit - LogPortIndex) * 6;
2502 return (SK_PNMI_ERR_TOO_SHORT);
2503 }
2504
2505 /*
2506 * Get value
2507 */
2508 for (; LogPortIndex < Limit; LogPortIndex ++) {
2509
2510 switch (Id) {
2511
2512 case OID_SKGE_PHYS_CUR_ADDR:
2513 if (LogPortIndex == 0) {
2514 CopyMac(pBuf + Offset, &pAC->Addr.Net[NetIndex].CurrentMacAddress);
2515 }
2516 else {
2517 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, LogPortIndex);
2518
2519 CopyMac(pBuf + Offset,
2520 &pAC->Addr.Port[PhysPortIndex].CurrentMacAddress);
2521 }
2522 Offset += 6;
2523 break;
2524
2525 case OID_SKGE_PHYS_FAC_ADDR:
2526 if (LogPortIndex == 0) {
2527 CopyMac(pBuf + Offset,
2528 &pAC->Addr.Net[NetIndex].PermanentMacAddress);
2529 }
2530 else {
2531 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
2532 pAC, LogPortIndex);
2533
2534 CopyMac(pBuf + Offset,
2535 &pAC->Addr.Port[PhysPortIndex].PermanentMacAddress);
2536 }
2537 Offset += 6;
2538 break;
2539
2540 default:
2541 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR008,
2542 SK_PNMI_ERR008MSG);
2543
2544 *pLen = 0;
2545 return (SK_PNMI_ERR_GENERAL);
2546 }
2547 }
2548
2549 *pLen = Offset;
2550 }
2551 else {
2552 /*
2553 * The logical MAC address may not be changed only
2554 * the physical ones
2555 */
2556 if (Id == OID_SKGE_PHYS_FAC_ADDR) {
2557
2558 *pLen = 0;
2559 return (SK_PNMI_ERR_READ_ONLY);
2560 }
2561
2562 /*
2563 * Only the current address may be changed
2564 */
2565 if (Id != OID_SKGE_PHYS_CUR_ADDR) {
2566
2567 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR009,
2568 SK_PNMI_ERR009MSG);
2569
2570 *pLen = 0;
2571 return (SK_PNMI_ERR_GENERAL);
2572 }
2573
2574 /* Check length */
2575 if (*pLen < (Limit - LogPortIndex) * 6) {
2576
2577 *pLen = (Limit - LogPortIndex) * 6;
2578 return (SK_PNMI_ERR_TOO_SHORT);
2579 }
2580 if (*pLen > (Limit - LogPortIndex) * 6) {
2581
2582 *pLen = 0;
2583 return (SK_PNMI_ERR_BAD_VALUE);
2584 }
2585
2586 /*
2587 * Check Action
2588 */
2589 if (Action == SK_PNMI_PRESET) {
2590
2591 *pLen = 0;
2592 return (SK_PNMI_ERR_OK);
2593 }
2594
2595 /*
2596 * Set OID_SKGE_MAC_CUR_ADDR
2597 */
2598 for (; LogPortIndex < Limit; LogPortIndex ++, Offset += 6) {
2599
2600 /*
2601 * A set to virtual port and set of broadcast
2602 * address will be ignored
2603 */
2604 if (LogPortIndex == 0 || SK_MEMCMP(pBuf + Offset,
2605 "\xff\xff\xff\xff\xff\xff", 6) == 0) {
2606
2607 continue;
2608 }
2609
2610 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC,
2611 LogPortIndex);
2612
2613 Ret = SkAddrOverride(pAC, IoC, PhysPortIndex,
2614 (SK_MAC_ADDR *)(pBuf + Offset),
2615 (LogPortIndex == 0 ? SK_ADDR_VIRTUAL_ADDRESS :
2616 SK_ADDR_PHYSICAL_ADDRESS));
2617 if (Ret != SK_ADDR_OVERRIDE_SUCCESS) {
2618
2619 return (SK_PNMI_ERR_GENERAL);
2620 }
2621 }
2622 *pLen = Offset;
2623 }
2624
2625 return (SK_PNMI_ERR_OK);
2626}
2627
2628/*****************************************************************************
2629 *
2630 * CsumStat - OID handler function of OID_SKGE_CHKSM_XXX
2631 *
2632 * Description:
2633 * Retrieves the statistic values of the CSUM module. The CSUM data
2634 * structure must be available in the SK_AC even if the CSUM module
2635 * is not included, because PNMI reads the statistic data from the
2636 * CSUM part of SK_AC directly.
2637 *
2638 * Returns:
2639 * SK_PNMI_ERR_OK The request was successfully performed.
2640 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
2641 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
2642 * the correct data (e.g. a 32bit value is
2643 * needed, but a 16 bit value was passed).
2644 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
2645 * exist (e.g. port instance 3 on a two port
2646 * adapter.
2647 */
2648PNMI_STATIC int CsumStat(
2649SK_AC *pAC, /* Pointer to adapter context */
2650SK_IOC IoC, /* IO context handle */
2651int Action, /* GET/PRESET/SET action */
2652SK_U32 Id, /* Object ID that is to be processed */
2653char *pBuf, /* Buffer used for the management data transfer */
2654unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
2655SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
2656unsigned int TableIndex, /* Index to the Id table */
2657SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
2658{
2659 unsigned int Index;
2660 unsigned int Limit;
2661 unsigned int Offset = 0;
2662 SK_U64 StatVal;
2663
2664
2665 /*
2666 * Calculate instance if wished
2667 */
2668 if (Instance != (SK_U32)(-1)) {
2669
2670 if ((Instance < 1) || (Instance > SKCS_NUM_PROTOCOLS)) {
2671
2672 *pLen = 0;
2673 return (SK_PNMI_ERR_UNKNOWN_INST);
2674 }
2675 Index = (unsigned int)Instance - 1;
2676 Limit = Index + 1;
2677 }
2678 else {
2679 Index = 0;
2680 Limit = SKCS_NUM_PROTOCOLS;
2681 }
2682
2683 /*
2684 * Check action
2685 */
2686 if (Action != SK_PNMI_GET) {
2687
2688 *pLen = 0;
2689 return (SK_PNMI_ERR_READ_ONLY);
2690 }
2691
2692 /* Check length */
2693 if (*pLen < (Limit - Index) * sizeof(SK_U64)) {
2694
2695 *pLen = (Limit - Index) * sizeof(SK_U64);
2696 return (SK_PNMI_ERR_TOO_SHORT);
2697 }
2698
2699 /*
2700 * Get value
2701 */
2702 for (; Index < Limit; Index ++) {
2703
2704 switch (Id) {
2705
2706 case OID_SKGE_CHKSM_RX_OK_CTS:
2707 StatVal = pAC->Csum.ProtoStats[NetIndex][Index].RxOkCts;
2708 break;
2709
2710 case OID_SKGE_CHKSM_RX_UNABLE_CTS:
2711 StatVal = pAC->Csum.ProtoStats[NetIndex][Index].RxUnableCts;
2712 break;
2713
2714 case OID_SKGE_CHKSM_RX_ERR_CTS:
2715 StatVal = pAC->Csum.ProtoStats[NetIndex][Index].RxErrCts;
2716 break;
2717
2718 case OID_SKGE_CHKSM_TX_OK_CTS:
2719 StatVal = pAC->Csum.ProtoStats[NetIndex][Index].TxOkCts;
2720 break;
2721
2722 case OID_SKGE_CHKSM_TX_UNABLE_CTS:
2723 StatVal = pAC->Csum.ProtoStats[NetIndex][Index].TxUnableCts;
2724 break;
2725
2726 default:
2727 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR010,
2728 SK_PNMI_ERR010MSG);
2729
2730 *pLen = 0;
2731 return (SK_PNMI_ERR_GENERAL);
2732 }
2733
2734 SK_PNMI_STORE_U64(pBuf + Offset, StatVal);
2735 Offset += sizeof(SK_U64);
2736 }
2737
2738 /*
2739 * Store used buffer space
2740 */
2741 *pLen = Offset;
2742
2743 return (SK_PNMI_ERR_OK);
2744}
2745
2746/*****************************************************************************
2747 *
2748 * SensorStat - OID handler function of OID_SKGE_SENSOR_XXX
2749 *
2750 * Description:
2751 * Retrieves the statistic values of the I2C module, which handles
2752 * the temperature and voltage sensors.
2753 *
2754 * Returns:
2755 * SK_PNMI_ERR_OK The request was successfully performed.
2756 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
2757 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
2758 * the correct data (e.g. a 32bit value is
2759 * needed, but a 16 bit value was passed).
2760 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
2761 * exist (e.g. port instance 3 on a two port
2762 * adapter.
2763 */
2764PNMI_STATIC int SensorStat(
2765SK_AC *pAC, /* Pointer to adapter context */
2766SK_IOC IoC, /* IO context handle */
2767int Action, /* GET/PRESET/SET action */
2768SK_U32 Id, /* Object ID that is to be processed */
2769char *pBuf, /* Buffer used for the management data transfer */
2770unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
2771SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
2772unsigned int TableIndex, /* Index to the Id table */
2773SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
2774{
2775 unsigned int i;
2776 unsigned int Index;
2777 unsigned int Limit;
2778 unsigned int Offset;
2779 unsigned int Len;
2780 SK_U32 Val32;
2781 SK_U64 Val64;
2782
2783
2784 /*
2785 * Calculate instance if wished
2786 */
2787 if ((Instance != (SK_U32)(-1))) {
2788
2789 if ((Instance < 1) || (Instance > (SK_U32)pAC->I2c.MaxSens)) {
2790
2791 *pLen = 0;
2792 return (SK_PNMI_ERR_UNKNOWN_INST);
2793 }
2794
2795 Index = (unsigned int)Instance -1;
2796 Limit = (unsigned int)Instance;
2797 }
2798 else {
2799 Index = 0;
2800 Limit = (unsigned int) pAC->I2c.MaxSens;
2801 }
2802
2803 /*
2804 * Check action
2805 */
2806 if (Action != SK_PNMI_GET) {
2807
2808 *pLen = 0;
2809 return (SK_PNMI_ERR_READ_ONLY);
2810 }
2811
2812 /* Check length */
2813 switch (Id) {
2814
2815 case OID_SKGE_SENSOR_VALUE:
2816 case OID_SKGE_SENSOR_WAR_THRES_LOW:
2817 case OID_SKGE_SENSOR_WAR_THRES_UPP:
2818 case OID_SKGE_SENSOR_ERR_THRES_LOW:
2819 case OID_SKGE_SENSOR_ERR_THRES_UPP:
2820 if (*pLen < (Limit - Index) * sizeof(SK_U32)) {
2821
2822 *pLen = (Limit - Index) * sizeof(SK_U32);
2823 return (SK_PNMI_ERR_TOO_SHORT);
2824 }
2825 break;
2826
2827 case OID_SKGE_SENSOR_DESCR:
2828 for (Offset = 0, i = Index; i < Limit; i ++) {
2829
2830 Len = (unsigned int)
2831 SK_STRLEN(pAC->I2c.SenTable[i].SenDesc) + 1;
2832 if (Len >= SK_PNMI_STRINGLEN2) {
2833
2834 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR011,
2835 SK_PNMI_ERR011MSG);
2836
2837 *pLen = 0;
2838 return (SK_PNMI_ERR_GENERAL);
2839 }
2840 Offset += Len;
2841 }
2842 if (*pLen < Offset) {
2843
2844 *pLen = Offset;
2845 return (SK_PNMI_ERR_TOO_SHORT);
2846 }
2847 break;
2848
2849 case OID_SKGE_SENSOR_INDEX:
2850 case OID_SKGE_SENSOR_TYPE:
2851 case OID_SKGE_SENSOR_STATUS:
2852 if (*pLen < Limit - Index) {
2853
2854 *pLen = Limit - Index;
2855 return (SK_PNMI_ERR_TOO_SHORT);
2856 }
2857 break;
2858
2859 case OID_SKGE_SENSOR_WAR_CTS:
2860 case OID_SKGE_SENSOR_WAR_TIME:
2861 case OID_SKGE_SENSOR_ERR_CTS:
2862 case OID_SKGE_SENSOR_ERR_TIME:
2863 if (*pLen < (Limit - Index) * sizeof(SK_U64)) {
2864
2865 *pLen = (Limit - Index) * sizeof(SK_U64);
2866 return (SK_PNMI_ERR_TOO_SHORT);
2867 }
2868 break;
2869
2870 default:
2871 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR012,
2872 SK_PNMI_ERR012MSG);
2873
2874 *pLen = 0;
2875 return (SK_PNMI_ERR_GENERAL);
2876
2877 }
2878
2879 /*
2880 * Get value
2881 */
2882 for (Offset = 0; Index < Limit; Index ++) {
2883
2884 switch (Id) {
2885
2886 case OID_SKGE_SENSOR_INDEX:
2887 *(pBuf + Offset) = (char)Index;
2888 Offset += sizeof(char);
2889 break;
2890
2891 case OID_SKGE_SENSOR_DESCR:
2892 Len = SK_STRLEN(pAC->I2c.SenTable[Index].SenDesc);
2893 SK_MEMCPY(pBuf + Offset + 1,
2894 pAC->I2c.SenTable[Index].SenDesc, Len);
2895 *(pBuf + Offset) = (char)Len;
2896 Offset += Len + 1;
2897 break;
2898
2899 case OID_SKGE_SENSOR_TYPE:
2900 *(pBuf + Offset) =
2901 (char)pAC->I2c.SenTable[Index].SenType;
2902 Offset += sizeof(char);
2903 break;
2904
2905 case OID_SKGE_SENSOR_VALUE:
2906 Val32 = (SK_U32)pAC->I2c.SenTable[Index].SenValue;
2907 SK_PNMI_STORE_U32(pBuf + Offset, Val32);
2908 Offset += sizeof(SK_U32);
2909 break;
2910
2911 case OID_SKGE_SENSOR_WAR_THRES_LOW:
2912 Val32 = (SK_U32)pAC->I2c.SenTable[Index].
2913 SenThreWarnLow;
2914 SK_PNMI_STORE_U32(pBuf + Offset, Val32);
2915 Offset += sizeof(SK_U32);
2916 break;
2917
2918 case OID_SKGE_SENSOR_WAR_THRES_UPP:
2919 Val32 = (SK_U32)pAC->I2c.SenTable[Index].
2920 SenThreWarnHigh;
2921 SK_PNMI_STORE_U32(pBuf + Offset, Val32);
2922 Offset += sizeof(SK_U32);
2923 break;
2924
2925 case OID_SKGE_SENSOR_ERR_THRES_LOW:
2926 Val32 = (SK_U32)pAC->I2c.SenTable[Index].
2927 SenThreErrLow;
2928 SK_PNMI_STORE_U32(pBuf + Offset, Val32);
2929 Offset += sizeof(SK_U32);
2930 break;
2931
2932 case OID_SKGE_SENSOR_ERR_THRES_UPP:
2933 Val32 = pAC->I2c.SenTable[Index].SenThreErrHigh;
2934 SK_PNMI_STORE_U32(pBuf + Offset, Val32);
2935 Offset += sizeof(SK_U32);
2936 break;
2937
2938 case OID_SKGE_SENSOR_STATUS:
2939 *(pBuf + Offset) =
2940 (char)pAC->I2c.SenTable[Index].SenErrFlag;
2941 Offset += sizeof(char);
2942 break;
2943
2944 case OID_SKGE_SENSOR_WAR_CTS:
2945 Val64 = pAC->I2c.SenTable[Index].SenWarnCts;
2946 SK_PNMI_STORE_U64(pBuf + Offset, Val64);
2947 Offset += sizeof(SK_U64);
2948 break;
2949
2950 case OID_SKGE_SENSOR_ERR_CTS:
2951 Val64 = pAC->I2c.SenTable[Index].SenErrCts;
2952 SK_PNMI_STORE_U64(pBuf + Offset, Val64);
2953 Offset += sizeof(SK_U64);
2954 break;
2955
2956 case OID_SKGE_SENSOR_WAR_TIME:
2957 Val64 = SK_PNMI_HUNDREDS_SEC(pAC->I2c.SenTable[Index].
2958 SenBegWarnTS);
2959 SK_PNMI_STORE_U64(pBuf + Offset, Val64);
2960 Offset += sizeof(SK_U64);
2961 break;
2962
2963 case OID_SKGE_SENSOR_ERR_TIME:
2964 Val64 = SK_PNMI_HUNDREDS_SEC(pAC->I2c.SenTable[Index].
2965 SenBegErrTS);
2966 SK_PNMI_STORE_U64(pBuf + Offset, Val64);
2967 Offset += sizeof(SK_U64);
2968 break;
2969
2970 default:
2971 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_ERR,
2972 ("SensorStat: Unknown OID should be handled before"));
2973
2974 return (SK_PNMI_ERR_GENERAL);
2975 }
2976 }
2977
2978 /*
2979 * Store used buffer space
2980 */
2981 *pLen = Offset;
2982
2983 return (SK_PNMI_ERR_OK);
2984}
2985
2986/*****************************************************************************
2987 *
2988 * Vpd - OID handler function of OID_SKGE_VPD_XXX
2989 *
2990 * Description:
2991 * Get/preset/set of VPD data. As instance the name of a VPD key
2992 * can be passed. The Instance parameter is a SK_U32 and can be
2993 * used as a string buffer for the VPD key, because their maximum
2994 * length is 4 byte.
2995 *
2996 * Returns:
2997 * SK_PNMI_ERR_OK The request was successfully performed.
2998 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
2999 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
3000 * the correct data (e.g. a 32bit value is
3001 * needed, but a 16 bit value was passed).
3002 * SK_PNMI_ERR_BAD_VALUE The passed value is not in the valid
3003 * value range.
3004 * SK_PNMI_ERR_READ_ONLY The OID is read-only and cannot be set.
3005 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
3006 * exist (e.g. port instance 3 on a two port
3007 * adapter.
3008 */
3009PNMI_STATIC int Vpd(
3010SK_AC *pAC, /* Pointer to adapter context */
3011SK_IOC IoC, /* IO context handle */
3012int Action, /* GET/PRESET/SET action */
3013SK_U32 Id, /* Object ID that is to be processed */
3014char *pBuf, /* Buffer used for the management data transfer */
3015unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
3016SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
3017unsigned int TableIndex, /* Index to the Id table */
3018SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
3019{
3020 SK_VPD_STATUS *pVpdStatus;
3021 unsigned int BufLen;
3022 char Buf[256];
3023 char KeyArr[SK_PNMI_VPD_ENTRIES][SK_PNMI_VPD_KEY_SIZE];
3024 char KeyStr[SK_PNMI_VPD_KEY_SIZE];
3025 unsigned int KeyNo;
3026 unsigned int Offset;
3027 unsigned int Index;
3028 unsigned int FirstIndex;
3029 unsigned int LastIndex;
3030 unsigned int Len;
3031 int Ret;
3032 SK_U32 Val32;
3033
3034 /*
3035 * Get array of all currently stored VPD keys
3036 */
3037 Ret = GetVpdKeyArr(pAC, IoC, &KeyArr[0][0], sizeof(KeyArr), &KeyNo);
3038 if (Ret != SK_PNMI_ERR_OK) {
3039 *pLen = 0;
3040 return (Ret);
3041 }
3042
3043 /*
3044 * If instance is not -1, try to find the requested VPD key for
3045 * the multiple instance variables. The other OIDs as for example
3046 * OID VPD_ACTION are single instance variables and must be
3047 * handled separatly.
3048 */
3049 FirstIndex = 0;
3050 LastIndex = KeyNo;
3051
3052 if ((Instance != (SK_U32)(-1))) {
3053
3054 if (Id == OID_SKGE_VPD_KEY || Id == OID_SKGE_VPD_VALUE ||
3055 Id == OID_SKGE_VPD_ACCESS) {
3056
3057 SK_STRNCPY(KeyStr, (char *)&Instance, 4);
3058 KeyStr[4] = 0;
3059
3060 for (Index = 0; Index < KeyNo; Index ++) {
3061
3062 if (SK_STRCMP(KeyStr, KeyArr[Index]) == 0) {
3063 FirstIndex = Index;
3064 LastIndex = Index+1;
3065 break;
3066 }
3067 }
3068 if (Index == KeyNo) {
3069
3070 *pLen = 0;
3071 return (SK_PNMI_ERR_UNKNOWN_INST);
3072 }
3073 }
3074 else if (Instance != 1) {
3075
3076 *pLen = 0;
3077 return (SK_PNMI_ERR_UNKNOWN_INST);
3078 }
3079 }
3080
3081 /*
3082 * Get value, if a query should be performed
3083 */
3084 if (Action == SK_PNMI_GET) {
3085
3086 switch (Id) {
3087
3088 case OID_SKGE_VPD_FREE_BYTES:
3089 /* Check length of buffer */
3090 if (*pLen < sizeof(SK_U32)) {
3091
3092 *pLen = sizeof(SK_U32);
3093 return (SK_PNMI_ERR_TOO_SHORT);
3094 }
3095 /* Get number of free bytes */
3096 pVpdStatus = VpdStat(pAC, IoC);
3097 if (pVpdStatus == NULL) {
3098
3099 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR017,
3100 SK_PNMI_ERR017MSG);
3101
3102 *pLen = 0;
3103 return (SK_PNMI_ERR_GENERAL);
3104 }
3105 if ((pVpdStatus->vpd_status & VPD_VALID) == 0) {
3106
3107 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR018,
3108 SK_PNMI_ERR018MSG);
3109
3110 *pLen = 0;
3111 return (SK_PNMI_ERR_GENERAL);
3112 }
3113
3114 Val32 = (SK_U32)pVpdStatus->vpd_free_rw;
3115 SK_PNMI_STORE_U32(pBuf, Val32);
3116 *pLen = sizeof(SK_U32);
3117 break;
3118
3119 case OID_SKGE_VPD_ENTRIES_LIST:
3120 /* Check length */
3121 for (Len = 0, Index = 0; Index < KeyNo; Index ++) {
3122
3123 Len += SK_STRLEN(KeyArr[Index]) + 1;
3124 }
3125 if (*pLen < Len) {
3126
3127 *pLen = Len;
3128 return (SK_PNMI_ERR_TOO_SHORT);
3129 }
3130
3131 /* Get value */
3132 *(pBuf) = (char)Len - 1;
3133 for (Offset = 1, Index = 0; Index < KeyNo; Index ++) {
3134
3135 Len = SK_STRLEN(KeyArr[Index]);
3136 SK_MEMCPY(pBuf + Offset, KeyArr[Index], Len);
3137
3138 Offset += Len;
3139
3140 if (Index < KeyNo - 1) {
3141
3142 *(pBuf + Offset) = ' ';
3143 Offset ++;
3144 }
3145 }
3146 *pLen = Offset;
3147 break;
3148
3149 case OID_SKGE_VPD_ENTRIES_NUMBER:
3150 /* Check length */
3151 if (*pLen < sizeof(SK_U32)) {
3152
3153 *pLen = sizeof(SK_U32);
3154 return (SK_PNMI_ERR_TOO_SHORT);
3155 }
3156
3157 Val32 = (SK_U32)KeyNo;
3158 SK_PNMI_STORE_U32(pBuf, Val32);
3159 *pLen = sizeof(SK_U32);
3160 break;
3161
3162 case OID_SKGE_VPD_KEY:
3163 /* Check buffer length, if it is large enough */
3164 for (Len = 0, Index = FirstIndex;
3165 Index < LastIndex; Index ++) {
3166
3167 Len += SK_STRLEN(KeyArr[Index]) + 1;
3168 }
3169 if (*pLen < Len) {
3170
3171 *pLen = Len;
3172 return (SK_PNMI_ERR_TOO_SHORT);
3173 }
3174
3175 /*
3176 * Get the key to an intermediate buffer, because
3177 * we have to prepend a length byte.
3178 */
3179 for (Offset = 0, Index = FirstIndex;
3180 Index < LastIndex; Index ++) {
3181
3182 Len = SK_STRLEN(KeyArr[Index]);
3183
3184 *(pBuf + Offset) = (char)Len;
3185 SK_MEMCPY(pBuf + Offset + 1, KeyArr[Index],
3186 Len);
3187 Offset += Len + 1;
3188 }
3189 *pLen = Offset;
3190 break;
3191
3192 case OID_SKGE_VPD_VALUE:
3193 /* Check the buffer length if it is large enough */
3194 for (Offset = 0, Index = FirstIndex;
3195 Index < LastIndex; Index ++) {
3196
3197 BufLen = 256;
3198 if (VpdRead(pAC, IoC, KeyArr[Index], Buf,
3199 (int *)&BufLen) > 0 ||
3200 BufLen >= SK_PNMI_VPD_DATALEN) {
3201
3202 SK_ERR_LOG(pAC, SK_ERRCL_SW,
3203 SK_PNMI_ERR021,
3204 SK_PNMI_ERR021MSG);
3205
3206 return (SK_PNMI_ERR_GENERAL);
3207 }
3208 Offset += BufLen + 1;
3209 }
3210 if (*pLen < Offset) {
3211
3212 *pLen = Offset;
3213 return (SK_PNMI_ERR_TOO_SHORT);
3214 }
3215
3216 /*
3217 * Get the value to an intermediate buffer, because
3218 * we have to prepend a length byte.
3219 */
3220 for (Offset = 0, Index = FirstIndex;
3221 Index < LastIndex; Index ++) {
3222
3223 BufLen = 256;
3224 if (VpdRead(pAC, IoC, KeyArr[Index], Buf,
3225 (int *)&BufLen) > 0 ||
3226 BufLen >= SK_PNMI_VPD_DATALEN) {
3227
3228 SK_ERR_LOG(pAC, SK_ERRCL_SW,
3229 SK_PNMI_ERR022,
3230 SK_PNMI_ERR022MSG);
3231
3232 *pLen = 0;
3233 return (SK_PNMI_ERR_GENERAL);
3234 }
3235
3236 *(pBuf + Offset) = (char)BufLen;
3237 SK_MEMCPY(pBuf + Offset + 1, Buf, BufLen);
3238 Offset += BufLen + 1;
3239 }
3240 *pLen = Offset;
3241 break;
3242
3243 case OID_SKGE_VPD_ACCESS:
3244 if (*pLen < LastIndex - FirstIndex) {
3245
3246 *pLen = LastIndex - FirstIndex;
3247 return (SK_PNMI_ERR_TOO_SHORT);
3248 }
3249
3250 for (Offset = 0, Index = FirstIndex;
3251 Index < LastIndex; Index ++) {
3252
3253 if (VpdMayWrite(KeyArr[Index])) {
3254
3255 *(pBuf + Offset) = SK_PNMI_VPD_RW;
3256 }
3257 else {
3258 *(pBuf + Offset) = SK_PNMI_VPD_RO;
3259 }
3260 Offset ++;
3261 }
3262 *pLen = Offset;
3263 break;
3264
3265 case OID_SKGE_VPD_ACTION:
3266 Offset = LastIndex - FirstIndex;
3267 if (*pLen < Offset) {
3268
3269 *pLen = Offset;
3270 return (SK_PNMI_ERR_TOO_SHORT);
3271 }
3272 SK_MEMSET(pBuf, 0, Offset);
3273 *pLen = Offset;
3274 break;
3275
3276 default:
3277 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR023,
3278 SK_PNMI_ERR023MSG);
3279
3280 *pLen = 0;
3281 return (SK_PNMI_ERR_GENERAL);
3282 }
3283 }
3284 else {
3285 /* The only OID which can be set is VPD_ACTION */
3286 if (Id != OID_SKGE_VPD_ACTION) {
3287
3288 if (Id == OID_SKGE_VPD_FREE_BYTES ||
3289 Id == OID_SKGE_VPD_ENTRIES_LIST ||
3290 Id == OID_SKGE_VPD_ENTRIES_NUMBER ||
3291 Id == OID_SKGE_VPD_KEY ||
3292 Id == OID_SKGE_VPD_VALUE ||
3293 Id == OID_SKGE_VPD_ACCESS) {
3294
3295 *pLen = 0;
3296 return (SK_PNMI_ERR_READ_ONLY);
3297 }
3298
3299 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR024,
3300 SK_PNMI_ERR024MSG);
3301
3302 *pLen = 0;
3303 return (SK_PNMI_ERR_GENERAL);
3304 }
3305
3306 /*
3307 * From this point we handle VPD_ACTION. Check the buffer
3308 * length. It should at least have the size of one byte.
3309 */
3310 if (*pLen < 1) {
3311
3312 *pLen = 1;
3313 return (SK_PNMI_ERR_TOO_SHORT);
3314 }
3315
3316 /*
3317 * The first byte contains the VPD action type we should
3318 * perform.
3319 */
3320 switch (*pBuf) {
3321
3322 case SK_PNMI_VPD_IGNORE:
3323 /* Nothing to do */
3324 break;
3325
3326 case SK_PNMI_VPD_CREATE:
3327 /*
3328 * We have to create a new VPD entry or we modify
3329 * an existing one. Check first the buffer length.
3330 */
3331 if (*pLen < 4) {
3332
3333 *pLen = 4;
3334 return (SK_PNMI_ERR_TOO_SHORT);
3335 }
3336 KeyStr[0] = pBuf[1];
3337 KeyStr[1] = pBuf[2];
3338 KeyStr[2] = 0;
3339
3340 /*
3341 * Is the entry writable or does it belong to the
3342 * read-only area?
3343 */
3344 if (!VpdMayWrite(KeyStr)) {
3345
3346 *pLen = 0;
3347 return (SK_PNMI_ERR_BAD_VALUE);
3348 }
3349
3350 Offset = (int)pBuf[3] & 0xFF;
3351
3352 SK_MEMCPY(Buf, pBuf + 4, Offset);
3353 Buf[Offset] = 0;
3354
3355 /* A preset ends here */
3356 if (Action == SK_PNMI_PRESET) {
3357
3358 return (SK_PNMI_ERR_OK);
3359 }
3360
3361 /* Write the new entry or modify an existing one */
3362 Ret = VpdWrite(pAC, IoC, KeyStr, Buf);
3363 if (Ret == SK_PNMI_VPD_NOWRITE ) {
3364
3365 *pLen = 0;
3366 return (SK_PNMI_ERR_BAD_VALUE);
3367 }
3368 else if (Ret != SK_PNMI_VPD_OK) {
3369
3370 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR025,
3371 SK_PNMI_ERR025MSG);
3372
3373 *pLen = 0;
3374 return (SK_PNMI_ERR_GENERAL);
3375 }
3376
3377 /*
3378 * Perform an update of the VPD data. This is
3379 * not mandantory, but just to be sure.
3380 */
3381 Ret = VpdUpdate(pAC, IoC);
3382 if (Ret != SK_PNMI_VPD_OK) {
3383
3384 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR026,
3385 SK_PNMI_ERR026MSG);
3386
3387 *pLen = 0;
3388 return (SK_PNMI_ERR_GENERAL);
3389 }
3390 break;
3391
3392 case SK_PNMI_VPD_DELETE:
3393 /* Check if the buffer size is plausible */
3394 if (*pLen < 3) {
3395
3396 *pLen = 3;
3397 return (SK_PNMI_ERR_TOO_SHORT);
3398 }
3399 if (*pLen > 3) {
3400
3401 *pLen = 0;
3402 return (SK_PNMI_ERR_BAD_VALUE);
3403 }
3404 KeyStr[0] = pBuf[1];
3405 KeyStr[1] = pBuf[2];
3406 KeyStr[2] = 0;
3407
3408 /* Find the passed key in the array */
3409 for (Index = 0; Index < KeyNo; Index ++) {
3410
3411 if (SK_STRCMP(KeyStr, KeyArr[Index]) == 0) {
3412
3413 break;
3414 }
3415 }
3416 /*
3417 * If we cannot find the key it is wrong, so we
3418 * return an appropriate error value.
3419 */
3420 if (Index == KeyNo) {
3421
3422 *pLen = 0;
3423 return (SK_PNMI_ERR_BAD_VALUE);
3424 }
3425
3426 if (Action == SK_PNMI_PRESET) {
3427
3428 return (SK_PNMI_ERR_OK);
3429 }
3430
3431 /* Ok, you wanted it and you will get it */
3432 Ret = VpdDelete(pAC, IoC, KeyStr);
3433 if (Ret != SK_PNMI_VPD_OK) {
3434
3435 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR027,
3436 SK_PNMI_ERR027MSG);
3437
3438 *pLen = 0;
3439 return (SK_PNMI_ERR_GENERAL);
3440 }
3441
3442 /*
3443 * Perform an update of the VPD data. This is
3444 * not mandantory, but just to be sure.
3445 */
3446 Ret = VpdUpdate(pAC, IoC);
3447 if (Ret != SK_PNMI_VPD_OK) {
3448
3449 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR028,
3450 SK_PNMI_ERR028MSG);
3451
3452 *pLen = 0;
3453 return (SK_PNMI_ERR_GENERAL);
3454 }
3455 break;
3456
3457 default:
3458 *pLen = 0;
3459 return (SK_PNMI_ERR_BAD_VALUE);
3460 }
3461 }
3462
3463 return (SK_PNMI_ERR_OK);
3464}
3465
3466/*****************************************************************************
3467 *
3468 * General - OID handler function of various single instance OIDs
3469 *
3470 * Description:
3471 * The code is simple. No description necessary.
3472 *
3473 * Returns:
3474 * SK_PNMI_ERR_OK The request was successfully performed.
3475 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
3476 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
3477 * the correct data (e.g. a 32bit value is
3478 * needed, but a 16 bit value was passed).
3479 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
3480 * exist (e.g. port instance 3 on a two port
3481 * adapter.
3482 */
3483PNMI_STATIC int General(
3484SK_AC *pAC, /* Pointer to adapter context */
3485SK_IOC IoC, /* IO context handle */
3486int Action, /* GET/PRESET/SET action */
3487SK_U32 Id, /* Object ID that is to be processed */
3488char *pBuf, /* Buffer used for the management data transfer */
3489unsigned int *pLen, /* On call: buffer length. On return: used buffer */
3490SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
3491unsigned int TableIndex, /* Index to the Id table */
3492SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
3493{
3494 int Ret;
3495 unsigned int Index;
3496 unsigned int Len;
3497 unsigned int Offset;
3498 unsigned int Val;
3499 SK_U8 Val8;
3500 SK_U16 Val16;
3501 SK_U32 Val32;
3502 SK_U64 Val64;
3503 SK_U64 Val64RxHwErrs = 0;
3504 SK_U64 Val64TxHwErrs = 0;
3505 SK_BOOL Is64BitReq = SK_FALSE;
3506 char Buf[256];
3507 int MacType;
3508
3509 /*
3510 * Check instance. We only handle single instance variables.
3511 */
3512 if (Instance != (SK_U32)(-1) && Instance != 1) {
3513
3514 *pLen = 0;
3515 return (SK_PNMI_ERR_UNKNOWN_INST);
3516 }
3517
3518 /*
3519 * Check action. We only allow get requests.
3520 */
3521 if (Action != SK_PNMI_GET) {
3522
3523 *pLen = 0;
3524 return (SK_PNMI_ERR_READ_ONLY);
3525 }
3526
3527 MacType = pAC->GIni.GIMacType;
3528
3529 /*
3530 * Check length for the various supported OIDs
3531 */
3532 switch (Id) {
3533
3534 case OID_GEN_XMIT_ERROR:
3535 case OID_GEN_RCV_ERROR:
3536 case OID_GEN_RCV_NO_BUFFER:
3537#ifndef SK_NDIS_64BIT_CTR
3538 if (*pLen < sizeof(SK_U32)) {
3539 *pLen = sizeof(SK_U32);
3540 return (SK_PNMI_ERR_TOO_SHORT);
3541 }
3542
3543#else /* SK_NDIS_64BIT_CTR */
3544
3545 /*
3546 * for compatibility, at least 32bit are required for oid
3547 */
3548 if (*pLen < sizeof(SK_U32)) {
3549 /*
3550 * but indicate handling for 64bit values,
3551 * if insufficient space is provided
3552 */
3553 *pLen = sizeof(SK_U64);
3554 return (SK_PNMI_ERR_TOO_SHORT);
3555 }
3556
3557 Is64BitReq = (*pLen < sizeof(SK_U64)) ? SK_FALSE : SK_TRUE;
3558#endif /* SK_NDIS_64BIT_CTR */
3559 break;
3560
3561 case OID_SKGE_PORT_NUMBER:
3562 case OID_SKGE_DEVICE_TYPE:
3563 case OID_SKGE_RESULT:
3564 case OID_SKGE_RLMT_MONITOR_NUMBER:
3565 case OID_GEN_TRANSMIT_QUEUE_LENGTH:
3566 case OID_SKGE_TRAP_NUMBER:
3567 case OID_SKGE_MDB_VERSION:
3568 case OID_SKGE_BOARDLEVEL:
3569 case OID_SKGE_CHIPID:
3570 case OID_SKGE_RAMSIZE:
3571 if (*pLen < sizeof(SK_U32)) {
3572
3573 *pLen = sizeof(SK_U32);
3574 return (SK_PNMI_ERR_TOO_SHORT);
3575 }
3576 break;
3577
3578 case OID_SKGE_CHIPSET:
3579 if (*pLen < sizeof(SK_U16)) {
3580
3581 *pLen = sizeof(SK_U16);
3582 return (SK_PNMI_ERR_TOO_SHORT);
3583 }
3584 break;
3585
3586 case OID_SKGE_BUS_TYPE:
3587 case OID_SKGE_BUS_SPEED:
3588 case OID_SKGE_BUS_WIDTH:
3589 case OID_SKGE_SENSOR_NUMBER:
3590 case OID_SKGE_CHKSM_NUMBER:
3591 case OID_SKGE_VAUXAVAIL:
3592 if (*pLen < sizeof(SK_U8)) {
3593
3594 *pLen = sizeof(SK_U8);
3595 return (SK_PNMI_ERR_TOO_SHORT);
3596 }
3597 break;
3598
3599 case OID_SKGE_TX_SW_QUEUE_LEN:
3600 case OID_SKGE_TX_SW_QUEUE_MAX:
3601 case OID_SKGE_TX_RETRY:
3602 case OID_SKGE_RX_INTR_CTS:
3603 case OID_SKGE_TX_INTR_CTS:
3604 case OID_SKGE_RX_NO_BUF_CTS:
3605 case OID_SKGE_TX_NO_BUF_CTS:
3606 case OID_SKGE_TX_USED_DESCR_NO:
3607 case OID_SKGE_RX_DELIVERED_CTS:
3608 case OID_SKGE_RX_OCTETS_DELIV_CTS:
3609 case OID_SKGE_RX_HW_ERROR_CTS:
3610 case OID_SKGE_TX_HW_ERROR_CTS:
3611 case OID_SKGE_IN_ERRORS_CTS:
3612 case OID_SKGE_OUT_ERROR_CTS:
3613 case OID_SKGE_ERR_RECOVERY_CTS:
3614 case OID_SKGE_SYSUPTIME:
3615 if (*pLen < sizeof(SK_U64)) {
3616
3617 *pLen = sizeof(SK_U64);
3618 return (SK_PNMI_ERR_TOO_SHORT);
3619 }
3620 break;
3621
3622 default:
3623 /* Checked later */
3624 break;
3625 }
3626
3627 /* Update statistic */
3628 if (Id == OID_SKGE_RX_HW_ERROR_CTS ||
3629 Id == OID_SKGE_TX_HW_ERROR_CTS ||
3630 Id == OID_SKGE_IN_ERRORS_CTS ||
3631 Id == OID_SKGE_OUT_ERROR_CTS ||
3632 Id == OID_GEN_XMIT_ERROR ||
3633 Id == OID_GEN_RCV_ERROR) {
3634
3635 /* Force the XMAC to update its statistic counters and
3636 * Increment semaphore to indicate that an update was
3637 * already done.
3638 */
3639 Ret = MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1);
3640 if (Ret != SK_PNMI_ERR_OK) {
3641
3642 *pLen = 0;
3643 return (Ret);
3644 }
3645 pAC->Pnmi.MacUpdatedFlag ++;
3646
3647 /*
3648 * Some OIDs consist of multiple hardware counters. Those
3649 * values which are contained in all of them will be added
3650 * now.
3651 */
3652 switch (Id) {
3653
3654 case OID_SKGE_RX_HW_ERROR_CTS:
3655 case OID_SKGE_IN_ERRORS_CTS:
3656 case OID_GEN_RCV_ERROR:
3657 Val64RxHwErrs =
3658 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_MISSED, NetIndex) +
3659 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FRAMING, NetIndex) +
3660 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_OVERFLOW, NetIndex) +
3661 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_JABBER, NetIndex) +
3662 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CARRIER, NetIndex) +
3663 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_IRLENGTH, NetIndex) +
3664 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_SYMBOL, NetIndex) +
3665 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_SHORTS, NetIndex) +
3666 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_RUNT, NetIndex) +
3667 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_TOO_LONG, NetIndex) +
3668 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FCS, NetIndex) +
3669 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CEXT, NetIndex);
3670 break;
3671
3672 case OID_SKGE_TX_HW_ERROR_CTS:
3673 case OID_SKGE_OUT_ERROR_CTS:
3674 case OID_GEN_XMIT_ERROR:
3675 Val64TxHwErrs =
3676 GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_EXCESS_COL, NetIndex) +
3677 GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_LATE_COL, NetIndex) +
3678 GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_UNDERRUN, NetIndex) +
3679 GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_CARRIER, NetIndex);
3680 break;
3681 }
3682 }
3683
3684 /*
3685 * Retrieve value
3686 */
3687 switch (Id) {
3688
3689 case OID_SKGE_SUPPORTED_LIST:
3690 Len = ID_TABLE_SIZE * sizeof(SK_U32);
3691 if (*pLen < Len) {
3692
3693 *pLen = Len;
3694 return (SK_PNMI_ERR_TOO_SHORT);
3695 }
3696 for (Offset = 0, Index = 0; Offset < Len;
3697 Offset += sizeof(SK_U32), Index ++) {
3698
3699 Val32 = (SK_U32)IdTable[Index].Id;
3700 SK_PNMI_STORE_U32(pBuf + Offset, Val32);
3701 }
3702 *pLen = Len;
3703 break;
3704
3705 case OID_SKGE_BOARDLEVEL:
3706 Val32 = (SK_U32)pAC->GIni.GILevel;
3707 SK_PNMI_STORE_U32(pBuf, Val32);
3708 *pLen = sizeof(SK_U32);
3709 break;
3710
3711 case OID_SKGE_PORT_NUMBER:
3712 Val32 = (SK_U32)pAC->GIni.GIMacsFound;
3713 SK_PNMI_STORE_U32(pBuf, Val32);
3714 *pLen = sizeof(SK_U32);
3715 break;
3716
3717 case OID_SKGE_DEVICE_TYPE:
3718 Val32 = (SK_U32)pAC->Pnmi.DeviceType;
3719 SK_PNMI_STORE_U32(pBuf, Val32);
3720 *pLen = sizeof(SK_U32);
3721 break;
3722
3723 case OID_SKGE_DRIVER_DESCR:
3724 if (pAC->Pnmi.pDriverDescription == NULL) {
3725
3726 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR007,
3727 SK_PNMI_ERR007MSG);
3728
3729 *pLen = 0;
3730 return (SK_PNMI_ERR_GENERAL);
3731 }
3732
3733 Len = SK_STRLEN(pAC->Pnmi.pDriverDescription) + 1;
3734 if (Len > SK_PNMI_STRINGLEN1) {
3735
3736 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR029,
3737 SK_PNMI_ERR029MSG);
3738
3739 *pLen = 0;
3740 return (SK_PNMI_ERR_GENERAL);
3741 }
3742
3743 if (*pLen < Len) {
3744
3745 *pLen = Len;
3746 return (SK_PNMI_ERR_TOO_SHORT);
3747 }
3748 *pBuf = (char)(Len - 1);
3749 SK_MEMCPY(pBuf + 1, pAC->Pnmi.pDriverDescription, Len - 1);
3750 *pLen = Len;
3751 break;
3752
3753 case OID_SKGE_DRIVER_VERSION:
3754 if (pAC->Pnmi.pDriverVersion == NULL) {
3755
3756 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR030,
3757 SK_PNMI_ERR030MSG);
3758
3759 *pLen = 0;
3760 return (SK_PNMI_ERR_GENERAL);
3761 }
3762
3763 Len = SK_STRLEN(pAC->Pnmi.pDriverVersion) + 1;
3764 if (Len > SK_PNMI_STRINGLEN1) {
3765
3766 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR031,
3767 SK_PNMI_ERR031MSG);
3768
3769 *pLen = 0;
3770 return (SK_PNMI_ERR_GENERAL);
3771 }
3772
3773 if (*pLen < Len) {
3774
3775 *pLen = Len;
3776 return (SK_PNMI_ERR_TOO_SHORT);
3777 }
3778 *pBuf = (char)(Len - 1);
3779 SK_MEMCPY(pBuf + 1, pAC->Pnmi.pDriverVersion, Len - 1);
3780 *pLen = Len;
3781 break;
3782
3783 case OID_SKGE_DRIVER_RELDATE:
3784 if (pAC->Pnmi.pDriverReleaseDate == NULL) {
3785
3786 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR030,
3787 SK_PNMI_ERR053MSG);
3788
3789 *pLen = 0;
3790 return (SK_PNMI_ERR_GENERAL);
3791 }
3792
3793 Len = SK_STRLEN(pAC->Pnmi.pDriverReleaseDate) + 1;
3794 if (Len > SK_PNMI_STRINGLEN1) {
3795
3796 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR031,
3797 SK_PNMI_ERR054MSG);
3798
3799 *pLen = 0;
3800 return (SK_PNMI_ERR_GENERAL);
3801 }
3802
3803 if (*pLen < Len) {
3804
3805 *pLen = Len;
3806 return (SK_PNMI_ERR_TOO_SHORT);
3807 }
3808 *pBuf = (char)(Len - 1);
3809 SK_MEMCPY(pBuf + 1, pAC->Pnmi.pDriverReleaseDate, Len - 1);
3810 *pLen = Len;
3811 break;
3812
3813 case OID_SKGE_DRIVER_FILENAME:
3814 if (pAC->Pnmi.pDriverFileName == NULL) {
3815
3816 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR030,
3817 SK_PNMI_ERR055MSG);
3818
3819 *pLen = 0;
3820 return (SK_PNMI_ERR_GENERAL);
3821 }
3822
3823 Len = SK_STRLEN(pAC->Pnmi.pDriverFileName) + 1;
3824 if (Len > SK_PNMI_STRINGLEN1) {
3825
3826 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR031,
3827 SK_PNMI_ERR056MSG);
3828
3829 *pLen = 0;
3830 return (SK_PNMI_ERR_GENERAL);
3831 }
3832
3833 if (*pLen < Len) {
3834
3835 *pLen = Len;
3836 return (SK_PNMI_ERR_TOO_SHORT);
3837 }
3838 *pBuf = (char)(Len - 1);
3839 SK_MEMCPY(pBuf + 1, pAC->Pnmi.pDriverFileName, Len - 1);
3840 *pLen = Len;
3841 break;
3842
3843 case OID_SKGE_HW_DESCR:
3844 /*
3845 * The hardware description is located in the VPD. This
3846 * query may move to the initialisation routine. But
3847 * the VPD data is cached and therefore a call here
3848 * will not make much difference.
3849 */
3850 Len = 256;
3851 if (VpdRead(pAC, IoC, VPD_NAME, Buf, (int *)&Len) > 0) {
3852
3853 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR032,
3854 SK_PNMI_ERR032MSG);
3855
3856 *pLen = 0;
3857 return (SK_PNMI_ERR_GENERAL);
3858 }
3859 Len ++;
3860 if (Len > SK_PNMI_STRINGLEN1) {
3861
3862 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR033,
3863 SK_PNMI_ERR033MSG);
3864
3865 *pLen = 0;
3866 return (SK_PNMI_ERR_GENERAL);
3867 }
3868 if (*pLen < Len) {
3869
3870 *pLen = Len;
3871 return (SK_PNMI_ERR_TOO_SHORT);
3872 }
3873 *pBuf = (char)(Len - 1);
3874 SK_MEMCPY(pBuf + 1, Buf, Len - 1);
3875 *pLen = Len;
3876 break;
3877
3878 case OID_SKGE_HW_VERSION:
3879 /* Oh, I love to do some string manipulation */
3880 if (*pLen < 5) {
3881
3882 *pLen = 5;
3883 return (SK_PNMI_ERR_TOO_SHORT);
3884 }
3885 Val8 = (SK_U8)pAC->GIni.GIPciHwRev;
3886 pBuf[0] = 4;
3887 pBuf[1] = 'v';
3888 pBuf[2] = (char)(0x30 | ((Val8 >> 4) & 0x0F));
3889 pBuf[3] = '.';
3890 pBuf[4] = (char)(0x30 | (Val8 & 0x0F));
3891 *pLen = 5;
3892 break;
3893
3894 case OID_SKGE_CHIPSET:
3895 Val16 = pAC->Pnmi.Chipset;
3896 SK_PNMI_STORE_U16(pBuf, Val16);
3897 *pLen = sizeof(SK_U16);
3898 break;
3899
3900 case OID_SKGE_CHIPID:
3901 Val32 = pAC->GIni.GIChipId;
3902 SK_PNMI_STORE_U32(pBuf, Val32);
3903 *pLen = sizeof(SK_U32);
3904 break;
3905
3906 case OID_SKGE_RAMSIZE:
3907 Val32 = pAC->GIni.GIRamSize;
3908 SK_PNMI_STORE_U32(pBuf, Val32);
3909 *pLen = sizeof(SK_U32);
3910 break;
3911
3912 case OID_SKGE_VAUXAVAIL:
3913 *pBuf = (char) pAC->GIni.GIVauxAvail;
3914 *pLen = sizeof(char);
3915 break;
3916
3917 case OID_SKGE_BUS_TYPE:
3918 *pBuf = (char) SK_PNMI_BUS_PCI;
3919 *pLen = sizeof(char);
3920 break;
3921
3922 case OID_SKGE_BUS_SPEED:
3923 *pBuf = pAC->Pnmi.PciBusSpeed;
3924 *pLen = sizeof(char);
3925 break;
3926
3927 case OID_SKGE_BUS_WIDTH:
3928 *pBuf = pAC->Pnmi.PciBusWidth;
3929 *pLen = sizeof(char);
3930 break;
3931
3932 case OID_SKGE_RESULT:
3933 Val32 = pAC->Pnmi.TestResult;
3934 SK_PNMI_STORE_U32(pBuf, Val32);
3935 *pLen = sizeof(SK_U32);
3936 break;
3937
3938 case OID_SKGE_SENSOR_NUMBER:
3939 *pBuf = (char)pAC->I2c.MaxSens;
3940 *pLen = sizeof(char);
3941 break;
3942
3943 case OID_SKGE_CHKSM_NUMBER:
3944 *pBuf = SKCS_NUM_PROTOCOLS;
3945 *pLen = sizeof(char);
3946 break;
3947
3948 case OID_SKGE_TRAP_NUMBER:
3949 GetTrapQueueLen(pAC, &Len, &Val);
3950 Val32 = (SK_U32)Val;
3951 SK_PNMI_STORE_U32(pBuf, Val32);
3952 *pLen = sizeof(SK_U32);
3953 break;
3954
3955 case OID_SKGE_TRAP:
3956 GetTrapQueueLen(pAC, &Len, &Val);
3957 if (*pLen < Len) {
3958
3959 *pLen = Len;
3960 return (SK_PNMI_ERR_TOO_SHORT);
3961 }
3962 CopyTrapQueue(pAC, pBuf);
3963 *pLen = Len;
3964 break;
3965
3966 case OID_SKGE_RLMT_MONITOR_NUMBER:
3967/* XXX Not yet implemented by RLMT therefore we return zero elements */
3968 Val32 = 0;
3969 SK_PNMI_STORE_U32(pBuf, Val32);
3970 *pLen = sizeof(SK_U32);
3971 break;
3972
3973 case OID_SKGE_TX_SW_QUEUE_LEN:
3974 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
3975 if (MacType == SK_MAC_XMAC) {
3976 /* Dual net mode */
3977 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
3978 Val64 = pAC->Pnmi.BufPort[NetIndex].TxSwQueueLen;
3979 }
3980 /* Single net mode */
3981 else {
3982 Val64 = pAC->Pnmi.BufPort[0].TxSwQueueLen +
3983 pAC->Pnmi.BufPort[1].TxSwQueueLen;
3984 }
3985 }
3986 else {
3987 /* Dual net mode */
3988 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
3989 Val64 = pAC->Pnmi.Port[NetIndex].TxSwQueueLen;
3990 }
3991 /* Single net mode */
3992 else {
3993 Val64 = pAC->Pnmi.Port[0].TxSwQueueLen +
3994 pAC->Pnmi.Port[1].TxSwQueueLen;
3995 }
3996 }
3997 SK_PNMI_STORE_U64(pBuf, Val64);
3998 *pLen = sizeof(SK_U64);
3999 break;
4000
4001
4002 case OID_SKGE_TX_SW_QUEUE_MAX:
4003 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4004 if (MacType == SK_MAC_XMAC) {
4005 /* Dual net mode */
4006 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4007 Val64 = pAC->Pnmi.BufPort[NetIndex].TxSwQueueMax;
4008 }
4009 /* Single net mode */
4010 else {
4011 Val64 = pAC->Pnmi.BufPort[0].TxSwQueueMax +
4012 pAC->Pnmi.BufPort[1].TxSwQueueMax;
4013 }
4014 }
4015 else {
4016 /* Dual net mode */
4017 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4018 Val64 = pAC->Pnmi.Port[NetIndex].TxSwQueueMax;
4019 }
4020 /* Single net mode */
4021 else {
4022 Val64 = pAC->Pnmi.Port[0].TxSwQueueMax +
4023 pAC->Pnmi.Port[1].TxSwQueueMax;
4024 }
4025 }
4026 SK_PNMI_STORE_U64(pBuf, Val64);
4027 *pLen = sizeof(SK_U64);
4028 break;
4029
4030 case OID_SKGE_TX_RETRY:
4031 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4032 if (MacType == SK_MAC_XMAC) {
4033 /* Dual net mode */
4034 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4035 Val64 = pAC->Pnmi.BufPort[NetIndex].TxRetryCts;
4036 }
4037 /* Single net mode */
4038 else {
4039 Val64 = pAC->Pnmi.BufPort[0].TxRetryCts +
4040 pAC->Pnmi.BufPort[1].TxRetryCts;
4041 }
4042 }
4043 else {
4044 /* Dual net mode */
4045 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4046 Val64 = pAC->Pnmi.Port[NetIndex].TxRetryCts;
4047 }
4048 /* Single net mode */
4049 else {
4050 Val64 = pAC->Pnmi.Port[0].TxRetryCts +
4051 pAC->Pnmi.Port[1].TxRetryCts;
4052 }
4053 }
4054 SK_PNMI_STORE_U64(pBuf, Val64);
4055 *pLen = sizeof(SK_U64);
4056 break;
4057
4058 case OID_SKGE_RX_INTR_CTS:
4059 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4060 if (MacType == SK_MAC_XMAC) {
4061 /* Dual net mode */
4062 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4063 Val64 = pAC->Pnmi.BufPort[NetIndex].RxIntrCts;
4064 }
4065 /* Single net mode */
4066 else {
4067 Val64 = pAC->Pnmi.BufPort[0].RxIntrCts +
4068 pAC->Pnmi.BufPort[1].RxIntrCts;
4069 }
4070 }
4071 else {
4072 /* Dual net mode */
4073 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4074 Val64 = pAC->Pnmi.Port[NetIndex].RxIntrCts;
4075 }
4076 /* Single net mode */
4077 else {
4078 Val64 = pAC->Pnmi.Port[0].RxIntrCts +
4079 pAC->Pnmi.Port[1].RxIntrCts;
4080 }
4081 }
4082 SK_PNMI_STORE_U64(pBuf, Val64);
4083 *pLen = sizeof(SK_U64);
4084 break;
4085
4086 case OID_SKGE_TX_INTR_CTS:
4087 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4088 if (MacType == SK_MAC_XMAC) {
4089 /* Dual net mode */
4090 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4091 Val64 = pAC->Pnmi.BufPort[NetIndex].TxIntrCts;
4092 }
4093 /* Single net mode */
4094 else {
4095 Val64 = pAC->Pnmi.BufPort[0].TxIntrCts +
4096 pAC->Pnmi.BufPort[1].TxIntrCts;
4097 }
4098 }
4099 else {
4100 /* Dual net mode */
4101 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4102 Val64 = pAC->Pnmi.Port[NetIndex].TxIntrCts;
4103 }
4104 /* Single net mode */
4105 else {
4106 Val64 = pAC->Pnmi.Port[0].TxIntrCts +
4107 pAC->Pnmi.Port[1].TxIntrCts;
4108 }
4109 }
4110 SK_PNMI_STORE_U64(pBuf, Val64);
4111 *pLen = sizeof(SK_U64);
4112 break;
4113
4114 case OID_SKGE_RX_NO_BUF_CTS:
4115 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4116 if (MacType == SK_MAC_XMAC) {
4117 /* Dual net mode */
4118 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4119 Val64 = pAC->Pnmi.BufPort[NetIndex].RxNoBufCts;
4120 }
4121 /* Single net mode */
4122 else {
4123 Val64 = pAC->Pnmi.BufPort[0].RxNoBufCts +
4124 pAC->Pnmi.BufPort[1].RxNoBufCts;
4125 }
4126 }
4127 else {
4128 /* Dual net mode */
4129 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4130 Val64 = pAC->Pnmi.Port[NetIndex].RxNoBufCts;
4131 }
4132 /* Single net mode */
4133 else {
4134 Val64 = pAC->Pnmi.Port[0].RxNoBufCts +
4135 pAC->Pnmi.Port[1].RxNoBufCts;
4136 }
4137 }
4138 SK_PNMI_STORE_U64(pBuf, Val64);
4139 *pLen = sizeof(SK_U64);
4140 break;
4141
4142 case OID_SKGE_TX_NO_BUF_CTS:
4143 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4144 if (MacType == SK_MAC_XMAC) {
4145 /* Dual net mode */
4146 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4147 Val64 = pAC->Pnmi.BufPort[NetIndex].TxNoBufCts;
4148 }
4149 /* Single net mode */
4150 else {
4151 Val64 = pAC->Pnmi.BufPort[0].TxNoBufCts +
4152 pAC->Pnmi.BufPort[1].TxNoBufCts;
4153 }
4154 }
4155 else {
4156 /* Dual net mode */
4157 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4158 Val64 = pAC->Pnmi.Port[NetIndex].TxNoBufCts;
4159 }
4160 /* Single net mode */
4161 else {
4162 Val64 = pAC->Pnmi.Port[0].TxNoBufCts +
4163 pAC->Pnmi.Port[1].TxNoBufCts;
4164 }
4165 }
4166 SK_PNMI_STORE_U64(pBuf, Val64);
4167 *pLen = sizeof(SK_U64);
4168 break;
4169
4170 case OID_SKGE_TX_USED_DESCR_NO:
4171 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4172 if (MacType == SK_MAC_XMAC) {
4173 /* Dual net mode */
4174 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4175 Val64 = pAC->Pnmi.BufPort[NetIndex].TxUsedDescrNo;
4176 }
4177 /* Single net mode */
4178 else {
4179 Val64 = pAC->Pnmi.BufPort[0].TxUsedDescrNo +
4180 pAC->Pnmi.BufPort[1].TxUsedDescrNo;
4181 }
4182 }
4183 else {
4184 /* Dual net mode */
4185 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4186 Val64 = pAC->Pnmi.Port[NetIndex].TxUsedDescrNo;
4187 }
4188 /* Single net mode */
4189 else {
4190 Val64 = pAC->Pnmi.Port[0].TxUsedDescrNo +
4191 pAC->Pnmi.Port[1].TxUsedDescrNo;
4192 }
4193 }
4194 SK_PNMI_STORE_U64(pBuf, Val64);
4195 *pLen = sizeof(SK_U64);
4196 break;
4197
4198 case OID_SKGE_RX_DELIVERED_CTS:
4199 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4200 if (MacType == SK_MAC_XMAC) {
4201 /* Dual net mode */
4202 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4203 Val64 = pAC->Pnmi.BufPort[NetIndex].RxDeliveredCts;
4204 }
4205 /* Single net mode */
4206 else {
4207 Val64 = pAC->Pnmi.BufPort[0].RxDeliveredCts +
4208 pAC->Pnmi.BufPort[1].RxDeliveredCts;
4209 }
4210 }
4211 else {
4212 /* Dual net mode */
4213 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4214 Val64 = pAC->Pnmi.Port[NetIndex].RxDeliveredCts;
4215 }
4216 /* Single net mode */
4217 else {
4218 Val64 = pAC->Pnmi.Port[0].RxDeliveredCts +
4219 pAC->Pnmi.Port[1].RxDeliveredCts;
4220 }
4221 }
4222 SK_PNMI_STORE_U64(pBuf, Val64);
4223 *pLen = sizeof(SK_U64);
4224 break;
4225
4226 case OID_SKGE_RX_OCTETS_DELIV_CTS:
4227 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4228 if (MacType == SK_MAC_XMAC) {
4229 /* Dual net mode */
4230 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4231 Val64 = pAC->Pnmi.BufPort[NetIndex].RxOctetsDeliveredCts;
4232 }
4233 /* Single net mode */
4234 else {
4235 Val64 = pAC->Pnmi.BufPort[0].RxOctetsDeliveredCts +
4236 pAC->Pnmi.BufPort[1].RxOctetsDeliveredCts;
4237 }
4238 }
4239 else {
4240 /* Dual net mode */
4241 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4242 Val64 = pAC->Pnmi.Port[NetIndex].RxOctetsDeliveredCts;
4243 }
4244 /* Single net mode */
4245 else {
4246 Val64 = pAC->Pnmi.Port[0].RxOctetsDeliveredCts +
4247 pAC->Pnmi.Port[1].RxOctetsDeliveredCts;
4248 }
4249 }
4250 SK_PNMI_STORE_U64(pBuf, Val64);
4251 *pLen = sizeof(SK_U64);
4252 break;
4253
4254 case OID_SKGE_RX_HW_ERROR_CTS:
4255 SK_PNMI_STORE_U64(pBuf, Val64RxHwErrs);
4256 *pLen = sizeof(SK_U64);
4257 break;
4258
4259 case OID_SKGE_TX_HW_ERROR_CTS:
4260 SK_PNMI_STORE_U64(pBuf, Val64TxHwErrs);
4261 *pLen = sizeof(SK_U64);
4262 break;
4263
4264 case OID_SKGE_IN_ERRORS_CTS:
4265 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4266 if (MacType == SK_MAC_XMAC) {
4267 /* Dual net mode */
4268 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4269 Val64 = Val64RxHwErrs + pAC->Pnmi.BufPort[NetIndex].RxNoBufCts;
4270 }
4271 /* Single net mode */
4272 else {
4273 Val64 = Val64RxHwErrs +
4274 pAC->Pnmi.BufPort[0].RxNoBufCts +
4275 pAC->Pnmi.BufPort[1].RxNoBufCts;
4276 }
4277 }
4278 else {
4279 /* Dual net mode */
4280 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4281 Val64 = Val64RxHwErrs + pAC->Pnmi.Port[NetIndex].RxNoBufCts;
4282 }
4283 /* Single net mode */
4284 else {
4285 Val64 = Val64RxHwErrs +
4286 pAC->Pnmi.Port[0].RxNoBufCts +
4287 pAC->Pnmi.Port[1].RxNoBufCts;
4288 }
4289 }
4290 SK_PNMI_STORE_U64(pBuf, Val64);
4291 *pLen = sizeof(SK_U64);
4292 break;
4293
4294 case OID_SKGE_OUT_ERROR_CTS:
4295 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4296 if (MacType == SK_MAC_XMAC) {
4297 /* Dual net mode */
4298 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4299 Val64 = Val64TxHwErrs + pAC->Pnmi.BufPort[NetIndex].TxNoBufCts;
4300 }
4301 /* Single net mode */
4302 else {
4303 Val64 = Val64TxHwErrs +
4304 pAC->Pnmi.BufPort[0].TxNoBufCts +
4305 pAC->Pnmi.BufPort[1].TxNoBufCts;
4306 }
4307 }
4308 else {
4309 /* Dual net mode */
4310 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4311 Val64 = Val64TxHwErrs + pAC->Pnmi.Port[NetIndex].TxNoBufCts;
4312 }
4313 /* Single net mode */
4314 else {
4315 Val64 = Val64TxHwErrs +
4316 pAC->Pnmi.Port[0].TxNoBufCts +
4317 pAC->Pnmi.Port[1].TxNoBufCts;
4318 }
4319 }
4320 SK_PNMI_STORE_U64(pBuf, Val64);
4321 *pLen = sizeof(SK_U64);
4322 break;
4323
4324 case OID_SKGE_ERR_RECOVERY_CTS:
4325 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4326 if (MacType == SK_MAC_XMAC) {
4327 /* Dual net mode */
4328 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4329 Val64 = pAC->Pnmi.BufPort[NetIndex].ErrRecoveryCts;
4330 }
4331 /* Single net mode */
4332 else {
4333 Val64 = pAC->Pnmi.BufPort[0].ErrRecoveryCts +
4334 pAC->Pnmi.BufPort[1].ErrRecoveryCts;
4335 }
4336 }
4337 else {
4338 /* Dual net mode */
4339 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4340 Val64 = pAC->Pnmi.Port[NetIndex].ErrRecoveryCts;
4341 }
4342 /* Single net mode */
4343 else {
4344 Val64 = pAC->Pnmi.Port[0].ErrRecoveryCts +
4345 pAC->Pnmi.Port[1].ErrRecoveryCts;
4346 }
4347 }
4348 SK_PNMI_STORE_U64(pBuf, Val64);
4349 *pLen = sizeof(SK_U64);
4350 break;
4351
4352 case OID_SKGE_SYSUPTIME:
4353 Val64 = SK_PNMI_HUNDREDS_SEC(SkOsGetTime(pAC));
4354 Val64 -= pAC->Pnmi.StartUpTime;
4355 SK_PNMI_STORE_U64(pBuf, Val64);
4356 *pLen = sizeof(SK_U64);
4357 break;
4358
4359 case OID_SKGE_MDB_VERSION:
4360 Val32 = SK_PNMI_MDB_VERSION;
4361 SK_PNMI_STORE_U32(pBuf, Val32);
4362 *pLen = sizeof(SK_U32);
4363 break;
4364
4365 case OID_GEN_RCV_ERROR:
4366 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4367 if (MacType == SK_MAC_XMAC) {
4368 Val64 = Val64RxHwErrs + pAC->Pnmi.BufPort[NetIndex].RxNoBufCts;
4369 }
4370 else {
4371 Val64 = Val64RxHwErrs + pAC->Pnmi.Port[NetIndex].RxNoBufCts;
4372 }
4373
4374 /*
4375 * by default 32bit values are evaluated
4376 */
4377 if (!Is64BitReq) {
4378 Val32 = (SK_U32)Val64;
4379 SK_PNMI_STORE_U32(pBuf, Val32);
4380 *pLen = sizeof(SK_U32);
4381 }
4382 else {
4383 SK_PNMI_STORE_U64(pBuf, Val64);
4384 *pLen = sizeof(SK_U64);
4385 }
4386 break;
4387
4388 case OID_GEN_XMIT_ERROR:
4389 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4390 if (MacType == SK_MAC_XMAC) {
4391 Val64 = Val64TxHwErrs + pAC->Pnmi.BufPort[NetIndex].TxNoBufCts;
4392 }
4393 else {
4394 Val64 = Val64TxHwErrs + pAC->Pnmi.Port[NetIndex].TxNoBufCts;
4395 }
4396
4397 /*
4398 * by default 32bit values are evaluated
4399 */
4400 if (!Is64BitReq) {
4401 Val32 = (SK_U32)Val64;
4402 SK_PNMI_STORE_U32(pBuf, Val32);
4403 *pLen = sizeof(SK_U32);
4404 }
4405 else {
4406 SK_PNMI_STORE_U64(pBuf, Val64);
4407 *pLen = sizeof(SK_U64);
4408 }
4409 break;
4410
4411 case OID_GEN_RCV_NO_BUFFER:
4412 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
4413 if (MacType == SK_MAC_XMAC) {
4414 Val64 = pAC->Pnmi.BufPort[NetIndex].RxNoBufCts;
4415 }
4416 else {
4417 Val64 = pAC->Pnmi.Port[NetIndex].RxNoBufCts;
4418 }
4419
4420 /*
4421 * by default 32bit values are evaluated
4422 */
4423 if (!Is64BitReq) {
4424 Val32 = (SK_U32)Val64;
4425 SK_PNMI_STORE_U32(pBuf, Val32);
4426 *pLen = sizeof(SK_U32);
4427 }
4428 else {
4429 SK_PNMI_STORE_U64(pBuf, Val64);
4430 *pLen = sizeof(SK_U64);
4431 }
4432 break;
4433
4434 case OID_GEN_TRANSMIT_QUEUE_LENGTH:
4435 Val32 = (SK_U32)pAC->Pnmi.Port[NetIndex].TxSwQueueLen;
4436 SK_PNMI_STORE_U32(pBuf, Val32);
4437 *pLen = sizeof(SK_U32);
4438 break;
4439
4440 default:
4441 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR034,
4442 SK_PNMI_ERR034MSG);
4443
4444 *pLen = 0;
4445 return (SK_PNMI_ERR_GENERAL);
4446 }
4447
4448 if (Id == OID_SKGE_RX_HW_ERROR_CTS ||
4449 Id == OID_SKGE_TX_HW_ERROR_CTS ||
4450 Id == OID_SKGE_IN_ERRORS_CTS ||
4451 Id == OID_SKGE_OUT_ERROR_CTS ||
4452 Id == OID_GEN_XMIT_ERROR ||
4453 Id == OID_GEN_RCV_ERROR) {
4454
4455 pAC->Pnmi.MacUpdatedFlag --;
4456 }
4457
4458 return (SK_PNMI_ERR_OK);
4459}
4460
4461/*****************************************************************************
4462 *
4463 * Rlmt - OID handler function of OID_SKGE_RLMT_XXX single instance.
4464 *
4465 * Description:
4466 * Get/Presets/Sets the RLMT OIDs.
4467 *
4468 * Returns:
4469 * SK_PNMI_ERR_OK The request was successfully performed.
4470 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
4471 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
4472 * the correct data (e.g. a 32bit value is
4473 * needed, but a 16 bit value was passed).
4474 * SK_PNMI_ERR_BAD_VALUE The passed value is not in the valid
4475 * value range.
4476 * SK_PNMI_ERR_READ_ONLY The OID is read-only and cannot be set.
4477 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
4478 * exist (e.g. port instance 3 on a two port
4479 * adapter.
4480 */
4481PNMI_STATIC int Rlmt(
4482SK_AC *pAC, /* Pointer to adapter context */
4483SK_IOC IoC, /* IO context handle */
4484int Action, /* GET/PRESET/SET action */
4485SK_U32 Id, /* Object ID that is to be processed */
4486char *pBuf, /* Buffer used for the management data transfer */
4487unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
4488SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
4489unsigned int TableIndex, /* Index to the Id table */
4490SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
4491{
4492 int Ret;
4493 unsigned int PhysPortIndex;
4494 unsigned int PhysPortMax;
4495 SK_EVPARA EventParam;
4496 SK_U32 Val32;
4497 SK_U64 Val64;
4498
4499
4500 /*
4501 * Check instance. Only single instance OIDs are allowed here.
4502 */
4503 if (Instance != (SK_U32)(-1) && Instance != 1) {
4504
4505 *pLen = 0;
4506 return (SK_PNMI_ERR_UNKNOWN_INST);
4507 }
4508
4509 /*
4510 * Perform the requested action.
4511 */
4512 if (Action == SK_PNMI_GET) {
4513
4514 /*
4515 * Check if the buffer length is large enough.
4516 */
4517
4518 switch (Id) {
4519
4520 case OID_SKGE_RLMT_MODE:
4521 case OID_SKGE_RLMT_PORT_ACTIVE:
4522 case OID_SKGE_RLMT_PORT_PREFERRED:
4523 if (*pLen < sizeof(SK_U8)) {
4524
4525 *pLen = sizeof(SK_U8);
4526 return (SK_PNMI_ERR_TOO_SHORT);
4527 }
4528 break;
4529
4530 case OID_SKGE_RLMT_PORT_NUMBER:
4531 if (*pLen < sizeof(SK_U32)) {
4532
4533 *pLen = sizeof(SK_U32);
4534 return (SK_PNMI_ERR_TOO_SHORT);
4535 }
4536 break;
4537
4538 case OID_SKGE_RLMT_CHANGE_CTS:
4539 case OID_SKGE_RLMT_CHANGE_TIME:
4540 case OID_SKGE_RLMT_CHANGE_ESTIM:
4541 case OID_SKGE_RLMT_CHANGE_THRES:
4542 if (*pLen < sizeof(SK_U64)) {
4543
4544 *pLen = sizeof(SK_U64);
4545 return (SK_PNMI_ERR_TOO_SHORT);
4546 }
4547 break;
4548
4549 default:
4550 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR035,
4551 SK_PNMI_ERR035MSG);
4552
4553 *pLen = 0;
4554 return (SK_PNMI_ERR_GENERAL);
4555 }
4556
4557 /*
4558 * Update RLMT statistic and increment semaphores to indicate
4559 * that an update was already done. Maybe RLMT will hold its
4560 * statistic always up to date some time. Then we can
4561 * remove this type of call.
4562 */
4563 if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) {
4564
4565 *pLen = 0;
4566 return (Ret);
4567 }
4568 pAC->Pnmi.RlmtUpdatedFlag ++;
4569
4570 /*
4571 * Retrieve Value
4572 */
4573 switch (Id) {
4574
4575 case OID_SKGE_RLMT_MODE:
4576 *pBuf = (char)pAC->Rlmt.Net[0].RlmtMode;
4577 *pLen = sizeof(char);
4578 break;
4579
4580 case OID_SKGE_RLMT_PORT_NUMBER:
4581 Val32 = (SK_U32)pAC->GIni.GIMacsFound;
4582 SK_PNMI_STORE_U32(pBuf, Val32);
4583 *pLen = sizeof(SK_U32);
4584 break;
4585
4586 case OID_SKGE_RLMT_PORT_ACTIVE:
4587 *pBuf = 0;
4588 /*
4589 * If multiple ports may become active this OID
4590 * doesn't make sense any more. A new variable in
4591 * the port structure should be created. However,
4592 * for this variable the first active port is
4593 * returned.
4594 */
4595 PhysPortMax = pAC->GIni.GIMacsFound;
4596
4597 for (PhysPortIndex = 0; PhysPortIndex < PhysPortMax;
4598 PhysPortIndex ++) {
4599
4600 if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) {
4601
4602 *pBuf = (char)SK_PNMI_PORT_PHYS2LOG(PhysPortIndex);
4603 break;
4604 }
4605 }
4606 *pLen = sizeof(char);
4607 break;
4608
4609 case OID_SKGE_RLMT_PORT_PREFERRED:
4610 *pBuf = (char)SK_PNMI_PORT_PHYS2LOG(pAC->Rlmt.Net[NetIndex].Preference);
4611 *pLen = sizeof(char);
4612 break;
4613
4614 case OID_SKGE_RLMT_CHANGE_CTS:
4615 Val64 = pAC->Pnmi.RlmtChangeCts;
4616 SK_PNMI_STORE_U64(pBuf, Val64);
4617 *pLen = sizeof(SK_U64);
4618 break;
4619
4620 case OID_SKGE_RLMT_CHANGE_TIME:
4621 Val64 = pAC->Pnmi.RlmtChangeTime;
4622 SK_PNMI_STORE_U64(pBuf, Val64);
4623 *pLen = sizeof(SK_U64);
4624 break;
4625
4626 case OID_SKGE_RLMT_CHANGE_ESTIM:
4627 Val64 = pAC->Pnmi.RlmtChangeEstimate.Estimate;
4628 SK_PNMI_STORE_U64(pBuf, Val64);
4629 *pLen = sizeof(SK_U64);
4630 break;
4631
4632 case OID_SKGE_RLMT_CHANGE_THRES:
4633 Val64 = pAC->Pnmi.RlmtChangeThreshold;
4634 SK_PNMI_STORE_U64(pBuf, Val64);
4635 *pLen = sizeof(SK_U64);
4636 break;
4637
4638 default:
4639 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_ERR,
4640 ("Rlmt: Unknown OID should be handled before"));
4641
4642 pAC->Pnmi.RlmtUpdatedFlag --;
4643 *pLen = 0;
4644 return (SK_PNMI_ERR_GENERAL);
4645 }
4646
4647 pAC->Pnmi.RlmtUpdatedFlag --;
4648 }
4649 else {
4650 /* Perform a preset or set */
4651 switch (Id) {
4652
4653 case OID_SKGE_RLMT_MODE:
4654 /* Check if the buffer length is plausible */
4655 if (*pLen < sizeof(char)) {
4656
4657 *pLen = sizeof(char);
4658 return (SK_PNMI_ERR_TOO_SHORT);
4659 }
4660 /* Check if the value range is correct */
4661 if (*pLen != sizeof(char) ||
4662 (*pBuf & SK_PNMI_RLMT_MODE_CHK_LINK) == 0 ||
4663 *(SK_U8 *)pBuf > 15) {
4664
4665 *pLen = 0;
4666 return (SK_PNMI_ERR_BAD_VALUE);
4667 }
4668 /* The preset ends here */
4669 if (Action == SK_PNMI_PRESET) {
4670
4671 *pLen = 0;
4672 return (SK_PNMI_ERR_OK);
4673 }
4674 /* Send an event to RLMT to change the mode */
4675 SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam));
4676 EventParam.Para32[0] |= (SK_U32)(*pBuf);
4677 EventParam.Para32[1] = 0;
4678 if (SkRlmtEvent(pAC, IoC, SK_RLMT_MODE_CHANGE,
4679 EventParam) > 0) {
4680
4681 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR037,
4682 SK_PNMI_ERR037MSG);
4683
4684 *pLen = 0;
4685 return (SK_PNMI_ERR_GENERAL);
4686 }
4687 break;
4688
4689 case OID_SKGE_RLMT_PORT_PREFERRED:
4690 /* Check if the buffer length is plausible */
4691 if (*pLen < sizeof(char)) {
4692
4693 *pLen = sizeof(char);
4694 return (SK_PNMI_ERR_TOO_SHORT);
4695 }
4696 /* Check if the value range is correct */
4697 if (*pLen != sizeof(char) || *(SK_U8 *)pBuf >
4698 (SK_U8)pAC->GIni.GIMacsFound) {
4699
4700 *pLen = 0;
4701 return (SK_PNMI_ERR_BAD_VALUE);
4702 }
4703 /* The preset ends here */
4704 if (Action == SK_PNMI_PRESET) {
4705
4706 *pLen = 0;
4707 return (SK_PNMI_ERR_OK);
4708 }
4709
4710 /*
4711 * Send an event to RLMT change the preferred port.
4712 * A param of -1 means automatic mode. RLMT will
4713 * make the decision which is the preferred port.
4714 */
4715 SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam));
4716 EventParam.Para32[0] = (SK_U32)(*pBuf) - 1;
4717 EventParam.Para32[1] = NetIndex;
4718 if (SkRlmtEvent(pAC, IoC, SK_RLMT_PREFPORT_CHANGE,
4719 EventParam) > 0) {
4720
4721 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR038,
4722 SK_PNMI_ERR038MSG);
4723
4724 *pLen = 0;
4725 return (SK_PNMI_ERR_GENERAL);
4726 }
4727 break;
4728
4729 case OID_SKGE_RLMT_CHANGE_THRES:
4730 /* Check if the buffer length is plausible */
4731 if (*pLen < sizeof(SK_U64)) {
4732
4733 *pLen = sizeof(SK_U64);
4734 return (SK_PNMI_ERR_TOO_SHORT);
4735 }
4736 /*
4737 * There are not many restrictions to the
4738 * value range.
4739 */
4740 if (*pLen != sizeof(SK_U64)) {
4741
4742 *pLen = 0;
4743 return (SK_PNMI_ERR_BAD_VALUE);
4744 }
4745 /* A preset ends here */
4746 if (Action == SK_PNMI_PRESET) {
4747
4748 *pLen = 0;
4749 return (SK_PNMI_ERR_OK);
4750 }
4751 /*
4752 * Store the new threshold, which will be taken
4753 * on the next timer event.
4754 */
4755 SK_PNMI_READ_U64(pBuf, Val64);
4756 pAC->Pnmi.RlmtChangeThreshold = Val64;
4757 break;
4758
4759 default:
4760 /* The other OIDs are not be able for set */
4761 *pLen = 0;
4762 return (SK_PNMI_ERR_READ_ONLY);
4763 }
4764 }
4765
4766 return (SK_PNMI_ERR_OK);
4767}
4768
4769/*****************************************************************************
4770 *
4771 * RlmtStat - OID handler function of OID_SKGE_RLMT_XXX multiple instance.
4772 *
4773 * Description:
4774 * Performs get requests on multiple instance variables.
4775 *
4776 * Returns:
4777 * SK_PNMI_ERR_OK The request was successfully performed.
4778 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
4779 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
4780 * the correct data (e.g. a 32bit value is
4781 * needed, but a 16 bit value was passed).
4782 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
4783 * exist (e.g. port instance 3 on a two port
4784 * adapter.
4785 */
4786PNMI_STATIC int RlmtStat(
4787SK_AC *pAC, /* Pointer to adapter context */
4788SK_IOC IoC, /* IO context handle */
4789int Action, /* GET/PRESET/SET action */
4790SK_U32 Id, /* Object ID that is to be processed */
4791char *pBuf, /* Buffer used for the management data transfer */
4792unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
4793SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
4794unsigned int TableIndex, /* Index to the Id table */
4795SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
4796{
4797 unsigned int PhysPortMax;
4798 unsigned int PhysPortIndex;
4799 unsigned int Limit;
4800 unsigned int Offset;
4801 int Ret;
4802 SK_U32 Val32;
4803 SK_U64 Val64;
4804
4805 /*
4806 * Calculate the port indexes from the instance.
4807 */
4808 PhysPortMax = pAC->GIni.GIMacsFound;
4809
4810 if ((Instance != (SK_U32)(-1))) {
4811 /* Check instance range */
4812 if ((Instance < 1) || (Instance > PhysPortMax)) {
4813
4814 *pLen = 0;
4815 return (SK_PNMI_ERR_UNKNOWN_INST);
4816 }
4817
4818 /* Single net mode */
4819 PhysPortIndex = Instance - 1;
4820
4821 /* Dual net mode */
4822 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4823 PhysPortIndex = NetIndex;
4824 }
4825
4826 /* Both net modes */
4827 Limit = PhysPortIndex + 1;
4828 }
4829 else {
4830 /* Single net mode */
4831 PhysPortIndex = 0;
4832 Limit = PhysPortMax;
4833
4834 /* Dual net mode */
4835 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
4836 PhysPortIndex = NetIndex;
4837 Limit = PhysPortIndex + 1;
4838 }
4839 }
4840
4841 /*
4842 * Currently only get requests are allowed.
4843 */
4844 if (Action != SK_PNMI_GET) {
4845
4846 *pLen = 0;
4847 return (SK_PNMI_ERR_READ_ONLY);
4848 }
4849
4850 /*
4851 * Check if the buffer length is large enough.
4852 */
4853 switch (Id) {
4854
4855 case OID_SKGE_RLMT_PORT_INDEX:
4856 case OID_SKGE_RLMT_STATUS:
4857 if (*pLen < (Limit - PhysPortIndex) * sizeof(SK_U32)) {
4858
4859 *pLen = (Limit - PhysPortIndex) * sizeof(SK_U32);
4860 return (SK_PNMI_ERR_TOO_SHORT);
4861 }
4862 break;
4863
4864 case OID_SKGE_RLMT_TX_HELLO_CTS:
4865 case OID_SKGE_RLMT_RX_HELLO_CTS:
4866 case OID_SKGE_RLMT_TX_SP_REQ_CTS:
4867 case OID_SKGE_RLMT_RX_SP_CTS:
4868 if (*pLen < (Limit - PhysPortIndex) * sizeof(SK_U64)) {
4869
4870 *pLen = (Limit - PhysPortIndex) * sizeof(SK_U64);
4871 return (SK_PNMI_ERR_TOO_SHORT);
4872 }
4873 break;
4874
4875 default:
4876 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR039,
4877 SK_PNMI_ERR039MSG);
4878
4879 *pLen = 0;
4880 return (SK_PNMI_ERR_GENERAL);
4881
4882 }
4883
4884 /*
4885 * Update statistic and increment semaphores to indicate that
4886 * an update was already done.
4887 */
4888 if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) {
4889
4890 *pLen = 0;
4891 return (Ret);
4892 }
4893 pAC->Pnmi.RlmtUpdatedFlag ++;
4894
4895 /*
4896 * Get value
4897 */
4898 Offset = 0;
4899 for (; PhysPortIndex < Limit; PhysPortIndex ++) {
4900
4901 switch (Id) {
4902
4903 case OID_SKGE_RLMT_PORT_INDEX:
4904 Val32 = PhysPortIndex;
4905 SK_PNMI_STORE_U32(pBuf + Offset, Val32);
4906 Offset += sizeof(SK_U32);
4907 break;
4908
4909 case OID_SKGE_RLMT_STATUS:
4910 if (pAC->Rlmt.Port[PhysPortIndex].PortState ==
4911 SK_RLMT_PS_INIT ||
4912 pAC->Rlmt.Port[PhysPortIndex].PortState ==
4913 SK_RLMT_PS_DOWN) {
4914
4915 Val32 = SK_PNMI_RLMT_STATUS_ERROR;
4916 }
4917 else if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) {
4918
4919 Val32 = SK_PNMI_RLMT_STATUS_ACTIVE;
4920 }
4921 else {
4922 Val32 = SK_PNMI_RLMT_STATUS_STANDBY;
4923 }
4924 SK_PNMI_STORE_U32(pBuf + Offset, Val32);
4925 Offset += sizeof(SK_U32);
4926 break;
4927
4928 case OID_SKGE_RLMT_TX_HELLO_CTS:
4929 Val64 = pAC->Rlmt.Port[PhysPortIndex].TxHelloCts;
4930 SK_PNMI_STORE_U64(pBuf + Offset, Val64);
4931 Offset += sizeof(SK_U64);
4932 break;
4933
4934 case OID_SKGE_RLMT_RX_HELLO_CTS:
4935 Val64 = pAC->Rlmt.Port[PhysPortIndex].RxHelloCts;
4936 SK_PNMI_STORE_U64(pBuf + Offset, Val64);
4937 Offset += sizeof(SK_U64);
4938 break;
4939
4940 case OID_SKGE_RLMT_TX_SP_REQ_CTS:
4941 Val64 = pAC->Rlmt.Port[PhysPortIndex].TxSpHelloReqCts;
4942 SK_PNMI_STORE_U64(pBuf + Offset, Val64);
4943 Offset += sizeof(SK_U64);
4944 break;
4945
4946 case OID_SKGE_RLMT_RX_SP_CTS:
4947 Val64 = pAC->Rlmt.Port[PhysPortIndex].RxSpHelloCts;
4948 SK_PNMI_STORE_U64(pBuf + Offset, Val64);
4949 Offset += sizeof(SK_U64);
4950 break;
4951
4952 default:
4953 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_ERR,
4954 ("RlmtStat: Unknown OID should be errored before"));
4955
4956 pAC->Pnmi.RlmtUpdatedFlag --;
4957 *pLen = 0;
4958 return (SK_PNMI_ERR_GENERAL);
4959 }
4960 }
4961 *pLen = Offset;
4962
4963 pAC->Pnmi.RlmtUpdatedFlag --;
4964
4965 return (SK_PNMI_ERR_OK);
4966}
4967
4968/*****************************************************************************
4969 *
4970 * MacPrivateConf - OID handler function of OIDs concerning the configuration
4971 *
4972 * Description:
4973 * Get/Presets/Sets the OIDs concerning the configuration.
4974 *
4975 * Returns:
4976 * SK_PNMI_ERR_OK The request was successfully performed.
4977 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
4978 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
4979 * the correct data (e.g. a 32bit value is
4980 * needed, but a 16 bit value was passed).
4981 * SK_PNMI_ERR_BAD_VALUE The passed value is not in the valid
4982 * value range.
4983 * SK_PNMI_ERR_READ_ONLY The OID is read-only and cannot be set.
4984 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
4985 * exist (e.g. port instance 3 on a two port
4986 * adapter.
4987 */
4988PNMI_STATIC int MacPrivateConf(
4989SK_AC *pAC, /* Pointer to adapter context */
4990SK_IOC IoC, /* IO context handle */
4991int Action, /* GET/PRESET/SET action */
4992SK_U32 Id, /* Object ID that is to be processed */
4993char *pBuf, /* Buffer used for the management data transfer */
4994unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
4995SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
4996unsigned int TableIndex, /* Index to the Id table */
4997SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
4998{
4999 unsigned int PhysPortMax;
5000 unsigned int PhysPortIndex;
5001 unsigned int LogPortMax;
5002 unsigned int LogPortIndex;
5003 unsigned int Limit;
5004 unsigned int Offset;
5005 char Val8;
5006 char *pBufPtr;
5007 int Ret;
5008 SK_EVPARA EventParam;
5009 SK_U32 Val32;
5010
5011 /*
5012 * Calculate instance if wished. MAC index 0 is the virtual MAC.
5013 */
5014 PhysPortMax = pAC->GIni.GIMacsFound;
5015 LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax);
5016
5017 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { /* Dual net mode */
5018 LogPortMax--;
5019 }
5020
5021 if ((Instance != (SK_U32)(-1))) { /* Only one specific instance is queried */
5022 /* Check instance range */
5023 if ((Instance < 1) || (Instance > LogPortMax)) {
5024
5025 *pLen = 0;
5026 return (SK_PNMI_ERR_UNKNOWN_INST);
5027 }
5028 LogPortIndex = SK_PNMI_PORT_INST2LOG(Instance);
5029 Limit = LogPortIndex + 1;
5030 }
5031
5032 else { /* Instance == (SK_U32)(-1), get all Instances of that OID */
5033
5034 LogPortIndex = 0;
5035 Limit = LogPortMax;
5036 }
5037
5038 /*
5039 * Perform action
5040 */
5041 if (Action == SK_PNMI_GET) {
5042
5043 /* Check length */
5044 switch (Id) {
5045
5046 case OID_SKGE_PMD:
5047 case OID_SKGE_CONNECTOR:
5048 case OID_SKGE_LINK_CAP:
5049 case OID_SKGE_LINK_MODE:
5050 case OID_SKGE_LINK_MODE_STATUS:
5051 case OID_SKGE_LINK_STATUS:
5052 case OID_SKGE_FLOWCTRL_CAP:
5053 case OID_SKGE_FLOWCTRL_MODE:
5054 case OID_SKGE_FLOWCTRL_STATUS:
5055 case OID_SKGE_PHY_OPERATION_CAP:
5056 case OID_SKGE_PHY_OPERATION_MODE:
5057 case OID_SKGE_PHY_OPERATION_STATUS:
5058 case OID_SKGE_SPEED_CAP:
5059 case OID_SKGE_SPEED_MODE:
5060 case OID_SKGE_SPEED_STATUS:
5061 if (*pLen < (Limit - LogPortIndex) * sizeof(SK_U8)) {
5062
5063 *pLen = (Limit - LogPortIndex) * sizeof(SK_U8);
5064 return (SK_PNMI_ERR_TOO_SHORT);
5065 }
5066 break;
5067
5068 case OID_SKGE_MTU:
5069 case OID_SKGE_PHY_TYPE:
5070 if (*pLen < (Limit - LogPortIndex) * sizeof(SK_U32)) {
5071
5072 *pLen = (Limit - LogPortIndex) * sizeof(SK_U32);
5073 return (SK_PNMI_ERR_TOO_SHORT);
5074 }
5075 break;
5076
5077 default:
5078 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR041,
5079 SK_PNMI_ERR041MSG);
5080 *pLen = 0;
5081 return (SK_PNMI_ERR_GENERAL);
5082 }
5083
5084 /*
5085 * Update statistic and increment semaphore to indicate
5086 * that an update was already done.
5087 */
5088 if ((Ret = SirqUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) {
5089
5090 *pLen = 0;
5091 return (Ret);
5092 }
5093 pAC->Pnmi.SirqUpdatedFlag ++;
5094
5095 /*
5096 * Get value
5097 */
5098 Offset = 0;
5099 for (; LogPortIndex < Limit; LogPortIndex ++) {
5100
5101 pBufPtr = pBuf + Offset;
5102
5103 switch (Id) {
5104
5105 case OID_SKGE_PMD:
5106 *pBufPtr = pAC->Pnmi.PMD;
5107 Offset += sizeof(char);
5108 break;
5109
5110 case OID_SKGE_CONNECTOR:
5111 *pBufPtr = pAC->Pnmi.Connector;
5112 Offset += sizeof(char);
5113 break;
5114
5115 case OID_SKGE_PHY_TYPE:
5116 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5117 if (LogPortIndex == 0) {
5118 continue;
5119 }
5120 else {
5121 /* Get value for physical ports */
5122 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5123 pAC, LogPortIndex);
5124 Val32 = pAC->GIni.GP[PhysPortIndex].PhyType;
5125 SK_PNMI_STORE_U32(pBufPtr, Val32);
5126 }
5127 }
5128 else { /* DualNetMode */
5129
5130 Val32 = pAC->GIni.GP[NetIndex].PhyType;
5131 SK_PNMI_STORE_U32(pBufPtr, Val32);
5132 }
5133 Offset += sizeof(SK_U32);
5134 break;
5135
5136 case OID_SKGE_LINK_CAP:
5137 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5138 if (LogPortIndex == 0) {
5139 /* Get value for virtual port */
5140 VirtualConf(pAC, IoC, Id, pBufPtr);
5141 }
5142 else {
5143 /* Get value for physical ports */
5144 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5145 pAC, LogPortIndex);
5146
5147 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PLinkCap;
5148 }
5149 }
5150 else { /* DualNetMode */
5151
5152 *pBufPtr = pAC->GIni.GP[NetIndex].PLinkCap;
5153 }
5154 Offset += sizeof(char);
5155 break;
5156
5157 case OID_SKGE_LINK_MODE:
5158 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5159 if (LogPortIndex == 0) {
5160 /* Get value for virtual port */
5161 VirtualConf(pAC, IoC, Id, pBufPtr);
5162 }
5163 else {
5164 /* Get value for physical ports */
5165 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5166 pAC, LogPortIndex);
5167
5168 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PLinkModeConf;
5169 }
5170 }
5171 else { /* DualNetMode */
5172
5173 *pBufPtr = pAC->GIni.GP[NetIndex].PLinkModeConf;
5174 }
5175 Offset += sizeof(char);
5176 break;
5177
5178 case OID_SKGE_LINK_MODE_STATUS:
5179 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5180 if (LogPortIndex == 0) {
5181 /* Get value for virtual port */
5182 VirtualConf(pAC, IoC, Id, pBufPtr);
5183 }
5184 else {
5185 /* Get value for physical port */
5186 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5187 pAC, LogPortIndex);
5188
5189 *pBufPtr =
5190 CalculateLinkModeStatus(pAC, IoC, PhysPortIndex);
5191 }
5192 }
5193 else { /* DualNetMode */
5194
5195 *pBufPtr = CalculateLinkModeStatus(pAC, IoC, NetIndex);
5196 }
5197 Offset += sizeof(char);
5198 break;
5199
5200 case OID_SKGE_LINK_STATUS:
5201 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5202 if (LogPortIndex == 0) {
5203 /* Get value for virtual port */
5204 VirtualConf(pAC, IoC, Id, pBufPtr);
5205 }
5206 else {
5207 /* Get value for physical ports */
5208 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5209 pAC, LogPortIndex);
5210
5211 *pBufPtr = CalculateLinkStatus(pAC, IoC, PhysPortIndex);
5212 }
5213 }
5214 else { /* DualNetMode */
5215
5216 *pBufPtr = CalculateLinkStatus(pAC, IoC, NetIndex);
5217 }
5218 Offset += sizeof(char);
5219 break;
5220
5221 case OID_SKGE_FLOWCTRL_CAP:
5222 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5223 if (LogPortIndex == 0) {
5224 /* Get value for virtual port */
5225 VirtualConf(pAC, IoC, Id, pBufPtr);
5226 }
5227 else {
5228 /* Get value for physical ports */
5229 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5230 pAC, LogPortIndex);
5231
5232 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PFlowCtrlCap;
5233 }
5234 }
5235 else { /* DualNetMode */
5236
5237 *pBufPtr = pAC->GIni.GP[NetIndex].PFlowCtrlCap;
5238 }
5239 Offset += sizeof(char);
5240 break;
5241
5242 case OID_SKGE_FLOWCTRL_MODE:
5243 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5244 if (LogPortIndex == 0) {
5245 /* Get value for virtual port */
5246 VirtualConf(pAC, IoC, Id, pBufPtr);
5247 }
5248 else {
5249 /* Get value for physical port */
5250 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5251 pAC, LogPortIndex);
5252
5253 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PFlowCtrlMode;
5254 }
5255 }
5256 else { /* DualNetMode */
5257
5258 *pBufPtr = pAC->GIni.GP[NetIndex].PFlowCtrlMode;
5259 }
5260 Offset += sizeof(char);
5261 break;
5262
5263 case OID_SKGE_FLOWCTRL_STATUS:
5264 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5265 if (LogPortIndex == 0) {
5266 /* Get value for virtual port */
5267 VirtualConf(pAC, IoC, Id, pBufPtr);
5268 }
5269 else {
5270 /* Get value for physical port */
5271 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5272 pAC, LogPortIndex);
5273
5274 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PFlowCtrlStatus;
5275 }
5276 }
5277 else { /* DualNetMode */
5278
5279 *pBufPtr = pAC->GIni.GP[NetIndex].PFlowCtrlStatus;
5280 }
5281 Offset += sizeof(char);
5282 break;
5283
5284 case OID_SKGE_PHY_OPERATION_CAP:
5285 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5286 if (LogPortIndex == 0) {
5287 /* Get value for virtual port */
5288 VirtualConf(pAC, IoC, Id, pBufPtr);
5289 }
5290 else {
5291 /* Get value for physical ports */
5292 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5293 pAC, LogPortIndex);
5294
5295 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PMSCap;
5296 }
5297 }
5298 else { /* DualNetMode */
5299
5300 *pBufPtr = pAC->GIni.GP[NetIndex].PMSCap;
5301 }
5302 Offset += sizeof(char);
5303 break;
5304
5305 case OID_SKGE_PHY_OPERATION_MODE:
5306 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5307 if (LogPortIndex == 0) {
5308 /* Get value for virtual port */
5309 VirtualConf(pAC, IoC, Id, pBufPtr);
5310 }
5311 else {
5312 /* Get value for physical port */
5313 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5314 pAC, LogPortIndex);
5315
5316 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PMSMode;
5317 }
5318 }
5319 else { /* DualNetMode */
5320
5321 *pBufPtr = pAC->GIni.GP[NetIndex].PMSMode;
5322 }
5323 Offset += sizeof(char);
5324 break;
5325
5326 case OID_SKGE_PHY_OPERATION_STATUS:
5327 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5328 if (LogPortIndex == 0) {
5329 /* Get value for virtual port */
5330 VirtualConf(pAC, IoC, Id, pBufPtr);
5331 }
5332 else {
5333 /* Get value for physical port */
5334 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5335 pAC, LogPortIndex);
5336
5337 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PMSStatus;
5338 }
5339 }
5340 else {
5341
5342 *pBufPtr = pAC->GIni.GP[NetIndex].PMSStatus;
5343 }
5344 Offset += sizeof(char);
5345 break;
5346
5347 case OID_SKGE_SPEED_CAP:
5348 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5349 if (LogPortIndex == 0) {
5350 /* Get value for virtual port */
5351 VirtualConf(pAC, IoC, Id, pBufPtr);
5352 }
5353 else {
5354 /* Get value for physical ports */
5355 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5356 pAC, LogPortIndex);
5357
5358 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PLinkSpeedCap;
5359 }
5360 }
5361 else { /* DualNetMode */
5362
5363 *pBufPtr = pAC->GIni.GP[NetIndex].PLinkSpeedCap;
5364 }
5365 Offset += sizeof(char);
5366 break;
5367
5368 case OID_SKGE_SPEED_MODE:
5369 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5370 if (LogPortIndex == 0) {
5371 /* Get value for virtual port */
5372 VirtualConf(pAC, IoC, Id, pBufPtr);
5373 }
5374 else {
5375 /* Get value for physical port */
5376 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5377 pAC, LogPortIndex);
5378
5379 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PLinkSpeed;
5380 }
5381 }
5382 else { /* DualNetMode */
5383
5384 *pBufPtr = pAC->GIni.GP[NetIndex].PLinkSpeed;
5385 }
5386 Offset += sizeof(char);
5387 break;
5388
5389 case OID_SKGE_SPEED_STATUS:
5390 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
5391 if (LogPortIndex == 0) {
5392 /* Get value for virtual port */
5393 VirtualConf(pAC, IoC, Id, pBufPtr);
5394 }
5395 else {
5396 /* Get value for physical port */
5397 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
5398 pAC, LogPortIndex);
5399
5400 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PLinkSpeedUsed;
5401 }
5402 }
5403 else { /* DualNetMode */
5404
5405 *pBufPtr = pAC->GIni.GP[NetIndex].PLinkSpeedUsed;
5406 }
5407 Offset += sizeof(char);
5408 break;
5409
5410 case OID_SKGE_MTU:
5411 Val32 = SK_DRIVER_GET_MTU(pAC, IoC, NetIndex);
5412 SK_PNMI_STORE_U32(pBufPtr, Val32);
5413 Offset += sizeof(SK_U32);
5414 break;
5415
5416 default:
5417 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_ERR,
5418 ("MacPrivateConf: Unknown OID should be handled before"));
5419
5420 pAC->Pnmi.SirqUpdatedFlag --;
5421 return (SK_PNMI_ERR_GENERAL);
5422 }
5423 }
5424 *pLen = Offset;
5425 pAC->Pnmi.SirqUpdatedFlag --;
5426
5427 return (SK_PNMI_ERR_OK);
5428 }
5429
5430 /*
5431 * From here SET or PRESET action. Check if the passed
5432 * buffer length is plausible.
5433 */
5434 switch (Id) {
5435
5436 case OID_SKGE_LINK_MODE:
5437 case OID_SKGE_FLOWCTRL_MODE:
5438 case OID_SKGE_PHY_OPERATION_MODE:
5439 case OID_SKGE_SPEED_MODE:
5440 if (*pLen < Limit - LogPortIndex) {
5441
5442 *pLen = Limit - LogPortIndex;
5443 return (SK_PNMI_ERR_TOO_SHORT);
5444 }
5445 if (*pLen != Limit - LogPortIndex) {
5446
5447 *pLen = 0;
5448 return (SK_PNMI_ERR_BAD_VALUE);
5449 }
5450 break;
5451
5452 case OID_SKGE_MTU:
5453 if (*pLen < sizeof(SK_U32)) {
5454
5455 *pLen = sizeof(SK_U32);
5456 return (SK_PNMI_ERR_TOO_SHORT);
5457 }
5458 if (*pLen != sizeof(SK_U32)) {
5459
5460 *pLen = 0;
5461 return (SK_PNMI_ERR_BAD_VALUE);
5462 }
5463 break;
5464
5465 default:
5466 *pLen = 0;
5467 return (SK_PNMI_ERR_READ_ONLY);
5468 }
5469
5470 /*
5471 * Perform preset or set
5472 */
5473 Offset = 0;
5474 for (; LogPortIndex < Limit; LogPortIndex ++) {
5475
5476 switch (Id) {
5477
5478 case OID_SKGE_LINK_MODE:
5479 /* Check the value range */
5480 Val8 = *(pBuf + Offset);
5481 if (Val8 == 0) {
5482
5483 Offset += sizeof(char);
5484 break;
5485 }
5486 if (Val8 < SK_LMODE_HALF ||
5487 (LogPortIndex != 0 && Val8 > SK_LMODE_AUTOSENSE) ||
5488 (LogPortIndex == 0 && Val8 > SK_LMODE_INDETERMINATED)) {
5489
5490 *pLen = 0;
5491 return (SK_PNMI_ERR_BAD_VALUE);
5492 }
5493
5494 /* The preset ends here */
5495 if (Action == SK_PNMI_PRESET) {
5496
5497 return (SK_PNMI_ERR_OK);
5498 }
5499
5500 if (LogPortIndex == 0) {
5501
5502 /*
5503 * The virtual port consists of all currently
5504 * active ports. Find them and send an event
5505 * with the new link mode to SIRQ.
5506 */
5507 for (PhysPortIndex = 0;
5508 PhysPortIndex < PhysPortMax;
5509 PhysPortIndex ++) {
5510
5511 if (!pAC->Pnmi.Port[PhysPortIndex].
5512 ActiveFlag) {
5513
5514 continue;
5515 }
5516
5517 EventParam.Para32[0] = PhysPortIndex;
5518 EventParam.Para32[1] = (SK_U32)Val8;
5519 if (SkGeSirqEvent(pAC, IoC,
5520 SK_HWEV_SET_LMODE,
5521 EventParam) > 0) {
5522
5523 SK_ERR_LOG(pAC, SK_ERRCL_SW,
5524 SK_PNMI_ERR043,
5525 SK_PNMI_ERR043MSG);
5526
5527 *pLen = 0;
5528 return (SK_PNMI_ERR_GENERAL);
5529 }
5530 }
5531 }
5532 else {
5533 /*
5534 * Send an event with the new link mode to
5535 * the SIRQ module.
5536 */
5537 EventParam.Para32[0] = SK_PNMI_PORT_LOG2PHYS(
5538 pAC, LogPortIndex);
5539 EventParam.Para32[1] = (SK_U32)Val8;
5540 if (SkGeSirqEvent(pAC, IoC, SK_HWEV_SET_LMODE,
5541 EventParam) > 0) {
5542
5543 SK_ERR_LOG(pAC, SK_ERRCL_SW,
5544 SK_PNMI_ERR043,
5545 SK_PNMI_ERR043MSG);
5546
5547 *pLen = 0;
5548 return (SK_PNMI_ERR_GENERAL);
5549 }
5550 }
5551 Offset += sizeof(char);
5552 break;
5553
5554 case OID_SKGE_FLOWCTRL_MODE:
5555 /* Check the value range */
5556 Val8 = *(pBuf + Offset);
5557 if (Val8 == 0) {
5558
5559 Offset += sizeof(char);
5560 break;
5561 }
5562 if (Val8 < SK_FLOW_MODE_NONE ||
5563 (LogPortIndex != 0 && Val8 > SK_FLOW_MODE_SYM_OR_REM) ||
5564 (LogPortIndex == 0 && Val8 > SK_FLOW_MODE_INDETERMINATED)) {
5565
5566 *pLen = 0;
5567 return (SK_PNMI_ERR_BAD_VALUE);
5568 }
5569
5570 /* The preset ends here */
5571 if (Action == SK_PNMI_PRESET) {
5572
5573 return (SK_PNMI_ERR_OK);
5574 }
5575
5576 if (LogPortIndex == 0) {
5577
5578 /*
5579 * The virtual port consists of all currently
5580 * active ports. Find them and send an event
5581 * with the new flow control mode to SIRQ.
5582 */
5583 for (PhysPortIndex = 0;
5584 PhysPortIndex < PhysPortMax;
5585 PhysPortIndex ++) {
5586
5587 if (!pAC->Pnmi.Port[PhysPortIndex].
5588 ActiveFlag) {
5589
5590 continue;
5591 }
5592
5593 EventParam.Para32[0] = PhysPortIndex;
5594 EventParam.Para32[1] = (SK_U32)Val8;
5595 if (SkGeSirqEvent(pAC, IoC,
5596 SK_HWEV_SET_FLOWMODE,
5597 EventParam) > 0) {
5598
5599 SK_ERR_LOG(pAC, SK_ERRCL_SW,
5600 SK_PNMI_ERR044,
5601 SK_PNMI_ERR044MSG);
5602
5603 *pLen = 0;
5604 return (SK_PNMI_ERR_GENERAL);
5605 }
5606 }
5607 }
5608 else {
5609 /*
5610 * Send an event with the new flow control
5611 * mode to the SIRQ module.
5612 */
5613 EventParam.Para32[0] = SK_PNMI_PORT_LOG2PHYS(
5614 pAC, LogPortIndex);
5615 EventParam.Para32[1] = (SK_U32)Val8;
5616 if (SkGeSirqEvent(pAC, IoC,
5617 SK_HWEV_SET_FLOWMODE, EventParam)
5618 > 0) {
5619
5620 SK_ERR_LOG(pAC, SK_ERRCL_SW,
5621 SK_PNMI_ERR044,
5622 SK_PNMI_ERR044MSG);
5623
5624 *pLen = 0;
5625 return (SK_PNMI_ERR_GENERAL);
5626 }
5627 }
5628 Offset += sizeof(char);
5629 break;
5630
5631 case OID_SKGE_PHY_OPERATION_MODE :
5632 /* Check the value range */
5633 Val8 = *(pBuf + Offset);
5634 if (Val8 == 0) {
5635 /* mode of this port remains unchanged */
5636 Offset += sizeof(char);
5637 break;
5638 }
5639 if (Val8 < SK_MS_MODE_AUTO ||
5640 (LogPortIndex != 0 && Val8 > SK_MS_MODE_SLAVE) ||
5641 (LogPortIndex == 0 && Val8 > SK_MS_MODE_INDETERMINATED)) {
5642
5643 *pLen = 0;
5644 return (SK_PNMI_ERR_BAD_VALUE);
5645 }
5646
5647 /* The preset ends here */
5648 if (Action == SK_PNMI_PRESET) {
5649
5650 return (SK_PNMI_ERR_OK);
5651 }
5652
5653 if (LogPortIndex == 0) {
5654
5655 /*
5656 * The virtual port consists of all currently
5657 * active ports. Find them and send an event
5658 * with new master/slave (role) mode to SIRQ.
5659 */
5660 for (PhysPortIndex = 0;
5661 PhysPortIndex < PhysPortMax;
5662 PhysPortIndex ++) {
5663
5664 if (!pAC->Pnmi.Port[PhysPortIndex].
5665 ActiveFlag) {
5666
5667 continue;
5668 }
5669
5670 EventParam.Para32[0] = PhysPortIndex;
5671 EventParam.Para32[1] = (SK_U32)Val8;
5672 if (SkGeSirqEvent(pAC, IoC,
5673 SK_HWEV_SET_ROLE,
5674 EventParam) > 0) {
5675
5676 SK_ERR_LOG(pAC, SK_ERRCL_SW,
5677 SK_PNMI_ERR042,
5678 SK_PNMI_ERR042MSG);
5679
5680 *pLen = 0;
5681 return (SK_PNMI_ERR_GENERAL);
5682 }
5683 }
5684 }
5685 else {
5686 /*
5687 * Send an event with the new master/slave
5688 * (role) mode to the SIRQ module.
5689 */
5690 EventParam.Para32[0] = SK_PNMI_PORT_LOG2PHYS(
5691 pAC, LogPortIndex);
5692 EventParam.Para32[1] = (SK_U32)Val8;
5693 if (SkGeSirqEvent(pAC, IoC,
5694 SK_HWEV_SET_ROLE, EventParam) > 0) {
5695
5696 SK_ERR_LOG(pAC, SK_ERRCL_SW,
5697 SK_PNMI_ERR042,
5698 SK_PNMI_ERR042MSG);
5699
5700 *pLen = 0;
5701 return (SK_PNMI_ERR_GENERAL);
5702 }
5703 }
5704
5705 Offset += sizeof(char);
5706 break;
5707
5708 case OID_SKGE_SPEED_MODE:
5709 /* Check the value range */
5710 Val8 = *(pBuf + Offset);
5711 if (Val8 == 0) {
5712
5713 Offset += sizeof(char);
5714 break;
5715 }
5716 if (Val8 < (SK_LSPEED_AUTO) ||
5717 (LogPortIndex != 0 && Val8 > (SK_LSPEED_1000MBPS)) ||
5718 (LogPortIndex == 0 && Val8 > (SK_LSPEED_INDETERMINATED))) {
5719
5720 *pLen = 0;
5721 return (SK_PNMI_ERR_BAD_VALUE);
5722 }
5723
5724 /* The preset ends here */
5725 if (Action == SK_PNMI_PRESET) {
5726
5727 return (SK_PNMI_ERR_OK);
5728 }
5729
5730 if (LogPortIndex == 0) {
5731
5732 /*
5733 * The virtual port consists of all currently
5734 * active ports. Find them and send an event
5735 * with the new flow control mode to SIRQ.
5736 */
5737 for (PhysPortIndex = 0;
5738 PhysPortIndex < PhysPortMax;
5739 PhysPortIndex ++) {
5740
5741 if (!pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) {
5742
5743 continue;
5744 }
5745
5746 EventParam.Para32[0] = PhysPortIndex;
5747 EventParam.Para32[1] = (SK_U32)Val8;
5748 if (SkGeSirqEvent(pAC, IoC,
5749 SK_HWEV_SET_SPEED,
5750 EventParam) > 0) {
5751
5752 SK_ERR_LOG(pAC, SK_ERRCL_SW,
5753 SK_PNMI_ERR045,
5754 SK_PNMI_ERR045MSG);
5755
5756 *pLen = 0;
5757 return (SK_PNMI_ERR_GENERAL);
5758 }
5759 }
5760 }
5761 else {
5762 /*
5763 * Send an event with the new flow control
5764 * mode to the SIRQ module.
5765 */
5766 EventParam.Para32[0] = SK_PNMI_PORT_LOG2PHYS(
5767 pAC, LogPortIndex);
5768 EventParam.Para32[1] = (SK_U32)Val8;
5769 if (SkGeSirqEvent(pAC, IoC,
5770 SK_HWEV_SET_SPEED,
5771 EventParam) > 0) {
5772
5773 SK_ERR_LOG(pAC, SK_ERRCL_SW,
5774 SK_PNMI_ERR045,
5775 SK_PNMI_ERR045MSG);
5776
5777 *pLen = 0;
5778 return (SK_PNMI_ERR_GENERAL);
5779 }
5780 }
5781 Offset += sizeof(char);
5782 break;
5783
5784 case OID_SKGE_MTU :
5785 /* Check the value range */
5786 Val32 = *(SK_U32*)(pBuf + Offset);
5787 if (Val32 == 0) {
5788 /* mtu of this port remains unchanged */
5789 Offset += sizeof(SK_U32);
5790 break;
5791 }
5792 if (SK_DRIVER_PRESET_MTU(pAC, IoC, NetIndex, Val32) != 0) {
5793 *pLen = 0;
5794 return (SK_PNMI_ERR_BAD_VALUE);
5795 }
5796
5797 /* The preset ends here */
5798 if (Action == SK_PNMI_PRESET) {
5799 return (SK_PNMI_ERR_OK);
5800 }
5801
5802 if (SK_DRIVER_SET_MTU(pAC, IoC, NetIndex, Val32) != 0) {
5803 return (SK_PNMI_ERR_GENERAL);
5804 }
5805
5806 Offset += sizeof(SK_U32);
5807 break;
5808
5809 default:
5810 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_ERR,
5811 ("MacPrivateConf: Unknown OID should be handled before set"));
5812
5813 *pLen = 0;
5814 return (SK_PNMI_ERR_GENERAL);
5815 }
5816 }
5817
5818 return (SK_PNMI_ERR_OK);
5819}
5820
5821/*****************************************************************************
5822 *
5823 * Monitor - OID handler function for RLMT_MONITOR_XXX
5824 *
5825 * Description:
5826 * Because RLMT currently does not support the monitoring of
5827 * remote adapter cards, we return always an empty table.
5828 *
5829 * Returns:
5830 * SK_PNMI_ERR_OK The request was successfully performed.
5831 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
5832 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
5833 * the correct data (e.g. a 32bit value is
5834 * needed, but a 16 bit value was passed).
5835 * SK_PNMI_ERR_BAD_VALUE The passed value is not in the valid
5836 * value range.
5837 * SK_PNMI_ERR_READ_ONLY The OID is read-only and cannot be set.
5838 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
5839 * exist (e.g. port instance 3 on a two port
5840 * adapter.
5841 */
5842PNMI_STATIC int Monitor(
5843SK_AC *pAC, /* Pointer to adapter context */
5844SK_IOC IoC, /* IO context handle */
5845int Action, /* GET/PRESET/SET action */
5846SK_U32 Id, /* Object ID that is to be processed */
5847char *pBuf, /* Buffer used for the management data transfer */
5848unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
5849SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
5850unsigned int TableIndex, /* Index to the Id table */
5851SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
5852{
5853 unsigned int Index;
5854 unsigned int Limit;
5855 unsigned int Offset;
5856 unsigned int Entries;
5857
5858
5859 /*
5860 * Calculate instance if wished.
5861 */
5862 /* XXX Not yet implemented. Return always an empty table. */
5863 Entries = 0;
5864
5865 if ((Instance != (SK_U32)(-1))) {
5866
5867 if ((Instance < 1) || (Instance > Entries)) {
5868
5869 *pLen = 0;
5870 return (SK_PNMI_ERR_UNKNOWN_INST);
5871 }
5872
5873 Index = (unsigned int)Instance - 1;
5874 Limit = (unsigned int)Instance;
5875 }
5876 else {
5877 Index = 0;
5878 Limit = Entries;
5879 }
5880
5881 /*
5882 * Get/Set value
5883 */
5884 if (Action == SK_PNMI_GET) {
5885
5886 for (Offset=0; Index < Limit; Index ++) {
5887
5888 switch (Id) {
5889
5890 case OID_SKGE_RLMT_MONITOR_INDEX:
5891 case OID_SKGE_RLMT_MONITOR_ADDR:
5892 case OID_SKGE_RLMT_MONITOR_ERRS:
5893 case OID_SKGE_RLMT_MONITOR_TIMESTAMP:
5894 case OID_SKGE_RLMT_MONITOR_ADMIN:
5895 break;
5896
5897 default:
5898 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR046,
5899 SK_PNMI_ERR046MSG);
5900
5901 *pLen = 0;
5902 return (SK_PNMI_ERR_GENERAL);
5903 }
5904 }
5905 *pLen = Offset;
5906 }
5907 else {
5908 /* Only MONITOR_ADMIN can be set */
5909 if (Id != OID_SKGE_RLMT_MONITOR_ADMIN) {
5910
5911 *pLen = 0;
5912 return (SK_PNMI_ERR_READ_ONLY);
5913 }
5914
5915 /* Check if the length is plausible */
5916 if (*pLen < (Limit - Index)) {
5917
5918 return (SK_PNMI_ERR_TOO_SHORT);
5919 }
5920 /* Okay, we have a wide value range */
5921 if (*pLen != (Limit - Index)) {
5922
5923 *pLen = 0;
5924 return (SK_PNMI_ERR_BAD_VALUE);
5925 }
5926/*
5927 for (Offset=0; Index < Limit; Index ++) {
5928 }
5929*/
5930/*
5931 * XXX Not yet implemented. Return always BAD_VALUE, because the table
5932 * is empty.
5933 */
5934 *pLen = 0;
5935 return (SK_PNMI_ERR_BAD_VALUE);
5936 }
5937
5938 return (SK_PNMI_ERR_OK);
5939}
5940
5941/*****************************************************************************
5942 *
5943 * VirtualConf - Calculates the values of configuration OIDs for virtual port
5944 *
5945 * Description:
5946 * We handle here the get of the configuration group OIDs, which are
5947 * a little bit complicated. The virtual port consists of all currently
5948 * active physical ports. If multiple ports are active and configured
5949 * differently we get in some trouble to return a single value. So we
5950 * get the value of the first active port and compare it with that of
5951 * the other active ports. If they are not the same, we return a value
5952 * that indicates that the state is indeterminated.
5953 *
5954 * Returns:
5955 * Nothing
5956 */
5957PNMI_STATIC void VirtualConf(
5958SK_AC *pAC, /* Pointer to adapter context */
5959SK_IOC IoC, /* IO context handle */
5960SK_U32 Id, /* Object ID that is to be processed */
5961char *pBuf) /* Buffer used for the management data transfer */
5962{
5963 unsigned int PhysPortMax;
5964 unsigned int PhysPortIndex;
5965 SK_U8 Val8;
5966 SK_U32 Val32;
5967 SK_BOOL PortActiveFlag;
5968 SK_GEPORT *pPrt;
5969
5970 *pBuf = 0;
5971 PortActiveFlag = SK_FALSE;
5972 PhysPortMax = pAC->GIni.GIMacsFound;
5973
5974 for (PhysPortIndex = 0; PhysPortIndex < PhysPortMax;
5975 PhysPortIndex ++) {
5976
5977 pPrt = &pAC->GIni.GP[PhysPortIndex];
5978
5979 /* Check if the physical port is active */
5980 if (!pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) {
5981
5982 continue;
5983 }
5984
5985 PortActiveFlag = SK_TRUE;
5986
5987 switch (Id) {
5988
5989 case OID_SKGE_PHY_TYPE:
5990 /* Check if it is the first active port */
5991 if (*pBuf == 0) {
5992 Val32 = pPrt->PhyType;
5993 SK_PNMI_STORE_U32(pBuf, Val32);
5994 continue;
5995 }
5996
5997 case OID_SKGE_LINK_CAP:
5998
5999 /*
6000 * Different capabilities should not happen, but
6001 * in the case of the cases OR them all together.
6002 * From a curious point of view the virtual port
6003 * is capable of all found capabilities.
6004 */
6005 *pBuf |= pPrt->PLinkCap;
6006 break;
6007
6008 case OID_SKGE_LINK_MODE:
6009 /* Check if it is the first active port */
6010 if (*pBuf == 0) {
6011
6012 *pBuf = pPrt->PLinkModeConf;
6013 continue;
6014 }
6015
6016 /*
6017 * If we find an active port with a different link
6018 * mode than the first one we return a value that
6019 * indicates that the link mode is indeterminated.
6020 */
6021 if (*pBuf != pPrt->PLinkModeConf) {
6022
6023 *pBuf = SK_LMODE_INDETERMINATED;
6024 }
6025 break;
6026
6027 case OID_SKGE_LINK_MODE_STATUS:
6028 /* Get the link mode of the physical port */
6029 Val8 = CalculateLinkModeStatus(pAC, IoC, PhysPortIndex);
6030
6031 /* Check if it is the first active port */
6032 if (*pBuf == 0) {
6033
6034 *pBuf = Val8;
6035 continue;
6036 }
6037
6038 /*
6039 * If we find an active port with a different link
6040 * mode status than the first one we return a value
6041 * that indicates that the link mode status is
6042 * indeterminated.
6043 */
6044 if (*pBuf != Val8) {
6045
6046 *pBuf = SK_LMODE_STAT_INDETERMINATED;
6047 }
6048 break;
6049
6050 case OID_SKGE_LINK_STATUS:
6051 /* Get the link status of the physical port */
6052 Val8 = CalculateLinkStatus(pAC, IoC, PhysPortIndex);
6053
6054 /* Check if it is the first active port */
6055 if (*pBuf == 0) {
6056
6057 *pBuf = Val8;
6058 continue;
6059 }
6060
6061 /*
6062 * If we find an active port with a different link
6063 * status than the first one, we return a value
6064 * that indicates that the link status is
6065 * indeterminated.
6066 */
6067 if (*pBuf != Val8) {
6068
6069 *pBuf = SK_PNMI_RLMT_LSTAT_INDETERMINATED;
6070 }
6071 break;
6072
6073 case OID_SKGE_FLOWCTRL_CAP:
6074 /* Check if it is the first active port */
6075 if (*pBuf == 0) {
6076
6077 *pBuf = pPrt->PFlowCtrlCap;
6078 continue;
6079 }
6080
6081 /*
6082 * From a curious point of view the virtual port
6083 * is capable of all found capabilities.
6084 */
6085 *pBuf |= pPrt->PFlowCtrlCap;
6086 break;
6087
6088 case OID_SKGE_FLOWCTRL_MODE:
6089 /* Check if it is the first active port */
6090 if (*pBuf == 0) {
6091
6092 *pBuf = pPrt->PFlowCtrlMode;
6093 continue;
6094 }
6095
6096 /*
6097 * If we find an active port with a different flow
6098 * control mode than the first one, we return a value
6099 * that indicates that the mode is indeterminated.
6100 */
6101 if (*pBuf != pPrt->PFlowCtrlMode) {
6102
6103 *pBuf = SK_FLOW_MODE_INDETERMINATED;
6104 }
6105 break;
6106
6107 case OID_SKGE_FLOWCTRL_STATUS:
6108 /* Check if it is the first active port */
6109 if (*pBuf == 0) {
6110
6111 *pBuf = pPrt->PFlowCtrlStatus;
6112 continue;
6113 }
6114
6115 /*
6116 * If we find an active port with a different flow
6117 * control status than the first one, we return a
6118 * value that indicates that the status is
6119 * indeterminated.
6120 */
6121 if (*pBuf != pPrt->PFlowCtrlStatus) {
6122
6123 *pBuf = SK_FLOW_STAT_INDETERMINATED;
6124 }
6125 break;
6126
6127 case OID_SKGE_PHY_OPERATION_CAP:
6128 /* Check if it is the first active port */
6129 if (*pBuf == 0) {
6130
6131 *pBuf = pPrt->PMSCap;
6132 continue;
6133 }
6134
6135 /*
6136 * From a curious point of view the virtual port
6137 * is capable of all found capabilities.
6138 */
6139 *pBuf |= pPrt->PMSCap;
6140 break;
6141
6142 case OID_SKGE_PHY_OPERATION_MODE:
6143 /* Check if it is the first active port */
6144 if (*pBuf == 0) {
6145
6146 *pBuf = pPrt->PMSMode;
6147 continue;
6148 }
6149
6150 /*
6151 * If we find an active port with a different master/
6152 * slave mode than the first one, we return a value
6153 * that indicates that the mode is indeterminated.
6154 */
6155 if (*pBuf != pPrt->PMSMode) {
6156
6157 *pBuf = SK_MS_MODE_INDETERMINATED;
6158 }
6159 break;
6160
6161 case OID_SKGE_PHY_OPERATION_STATUS:
6162 /* Check if it is the first active port */
6163 if (*pBuf == 0) {
6164
6165 *pBuf = pPrt->PMSStatus;
6166 continue;
6167 }
6168
6169 /*
6170 * If we find an active port with a different master/
6171 * slave status than the first one, we return a
6172 * value that indicates that the status is
6173 * indeterminated.
6174 */
6175 if (*pBuf != pPrt->PMSStatus) {
6176
6177 *pBuf = SK_MS_STAT_INDETERMINATED;
6178 }
6179 break;
6180
6181 case OID_SKGE_SPEED_MODE:
6182 /* Check if it is the first active port */
6183 if (*pBuf == 0) {
6184
6185 *pBuf = pPrt->PLinkSpeed;
6186 continue;
6187 }
6188
6189 /*
6190 * If we find an active port with a different flow
6191 * control mode than the first one, we return a value
6192 * that indicates that the mode is indeterminated.
6193 */
6194 if (*pBuf != pPrt->PLinkSpeed) {
6195
6196 *pBuf = SK_LSPEED_INDETERMINATED;
6197 }
6198 break;
6199
6200 case OID_SKGE_SPEED_STATUS:
6201 /* Check if it is the first active port */
6202 if (*pBuf == 0) {
6203
6204 *pBuf = pPrt->PLinkSpeedUsed;
6205 continue;
6206 }
6207
6208 /*
6209 * If we find an active port with a different flow
6210 * control status than the first one, we return a
6211 * value that indicates that the status is
6212 * indeterminated.
6213 */
6214 if (*pBuf != pPrt->PLinkSpeedUsed) {
6215
6216 *pBuf = SK_LSPEED_STAT_INDETERMINATED;
6217 }
6218 break;
6219 }
6220 }
6221
6222 /*
6223 * If no port is active return an indeterminated answer
6224 */
6225 if (!PortActiveFlag) {
6226
6227 switch (Id) {
6228
6229 case OID_SKGE_LINK_CAP:
6230 *pBuf = SK_LMODE_CAP_INDETERMINATED;
6231 break;
6232
6233 case OID_SKGE_LINK_MODE:
6234 *pBuf = SK_LMODE_INDETERMINATED;
6235 break;
6236
6237 case OID_SKGE_LINK_MODE_STATUS:
6238 *pBuf = SK_LMODE_STAT_INDETERMINATED;
6239 break;
6240
6241 case OID_SKGE_LINK_STATUS:
6242 *pBuf = SK_PNMI_RLMT_LSTAT_INDETERMINATED;
6243 break;
6244
6245 case OID_SKGE_FLOWCTRL_CAP:
6246 case OID_SKGE_FLOWCTRL_MODE:
6247 *pBuf = SK_FLOW_MODE_INDETERMINATED;
6248 break;
6249
6250 case OID_SKGE_FLOWCTRL_STATUS:
6251 *pBuf = SK_FLOW_STAT_INDETERMINATED;
6252 break;
6253
6254 case OID_SKGE_PHY_OPERATION_CAP:
6255 *pBuf = SK_MS_CAP_INDETERMINATED;
6256 break;
6257
6258 case OID_SKGE_PHY_OPERATION_MODE:
6259 *pBuf = SK_MS_MODE_INDETERMINATED;
6260 break;
6261
6262 case OID_SKGE_PHY_OPERATION_STATUS:
6263 *pBuf = SK_MS_STAT_INDETERMINATED;
6264 break;
6265 case OID_SKGE_SPEED_CAP:
6266 *pBuf = SK_LSPEED_CAP_INDETERMINATED;
6267 break;
6268
6269 case OID_SKGE_SPEED_MODE:
6270 *pBuf = SK_LSPEED_INDETERMINATED;
6271 break;
6272
6273 case OID_SKGE_SPEED_STATUS:
6274 *pBuf = SK_LSPEED_STAT_INDETERMINATED;
6275 break;
6276 }
6277 }
6278}
6279
6280/*****************************************************************************
6281 *
6282 * CalculateLinkStatus - Determins the link status of a physical port
6283 *
6284 * Description:
6285 * Determins the link status the following way:
6286 * LSTAT_PHY_DOWN: Link is down
6287 * LSTAT_AUTONEG: Auto-negotiation failed
6288 * LSTAT_LOG_DOWN: Link is up but RLMT did not yet put the port
6289 * logically up.
6290 * LSTAT_LOG_UP: RLMT marked the port as up
6291 *
6292 * Returns:
6293 * Link status of physical port
6294 */
6295PNMI_STATIC SK_U8 CalculateLinkStatus(
6296SK_AC *pAC, /* Pointer to adapter context */
6297SK_IOC IoC, /* IO context handle */
6298unsigned int PhysPortIndex) /* Physical port index */
6299{
6300 SK_U8 Result;
6301
6302 if (!pAC->GIni.GP[PhysPortIndex].PHWLinkUp) {
6303
6304 Result = SK_PNMI_RLMT_LSTAT_PHY_DOWN;
6305 }
6306 else if (pAC->GIni.GP[PhysPortIndex].PAutoNegFail > 0) {
6307
6308 Result = SK_PNMI_RLMT_LSTAT_AUTONEG;
6309 }
6310 else if (!pAC->Rlmt.Port[PhysPortIndex].PortDown) {
6311
6312 Result = SK_PNMI_RLMT_LSTAT_LOG_UP;
6313 }
6314 else {
6315 Result = SK_PNMI_RLMT_LSTAT_LOG_DOWN;
6316 }
6317
6318 return (Result);
6319}
6320
6321/*****************************************************************************
6322 *
6323 * CalculateLinkModeStatus - Determins the link mode status of a phys. port
6324 *
6325 * Description:
6326 * The COMMON module only tells us if the mode is half or full duplex.
6327 * But in the decade of auto sensing it is useful for the user to
6328 * know if the mode was negotiated or forced. Therefore we have a
6329 * look to the mode, which was last used by the negotiation process.
6330 *
6331 * Returns:
6332 * The link mode status
6333 */
6334PNMI_STATIC SK_U8 CalculateLinkModeStatus(
6335SK_AC *pAC, /* Pointer to adapter context */
6336SK_IOC IoC, /* IO context handle */
6337unsigned int PhysPortIndex) /* Physical port index */
6338{
6339 SK_U8 Result;
6340
6341 /* Get the current mode, which can be full or half duplex */
6342 Result = pAC->GIni.GP[PhysPortIndex].PLinkModeStatus;
6343
6344 /* Check if no valid mode could be found (link is down) */
6345 if (Result < SK_LMODE_STAT_HALF) {
6346
6347 Result = SK_LMODE_STAT_UNKNOWN;
6348 }
6349 else if (pAC->GIni.GP[PhysPortIndex].PLinkMode >= SK_LMODE_AUTOHALF) {
6350
6351 /*
6352 * Auto-negotiation was used to bring up the link. Change
6353 * the already found duplex status that it indicates
6354 * auto-negotiation was involved.
6355 */
6356 if (Result == SK_LMODE_STAT_HALF) {
6357
6358 Result = SK_LMODE_STAT_AUTOHALF;
6359 }
6360 else if (Result == SK_LMODE_STAT_FULL) {
6361
6362 Result = SK_LMODE_STAT_AUTOFULL;
6363 }
6364 }
6365
6366 return (Result);
6367}
6368
6369/*****************************************************************************
6370 *
6371 * GetVpdKeyArr - Obtain an array of VPD keys
6372 *
6373 * Description:
6374 * Read the VPD keys and build an array of VPD keys, which are
6375 * easy to access.
6376 *
6377 * Returns:
6378 * SK_PNMI_ERR_OK Task successfully performed.
6379 * SK_PNMI_ERR_GENERAL Something went wrong.
6380 */
6381PNMI_STATIC int GetVpdKeyArr(
6382SK_AC *pAC, /* Pointer to adapter context */
6383SK_IOC IoC, /* IO context handle */
6384char *pKeyArr, /* Ptr KeyArray */
6385unsigned int KeyArrLen, /* Length of array in bytes */
6386unsigned int *pKeyNo) /* Number of keys */
6387{
6388 unsigned int BufKeysLen = SK_PNMI_VPD_BUFSIZE;
6389 char BufKeys[SK_PNMI_VPD_BUFSIZE];
6390 unsigned int StartOffset;
6391 unsigned int Offset;
6392 int Index;
6393 int Ret;
6394
6395
6396 SK_MEMSET(pKeyArr, 0, KeyArrLen);
6397
6398 /*
6399 * Get VPD key list
6400 */
6401 Ret = VpdKeys(pAC, IoC, (char *)&BufKeys, (int *)&BufKeysLen,
6402 (int *)pKeyNo);
6403 if (Ret > 0) {
6404
6405 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR014,
6406 SK_PNMI_ERR014MSG);
6407
6408 return (SK_PNMI_ERR_GENERAL);
6409 }
6410 /* If no keys are available return now */
6411 if (*pKeyNo == 0 || BufKeysLen == 0) {
6412
6413 return (SK_PNMI_ERR_OK);
6414 }
6415 /*
6416 * If the key list is too long for us trunc it and give a
6417 * errorlog notification. This case should not happen because
6418 * the maximum number of keys is limited due to RAM limitations
6419 */
6420 if (*pKeyNo > SK_PNMI_VPD_ENTRIES) {
6421
6422 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR015,
6423 SK_PNMI_ERR015MSG);
6424
6425 *pKeyNo = SK_PNMI_VPD_ENTRIES;
6426 }
6427
6428 /*
6429 * Now build an array of fixed string length size and copy
6430 * the keys together.
6431 */
6432 for (Index = 0, StartOffset = 0, Offset = 0; Offset < BufKeysLen;
6433 Offset ++) {
6434
6435 if (BufKeys[Offset] != 0) {
6436
6437 continue;
6438 }
6439
6440 if (Offset - StartOffset > SK_PNMI_VPD_KEY_SIZE) {
6441
6442 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR016,
6443 SK_PNMI_ERR016MSG);
6444 return (SK_PNMI_ERR_GENERAL);
6445 }
6446
6447 SK_STRNCPY(pKeyArr + Index * SK_PNMI_VPD_KEY_SIZE,
6448 &BufKeys[StartOffset], SK_PNMI_VPD_KEY_SIZE);
6449
6450 Index ++;
6451 StartOffset = Offset + 1;
6452 }
6453
6454 /* Last key not zero terminated? Get it anyway */
6455 if (StartOffset < Offset) {
6456
6457 SK_STRNCPY(pKeyArr + Index * SK_PNMI_VPD_KEY_SIZE,
6458 &BufKeys[StartOffset], SK_PNMI_VPD_KEY_SIZE);
6459 }
6460
6461 return (SK_PNMI_ERR_OK);
6462}
6463
6464/*****************************************************************************
6465 *
6466 * SirqUpdate - Let the SIRQ update its internal values
6467 *
6468 * Description:
6469 * Just to be sure that the SIRQ module holds its internal data
6470 * structures up to date, we send an update event before we make
6471 * any access.
6472 *
6473 * Returns:
6474 * SK_PNMI_ERR_OK Task successfully performed.
6475 * SK_PNMI_ERR_GENERAL Something went wrong.
6476 */
6477PNMI_STATIC int SirqUpdate(
6478SK_AC *pAC, /* Pointer to adapter context */
6479SK_IOC IoC) /* IO context handle */
6480{
6481 SK_EVPARA EventParam;
6482
6483
6484 /* Was the module already updated during the current PNMI call? */
6485 if (pAC->Pnmi.SirqUpdatedFlag > 0) {
6486
6487 return (SK_PNMI_ERR_OK);
6488 }
6489
6490 /* Send an synchronuous update event to the module */
6491 SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam));
6492 if (SkGeSirqEvent(pAC, IoC, SK_HWEV_UPDATE_STAT, EventParam) > 0) {
6493
6494 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR047,
6495 SK_PNMI_ERR047MSG);
6496
6497 return (SK_PNMI_ERR_GENERAL);
6498 }
6499
6500 return (SK_PNMI_ERR_OK);
6501}
6502
6503/*****************************************************************************
6504 *
6505 * RlmtUpdate - Let the RLMT update its internal values
6506 *
6507 * Description:
6508 * Just to be sure that the RLMT module holds its internal data
6509 * structures up to date, we send an update event before we make
6510 * any access.
6511 *
6512 * Returns:
6513 * SK_PNMI_ERR_OK Task successfully performed.
6514 * SK_PNMI_ERR_GENERAL Something went wrong.
6515 */
6516PNMI_STATIC int RlmtUpdate(
6517SK_AC *pAC, /* Pointer to adapter context */
6518SK_IOC IoC, /* IO context handle */
6519SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
6520{
6521 SK_EVPARA EventParam;
6522
6523
6524 /* Was the module already updated during the current PNMI call? */
6525 if (pAC->Pnmi.RlmtUpdatedFlag > 0) {
6526
6527 return (SK_PNMI_ERR_OK);
6528 }
6529
6530 /* Send an synchronuous update event to the module */
6531 SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam));
6532 EventParam.Para32[0] = NetIndex;
6533 EventParam.Para32[1] = (SK_U32)-1;
6534 if (SkRlmtEvent(pAC, IoC, SK_RLMT_STATS_UPDATE, EventParam) > 0) {
6535
6536 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR048,
6537 SK_PNMI_ERR048MSG);
6538
6539 return (SK_PNMI_ERR_GENERAL);
6540 }
6541
6542 return (SK_PNMI_ERR_OK);
6543}
6544
6545/*****************************************************************************
6546 *
6547 * MacUpdate - Force the XMAC to output the current statistic
6548 *
6549 * Description:
6550 * The XMAC holds its statistic internally. To obtain the current
6551 * values we must send a command so that the statistic data will
6552 * be written to a predefined memory area on the adapter.
6553 *
6554 * Returns:
6555 * SK_PNMI_ERR_OK Task successfully performed.
6556 * SK_PNMI_ERR_GENERAL Something went wrong.
6557 */
6558PNMI_STATIC int MacUpdate(
6559SK_AC *pAC, /* Pointer to adapter context */
6560SK_IOC IoC, /* IO context handle */
6561unsigned int FirstMac, /* Index of the first Mac to be updated */
6562unsigned int LastMac) /* Index of the last Mac to be updated */
6563{
6564 unsigned int MacIndex;
6565
6566 /*
6567 * Were the statistics already updated during the
6568 * current PNMI call?
6569 */
6570 if (pAC->Pnmi.MacUpdatedFlag > 0) {
6571
6572 return (SK_PNMI_ERR_OK);
6573 }
6574
6575 /* Send an update command to all MACs specified */
6576 for (MacIndex = FirstMac; MacIndex <= LastMac; MacIndex ++) {
6577
6578 /*
6579 * 2002-09-13 pweber: Freeze the current SW counters.
6580 * (That should be done as close as
6581 * possible to the update of the
6582 * HW counters)
6583 */
6584 if (pAC->GIni.GIMacType == SK_MAC_XMAC) {
6585 pAC->Pnmi.BufPort[MacIndex] = pAC->Pnmi.Port[MacIndex];
6586 }
6587
6588 /* 2002-09-13 pweber: Update the HW counter */
6589 if (pAC->GIni.GIFunc.pFnMacUpdateStats(pAC, IoC, MacIndex) != 0) {
6590
6591 return (SK_PNMI_ERR_GENERAL);
6592 }
6593 }
6594
6595 return (SK_PNMI_ERR_OK);
6596}
6597
6598/*****************************************************************************
6599 *
6600 * GetStatVal - Retrieve an XMAC statistic counter
6601 *
6602 * Description:
6603 * Retrieves the statistic counter of a virtual or physical port. The
6604 * virtual port is identified by the index 0. It consists of all
6605 * currently active ports. To obtain the counter value for this port
6606 * we must add the statistic counter of all active ports. To grant
6607 * continuous counter values for the virtual port even when port
6608 * switches occur we must additionally add a delta value, which was
6609 * calculated during a SK_PNMI_EVT_RLMT_ACTIVE_UP event.
6610 *
6611 * Returns:
6612 * Requested statistic value
6613 */
6614PNMI_STATIC SK_U64 GetStatVal(
6615SK_AC *pAC, /* Pointer to adapter context */
6616SK_IOC IoC, /* IO context handle */
6617unsigned int LogPortIndex, /* Index of the logical Port to be processed */
6618unsigned int StatIndex, /* Index to statistic value */
6619SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
6620{
6621 unsigned int PhysPortIndex;
6622 unsigned int PhysPortMax;
6623 SK_U64 Val = 0;
6624
6625
6626 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { /* Dual net mode */
6627
6628 PhysPortIndex = NetIndex;
6629
6630 Val = GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex);
6631 }
6632 else { /* Single Net mode */
6633
6634 if (LogPortIndex == 0) {
6635
6636 PhysPortMax = pAC->GIni.GIMacsFound;
6637
6638 /* Add counter of all active ports */
6639 for (PhysPortIndex = 0; PhysPortIndex < PhysPortMax;
6640 PhysPortIndex ++) {
6641
6642 if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) {
6643
6644 Val += GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex);
6645 }
6646 }
6647
6648 /* Correct value because of port switches */
6649 Val += pAC->Pnmi.VirtualCounterOffset[StatIndex];
6650 }
6651 else {
6652 /* Get counter value of physical port */
6653 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, LogPortIndex);
6654
6655 Val = GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex);
6656 }
6657 }
6658 return (Val);
6659}
6660
6661/*****************************************************************************
6662 *
6663 * GetPhysStatVal - Get counter value for physical port
6664 *
6665 * Description:
6666 * Builds a 64bit counter value. Except for the octet counters
6667 * the lower 32bit are counted in hardware and the upper 32bit
6668 * in software by monitoring counter overflow interrupts in the
6669 * event handler. To grant continous counter values during XMAC
6670 * resets (caused by a workaround) we must add a delta value.
6671 * The delta was calculated in the event handler when a
6672 * SK_PNMI_EVT_XMAC_RESET was received.
6673 *
6674 * Returns:
6675 * Counter value
6676 */
6677PNMI_STATIC SK_U64 GetPhysStatVal(
6678SK_AC *pAC, /* Pointer to adapter context */
6679SK_IOC IoC, /* IO context handle */
6680unsigned int PhysPortIndex, /* Index of the logical Port to be processed */
6681unsigned int StatIndex) /* Index to statistic value */
6682{
6683 SK_U64 Val = 0;
6684 SK_U32 LowVal = 0;
6685 SK_U32 HighVal = 0;
6686 SK_U16 Word;
6687 int MacType;
6688 unsigned int HelpIndex;
6689 SK_GEPORT *pPrt;
6690
6691 SK_PNMI_PORT *pPnmiPrt;
6692 SK_GEMACFUNC *pFnMac;
6693
6694 pPrt = &pAC->GIni.GP[PhysPortIndex];
6695
6696 MacType = pAC->GIni.GIMacType;
6697
6698 /* 2002-09-17 pweber: For XMAC, use the frozen SW counters (BufPort) */
6699 if (MacType == SK_MAC_XMAC) {
6700 pPnmiPrt = &pAC->Pnmi.BufPort[PhysPortIndex];
6701 }
6702 else {
6703 pPnmiPrt = &pAC->Pnmi.Port[PhysPortIndex];
6704 }
6705
6706 pFnMac = &pAC->GIni.GIFunc;
6707
6708 switch (StatIndex) {
6709 case SK_PNMI_HTX:
6710 if (MacType == SK_MAC_GMAC) {
6711 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6712 StatAddr[SK_PNMI_HTX_BROADCAST][MacType].Reg,
6713 &LowVal);
6714 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6715 StatAddr[SK_PNMI_HTX_MULTICAST][MacType].Reg,
6716 &HighVal);
6717 LowVal += HighVal;
6718 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6719 StatAddr[SK_PNMI_HTX_UNICAST][MacType].Reg,
6720 &HighVal);
6721 LowVal += HighVal;
6722 }
6723 else {
6724 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6725 StatAddr[StatIndex][MacType].Reg,
6726 &LowVal);
6727 }
6728 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6729 break;
6730
6731 case SK_PNMI_HRX:
6732 if (MacType == SK_MAC_GMAC) {
6733 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6734 StatAddr[SK_PNMI_HRX_BROADCAST][MacType].Reg,
6735 &LowVal);
6736 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6737 StatAddr[SK_PNMI_HRX_MULTICAST][MacType].Reg,
6738 &HighVal);
6739 LowVal += HighVal;
6740 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6741 StatAddr[SK_PNMI_HRX_UNICAST][MacType].Reg,
6742 &HighVal);
6743 LowVal += HighVal;
6744 }
6745 else {
6746 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6747 StatAddr[StatIndex][MacType].Reg,
6748 &LowVal);
6749 }
6750 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6751 break;
6752
6753 case SK_PNMI_HTX_OCTET:
6754 case SK_PNMI_HRX_OCTET:
6755 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6756 StatAddr[StatIndex][MacType].Reg,
6757 &HighVal);
6758 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6759 StatAddr[StatIndex + 1][MacType].Reg,
6760 &LowVal);
6761 break;
6762
6763 case SK_PNMI_HTX_BURST:
6764 case SK_PNMI_HTX_EXCESS_DEF:
6765 case SK_PNMI_HTX_CARRIER:
6766 /* Not supported by GMAC */
6767 if (MacType == SK_MAC_GMAC) {
6768 return (Val);
6769 }
6770
6771 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6772 StatAddr[StatIndex][MacType].Reg,
6773 &LowVal);
6774 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6775 break;
6776
6777 case SK_PNMI_HTX_MACC:
6778 /* GMAC only supports PAUSE MAC control frames */
6779 if (MacType == SK_MAC_GMAC) {
6780 HelpIndex = SK_PNMI_HTX_PMACC;
6781 }
6782 else {
6783 HelpIndex = StatIndex;
6784 }
6785
6786 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6787 StatAddr[HelpIndex][MacType].Reg,
6788 &LowVal);
6789
6790 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6791 break;
6792
6793 case SK_PNMI_HTX_COL:
6794 case SK_PNMI_HRX_UNDERSIZE:
6795 /* Not supported by XMAC */
6796 if (MacType == SK_MAC_XMAC) {
6797 return (Val);
6798 }
6799
6800 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6801 StatAddr[StatIndex][MacType].Reg,
6802 &LowVal);
6803 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6804 break;
6805
6806 case SK_PNMI_HTX_DEFFERAL:
6807 /* Not supported by GMAC */
6808 if (MacType == SK_MAC_GMAC) {
6809 return (Val);
6810 }
6811
6812 /*
6813 * XMAC counts frames with deferred transmission
6814 * even in full-duplex mode.
6815 *
6816 * In full-duplex mode the counter remains constant!
6817 */
6818 if ((pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOFULL) ||
6819 (pPrt->PLinkModeStatus == SK_LMODE_STAT_FULL)) {
6820
6821 LowVal = 0;
6822 HighVal = 0;
6823 }
6824 else {
6825 /* Otherwise get contents of hardware register */
6826 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6827 StatAddr[StatIndex][MacType].Reg,
6828 &LowVal);
6829 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6830 }
6831 break;
6832
6833 case SK_PNMI_HRX_BADOCTET:
6834 /* Not supported by XMAC */
6835 if (MacType == SK_MAC_XMAC) {
6836 return (Val);
6837 }
6838
6839 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6840 StatAddr[StatIndex][MacType].Reg,
6841 &HighVal);
6842 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6843 StatAddr[StatIndex + 1][MacType].Reg,
6844 &LowVal);
6845 break;
6846
6847 case SK_PNMI_HTX_OCTETLOW:
6848 case SK_PNMI_HRX_OCTETLOW:
6849 case SK_PNMI_HRX_BADOCTETLOW:
6850 return (Val);
6851
6852 case SK_PNMI_HRX_LONGFRAMES:
6853 /* For XMAC the SW counter is managed by PNMI */
6854 if (MacType == SK_MAC_XMAC) {
6855 return (pPnmiPrt->StatRxLongFrameCts);
6856 }
6857
6858 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6859 StatAddr[StatIndex][MacType].Reg,
6860 &LowVal);
6861 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6862 break;
6863
6864 case SK_PNMI_HRX_TOO_LONG:
6865 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6866 StatAddr[StatIndex][MacType].Reg,
6867 &LowVal);
6868 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6869
6870 Val = (((SK_U64)HighVal << 32) | (SK_U64)LowVal);
6871
6872 if (MacType == SK_MAC_GMAC) {
6873 /* For GMAC the SW counter is additionally managed by PNMI */
6874 Val += pPnmiPrt->StatRxFrameTooLongCts;
6875 }
6876 else {
6877 /*
6878 * Frames longer than IEEE 802.3 frame max size are counted
6879 * by XMAC in frame_too_long counter even reception of long
6880 * frames was enabled and the frame was correct.
6881 * So correct the value by subtracting RxLongFrame counter.
6882 */
6883 Val -= pPnmiPrt->StatRxLongFrameCts;
6884 }
6885
6886 LowVal = (SK_U32)Val;
6887 HighVal = (SK_U32)(Val >> 32);
6888 break;
6889
6890 case SK_PNMI_HRX_SHORTS:
6891 /* Not supported by GMAC */
6892 if (MacType == SK_MAC_GMAC) {
6893 /* GM_RXE_FRAG?? */
6894 return (Val);
6895 }
6896
6897 /*
6898 * XMAC counts short frame errors even if link down (#10620)
6899 *
6900 * If link-down the counter remains constant
6901 */
6902 if (pPrt->PLinkModeStatus != SK_LMODE_STAT_UNKNOWN) {
6903
6904 /* Otherwise get incremental difference */
6905 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6906 StatAddr[StatIndex][MacType].Reg,
6907 &LowVal);
6908 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6909
6910 Val = (((SK_U64)HighVal << 32) | (SK_U64)LowVal);
6911 Val -= pPnmiPrt->RxShortZeroMark;
6912
6913 LowVal = (SK_U32)Val;
6914 HighVal = (SK_U32)(Val >> 32);
6915 }
6916 break;
6917
6918 case SK_PNMI_HRX_MACC:
6919 case SK_PNMI_HRX_MACC_UNKWN:
6920 case SK_PNMI_HRX_BURST:
6921 case SK_PNMI_HRX_MISSED:
6922 case SK_PNMI_HRX_FRAMING:
6923 case SK_PNMI_HRX_CARRIER:
6924 case SK_PNMI_HRX_IRLENGTH:
6925 case SK_PNMI_HRX_SYMBOL:
6926 case SK_PNMI_HRX_CEXT:
6927 /* Not supported by GMAC */
6928 if (MacType == SK_MAC_GMAC) {
6929 return (Val);
6930 }
6931
6932 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6933 StatAddr[StatIndex][MacType].Reg,
6934 &LowVal);
6935 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6936 break;
6937
6938 case SK_PNMI_HRX_PMACC_ERR:
6939 /* For GMAC the SW counter is managed by PNMI */
6940 if (MacType == SK_MAC_GMAC) {
6941 return (pPnmiPrt->StatRxPMaccErr);
6942 }
6943
6944 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6945 StatAddr[StatIndex][MacType].Reg,
6946 &LowVal);
6947 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6948 break;
6949
6950 /* SW counter managed by PNMI */
6951 case SK_PNMI_HTX_SYNC:
6952 LowVal = (SK_U32)pPnmiPrt->StatSyncCts;
6953 HighVal = (SK_U32)(pPnmiPrt->StatSyncCts >> 32);
6954 break;
6955
6956 /* SW counter managed by PNMI */
6957 case SK_PNMI_HTX_SYNC_OCTET:
6958 LowVal = (SK_U32)pPnmiPrt->StatSyncOctetsCts;
6959 HighVal = (SK_U32)(pPnmiPrt->StatSyncOctetsCts >> 32);
6960 break;
6961
6962 case SK_PNMI_HRX_FCS:
6963 /*
6964 * Broadcom filters FCS errors and counts it in
6965 * Receive Error Counter register
6966 */
6967 if (pPrt->PhyType == SK_PHY_BCOM) {
6968 /* do not read while not initialized (PHY_READ hangs!)*/
6969 if (pPrt->PState != SK_PRT_RESET) {
6970 SkXmPhyRead(pAC, IoC, PhysPortIndex, PHY_BCOM_RE_CTR, &Word);
6971
6972 LowVal = Word;
6973 }
6974 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6975 }
6976 else {
6977 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6978 StatAddr[StatIndex][MacType].Reg,
6979 &LowVal);
6980 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6981 }
6982 break;
6983
6984 default:
6985 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
6986 StatAddr[StatIndex][MacType].Reg,
6987 &LowVal);
6988 HighVal = pPnmiPrt->CounterHigh[StatIndex];
6989 break;
6990 }
6991
6992 Val = (((SK_U64)HighVal << 32) | (SK_U64)LowVal);
6993
6994 /* Correct value because of possible XMAC reset. XMAC Errata #2 */
6995 Val += pPnmiPrt->CounterOffset[StatIndex];
6996
6997 return (Val);
6998}
6999
7000/*****************************************************************************
7001 *
7002 * ResetCounter - Set all counters and timestamps to zero
7003 *
7004 * Description:
7005 * Notifies other common modules which store statistic data to
7006 * reset their counters and finally reset our own counters.
7007 *
7008 * Returns:
7009 * Nothing
7010 */
7011PNMI_STATIC void ResetCounter(
7012SK_AC *pAC, /* Pointer to adapter context */
7013SK_IOC IoC, /* IO context handle */
7014SK_U32 NetIndex)
7015{
7016 unsigned int PhysPortIndex;
7017 SK_EVPARA EventParam;
7018
7019
7020 SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam));
7021
7022 /* Notify sensor module */
7023 SkEventQueue(pAC, SKGE_I2C, SK_I2CEV_CLEAR, EventParam);
7024
7025 /* Notify RLMT module */
7026 EventParam.Para32[0] = NetIndex;
7027 EventParam.Para32[1] = (SK_U32)-1;
7028 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STATS_CLEAR, EventParam);
7029 EventParam.Para32[1] = 0;
7030
7031 /* Notify SIRQ module */
7032 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_CLEAR_STAT, EventParam);
7033
7034 /* Notify CSUM module */
7035#ifdef SK_USE_CSUM
7036 EventParam.Para32[0] = NetIndex;
7037 EventParam.Para32[1] = (SK_U32)-1;
7038 SkEventQueue(pAC, SKGE_CSUM, SK_CSUM_EVENT_CLEAR_PROTO_STATS,
7039 EventParam);
7040#endif /* SK_USE_CSUM */
7041
7042 /* Clear XMAC statistic */
7043 for (PhysPortIndex = 0; PhysPortIndex <
7044 (unsigned int)pAC->GIni.GIMacsFound; PhysPortIndex ++) {
7045
7046 (void)pAC->GIni.GIFunc.pFnMacResetCounter(pAC, IoC, PhysPortIndex);
7047
7048 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex].CounterHigh,
7049 0, sizeof(pAC->Pnmi.Port[PhysPortIndex].CounterHigh));
7050 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex].
7051 CounterOffset, 0, sizeof(pAC->Pnmi.Port[
7052 PhysPortIndex].CounterOffset));
7053 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex].StatSyncCts,
7054 0, sizeof(pAC->Pnmi.Port[PhysPortIndex].StatSyncCts));
7055 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex].
7056 StatSyncOctetsCts, 0, sizeof(pAC->Pnmi.Port[
7057 PhysPortIndex].StatSyncOctetsCts));
7058 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex].
7059 StatRxLongFrameCts, 0, sizeof(pAC->Pnmi.Port[
7060 PhysPortIndex].StatRxLongFrameCts));
7061 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex].
7062 StatRxFrameTooLongCts, 0, sizeof(pAC->Pnmi.Port[
7063 PhysPortIndex].StatRxFrameTooLongCts));
7064 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex].
7065 StatRxPMaccErr, 0, sizeof(pAC->Pnmi.Port[
7066 PhysPortIndex].StatRxPMaccErr));
7067 }
7068
7069 /*
7070 * Clear local statistics
7071 */
7072 SK_MEMSET((char *)&pAC->Pnmi.VirtualCounterOffset, 0,
7073 sizeof(pAC->Pnmi.VirtualCounterOffset));
7074 pAC->Pnmi.RlmtChangeCts = 0;
7075 pAC->Pnmi.RlmtChangeTime = 0;
7076 SK_MEMSET((char *)&pAC->Pnmi.RlmtChangeEstimate.EstValue[0], 0,
7077 sizeof(pAC->Pnmi.RlmtChangeEstimate.EstValue));
7078 pAC->Pnmi.RlmtChangeEstimate.EstValueIndex = 0;
7079 pAC->Pnmi.RlmtChangeEstimate.Estimate = 0;
7080 pAC->Pnmi.Port[NetIndex].TxSwQueueMax = 0;
7081 pAC->Pnmi.Port[NetIndex].TxRetryCts = 0;
7082 pAC->Pnmi.Port[NetIndex].RxIntrCts = 0;
7083 pAC->Pnmi.Port[NetIndex].TxIntrCts = 0;
7084 pAC->Pnmi.Port[NetIndex].RxNoBufCts = 0;
7085 pAC->Pnmi.Port[NetIndex].TxNoBufCts = 0;
7086 pAC->Pnmi.Port[NetIndex].TxUsedDescrNo = 0;
7087 pAC->Pnmi.Port[NetIndex].RxDeliveredCts = 0;
7088 pAC->Pnmi.Port[NetIndex].RxOctetsDeliveredCts = 0;
7089 pAC->Pnmi.Port[NetIndex].ErrRecoveryCts = 0;
7090}
7091
7092/*****************************************************************************
7093 *
7094 * GetTrapEntry - Get an entry in the trap buffer
7095 *
7096 * Description:
7097 * The trap buffer stores various events. A user application somehow
7098 * gets notified that an event occured and retrieves the trap buffer
7099 * contens (or simply polls the buffer). The buffer is organized as
7100 * a ring which stores the newest traps at the beginning. The oldest
7101 * traps are overwritten by the newest ones. Each trap entry has a
7102 * unique number, so that applications may detect new trap entries.
7103 *
7104 * Returns:
7105 * A pointer to the trap entry
7106 */
7107PNMI_STATIC char* GetTrapEntry(
7108SK_AC *pAC, /* Pointer to adapter context */
7109SK_U32 TrapId, /* SNMP ID of the trap */
7110unsigned int Size) /* Space needed for trap entry */
7111{
7112 unsigned int BufPad = pAC->Pnmi.TrapBufPad;
7113 unsigned int BufFree = pAC->Pnmi.TrapBufFree;
7114 unsigned int Beg = pAC->Pnmi.TrapQueueBeg;
7115 unsigned int End = pAC->Pnmi.TrapQueueEnd;
7116 char *pBuf = &pAC->Pnmi.TrapBuf[0];
7117 int Wrap;
7118 unsigned int NeededSpace;
7119 unsigned int EntrySize;
7120 SK_U32 Val32;
7121 SK_U64 Val64;
7122
7123
7124 /* Last byte of entry will get a copy of the entry length */
7125 Size ++;
7126
7127 /*
7128 * Calculate needed buffer space */
7129 if (Beg >= Size) {
7130
7131 NeededSpace = Size;
7132 Wrap = SK_FALSE;
7133 }
7134 else {
7135 NeededSpace = Beg + Size;
7136 Wrap = SK_TRUE;
7137 }
7138
7139 /*
7140 * Check if enough buffer space is provided. Otherwise
7141 * free some entries. Leave one byte space between begin
7142 * and end of buffer to make it possible to detect whether
7143 * the buffer is full or empty
7144 */
7145 while (BufFree < NeededSpace + 1) {
7146
7147 if (End == 0) {
7148
7149 End = SK_PNMI_TRAP_QUEUE_LEN;
7150 }
7151
7152 EntrySize = (unsigned int)*((unsigned char *)pBuf + End - 1);
7153 BufFree += EntrySize;
7154 End -= EntrySize;
7155#ifdef DEBUG
7156 SK_MEMSET(pBuf + End, (char)(-1), EntrySize);
7157#endif /* DEBUG */
7158 if (End == BufPad) {
7159#ifdef DEBUG
7160 SK_MEMSET(pBuf, (char)(-1), End);
7161#endif /* DEBUG */
7162 BufFree += End;
7163 End = 0;
7164 BufPad = 0;
7165 }
7166 }
7167
7168 /*
7169 * Insert new entry as first entry. Newest entries are
7170 * stored at the beginning of the queue.
7171 */
7172 if (Wrap) {
7173
7174 BufPad = Beg;
7175 Beg = SK_PNMI_TRAP_QUEUE_LEN - Size;
7176 }
7177 else {
7178 Beg = Beg - Size;
7179 }
7180 BufFree -= NeededSpace;
7181
7182 /* Save the current offsets */
7183 pAC->Pnmi.TrapQueueBeg = Beg;
7184 pAC->Pnmi.TrapQueueEnd = End;
7185 pAC->Pnmi.TrapBufPad = BufPad;
7186 pAC->Pnmi.TrapBufFree = BufFree;
7187
7188 /* Initialize the trap entry */
7189 *(pBuf + Beg + Size - 1) = (char)Size;
7190 *(pBuf + Beg) = (char)Size;
7191 Val32 = (pAC->Pnmi.TrapUnique) ++;
7192 SK_PNMI_STORE_U32(pBuf + Beg + 1, Val32);
7193 SK_PNMI_STORE_U32(pBuf + Beg + 1 + sizeof(SK_U32), TrapId);
7194 Val64 = SK_PNMI_HUNDREDS_SEC(SkOsGetTime(pAC));
7195 SK_PNMI_STORE_U64(pBuf + Beg + 1 + 2 * sizeof(SK_U32), Val64);
7196
7197 return (pBuf + Beg);
7198}
7199
7200/*****************************************************************************
7201 *
7202 * CopyTrapQueue - Copies the trap buffer for the TRAP OID
7203 *
7204 * Description:
7205 * On a query of the TRAP OID the trap buffer contents will be
7206 * copied continuously to the request buffer, which must be large
7207 * enough. No length check is performed.
7208 *
7209 * Returns:
7210 * Nothing
7211 */
7212PNMI_STATIC void CopyTrapQueue(
7213SK_AC *pAC, /* Pointer to adapter context */
7214char *pDstBuf) /* Buffer to which the queued traps will be copied */
7215{
7216 unsigned int BufPad = pAC->Pnmi.TrapBufPad;
7217 unsigned int Trap = pAC->Pnmi.TrapQueueBeg;
7218 unsigned int End = pAC->Pnmi.TrapQueueEnd;
7219 char *pBuf = &pAC->Pnmi.TrapBuf[0];
7220 unsigned int Len;
7221 unsigned int DstOff = 0;
7222
7223
7224 while (Trap != End) {
7225
7226 Len = (unsigned int)*(pBuf + Trap);
7227
7228 /*
7229 * Last byte containing a copy of the length will
7230 * not be copied.
7231 */
7232 *(pDstBuf + DstOff) = (char)(Len - 1);
7233 SK_MEMCPY(pDstBuf + DstOff + 1, pBuf + Trap + 1, Len - 2);
7234 DstOff += Len - 1;
7235
7236 Trap += Len;
7237 if (Trap == SK_PNMI_TRAP_QUEUE_LEN) {
7238
7239 Trap = BufPad;
7240 }
7241 }
7242}
7243
7244/*****************************************************************************
7245 *
7246 * GetTrapQueueLen - Get the length of the trap buffer
7247 *
7248 * Description:
7249 * Evaluates the number of currently stored traps and the needed
7250 * buffer size to retrieve them.
7251 *
7252 * Returns:
7253 * Nothing
7254 */
7255PNMI_STATIC void GetTrapQueueLen(
7256SK_AC *pAC, /* Pointer to adapter context */
7257unsigned int *pLen, /* Length in Bytes of all queued traps */
7258unsigned int *pEntries) /* Returns number of trapes stored in queue */
7259{
7260 unsigned int BufPad = pAC->Pnmi.TrapBufPad;
7261 unsigned int Trap = pAC->Pnmi.TrapQueueBeg;
7262 unsigned int End = pAC->Pnmi.TrapQueueEnd;
7263 char *pBuf = &pAC->Pnmi.TrapBuf[0];
7264 unsigned int Len;
7265 unsigned int Entries = 0;
7266 unsigned int TotalLen = 0;
7267
7268
7269 while (Trap != End) {
7270
7271 Len = (unsigned int)*(pBuf + Trap);
7272 TotalLen += Len - 1;
7273 Entries ++;
7274
7275 Trap += Len;
7276 if (Trap == SK_PNMI_TRAP_QUEUE_LEN) {
7277
7278 Trap = BufPad;
7279 }
7280 }
7281
7282 *pEntries = Entries;
7283 *pLen = TotalLen;
7284}
7285
7286/*****************************************************************************
7287 *
7288 * QueueSimpleTrap - Store a simple trap to the trap buffer
7289 *
7290 * Description:
7291 * A simple trap is a trap with now additional data. It consists
7292 * simply of a trap code.
7293 *
7294 * Returns:
7295 * Nothing
7296 */
7297PNMI_STATIC void QueueSimpleTrap(
7298SK_AC *pAC, /* Pointer to adapter context */
7299SK_U32 TrapId) /* Type of sensor trap */
7300{
7301 GetTrapEntry(pAC, TrapId, SK_PNMI_TRAP_SIMPLE_LEN);
7302}
7303
7304/*****************************************************************************
7305 *
7306 * QueueSensorTrap - Stores a sensor trap in the trap buffer
7307 *
7308 * Description:
7309 * Gets an entry in the trap buffer and fills it with sensor related
7310 * data.
7311 *
7312 * Returns:
7313 * Nothing
7314 */
7315PNMI_STATIC void QueueSensorTrap(
7316SK_AC *pAC, /* Pointer to adapter context */
7317SK_U32 TrapId, /* Type of sensor trap */
7318unsigned int SensorIndex) /* Index of sensor which caused the trap */
7319{
7320 char *pBuf;
7321 unsigned int Offset;
7322 unsigned int DescrLen;
7323 SK_U32 Val32;
7324
7325
7326 /* Get trap buffer entry */
7327 DescrLen = SK_STRLEN(pAC->I2c.SenTable[SensorIndex].SenDesc);
7328 pBuf = GetTrapEntry(pAC, TrapId,
7329 SK_PNMI_TRAP_SENSOR_LEN_BASE + DescrLen);
7330 Offset = SK_PNMI_TRAP_SIMPLE_LEN;
7331
7332 /* Store additionally sensor trap related data */
7333 Val32 = OID_SKGE_SENSOR_INDEX;
7334 SK_PNMI_STORE_U32(pBuf + Offset, Val32);
7335 *(pBuf + Offset + 4) = 4;
7336 Val32 = (SK_U32)SensorIndex;
7337 SK_PNMI_STORE_U32(pBuf + Offset + 5, Val32);
7338 Offset += 9;
7339
7340 Val32 = (SK_U32)OID_SKGE_SENSOR_DESCR;
7341 SK_PNMI_STORE_U32(pBuf + Offset, Val32);
7342 *(pBuf + Offset + 4) = (char)DescrLen;
7343 SK_MEMCPY(pBuf + Offset + 5, pAC->I2c.SenTable[SensorIndex].SenDesc,
7344 DescrLen);
7345 Offset += DescrLen + 5;
7346
7347 Val32 = OID_SKGE_SENSOR_TYPE;
7348 SK_PNMI_STORE_U32(pBuf + Offset, Val32);
7349 *(pBuf + Offset + 4) = 1;
7350 *(pBuf + Offset + 5) = (char)pAC->I2c.SenTable[SensorIndex].SenType;
7351 Offset += 6;
7352
7353 Val32 = OID_SKGE_SENSOR_VALUE;
7354 SK_PNMI_STORE_U32(pBuf + Offset, Val32);
7355 *(pBuf + Offset + 4) = 4;
7356 Val32 = (SK_U32)pAC->I2c.SenTable[SensorIndex].SenValue;
7357 SK_PNMI_STORE_U32(pBuf + Offset + 5, Val32);
7358}
7359
7360/*****************************************************************************
7361 *
7362 * QueueRlmtNewMacTrap - Store a port switch trap in the trap buffer
7363 *
7364 * Description:
7365 * Nothing further to explain.
7366 *
7367 * Returns:
7368 * Nothing
7369 */
7370PNMI_STATIC void QueueRlmtNewMacTrap(
7371SK_AC *pAC, /* Pointer to adapter context */
7372unsigned int ActiveMac) /* Index (0..n) of the currently active port */
7373{
7374 char *pBuf;
7375 SK_U32 Val32;
7376
7377
7378 pBuf = GetTrapEntry(pAC, OID_SKGE_TRAP_RLMT_CHANGE_PORT,
7379 SK_PNMI_TRAP_RLMT_CHANGE_LEN);
7380
7381 Val32 = OID_SKGE_RLMT_PORT_ACTIVE;
7382 SK_PNMI_STORE_U32(pBuf + SK_PNMI_TRAP_SIMPLE_LEN, Val32);
7383 *(pBuf + SK_PNMI_TRAP_SIMPLE_LEN + 4) = 1;
7384 *(pBuf + SK_PNMI_TRAP_SIMPLE_LEN + 5) = (char)ActiveMac;
7385}
7386
7387/*****************************************************************************
7388 *
7389 * QueueRlmtPortTrap - Store port related RLMT trap to trap buffer
7390 *
7391 * Description:
7392 * Nothing further to explain.
7393 *
7394 * Returns:
7395 * Nothing
7396 */
7397PNMI_STATIC void QueueRlmtPortTrap(
7398SK_AC *pAC, /* Pointer to adapter context */
7399SK_U32 TrapId, /* Type of RLMT port trap */
7400unsigned int PortIndex) /* Index of the port, which changed its state */
7401{
7402 char *pBuf;
7403 SK_U32 Val32;
7404
7405
7406 pBuf = GetTrapEntry(pAC, TrapId, SK_PNMI_TRAP_RLMT_PORT_LEN);
7407
7408 Val32 = OID_SKGE_RLMT_PORT_INDEX;
7409 SK_PNMI_STORE_U32(pBuf + SK_PNMI_TRAP_SIMPLE_LEN, Val32);
7410 *(pBuf + SK_PNMI_TRAP_SIMPLE_LEN + 4) = 1;
7411 *(pBuf + SK_PNMI_TRAP_SIMPLE_LEN + 5) = (char)PortIndex;
7412}
7413
7414/*****************************************************************************
7415 *
7416 * CopyMac - Copies a MAC address
7417 *
7418 * Description:
7419 * Nothing further to explain.
7420 *
7421 * Returns:
7422 * Nothing
7423 */
7424PNMI_STATIC void CopyMac(
7425char *pDst, /* Pointer to destination buffer */
7426SK_MAC_ADDR *pMac) /* Pointer of Source */
7427{
7428 int i;
7429
7430
7431 for (i = 0; i < sizeof(SK_MAC_ADDR); i ++) {
7432
7433 *(pDst + i) = pMac->a[i];
7434 }
7435}
7436
7437#ifdef SK_POWER_MGMT
7438/*****************************************************************************
7439 *
7440 * PowerManagement - OID handler function of PowerManagement OIDs
7441 *
7442 * Description:
7443 * The code is simple. No description necessary.
7444 *
7445 * Returns:
7446 * SK_PNMI_ERR_OK The request was successfully performed.
7447 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
7448 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
7449 * the correct data (e.g. a 32bit value is
7450 * needed, but a 16 bit value was passed).
7451 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
7452 * exist (e.g. port instance 3 on a two port
7453 * adapter.
7454 */
7455
7456PNMI_STATIC int PowerManagement(
7457SK_AC *pAC, /* Pointer to adapter context */
7458SK_IOC IoC, /* IO context handle */
7459int Action, /* Get/PreSet/Set action */
7460SK_U32 Id, /* Object ID that is to be processed */
7461char *pBuf, /* Buffer to which to mgmt data will be retrieved */
7462unsigned int *pLen, /* On call: buffer length. On return: used buffer */
7463SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
7464unsigned int TableIndex, /* Index to the Id table */
7465SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
7466{
7467
7468 SK_U32 RetCode = SK_PNMI_ERR_GENERAL;
7469
7470 /*
7471 * Check instance. We only handle single instance variables
7472 */
7473 if (Instance != (SK_U32)(-1) && Instance != 1) {
7474
7475 *pLen = 0;
7476 return (SK_PNMI_ERR_UNKNOWN_INST);
7477 }
7478
7479
7480 /* Check length */
7481 switch (Id) {
7482
7483 case OID_PNP_CAPABILITIES:
7484 if (*pLen < sizeof(SK_PNP_CAPABILITIES)) {
7485
7486 *pLen = sizeof(SK_PNP_CAPABILITIES);
7487 return (SK_PNMI_ERR_TOO_SHORT);
7488 }
7489 break;
7490
7491 case OID_PNP_SET_POWER:
7492 case OID_PNP_QUERY_POWER:
7493 if (*pLen < sizeof(SK_DEVICE_POWER_STATE))
7494 {
7495 *pLen = sizeof(SK_DEVICE_POWER_STATE);
7496 return (SK_PNMI_ERR_TOO_SHORT);
7497 }
7498 break;
7499
7500 case OID_PNP_ADD_WAKE_UP_PATTERN:
7501 case OID_PNP_REMOVE_WAKE_UP_PATTERN:
7502 if (*pLen < sizeof(SK_PM_PACKET_PATTERN)) {
7503
7504 *pLen = sizeof(SK_PM_PACKET_PATTERN);
7505 return (SK_PNMI_ERR_TOO_SHORT);
7506 }
7507 break;
7508
7509 case OID_PNP_ENABLE_WAKE_UP:
7510 if (*pLen < sizeof(SK_U32)) {
7511
7512 *pLen = sizeof(SK_U32);
7513 return (SK_PNMI_ERR_TOO_SHORT);
7514 }
7515 break;
7516 }
7517
7518 /*
7519 * Perform action
7520 */
7521 if (Action == SK_PNMI_GET) {
7522
7523 /*
7524 * Get value
7525 */
7526 switch (Id) {
7527
7528 case OID_PNP_CAPABILITIES:
7529 RetCode = SkPowerQueryPnPCapabilities(pAC, IoC, pBuf, pLen);
7530 break;
7531
7532 case OID_PNP_QUERY_POWER:
7533 /* The Windows DDK describes: An OID_PNP_QUERY_POWER requests
7534 the miniport to indicate whether it can transition its NIC
7535 to the low-power state.
7536 A miniport driver must always return NDIS_STATUS_SUCCESS
7537 to a query of OID_PNP_QUERY_POWER. */
7538 *pLen = sizeof(SK_DEVICE_POWER_STATE);
7539 RetCode = SK_PNMI_ERR_OK;
7540 break;
7541
7542 /* NDIS handles these OIDs as write-only.
7543 * So in case of get action the buffer with written length = 0
7544 * is returned
7545 */
7546 case OID_PNP_SET_POWER:
7547 case OID_PNP_ADD_WAKE_UP_PATTERN:
7548 case OID_PNP_REMOVE_WAKE_UP_PATTERN:
7549 *pLen = 0;
7550 RetCode = SK_PNMI_ERR_NOT_SUPPORTED;
7551 break;
7552
7553 case OID_PNP_ENABLE_WAKE_UP:
7554 RetCode = SkPowerGetEnableWakeUp(pAC, IoC, pBuf, pLen);
7555 break;
7556
7557 default:
7558 RetCode = SK_PNMI_ERR_GENERAL;
7559 break;
7560 }
7561
7562 return (RetCode);
7563 }
7564
7565
7566 /*
7567 * Perform preset or set
7568 */
7569
7570 /* POWER module does not support PRESET action */
7571 if (Action == SK_PNMI_PRESET) {
7572 return (SK_PNMI_ERR_OK);
7573 }
7574
7575 switch (Id) {
7576 case OID_PNP_SET_POWER:
7577 RetCode = SkPowerSetPower(pAC, IoC, pBuf, pLen);
7578 break;
7579
7580 case OID_PNP_ADD_WAKE_UP_PATTERN:
7581 RetCode = SkPowerAddWakeUpPattern(pAC, IoC, pBuf, pLen);
7582 break;
7583
7584 case OID_PNP_REMOVE_WAKE_UP_PATTERN:
7585 RetCode = SkPowerRemoveWakeUpPattern(pAC, IoC, pBuf, pLen);
7586 break;
7587
7588 case OID_PNP_ENABLE_WAKE_UP:
7589 RetCode = SkPowerSetEnableWakeUp(pAC, IoC, pBuf, pLen);
7590 break;
7591
7592 default:
7593 RetCode = SK_PNMI_ERR_READ_ONLY;
7594 }
7595
7596 return (RetCode);
7597}
7598#endif /* SK_POWER_MGMT */
7599
7600#ifdef SK_DIAG_SUPPORT
7601/*****************************************************************************
7602 *
7603 * DiagActions - OID handler function of Diagnostic driver
7604 *
7605 * Description:
7606 * The code is simple. No description necessary.
7607 *
7608 * Returns:
7609 * SK_PNMI_ERR_OK The request was successfully performed.
7610 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
7611 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
7612 * the correct data (e.g. a 32bit value is
7613 * needed, but a 16 bit value was passed).
7614 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
7615 * exist (e.g. port instance 3 on a two port
7616 * adapter.
7617 */
7618
7619PNMI_STATIC int DiagActions(
7620SK_AC *pAC, /* Pointer to adapter context */
7621SK_IOC IoC, /* IO context handle */
7622int Action, /* GET/PRESET/SET action */
7623SK_U32 Id, /* Object ID that is to be processed */
7624char *pBuf, /* Buffer used for the management data transfer */
7625unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
7626SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
7627unsigned int TableIndex, /* Index to the Id table */
7628SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
7629{
7630
7631 SK_U32 DiagStatus;
7632 SK_U32 RetCode = SK_PNMI_ERR_GENERAL;
7633
7634 /*
7635 * Check instance. We only handle single instance variables.
7636 */
7637 if (Instance != (SK_U32)(-1) && Instance != 1) {
7638
7639 *pLen = 0;
7640 return (SK_PNMI_ERR_UNKNOWN_INST);
7641 }
7642
7643 /*
7644 * Check length.
7645 */
7646 switch (Id) {
7647
7648 case OID_SKGE_DIAG_MODE:
7649 if (*pLen < sizeof(SK_U32)) {
7650
7651 *pLen = sizeof(SK_U32);
7652 return (SK_PNMI_ERR_TOO_SHORT);
7653 }
7654 break;
7655
7656 default:
7657 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR040, SK_PNMI_ERR040MSG);
7658 *pLen = 0;
7659 return (SK_PNMI_ERR_GENERAL);
7660 }
7661
7662 /* Perform action. */
7663
7664 /* GET value. */
7665 if (Action == SK_PNMI_GET) {
7666
7667 switch (Id) {
7668
7669 case OID_SKGE_DIAG_MODE:
7670 DiagStatus = pAC->Pnmi.DiagAttached;
7671 SK_PNMI_STORE_U32(pBuf, DiagStatus);
7672 *pLen = sizeof(SK_U32);
7673 RetCode = SK_PNMI_ERR_OK;
7674 break;
7675
7676 default:
7677 *pLen = 0;
7678 RetCode = SK_PNMI_ERR_GENERAL;
7679 break;
7680 }
7681 return (RetCode);
7682 }
7683
7684 /* From here SET or PRESET value. */
7685
7686 /* PRESET value is not supported. */
7687 if (Action == SK_PNMI_PRESET) {
7688 return (SK_PNMI_ERR_OK);
7689 }
7690
7691 /* SET value. */
7692 switch (Id) {
7693 case OID_SKGE_DIAG_MODE:
7694
7695 /* Handle the SET. */
7696 switch (*pBuf) {
7697
7698 /* Attach the DIAG to this adapter. */
7699 case SK_DIAG_ATTACHED:
7700 /* Check if we come from running */
7701 if (pAC->Pnmi.DiagAttached == SK_DIAG_RUNNING) {
7702
7703 RetCode = SkDrvLeaveDiagMode(pAC);
7704
7705 }
7706 else if (pAC->Pnmi.DiagAttached == SK_DIAG_IDLE) {
7707
7708 RetCode = SK_PNMI_ERR_OK;
7709 }
7710
7711 else {
7712
7713 RetCode = SK_PNMI_ERR_GENERAL;
7714
7715 }
7716
7717 if (RetCode == SK_PNMI_ERR_OK) {
7718
7719 pAC->Pnmi.DiagAttached = SK_DIAG_ATTACHED;
7720 }
7721 break;
7722
7723 /* Enter the DIAG mode in the driver. */
7724 case SK_DIAG_RUNNING:
7725 RetCode = SK_PNMI_ERR_OK;
7726
7727 /*
7728 * If DiagAttached is set, we can tell the driver
7729 * to enter the DIAG mode.
7730 */
7731 if (pAC->Pnmi.DiagAttached == SK_DIAG_ATTACHED) {
7732 /* If DiagMode is not active, we can enter it. */
7733 if (!pAC->DiagModeActive) {
7734
7735 RetCode = SkDrvEnterDiagMode(pAC);
7736 }
7737 else {
7738
7739 RetCode = SK_PNMI_ERR_GENERAL;
7740 }
7741 }
7742 else {
7743
7744 RetCode = SK_PNMI_ERR_GENERAL;
7745 }
7746
7747 if (RetCode == SK_PNMI_ERR_OK) {
7748
7749 pAC->Pnmi.DiagAttached = SK_DIAG_RUNNING;
7750 }
7751 break;
7752
7753 case SK_DIAG_IDLE:
7754 /* Check if we come from running */
7755 if (pAC->Pnmi.DiagAttached == SK_DIAG_RUNNING) {
7756
7757 RetCode = SkDrvLeaveDiagMode(pAC);
7758
7759 }
7760 else if (pAC->Pnmi.DiagAttached == SK_DIAG_ATTACHED) {
7761
7762 RetCode = SK_PNMI_ERR_OK;
7763 }
7764
7765 else {
7766
7767 RetCode = SK_PNMI_ERR_GENERAL;
7768
7769 }
7770
7771 if (RetCode == SK_PNMI_ERR_OK) {
7772
7773 pAC->Pnmi.DiagAttached = SK_DIAG_IDLE;
7774 }
7775 break;
7776
7777 default:
7778 RetCode = SK_PNMI_ERR_BAD_VALUE;
7779 break;
7780 }
7781 break;
7782
7783 default:
7784 RetCode = SK_PNMI_ERR_GENERAL;
7785 }
7786
7787 if (RetCode == SK_PNMI_ERR_OK) {
7788 *pLen = sizeof(SK_U32);
7789 }
7790 else {
7791
7792 *pLen = 0;
7793 }
7794 return (RetCode);
7795}
7796#endif /* SK_DIAG_SUPPORT */
7797
7798/*****************************************************************************
7799 *
7800 * Vct - OID handler function of OIDs
7801 *
7802 * Description:
7803 * The code is simple. No description necessary.
7804 *
7805 * Returns:
7806 * SK_PNMI_ERR_OK The request was performed successfully.
7807 * SK_PNMI_ERR_GENERAL A general severe internal error occured.
7808 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain
7809 * the correct data (e.g. a 32bit value is
7810 * needed, but a 16 bit value was passed).
7811 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
7812 * exist (e.g. port instance 3 on a two port
7813 * adapter).
7814 * SK_PNMI_ERR_READ_ONLY Only the Get action is allowed.
7815 *
7816 */
7817
7818PNMI_STATIC int Vct(
7819SK_AC *pAC, /* Pointer to adapter context */
7820SK_IOC IoC, /* IO context handle */
7821int Action, /* GET/PRESET/SET action */
7822SK_U32 Id, /* Object ID that is to be processed */
7823char *pBuf, /* Buffer used for the management data transfer */
7824unsigned int *pLen, /* On call: pBuf buffer length. On return: used buffer */
7825SK_U32 Instance, /* Instance (-1,2..n) that is to be queried */
7826unsigned int TableIndex, /* Index to the Id table */
7827SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
7828{
7829 SK_GEPORT *pPrt;
7830 SK_PNMI_VCT *pVctBackupData;
7831 SK_U32 LogPortMax;
7832 SK_U32 PhysPortMax;
7833 SK_U32 PhysPortIndex;
7834 SK_U32 Limit;
7835 SK_U32 Offset;
7836 SK_BOOL Link;
7837 SK_U32 RetCode = SK_PNMI_ERR_GENERAL;
7838 int i;
7839 SK_EVPARA Para;
7840 SK_U32 CableLength;
7841
7842 /*
7843 * Calculate the port indexes from the instance.
7844 */
7845 PhysPortMax = pAC->GIni.GIMacsFound;
7846 LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax);
7847
7848 /* Dual net mode? */
7849 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
7850 LogPortMax--;
7851 }
7852
7853 if ((Instance != (SK_U32) (-1))) {
7854 /* Check instance range. */
7855 if ((Instance < 2) || (Instance > LogPortMax)) {
7856 *pLen = 0;
7857 return (SK_PNMI_ERR_UNKNOWN_INST);
7858 }
7859
7860 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
7861 PhysPortIndex = NetIndex;
7862 }
7863 else {
7864 PhysPortIndex = Instance - 2;
7865 }
7866 Limit = PhysPortIndex + 1;
7867 }
7868 else {
7869 /*
7870 * Instance == (SK_U32) (-1), get all Instances of that OID.
7871 *
7872 * Not implemented yet. May be used in future releases.
7873 */
7874 PhysPortIndex = 0;
7875 Limit = PhysPortMax;
7876 }
7877
7878 pPrt = &pAC->GIni.GP[PhysPortIndex];
7879 if (pPrt->PHWLinkUp) {
7880 Link = SK_TRUE;
7881 }
7882 else {
7883 Link = SK_FALSE;
7884 }
7885
7886 /* Check MAC type */
7887 if (pPrt->PhyType != SK_PHY_MARV_COPPER) {
7888 *pLen = 0;
7889 return (SK_PNMI_ERR_GENERAL);
7890 }
7891
7892 /* Initialize backup data pointer. */
7893 pVctBackupData = &pAC->Pnmi.VctBackup[PhysPortIndex];
7894
7895 /* Check action type */
7896 if (Action == SK_PNMI_GET) {
7897 /* Check length */
7898 switch (Id) {
7899
7900 case OID_SKGE_VCT_GET:
7901 if (*pLen < (Limit - PhysPortIndex) * sizeof(SK_PNMI_VCT)) {
7902 *pLen = (Limit - PhysPortIndex) * sizeof(SK_PNMI_VCT);
7903 return (SK_PNMI_ERR_TOO_SHORT);
7904 }
7905 break;
7906
7907 case OID_SKGE_VCT_STATUS:
7908 if (*pLen < (Limit - PhysPortIndex) * sizeof(SK_U8)) {
7909 *pLen = (Limit - PhysPortIndex) * sizeof(SK_U8);
7910 return (SK_PNMI_ERR_TOO_SHORT);
7911 }
7912 break;
7913
7914 default:
7915 *pLen = 0;
7916 return (SK_PNMI_ERR_GENERAL);
7917 }
7918
7919 /* Get value */
7920 Offset = 0;
7921 for (; PhysPortIndex < Limit; PhysPortIndex++) {
7922 switch (Id) {
7923
7924 case OID_SKGE_VCT_GET:
7925 if ((Link == SK_FALSE) &&
7926 (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_PENDING)) {
7927 RetCode = SkGmCableDiagStatus(pAC, IoC, PhysPortIndex, SK_FALSE);
7928 if (RetCode == 0) {
7929 pAC->Pnmi.VctStatus[PhysPortIndex] &= ~SK_PNMI_VCT_PENDING;
7930 pAC->Pnmi.VctStatus[PhysPortIndex] |=
7931 (SK_PNMI_VCT_NEW_VCT_DATA | SK_PNMI_VCT_TEST_DONE);
7932
7933 /* Copy results for later use to PNMI struct. */
7934 for (i = 0; i < 4; i++) {
7935 if (pPrt->PMdiPairSts[i] == SK_PNMI_VCT_NORMAL_CABLE) {
7936 if ((pPrt->PMdiPairLen[i] > 35) && (pPrt->PMdiPairLen[i] < 0xff)) {
7937 pPrt->PMdiPairSts[i] = SK_PNMI_VCT_IMPEDANCE_MISMATCH;
7938 }
7939 }
7940 if ((pPrt->PMdiPairLen[i] > 35) && (pPrt->PMdiPairLen[i] != 0xff)) {
7941 CableLength = 1000 * (((175 * pPrt->PMdiPairLen[i]) / 210) - 28);
7942 }
7943 else {
7944 CableLength = 0;
7945 }
7946 pVctBackupData->PMdiPairLen[i] = CableLength;
7947 pVctBackupData->PMdiPairSts[i] = pPrt->PMdiPairSts[i];
7948 }
7949
7950 Para.Para32[0] = PhysPortIndex;
7951 Para.Para32[1] = -1;
7952 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_RESET, Para);
7953 SkEventDispatcher(pAC, IoC);
7954 }
7955 else {
7956 ; /* VCT test is running. */
7957 }
7958 }
7959
7960 /* Get all results. */
7961 CheckVctStatus(pAC, IoC, pBuf, Offset, PhysPortIndex);
7962 Offset += sizeof(SK_U8);
7963 *(pBuf + Offset) = pPrt->PCableLen;
7964 Offset += sizeof(SK_U8);
7965 for (i = 0; i < 4; i++) {
7966 SK_PNMI_STORE_U32((pBuf + Offset), pVctBackupData->PMdiPairLen[i]);
7967 Offset += sizeof(SK_U32);
7968 }
7969 for (i = 0; i < 4; i++) {
7970 *(pBuf + Offset) = pVctBackupData->PMdiPairSts[i];
7971 Offset += sizeof(SK_U8);
7972 }
7973
7974 RetCode = SK_PNMI_ERR_OK;
7975 break;
7976
7977 case OID_SKGE_VCT_STATUS:
7978 CheckVctStatus(pAC, IoC, pBuf, Offset, PhysPortIndex);
7979 Offset += sizeof(SK_U8);
7980 RetCode = SK_PNMI_ERR_OK;
7981 break;
7982
7983 default:
7984 *pLen = 0;
7985 return (SK_PNMI_ERR_GENERAL);
7986 }
7987 } /* for */
7988 *pLen = Offset;
7989 return (RetCode);
7990
7991 } /* if SK_PNMI_GET */
7992
7993 /*
7994 * From here SET or PRESET action. Check if the passed
7995 * buffer length is plausible.
7996 */
7997
7998 /* Check length */
7999 switch (Id) {
8000 case OID_SKGE_VCT_SET:
8001 if (*pLen < (Limit - PhysPortIndex) * sizeof(SK_U32)) {
8002 *pLen = (Limit - PhysPortIndex) * sizeof(SK_U32);
8003 return (SK_PNMI_ERR_TOO_SHORT);
8004 }
8005 break;
8006
8007 default:
8008 *pLen = 0;
8009 return (SK_PNMI_ERR_GENERAL);
8010 }
8011
8012 /*
8013 * Perform preset or set.
8014 */
8015
8016 /* VCT does not support PRESET action. */
8017 if (Action == SK_PNMI_PRESET) {
8018 return (SK_PNMI_ERR_OK);
8019 }
8020
8021 Offset = 0;
8022 for (; PhysPortIndex < Limit; PhysPortIndex++) {
8023 switch (Id) {
8024 case OID_SKGE_VCT_SET: /* Start VCT test. */
8025 if (Link == SK_FALSE) {
8026 SkGeStopPort(pAC, IoC, PhysPortIndex, SK_STOP_ALL, SK_SOFT_RST);
8027
8028 RetCode = SkGmCableDiagStatus(pAC, IoC, PhysPortIndex, SK_TRUE);
8029 if (RetCode == 0) { /* RetCode: 0 => Start! */
8030 pAC->Pnmi.VctStatus[PhysPortIndex] |= SK_PNMI_VCT_PENDING;
8031 pAC->Pnmi.VctStatus[PhysPortIndex] &= ~SK_PNMI_VCT_NEW_VCT_DATA;
8032 pAC->Pnmi.VctStatus[PhysPortIndex] &= ~SK_PNMI_VCT_LINK;
8033
8034 /*
8035 * Start VCT timer counter.
8036 */
8037 SK_MEMSET((char *) &Para, 0, sizeof(Para));
8038 Para.Para32[0] = PhysPortIndex;
8039 Para.Para32[1] = -1;
8040 SkTimerStart(pAC, IoC, &pAC->Pnmi.VctTimeout[PhysPortIndex].VctTimer,
8041 4000000, SKGE_PNMI, SK_PNMI_EVT_VCT_RESET, Para);
8042 SK_PNMI_STORE_U32((pBuf + Offset), RetCode);
8043 RetCode = SK_PNMI_ERR_OK;
8044 }
8045 else { /* RetCode: 2 => Running! */
8046 SK_PNMI_STORE_U32((pBuf + Offset), RetCode);
8047 RetCode = SK_PNMI_ERR_OK;
8048 }
8049 }
8050 else { /* RetCode: 4 => Link! */
8051 RetCode = 4;
8052 SK_PNMI_STORE_U32((pBuf + Offset), RetCode);
8053 RetCode = SK_PNMI_ERR_OK;
8054 }
8055 Offset += sizeof(SK_U32);
8056 break;
8057
8058 default:
8059 *pLen = 0;
8060 return (SK_PNMI_ERR_GENERAL);
8061 }
8062 } /* for */
8063 *pLen = Offset;
8064 return (RetCode);
8065
8066} /* Vct */
8067
8068
8069PNMI_STATIC void CheckVctStatus(
8070SK_AC *pAC,
8071SK_IOC IoC,
8072char *pBuf,
8073SK_U32 Offset,
8074SK_U32 PhysPortIndex)
8075{
8076 SK_GEPORT *pPrt;
8077 SK_PNMI_VCT *pVctData;
8078 SK_U32 RetCode;
8079
8080 pPrt = &pAC->GIni.GP[PhysPortIndex];
8081
8082 pVctData = (SK_PNMI_VCT *) (pBuf + Offset);
8083 pVctData->VctStatus = SK_PNMI_VCT_NONE;
8084
8085 if (!pPrt->PHWLinkUp) {
8086
8087 /* Was a VCT test ever made before? */
8088 if (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_TEST_DONE) {
8089 if ((pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_LINK)) {
8090 pVctData->VctStatus |= SK_PNMI_VCT_OLD_VCT_DATA;
8091 }
8092 else {
8093 pVctData->VctStatus |= SK_PNMI_VCT_NEW_VCT_DATA;
8094 }
8095 }
8096
8097 /* Check VCT test status. */
8098 RetCode = SkGmCableDiagStatus(pAC,IoC, PhysPortIndex, SK_FALSE);
8099 if (RetCode == 2) { /* VCT test is running. */
8100 pVctData->VctStatus |= SK_PNMI_VCT_RUNNING;
8101 }
8102 else { /* VCT data was copied to pAC here. Check PENDING state. */
8103 if (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_PENDING) {
8104 pVctData->VctStatus |= SK_PNMI_VCT_NEW_VCT_DATA;
8105 }
8106 }
8107
8108 if (pPrt->PCableLen != 0xff) { /* Old DSP value. */
8109 pVctData->VctStatus |= SK_PNMI_VCT_OLD_DSP_DATA;
8110 }
8111 }
8112 else {
8113
8114 /* Was a VCT test ever made before? */
8115 if (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_TEST_DONE) {
8116 pVctData->VctStatus &= ~SK_PNMI_VCT_NEW_VCT_DATA;
8117 pVctData->VctStatus |= SK_PNMI_VCT_OLD_VCT_DATA;
8118 }
8119
8120 /* DSP only valid in 100/1000 modes. */
8121 if (pAC->GIni.GP[PhysPortIndex].PLinkSpeedUsed !=
8122 SK_LSPEED_STAT_10MBPS) {
8123 pVctData->VctStatus |= SK_PNMI_VCT_NEW_DSP_DATA;
8124 }
8125 }
8126} /* CheckVctStatus */
8127
8128
8129/*****************************************************************************
8130 *
8131 * SkPnmiGenIoctl - Handles new generic PNMI IOCTL, calls the needed
8132 * PNMI function depending on the subcommand and
8133 * returns all data belonging to the complete database
8134 * or OID request.
8135 *
8136 * Description:
8137 * Looks up the requested subcommand, calls the corresponding handler
8138 * function and passes all required parameters to it.
8139 * The function is called by the driver. It is needed to handle the new
8140 * generic PNMI IOCTL. This IOCTL is given to the driver and contains both
8141 * the OID and a subcommand to decide what kind of request has to be done.
8142 *
8143 * Returns:
8144 * SK_PNMI_ERR_OK The request was successfully performed
8145 * SK_PNMI_ERR_GENERAL A general severe internal error occured
8146 * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to take
8147 * the data.
8148 * SK_PNMI_ERR_UNKNOWN_OID The requested OID is unknown
8149 * SK_PNMI_ERR_UNKNOWN_INST The requested instance of the OID doesn't
8150 * exist (e.g. port instance 3 on a two port
8151 * adapter.
8152 */
8153int SkPnmiGenIoctl(
8154SK_AC *pAC, /* Pointer to adapter context struct */
8155SK_IOC IoC, /* I/O context */
8156void *pBuf, /* Buffer used for the management data transfer */
8157unsigned int *pLen, /* Length of buffer */
8158SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
8159{
8160SK_I32 Mode; /* Store value of subcommand. */
8161SK_U32 Oid; /* Store value of OID. */
8162int ReturnCode; /* Store return value to show status of PNMI action. */
8163int HeaderLength; /* Length of desired action plus OID. */
8164
8165 ReturnCode = SK_PNMI_ERR_GENERAL;
8166
8167 SK_MEMCPY(&Mode, pBuf, sizeof(SK_I32));
8168 SK_MEMCPY(&Oid, (char *) pBuf + sizeof(SK_I32), sizeof(SK_U32));
8169 HeaderLength = sizeof(SK_I32) + sizeof(SK_U32);
8170 *pLen = *pLen - HeaderLength;
8171 SK_MEMCPY((char *) pBuf + sizeof(SK_I32), (char *) pBuf + HeaderLength, *pLen);
8172
8173 switch(Mode) {
8174 case SK_GET_SINGLE_VAR:
8175 ReturnCode = SkPnmiGetVar(pAC, IoC, Oid,
8176 (char *) pBuf + sizeof(SK_I32), pLen,
8177 ((SK_U32) (-1)), NetIndex);
8178 SK_PNMI_STORE_U32(pBuf, ReturnCode);
8179 *pLen = *pLen + sizeof(SK_I32);
8180 break;
8181 case SK_PRESET_SINGLE_VAR:
8182 ReturnCode = SkPnmiPreSetVar(pAC, IoC, Oid,
8183 (char *) pBuf + sizeof(SK_I32), pLen,
8184 ((SK_U32) (-1)), NetIndex);
8185 SK_PNMI_STORE_U32(pBuf, ReturnCode);
8186 *pLen = *pLen + sizeof(SK_I32);
8187 break;
8188 case SK_SET_SINGLE_VAR:
8189 ReturnCode = SkPnmiSetVar(pAC, IoC, Oid,
8190 (char *) pBuf + sizeof(SK_I32), pLen,
8191 ((SK_U32) (-1)), NetIndex);
8192 SK_PNMI_STORE_U32(pBuf, ReturnCode);
8193 *pLen = *pLen + sizeof(SK_I32);
8194 break;
8195 case SK_GET_FULL_MIB:
8196 ReturnCode = SkPnmiGetStruct(pAC, IoC, pBuf, pLen, NetIndex);
8197 break;
8198 case SK_PRESET_FULL_MIB:
8199 ReturnCode = SkPnmiPreSetStruct(pAC, IoC, pBuf, pLen, NetIndex);
8200 break;
8201 case SK_SET_FULL_MIB:
8202 ReturnCode = SkPnmiSetStruct(pAC, IoC, pBuf, pLen, NetIndex);
8203 break;
8204 default:
8205 break;
8206 }
8207
8208 return (ReturnCode);
8209
8210} /* SkGeIocGen */
diff --git a/drivers/net/sk98lin/skgesirq.c b/drivers/net/sk98lin/skgesirq.c
new file mode 100644
index 0000000000..3e7aa49afd
--- /dev/null
+++ b/drivers/net/sk98lin/skgesirq.c
@@ -0,0 +1,2229 @@
1/******************************************************************************
2 *
3 * Name: skgesirq.c
4 * Project: Gigabit Ethernet Adapters, Common Modules
5 * Version: $Revision: 1.92 $
6 * Date: $Date: 2003/09/16 14:37:07 $
7 * Purpose: Special IRQ module
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/*
26 * Special Interrupt handler
27 *
28 * The following abstract should show how this module is included
29 * in the driver path:
30 *
31 * In the ISR of the driver the bits for frame transmission complete and
32 * for receive complete are checked and handled by the driver itself.
33 * The bits of the slow path mask are checked after that and then the
34 * entry into the so-called "slow path" is prepared. It is an implementors
35 * decision whether this is executed directly or just scheduled by
36 * disabling the mask. In the interrupt service routine some events may be
37 * generated, so it would be a good idea to call the EventDispatcher
38 * right after this ISR.
39 *
40 * The Interrupt source register of the adapter is NOT read by this module.
41 * SO if the drivers implementor needs a while loop around the
42 * slow data paths interrupt bits, he needs to call the SkGeSirqIsr() for
43 * each loop entered.
44 *
45 * However, the MAC Interrupt status registers are read in a while loop.
46 *
47 */
48
49#if (defined(DEBUG) || ((!defined(LINT)) && (!defined(SK_SLIM))))
50static const char SysKonnectFileId[] =
51 "@(#) $Id: skgesirq.c,v 1.92 2003/09/16 14:37:07 rschmidt Exp $ (C) Marvell.";
52#endif
53
54#include "h/skdrv1st.h" /* Driver Specific Definitions */
55#ifndef SK_SLIM
56#include "h/skgepnmi.h" /* PNMI Definitions */
57#include "h/skrlmt.h" /* RLMT Definitions */
58#endif
59#include "h/skdrv2nd.h" /* Adapter Control and Driver specific Def. */
60
61/* local function prototypes */
62#ifdef GENESIS
63static int SkGePortCheckUpXmac(SK_AC*, SK_IOC, int, SK_BOOL);
64static int SkGePortCheckUpBcom(SK_AC*, SK_IOC, int, SK_BOOL);
65static void SkPhyIsrBcom(SK_AC*, SK_IOC, int, SK_U16);
66#endif /* GENESIS */
67#ifdef YUKON
68static int SkGePortCheckUpGmac(SK_AC*, SK_IOC, int, SK_BOOL);
69static void SkPhyIsrGmac(SK_AC*, SK_IOC, int, SK_U16);
70#endif /* YUKON */
71#ifdef OTHER_PHY
72static int SkGePortCheckUpLone(SK_AC*, SK_IOC, int, SK_BOOL);
73static int SkGePortCheckUpNat(SK_AC*, SK_IOC, int, SK_BOOL);
74static void SkPhyIsrLone(SK_AC*, SK_IOC, int, SK_U16);
75#endif /* OTHER_PHY */
76
77#ifdef GENESIS
78/*
79 * array of Rx counter from XMAC which are checked
80 * in AutoSense mode to check whether a link is not able to auto-negotiate.
81 */
82static const SK_U16 SkGeRxRegs[]= {
83 XM_RXF_64B,
84 XM_RXF_127B,
85 XM_RXF_255B,
86 XM_RXF_511B,
87 XM_RXF_1023B,
88 XM_RXF_MAX_SZ
89} ;
90#endif /* GENESIS */
91
92#ifdef __C2MAN__
93/*
94 * Special IRQ function
95 *
96 * General Description:
97 *
98 */
99intro()
100{}
101#endif
102
103/******************************************************************************
104 *
105 * SkHWInitDefSense() - Default Autosensing mode initialization
106 *
107 * Description: sets the PLinkMode for HWInit
108 *
109 * Returns: N/A
110 */
111static void SkHWInitDefSense(
112SK_AC *pAC, /* adapter context */
113SK_IOC IoC, /* IO context */
114int Port) /* Port Index (MAC_1 + n) */
115{
116 SK_GEPORT *pPrt; /* GIni Port struct pointer */
117
118 pPrt = &pAC->GIni.GP[Port];
119
120 pPrt->PAutoNegTimeOut = 0;
121
122 if (pPrt->PLinkModeConf != SK_LMODE_AUTOSENSE) {
123 pPrt->PLinkMode = pPrt->PLinkModeConf;
124 return;
125 }
126
127 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
128 ("AutoSensing: First mode %d on Port %d\n",
129 (int)SK_LMODE_AUTOFULL, Port));
130
131 pPrt->PLinkMode = (SK_U8)SK_LMODE_AUTOFULL;
132
133 return;
134} /* SkHWInitDefSense */
135
136
137#ifdef GENESIS
138/******************************************************************************
139 *
140 * SkHWSenseGetNext() - Get Next Autosensing Mode
141 *
142 * Description: gets the appropriate next mode
143 *
144 * Note:
145 *
146 */
147static SK_U8 SkHWSenseGetNext(
148SK_AC *pAC, /* adapter context */
149SK_IOC IoC, /* IO context */
150int Port) /* Port Index (MAC_1 + n) */
151{
152 SK_GEPORT *pPrt; /* GIni Port struct pointer */
153
154 pPrt = &pAC->GIni.GP[Port];
155
156 pPrt->PAutoNegTimeOut = 0;
157
158 if (pPrt->PLinkModeConf != (SK_U8)SK_LMODE_AUTOSENSE) {
159 /* Leave all as configured */
160 return(pPrt->PLinkModeConf);
161 }
162
163 if (pPrt->PLinkMode == (SK_U8)SK_LMODE_AUTOFULL) {
164 /* Return next mode AUTOBOTH */
165 return ((SK_U8)SK_LMODE_AUTOBOTH);
166 }
167
168 /* Return default autofull */
169 return ((SK_U8)SK_LMODE_AUTOFULL);
170} /* SkHWSenseGetNext */
171
172
173/******************************************************************************
174 *
175 * SkHWSenseSetNext() - Autosensing Set next mode
176 *
177 * Description: sets the appropriate next mode
178 *
179 * Returns: N/A
180 */
181static void SkHWSenseSetNext(
182SK_AC *pAC, /* adapter context */
183SK_IOC IoC, /* IO context */
184int Port, /* Port Index (MAC_1 + n) */
185SK_U8 NewMode) /* New Mode to be written in sense mode */
186{
187 SK_GEPORT *pPrt; /* GIni Port struct pointer */
188
189 pPrt = &pAC->GIni.GP[Port];
190
191 pPrt->PAutoNegTimeOut = 0;
192
193 if (pPrt->PLinkModeConf != (SK_U8)SK_LMODE_AUTOSENSE) {
194 return;
195 }
196
197 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
198 ("AutoSensing: next mode %d on Port %d\n",
199 (int)NewMode, Port));
200
201 pPrt->PLinkMode = NewMode;
202
203 return;
204} /* SkHWSenseSetNext */
205#endif /* GENESIS */
206
207
208/******************************************************************************
209 *
210 * SkHWLinkDown() - Link Down handling
211 *
212 * Description: handles the hardware link down signal
213 *
214 * Returns: N/A
215 */
216void SkHWLinkDown(
217SK_AC *pAC, /* adapter context */
218SK_IOC IoC, /* IO context */
219int Port) /* Port Index (MAC_1 + n) */
220{
221 SK_GEPORT *pPrt; /* GIni Port struct pointer */
222
223 pPrt = &pAC->GIni.GP[Port];
224
225 /* Disable all MAC interrupts */
226 SkMacIrqDisable(pAC, IoC, Port);
227
228 /* Disable Receiver and Transmitter */
229 SkMacRxTxDisable(pAC, IoC, Port);
230
231 /* Init default sense mode */
232 SkHWInitDefSense(pAC, IoC, Port);
233
234 if (pPrt->PHWLinkUp == SK_FALSE) {
235 return;
236 }
237
238 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
239 ("Link down Port %d\n", Port));
240
241 /* Set Link to DOWN */
242 pPrt->PHWLinkUp = SK_FALSE;
243
244 /* Reset Port stati */
245 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_UNKNOWN;
246 pPrt->PFlowCtrlStatus = (SK_U8)SK_FLOW_STAT_NONE;
247 pPrt->PLinkSpeedUsed = (SK_U8)SK_LSPEED_STAT_INDETERMINATED;
248
249 /* Re-init Phy especially when the AutoSense default is set now */
250 SkMacInitPhy(pAC, IoC, Port, SK_FALSE);
251
252 /* GP0: used for workaround of Rev. C Errata 2 */
253
254 /* Do NOT signal to RLMT */
255
256 /* Do NOT start the timer here */
257} /* SkHWLinkDown */
258
259
260/******************************************************************************
261 *
262 * SkHWLinkUp() - Link Up handling
263 *
264 * Description: handles the hardware link up signal
265 *
266 * Returns: N/A
267 */
268static void SkHWLinkUp(
269SK_AC *pAC, /* adapter context */
270SK_IOC IoC, /* IO context */
271int Port) /* Port Index (MAC_1 + n) */
272{
273 SK_GEPORT *pPrt; /* GIni Port struct pointer */
274
275 pPrt = &pAC->GIni.GP[Port];
276
277 if (pPrt->PHWLinkUp) {
278 /* We do NOT need to proceed on active link */
279 return;
280 }
281
282 pPrt->PHWLinkUp = SK_TRUE;
283 pPrt->PAutoNegFail = SK_FALSE;
284 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_UNKNOWN;
285
286 if (pPrt->PLinkMode != (SK_U8)SK_LMODE_AUTOHALF &&
287 pPrt->PLinkMode != (SK_U8)SK_LMODE_AUTOFULL &&
288 pPrt->PLinkMode != (SK_U8)SK_LMODE_AUTOBOTH) {
289 /* Link is up and no Auto-negotiation should be done */
290
291 /* Link speed should be the configured one */
292 switch (pPrt->PLinkSpeed) {
293 case SK_LSPEED_AUTO:
294 /* default is 1000 Mbps */
295 case SK_LSPEED_1000MBPS:
296 pPrt->PLinkSpeedUsed = (SK_U8)SK_LSPEED_STAT_1000MBPS;
297 break;
298 case SK_LSPEED_100MBPS:
299 pPrt->PLinkSpeedUsed = (SK_U8)SK_LSPEED_STAT_100MBPS;
300 break;
301 case SK_LSPEED_10MBPS:
302 pPrt->PLinkSpeedUsed = (SK_U8)SK_LSPEED_STAT_10MBPS;
303 break;
304 }
305
306 /* Set Link Mode Status */
307 if (pPrt->PLinkMode == SK_LMODE_FULL) {
308 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_FULL;
309 }
310 else {
311 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_HALF;
312 }
313
314 /* No flow control without auto-negotiation */
315 pPrt->PFlowCtrlStatus = (SK_U8)SK_FLOW_STAT_NONE;
316
317 /* enable Rx/Tx */
318 (void)SkMacRxTxEnable(pAC, IoC, Port);
319 }
320} /* SkHWLinkUp */
321
322
323/******************************************************************************
324 *
325 * SkMacParity() - MAC parity workaround
326 *
327 * Description: handles MAC parity errors correctly
328 *
329 * Returns: N/A
330 */
331static void SkMacParity(
332SK_AC *pAC, /* adapter context */
333SK_IOC IoC, /* IO context */
334int Port) /* Port Index of the port failed */
335{
336 SK_EVPARA Para;
337 SK_GEPORT *pPrt; /* GIni Port struct pointer */
338 SK_U32 TxMax; /* Tx Max Size Counter */
339
340 pPrt = &pAC->GIni.GP[Port];
341
342 /* Clear IRQ Tx Parity Error */
343#ifdef GENESIS
344 if (pAC->GIni.GIGenesis) {
345
346 SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), MFF_CLR_PERR);
347 }
348#endif /* GENESIS */
349
350#ifdef YUKON
351 if (pAC->GIni.GIYukon) {
352 /* HW-Bug #8: cleared by GMF_CLI_TX_FC instead of GMF_CLI_TX_PE */
353 SK_OUT8(IoC, MR_ADDR(Port, TX_GMF_CTRL_T),
354 (SK_U8)((pAC->GIni.GIChipId == CHIP_ID_YUKON &&
355 pAC->GIni.GIChipRev == 0) ? GMF_CLI_TX_FC : GMF_CLI_TX_PE));
356 }
357#endif /* YUKON */
358
359 if (pPrt->PCheckPar) {
360
361 if (Port == MAC_1) {
362 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E016, SKERR_SIRQ_E016MSG);
363 }
364 else {
365 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E017, SKERR_SIRQ_E017MSG);
366 }
367 Para.Para64 = Port;
368 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
369
370 Para.Para32[0] = Port;
371 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
372
373 return;
374 }
375
376 /* Check whether frames with a size of 1k were sent */
377#ifdef GENESIS
378 if (pAC->GIni.GIGenesis) {
379 /* Snap statistic counters */
380 (void)SkXmUpdateStats(pAC, IoC, Port);
381
382 (void)SkXmMacStatistic(pAC, IoC, Port, XM_TXF_MAX_SZ, &TxMax);
383 }
384#endif /* GENESIS */
385
386#ifdef YUKON
387 if (pAC->GIni.GIYukon) {
388
389 (void)SkGmMacStatistic(pAC, IoC, Port, GM_TXF_1518B, &TxMax);
390 }
391#endif /* YUKON */
392
393 if (TxMax > 0) {
394 /* From now on check the parity */
395 pPrt->PCheckPar = SK_TRUE;
396 }
397} /* SkMacParity */
398
399
400/******************************************************************************
401 *
402 * SkGeHwErr() - Hardware Error service routine
403 *
404 * Description: handles all HW Error interrupts
405 *
406 * Returns: N/A
407 */
408static void SkGeHwErr(
409SK_AC *pAC, /* adapter context */
410SK_IOC IoC, /* IO context */
411SK_U32 HwStatus) /* Interrupt status word */
412{
413 SK_EVPARA Para;
414 SK_U16 Word;
415
416 if ((HwStatus & (IS_IRQ_MST_ERR | IS_IRQ_STAT)) != 0) {
417 /* PCI Errors occured */
418 if ((HwStatus & IS_IRQ_STAT) != 0) {
419 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E013, SKERR_SIRQ_E013MSG);
420 }
421 else {
422 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E012, SKERR_SIRQ_E012MSG);
423 }
424
425 /* Reset all bits in the PCI STATUS register */
426 SK_IN16(IoC, PCI_C(PCI_STATUS), &Word);
427
428 SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_ON);
429 SK_OUT16(IoC, PCI_C(PCI_STATUS), (SK_U16)(Word | PCI_ERRBITS));
430 SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
431
432 Para.Para64 = 0;
433 SkEventQueue(pAC, SKGE_DRV, SK_DRV_ADAP_FAIL, Para);
434 }
435
436#ifdef GENESIS
437 if (pAC->GIni.GIGenesis) {
438
439 if ((HwStatus & IS_NO_STAT_M1) != 0) {
440 /* Ignore it */
441 /* This situation is also indicated in the descriptor */
442 SK_OUT16(IoC, MR_ADDR(MAC_1, RX_MFF_CTRL1), MFF_CLR_INSTAT);
443 }
444
445 if ((HwStatus & IS_NO_STAT_M2) != 0) {
446 /* Ignore it */
447 /* This situation is also indicated in the descriptor */
448 SK_OUT16(IoC, MR_ADDR(MAC_2, RX_MFF_CTRL1), MFF_CLR_INSTAT);
449 }
450
451 if ((HwStatus & IS_NO_TIST_M1) != 0) {
452 /* Ignore it */
453 /* This situation is also indicated in the descriptor */
454 SK_OUT16(IoC, MR_ADDR(MAC_1, RX_MFF_CTRL1), MFF_CLR_INTIST);
455 }
456
457 if ((HwStatus & IS_NO_TIST_M2) != 0) {
458 /* Ignore it */
459 /* This situation is also indicated in the descriptor */
460 SK_OUT16(IoC, MR_ADDR(MAC_2, RX_MFF_CTRL1), MFF_CLR_INTIST);
461 }
462 }
463#endif /* GENESIS */
464
465#ifdef YUKON
466 if (pAC->GIni.GIYukon) {
467 /* This is necessary only for Rx timing measurements */
468 if ((HwStatus & IS_IRQ_TIST_OV) != 0) {
469 /* increment Time Stamp Timer counter (high) */
470 pAC->GIni.GITimeStampCnt++;
471
472 /* Clear Time Stamp Timer IRQ */
473 SK_OUT8(IoC, GMAC_TI_ST_CTRL, (SK_U8)GMT_ST_CLR_IRQ);
474 }
475
476 if ((HwStatus & IS_IRQ_SENSOR) != 0) {
477 /* no sensors on 32-bit Yukon */
478 if (pAC->GIni.GIYukon32Bit) {
479 /* disable HW Error IRQ */
480 pAC->GIni.GIValIrqMask &= ~IS_HW_ERR;
481 }
482 }
483 }
484#endif /* YUKON */
485
486 if ((HwStatus & IS_RAM_RD_PAR) != 0) {
487 SK_OUT16(IoC, B3_RI_CTRL, RI_CLR_RD_PERR);
488 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E014, SKERR_SIRQ_E014MSG);
489 Para.Para64 = 0;
490 SkEventQueue(pAC, SKGE_DRV, SK_DRV_ADAP_FAIL, Para);
491 }
492
493 if ((HwStatus & IS_RAM_WR_PAR) != 0) {
494 SK_OUT16(IoC, B3_RI_CTRL, RI_CLR_WR_PERR);
495 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E015, SKERR_SIRQ_E015MSG);
496 Para.Para64 = 0;
497 SkEventQueue(pAC, SKGE_DRV, SK_DRV_ADAP_FAIL, Para);
498 }
499
500 if ((HwStatus & IS_M1_PAR_ERR) != 0) {
501 SkMacParity(pAC, IoC, MAC_1);
502 }
503
504 if ((HwStatus & IS_M2_PAR_ERR) != 0) {
505 SkMacParity(pAC, IoC, MAC_2);
506 }
507
508 if ((HwStatus & IS_R1_PAR_ERR) != 0) {
509 /* Clear IRQ */
510 SK_OUT32(IoC, B0_R1_CSR, CSR_IRQ_CL_P);
511
512 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E018, SKERR_SIRQ_E018MSG);
513 Para.Para64 = MAC_1;
514 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
515
516 Para.Para32[0] = MAC_1;
517 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
518 }
519
520 if ((HwStatus & IS_R2_PAR_ERR) != 0) {
521 /* Clear IRQ */
522 SK_OUT32(IoC, B0_R2_CSR, CSR_IRQ_CL_P);
523
524 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E019, SKERR_SIRQ_E019MSG);
525 Para.Para64 = MAC_2;
526 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
527
528 Para.Para32[0] = MAC_2;
529 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
530 }
531} /* SkGeHwErr */
532
533
534/******************************************************************************
535 *
536 * SkGeSirqIsr() - Special Interrupt Service Routine
537 *
538 * Description: handles all non data transfer specific interrupts (slow path)
539 *
540 * Returns: N/A
541 */
542void SkGeSirqIsr(
543SK_AC *pAC, /* adapter context */
544SK_IOC IoC, /* IO context */
545SK_U32 Istatus) /* Interrupt status word */
546{
547 SK_EVPARA Para;
548 SK_U32 RegVal32; /* Read register value */
549 SK_GEPORT *pPrt; /* GIni Port struct pointer */
550 SK_U16 PhyInt;
551 int i;
552
553 if (((Istatus & IS_HW_ERR) & pAC->GIni.GIValIrqMask) != 0) {
554 /* read the HW Error Interrupt source */
555 SK_IN32(IoC, B0_HWE_ISRC, &RegVal32);
556
557 SkGeHwErr(pAC, IoC, RegVal32);
558 }
559
560 /*
561 * Packet Timeout interrupts
562 */
563 /* Check whether MACs are correctly initialized */
564 if (((Istatus & (IS_PA_TO_RX1 | IS_PA_TO_TX1)) != 0) &&
565 pAC->GIni.GP[MAC_1].PState == SK_PRT_RESET) {
566 /* MAC 1 was not initialized but Packet timeout occured */
567 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E004,
568 SKERR_SIRQ_E004MSG);
569 }
570
571 if (((Istatus & (IS_PA_TO_RX2 | IS_PA_TO_TX2)) != 0) &&
572 pAC->GIni.GP[MAC_2].PState == SK_PRT_RESET) {
573 /* MAC 2 was not initialized but Packet timeout occured */
574 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E005,
575 SKERR_SIRQ_E005MSG);
576 }
577
578 if ((Istatus & IS_PA_TO_RX1) != 0) {
579 /* Means network is filling us up */
580 SK_ERR_LOG(pAC, SK_ERRCL_HW | SK_ERRCL_INIT, SKERR_SIRQ_E002,
581 SKERR_SIRQ_E002MSG);
582 SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_RX1);
583 }
584
585 if ((Istatus & IS_PA_TO_RX2) != 0) {
586 /* Means network is filling us up */
587 SK_ERR_LOG(pAC, SK_ERRCL_HW | SK_ERRCL_INIT, SKERR_SIRQ_E003,
588 SKERR_SIRQ_E003MSG);
589 SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_RX2);
590 }
591
592 if ((Istatus & IS_PA_TO_TX1) != 0) {
593
594 pPrt = &pAC->GIni.GP[0];
595
596 /* May be a normal situation in a server with a slow network */
597 SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_TX1);
598
599#ifdef GENESIS
600 if (pAC->GIni.GIGenesis) {
601 /*
602 * workaround: if in half duplex mode, check for Tx hangup.
603 * Read number of TX'ed bytes, wait for 10 ms, then compare
604 * the number with current value. If nothing changed, we assume
605 * that Tx is hanging and do a FIFO flush (see event routine).
606 */
607 if ((pPrt->PLinkModeStatus == SK_LMODE_STAT_HALF ||
608 pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOHALF) &&
609 !pPrt->HalfDupTimerActive) {
610 /*
611 * many more pack. arb. timeouts may come in between,
612 * we ignore those
613 */
614 pPrt->HalfDupTimerActive = SK_TRUE;
615 /* Snap statistic counters */
616 (void)SkXmUpdateStats(pAC, IoC, 0);
617
618 (void)SkXmMacStatistic(pAC, IoC, 0, XM_TXO_OK_HI, &RegVal32);
619
620 pPrt->LastOctets = (SK_U64)RegVal32 << 32;
621
622 (void)SkXmMacStatistic(pAC, IoC, 0, XM_TXO_OK_LO, &RegVal32);
623
624 pPrt->LastOctets += RegVal32;
625
626 Para.Para32[0] = 0;
627 SkTimerStart(pAC, IoC, &pPrt->HalfDupChkTimer, SK_HALFDUP_CHK_TIME,
628 SKGE_HWAC, SK_HWEV_HALFDUP_CHK, Para);
629 }
630 }
631#endif /* GENESIS */
632 }
633
634 if ((Istatus & IS_PA_TO_TX2) != 0) {
635
636 pPrt = &pAC->GIni.GP[1];
637
638 /* May be a normal situation in a server with a slow network */
639 SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_TX2);
640
641#ifdef GENESIS
642 if (pAC->GIni.GIGenesis) {
643 /* workaround: see above */
644 if ((pPrt->PLinkModeStatus == SK_LMODE_STAT_HALF ||
645 pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOHALF) &&
646 !pPrt->HalfDupTimerActive) {
647 pPrt->HalfDupTimerActive = SK_TRUE;
648 /* Snap statistic counters */
649 (void)SkXmUpdateStats(pAC, IoC, 1);
650
651 (void)SkXmMacStatistic(pAC, IoC, 1, XM_TXO_OK_HI, &RegVal32);
652
653 pPrt->LastOctets = (SK_U64)RegVal32 << 32;
654
655 (void)SkXmMacStatistic(pAC, IoC, 1, XM_TXO_OK_LO, &RegVal32);
656
657 pPrt->LastOctets += RegVal32;
658
659 Para.Para32[0] = 1;
660 SkTimerStart(pAC, IoC, &pPrt->HalfDupChkTimer, SK_HALFDUP_CHK_TIME,
661 SKGE_HWAC, SK_HWEV_HALFDUP_CHK, Para);
662 }
663 }
664#endif /* GENESIS */
665 }
666
667 /* Check interrupts of the particular queues */
668 if ((Istatus & IS_R1_C) != 0) {
669 /* Clear IRQ */
670 SK_OUT32(IoC, B0_R1_CSR, CSR_IRQ_CL_C);
671 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E006,
672 SKERR_SIRQ_E006MSG);
673 Para.Para64 = MAC_1;
674 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
675 Para.Para32[0] = MAC_1;
676 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
677 }
678
679 if ((Istatus & IS_R2_C) != 0) {
680 /* Clear IRQ */
681 SK_OUT32(IoC, B0_R2_CSR, CSR_IRQ_CL_C);
682 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E007,
683 SKERR_SIRQ_E007MSG);
684 Para.Para64 = MAC_2;
685 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
686 Para.Para32[0] = MAC_2;
687 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
688 }
689
690 if ((Istatus & IS_XS1_C) != 0) {
691 /* Clear IRQ */
692 SK_OUT32(IoC, B0_XS1_CSR, CSR_IRQ_CL_C);
693 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E008,
694 SKERR_SIRQ_E008MSG);
695 Para.Para64 = MAC_1;
696 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
697 Para.Para32[0] = MAC_1;
698 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
699 }
700
701 if ((Istatus & IS_XA1_C) != 0) {
702 /* Clear IRQ */
703 SK_OUT32(IoC, B0_XA1_CSR, CSR_IRQ_CL_C);
704 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E009,
705 SKERR_SIRQ_E009MSG);
706 Para.Para64 = MAC_1;
707 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
708 Para.Para32[0] = MAC_1;
709 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
710 }
711
712 if ((Istatus & IS_XS2_C) != 0) {
713 /* Clear IRQ */
714 SK_OUT32(IoC, B0_XS2_CSR, CSR_IRQ_CL_C);
715 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E010,
716 SKERR_SIRQ_E010MSG);
717 Para.Para64 = MAC_2;
718 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
719 Para.Para32[0] = MAC_2;
720 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
721 }
722
723 if ((Istatus & IS_XA2_C) != 0) {
724 /* Clear IRQ */
725 SK_OUT32(IoC, B0_XA2_CSR, CSR_IRQ_CL_C);
726 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E011,
727 SKERR_SIRQ_E011MSG);
728 Para.Para64 = MAC_2;
729 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para);
730 Para.Para32[0] = MAC_2;
731 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
732 }
733
734 /* External reg interrupt */
735 if ((Istatus & IS_EXT_REG) != 0) {
736 /* Test IRQs from PHY */
737 for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
738
739 pPrt = &pAC->GIni.GP[i];
740
741 if (pPrt->PState == SK_PRT_RESET) {
742 continue;
743 }
744
745#ifdef GENESIS
746 if (pAC->GIni.GIGenesis) {
747
748 switch (pPrt->PhyType) {
749
750 case SK_PHY_XMAC:
751 break;
752
753 case SK_PHY_BCOM:
754 SkXmPhyRead(pAC, IoC, i, PHY_BCOM_INT_STAT, &PhyInt);
755
756 if ((PhyInt & ~PHY_B_DEF_MSK) != 0) {
757 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
758 ("Port %d Bcom Int: 0x%04X\n",
759 i, PhyInt));
760 SkPhyIsrBcom(pAC, IoC, i, PhyInt);
761 }
762 break;
763#ifdef OTHER_PHY
764 case SK_PHY_LONE:
765 SkXmPhyRead(pAC, IoC, i, PHY_LONE_INT_STAT, &PhyInt);
766
767 if ((PhyInt & PHY_L_DEF_MSK) != 0) {
768 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
769 ("Port %d Lone Int: %x\n",
770 i, PhyInt));
771 SkPhyIsrLone(pAC, IoC, i, PhyInt);
772 }
773 break;
774#endif /* OTHER_PHY */
775 }
776 }
777#endif /* GENESIS */
778
779#ifdef YUKON
780 if (pAC->GIni.GIYukon) {
781 /* Read PHY Interrupt Status */
782 SkGmPhyRead(pAC, IoC, i, PHY_MARV_INT_STAT, &PhyInt);
783
784 if ((PhyInt & PHY_M_DEF_MSK) != 0) {
785 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
786 ("Port %d Marv Int: 0x%04X\n",
787 i, PhyInt));
788 SkPhyIsrGmac(pAC, IoC, i, PhyInt);
789 }
790 }
791#endif /* YUKON */
792 }
793 }
794
795 /* I2C Ready interrupt */
796 if ((Istatus & IS_I2C_READY) != 0) {
797#ifdef SK_SLIM
798 SK_OUT32(IoC, B2_I2C_IRQ, I2C_CLR_IRQ);
799#else
800 SkI2cIsr(pAC, IoC);
801#endif
802 }
803
804 /* SW forced interrupt */
805 if ((Istatus & IS_IRQ_SW) != 0) {
806 /* clear the software IRQ */
807 SK_OUT8(IoC, B0_CTST, CS_CL_SW_IRQ);
808 }
809
810 if ((Istatus & IS_LNK_SYNC_M1) != 0) {
811 /*
812 * We do NOT need the Link Sync interrupt, because it shows
813 * us only a link going down.
814 */
815 /* clear interrupt */
816 SK_OUT8(IoC, MR_ADDR(MAC_1, LNK_SYNC_CTRL), LED_CLR_IRQ);
817 }
818
819 /* Check MAC after link sync counter */
820 if ((Istatus & IS_MAC1) != 0) {
821 /* IRQ from MAC 1 */
822 SkMacIrq(pAC, IoC, MAC_1);
823 }
824
825 if ((Istatus & IS_LNK_SYNC_M2) != 0) {
826 /*
827 * We do NOT need the Link Sync interrupt, because it shows
828 * us only a link going down.
829 */
830 /* clear interrupt */
831 SK_OUT8(IoC, MR_ADDR(MAC_2, LNK_SYNC_CTRL), LED_CLR_IRQ);
832 }
833
834 /* Check MAC after link sync counter */
835 if ((Istatus & IS_MAC2) != 0) {
836 /* IRQ from MAC 2 */
837 SkMacIrq(pAC, IoC, MAC_2);
838 }
839
840 /* Timer interrupt (served last) */
841 if ((Istatus & IS_TIMINT) != 0) {
842 /* check for HW Errors */
843 if (((Istatus & IS_HW_ERR) & ~pAC->GIni.GIValIrqMask) != 0) {
844 /* read the HW Error Interrupt source */
845 SK_IN32(IoC, B0_HWE_ISRC, &RegVal32);
846
847 SkGeHwErr(pAC, IoC, RegVal32);
848 }
849
850 SkHwtIsr(pAC, IoC);
851 }
852
853} /* SkGeSirqIsr */
854
855
856#ifdef GENESIS
857/******************************************************************************
858 *
859 * SkGePortCheckShorts() - Implementing XMAC Workaround Errata # 2
860 *
861 * return:
862 * 0 o.k. nothing needed
863 * 1 Restart needed on this port
864 */
865static int SkGePortCheckShorts(
866SK_AC *pAC, /* Adapter Context */
867SK_IOC IoC, /* IO Context */
868int Port) /* Which port should be checked */
869{
870 SK_U32 Shorts; /* Short Event Counter */
871 SK_U32 CheckShorts; /* Check value for Short Event Counter */
872 SK_U64 RxCts; /* Rx Counter (packets on network) */
873 SK_U32 RxTmp; /* Rx temp. Counter */
874 SK_U32 FcsErrCts; /* FCS Error Counter */
875 SK_GEPORT *pPrt; /* GIni Port struct pointer */
876 int Rtv; /* Return value */
877 int i;
878
879 pPrt = &pAC->GIni.GP[Port];
880
881 /* Default: no action */
882 Rtv = SK_HW_PS_NONE;
883
884 (void)SkXmUpdateStats(pAC, IoC, Port);
885
886 /* Extra precaution: check for short Event counter */
887 (void)SkXmMacStatistic(pAC, IoC, Port, XM_RXE_SHT_ERR, &Shorts);
888
889 /*
890 * Read Rx counters (packets seen on the network and not necessarily
891 * really received.
892 */
893 RxCts = 0;
894
895 for (i = 0; i < sizeof(SkGeRxRegs)/sizeof(SkGeRxRegs[0]); i++) {
896
897 (void)SkXmMacStatistic(pAC, IoC, Port, SkGeRxRegs[i], &RxTmp);
898
899 RxCts += (SK_U64)RxTmp;
900 }
901
902 /* On default: check shorts against zero */
903 CheckShorts = 0;
904
905 /* Extra precaution on active links */
906 if (pPrt->PHWLinkUp) {
907 /* Reset Link Restart counter */
908 pPrt->PLinkResCt = 0;
909 pPrt->PAutoNegTOCt = 0;
910
911 /* If link is up check for 2 */
912 CheckShorts = 2;
913
914 (void)SkXmMacStatistic(pAC, IoC, Port, XM_RXF_FCS_ERR, &FcsErrCts);
915
916 if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE &&
917 pPrt->PLipaAutoNeg == SK_LIPA_UNKNOWN &&
918 (pPrt->PLinkMode == SK_LMODE_HALF ||
919 pPrt->PLinkMode == SK_LMODE_FULL)) {
920 /*
921 * This is autosensing and we are in the fallback
922 * manual full/half duplex mode.
923 */
924 if (RxCts == pPrt->PPrevRx) {
925 /* Nothing received, restart link */
926 pPrt->PPrevFcs = FcsErrCts;
927 pPrt->PPrevShorts = Shorts;
928
929 return(SK_HW_PS_RESTART);
930 }
931 else {
932 pPrt->PLipaAutoNeg = SK_LIPA_MANUAL;
933 }
934 }
935
936 if (((RxCts - pPrt->PPrevRx) > pPrt->PRxLim) ||
937 (!(FcsErrCts - pPrt->PPrevFcs))) {
938 /*
939 * Note: The compare with zero above has to be done the way shown,
940 * otherwise the Linux driver will have a problem.
941 */
942 /*
943 * We received a bunch of frames or no CRC error occured on the
944 * network -> ok.
945 */
946 pPrt->PPrevRx = RxCts;
947 pPrt->PPrevFcs = FcsErrCts;
948 pPrt->PPrevShorts = Shorts;
949
950 return(SK_HW_PS_NONE);
951 }
952
953 pPrt->PPrevFcs = FcsErrCts;
954 }
955
956
957 if ((Shorts - pPrt->PPrevShorts) > CheckShorts) {
958 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
959 ("Short Event Count Restart Port %d \n", Port));
960 Rtv = SK_HW_PS_RESTART;
961 }
962
963 pPrt->PPrevShorts = Shorts;
964 pPrt->PPrevRx = RxCts;
965
966 return(Rtv);
967} /* SkGePortCheckShorts */
968#endif /* GENESIS */
969
970
971/******************************************************************************
972 *
973 * SkGePortCheckUp() - Check if the link is up
974 *
975 * return:
976 * 0 o.k. nothing needed
977 * 1 Restart needed on this port
978 * 2 Link came up
979 */
980static int SkGePortCheckUp(
981SK_AC *pAC, /* Adapter Context */
982SK_IOC IoC, /* IO Context */
983int Port) /* Which port should be checked */
984{
985 SK_GEPORT *pPrt; /* GIni Port struct pointer */
986 SK_BOOL AutoNeg; /* Is Auto-negotiation used ? */
987 int Rtv; /* Return value */
988
989 Rtv = SK_HW_PS_NONE;
990
991 pPrt = &pAC->GIni.GP[Port];
992
993 if (pPrt->PLinkMode == SK_LMODE_HALF || pPrt->PLinkMode == SK_LMODE_FULL) {
994 AutoNeg = SK_FALSE;
995 }
996 else {
997 AutoNeg = SK_TRUE;
998 }
999
1000#ifdef GENESIS
1001 if (pAC->GIni.GIGenesis) {
1002
1003 switch (pPrt->PhyType) {
1004
1005 case SK_PHY_XMAC:
1006 Rtv = SkGePortCheckUpXmac(pAC, IoC, Port, AutoNeg);
1007 break;
1008 case SK_PHY_BCOM:
1009 Rtv = SkGePortCheckUpBcom(pAC, IoC, Port, AutoNeg);
1010 break;
1011#ifdef OTHER_PHY
1012 case SK_PHY_LONE:
1013 Rtv = SkGePortCheckUpLone(pAC, IoC, Port, AutoNeg);
1014 break;
1015 case SK_PHY_NAT:
1016 Rtv = SkGePortCheckUpNat(pAC, IoC, Port, AutoNeg);
1017 break;
1018#endif /* OTHER_PHY */
1019 }
1020 }
1021#endif /* GENESIS */
1022
1023#ifdef YUKON
1024 if (pAC->GIni.GIYukon) {
1025
1026 Rtv = SkGePortCheckUpGmac(pAC, IoC, Port, AutoNeg);
1027 }
1028#endif /* YUKON */
1029
1030 return(Rtv);
1031} /* SkGePortCheckUp */
1032
1033
1034#ifdef GENESIS
1035/******************************************************************************
1036 *
1037 * SkGePortCheckUpXmac() - Implementing of the Workaround Errata # 2
1038 *
1039 * return:
1040 * 0 o.k. nothing needed
1041 * 1 Restart needed on this port
1042 * 2 Link came up
1043 */
1044static int SkGePortCheckUpXmac(
1045SK_AC *pAC, /* Adapter Context */
1046SK_IOC IoC, /* IO Context */
1047int Port, /* Which port should be checked */
1048SK_BOOL AutoNeg) /* Is Auto-negotiation used ? */
1049{
1050 SK_U32 Shorts; /* Short Event Counter */
1051 SK_GEPORT *pPrt; /* GIni Port struct pointer */
1052 int Done;
1053 SK_U32 GpReg; /* General Purpose register value */
1054 SK_U16 Isrc; /* Interrupt source register */
1055 SK_U16 IsrcSum; /* Interrupt source register sum */
1056 SK_U16 LpAb; /* Link Partner Ability */
1057 SK_U16 ResAb; /* Resolved Ability */
1058 SK_U16 ExtStat; /* Extended Status Register */
1059 SK_U8 NextMode; /* Next AutoSensing Mode */
1060
1061 pPrt = &pAC->GIni.GP[Port];
1062
1063 if (pPrt->PHWLinkUp) {
1064 if (pPrt->PhyType != SK_PHY_XMAC) {
1065 return(SK_HW_PS_NONE);
1066 }
1067 else {
1068 return(SkGePortCheckShorts(pAC, IoC, Port));
1069 }
1070 }
1071
1072 IsrcSum = pPrt->PIsave;
1073 pPrt->PIsave = 0;
1074
1075 /* Now wait for each port's link */
1076 if (pPrt->PLinkBroken) {
1077 /* Link was broken */
1078 XM_IN32(IoC, Port, XM_GP_PORT, &GpReg);
1079
1080 if ((GpReg & XM_GP_INP_ASS) == 0) {
1081 /* The Link is in sync */
1082 XM_IN16(IoC, Port, XM_ISRC, &Isrc);
1083 IsrcSum |= Isrc;
1084 SkXmAutoNegLipaXmac(pAC, IoC, Port, IsrcSum);
1085
1086 if ((Isrc & XM_IS_INP_ASS) == 0) {
1087 /* It has been in sync since last time */
1088 /* Restart the PORT */
1089 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
1090 ("Link in sync Restart Port %d\n", Port));
1091
1092 (void)SkXmUpdateStats(pAC, IoC, Port);
1093
1094 /* We now need to reinitialize the PrevShorts counter */
1095 (void)SkXmMacStatistic(pAC, IoC, Port, XM_RXE_SHT_ERR, &Shorts);
1096 pPrt->PPrevShorts = Shorts;
1097
1098 pPrt->PLinkBroken = SK_FALSE;
1099
1100 /*
1101 * Link Restart Workaround:
1102 * it may be possible that the other Link side
1103 * restarts its link as well an we detect
1104 * another LinkBroken. To prevent this
1105 * happening we check for a maximum number
1106 * of consecutive restart. If those happens,
1107 * we do NOT restart the active link and
1108 * check whether the link is now o.k.
1109 */
1110 pPrt->PLinkResCt++;
1111
1112 pPrt->PAutoNegTimeOut = 0;
1113
1114 if (pPrt->PLinkResCt < SK_MAX_LRESTART) {
1115 return(SK_HW_PS_RESTART);
1116 }
1117
1118 pPrt->PLinkResCt = 0;
1119
1120 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1121 ("Do NOT restart on Port %d %x %x\n", Port, Isrc, IsrcSum));
1122 }
1123 else {
1124 pPrt->PIsave = (SK_U16)(IsrcSum & XM_IS_AND);
1125
1126 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1127 ("Save Sync/nosync Port %d %x %x\n", Port, Isrc, IsrcSum));
1128
1129 /* Do nothing more if link is broken */
1130 return(SK_HW_PS_NONE);
1131 }
1132 }
1133 else {
1134 /* Do nothing more if link is broken */
1135 return(SK_HW_PS_NONE);
1136 }
1137
1138 }
1139 else {
1140 /* Link was not broken, check if it is */
1141 XM_IN16(IoC, Port, XM_ISRC, &Isrc);
1142 IsrcSum |= Isrc;
1143 if ((Isrc & XM_IS_INP_ASS) != 0) {
1144 XM_IN16(IoC, Port, XM_ISRC, &Isrc);
1145 IsrcSum |= Isrc;
1146 if ((Isrc & XM_IS_INP_ASS) != 0) {
1147 XM_IN16(IoC, Port, XM_ISRC, &Isrc);
1148 IsrcSum |= Isrc;
1149 if ((Isrc & XM_IS_INP_ASS) != 0) {
1150 pPrt->PLinkBroken = SK_TRUE;
1151 /* Re-Init Link partner Autoneg flag */
1152 pPrt->PLipaAutoNeg = SK_LIPA_UNKNOWN;
1153 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
1154 ("Link broken Port %d\n", Port));
1155
1156 /* Cable removed-> reinit sense mode */
1157 SkHWInitDefSense(pAC, IoC, Port);
1158
1159 return(SK_HW_PS_RESTART);
1160 }
1161 }
1162 }
1163 else {
1164 SkXmAutoNegLipaXmac(pAC, IoC, Port, Isrc);
1165
1166 if (SkGePortCheckShorts(pAC, IoC, Port) == SK_HW_PS_RESTART) {
1167 return(SK_HW_PS_RESTART);
1168 }
1169 }
1170 }
1171
1172 /*
1173 * here we usually can check whether the link is in sync and
1174 * auto-negotiation is done.
1175 */
1176 XM_IN32(IoC, Port, XM_GP_PORT, &GpReg);
1177 XM_IN16(IoC, Port, XM_ISRC, &Isrc);
1178 IsrcSum |= Isrc;
1179
1180 SkXmAutoNegLipaXmac(pAC, IoC, Port, IsrcSum);
1181
1182 if ((GpReg & XM_GP_INP_ASS) != 0 || (IsrcSum & XM_IS_INP_ASS) != 0) {
1183 if ((GpReg & XM_GP_INP_ASS) == 0) {
1184 /* Save Auto-negotiation Done interrupt only if link is in sync */
1185 pPrt->PIsave = (SK_U16)(IsrcSum & XM_IS_AND);
1186 }
1187#ifdef DEBUG
1188 if ((pPrt->PIsave & XM_IS_AND) != 0) {
1189 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1190 ("AutoNeg done rescheduled Port %d\n", Port));
1191 }
1192#endif /* DEBUG */
1193 return(SK_HW_PS_NONE);
1194 }
1195
1196 if (AutoNeg) {
1197 if ((IsrcSum & XM_IS_AND) != 0) {
1198 SkHWLinkUp(pAC, IoC, Port);
1199 Done = SkMacAutoNegDone(pAC, IoC, Port);
1200 if (Done != SK_AND_OK) {
1201 /* Get PHY parameters, for debugging only */
1202 SkXmPhyRead(pAC, IoC, Port, PHY_XMAC_AUNE_LP, &LpAb);
1203 SkXmPhyRead(pAC, IoC, Port, PHY_XMAC_RES_ABI, &ResAb);
1204 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1205 ("AutoNeg FAIL Port %d (LpAb %x, ResAb %x)\n",
1206 Port, LpAb, ResAb));
1207
1208 /* Try next possible mode */
1209 NextMode = SkHWSenseGetNext(pAC, IoC, Port);
1210 SkHWLinkDown(pAC, IoC, Port);
1211 if (Done == SK_AND_DUP_CAP) {
1212 /* GoTo next mode */
1213 SkHWSenseSetNext(pAC, IoC, Port, NextMode);
1214 }
1215
1216 return(SK_HW_PS_RESTART);
1217 }
1218 /*
1219 * Dummy Read extended status to prevent extra link down/ups
1220 * (clear Page Received bit if set)
1221 */
1222 SkXmPhyRead(pAC, IoC, Port, PHY_XMAC_AUNE_EXP, &ExtStat);
1223
1224 return(SK_HW_PS_LINK);
1225 }
1226
1227 /* AutoNeg not done, but HW link is up. Check for timeouts */
1228 pPrt->PAutoNegTimeOut++;
1229 if (pPrt->PAutoNegTimeOut >= SK_AND_MAX_TO) {
1230 /* Increase the Timeout counter */
1231 pPrt->PAutoNegTOCt++;
1232
1233 /* Timeout occured */
1234 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
1235 ("AutoNeg timeout Port %d\n", Port));
1236 if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE &&
1237 pPrt->PLipaAutoNeg != SK_LIPA_AUTO) {
1238 /* Set Link manually up */
1239 SkHWSenseSetNext(pAC, IoC, Port, SK_LMODE_FULL);
1240 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
1241 ("Set manual full duplex Port %d\n", Port));
1242 }
1243
1244 if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE &&
1245 pPrt->PLipaAutoNeg == SK_LIPA_AUTO &&
1246 pPrt->PAutoNegTOCt >= SK_MAX_ANEG_TO) {
1247 /*
1248 * This is rather complicated.
1249 * we need to check here whether the LIPA_AUTO
1250 * we saw before is false alert. We saw at one
1251 * switch ( SR8800) that on boot time it sends
1252 * just one auto-neg packet and does no further
1253 * auto-negotiation.
1254 * Solution: we restart the autosensing after
1255 * a few timeouts.
1256 */
1257 pPrt->PAutoNegTOCt = 0;
1258 pPrt->PLipaAutoNeg = SK_LIPA_UNKNOWN;
1259 SkHWInitDefSense(pAC, IoC, Port);
1260 }
1261
1262 /* Do the restart */
1263 return(SK_HW_PS_RESTART);
1264 }
1265 }
1266 else {
1267 /* Link is up and we don't need more */
1268#ifdef DEBUG
1269 if (pPrt->PLipaAutoNeg == SK_LIPA_AUTO) {
1270 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1271 ("ERROR: Lipa auto detected on port %d\n", Port));
1272 }
1273#endif /* DEBUG */
1274 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
1275 ("Link sync(GP), Port %d\n", Port));
1276 SkHWLinkUp(pAC, IoC, Port);
1277
1278 /*
1279 * Link sync (GP) and so assume a good connection. But if not received
1280 * a bunch of frames received in a time slot (maybe broken tx cable)
1281 * the port is restart.
1282 */
1283 return(SK_HW_PS_LINK);
1284 }
1285
1286 return(SK_HW_PS_NONE);
1287} /* SkGePortCheckUpXmac */
1288
1289
1290/******************************************************************************
1291 *
1292 * SkGePortCheckUpBcom() - Check if the link is up on Bcom PHY
1293 *
1294 * return:
1295 * 0 o.k. nothing needed
1296 * 1 Restart needed on this port
1297 * 2 Link came up
1298 */
1299static int SkGePortCheckUpBcom(
1300SK_AC *pAC, /* Adapter Context */
1301SK_IOC IoC, /* IO Context */
1302int Port, /* Which port should be checked */
1303SK_BOOL AutoNeg) /* Is Auto-negotiation used ? */
1304{
1305 SK_GEPORT *pPrt; /* GIni Port struct pointer */
1306 int Done;
1307 SK_U16 Isrc; /* Interrupt source register */
1308 SK_U16 PhyStat; /* Phy Status Register */
1309 SK_U16 ResAb; /* Master/Slave resolution */
1310 SK_U16 Ctrl; /* Broadcom control flags */
1311#ifdef DEBUG
1312 SK_U16 LpAb;
1313 SK_U16 ExtStat;
1314#endif /* DEBUG */
1315
1316 pPrt = &pAC->GIni.GP[Port];
1317
1318 /* Check for No HCD Link events (#10523) */
1319 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_INT_STAT, &Isrc);
1320
1321#ifdef xDEBUG
1322 if ((Isrc & ~(PHY_B_IS_HCT | PHY_B_IS_LCT)) ==
1323 (PHY_B_IS_SCR_S_ER | PHY_B_IS_RRS_CHANGE | PHY_B_IS_LRS_CHANGE)) {
1324
1325 SK_U32 Stat1, Stat2, Stat3;
1326
1327 Stat1 = 0;
1328 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_INT_MASK, &Stat1);
1329 CMSMPrintString(
1330 pAC->pConfigTable,
1331 MSG_TYPE_RUNTIME_INFO,
1332 "CheckUp1 - Stat: %x, Mask: %x",
1333 (void *)Isrc,
1334 (void *)Stat1);
1335
1336 Stat1 = 0;
1337 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_CTRL, &Stat1);
1338 Stat2 = 0;
1339 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_STAT, &Stat2);
1340 Stat1 = Stat1 << 16 | Stat2;
1341 Stat2 = 0;
1342 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUNE_ADV, &Stat2);
1343 Stat3 = 0;
1344 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUNE_LP, &Stat3);
1345 Stat2 = Stat2 << 16 | Stat3;
1346 CMSMPrintString(
1347 pAC->pConfigTable,
1348 MSG_TYPE_RUNTIME_INFO,
1349 "Ctrl/Stat: %x, AN Adv/LP: %x",
1350 (void *)Stat1,
1351 (void *)Stat2);
1352
1353 Stat1 = 0;
1354 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUNE_EXP, &Stat1);
1355 Stat2 = 0;
1356 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_EXT_STAT, &Stat2);
1357 Stat1 = Stat1 << 16 | Stat2;
1358 Stat2 = 0;
1359 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_1000T_CTRL, &Stat2);
1360 Stat3 = 0;
1361 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_1000T_STAT, &Stat3);
1362 Stat2 = Stat2 << 16 | Stat3;
1363 CMSMPrintString(
1364 pAC->pConfigTable,
1365 MSG_TYPE_RUNTIME_INFO,
1366 "AN Exp/IEEE Ext: %x, 1000T Ctrl/Stat: %x",
1367 (void *)Stat1,
1368 (void *)Stat2);
1369
1370 Stat1 = 0;
1371 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_P_EXT_CTRL, &Stat1);
1372 Stat2 = 0;
1373 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_P_EXT_STAT, &Stat2);
1374 Stat1 = Stat1 << 16 | Stat2;
1375 Stat2 = 0;
1376 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUX_CTRL, &Stat2);
1377 Stat3 = 0;
1378 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUX_STAT, &Stat3);
1379 Stat2 = Stat2 << 16 | Stat3;
1380 CMSMPrintString(
1381 pAC->pConfigTable,
1382 MSG_TYPE_RUNTIME_INFO,
1383 "PHY Ext Ctrl/Stat: %x, Aux Ctrl/Stat: %x",
1384 (void *)Stat1,
1385 (void *)Stat2);
1386 }
1387#endif /* DEBUG */
1388
1389 if ((Isrc & (PHY_B_IS_NO_HDCL /* | PHY_B_IS_NO_HDC */)) != 0) {
1390 /*
1391 * Workaround BCom Errata:
1392 * enable and disable loopback mode if "NO HCD" occurs.
1393 */
1394 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_CTRL, &Ctrl);
1395 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_CTRL,
1396 (SK_U16)(Ctrl | PHY_CT_LOOP));
1397 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_CTRL,
1398 (SK_U16)(Ctrl & ~PHY_CT_LOOP));
1399 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1400 ("No HCD Link event, Port %d\n", Port));
1401#ifdef xDEBUG
1402 CMSMPrintString(
1403 pAC->pConfigTable,
1404 MSG_TYPE_RUNTIME_INFO,
1405 "No HCD link event, port %d.",
1406 (void *)Port,
1407 (void *)NULL);
1408#endif /* DEBUG */
1409 }
1410
1411 /* Not obsolete: link status bit is latched to 0 and autoclearing! */
1412 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_STAT, &PhyStat);
1413
1414 if (pPrt->PHWLinkUp) {
1415 return(SK_HW_PS_NONE);
1416 }
1417
1418#ifdef xDEBUG
1419 {
1420 SK_U32 Stat1, Stat2, Stat3;
1421
1422 Stat1 = 0;
1423 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_INT_MASK, &Stat1);
1424 CMSMPrintString(
1425 pAC->pConfigTable,
1426 MSG_TYPE_RUNTIME_INFO,
1427 "CheckUp1a - Stat: %x, Mask: %x",
1428 (void *)Isrc,
1429 (void *)Stat1);
1430
1431 Stat1 = 0;
1432 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_CTRL, &Stat1);
1433 Stat2 = 0;
1434 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_STAT, &PhyStat);
1435 Stat1 = Stat1 << 16 | PhyStat;
1436 Stat2 = 0;
1437 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUNE_ADV, &Stat2);
1438 Stat3 = 0;
1439 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUNE_LP, &Stat3);
1440 Stat2 = Stat2 << 16 | Stat3;
1441 CMSMPrintString(
1442 pAC->pConfigTable,
1443 MSG_TYPE_RUNTIME_INFO,
1444 "Ctrl/Stat: %x, AN Adv/LP: %x",
1445 (void *)Stat1,
1446 (void *)Stat2);
1447
1448 Stat1 = 0;
1449 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUNE_EXP, &Stat1);
1450 Stat2 = 0;
1451 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_EXT_STAT, &Stat2);
1452 Stat1 = Stat1 << 16 | Stat2;
1453 Stat2 = 0;
1454 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_1000T_CTRL, &Stat2);
1455 Stat3 = 0;
1456 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_1000T_STAT, &ResAb);
1457 Stat2 = Stat2 << 16 | ResAb;
1458 CMSMPrintString(
1459 pAC->pConfigTable,
1460 MSG_TYPE_RUNTIME_INFO,
1461 "AN Exp/IEEE Ext: %x, 1000T Ctrl/Stat: %x",
1462 (void *)Stat1,
1463 (void *)Stat2);
1464
1465 Stat1 = 0;
1466 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_P_EXT_CTRL, &Stat1);
1467 Stat2 = 0;
1468 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_P_EXT_STAT, &Stat2);
1469 Stat1 = Stat1 << 16 | Stat2;
1470 Stat2 = 0;
1471 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUX_CTRL, &Stat2);
1472 Stat3 = 0;
1473 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUX_STAT, &Stat3);
1474 Stat2 = Stat2 << 16 | Stat3;
1475 CMSMPrintString(
1476 pAC->pConfigTable,
1477 MSG_TYPE_RUNTIME_INFO,
1478 "PHY Ext Ctrl/Stat: %x, Aux Ctrl/Stat: %x",
1479 (void *)Stat1,
1480 (void *)Stat2);
1481 }
1482#endif /* DEBUG */
1483
1484 /*
1485 * Here we usually can check whether the link is in sync and
1486 * auto-negotiation is done.
1487 */
1488
1489 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_STAT, &PhyStat);
1490
1491 SkMacAutoNegLipaPhy(pAC, IoC, Port, PhyStat);
1492
1493 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1494 ("CheckUp Port %d, PhyStat: 0x%04X\n", Port, PhyStat));
1495
1496 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_1000T_STAT, &ResAb);
1497
1498 if ((ResAb & PHY_B_1000S_MSF) != 0) {
1499 /* Error */
1500 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1501 ("Master/Slave Fault port %d\n", Port));
1502
1503 pPrt->PAutoNegFail = SK_TRUE;
1504 pPrt->PMSStatus = SK_MS_STAT_FAULT;
1505
1506 return(SK_HW_PS_RESTART);
1507 }
1508
1509 if ((PhyStat & PHY_ST_LSYNC) == 0) {
1510 return(SK_HW_PS_NONE);
1511 }
1512
1513 pPrt->PMSStatus = ((ResAb & PHY_B_1000S_MSR) != 0) ?
1514 SK_MS_STAT_MASTER : SK_MS_STAT_SLAVE;
1515
1516 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1517 ("Port %d, ResAb: 0x%04X\n", Port, ResAb));
1518
1519 if (AutoNeg) {
1520 if ((PhyStat & PHY_ST_AN_OVER) != 0) {
1521
1522 SkHWLinkUp(pAC, IoC, Port);
1523
1524 Done = SkMacAutoNegDone(pAC, IoC, Port);
1525
1526 if (Done != SK_AND_OK) {
1527#ifdef DEBUG
1528 /* Get PHY parameters, for debugging only */
1529 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUNE_LP, &LpAb);
1530 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_1000T_STAT, &ExtStat);
1531 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1532 ("AutoNeg FAIL Port %d (LpAb %x, 1000TStat %x)\n",
1533 Port, LpAb, ExtStat));
1534#endif /* DEBUG */
1535 return(SK_HW_PS_RESTART);
1536 }
1537 else {
1538#ifdef xDEBUG
1539 /* Dummy read ISR to prevent extra link downs/ups */
1540 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_INT_STAT, &ExtStat);
1541
1542 if ((ExtStat & ~(PHY_B_IS_HCT | PHY_B_IS_LCT)) != 0) {
1543 CMSMPrintString(
1544 pAC->pConfigTable,
1545 MSG_TYPE_RUNTIME_INFO,
1546 "CheckUp2 - Stat: %x",
1547 (void *)ExtStat,
1548 (void *)NULL);
1549 }
1550#endif /* DEBUG */
1551 return(SK_HW_PS_LINK);
1552 }
1553 }
1554 }
1555 else { /* !AutoNeg */
1556 /* Link is up and we don't need more. */
1557#ifdef DEBUG
1558 if (pPrt->PLipaAutoNeg == SK_LIPA_AUTO) {
1559 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1560 ("ERROR: Lipa auto detected on port %d\n", Port));
1561 }
1562#endif /* DEBUG */
1563
1564#ifdef xDEBUG
1565 /* Dummy read ISR to prevent extra link downs/ups */
1566 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_INT_STAT, &ExtStat);
1567
1568 if ((ExtStat & ~(PHY_B_IS_HCT | PHY_B_IS_LCT)) != 0) {
1569 CMSMPrintString(
1570 pAC->pConfigTable,
1571 MSG_TYPE_RUNTIME_INFO,
1572 "CheckUp3 - Stat: %x",
1573 (void *)ExtStat,
1574 (void *)NULL);
1575 }
1576#endif /* DEBUG */
1577
1578 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
1579 ("Link sync(GP), Port %d\n", Port));
1580 SkHWLinkUp(pAC, IoC, Port);
1581
1582 return(SK_HW_PS_LINK);
1583 }
1584
1585 return(SK_HW_PS_NONE);
1586} /* SkGePortCheckUpBcom */
1587#endif /* GENESIS */
1588
1589
1590#ifdef YUKON
1591/******************************************************************************
1592 *
1593 * SkGePortCheckUpGmac() - Check if the link is up on Marvell PHY
1594 *
1595 * return:
1596 * 0 o.k. nothing needed
1597 * 1 Restart needed on this port
1598 * 2 Link came up
1599 */
1600static int SkGePortCheckUpGmac(
1601SK_AC *pAC, /* Adapter Context */
1602SK_IOC IoC, /* IO Context */
1603int Port, /* Which port should be checked */
1604SK_BOOL AutoNeg) /* Is Auto-negotiation used ? */
1605{
1606 SK_GEPORT *pPrt; /* GIni Port struct pointer */
1607 int Done;
1608 SK_U16 PhyIsrc; /* PHY Interrupt source */
1609 SK_U16 PhyStat; /* PPY Status */
1610 SK_U16 PhySpecStat;/* PHY Specific Status */
1611 SK_U16 ResAb; /* Master/Slave resolution */
1612 SK_EVPARA Para;
1613#ifdef DEBUG
1614 SK_U16 Word; /* I/O helper */
1615#endif /* DEBUG */
1616
1617 pPrt = &pAC->GIni.GP[Port];
1618
1619 if (pPrt->PHWLinkUp) {
1620 return(SK_HW_PS_NONE);
1621 }
1622
1623 /* Read PHY Status */
1624 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_STAT, &PhyStat);
1625
1626 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1627 ("CheckUp Port %d, PhyStat: 0x%04X\n", Port, PhyStat));
1628
1629 /* Read PHY Interrupt Status */
1630 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_INT_STAT, &PhyIsrc);
1631
1632 if ((PhyIsrc & PHY_M_IS_AN_COMPL) != 0) {
1633 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1634 ("Auto-Negotiation Completed, PhyIsrc: 0x%04X\n", PhyIsrc));
1635 }
1636
1637 if ((PhyIsrc & PHY_M_IS_LSP_CHANGE) != 0) {
1638 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1639 ("Link Speed Changed, PhyIsrc: 0x%04X\n", PhyIsrc));
1640 }
1641
1642 SkMacAutoNegLipaPhy(pAC, IoC, Port, PhyStat);
1643
1644 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_1000T_STAT, &ResAb);
1645
1646 if ((ResAb & PHY_B_1000S_MSF) != 0) {
1647 /* Error */
1648 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1649 ("Master/Slave Fault port %d\n", Port));
1650
1651 pPrt->PAutoNegFail = SK_TRUE;
1652 pPrt->PMSStatus = SK_MS_STAT_FAULT;
1653
1654 return(SK_HW_PS_RESTART);
1655 }
1656
1657 /* Read PHY Specific Status */
1658 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_PHY_STAT, &PhySpecStat);
1659
1660 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1661 ("Phy1000BT: 0x%04X, PhySpecStat: 0x%04X\n", ResAb, PhySpecStat));
1662
1663#ifdef DEBUG
1664 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_AUNE_EXP, &Word);
1665
1666 if ((PhyIsrc & PHY_M_IS_AN_PR) != 0 || (Word & PHY_ANE_RX_PG) != 0 ||
1667 (PhySpecStat & PHY_M_PS_PAGE_REC) != 0) {
1668 /* Read PHY Next Page Link Partner */
1669 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_NEPG_LP, &Word);
1670
1671 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1672 ("Page Received, NextPage: 0x%04X\n", Word));
1673 }
1674#endif /* DEBUG */
1675
1676 if ((PhySpecStat & PHY_M_PS_LINK_UP) == 0) {
1677 return(SK_HW_PS_NONE);
1678 }
1679
1680 if ((PhySpecStat & PHY_M_PS_DOWNS_STAT) != 0 ||
1681 (PhyIsrc & PHY_M_IS_DOWNSH_DET) != 0) {
1682 /* Downshift detected */
1683 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E025, SKERR_SIRQ_E025MSG);
1684
1685 Para.Para64 = Port;
1686 SkEventQueue(pAC, SKGE_DRV, SK_DRV_DOWNSHIFT_DET, Para);
1687
1688 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1689 ("Downshift detected, PhyIsrc: 0x%04X\n", PhyIsrc));
1690 }
1691
1692 pPrt->PMSStatus = ((ResAb & PHY_B_1000S_MSR) != 0) ?
1693 SK_MS_STAT_MASTER : SK_MS_STAT_SLAVE;
1694
1695 pPrt->PCableLen = (SK_U8)((PhySpecStat & PHY_M_PS_CABLE_MSK) >> 7);
1696
1697 if (AutoNeg) {
1698 /* Auto-Negotiation Over ? */
1699 if ((PhyStat & PHY_ST_AN_OVER) != 0) {
1700
1701 SkHWLinkUp(pAC, IoC, Port);
1702
1703 Done = SkMacAutoNegDone(pAC, IoC, Port);
1704
1705 if (Done != SK_AND_OK) {
1706 return(SK_HW_PS_RESTART);
1707 }
1708
1709 return(SK_HW_PS_LINK);
1710 }
1711 }
1712 else { /* !AutoNeg */
1713 /* Link is up and we don't need more */
1714#ifdef DEBUG
1715 if (pPrt->PLipaAutoNeg == SK_LIPA_AUTO) {
1716 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1717 ("ERROR: Lipa auto detected on port %d\n", Port));
1718 }
1719#endif /* DEBUG */
1720
1721 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
1722 ("Link sync, Port %d\n", Port));
1723 SkHWLinkUp(pAC, IoC, Port);
1724
1725 return(SK_HW_PS_LINK);
1726 }
1727
1728 return(SK_HW_PS_NONE);
1729} /* SkGePortCheckUpGmac */
1730#endif /* YUKON */
1731
1732
1733#ifdef OTHER_PHY
1734/******************************************************************************
1735 *
1736 * SkGePortCheckUpLone() - Check if the link is up on Level One PHY
1737 *
1738 * return:
1739 * 0 o.k. nothing needed
1740 * 1 Restart needed on this port
1741 * 2 Link came up
1742 */
1743static int SkGePortCheckUpLone(
1744SK_AC *pAC, /* Adapter Context */
1745SK_IOC IoC, /* IO Context */
1746int Port, /* Which port should be checked */
1747SK_BOOL AutoNeg) /* Is Auto-negotiation used ? */
1748{
1749 SK_GEPORT *pPrt; /* GIni Port struct pointer */
1750 int Done;
1751 SK_U16 Isrc; /* Interrupt source register */
1752 SK_U16 LpAb; /* Link Partner Ability */
1753 SK_U16 ExtStat; /* Extended Status Register */
1754 SK_U16 PhyStat; /* Phy Status Register */
1755 SK_U16 StatSum;
1756 SK_U8 NextMode; /* Next AutoSensing Mode */
1757
1758 pPrt = &pAC->GIni.GP[Port];
1759
1760 if (pPrt->PHWLinkUp) {
1761 return(SK_HW_PS_NONE);
1762 }
1763
1764 StatSum = pPrt->PIsave;
1765 pPrt->PIsave = 0;
1766
1767 /*
1768 * here we usually can check whether the link is in sync and
1769 * auto-negotiation is done.
1770 */
1771 SkXmPhyRead(pAC, IoC, Port, PHY_LONE_STAT, &PhyStat);
1772 StatSum |= PhyStat;
1773
1774 SkMacAutoNegLipaPhy(pAC, IoC, Port, PhyStat);
1775
1776 if ((PhyStat & PHY_ST_LSYNC) == 0) {
1777 /* Save Auto-negotiation Done bit */
1778 pPrt->PIsave = (SK_U16)(StatSum & PHY_ST_AN_OVER);
1779#ifdef DEBUG
1780 if ((pPrt->PIsave & PHY_ST_AN_OVER) != 0) {
1781 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1782 ("AutoNeg done rescheduled Port %d\n", Port));
1783 }
1784#endif /* DEBUG */
1785 return(SK_HW_PS_NONE);
1786 }
1787
1788 if (AutoNeg) {
1789 if ((StatSum & PHY_ST_AN_OVER) != 0) {
1790 SkHWLinkUp(pAC, IoC, Port);
1791 Done = SkMacAutoNegDone(pAC, IoC, Port);
1792 if (Done != SK_AND_OK) {
1793 /* Get PHY parameters, for debugging only */
1794 SkXmPhyRead(pAC, IoC, Port, PHY_LONE_AUNE_LP, &LpAb);
1795 SkXmPhyRead(pAC, IoC, Port, PHY_LONE_1000T_STAT, &ExtStat);
1796 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1797 ("AutoNeg FAIL Port %d (LpAb %x, 1000TStat %x)\n",
1798 Port, LpAb, ExtStat));
1799
1800 /* Try next possible mode */
1801 NextMode = SkHWSenseGetNext(pAC, IoC, Port);
1802 SkHWLinkDown(pAC, IoC, Port);
1803 if (Done == SK_AND_DUP_CAP) {
1804 /* GoTo next mode */
1805 SkHWSenseSetNext(pAC, IoC, Port, NextMode);
1806 }
1807
1808 return(SK_HW_PS_RESTART);
1809
1810 }
1811 else {
1812 /*
1813 * Dummy Read interrupt status to prevent
1814 * extra link down/ups
1815 */
1816 SkXmPhyRead(pAC, IoC, Port, PHY_LONE_INT_STAT, &ExtStat);
1817 return(SK_HW_PS_LINK);
1818 }
1819 }
1820
1821 /* AutoNeg not done, but HW link is up. Check for timeouts */
1822 pPrt->PAutoNegTimeOut++;
1823 if (pPrt->PAutoNegTimeOut >= SK_AND_MAX_TO) {
1824 /* Timeout occured */
1825 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
1826 ("AutoNeg timeout Port %d\n", Port));
1827 if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE &&
1828 pPrt->PLipaAutoNeg != SK_LIPA_AUTO) {
1829 /* Set Link manually up */
1830 SkHWSenseSetNext(pAC, IoC, Port, SK_LMODE_FULL);
1831 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
1832 ("Set manual full duplex Port %d\n", Port));
1833 }
1834
1835 /* Do the restart */
1836 return(SK_HW_PS_RESTART);
1837 }
1838 }
1839 else {
1840 /* Link is up and we don't need more */
1841#ifdef DEBUG
1842 if (pPrt->PLipaAutoNeg == SK_LIPA_AUTO) {
1843 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1844 ("ERROR: Lipa auto detected on port %d\n", Port));
1845 }
1846#endif /* DEBUG */
1847
1848 /*
1849 * Dummy Read interrupt status to prevent
1850 * extra link down/ups
1851 */
1852 SkXmPhyRead(pAC, IoC, Port, PHY_LONE_INT_STAT, &ExtStat);
1853
1854 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
1855 ("Link sync(GP), Port %d\n", Port));
1856 SkHWLinkUp(pAC, IoC, Port);
1857
1858 return(SK_HW_PS_LINK);
1859 }
1860
1861 return(SK_HW_PS_NONE);
1862} /* SkGePortCheckUpLone */
1863
1864
1865/******************************************************************************
1866 *
1867 * SkGePortCheckUpNat() - Check if the link is up on National PHY
1868 *
1869 * return:
1870 * 0 o.k. nothing needed
1871 * 1 Restart needed on this port
1872 * 2 Link came up
1873 */
1874static int SkGePortCheckUpNat(
1875SK_AC *pAC, /* Adapter Context */
1876SK_IOC IoC, /* IO Context */
1877int Port, /* Which port should be checked */
1878SK_BOOL AutoNeg) /* Is Auto-negotiation used ? */
1879{
1880 /* todo: National */
1881 return(SK_HW_PS_NONE);
1882} /* SkGePortCheckUpNat */
1883#endif /* OTHER_PHY */
1884
1885
1886/******************************************************************************
1887 *
1888 * SkGeSirqEvent() - Event Service Routine
1889 *
1890 * Description:
1891 *
1892 * Notes:
1893 */
1894int SkGeSirqEvent(
1895SK_AC *pAC, /* Adapter Context */
1896SK_IOC IoC, /* Io Context */
1897SK_U32 Event, /* Module specific Event */
1898SK_EVPARA Para) /* Event specific Parameter */
1899{
1900 SK_GEPORT *pPrt; /* GIni Port struct pointer */
1901 SK_U32 Port;
1902 SK_U32 Val32;
1903 int PortStat;
1904 SK_U8 Val8;
1905#ifdef GENESIS
1906 SK_U64 Octets;
1907#endif /* GENESIS */
1908
1909 Port = Para.Para32[0];
1910 pPrt = &pAC->GIni.GP[Port];
1911
1912 switch (Event) {
1913 case SK_HWEV_WATIM:
1914 if (pPrt->PState == SK_PRT_RESET) {
1915
1916 PortStat = SK_HW_PS_NONE;
1917 }
1918 else {
1919 /* Check whether port came up */
1920 PortStat = SkGePortCheckUp(pAC, IoC, (int)Port);
1921 }
1922
1923 switch (PortStat) {
1924 case SK_HW_PS_RESTART:
1925 if (pPrt->PHWLinkUp) {
1926 /* Set Link to down */
1927 SkHWLinkDown(pAC, IoC, (int)Port);
1928
1929 /*
1930 * Signal directly to RLMT to ensure correct
1931 * sequence of SWITCH and RESET event.
1932 */
1933 SkRlmtEvent(pAC, IoC, SK_RLMT_LINK_DOWN, Para);
1934 }
1935
1936 /* Restart needed */
1937 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_RESET, Para);
1938 break;
1939
1940 case SK_HW_PS_LINK:
1941 /* Signal to RLMT */
1942 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_UP, Para);
1943 break;
1944 }
1945
1946 /* Start again the check Timer */
1947 if (pPrt->PHWLinkUp) {
1948 Val32 = SK_WA_ACT_TIME;
1949 }
1950 else {
1951 Val32 = SK_WA_INA_TIME;
1952 }
1953
1954 /* Todo: still needed for non-XMAC PHYs??? */
1955 /* Start workaround Errata #2 timer */
1956 SkTimerStart(pAC, IoC, &pPrt->PWaTimer, Val32,
1957 SKGE_HWAC, SK_HWEV_WATIM, Para);
1958 break;
1959
1960 case SK_HWEV_PORT_START:
1961 if (pPrt->PHWLinkUp) {
1962 /*
1963 * Signal directly to RLMT to ensure correct
1964 * sequence of SWITCH and RESET event.
1965 */
1966 SkRlmtEvent(pAC, IoC, SK_RLMT_LINK_DOWN, Para);
1967 }
1968
1969 SkHWLinkDown(pAC, IoC, (int)Port);
1970
1971 /* Schedule Port RESET */
1972 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_RESET, Para);
1973
1974 /* Start workaround Errata #2 timer */
1975 SkTimerStart(pAC, IoC, &pPrt->PWaTimer, SK_WA_INA_TIME,
1976 SKGE_HWAC, SK_HWEV_WATIM, Para);
1977 break;
1978
1979 case SK_HWEV_PORT_STOP:
1980 if (pPrt->PHWLinkUp) {
1981 /*
1982 * Signal directly to RLMT to ensure correct
1983 * sequence of SWITCH and RESET event.
1984 */
1985 SkRlmtEvent(pAC, IoC, SK_RLMT_LINK_DOWN, Para);
1986 }
1987
1988 /* Stop Workaround Timer */
1989 SkTimerStop(pAC, IoC, &pPrt->PWaTimer);
1990
1991 SkHWLinkDown(pAC, IoC, (int)Port);
1992 break;
1993
1994 case SK_HWEV_UPDATE_STAT:
1995 /* We do NOT need to update any statistics */
1996 break;
1997
1998 case SK_HWEV_CLEAR_STAT:
1999 /* We do NOT need to clear any statistics */
2000 for (Port = 0; Port < (SK_U32)pAC->GIni.GIMacsFound; Port++) {
2001 pPrt->PPrevRx = 0;
2002 pPrt->PPrevFcs = 0;
2003 pPrt->PPrevShorts = 0;
2004 }
2005 break;
2006
2007 case SK_HWEV_SET_LMODE:
2008 Val8 = (SK_U8)Para.Para32[1];
2009 if (pPrt->PLinkModeConf != Val8) {
2010 /* Set New link mode */
2011 pPrt->PLinkModeConf = Val8;
2012
2013 /* Restart Port */
2014 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para);
2015 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_START, Para);
2016 }
2017 break;
2018
2019 case SK_HWEV_SET_FLOWMODE:
2020 Val8 = (SK_U8)Para.Para32[1];
2021 if (pPrt->PFlowCtrlMode != Val8) {
2022 /* Set New Flow Control mode */
2023 pPrt->PFlowCtrlMode = Val8;
2024
2025 /* Restart Port */
2026 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para);
2027 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_START, Para);
2028 }
2029 break;
2030
2031 case SK_HWEV_SET_ROLE:
2032 /* not possible for fiber */
2033 if (!pAC->GIni.GICopperType) {
2034 break;
2035 }
2036 Val8 = (SK_U8)Para.Para32[1];
2037 if (pPrt->PMSMode != Val8) {
2038 /* Set New Role (Master/Slave) mode */
2039 pPrt->PMSMode = Val8;
2040
2041 /* Restart Port */
2042 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para);
2043 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_START, Para);
2044 }
2045 break;
2046
2047 case SK_HWEV_SET_SPEED:
2048 if (pPrt->PhyType != SK_PHY_MARV_COPPER) {
2049 break;
2050 }
2051 Val8 = (SK_U8)Para.Para32[1];
2052 if (pPrt->PLinkSpeed != Val8) {
2053 /* Set New Speed parameter */
2054 pPrt->PLinkSpeed = Val8;
2055
2056 /* Restart Port */
2057 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para);
2058 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_START, Para);
2059 }
2060 break;
2061
2062#ifdef GENESIS
2063 case SK_HWEV_HALFDUP_CHK:
2064 if (pAC->GIni.GIGenesis) {
2065 /*
2066 * half duplex hangup workaround.
2067 * See packet arbiter timeout interrupt for description
2068 */
2069 pPrt->HalfDupTimerActive = SK_FALSE;
2070 if (pPrt->PLinkModeStatus == SK_LMODE_STAT_HALF ||
2071 pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOHALF) {
2072 /* Snap statistic counters */
2073 (void)SkXmUpdateStats(pAC, IoC, Port);
2074
2075 (void)SkXmMacStatistic(pAC, IoC, Port, XM_TXO_OK_HI, &Val32);
2076
2077 Octets = (SK_U64)Val32 << 32;
2078
2079 (void)SkXmMacStatistic(pAC, IoC, Port, XM_TXO_OK_LO, &Val32);
2080
2081 Octets += Val32;
2082
2083 if (pPrt->LastOctets == Octets) {
2084 /* Tx hanging, a FIFO flush restarts it */
2085 SkMacFlushTxFifo(pAC, IoC, Port);
2086 }
2087 }
2088 }
2089 break;
2090#endif /* GENESIS */
2091
2092 default:
2093 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_SIRQ_E001, SKERR_SIRQ_E001MSG);
2094 break;
2095 }
2096
2097 return(0);
2098} /* SkGeSirqEvent */
2099
2100
2101#ifdef GENESIS
2102/******************************************************************************
2103 *
2104 * SkPhyIsrBcom() - PHY interrupt service routine
2105 *
2106 * Description: handles all interrupts from BCom PHY
2107 *
2108 * Returns: N/A
2109 */
2110static void SkPhyIsrBcom(
2111SK_AC *pAC, /* Adapter Context */
2112SK_IOC IoC, /* Io Context */
2113int Port, /* Port Num = PHY Num */
2114SK_U16 IStatus) /* Interrupt Status */
2115{
2116 SK_GEPORT *pPrt; /* GIni Port struct pointer */
2117 SK_EVPARA Para;
2118
2119 pPrt = &pAC->GIni.GP[Port];
2120
2121 if ((IStatus & PHY_B_IS_PSE) != 0) {
2122 /* Incorrectable pair swap error */
2123 SK_ERR_LOG(pAC, SK_ERRCL_HW | SK_ERRCL_INIT, SKERR_SIRQ_E022,
2124 SKERR_SIRQ_E022MSG);
2125 }
2126
2127 if ((IStatus & (PHY_B_IS_AN_PR | PHY_B_IS_LST_CHANGE)) != 0) {
2128
2129 SkHWLinkDown(pAC, IoC, Port);
2130
2131 Para.Para32[0] = (SK_U32)Port;
2132 /* Signal to RLMT */
2133 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
2134
2135 /* Start workaround Errata #2 timer */
2136 SkTimerStart(pAC, IoC, &pPrt->PWaTimer, SK_WA_INA_TIME,
2137 SKGE_HWAC, SK_HWEV_WATIM, Para);
2138 }
2139
2140} /* SkPhyIsrBcom */
2141#endif /* GENESIS */
2142
2143
2144#ifdef YUKON
2145/******************************************************************************
2146 *
2147 * SkPhyIsrGmac() - PHY interrupt service routine
2148 *
2149 * Description: handles all interrupts from Marvell PHY
2150 *
2151 * Returns: N/A
2152 */
2153static void SkPhyIsrGmac(
2154SK_AC *pAC, /* Adapter Context */
2155SK_IOC IoC, /* Io Context */
2156int Port, /* Port Num = PHY Num */
2157SK_U16 IStatus) /* Interrupt Status */
2158{
2159 SK_GEPORT *pPrt; /* GIni Port struct pointer */
2160 SK_EVPARA Para;
2161 SK_U16 Word;
2162
2163 pPrt = &pAC->GIni.GP[Port];
2164
2165 if ((IStatus & (PHY_M_IS_AN_PR | PHY_M_IS_LST_CHANGE)) != 0) {
2166
2167 SkHWLinkDown(pAC, IoC, Port);
2168
2169 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_AUNE_ADV, &Word);
2170
2171 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2172 ("AutoNeg.Adv: 0x%04X\n", Word));
2173
2174 /* Set Auto-negotiation advertisement */
2175 if (pPrt->PFlowCtrlMode == SK_FLOW_MODE_SYM_OR_REM) {
2176 /* restore Asymmetric Pause bit */
2177 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_AUNE_ADV,
2178 (SK_U16)(Word | PHY_M_AN_ASP));
2179 }
2180
2181 Para.Para32[0] = (SK_U32)Port;
2182 /* Signal to RLMT */
2183 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
2184 }
2185
2186 if ((IStatus & PHY_M_IS_AN_ERROR) != 0) {
2187 /* Auto-Negotiation Error */
2188 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E023, SKERR_SIRQ_E023MSG);
2189 }
2190
2191 if ((IStatus & PHY_M_IS_FIFO_ERROR) != 0) {
2192 /* FIFO Overflow/Underrun Error */
2193 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E024, SKERR_SIRQ_E024MSG);
2194 }
2195
2196} /* SkPhyIsrGmac */
2197#endif /* YUKON */
2198
2199
2200#ifdef OTHER_PHY
2201/******************************************************************************
2202 *
2203 * SkPhyIsrLone() - PHY interrupt service routine
2204 *
2205 * Description: handles all interrupts from LONE PHY
2206 *
2207 * Returns: N/A
2208 */
2209static void SkPhyIsrLone(
2210SK_AC *pAC, /* Adapter Context */
2211SK_IOC IoC, /* Io Context */
2212int Port, /* Port Num = PHY Num */
2213SK_U16 IStatus) /* Interrupt Status */
2214{
2215 SK_EVPARA Para;
2216
2217 if (IStatus & (PHY_L_IS_DUP | PHY_L_IS_ISOL)) {
2218
2219 SkHWLinkDown(pAC, IoC, Port);
2220
2221 Para.Para32[0] = (SK_U32)Port;
2222 /* Signal to RLMT */
2223 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
2224 }
2225
2226} /* SkPhyIsrLone */
2227#endif /* OTHER_PHY */
2228
2229/* End of File */
diff --git a/drivers/net/sk98lin/ski2c.c b/drivers/net/sk98lin/ski2c.c
new file mode 100644
index 0000000000..79bf57cb53
--- /dev/null
+++ b/drivers/net/sk98lin/ski2c.c
@@ -0,0 +1,1296 @@
1/******************************************************************************
2 *
3 * Name: ski2c.c
4 * Project: Gigabit Ethernet Adapters, TWSI-Module
5 * Version: $Revision: 1.59 $
6 * Date: $Date: 2003/10/20 09:07:25 $
7 * Purpose: Functions to access Voltage and Temperature Sensor
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/*
26 * I2C Protocol
27 */
28#if (defined(DEBUG) || ((!defined(LINT)) && (!defined(SK_SLIM))))
29static const char SysKonnectFileId[] =
30 "@(#) $Id: ski2c.c,v 1.59 2003/10/20 09:07:25 rschmidt Exp $ (C) Marvell. ";
31#endif
32
33#include "h/skdrv1st.h" /* Driver Specific Definitions */
34#include "h/lm80.h"
35#include "h/skdrv2nd.h" /* Adapter Control- and Driver specific Def. */
36
37#ifdef __C2MAN__
38/*
39 I2C protocol implementation.
40
41 General Description:
42
43 The I2C protocol is used for the temperature sensors and for
44 the serial EEPROM which hold the configuration.
45
46 This file covers functions that allow to read write and do
47 some bulk requests a specified I2C address.
48
49 The Genesis has 2 I2C buses. One for the EEPROM which holds
50 the VPD Data and one for temperature and voltage sensor.
51 The following picture shows the I2C buses, I2C devices and
52 their control registers.
53
54 Note: The VPD functions are in skvpd.c
55.
56. PCI Config I2C Bus for VPD Data:
57.
58. +------------+
59. | VPD EEPROM |
60. +------------+
61. |
62. | <-- I2C
63. |
64. +-----------+-----------+
65. | |
66. +-----------------+ +-----------------+
67. | PCI_VPD_ADR_REG | | PCI_VPD_DAT_REG |
68. +-----------------+ +-----------------+
69.
70.
71. I2C Bus for LM80 sensor:
72.
73. +-----------------+
74. | Temperature and |
75. | Voltage Sensor |
76. | LM80 |
77. +-----------------+
78. |
79. |
80. I2C --> |
81. |
82. +----+
83. +-------------->| OR |<--+
84. | +----+ |
85. +------+------+ |
86. | | |
87. +--------+ +--------+ +----------+
88. | B2_I2C | | B2_I2C | | B2_I2C |
89. | _CTRL | | _DATA | | _SW |
90. +--------+ +--------+ +----------+
91.
92 The I2C bus may be driven by the B2_I2C_SW or by the B2_I2C_CTRL
93 and B2_I2C_DATA registers.
94 For driver software it is recommended to use the I2C control and
95 data register, because I2C bus timing is done by the ASIC and
96 an interrupt may be received when the I2C request is completed.
97
98 Clock Rate Timing: MIN MAX generated by
99 VPD EEPROM: 50 kHz 100 kHz HW
100 LM80 over I2C Ctrl/Data reg. 50 kHz 100 kHz HW
101 LM80 over B2_I2C_SW register 0 400 kHz SW
102
103 Note: The clock generated by the hardware is dependend on the
104 PCI clock. If the PCI bus clock is 33 MHz, the I2C/VPD
105 clock is 50 kHz.
106 */
107intro()
108{}
109#endif
110
111#ifdef SK_DIAG
112/*
113 * I2C Fast Mode timing values used by the LM80.
114 * If new devices are added to the I2C bus the timing values have to be checked.
115 */
116#ifndef I2C_SLOW_TIMING
117#define T_CLK_LOW 1300L /* clock low time in ns */
118#define T_CLK_HIGH 600L /* clock high time in ns */
119#define T_DATA_IN_SETUP 100L /* data in Set-up Time */
120#define T_START_HOLD 600L /* start condition hold time */
121#define T_START_SETUP 600L /* start condition Set-up time */
122#define T_STOP_SETUP 600L /* stop condition Set-up time */
123#define T_BUS_IDLE 1300L /* time the bus must free after Tx */
124#define T_CLK_2_DATA_OUT 900L /* max. clock low to data output valid */
125#else /* I2C_SLOW_TIMING */
126/* I2C Standard Mode Timing */
127#define T_CLK_LOW 4700L /* clock low time in ns */
128#define T_CLK_HIGH 4000L /* clock high time in ns */
129#define T_DATA_IN_SETUP 250L /* data in Set-up Time */
130#define T_START_HOLD 4000L /* start condition hold time */
131#define T_START_SETUP 4700L /* start condition Set-up time */
132#define T_STOP_SETUP 4000L /* stop condition Set-up time */
133#define T_BUS_IDLE 4700L /* time the bus must free after Tx */
134#endif /* !I2C_SLOW_TIMING */
135
136#define NS2BCLK(x) (((x)*125)/10000)
137
138/*
139 * I2C Wire Operations
140 *
141 * About I2C_CLK_LOW():
142 *
143 * The Data Direction bit (I2C_DATA_DIR) has to be set to input when setting
144 * clock to low, to prevent the ASIC and the I2C data client from driving the
145 * serial data line simultaneously (ASIC: last bit of a byte = '1', I2C client
146 * send an 'ACK'). See also Concentrator Bugreport No. 10192.
147 */
148#define I2C_DATA_HIGH(IoC) SK_I2C_SET_BIT(IoC, I2C_DATA)
149#define I2C_DATA_LOW(IoC) SK_I2C_CLR_BIT(IoC, I2C_DATA)
150#define I2C_DATA_OUT(IoC) SK_I2C_SET_BIT(IoC, I2C_DATA_DIR)
151#define I2C_DATA_IN(IoC) SK_I2C_CLR_BIT(IoC, I2C_DATA_DIR | I2C_DATA)
152#define I2C_CLK_HIGH(IoC) SK_I2C_SET_BIT(IoC, I2C_CLK)
153#define I2C_CLK_LOW(IoC) SK_I2C_CLR_BIT(IoC, I2C_CLK | I2C_DATA_DIR)
154#define I2C_START_COND(IoC) SK_I2C_CLR_BIT(IoC, I2C_CLK)
155
156#define NS2CLKT(x) ((x*125L)/10000)
157
158/*--------------- I2C Interface Register Functions --------------- */
159
160/*
161 * sending one bit
162 */
163void SkI2cSndBit(
164SK_IOC IoC, /* I/O Context */
165SK_U8 Bit) /* Bit to send */
166{
167 I2C_DATA_OUT(IoC);
168 if (Bit) {
169 I2C_DATA_HIGH(IoC);
170 }
171 else {
172 I2C_DATA_LOW(IoC);
173 }
174 SkDgWaitTime(IoC, NS2BCLK(T_DATA_IN_SETUP));
175 I2C_CLK_HIGH(IoC);
176 SkDgWaitTime(IoC, NS2BCLK(T_CLK_HIGH));
177 I2C_CLK_LOW(IoC);
178} /* SkI2cSndBit*/
179
180
181/*
182 * Signal a start to the I2C Bus.
183 *
184 * A start is signaled when data goes to low in a high clock cycle.
185 *
186 * Ends with Clock Low.
187 *
188 * Status: not tested
189 */
190void SkI2cStart(
191SK_IOC IoC) /* I/O Context */
192{
193 /* Init data and Clock to output lines */
194 /* Set Data high */
195 I2C_DATA_OUT(IoC);
196 I2C_DATA_HIGH(IoC);
197 /* Set Clock high */
198 I2C_CLK_HIGH(IoC);
199
200 SkDgWaitTime(IoC, NS2BCLK(T_START_SETUP));
201
202 /* Set Data Low */
203 I2C_DATA_LOW(IoC);
204
205 SkDgWaitTime(IoC, NS2BCLK(T_START_HOLD));
206
207 /* Clock low without Data to Input */
208 I2C_START_COND(IoC);
209
210 SkDgWaitTime(IoC, NS2BCLK(T_CLK_LOW));
211} /* SkI2cStart */
212
213
214void SkI2cStop(
215SK_IOC IoC) /* I/O Context */
216{
217 /* Init data and Clock to output lines */
218 /* Set Data low */
219 I2C_DATA_OUT(IoC);
220 I2C_DATA_LOW(IoC);
221
222 SkDgWaitTime(IoC, NS2BCLK(T_CLK_2_DATA_OUT));
223
224 /* Set Clock high */
225 I2C_CLK_HIGH(IoC);
226
227 SkDgWaitTime(IoC, NS2BCLK(T_STOP_SETUP));
228
229 /*
230 * Set Data High: Do it by setting the Data Line to Input.
231 * Because of a pull up resistor the Data Line
232 * floods to high.
233 */
234 I2C_DATA_IN(IoC);
235
236 /*
237 * When I2C activity is stopped
238 * o DATA should be set to input and
239 * o CLOCK should be set to high!
240 */
241 SkDgWaitTime(IoC, NS2BCLK(T_BUS_IDLE));
242} /* SkI2cStop */
243
244
245/*
246 * Receive just one bit via the I2C bus.
247 *
248 * Note: Clock must be set to LOW before calling this function.
249 *
250 * Returns The received bit.
251 */
252int SkI2cRcvBit(
253SK_IOC IoC) /* I/O Context */
254{
255 int Bit;
256 SK_U8 I2cSwCtrl;
257
258 /* Init data as input line */
259 I2C_DATA_IN(IoC);
260
261 SkDgWaitTime(IoC, NS2BCLK(T_CLK_2_DATA_OUT));
262
263 I2C_CLK_HIGH(IoC);
264
265 SkDgWaitTime(IoC, NS2BCLK(T_CLK_HIGH));
266
267 SK_I2C_GET_SW(IoC, &I2cSwCtrl);
268
269 Bit = (I2cSwCtrl & I2C_DATA) ? 1 : 0;
270
271 I2C_CLK_LOW(IoC);
272 SkDgWaitTime(IoC, NS2BCLK(T_CLK_LOW-T_CLK_2_DATA_OUT));
273
274 return(Bit);
275} /* SkI2cRcvBit */
276
277
278/*
279 * Receive an ACK.
280 *
281 * returns 0 If acknowledged
282 * 1 in case of an error
283 */
284int SkI2cRcvAck(
285SK_IOC IoC) /* I/O Context */
286{
287 /*
288 * Received bit must be zero.
289 */
290 return(SkI2cRcvBit(IoC) != 0);
291} /* SkI2cRcvAck */
292
293
294/*
295 * Send an NACK.
296 */
297void SkI2cSndNAck(
298SK_IOC IoC) /* I/O Context */
299{
300 /*
301 * Received bit must be zero.
302 */
303 SkI2cSndBit(IoC, 1);
304} /* SkI2cSndNAck */
305
306
307/*
308 * Send an ACK.
309 */
310void SkI2cSndAck(
311SK_IOC IoC) /* I/O Context */
312{
313 /*
314 * Received bit must be zero.
315 */
316 SkI2cSndBit(IoC, 0);
317} /* SkI2cSndAck */
318
319
320/*
321 * Send one byte to the I2C device and wait for ACK.
322 *
323 * Return acknowleged status.
324 */
325int SkI2cSndByte(
326SK_IOC IoC, /* I/O Context */
327int Byte) /* byte to send */
328{
329 int i;
330
331 for (i = 0; i < 8; i++) {
332 if (Byte & (1<<(7-i))) {
333 SkI2cSndBit(IoC, 1);
334 }
335 else {
336 SkI2cSndBit(IoC, 0);
337 }
338 }
339
340 return(SkI2cRcvAck(IoC));
341} /* SkI2cSndByte */
342
343
344/*
345 * Receive one byte and ack it.
346 *
347 * Return byte.
348 */
349int SkI2cRcvByte(
350SK_IOC IoC, /* I/O Context */
351int Last) /* Last Byte Flag */
352{
353 int i;
354 int Byte = 0;
355
356 for (i = 0; i < 8; i++) {
357 Byte <<= 1;
358 Byte |= SkI2cRcvBit(IoC);
359 }
360
361 if (Last) {
362 SkI2cSndNAck(IoC);
363 }
364 else {
365 SkI2cSndAck(IoC);
366 }
367
368 return(Byte);
369} /* SkI2cRcvByte */
370
371
372/*
373 * Start dialog and send device address
374 *
375 * Return 0 if acknowleged, 1 in case of an error
376 */
377int SkI2cSndDev(
378SK_IOC IoC, /* I/O Context */
379int Addr, /* Device Address */
380int Rw) /* Read / Write Flag */
381{
382 SkI2cStart(IoC);
383 Rw = ~Rw;
384 Rw &= I2C_WRITE;
385 return(SkI2cSndByte(IoC, (Addr<<1) | Rw));
386} /* SkI2cSndDev */
387
388#endif /* SK_DIAG */
389
390/*----------------- I2C CTRL Register Functions ----------*/
391
392/*
393 * waits for a completion of an I2C transfer
394 *
395 * returns 0: success, transfer completes
396 * 1: error, transfer does not complete, I2C transfer
397 * killed, wait loop terminated.
398 */
399static int SkI2cWait(
400SK_AC *pAC, /* Adapter Context */
401SK_IOC IoC, /* I/O Context */
402int Event) /* complete event to wait for (I2C_READ or I2C_WRITE) */
403{
404 SK_U64 StartTime;
405 SK_U64 CurrentTime;
406 SK_U32 I2cCtrl;
407
408 StartTime = SkOsGetTime(pAC);
409
410 do {
411 CurrentTime = SkOsGetTime(pAC);
412
413 if (CurrentTime - StartTime > SK_TICKS_PER_SEC / 8) {
414
415 SK_I2C_STOP(IoC);
416#ifndef SK_DIAG
417 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E002, SKERR_I2C_E002MSG);
418#endif /* !SK_DIAG */
419 return(1);
420 }
421
422 SK_I2C_GET_CTL(IoC, &I2cCtrl);
423
424#ifdef xYUKON_DBG
425 printf("StartTime=%lu, CurrentTime=%lu\n",
426 StartTime, CurrentTime);
427 if (kbhit()) {
428 return(1);
429 }
430#endif /* YUKON_DBG */
431
432 } while ((I2cCtrl & I2C_FLAG) == (SK_U32)Event << 31);
433
434 return(0);
435} /* SkI2cWait */
436
437
438/*
439 * waits for a completion of an I2C transfer
440 *
441 * Returns
442 * Nothing
443 */
444void SkI2cWaitIrq(
445SK_AC *pAC, /* Adapter Context */
446SK_IOC IoC) /* I/O Context */
447{
448 SK_SENSOR *pSen;
449 SK_U64 StartTime;
450 SK_U32 IrqSrc;
451
452 pSen = &pAC->I2c.SenTable[pAC->I2c.CurrSens];
453
454 if (pSen->SenState == SK_SEN_IDLE) {
455 return;
456 }
457
458 StartTime = SkOsGetTime(pAC);
459
460 do {
461 if (SkOsGetTime(pAC) - StartTime > SK_TICKS_PER_SEC / 8) {
462
463 SK_I2C_STOP(IoC);
464#ifndef SK_DIAG
465 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E016, SKERR_I2C_E016MSG);
466#endif /* !SK_DIAG */
467 return;
468 }
469
470 SK_IN32(IoC, B0_ISRC, &IrqSrc);
471
472 } while ((IrqSrc & IS_I2C_READY) == 0);
473
474 pSen->SenState = SK_SEN_IDLE;
475 return;
476} /* SkI2cWaitIrq */
477
478/*
479 * writes a single byte or 4 bytes into the I2C device
480 *
481 * returns 0: success
482 * 1: error
483 */
484static int SkI2cWrite(
485SK_AC *pAC, /* Adapter Context */
486SK_IOC IoC, /* I/O Context */
487SK_U32 I2cData, /* I2C Data to write */
488int I2cDev, /* I2C Device Address */
489int I2cDevSize, /* I2C Device Size (e.g. I2C_025K_DEV or I2C_2K_DEV) */
490int I2cReg, /* I2C Device Register Address */
491int I2cBurst) /* I2C Burst Flag */
492{
493 SK_OUT32(IoC, B2_I2C_DATA, I2cData);
494
495 SK_I2C_CTL(IoC, I2C_WRITE, I2cDev, I2cDevSize, I2cReg, I2cBurst);
496
497 return(SkI2cWait(pAC, IoC, I2C_WRITE));
498} /* SkI2cWrite*/
499
500
501#ifdef SK_DIAG
502/*
503 * reads a single byte or 4 bytes from the I2C device
504 *
505 * returns the word read
506 */
507SK_U32 SkI2cRead(
508SK_AC *pAC, /* Adapter Context */
509SK_IOC IoC, /* I/O Context */
510int I2cDev, /* I2C Device Address */
511int I2cDevSize, /* I2C Device Size (e.g. I2C_025K_DEV or I2C_2K_DEV) */
512int I2cReg, /* I2C Device Register Address */
513int I2cBurst) /* I2C Burst Flag */
514{
515 SK_U32 Data;
516
517 SK_OUT32(IoC, B2_I2C_DATA, 0);
518 SK_I2C_CTL(IoC, I2C_READ, I2cDev, I2cDevSize, I2cReg, I2cBurst);
519
520 if (SkI2cWait(pAC, IoC, I2C_READ) != 0) {
521 w_print("%s\n", SKERR_I2C_E002MSG);
522 }
523
524 SK_IN32(IoC, B2_I2C_DATA, &Data);
525
526 return(Data);
527} /* SkI2cRead */
528#endif /* SK_DIAG */
529
530
531/*
532 * read a sensor's value
533 *
534 * This function reads a sensor's value from the I2C sensor chip. The sensor
535 * is defined by its index into the sensors database in the struct pAC points
536 * to.
537 * Returns
538 * 1 if the read is completed
539 * 0 if the read must be continued (I2C Bus still allocated)
540 */
541static int SkI2cReadSensor(
542SK_AC *pAC, /* Adapter Context */
543SK_IOC IoC, /* I/O Context */
544SK_SENSOR *pSen) /* Sensor to be read */
545{
546 if (pSen->SenRead != NULL) {
547 return((*pSen->SenRead)(pAC, IoC, pSen));
548 }
549 else {
550 return(0); /* no success */
551 }
552} /* SkI2cReadSensor */
553
554/*
555 * Do the Init state 0 initialization
556 */
557static int SkI2cInit0(
558SK_AC *pAC) /* Adapter Context */
559{
560 int i;
561
562 /* Begin with first sensor */
563 pAC->I2c.CurrSens = 0;
564
565 /* Begin with timeout control for state machine */
566 pAC->I2c.TimerMode = SK_TIMER_WATCH_SM;
567
568 /* Set sensor number to zero */
569 pAC->I2c.MaxSens = 0;
570
571#ifndef SK_DIAG
572 /* Initialize Number of Dummy Reads */
573 pAC->I2c.DummyReads = SK_MAX_SENSORS;
574#endif
575
576 for (i = 0; i < SK_MAX_SENSORS; i++) {
577 pAC->I2c.SenTable[i].SenDesc = "unknown";
578 pAC->I2c.SenTable[i].SenType = SK_SEN_UNKNOWN;
579 pAC->I2c.SenTable[i].SenThreErrHigh = 0;
580 pAC->I2c.SenTable[i].SenThreErrLow = 0;
581 pAC->I2c.SenTable[i].SenThreWarnHigh = 0;
582 pAC->I2c.SenTable[i].SenThreWarnLow = 0;
583 pAC->I2c.SenTable[i].SenReg = LM80_FAN2_IN;
584 pAC->I2c.SenTable[i].SenInit = SK_SEN_DYN_INIT_NONE;
585 pAC->I2c.SenTable[i].SenValue = 0;
586 pAC->I2c.SenTable[i].SenErrFlag = SK_SEN_ERR_NOT_PRESENT;
587 pAC->I2c.SenTable[i].SenErrCts = 0;
588 pAC->I2c.SenTable[i].SenBegErrTS = 0;
589 pAC->I2c.SenTable[i].SenState = SK_SEN_IDLE;
590 pAC->I2c.SenTable[i].SenRead = NULL;
591 pAC->I2c.SenTable[i].SenDev = 0;
592 }
593
594 /* Now we are "INIT data"ed */
595 pAC->I2c.InitLevel = SK_INIT_DATA;
596 return(0);
597} /* SkI2cInit0*/
598
599
600/*
601 * Do the init state 1 initialization
602 *
603 * initialize the following register of the LM80:
604 * Configuration register:
605 * - START, noINT, activeLOW, noINT#Clear, noRESET, noCI, noGPO#, noINIT
606 *
607 * Interrupt Mask Register 1:
608 * - all interrupts are Disabled (0xff)
609 *
610 * Interrupt Mask Register 2:
611 * - all interrupts are Disabled (0xff) Interrupt modi doesn't matter.
612 *
613 * Fan Divisor/RST_OUT register:
614 * - Divisors set to 1 (bits 00), all others 0s.
615 *
616 * OS# Configuration/Temperature resolution Register:
617 * - all 0s
618 *
619 */
620static int SkI2cInit1(
621SK_AC *pAC, /* Adapter Context */
622SK_IOC IoC) /* I/O Context */
623{
624 int i;
625 SK_U8 I2cSwCtrl;
626 SK_GEPORT *pPrt; /* GIni Port struct pointer */
627
628 if (pAC->I2c.InitLevel != SK_INIT_DATA) {
629 /* ReInit not needed in I2C module */
630 return(0);
631 }
632
633 /* Set the Direction of I2C-Data Pin to IN */
634 SK_I2C_CLR_BIT(IoC, I2C_DATA_DIR | I2C_DATA);
635 /* Check for 32-Bit Yukon with Low at I2C-Data Pin */
636 SK_I2C_GET_SW(IoC, &I2cSwCtrl);
637
638 if ((I2cSwCtrl & I2C_DATA) == 0) {
639 /* this is a 32-Bit board */
640 pAC->GIni.GIYukon32Bit = SK_TRUE;
641 return(0);
642 }
643
644 /* Check for 64 Bit Yukon without sensors */
645 if (SkI2cWrite(pAC, IoC, 0, LM80_ADDR, I2C_025K_DEV, LM80_CFG, 0) != 0) {
646 return(0);
647 }
648
649 (void)SkI2cWrite(pAC, IoC, 0xffUL, LM80_ADDR, I2C_025K_DEV, LM80_IMSK_1, 0);
650
651 (void)SkI2cWrite(pAC, IoC, 0xffUL, LM80_ADDR, I2C_025K_DEV, LM80_IMSK_2, 0);
652
653 (void)SkI2cWrite(pAC, IoC, 0, LM80_ADDR, I2C_025K_DEV, LM80_FAN_CTRL, 0);
654
655 (void)SkI2cWrite(pAC, IoC, 0, LM80_ADDR, I2C_025K_DEV, LM80_TEMP_CTRL, 0);
656
657 (void)SkI2cWrite(pAC, IoC, (SK_U32)LM80_CFG_START, LM80_ADDR, I2C_025K_DEV,
658 LM80_CFG, 0);
659
660 /*
661 * MaxSens has to be updated here, because PhyType is not
662 * set when performing Init Level 0
663 */
664 pAC->I2c.MaxSens = 5;
665
666 pPrt = &pAC->GIni.GP[0];
667
668 if (pAC->GIni.GIGenesis) {
669 if (pPrt->PhyType == SK_PHY_BCOM) {
670 if (pAC->GIni.GIMacsFound == 1) {
671 pAC->I2c.MaxSens += 1;
672 }
673 else {
674 pAC->I2c.MaxSens += 3;
675 }
676 }
677 }
678 else {
679 pAC->I2c.MaxSens += 3;
680 }
681
682 for (i = 0; i < pAC->I2c.MaxSens; i++) {
683 switch (i) {
684 case 0:
685 pAC->I2c.SenTable[i].SenDesc = "Temperature";
686 pAC->I2c.SenTable[i].SenType = SK_SEN_TEMP;
687 pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_TEMP_HIGH_ERR;
688 pAC->I2c.SenTable[i].SenThreWarnHigh = SK_SEN_TEMP_HIGH_WARN;
689 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_TEMP_LOW_WARN;
690 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_TEMP_LOW_ERR;
691 pAC->I2c.SenTable[i].SenReg = LM80_TEMP_IN;
692 break;
693 case 1:
694 pAC->I2c.SenTable[i].SenDesc = "Voltage PCI";
695 pAC->I2c.SenTable[i].SenType = SK_SEN_VOLT;
696 pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_PCI_5V_HIGH_ERR;
697 pAC->I2c.SenTable[i].SenThreWarnHigh = SK_SEN_PCI_5V_HIGH_WARN;
698 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_PCI_5V_LOW_WARN;
699 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_PCI_5V_LOW_ERR;
700 pAC->I2c.SenTable[i].SenReg = LM80_VT0_IN;
701 break;
702 case 2:
703 pAC->I2c.SenTable[i].SenDesc = "Voltage PCI-IO";
704 pAC->I2c.SenTable[i].SenType = SK_SEN_VOLT;
705 pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_PCI_IO_5V_HIGH_ERR;
706 pAC->I2c.SenTable[i].SenThreWarnHigh = SK_SEN_PCI_IO_5V_HIGH_WARN;
707 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_PCI_IO_3V3_LOW_WARN;
708 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_PCI_IO_3V3_LOW_ERR;
709 pAC->I2c.SenTable[i].SenReg = LM80_VT1_IN;
710 pAC->I2c.SenTable[i].SenInit = SK_SEN_DYN_INIT_PCI_IO;
711 break;
712 case 3:
713 pAC->I2c.SenTable[i].SenDesc = "Voltage ASIC";
714 pAC->I2c.SenTable[i].SenType = SK_SEN_VOLT;
715 pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_VDD_HIGH_ERR;
716 pAC->I2c.SenTable[i].SenThreWarnHigh = SK_SEN_VDD_HIGH_WARN;
717 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_VDD_LOW_WARN;
718 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_VDD_LOW_ERR;
719 pAC->I2c.SenTable[i].SenReg = LM80_VT2_IN;
720 break;
721 case 4:
722 if (pAC->GIni.GIGenesis) {
723 if (pPrt->PhyType == SK_PHY_BCOM) {
724 pAC->I2c.SenTable[i].SenDesc = "Voltage PHY A PLL";
725 pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_PLL_3V3_HIGH_ERR;
726 pAC->I2c.SenTable[i].SenThreWarnHigh = SK_SEN_PLL_3V3_HIGH_WARN;
727 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_PLL_3V3_LOW_WARN;
728 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_PLL_3V3_LOW_ERR;
729 }
730 else {
731 pAC->I2c.SenTable[i].SenDesc = "Voltage PMA";
732 pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_PLL_3V3_HIGH_ERR;
733 pAC->I2c.SenTable[i].SenThreWarnHigh = SK_SEN_PLL_3V3_HIGH_WARN;
734 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_PLL_3V3_LOW_WARN;
735 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_PLL_3V3_LOW_ERR;
736 }
737 }
738 else {
739 pAC->I2c.SenTable[i].SenDesc = "Voltage VAUX";
740 pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_VAUX_3V3_HIGH_ERR;
741 pAC->I2c.SenTable[i].SenThreWarnHigh = SK_SEN_VAUX_3V3_HIGH_WARN;
742 if (pAC->GIni.GIVauxAvail) {
743 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_VAUX_3V3_LOW_WARN;
744 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_VAUX_3V3_LOW_ERR;
745 }
746 else {
747 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_VAUX_0V_WARN_ERR;
748 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_VAUX_0V_WARN_ERR;
749 }
750 }
751 pAC->I2c.SenTable[i].SenType = SK_SEN_VOLT;
752 pAC->I2c.SenTable[i].SenReg = LM80_VT3_IN;
753 break;
754 case 5:
755 if (pAC->GIni.GIGenesis) {
756 pAC->I2c.SenTable[i].SenDesc = "Voltage PHY 2V5";
757 pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_PHY_2V5_HIGH_ERR;
758 pAC->I2c.SenTable[i].SenThreWarnHigh = SK_SEN_PHY_2V5_HIGH_WARN;
759 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_PHY_2V5_LOW_WARN;
760 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_PHY_2V5_LOW_ERR;
761 }
762 else {
763 pAC->I2c.SenTable[i].SenDesc = "Voltage Core 1V5";
764 pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_CORE_1V5_HIGH_ERR;
765 pAC->I2c.SenTable[i].SenThreWarnHigh = SK_SEN_CORE_1V5_HIGH_WARN;
766 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_CORE_1V5_LOW_WARN;
767 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_CORE_1V5_LOW_ERR;
768 }
769 pAC->I2c.SenTable[i].SenType = SK_SEN_VOLT;
770 pAC->I2c.SenTable[i].SenReg = LM80_VT4_IN;
771 break;
772 case 6:
773 if (pAC->GIni.GIGenesis) {
774 pAC->I2c.SenTable[i].SenDesc = "Voltage PHY B PLL";
775 }
776 else {
777 pAC->I2c.SenTable[i].SenDesc = "Voltage PHY 3V3";
778 }
779 pAC->I2c.SenTable[i].SenType = SK_SEN_VOLT;
780 pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_PLL_3V3_HIGH_ERR;
781 pAC->I2c.SenTable[i].SenThreWarnHigh = SK_SEN_PLL_3V3_HIGH_WARN;
782 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_PLL_3V3_LOW_WARN;
783 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_PLL_3V3_LOW_ERR;
784 pAC->I2c.SenTable[i].SenReg = LM80_VT5_IN;
785 break;
786 case 7:
787 if (pAC->GIni.GIGenesis) {
788 pAC->I2c.SenTable[i].SenDesc = "Speed Fan";
789 pAC->I2c.SenTable[i].SenType = SK_SEN_FAN;
790 pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_FAN_HIGH_ERR;
791 pAC->I2c.SenTable[i].SenThreWarnHigh = SK_SEN_FAN_HIGH_WARN;
792 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_FAN_LOW_WARN;
793 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_FAN_LOW_ERR;
794 pAC->I2c.SenTable[i].SenReg = LM80_FAN2_IN;
795 }
796 else {
797 pAC->I2c.SenTable[i].SenDesc = "Voltage PHY 2V5";
798 pAC->I2c.SenTable[i].SenType = SK_SEN_VOLT;
799 pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_PHY_2V5_HIGH_ERR;
800 pAC->I2c.SenTable[i].SenThreWarnHigh = SK_SEN_PHY_2V5_HIGH_WARN;
801 pAC->I2c.SenTable[i].SenThreWarnLow = SK_SEN_PHY_2V5_LOW_WARN;
802 pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_PHY_2V5_LOW_ERR;
803 pAC->I2c.SenTable[i].SenReg = LM80_VT6_IN;
804 }
805 break;
806 default:
807 SK_ERR_LOG(pAC, SK_ERRCL_INIT | SK_ERRCL_SW,
808 SKERR_I2C_E001, SKERR_I2C_E001MSG);
809 break;
810 }
811
812 pAC->I2c.SenTable[i].SenValue = 0;
813 pAC->I2c.SenTable[i].SenErrFlag = SK_SEN_ERR_OK;
814 pAC->I2c.SenTable[i].SenErrCts = 0;
815 pAC->I2c.SenTable[i].SenBegErrTS = 0;
816 pAC->I2c.SenTable[i].SenState = SK_SEN_IDLE;
817 pAC->I2c.SenTable[i].SenRead = SkLm80ReadSensor;
818 pAC->I2c.SenTable[i].SenDev = LM80_ADDR;
819 }
820
821#ifndef SK_DIAG
822 pAC->I2c.DummyReads = pAC->I2c.MaxSens;
823#endif /* !SK_DIAG */
824
825 /* Clear I2C IRQ */
826 SK_OUT32(IoC, B2_I2C_IRQ, I2C_CLR_IRQ);
827
828 /* Now we are I/O initialized */
829 pAC->I2c.InitLevel = SK_INIT_IO;
830 return(0);
831} /* SkI2cInit1 */
832
833
834/*
835 * Init level 2: Start first sensor read.
836 */
837static int SkI2cInit2(
838SK_AC *pAC, /* Adapter Context */
839SK_IOC IoC) /* I/O Context */
840{
841 int ReadComplete;
842 SK_SENSOR *pSen;
843
844 if (pAC->I2c.InitLevel != SK_INIT_IO) {
845 /* ReInit not needed in I2C module */
846 /* Init0 and Init2 not permitted */
847 return(0);
848 }
849
850 pSen = &pAC->I2c.SenTable[pAC->I2c.CurrSens];
851 ReadComplete = SkI2cReadSensor(pAC, IoC, pSen);
852
853 if (ReadComplete) {
854 SK_ERR_LOG(pAC, SK_ERRCL_INIT, SKERR_I2C_E008, SKERR_I2C_E008MSG);
855 }
856
857 /* Now we are correctly initialized */
858 pAC->I2c.InitLevel = SK_INIT_RUN;
859
860 return(0);
861} /* SkI2cInit2*/
862
863
864/*
865 * Initialize I2C devices
866 *
867 * Get the first voltage value and discard it.
868 * Go into temperature read mode. A default pointer is not set.
869 *
870 * The things to be done depend on the init level in the parameter list:
871 * Level 0:
872 * Initialize only the data structures. Do NOT access hardware.
873 * Level 1:
874 * Initialize hardware through SK_IN / SK_OUT commands. Do NOT use interrupts.
875 * Level 2:
876 * Everything is possible. Interrupts may be used from now on.
877 *
878 * return:
879 * 0 = success
880 * other = error.
881 */
882int SkI2cInit(
883SK_AC *pAC, /* Adapter Context */
884SK_IOC IoC, /* I/O Context needed in levels 1 and 2 */
885int Level) /* Init Level */
886{
887
888 switch (Level) {
889 case SK_INIT_DATA:
890 return(SkI2cInit0(pAC));
891 case SK_INIT_IO:
892 return(SkI2cInit1(pAC, IoC));
893 case SK_INIT_RUN:
894 return(SkI2cInit2(pAC, IoC));
895 default:
896 break;
897 }
898
899 return(0);
900} /* SkI2cInit */
901
902
903#ifndef SK_DIAG
904
905/*
906 * Interrupt service function for the I2C Interface
907 *
908 * Clears the Interrupt source
909 *
910 * Reads the register and check it for sending a trap.
911 *
912 * Starts the timer if necessary.
913 */
914void SkI2cIsr(
915SK_AC *pAC, /* Adapter Context */
916SK_IOC IoC) /* I/O Context */
917{
918 SK_EVPARA Para;
919
920 /* Clear I2C IRQ */
921 SK_OUT32(IoC, B2_I2C_IRQ, I2C_CLR_IRQ);
922
923 Para.Para64 = 0;
924 SkEventQueue(pAC, SKGE_I2C, SK_I2CEV_IRQ, Para);
925} /* SkI2cIsr */
926
927
928/*
929 * Check this sensors Value against the threshold and send events.
930 */
931static void SkI2cCheckSensor(
932SK_AC *pAC, /* Adapter Context */
933SK_SENSOR *pSen)
934{
935 SK_EVPARA ParaLocal;
936 SK_BOOL TooHigh; /* Is sensor too high? */
937 SK_BOOL TooLow; /* Is sensor too low? */
938 SK_U64 CurrTime; /* Current Time */
939 SK_BOOL DoTrapSend; /* We need to send a trap */
940 SK_BOOL DoErrLog; /* We need to log the error */
941 SK_BOOL IsError; /* We need to log the error */
942
943 /* Check Dummy Reads first */
944 if (pAC->I2c.DummyReads > 0) {
945 pAC->I2c.DummyReads--;
946 return;
947 }
948
949 /* Get the current time */
950 CurrTime = SkOsGetTime(pAC);
951
952 /* Set para to the most useful setting: The current sensor. */
953 ParaLocal.Para64 = (SK_U64)pAC->I2c.CurrSens;
954
955 /* Check the Value against the thresholds. First: Error Thresholds */
956 TooHigh = (pSen->SenValue > pSen->SenThreErrHigh);
957 TooLow = (pSen->SenValue < pSen->SenThreErrLow);
958
959 IsError = SK_FALSE;
960 if (TooHigh || TooLow) {
961 /* Error condition is satisfied */
962 DoTrapSend = SK_TRUE;
963 DoErrLog = SK_TRUE;
964
965 /* Now error condition is satisfied */
966 IsError = SK_TRUE;
967
968 if (pSen->SenErrFlag == SK_SEN_ERR_ERR) {
969 /* This state is the former one */
970
971 /* So check first whether we have to send a trap */
972 if (pSen->SenLastErrTrapTS + SK_SEN_ERR_TR_HOLD >
973 CurrTime) {
974 /*
975 * Do NOT send the Trap. The hold back time
976 * has to run out first.
977 */
978 DoTrapSend = SK_FALSE;
979 }
980
981 /* Check now whether we have to log an Error */
982 if (pSen->SenLastErrLogTS + SK_SEN_ERR_LOG_HOLD >
983 CurrTime) {
984 /*
985 * Do NOT log the error. The hold back time
986 * has to run out first.
987 */
988 DoErrLog = SK_FALSE;
989 }
990 }
991 else {
992 /* We came from a different state -> Set Begin Time Stamp */
993 pSen->SenBegErrTS = CurrTime;
994 pSen->SenErrFlag = SK_SEN_ERR_ERR;
995 }
996
997 if (DoTrapSend) {
998 /* Set current Time */
999 pSen->SenLastErrTrapTS = CurrTime;
1000 pSen->SenErrCts++;
1001
1002 /* Queue PNMI Event */
1003 SkEventQueue(pAC, SKGE_PNMI, (TooHigh ?
1004 SK_PNMI_EVT_SEN_ERR_UPP :
1005 SK_PNMI_EVT_SEN_ERR_LOW),
1006 ParaLocal);
1007 }
1008
1009 if (DoErrLog) {
1010 /* Set current Time */
1011 pSen->SenLastErrLogTS = CurrTime;
1012
1013 if (pSen->SenType == SK_SEN_TEMP) {
1014 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E011, SKERR_I2C_E011MSG);
1015 }
1016 else if (pSen->SenType == SK_SEN_VOLT) {
1017 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E012, SKERR_I2C_E012MSG);
1018 }
1019 else {
1020 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E015, SKERR_I2C_E015MSG);
1021 }
1022 }
1023 }
1024
1025 /* Check the Value against the thresholds */
1026 /* 2nd: Warning thresholds */
1027 TooHigh = (pSen->SenValue > pSen->SenThreWarnHigh);
1028 TooLow = (pSen->SenValue < pSen->SenThreWarnLow);
1029
1030 if (!IsError && (TooHigh || TooLow)) {
1031 /* Error condition is satisfied */
1032 DoTrapSend = SK_TRUE;
1033 DoErrLog = SK_TRUE;
1034
1035 if (pSen->SenErrFlag == SK_SEN_ERR_WARN) {
1036 /* This state is the former one */
1037
1038 /* So check first whether we have to send a trap */
1039 if (pSen->SenLastWarnTrapTS + SK_SEN_WARN_TR_HOLD > CurrTime) {
1040 /*
1041 * Do NOT send the Trap. The hold back time
1042 * has to run out first.
1043 */
1044 DoTrapSend = SK_FALSE;
1045 }
1046
1047 /* Check now whether we have to log an Error */
1048 if (pSen->SenLastWarnLogTS + SK_SEN_WARN_LOG_HOLD > CurrTime) {
1049 /*
1050 * Do NOT log the error. The hold back time
1051 * has to run out first.
1052 */
1053 DoErrLog = SK_FALSE;
1054 }
1055 }
1056 else {
1057 /* We came from a different state -> Set Begin Time Stamp */
1058 pSen->SenBegWarnTS = CurrTime;
1059 pSen->SenErrFlag = SK_SEN_ERR_WARN;
1060 }
1061
1062 if (DoTrapSend) {
1063 /* Set current Time */
1064 pSen->SenLastWarnTrapTS = CurrTime;
1065 pSen->SenWarnCts++;
1066
1067 /* Queue PNMI Event */
1068 SkEventQueue(pAC, SKGE_PNMI, (TooHigh ?
1069 SK_PNMI_EVT_SEN_WAR_UPP :
1070 SK_PNMI_EVT_SEN_WAR_LOW),
1071 ParaLocal);
1072 }
1073
1074 if (DoErrLog) {
1075 /* Set current Time */
1076 pSen->SenLastWarnLogTS = CurrTime;
1077
1078 if (pSen->SenType == SK_SEN_TEMP) {
1079 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E009, SKERR_I2C_E009MSG);
1080 }
1081 else if (pSen->SenType == SK_SEN_VOLT) {
1082 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E010, SKERR_I2C_E010MSG);
1083 }
1084 else {
1085 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E014, SKERR_I2C_E014MSG);
1086 }
1087 }
1088 }
1089
1090 /* Check for NO error at all */
1091 if (!IsError && !TooHigh && !TooLow) {
1092 /* Set o.k. Status if no error and no warning condition */
1093 pSen->SenErrFlag = SK_SEN_ERR_OK;
1094 }
1095
1096 /* End of check against the thresholds */
1097
1098 /* Bug fix AF: 16.Aug.2001: Correct the init base
1099 * of LM80 sensor.
1100 */
1101 if (pSen->SenInit == SK_SEN_DYN_INIT_PCI_IO) {
1102
1103 pSen->SenInit = SK_SEN_DYN_INIT_NONE;
1104
1105 if (pSen->SenValue > SK_SEN_PCI_IO_RANGE_LIMITER) {
1106 /* 5V PCI-IO Voltage */
1107 pSen->SenThreWarnLow = SK_SEN_PCI_IO_5V_LOW_WARN;
1108 pSen->SenThreErrLow = SK_SEN_PCI_IO_5V_LOW_ERR;
1109 }
1110 else {
1111 /* 3.3V PCI-IO Voltage */
1112 pSen->SenThreWarnHigh = SK_SEN_PCI_IO_3V3_HIGH_WARN;
1113 pSen->SenThreErrHigh = SK_SEN_PCI_IO_3V3_HIGH_ERR;
1114 }
1115 }
1116
1117#ifdef TEST_ONLY
1118 /* Dynamic thresholds also for VAUX of LM80 sensor */
1119 if (pSen->SenInit == SK_SEN_DYN_INIT_VAUX) {
1120
1121 pSen->SenInit = SK_SEN_DYN_INIT_NONE;
1122
1123 /* 3.3V VAUX Voltage */
1124 if (pSen->SenValue > SK_SEN_VAUX_RANGE_LIMITER) {
1125 pSen->SenThreWarnLow = SK_SEN_VAUX_3V3_LOW_WARN;
1126 pSen->SenThreErrLow = SK_SEN_VAUX_3V3_LOW_ERR;
1127 }
1128 /* 0V VAUX Voltage */
1129 else {
1130 pSen->SenThreWarnHigh = SK_SEN_VAUX_0V_WARN_ERR;
1131 pSen->SenThreErrHigh = SK_SEN_VAUX_0V_WARN_ERR;
1132 }
1133 }
1134
1135 /*
1136 * Check initialization state:
1137 * The VIO Thresholds need adaption
1138 */
1139 if (!pSen->SenInit && pSen->SenReg == LM80_VT1_IN &&
1140 pSen->SenValue > SK_SEN_WARNLOW2C &&
1141 pSen->SenValue < SK_SEN_WARNHIGH2) {
1142 pSen->SenThreErrLow = SK_SEN_ERRLOW2C;
1143 pSen->SenThreWarnLow = SK_SEN_WARNLOW2C;
1144 pSen->SenInit = SK_TRUE;
1145 }
1146
1147 if (!pSen->SenInit && pSen->SenReg == LM80_VT1_IN &&
1148 pSen->SenValue > SK_SEN_WARNLOW2 &&
1149 pSen->SenValue < SK_SEN_WARNHIGH2C) {
1150 pSen->SenThreErrHigh = SK_SEN_ERRHIGH2C;
1151 pSen->SenThreWarnHigh = SK_SEN_WARNHIGH2C;
1152 pSen->SenInit = SK_TRUE;
1153 }
1154#endif
1155
1156 if (pSen->SenInit != SK_SEN_DYN_INIT_NONE) {
1157 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E013, SKERR_I2C_E013MSG);
1158 }
1159} /* SkI2cCheckSensor */
1160
1161
1162/*
1163 * The only Event to be served is the timeout event
1164 *
1165 */
1166int SkI2cEvent(
1167SK_AC *pAC, /* Adapter Context */
1168SK_IOC IoC, /* I/O Context */
1169SK_U32 Event, /* Module specific Event */
1170SK_EVPARA Para) /* Event specific Parameter */
1171{
1172 int ReadComplete;
1173 SK_SENSOR *pSen;
1174 SK_U32 Time;
1175 SK_EVPARA ParaLocal;
1176 int i;
1177
1178 /* New case: no sensors */
1179 if (pAC->I2c.MaxSens == 0) {
1180 return(0);
1181 }
1182
1183 switch (Event) {
1184 case SK_I2CEV_IRQ:
1185 pSen = &pAC->I2c.SenTable[pAC->I2c.CurrSens];
1186 ReadComplete = SkI2cReadSensor(pAC, IoC, pSen);
1187
1188 if (ReadComplete) {
1189 /* Check sensor against defined thresholds */
1190 SkI2cCheckSensor(pAC, pSen);
1191
1192 /* Increment Current sensor and set appropriate Timeout */
1193 pAC->I2c.CurrSens++;
1194 if (pAC->I2c.CurrSens >= pAC->I2c.MaxSens) {
1195 pAC->I2c.CurrSens = 0;
1196 Time = SK_I2C_TIM_LONG;
1197 }
1198 else {
1199 Time = SK_I2C_TIM_SHORT;
1200 }
1201
1202 /* Start Timer */
1203 ParaLocal.Para64 = (SK_U64)0;
1204
1205 pAC->I2c.TimerMode = SK_TIMER_NEW_GAUGING;
1206
1207 SkTimerStart(pAC, IoC, &pAC->I2c.SenTimer, Time,
1208 SKGE_I2C, SK_I2CEV_TIM, ParaLocal);
1209 }
1210 else {
1211 /* Start Timer */
1212 ParaLocal.Para64 = (SK_U64)0;
1213
1214 pAC->I2c.TimerMode = SK_TIMER_WATCH_SM;
1215
1216 SkTimerStart(pAC, IoC, &pAC->I2c.SenTimer, SK_I2C_TIM_WATCH,
1217 SKGE_I2C, SK_I2CEV_TIM, ParaLocal);
1218 }
1219 break;
1220 case SK_I2CEV_TIM:
1221 if (pAC->I2c.TimerMode == SK_TIMER_NEW_GAUGING) {
1222
1223 ParaLocal.Para64 = (SK_U64)0;
1224 SkTimerStop(pAC, IoC, &pAC->I2c.SenTimer);
1225
1226 pSen = &pAC->I2c.SenTable[pAC->I2c.CurrSens];
1227 ReadComplete = SkI2cReadSensor(pAC, IoC, pSen);
1228
1229 if (ReadComplete) {
1230 /* Check sensor against defined thresholds */
1231 SkI2cCheckSensor(pAC, pSen);
1232
1233 /* Increment Current sensor and set appropriate Timeout */
1234 pAC->I2c.CurrSens++;
1235 if (pAC->I2c.CurrSens == pAC->I2c.MaxSens) {
1236 pAC->I2c.CurrSens = 0;
1237 Time = SK_I2C_TIM_LONG;
1238 }
1239 else {
1240 Time = SK_I2C_TIM_SHORT;
1241 }
1242
1243 /* Start Timer */
1244 ParaLocal.Para64 = (SK_U64)0;
1245
1246 pAC->I2c.TimerMode = SK_TIMER_NEW_GAUGING;
1247
1248 SkTimerStart(pAC, IoC, &pAC->I2c.SenTimer, Time,
1249 SKGE_I2C, SK_I2CEV_TIM, ParaLocal);
1250 }
1251 }
1252 else {
1253 pSen = &pAC->I2c.SenTable[pAC->I2c.CurrSens];
1254 pSen->SenErrFlag = SK_SEN_ERR_FAULTY;
1255 SK_I2C_STOP(IoC);
1256
1257 /* Increment Current sensor and set appropriate Timeout */
1258 pAC->I2c.CurrSens++;
1259 if (pAC->I2c.CurrSens == pAC->I2c.MaxSens) {
1260 pAC->I2c.CurrSens = 0;
1261 Time = SK_I2C_TIM_LONG;
1262 }
1263 else {
1264 Time = SK_I2C_TIM_SHORT;
1265 }
1266
1267 /* Start Timer */
1268 ParaLocal.Para64 = (SK_U64)0;
1269
1270 pAC->I2c.TimerMode = SK_TIMER_NEW_GAUGING;
1271
1272 SkTimerStart(pAC, IoC, &pAC->I2c.SenTimer, Time,
1273 SKGE_I2C, SK_I2CEV_TIM, ParaLocal);
1274 }
1275 break;
1276 case SK_I2CEV_CLEAR:
1277 for (i = 0; i < SK_MAX_SENSORS; i++) {
1278 pAC->I2c.SenTable[i].SenErrFlag = SK_SEN_ERR_OK;
1279 pAC->I2c.SenTable[i].SenErrCts = 0;
1280 pAC->I2c.SenTable[i].SenWarnCts = 0;
1281 pAC->I2c.SenTable[i].SenBegErrTS = 0;
1282 pAC->I2c.SenTable[i].SenBegWarnTS = 0;
1283 pAC->I2c.SenTable[i].SenLastErrTrapTS = (SK_U64)0;
1284 pAC->I2c.SenTable[i].SenLastErrLogTS = (SK_U64)0;
1285 pAC->I2c.SenTable[i].SenLastWarnTrapTS = (SK_U64)0;
1286 pAC->I2c.SenTable[i].SenLastWarnLogTS = (SK_U64)0;
1287 }
1288 break;
1289 default:
1290 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E006, SKERR_I2C_E006MSG);
1291 }
1292
1293 return(0);
1294} /* SkI2cEvent*/
1295
1296#endif /* !SK_DIAG */
diff --git a/drivers/net/sk98lin/sklm80.c b/drivers/net/sk98lin/sklm80.c
new file mode 100644
index 0000000000..a204f5bb55
--- /dev/null
+++ b/drivers/net/sk98lin/sklm80.c
@@ -0,0 +1,141 @@
1/******************************************************************************
2 *
3 * Name: sklm80.c
4 * Project: Gigabit Ethernet Adapters, TWSI-Module
5 * Version: $Revision: 1.22 $
6 * Date: $Date: 2003/10/20 09:08:21 $
7 * Purpose: Functions to access Voltage and Temperature Sensor (LM80)
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/*
26 LM80 functions
27*/
28#if (defined(DEBUG) || ((!defined(LINT)) && (!defined(SK_SLIM))))
29static const char SysKonnectFileId[] =
30 "@(#) $Id: sklm80.c,v 1.22 2003/10/20 09:08:21 rschmidt Exp $ (C) Marvell. ";
31#endif
32
33#include "h/skdrv1st.h" /* Driver Specific Definitions */
34#include "h/lm80.h"
35#include "h/skdrv2nd.h" /* Adapter Control- and Driver specific Def. */
36
37#define BREAK_OR_WAIT(pAC,IoC,Event) break
38
39/*
40 * read a sensors value (LM80 specific)
41 *
42 * This function reads a sensors value from the I2C sensor chip LM80.
43 * The sensor is defined by its index into the sensors database in the struct
44 * pAC points to.
45 *
46 * Returns 1 if the read is completed
47 * 0 if the read must be continued (I2C Bus still allocated)
48 */
49int SkLm80ReadSensor(
50SK_AC *pAC, /* Adapter Context */
51SK_IOC IoC, /* I/O Context needed in level 1 and 2 */
52SK_SENSOR *pSen) /* Sensor to be read */
53{
54 SK_I32 Value;
55
56 switch (pSen->SenState) {
57 case SK_SEN_IDLE:
58 /* Send address to ADDR register */
59 SK_I2C_CTL(IoC, I2C_READ, pSen->SenDev, I2C_025K_DEV, pSen->SenReg, 0);
60
61 pSen->SenState = SK_SEN_VALUE ;
62 BREAK_OR_WAIT(pAC, IoC, I2C_READ);
63
64 case SK_SEN_VALUE:
65 /* Read value from data register */
66 SK_IN32(IoC, B2_I2C_DATA, ((SK_U32 *)&Value));
67
68 Value &= 0xff; /* only least significant byte is valid */
69
70 /* Do NOT check the Value against the thresholds */
71 /* Checking is done in the calling instance */
72
73 if (pSen->SenType == SK_SEN_VOLT) {
74 /* Voltage sensor */
75 pSen->SenValue = Value * SK_LM80_VT_LSB;
76 pSen->SenState = SK_SEN_IDLE ;
77 return(1);
78 }
79
80 if (pSen->SenType == SK_SEN_FAN) {
81 if (Value != 0 && Value != 0xff) {
82 /* Fan speed counter */
83 pSen->SenValue = SK_LM80_FAN_FAKTOR/Value;
84 }
85 else {
86 /* Indicate Fan error */
87 pSen->SenValue = 0;
88 }
89 pSen->SenState = SK_SEN_IDLE ;
90 return(1);
91 }
92
93 /* First: correct the value: it might be negative */
94 if ((Value & 0x80) != 0) {
95 /* Value is negative */
96 Value = Value - 256;
97 }
98
99 /* We have a temperature sensor and need to get the signed extension.
100 * For now we get the extension from the last reading, so in the normal
101 * case we won't see flickering temperatures.
102 */
103 pSen->SenValue = (Value * SK_LM80_TEMP_LSB) +
104 (pSen->SenValue % SK_LM80_TEMP_LSB);
105
106 /* Send address to ADDR register */
107 SK_I2C_CTL(IoC, I2C_READ, pSen->SenDev, I2C_025K_DEV, LM80_TEMP_CTRL, 0);
108
109 pSen->SenState = SK_SEN_VALEXT ;
110 BREAK_OR_WAIT(pAC, IoC, I2C_READ);
111
112 case SK_SEN_VALEXT:
113 /* Read value from data register */
114 SK_IN32(IoC, B2_I2C_DATA, ((SK_U32 *)&Value));
115 Value &= LM80_TEMP_LSB_9; /* only bit 7 is valid */
116
117 /* cut the LSB bit */
118 pSen->SenValue = ((pSen->SenValue / SK_LM80_TEMP_LSB) *
119 SK_LM80_TEMP_LSB);
120
121 if (pSen->SenValue < 0) {
122 /* Value negative: The bit value must be subtracted */
123 pSen->SenValue -= ((Value >> 7) * SK_LM80_TEMPEXT_LSB);
124 }
125 else {
126 /* Value positive: The bit value must be added */
127 pSen->SenValue += ((Value >> 7) * SK_LM80_TEMPEXT_LSB);
128 }
129
130 pSen->SenState = SK_SEN_IDLE ;
131 return(1);
132
133 default:
134 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E007, SKERR_I2C_E007MSG);
135 return(1);
136 }
137
138 /* Not completed */
139 return(0);
140}
141
diff --git a/drivers/net/sk98lin/skqueue.c b/drivers/net/sk98lin/skqueue.c
new file mode 100644
index 0000000000..0275b4f71d
--- /dev/null
+++ b/drivers/net/sk98lin/skqueue.c
@@ -0,0 +1,179 @@
1/******************************************************************************
2 *
3 * Name: skqueue.c
4 * Project: Gigabit Ethernet Adapters, Event Scheduler Module
5 * Version: $Revision: 1.20 $
6 * Date: $Date: 2003/09/16 13:44:00 $
7 * Purpose: Management of an event queue.
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25
26/*
27 * Event queue and dispatcher
28 */
29#if (defined(DEBUG) || ((!defined(LINT)) && (!defined(SK_SLIM))))
30static const char SysKonnectFileId[] =
31 "@(#) $Id: skqueue.c,v 1.20 2003/09/16 13:44:00 rschmidt Exp $ (C) Marvell.";
32#endif
33
34#include "h/skdrv1st.h" /* Driver Specific Definitions */
35#include "h/skqueue.h" /* Queue Definitions */
36#include "h/skdrv2nd.h" /* Adapter Control- and Driver specific Def. */
37
38#ifdef __C2MAN__
39/*
40 Event queue management.
41
42 General Description:
43
44 */
45intro()
46{}
47#endif
48
49#define PRINTF(a,b,c)
50
51/*
52 * init event queue management
53 *
54 * Must be called during init level 0.
55 */
56void SkEventInit(
57SK_AC *pAC, /* Adapter context */
58SK_IOC Ioc, /* IO context */
59int Level) /* Init level */
60{
61 switch (Level) {
62 case SK_INIT_DATA:
63 pAC->Event.EvPut = pAC->Event.EvGet = pAC->Event.EvQueue;
64 break;
65 default:
66 break;
67 }
68}
69
70/*
71 * add event to queue
72 */
73void SkEventQueue(
74SK_AC *pAC, /* Adapters context */
75SK_U32 Class, /* Event Class */
76SK_U32 Event, /* Event to be queued */
77SK_EVPARA Para) /* Event parameter */
78{
79 pAC->Event.EvPut->Class = Class;
80 pAC->Event.EvPut->Event = Event;
81 pAC->Event.EvPut->Para = Para;
82
83 if (++pAC->Event.EvPut == &pAC->Event.EvQueue[SK_MAX_EVENT])
84 pAC->Event.EvPut = pAC->Event.EvQueue;
85
86 if (pAC->Event.EvPut == pAC->Event.EvGet) {
87 SK_ERR_LOG(pAC, SK_ERRCL_NORES, SKERR_Q_E001, SKERR_Q_E001MSG);
88 }
89}
90
91/*
92 * event dispatcher
93 * while event queue is not empty
94 * get event from queue
95 * send command to state machine
96 * end
97 * return error reported by individual Event function
98 * 0 if no error occured.
99 */
100int SkEventDispatcher(
101SK_AC *pAC, /* Adapters Context */
102SK_IOC Ioc) /* Io context */
103{
104 SK_EVENTELEM *pEv; /* pointer into queue */
105 SK_U32 Class;
106 int Rtv;
107
108 pEv = pAC->Event.EvGet;
109
110 PRINTF("dispatch get %x put %x\n", pEv, pAC->Event.ev_put);
111
112 while (pEv != pAC->Event.EvPut) {
113 PRINTF("dispatch Class %d Event %d\n", pEv->Class, pEv->Event);
114
115 switch (Class = pEv->Class) {
116#ifndef SK_USE_LAC_EV
117#ifndef SK_SLIM
118 case SKGE_RLMT: /* RLMT Event */
119 Rtv = SkRlmtEvent(pAC, Ioc, pEv->Event, pEv->Para);
120 break;
121 case SKGE_I2C: /* I2C Event */
122 Rtv = SkI2cEvent(pAC, Ioc, pEv->Event, pEv->Para);
123 break;
124 case SKGE_PNMI: /* PNMI Event */
125 Rtv = SkPnmiEvent(pAC, Ioc, pEv->Event, pEv->Para);
126 break;
127#endif /* not SK_SLIM */
128#endif /* not SK_USE_LAC_EV */
129 case SKGE_DRV: /* Driver Event */
130 Rtv = SkDrvEvent(pAC, Ioc, pEv->Event, pEv->Para);
131 break;
132#ifndef SK_USE_SW_TIMER
133 case SKGE_HWAC:
134 Rtv = SkGeSirqEvent(pAC, Ioc, pEv->Event, pEv->Para);
135 break;
136#else /* !SK_USE_SW_TIMER */
137 case SKGE_SWT :
138 Rtv = SkSwtEvent(pAC, Ioc, pEv->Event, pEv->Para);
139 break;
140#endif /* !SK_USE_SW_TIMER */
141#ifdef SK_USE_LAC_EV
142 case SKGE_LACP :
143 Rtv = SkLacpEvent(pAC, Ioc, pEv->Event, pEv->Para);
144 break;
145 case SKGE_RSF :
146 Rtv = SkRsfEvent(pAC, Ioc, pEv->Event, pEv->Para);
147 break;
148 case SKGE_MARKER :
149 Rtv = SkMarkerEvent(pAC, Ioc, pEv->Event, pEv->Para);
150 break;
151 case SKGE_FD :
152 Rtv = SkFdEvent(pAC, Ioc, pEv->Event, pEv->Para);
153 break;
154#endif /* SK_USE_LAC_EV */
155#ifdef SK_USE_CSUM
156 case SKGE_CSUM :
157 Rtv = SkCsEvent(pAC, Ioc, pEv->Event, pEv->Para);
158 break;
159#endif /* SK_USE_CSUM */
160 default :
161 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_Q_E002, SKERR_Q_E002MSG);
162 Rtv = 0;
163 }
164
165 if (Rtv != 0) {
166 return(Rtv);
167 }
168
169 if (++pEv == &pAC->Event.EvQueue[SK_MAX_EVENT])
170 pEv = pAC->Event.EvQueue;
171
172 /* Renew get: it is used in queue_events to detect overruns */
173 pAC->Event.EvGet = pEv;
174 }
175
176 return(0);
177}
178
179/* End of file */
diff --git a/drivers/net/sk98lin/skrlmt.c b/drivers/net/sk98lin/skrlmt.c
new file mode 100644
index 0000000000..be8d1ccddf
--- /dev/null
+++ b/drivers/net/sk98lin/skrlmt.c
@@ -0,0 +1,3257 @@
1/******************************************************************************
2 *
3 * Name: skrlmt.c
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.69 $
6 * Date: $Date: 2003/04/15 09:39:22 $
7 * Purpose: Manage links on SK-NET Adapters, esp. redundant ones.
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25/******************************************************************************
26 *
27 * Description:
28 *
29 * This module contains code for Link ManagemenT (LMT) of SK-NET Adapters.
30 * It is mainly intended for adapters with more than one link.
31 * For such adapters, this module realizes Redundant Link ManagemenT (RLMT).
32 *
33 * Include File Hierarchy:
34 *
35 * "skdrv1st.h"
36 * "skdrv2nd.h"
37 *
38 ******************************************************************************/
39
40#ifndef lint
41static const char SysKonnectFileId[] =
42 "@(#) $Id: skrlmt.c,v 1.69 2003/04/15 09:39:22 tschilli Exp $ (C) Marvell.";
43#endif /* !defined(lint) */
44
45#define __SKRLMT_C
46
47#ifdef __cplusplus
48extern "C" {
49#endif /* cplusplus */
50
51#include "h/skdrv1st.h"
52#include "h/skdrv2nd.h"
53
54/* defines ********************************************************************/
55
56#ifndef SK_HWAC_LINK_LED
57#define SK_HWAC_LINK_LED(a,b,c,d)
58#endif /* !defined(SK_HWAC_LINK_LED) */
59
60#ifndef DEBUG
61#define RLMT_STATIC static
62#else /* DEBUG */
63#define RLMT_STATIC
64
65#ifndef SK_LITTLE_ENDIAN
66/* First 32 bits */
67#define OFFS_LO32 1
68
69/* Second 32 bits */
70#define OFFS_HI32 0
71#else /* SK_LITTLE_ENDIAN */
72/* First 32 bits */
73#define OFFS_LO32 0
74
75/* Second 32 bits */
76#define OFFS_HI32 1
77#endif /* SK_LITTLE_ENDIAN */
78
79#endif /* DEBUG */
80
81/* ----- Private timeout values ----- */
82
83#define SK_RLMT_MIN_TO_VAL 125000 /* 1/8 sec. */
84#define SK_RLMT_DEF_TO_VAL 1000000 /* 1 sec. */
85#define SK_RLMT_PORTDOWN_TIM_VAL 900000 /* another 0.9 sec. */
86#define SK_RLMT_PORTSTART_TIM_VAL 100000 /* 0.1 sec. */
87#define SK_RLMT_PORTUP_TIM_VAL 2500000 /* 2.5 sec. */
88#define SK_RLMT_SEG_TO_VAL 900000000 /* 15 min. */
89
90/* Assume tick counter increment is 1 - may be set OS-dependent. */
91#ifndef SK_TICK_INCR
92#define SK_TICK_INCR SK_CONSTU64(1)
93#endif /* !defined(SK_TICK_INCR) */
94
95/*
96 * Amount that a time stamp must be later to be recognized as "substantially
97 * later". This is about 1/128 sec, but above 1 tick counter increment.
98 */
99#define SK_RLMT_BC_DELTA (1 + ((SK_TICKS_PER_SEC >> 7) > SK_TICK_INCR ? \
100 (SK_TICKS_PER_SEC >> 7) : SK_TICK_INCR))
101
102/* ----- Private RLMT defaults ----- */
103
104#define SK_RLMT_DEF_PREF_PORT 0 /* "Lower" port. */
105#define SK_RLMT_DEF_MODE SK_RLMT_CHECK_LINK /* Default RLMT Mode. */
106
107/* ----- Private RLMT checking states ----- */
108
109#define SK_RLMT_RCS_SEG 1 /* RLMT Check State: check seg. */
110#define SK_RLMT_RCS_START_SEG 2 /* RLMT Check State: start check seg. */
111#define SK_RLMT_RCS_SEND_SEG 4 /* RLMT Check State: send BPDU packet */
112#define SK_RLMT_RCS_REPORT_SEG 8 /* RLMT Check State: report seg. */
113
114/* ----- Private PORT checking states ----- */
115
116#define SK_RLMT_PCS_TX 1 /* Port Check State: check tx. */
117#define SK_RLMT_PCS_RX 2 /* Port Check State: check rx. */
118
119/* ----- Private PORT events ----- */
120
121/* Note: Update simulation when changing these. */
122#define SK_RLMT_PORTSTART_TIM 1100 /* Port start timeout. */
123#define SK_RLMT_PORTUP_TIM 1101 /* Port can now go up. */
124#define SK_RLMT_PORTDOWN_RX_TIM 1102 /* Port did not receive once ... */
125#define SK_RLMT_PORTDOWN 1103 /* Port went down. */
126#define SK_RLMT_PORTDOWN_TX_TIM 1104 /* Partner did not receive ... */
127
128/* ----- Private RLMT events ----- */
129
130/* Note: Update simulation when changing these. */
131#define SK_RLMT_TIM 2100 /* RLMT timeout. */
132#define SK_RLMT_SEG_TIM 2101 /* RLMT segmentation check timeout. */
133
134#define TO_SHORTEN(tim) ((tim) / 2)
135
136/* Error numbers and messages. */
137#define SKERR_RLMT_E001 (SK_ERRBASE_RLMT + 0)
138#define SKERR_RLMT_E001_MSG "No Packet."
139#define SKERR_RLMT_E002 (SKERR_RLMT_E001 + 1)
140#define SKERR_RLMT_E002_MSG "Short Packet."
141#define SKERR_RLMT_E003 (SKERR_RLMT_E002 + 1)
142#define SKERR_RLMT_E003_MSG "Unknown RLMT event."
143#define SKERR_RLMT_E004 (SKERR_RLMT_E003 + 1)
144#define SKERR_RLMT_E004_MSG "PortsUp incorrect."
145#define SKERR_RLMT_E005 (SKERR_RLMT_E004 + 1)
146#define SKERR_RLMT_E005_MSG \
147 "Net seems to be segmented (different root bridges are reported on the ports)."
148#define SKERR_RLMT_E006 (SKERR_RLMT_E005 + 1)
149#define SKERR_RLMT_E006_MSG "Duplicate MAC Address detected."
150#define SKERR_RLMT_E007 (SKERR_RLMT_E006 + 1)
151#define SKERR_RLMT_E007_MSG "LinksUp incorrect."
152#define SKERR_RLMT_E008 (SKERR_RLMT_E007 + 1)
153#define SKERR_RLMT_E008_MSG "Port not started but link came up."
154#define SKERR_RLMT_E009 (SKERR_RLMT_E008 + 1)
155#define SKERR_RLMT_E009_MSG "Corrected illegal setting of Preferred Port."
156#define SKERR_RLMT_E010 (SKERR_RLMT_E009 + 1)
157#define SKERR_RLMT_E010_MSG "Ignored illegal Preferred Port."
158
159/* LLC field values. */
160#define LLC_COMMAND_RESPONSE_BIT 1
161#define LLC_TEST_COMMAND 0xE3
162#define LLC_UI 0x03
163
164/* RLMT Packet fields. */
165#define SK_RLMT_DSAP 0
166#define SK_RLMT_SSAP 0
167#define SK_RLMT_CTRL (LLC_TEST_COMMAND)
168#define SK_RLMT_INDICATOR0 0x53 /* S */
169#define SK_RLMT_INDICATOR1 0x4B /* K */
170#define SK_RLMT_INDICATOR2 0x2D /* - */
171#define SK_RLMT_INDICATOR3 0x52 /* R */
172#define SK_RLMT_INDICATOR4 0x4C /* L */
173#define SK_RLMT_INDICATOR5 0x4D /* M */
174#define SK_RLMT_INDICATOR6 0x54 /* T */
175#define SK_RLMT_PACKET_VERSION 0
176
177/* RLMT SPT Flag values. */
178#define SK_RLMT_SPT_FLAG_CHANGE 0x01
179#define SK_RLMT_SPT_FLAG_CHANGE_ACK 0x80
180
181/* RLMT SPT Packet fields. */
182#define SK_RLMT_SPT_DSAP 0x42
183#define SK_RLMT_SPT_SSAP 0x42
184#define SK_RLMT_SPT_CTRL (LLC_UI)
185#define SK_RLMT_SPT_PROTOCOL_ID0 0x00
186#define SK_RLMT_SPT_PROTOCOL_ID1 0x00
187#define SK_RLMT_SPT_PROTOCOL_VERSION_ID 0x00
188#define SK_RLMT_SPT_BPDU_TYPE 0x00
189#define SK_RLMT_SPT_FLAGS 0x00 /* ?? */
190#define SK_RLMT_SPT_ROOT_ID0 0xFF /* Lowest possible priority. */
191#define SK_RLMT_SPT_ROOT_ID1 0xFF /* Lowest possible priority. */
192
193/* Remaining 6 bytes will be the current port address. */
194#define SK_RLMT_SPT_ROOT_PATH_COST0 0x00
195#define SK_RLMT_SPT_ROOT_PATH_COST1 0x00
196#define SK_RLMT_SPT_ROOT_PATH_COST2 0x00
197#define SK_RLMT_SPT_ROOT_PATH_COST3 0x00
198#define SK_RLMT_SPT_BRIDGE_ID0 0xFF /* Lowest possible priority. */
199#define SK_RLMT_SPT_BRIDGE_ID1 0xFF /* Lowest possible priority. */
200
201/* Remaining 6 bytes will be the current port address. */
202#define SK_RLMT_SPT_PORT_ID0 0xFF /* Lowest possible priority. */
203#define SK_RLMT_SPT_PORT_ID1 0xFF /* Lowest possible priority. */
204#define SK_RLMT_SPT_MSG_AGE0 0x00
205#define SK_RLMT_SPT_MSG_AGE1 0x00
206#define SK_RLMT_SPT_MAX_AGE0 0x00
207#define SK_RLMT_SPT_MAX_AGE1 0xFF
208#define SK_RLMT_SPT_HELLO_TIME0 0x00
209#define SK_RLMT_SPT_HELLO_TIME1 0xFF
210#define SK_RLMT_SPT_FWD_DELAY0 0x00
211#define SK_RLMT_SPT_FWD_DELAY1 0x40
212
213/* Size defines. */
214#define SK_RLMT_MIN_PACKET_SIZE 34
215#define SK_RLMT_MAX_PACKET_SIZE (SK_RLMT_MAX_TX_BUF_SIZE)
216#define SK_PACKET_DATA_LEN (SK_RLMT_MAX_PACKET_SIZE - \
217 SK_RLMT_MIN_PACKET_SIZE)
218
219/* ----- RLMT packet types ----- */
220#define SK_PACKET_ANNOUNCE 1 /* Port announcement. */
221#define SK_PACKET_ALIVE 2 /* Alive packet to port. */
222#define SK_PACKET_ADDR_CHANGED 3 /* Port address changed. */
223#define SK_PACKET_CHECK_TX 4 /* Check your tx line. */
224
225#ifdef SK_LITTLE_ENDIAN
226#define SK_U16_TO_NETWORK_ORDER(Val,Addr) { \
227 SK_U8 *_Addr = (SK_U8*)(Addr); \
228 SK_U16 _Val = (SK_U16)(Val); \
229 *_Addr++ = (SK_U8)(_Val >> 8); \
230 *_Addr = (SK_U8)(_Val & 0xFF); \
231}
232#endif /* SK_LITTLE_ENDIAN */
233
234#ifdef SK_BIG_ENDIAN
235#define SK_U16_TO_NETWORK_ORDER(Val,Addr) (*(SK_U16*)(Addr) = (SK_U16)(Val))
236#endif /* SK_BIG_ENDIAN */
237
238#define AUTONEG_FAILED SK_FALSE
239#define AUTONEG_SUCCESS SK_TRUE
240
241
242/* typedefs *******************************************************************/
243
244/* RLMT packet. Length: SK_RLMT_MAX_PACKET_SIZE (60) bytes. */
245typedef struct s_RlmtPacket {
246 SK_U8 DstAddr[SK_MAC_ADDR_LEN];
247 SK_U8 SrcAddr[SK_MAC_ADDR_LEN];
248 SK_U8 TypeLen[2];
249 SK_U8 DSap;
250 SK_U8 SSap;
251 SK_U8 Ctrl;
252 SK_U8 Indicator[7];
253 SK_U8 RlmtPacketType[2];
254 SK_U8 Align1[2];
255 SK_U8 Random[4]; /* Random value of requesting(!) station. */
256 SK_U8 RlmtPacketVersion[2]; /* RLMT Packet version. */
257 SK_U8 Data[SK_PACKET_DATA_LEN];
258} SK_RLMT_PACKET;
259
260typedef struct s_SpTreeRlmtPacket {
261 SK_U8 DstAddr[SK_MAC_ADDR_LEN];
262 SK_U8 SrcAddr[SK_MAC_ADDR_LEN];
263 SK_U8 TypeLen[2];
264 SK_U8 DSap;
265 SK_U8 SSap;
266 SK_U8 Ctrl;
267 SK_U8 ProtocolId[2];
268 SK_U8 ProtocolVersionId;
269 SK_U8 BpduType;
270 SK_U8 Flags;
271 SK_U8 RootId[8];
272 SK_U8 RootPathCost[4];
273 SK_U8 BridgeId[8];
274 SK_U8 PortId[2];
275 SK_U8 MessageAge[2];
276 SK_U8 MaxAge[2];
277 SK_U8 HelloTime[2];
278 SK_U8 ForwardDelay[2];
279} SK_SPTREE_PACKET;
280
281/* global variables ***********************************************************/
282
283SK_MAC_ADDR SkRlmtMcAddr = {{0x01, 0x00, 0x5A, 0x52, 0x4C, 0x4D}};
284SK_MAC_ADDR BridgeMcAddr = {{0x01, 0x80, 0xC2, 0x00, 0x00, 0x00}};
285
286/* local variables ************************************************************/
287
288/* None. */
289
290/* functions ******************************************************************/
291
292RLMT_STATIC void SkRlmtCheckSwitch(
293 SK_AC *pAC,
294 SK_IOC IoC,
295 SK_U32 NetIdx);
296RLMT_STATIC void SkRlmtCheckSeg(
297 SK_AC *pAC,
298 SK_IOC IoC,
299 SK_U32 NetIdx);
300RLMT_STATIC void SkRlmtEvtSetNets(
301 SK_AC *pAC,
302 SK_IOC IoC,
303 SK_EVPARA Para);
304
305/******************************************************************************
306 *
307 * SkRlmtInit - initialize data, set state to init
308 *
309 * Description:
310 *
311 * SK_INIT_DATA
312 * ============
313 *
314 * This routine initializes all RLMT-related variables to a known state.
315 * The initial state is SK_RLMT_RS_INIT.
316 * All ports are initialized to SK_RLMT_PS_INIT.
317 *
318 *
319 * SK_INIT_IO
320 * ==========
321 *
322 * Nothing.
323 *
324 *
325 * SK_INIT_RUN
326 * ===========
327 *
328 * Determine the adapter's random value.
329 * Set the hw registers, the "logical MAC address", the
330 * RLMT multicast address, and eventually the BPDU multicast address.
331 *
332 * Context:
333 * init, pageable
334 *
335 * Returns:
336 * Nothing.
337 */
338void SkRlmtInit(
339SK_AC *pAC, /* Adapter Context */
340SK_IOC IoC, /* I/O Context */
341int Level) /* Initialization Level */
342{
343 SK_U32 i, j;
344 SK_U64 Random;
345 SK_EVPARA Para;
346 SK_MAC_ADDR VirtualMacAddress;
347 SK_MAC_ADDR PhysicalAMacAddress;
348 SK_BOOL VirtualMacAddressSet;
349 SK_BOOL PhysicalAMacAddressSet;
350
351 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_INIT,
352 ("RLMT Init level %d.\n", Level))
353
354 switch (Level) {
355 case SK_INIT_DATA: /* Initialize data structures. */
356 SK_MEMSET((char *)&pAC->Rlmt, 0, sizeof(SK_RLMT));
357
358 for (i = 0; i < SK_MAX_MACS; i++) {
359 pAC->Rlmt.Port[i].PortState = SK_RLMT_PS_INIT;
360 pAC->Rlmt.Port[i].LinkDown = SK_TRUE;
361 pAC->Rlmt.Port[i].PortDown = SK_TRUE;
362 pAC->Rlmt.Port[i].PortStarted = SK_FALSE;
363 pAC->Rlmt.Port[i].PortNoRx = SK_FALSE;
364 pAC->Rlmt.Port[i].RootIdSet = SK_FALSE;
365 pAC->Rlmt.Port[i].PortNumber = i;
366 pAC->Rlmt.Port[i].Net = &pAC->Rlmt.Net[0];
367 pAC->Rlmt.Port[i].AddrPort = &pAC->Addr.Port[i];
368 }
369
370 pAC->Rlmt.NumNets = 1;
371 for (i = 0; i < SK_MAX_NETS; i++) {
372 pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT;
373 pAC->Rlmt.Net[i].RootIdSet = SK_FALSE;
374 pAC->Rlmt.Net[i].PrefPort = SK_RLMT_DEF_PREF_PORT;
375 pAC->Rlmt.Net[i].Preference = 0xFFFFFFFF; /* Automatic. */
376 /* Just assuming. */
377 pAC->Rlmt.Net[i].ActivePort = pAC->Rlmt.Net[i].PrefPort;
378 pAC->Rlmt.Net[i].RlmtMode = SK_RLMT_DEF_MODE;
379 pAC->Rlmt.Net[i].TimeoutValue = SK_RLMT_DEF_TO_VAL;
380 pAC->Rlmt.Net[i].NetNumber = i;
381 }
382
383 pAC->Rlmt.Net[0].Port[0] = &pAC->Rlmt.Port[0];
384 pAC->Rlmt.Net[0].Port[1] = &pAC->Rlmt.Port[1];
385#if SK_MAX_NETS > 1
386 pAC->Rlmt.Net[1].Port[0] = &pAC->Rlmt.Port[1];
387#endif /* SK_MAX_NETS > 1 */
388 break;
389
390 case SK_INIT_IO: /* GIMacsFound first available here. */
391 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_INIT,
392 ("RLMT: %d MACs were detected.\n", pAC->GIni.GIMacsFound))
393
394 pAC->Rlmt.Net[0].NumPorts = pAC->GIni.GIMacsFound;
395
396 /* Initialize HW registers? */
397 if (pAC->GIni.GIMacsFound == 1) {
398 Para.Para32[0] = SK_RLMT_MODE_CLS;
399 Para.Para32[1] = 0;
400 (void)SkRlmtEvent(pAC, IoC, SK_RLMT_MODE_CHANGE, Para);
401 }
402 break;
403
404 case SK_INIT_RUN:
405 /* Ensure RLMT is set to one net. */
406 if (pAC->Rlmt.NumNets > 1) {
407 Para.Para32[0] = 1;
408 Para.Para32[1] = -1;
409 SkRlmtEvtSetNets(pAC, IoC, Para);
410 }
411
412 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
413 Random = SkOsGetTime(pAC);
414 *(SK_U32*)&pAC->Rlmt.Port[i].Random = *(SK_U32*)&Random;
415
416 for (j = 0; j < 4; j++) {
417 pAC->Rlmt.Port[i].Random[j] ^= pAC->Rlmt.Port[i].AddrPort->
418 CurrentMacAddress.a[SK_MAC_ADDR_LEN - 1 - j];
419 }
420
421 (void)SkAddrMcClear(pAC, IoC, i, SK_ADDR_PERMANENT | SK_MC_SW_ONLY);
422
423 /* Add RLMT MC address. */
424 (void)SkAddrMcAdd(pAC, IoC, i, &SkRlmtMcAddr, SK_ADDR_PERMANENT);
425
426 if (pAC->Rlmt.Net[0].RlmtMode & SK_RLMT_CHECK_SEG) {
427 /* Add BPDU MC address. */
428 (void)SkAddrMcAdd(pAC, IoC, i, &BridgeMcAddr, SK_ADDR_PERMANENT);
429 }
430
431 (void)SkAddrMcUpdate(pAC, IoC, i);
432 }
433
434 VirtualMacAddressSet = SK_FALSE;
435 /* Read virtual MAC address from Control Register File. */
436 for (j = 0; j < SK_MAC_ADDR_LEN; j++) {
437
438 SK_IN8(IoC, B2_MAC_1 + j, &VirtualMacAddress.a[j]);
439 VirtualMacAddressSet |= VirtualMacAddress.a[j];
440 }
441
442 PhysicalAMacAddressSet = SK_FALSE;
443 /* Read physical MAC address for MAC A from Control Register File. */
444 for (j = 0; j < SK_MAC_ADDR_LEN; j++) {
445
446 SK_IN8(IoC, B2_MAC_2 + j, &PhysicalAMacAddress.a[j]);
447 PhysicalAMacAddressSet |= PhysicalAMacAddress.a[j];
448 }
449
450 /* check if the two mac addresses contain reasonable values */
451 if (!VirtualMacAddressSet || !PhysicalAMacAddressSet) {
452
453 pAC->Rlmt.RlmtOff = SK_TRUE;
454 }
455
456 /* if the two mac addresses are equal switch off the RLMT_PRE_LOOKAHEAD
457 and the RLMT_LOOKAHEAD macros */
458 else if (SK_ADDR_EQUAL(PhysicalAMacAddress.a, VirtualMacAddress.a)) {
459
460 pAC->Rlmt.RlmtOff = SK_TRUE;
461 }
462 else {
463 pAC->Rlmt.RlmtOff = SK_FALSE;
464 }
465 break;
466
467 default: /* error */
468 break;
469 }
470 return;
471} /* SkRlmtInit */
472
473
474/******************************************************************************
475 *
476 * SkRlmtBuildCheckChain - build the check chain
477 *
478 * Description:
479 * This routine builds the local check chain:
480 * - Each port that is up checks the next port.
481 * - The last port that is up checks the first port that is up.
482 *
483 * Notes:
484 * - Currently only local ports are considered when building the chain.
485 * - Currently the SuspectState is just reset;
486 * it would be better to save it ...
487 *
488 * Context:
489 * runtime, pageable?
490 *
491 * Returns:
492 * Nothing
493 */
494RLMT_STATIC void SkRlmtBuildCheckChain(
495SK_AC *pAC, /* Adapter Context */
496SK_U32 NetIdx) /* Net Number */
497{
498 SK_U32 i;
499 SK_U32 NumMacsUp;
500 SK_RLMT_PORT * FirstMacUp;
501 SK_RLMT_PORT * PrevMacUp;
502
503 FirstMacUp = NULL;
504 PrevMacUp = NULL;
505
506 if (!(pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_CHECK_LOC_LINK)) {
507 for (i = 0; i < pAC->Rlmt.Net[i].NumPorts; i++) {
508 pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked = 0;
509 }
510 return; /* Done. */
511 }
512
513 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
514 ("SkRlmtBuildCheckChain.\n"))
515
516 NumMacsUp = 0;
517
518 for (i = 0; i < pAC->Rlmt.Net[NetIdx].NumPorts; i++) {
519 pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked = 0;
520 pAC->Rlmt.Net[NetIdx].Port[i]->PortsSuspect = 0;
521 pAC->Rlmt.Net[NetIdx].Port[i]->CheckingState &=
522 ~(SK_RLMT_PCS_RX | SK_RLMT_PCS_TX);
523
524 /*
525 * If more than two links are detected we should consider
526 * checking at least two other ports:
527 * 1. the next port that is not LinkDown and
528 * 2. the next port that is not PortDown.
529 */
530 if (!pAC->Rlmt.Net[NetIdx].Port[i]->LinkDown) {
531 if (NumMacsUp == 0) {
532 FirstMacUp = pAC->Rlmt.Net[NetIdx].Port[i];
533 }
534 else {
535 PrevMacUp->PortCheck[
536 pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked].CheckAddr =
537 pAC->Rlmt.Net[NetIdx].Port[i]->AddrPort->CurrentMacAddress;
538 PrevMacUp->PortCheck[
539 PrevMacUp->PortsChecked].SuspectTx = SK_FALSE;
540 PrevMacUp->PortsChecked++;
541 }
542 PrevMacUp = pAC->Rlmt.Net[NetIdx].Port[i];
543 NumMacsUp++;
544 }
545 }
546
547 if (NumMacsUp > 1) {
548 PrevMacUp->PortCheck[PrevMacUp->PortsChecked].CheckAddr =
549 FirstMacUp->AddrPort->CurrentMacAddress;
550 PrevMacUp->PortCheck[PrevMacUp->PortsChecked].SuspectTx =
551 SK_FALSE;
552 PrevMacUp->PortsChecked++;
553 }
554
555#ifdef DEBUG
556 for (i = 0; i < pAC->Rlmt.Net[NetIdx].NumPorts; i++) {
557 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
558 ("Port %d checks %d other ports: %2X.\n", i,
559 pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked,
560 pAC->Rlmt.Net[NetIdx].Port[i]->PortCheck[0].CheckAddr.a[5]))
561 }
562#endif /* DEBUG */
563
564 return;
565} /* SkRlmtBuildCheckChain */
566
567
568/******************************************************************************
569 *
570 * SkRlmtBuildPacket - build an RLMT packet
571 *
572 * Description:
573 * This routine sets up an RLMT packet.
574 *
575 * Context:
576 * runtime, pageable?
577 *
578 * Returns:
579 * NULL or pointer to RLMT mbuf
580 */
581RLMT_STATIC SK_MBUF *SkRlmtBuildPacket(
582SK_AC *pAC, /* Adapter Context */
583SK_IOC IoC, /* I/O Context */
584SK_U32 PortNumber, /* Sending port */
585SK_U16 PacketType, /* RLMT packet type */
586SK_MAC_ADDR *SrcAddr, /* Source address */
587SK_MAC_ADDR *DestAddr) /* Destination address */
588{
589 int i;
590 SK_U16 Length;
591 SK_MBUF *pMb;
592 SK_RLMT_PACKET *pPacket;
593
594#ifdef DEBUG
595 SK_U8 CheckSrc = 0;
596 SK_U8 CheckDest = 0;
597
598 for (i = 0; i < SK_MAC_ADDR_LEN; ++i) {
599 CheckSrc |= SrcAddr->a[i];
600 CheckDest |= DestAddr->a[i];
601 }
602
603 if ((CheckSrc == 0) || (CheckDest == 0)) {
604 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_ERR,
605 ("SkRlmtBuildPacket: Invalid %s%saddr.\n",
606 (CheckSrc == 0 ? "Src" : ""), (CheckDest == 0 ? "Dest" : "")))
607 }
608#endif
609
610 if ((pMb = SkDrvAllocRlmtMbuf(pAC, IoC, SK_RLMT_MAX_PACKET_SIZE)) != NULL) {
611 pPacket = (SK_RLMT_PACKET*)pMb->pData;
612 for (i = 0; i < SK_MAC_ADDR_LEN; i++) {
613 pPacket->DstAddr[i] = DestAddr->a[i];
614 pPacket->SrcAddr[i] = SrcAddr->a[i];
615 }
616 pPacket->DSap = SK_RLMT_DSAP;
617 pPacket->SSap = SK_RLMT_SSAP;
618 pPacket->Ctrl = SK_RLMT_CTRL;
619 pPacket->Indicator[0] = SK_RLMT_INDICATOR0;
620 pPacket->Indicator[1] = SK_RLMT_INDICATOR1;
621 pPacket->Indicator[2] = SK_RLMT_INDICATOR2;
622 pPacket->Indicator[3] = SK_RLMT_INDICATOR3;
623 pPacket->Indicator[4] = SK_RLMT_INDICATOR4;
624 pPacket->Indicator[5] = SK_RLMT_INDICATOR5;
625 pPacket->Indicator[6] = SK_RLMT_INDICATOR6;
626
627 SK_U16_TO_NETWORK_ORDER(PacketType, &pPacket->RlmtPacketType[0]);
628
629 for (i = 0; i < 4; i++) {
630 pPacket->Random[i] = pAC->Rlmt.Port[PortNumber].Random[i];
631 }
632
633 SK_U16_TO_NETWORK_ORDER(
634 SK_RLMT_PACKET_VERSION, &pPacket->RlmtPacketVersion[0]);
635
636 for (i = 0; i < SK_PACKET_DATA_LEN; i++) {
637 pPacket->Data[i] = 0x00;
638 }
639
640 Length = SK_RLMT_MAX_PACKET_SIZE; /* Or smaller. */
641 pMb->Length = Length;
642 pMb->PortIdx = PortNumber;
643 Length -= 14;
644 SK_U16_TO_NETWORK_ORDER(Length, &pPacket->TypeLen[0]);
645
646 if (PacketType == SK_PACKET_ALIVE) {
647 pAC->Rlmt.Port[PortNumber].TxHelloCts++;
648 }
649 }
650
651 return (pMb);
652} /* SkRlmtBuildPacket */
653
654
655/******************************************************************************
656 *
657 * SkRlmtBuildSpanningTreePacket - build spanning tree check packet
658 *
659 * Description:
660 * This routine sets up a BPDU packet for spanning tree check.
661 *
662 * Context:
663 * runtime, pageable?
664 *
665 * Returns:
666 * NULL or pointer to RLMT mbuf
667 */
668RLMT_STATIC SK_MBUF *SkRlmtBuildSpanningTreePacket(
669SK_AC *pAC, /* Adapter Context */
670SK_IOC IoC, /* I/O Context */
671SK_U32 PortNumber) /* Sending port */
672{
673 unsigned i;
674 SK_U16 Length;
675 SK_MBUF *pMb;
676 SK_SPTREE_PACKET *pSPacket;
677
678 if ((pMb = SkDrvAllocRlmtMbuf(pAC, IoC, SK_RLMT_MAX_PACKET_SIZE)) !=
679 NULL) {
680 pSPacket = (SK_SPTREE_PACKET*)pMb->pData;
681 for (i = 0; i < SK_MAC_ADDR_LEN; i++) {
682 pSPacket->DstAddr[i] = BridgeMcAddr.a[i];
683 pSPacket->SrcAddr[i] =
684 pAC->Addr.Port[PortNumber].CurrentMacAddress.a[i];
685 }
686 pSPacket->DSap = SK_RLMT_SPT_DSAP;
687 pSPacket->SSap = SK_RLMT_SPT_SSAP;
688 pSPacket->Ctrl = SK_RLMT_SPT_CTRL;
689
690 pSPacket->ProtocolId[0] = SK_RLMT_SPT_PROTOCOL_ID0;
691 pSPacket->ProtocolId[1] = SK_RLMT_SPT_PROTOCOL_ID1;
692 pSPacket->ProtocolVersionId = SK_RLMT_SPT_PROTOCOL_VERSION_ID;
693 pSPacket->BpduType = SK_RLMT_SPT_BPDU_TYPE;
694 pSPacket->Flags = SK_RLMT_SPT_FLAGS;
695 pSPacket->RootId[0] = SK_RLMT_SPT_ROOT_ID0;
696 pSPacket->RootId[1] = SK_RLMT_SPT_ROOT_ID1;
697 pSPacket->RootPathCost[0] = SK_RLMT_SPT_ROOT_PATH_COST0;
698 pSPacket->RootPathCost[1] = SK_RLMT_SPT_ROOT_PATH_COST1;
699 pSPacket->RootPathCost[2] = SK_RLMT_SPT_ROOT_PATH_COST2;
700 pSPacket->RootPathCost[3] = SK_RLMT_SPT_ROOT_PATH_COST3;
701 pSPacket->BridgeId[0] = SK_RLMT_SPT_BRIDGE_ID0;
702 pSPacket->BridgeId[1] = SK_RLMT_SPT_BRIDGE_ID1;
703
704 /*
705 * Use logical MAC address as bridge ID and filter these packets
706 * on receive.
707 */
708 for (i = 0; i < SK_MAC_ADDR_LEN; i++) {
709 pSPacket->BridgeId[i + 2] = pSPacket->RootId[i + 2] =
710 pAC->Addr.Net[pAC->Rlmt.Port[PortNumber].Net->NetNumber].
711 CurrentMacAddress.a[i];
712 }
713 pSPacket->PortId[0] = SK_RLMT_SPT_PORT_ID0;
714 pSPacket->PortId[1] = SK_RLMT_SPT_PORT_ID1;
715 pSPacket->MessageAge[0] = SK_RLMT_SPT_MSG_AGE0;
716 pSPacket->MessageAge[1] = SK_RLMT_SPT_MSG_AGE1;
717 pSPacket->MaxAge[0] = SK_RLMT_SPT_MAX_AGE0;
718 pSPacket->MaxAge[1] = SK_RLMT_SPT_MAX_AGE1;
719 pSPacket->HelloTime[0] = SK_RLMT_SPT_HELLO_TIME0;
720 pSPacket->HelloTime[1] = SK_RLMT_SPT_HELLO_TIME1;
721 pSPacket->ForwardDelay[0] = SK_RLMT_SPT_FWD_DELAY0;
722 pSPacket->ForwardDelay[1] = SK_RLMT_SPT_FWD_DELAY1;
723
724 Length = SK_RLMT_MAX_PACKET_SIZE; /* Or smaller. */
725 pMb->Length = Length;
726 pMb->PortIdx = PortNumber;
727 Length -= 14;
728 SK_U16_TO_NETWORK_ORDER(Length, &pSPacket->TypeLen[0]);
729
730 pAC->Rlmt.Port[PortNumber].TxSpHelloReqCts++;
731 }
732
733 return (pMb);
734} /* SkRlmtBuildSpanningTreePacket */
735
736
737/******************************************************************************
738 *
739 * SkRlmtSend - build and send check packets
740 *
741 * Description:
742 * Depending on the RLMT state and the checking state, several packets
743 * are sent through the indicated port.
744 *
745 * Context:
746 * runtime, pageable?
747 *
748 * Returns:
749 * Nothing.
750 */
751RLMT_STATIC void SkRlmtSend(
752SK_AC *pAC, /* Adapter Context */
753SK_IOC IoC, /* I/O Context */
754SK_U32 PortNumber) /* Sending port */
755{
756 unsigned j;
757 SK_EVPARA Para;
758 SK_RLMT_PORT *pRPort;
759
760 pRPort = &pAC->Rlmt.Port[PortNumber];
761 if (pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_LOC_LINK) {
762 if (pRPort->CheckingState & (SK_RLMT_PCS_TX | SK_RLMT_PCS_RX)) {
763 /* Port is suspicious. Send the RLMT packet to the RLMT mc addr. */
764 if ((Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, PortNumber,
765 SK_PACKET_ALIVE, &pAC->Addr.Port[PortNumber].CurrentMacAddress,
766 &SkRlmtMcAddr)) != NULL) {
767 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
768 }
769 }
770 else {
771 /*
772 * Send a directed RLMT packet to all ports that are
773 * checked by the indicated port.
774 */
775 for (j = 0; j < pRPort->PortsChecked; j++) {
776 if ((Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, PortNumber,
777 SK_PACKET_ALIVE, &pAC->Addr.Port[PortNumber].CurrentMacAddress,
778 &pRPort->PortCheck[j].CheckAddr)) != NULL) {
779 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
780 }
781 }
782 }
783 }
784
785 if ((pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_SEG) &&
786 (pAC->Rlmt.Port[PortNumber].Net->CheckingState & SK_RLMT_RCS_SEND_SEG)) {
787 /*
788 * Send a BPDU packet to make a connected switch tell us
789 * the correct root bridge.
790 */
791 if ((Para.pParaPtr =
792 SkRlmtBuildSpanningTreePacket(pAC, IoC, PortNumber)) != NULL) {
793 pAC->Rlmt.Port[PortNumber].Net->CheckingState &= ~SK_RLMT_RCS_SEND_SEG;
794 pRPort->RootIdSet = SK_FALSE;
795
796 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
797 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_TX,
798 ("SkRlmtSend: BPDU Packet on Port %u.\n", PortNumber))
799 }
800 }
801 return;
802} /* SkRlmtSend */
803
804
805/******************************************************************************
806 *
807 * SkRlmtPortReceives - check if port is (going) down and bring it up
808 *
809 * Description:
810 * This routine checks if a port who received a non-BPDU packet
811 * needs to go up or needs to be stopped going down.
812 *
813 * Context:
814 * runtime, pageable?
815 *
816 * Returns:
817 * Nothing.
818 */
819RLMT_STATIC void SkRlmtPortReceives(
820SK_AC *pAC, /* Adapter Context */
821SK_IOC IoC, /* I/O Context */
822SK_U32 PortNumber) /* Port to check */
823{
824 SK_RLMT_PORT *pRPort;
825 SK_EVPARA Para;
826
827 pRPort = &pAC->Rlmt.Port[PortNumber];
828 pRPort->PortNoRx = SK_FALSE;
829
830 if ((pRPort->PortState == SK_RLMT_PS_DOWN) &&
831 !(pRPort->CheckingState & SK_RLMT_PCS_TX)) {
832 /*
833 * Port is marked down (rx), but received a non-BPDU packet.
834 * Bring it up.
835 */
836 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
837 ("SkRlmtPacketReceive: Received on PortDown.\n"))
838
839 pRPort->PortState = SK_RLMT_PS_GOING_UP;
840 pRPort->GuTimeStamp = SkOsGetTime(pAC);
841 Para.Para32[0] = PortNumber;
842 Para.Para32[1] = (SK_U32)-1;
843 SkTimerStart(pAC, IoC, &pRPort->UpTimer, SK_RLMT_PORTUP_TIM_VAL,
844 SKGE_RLMT, SK_RLMT_PORTUP_TIM, Para);
845 pRPort->CheckingState &= ~SK_RLMT_PCS_RX;
846 /* pAC->Rlmt.CheckSwitch = SK_TRUE; */
847 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);
848 } /* PortDown && !SuspectTx */
849 else if (pRPort->CheckingState & SK_RLMT_PCS_RX) {
850 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
851 ("SkRlmtPacketReceive: Stop bringing port down.\n"))
852 SkTimerStop(pAC, IoC, &pRPort->DownRxTimer);
853 pRPort->CheckingState &= ~SK_RLMT_PCS_RX;
854 /* pAC->Rlmt.CheckSwitch = SK_TRUE; */
855 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);
856 } /* PortGoingDown */
857
858 return;
859} /* SkRlmtPortReceives */
860
861
862/******************************************************************************
863 *
864 * SkRlmtPacketReceive - receive a packet for closer examination
865 *
866 * Description:
867 * This routine examines a packet more closely than SK_RLMT_LOOKAHEAD.
868 *
869 * Context:
870 * runtime, pageable?
871 *
872 * Returns:
873 * Nothing.
874 */
875RLMT_STATIC void SkRlmtPacketReceive(
876SK_AC *pAC, /* Adapter Context */
877SK_IOC IoC, /* I/O Context */
878SK_MBUF *pMb) /* Received packet */
879{
880#ifdef xDEBUG
881 extern void DumpData(char *p, int size);
882#endif /* DEBUG */
883 int i;
884 unsigned j;
885 SK_U16 PacketType;
886 SK_U32 PortNumber;
887 SK_ADDR_PORT *pAPort;
888 SK_RLMT_PORT *pRPort;
889 SK_RLMT_PACKET *pRPacket;
890 SK_SPTREE_PACKET *pSPacket;
891 SK_EVPARA Para;
892
893 PortNumber = pMb->PortIdx;
894 pAPort = &pAC->Addr.Port[PortNumber];
895 pRPort = &pAC->Rlmt.Port[PortNumber];
896
897 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
898 ("SkRlmtPacketReceive: PortNumber == %d.\n", PortNumber))
899
900 pRPacket = (SK_RLMT_PACKET*)pMb->pData;
901 pSPacket = (SK_SPTREE_PACKET*)pRPacket;
902
903#ifdef xDEBUG
904 DumpData((char *)pRPacket, 32);
905#endif /* DEBUG */
906
907 if ((pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot) != 0) {
908 SkRlmtPortReceives(pAC, IoC, PortNumber);
909 }
910
911 /* Check destination address. */
912
913 if (!SK_ADDR_EQUAL(pAPort->CurrentMacAddress.a, pRPacket->DstAddr) &&
914 !SK_ADDR_EQUAL(SkRlmtMcAddr.a, pRPacket->DstAddr) &&
915 !SK_ADDR_EQUAL(BridgeMcAddr.a, pRPacket->DstAddr)) {
916
917 /* Not sent to current MAC or registered MC address => Trash it. */
918 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
919 ("SkRlmtPacketReceive: Not for me.\n"))
920
921 SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
922 return;
923 }
924 else if (SK_ADDR_EQUAL(pAPort->CurrentMacAddress.a, pRPacket->SrcAddr)) {
925
926 /*
927 * Was sent by same port (may happen during port switching
928 * or in case of duplicate MAC addresses).
929 */
930
931 /*
932 * Check for duplicate address here:
933 * If Packet.Random != My.Random => DupAddr.
934 */
935 for (i = 3; i >= 0; i--) {
936 if (pRPort->Random[i] != pRPacket->Random[i]) {
937 break;
938 }
939 }
940
941 /*
942 * CAUTION: Do not check for duplicate MAC address in RLMT Alive Reply
943 * packets (they have the LLC_COMMAND_RESPONSE_BIT set in
944 * pRPacket->SSap).
945 */
946 if (i >= 0 && pRPacket->DSap == SK_RLMT_DSAP &&
947 pRPacket->Ctrl == SK_RLMT_CTRL &&
948 pRPacket->SSap == SK_RLMT_SSAP &&
949 pRPacket->Indicator[0] == SK_RLMT_INDICATOR0 &&
950 pRPacket->Indicator[1] == SK_RLMT_INDICATOR1 &&
951 pRPacket->Indicator[2] == SK_RLMT_INDICATOR2 &&
952 pRPacket->Indicator[3] == SK_RLMT_INDICATOR3 &&
953 pRPacket->Indicator[4] == SK_RLMT_INDICATOR4 &&
954 pRPacket->Indicator[5] == SK_RLMT_INDICATOR5 &&
955 pRPacket->Indicator[6] == SK_RLMT_INDICATOR6) {
956 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
957 ("SkRlmtPacketReceive: Duplicate MAC Address.\n"))
958
959 /* Error Log entry. */
960 SK_ERR_LOG(pAC, SK_ERRCL_COMM, SKERR_RLMT_E006, SKERR_RLMT_E006_MSG);
961 }
962 else {
963 /* Simply trash it. */
964 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
965 ("SkRlmtPacketReceive: Sent by me.\n"))
966 }
967
968 SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
969 return;
970 }
971
972 /* Check SuspectTx entries. */
973 if (pRPort->PortsSuspect > 0) {
974 for (j = 0; j < pRPort->PortsChecked; j++) {
975 if (pRPort->PortCheck[j].SuspectTx &&
976 SK_ADDR_EQUAL(
977 pRPacket->SrcAddr, pRPort->PortCheck[j].CheckAddr.a)) {
978 pRPort->PortCheck[j].SuspectTx = SK_FALSE;
979 pRPort->PortsSuspect--;
980 break;
981 }
982 }
983 }
984
985 /* Determine type of packet. */
986 if (pRPacket->DSap == SK_RLMT_DSAP &&
987 pRPacket->Ctrl == SK_RLMT_CTRL &&
988 (pRPacket->SSap & ~LLC_COMMAND_RESPONSE_BIT) == SK_RLMT_SSAP &&
989 pRPacket->Indicator[0] == SK_RLMT_INDICATOR0 &&
990 pRPacket->Indicator[1] == SK_RLMT_INDICATOR1 &&
991 pRPacket->Indicator[2] == SK_RLMT_INDICATOR2 &&
992 pRPacket->Indicator[3] == SK_RLMT_INDICATOR3 &&
993 pRPacket->Indicator[4] == SK_RLMT_INDICATOR4 &&
994 pRPacket->Indicator[5] == SK_RLMT_INDICATOR5 &&
995 pRPacket->Indicator[6] == SK_RLMT_INDICATOR6) {
996
997 /* It's an RLMT packet. */
998 PacketType = (SK_U16)((pRPacket->RlmtPacketType[0] << 8) |
999 pRPacket->RlmtPacketType[1]);
1000
1001 switch (PacketType) {
1002 case SK_PACKET_ANNOUNCE: /* Not yet used. */
1003#if 0
1004 /* Build the check chain. */
1005 SkRlmtBuildCheckChain(pAC);
1006#endif /* 0 */
1007
1008 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
1009 ("SkRlmtPacketReceive: Announce.\n"))
1010
1011 SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
1012 break;
1013
1014 case SK_PACKET_ALIVE:
1015 if (pRPacket->SSap & LLC_COMMAND_RESPONSE_BIT) {
1016 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
1017 ("SkRlmtPacketReceive: Alive Reply.\n"))
1018
1019 if (!(pAC->Addr.Port[PortNumber].PromMode & SK_PROM_MODE_LLC) ||
1020 SK_ADDR_EQUAL(
1021 pRPacket->DstAddr, pAPort->CurrentMacAddress.a)) {
1022 /* Obviously we could send something. */
1023 if (pRPort->CheckingState & SK_RLMT_PCS_TX) {
1024 pRPort->CheckingState &= ~SK_RLMT_PCS_TX;
1025 SkTimerStop(pAC, IoC, &pRPort->DownTxTimer);
1026 }
1027
1028 if ((pRPort->PortState == SK_RLMT_PS_DOWN) &&
1029 !(pRPort->CheckingState & SK_RLMT_PCS_RX)) {
1030 pRPort->PortState = SK_RLMT_PS_GOING_UP;
1031 pRPort->GuTimeStamp = SkOsGetTime(pAC);
1032
1033 SkTimerStop(pAC, IoC, &pRPort->DownTxTimer);
1034
1035 Para.Para32[0] = PortNumber;
1036 Para.Para32[1] = (SK_U32)-1;
1037 SkTimerStart(pAC, IoC, &pRPort->UpTimer,
1038 SK_RLMT_PORTUP_TIM_VAL, SKGE_RLMT,
1039 SK_RLMT_PORTUP_TIM, Para);
1040 }
1041 }
1042
1043 /* Mark sending port as alive? */
1044 SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
1045 }
1046 else { /* Alive Request Packet. */
1047 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
1048 ("SkRlmtPacketReceive: Alive Request.\n"))
1049
1050 pRPort->RxHelloCts++;
1051
1052 /* Answer. */
1053 for (i = 0; i < SK_MAC_ADDR_LEN; i++) {
1054 pRPacket->DstAddr[i] = pRPacket->SrcAddr[i];
1055 pRPacket->SrcAddr[i] =
1056 pAC->Addr.Port[PortNumber].CurrentMacAddress.a[i];
1057 }
1058 pRPacket->SSap |= LLC_COMMAND_RESPONSE_BIT;
1059
1060 Para.pParaPtr = pMb;
1061 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
1062 }
1063 break;
1064
1065 case SK_PACKET_CHECK_TX:
1066 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
1067 ("SkRlmtPacketReceive: Check your tx line.\n"))
1068
1069 /* A port checking us requests us to check our tx line. */
1070 pRPort->CheckingState |= SK_RLMT_PCS_TX;
1071
1072 /* Start PortDownTx timer. */
1073 Para.Para32[0] = PortNumber;
1074 Para.Para32[1] = (SK_U32)-1;
1075 SkTimerStart(pAC, IoC, &pRPort->DownTxTimer,
1076 SK_RLMT_PORTDOWN_TIM_VAL, SKGE_RLMT,
1077 SK_RLMT_PORTDOWN_TX_TIM, Para);
1078
1079 SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
1080
1081 if ((Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, PortNumber,
1082 SK_PACKET_ALIVE, &pAC->Addr.Port[PortNumber].CurrentMacAddress,
1083 &SkRlmtMcAddr)) != NULL) {
1084 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
1085 }
1086 break;
1087
1088 case SK_PACKET_ADDR_CHANGED:
1089 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
1090 ("SkRlmtPacketReceive: Address Change.\n"))
1091
1092 /* Build the check chain. */
1093 SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber);
1094 SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
1095 break;
1096
1097 default:
1098 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
1099 ("SkRlmtPacketReceive: Unknown RLMT packet.\n"))
1100
1101 /* RA;:;: ??? */
1102 SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
1103 }
1104 }
1105 else if (pSPacket->DSap == SK_RLMT_SPT_DSAP &&
1106 pSPacket->Ctrl == SK_RLMT_SPT_CTRL &&
1107 (pSPacket->SSap & ~LLC_COMMAND_RESPONSE_BIT) == SK_RLMT_SPT_SSAP) {
1108 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
1109 ("SkRlmtPacketReceive: BPDU Packet.\n"))
1110
1111 /* Spanning Tree packet. */
1112 pRPort->RxSpHelloCts++;
1113
1114 if (!SK_ADDR_EQUAL(&pSPacket->RootId[2], &pAC->Addr.Net[pAC->Rlmt.
1115 Port[PortNumber].Net->NetNumber].CurrentMacAddress.a[0])) {
1116 /*
1117 * Check segmentation if a new root bridge is set and
1118 * the segmentation check is not currently running.
1119 */
1120 if (!SK_ADDR_EQUAL(&pSPacket->RootId[2], &pRPort->Root.Id[2]) &&
1121 (pAC->Rlmt.Port[PortNumber].Net->LinksUp > 1) &&
1122 (pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_SEG)
1123 != 0 && (pAC->Rlmt.Port[PortNumber].Net->CheckingState &
1124 SK_RLMT_RCS_SEG) == 0) {
1125 pAC->Rlmt.Port[PortNumber].Net->CheckingState |=
1126 SK_RLMT_RCS_START_SEG | SK_RLMT_RCS_SEND_SEG;
1127 }
1128
1129 /* Store tree view of this port. */
1130 for (i = 0; i < 8; i++) {
1131 pRPort->Root.Id[i] = pSPacket->RootId[i];
1132 }
1133 pRPort->RootIdSet = SK_TRUE;
1134
1135 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_DUMP,
1136 ("Root ID %d: %02x %02x %02x %02x %02x %02x %02x %02x.\n",
1137 PortNumber,
1138 pRPort->Root.Id[0], pRPort->Root.Id[1],
1139 pRPort->Root.Id[2], pRPort->Root.Id[3],
1140 pRPort->Root.Id[4], pRPort->Root.Id[5],
1141 pRPort->Root.Id[6], pRPort->Root.Id[7]))
1142 }
1143
1144 SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
1145 if ((pAC->Rlmt.Port[PortNumber].Net->CheckingState &
1146 SK_RLMT_RCS_REPORT_SEG) != 0) {
1147 SkRlmtCheckSeg(pAC, IoC, pAC->Rlmt.Port[PortNumber].Net->NetNumber);
1148 }
1149 }
1150 else {
1151 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX,
1152 ("SkRlmtPacketReceive: Unknown Packet Type.\n"))
1153
1154 /* Unknown packet. */
1155 SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
1156 }
1157 return;
1158} /* SkRlmtPacketReceive */
1159
1160
1161/******************************************************************************
1162 *
1163 * SkRlmtCheckPort - check if a port works
1164 *
1165 * Description:
1166 * This routine checks if a port whose link is up received something
1167 * and if it seems to transmit successfully.
1168 *
1169 * # PortState: PsInit, PsLinkDown, PsDown, PsGoingUp, PsUp
1170 * # PortCheckingState (Bitfield): ChkTx, ChkRx, ChkSeg
1171 * # RlmtCheckingState (Bitfield): ChkSeg, StartChkSeg, ReportSeg
1172 *
1173 * if (Rx - RxBpdu == 0) { # No rx.
1174 * if (state == PsUp) {
1175 * PortCheckingState |= ChkRx
1176 * }
1177 * if (ModeCheckSeg && (Timeout ==
1178 * TO_SHORTEN(RLMT_DEFAULT_TIMEOUT))) {
1179 * RlmtCheckingState |= ChkSeg)
1180 * PortCheckingState |= ChkSeg
1181 * }
1182 * NewTimeout = TO_SHORTEN(Timeout)
1183 * if (NewTimeout < RLMT_MIN_TIMEOUT) {
1184 * NewTimeout = RLMT_MIN_TIMEOUT
1185 * PortState = PsDown
1186 * ...
1187 * }
1188 * }
1189 * else { # something was received
1190 * # Set counter to 0 at LinkDown?
1191 * # No - rx may be reported after LinkDown ???
1192 * PortCheckingState &= ~ChkRx
1193 * NewTimeout = RLMT_DEFAULT_TIMEOUT
1194 * if (RxAck == 0) {
1195 * possible reasons:
1196 * is my tx line bad? --
1197 * send RLMT multicast and report
1198 * back internally? (only possible
1199 * between ports on same adapter)
1200 * }
1201 * if (RxChk == 0) {
1202 * possible reasons:
1203 * - tx line of port set to check me
1204 * maybe bad
1205 * - no other port/adapter available or set
1206 * to check me
1207 * - adapter checking me has a longer
1208 * timeout
1209 * ??? anything that can be done here?
1210 * }
1211 * }
1212 *
1213 * Context:
1214 * runtime, pageable?
1215 *
1216 * Returns:
1217 * New timeout value.
1218 */
1219RLMT_STATIC SK_U32 SkRlmtCheckPort(
1220SK_AC *pAC, /* Adapter Context */
1221SK_IOC IoC, /* I/O Context */
1222SK_U32 PortNumber) /* Port to check */
1223{
1224 unsigned i;
1225 SK_U32 NewTimeout;
1226 SK_RLMT_PORT *pRPort;
1227 SK_EVPARA Para;
1228
1229 pRPort = &pAC->Rlmt.Port[PortNumber];
1230
1231 if ((pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot) == 0) {
1232 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1233 ("SkRlmtCheckPort %d: No (%d) receives in last time slot.\n",
1234 PortNumber, pRPort->PacketsPerTimeSlot))
1235
1236 /*
1237 * Check segmentation if there was no receive at least twice
1238 * in a row (PortNoRx is already set) and the segmentation
1239 * check is not currently running.
1240 */
1241
1242 if (pRPort->PortNoRx && (pAC->Rlmt.Port[PortNumber].Net->LinksUp > 1) &&
1243 (pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_SEG) &&
1244 !(pAC->Rlmt.Port[PortNumber].Net->CheckingState & SK_RLMT_RCS_SEG)) {
1245 pAC->Rlmt.Port[PortNumber].Net->CheckingState |=
1246 SK_RLMT_RCS_START_SEG | SK_RLMT_RCS_SEND_SEG;
1247 }
1248
1249 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1250 ("SkRlmtCheckPort: PortsSuspect %d, PcsRx %d.\n",
1251 pRPort->PortsSuspect, pRPort->CheckingState & SK_RLMT_PCS_RX))
1252
1253 if (pRPort->PortState != SK_RLMT_PS_DOWN) {
1254 NewTimeout = TO_SHORTEN(pAC->Rlmt.Port[PortNumber].Net->TimeoutValue);
1255 if (NewTimeout < SK_RLMT_MIN_TO_VAL) {
1256 NewTimeout = SK_RLMT_MIN_TO_VAL;
1257 }
1258
1259 if (!(pRPort->CheckingState & SK_RLMT_PCS_RX)) {
1260 Para.Para32[0] = PortNumber;
1261 pRPort->CheckingState |= SK_RLMT_PCS_RX;
1262
1263 /*
1264 * What shall we do if the port checked by this one receives
1265 * our request frames? What's bad - our rx line or his tx line?
1266 */
1267 Para.Para32[1] = (SK_U32)-1;
1268 SkTimerStart(pAC, IoC, &pRPort->DownRxTimer,
1269 SK_RLMT_PORTDOWN_TIM_VAL, SKGE_RLMT,
1270 SK_RLMT_PORTDOWN_RX_TIM, Para);
1271
1272 for (i = 0; i < pRPort->PortsChecked; i++) {
1273 if (pRPort->PortCheck[i].SuspectTx) {
1274 continue;
1275 }
1276 pRPort->PortCheck[i].SuspectTx = SK_TRUE;
1277 pRPort->PortsSuspect++;
1278 if ((Para.pParaPtr =
1279 SkRlmtBuildPacket(pAC, IoC, PortNumber, SK_PACKET_CHECK_TX,
1280 &pAC->Addr.Port[PortNumber].CurrentMacAddress,
1281 &pRPort->PortCheck[i].CheckAddr)) != NULL) {
1282 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
1283 }
1284 }
1285 }
1286 }
1287 else { /* PortDown -- or all partners suspect. */
1288 NewTimeout = SK_RLMT_DEF_TO_VAL;
1289 }
1290 pRPort->PortNoRx = SK_TRUE;
1291 }
1292 else { /* A non-BPDU packet was received. */
1293 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1294 ("SkRlmtCheckPort %d: %d (%d) receives in last time slot.\n",
1295 PortNumber,
1296 pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot,
1297 pRPort->PacketsPerTimeSlot))
1298
1299 SkRlmtPortReceives(pAC, IoC, PortNumber);
1300 if (pAC->Rlmt.CheckSwitch) {
1301 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);
1302 }
1303
1304 NewTimeout = SK_RLMT_DEF_TO_VAL;
1305 }
1306
1307 return (NewTimeout);
1308} /* SkRlmtCheckPort */
1309
1310
1311/******************************************************************************
1312 *
1313 * SkRlmtSelectBcRx - select new active port, criteria 1 (CLP)
1314 *
1315 * Description:
1316 * This routine selects the port that received a broadcast frame
1317 * substantially later than all other ports.
1318 *
1319 * Context:
1320 * runtime, pageable?
1321 *
1322 * Returns:
1323 * SK_BOOL
1324 */
1325RLMT_STATIC SK_BOOL SkRlmtSelectBcRx(
1326SK_AC *pAC, /* Adapter Context */
1327SK_IOC IoC, /* I/O Context */
1328SK_U32 Active, /* Active port */
1329SK_U32 PrefPort, /* Preferred port */
1330SK_U32 *pSelect) /* New active port */
1331{
1332 SK_U64 BcTimeStamp;
1333 SK_U32 i;
1334 SK_BOOL PortFound;
1335
1336 BcTimeStamp = 0; /* Not totally necessary, but feeling better. */
1337 PortFound = SK_FALSE;
1338
1339 /* Select port with the latest TimeStamp. */
1340 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
1341
1342 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1343 ("TimeStamp Port %d (Down: %d, NoRx: %d): %08x %08x.\n",
1344 i,
1345 pAC->Rlmt.Port[i].PortDown, pAC->Rlmt.Port[i].PortNoRx,
1346 *((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_HI32),
1347 *((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_LO32)))
1348
1349 if (!pAC->Rlmt.Port[i].PortDown && !pAC->Rlmt.Port[i].PortNoRx) {
1350 if (!PortFound || pAC->Rlmt.Port[i].BcTimeStamp > BcTimeStamp) {
1351 BcTimeStamp = pAC->Rlmt.Port[i].BcTimeStamp;
1352 *pSelect = i;
1353 PortFound = SK_TRUE;
1354 }
1355 }
1356 }
1357
1358 if (PortFound) {
1359 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1360 ("Port %d received the last broadcast.\n", *pSelect))
1361
1362 /* Look if another port's time stamp is similar. */
1363 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
1364 if (i == *pSelect) {
1365 continue;
1366 }
1367 if (!pAC->Rlmt.Port[i].PortDown && !pAC->Rlmt.Port[i].PortNoRx &&
1368 (pAC->Rlmt.Port[i].BcTimeStamp >
1369 BcTimeStamp - SK_RLMT_BC_DELTA ||
1370 pAC->Rlmt.Port[i].BcTimeStamp +
1371 SK_RLMT_BC_DELTA > BcTimeStamp)) {
1372 PortFound = SK_FALSE;
1373
1374 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1375 ("Port %d received a broadcast at a similar time.\n", i))
1376 break;
1377 }
1378 }
1379 }
1380
1381#ifdef DEBUG
1382 if (PortFound) {
1383 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1384 ("SK_RLMT_SELECT_BCRX found Port %d receiving the substantially "
1385 "latest broadcast (%u).\n",
1386 *pSelect,
1387 BcTimeStamp - pAC->Rlmt.Port[1 - *pSelect].BcTimeStamp))
1388 }
1389#endif /* DEBUG */
1390
1391 return (PortFound);
1392} /* SkRlmtSelectBcRx */
1393
1394
1395/******************************************************************************
1396 *
1397 * SkRlmtSelectNotSuspect - select new active port, criteria 2 (CLP)
1398 *
1399 * Description:
1400 * This routine selects a good port (it is PortUp && !SuspectRx).
1401 *
1402 * Context:
1403 * runtime, pageable?
1404 *
1405 * Returns:
1406 * SK_BOOL
1407 */
1408RLMT_STATIC SK_BOOL SkRlmtSelectNotSuspect(
1409SK_AC *pAC, /* Adapter Context */
1410SK_IOC IoC, /* I/O Context */
1411SK_U32 Active, /* Active port */
1412SK_U32 PrefPort, /* Preferred port */
1413SK_U32 *pSelect) /* New active port */
1414{
1415 SK_U32 i;
1416 SK_BOOL PortFound;
1417
1418 PortFound = SK_FALSE;
1419
1420 /* Select first port that is PortUp && !SuspectRx. */
1421 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
1422 if (!pAC->Rlmt.Port[i].PortDown &&
1423 !(pAC->Rlmt.Port[i].CheckingState & SK_RLMT_PCS_RX)) {
1424 *pSelect = i;
1425 if (!pAC->Rlmt.Port[Active].PortDown &&
1426 !(pAC->Rlmt.Port[Active].CheckingState & SK_RLMT_PCS_RX)) {
1427 *pSelect = Active;
1428 }
1429 if (!pAC->Rlmt.Port[PrefPort].PortDown &&
1430 !(pAC->Rlmt.Port[PrefPort].CheckingState & SK_RLMT_PCS_RX)) {
1431 *pSelect = PrefPort;
1432 }
1433 PortFound = SK_TRUE;
1434 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1435 ("SK_RLMT_SELECT_NOTSUSPECT found Port %d up and not check RX.\n",
1436 *pSelect))
1437 break;
1438 }
1439 }
1440 return (PortFound);
1441} /* SkRlmtSelectNotSuspect */
1442
1443
1444/******************************************************************************
1445 *
1446 * SkRlmtSelectUp - select new active port, criteria 3, 4 (CLP)
1447 *
1448 * Description:
1449 * This routine selects a port that is up.
1450 *
1451 * Context:
1452 * runtime, pageable?
1453 *
1454 * Returns:
1455 * SK_BOOL
1456 */
1457RLMT_STATIC SK_BOOL SkRlmtSelectUp(
1458SK_AC *pAC, /* Adapter Context */
1459SK_IOC IoC, /* I/O Context */
1460SK_U32 Active, /* Active port */
1461SK_U32 PrefPort, /* Preferred port */
1462SK_U32 *pSelect, /* New active port */
1463SK_BOOL AutoNegDone) /* Successfully auto-negotiated? */
1464{
1465 SK_U32 i;
1466 SK_BOOL PortFound;
1467
1468 PortFound = SK_FALSE;
1469
1470 /* Select first port that is PortUp. */
1471 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
1472 if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_UP &&
1473 pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) {
1474 *pSelect = i;
1475 if (pAC->Rlmt.Port[Active].PortState == SK_RLMT_PS_UP &&
1476 pAC->GIni.GP[Active].PAutoNegFail != AutoNegDone) {
1477 *pSelect = Active;
1478 }
1479 if (pAC->Rlmt.Port[PrefPort].PortState == SK_RLMT_PS_UP &&
1480 pAC->GIni.GP[PrefPort].PAutoNegFail != AutoNegDone) {
1481 *pSelect = PrefPort;
1482 }
1483 PortFound = SK_TRUE;
1484 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1485 ("SK_RLMT_SELECT_UP found Port %d up.\n", *pSelect))
1486 break;
1487 }
1488 }
1489 return (PortFound);
1490} /* SkRlmtSelectUp */
1491
1492
1493/******************************************************************************
1494 *
1495 * SkRlmtSelectGoingUp - select new active port, criteria 5, 6 (CLP)
1496 *
1497 * Description:
1498 * This routine selects the port that is going up for the longest time.
1499 *
1500 * Context:
1501 * runtime, pageable?
1502 *
1503 * Returns:
1504 * SK_BOOL
1505 */
1506RLMT_STATIC SK_BOOL SkRlmtSelectGoingUp(
1507SK_AC *pAC, /* Adapter Context */
1508SK_IOC IoC, /* I/O Context */
1509SK_U32 Active, /* Active port */
1510SK_U32 PrefPort, /* Preferred port */
1511SK_U32 *pSelect, /* New active port */
1512SK_BOOL AutoNegDone) /* Successfully auto-negotiated? */
1513{
1514 SK_U64 GuTimeStamp;
1515 SK_U32 i;
1516 SK_BOOL PortFound;
1517
1518 GuTimeStamp = 0;
1519 PortFound = SK_FALSE;
1520
1521 /* Select port that is PortGoingUp for the longest time. */
1522 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
1523 if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_GOING_UP &&
1524 pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) {
1525 GuTimeStamp = pAC->Rlmt.Port[i].GuTimeStamp;
1526 *pSelect = i;
1527 PortFound = SK_TRUE;
1528 break;
1529 }
1530 }
1531
1532 if (!PortFound) {
1533 return (SK_FALSE);
1534 }
1535
1536 for (i = *pSelect + 1; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
1537 if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_GOING_UP &&
1538 pAC->Rlmt.Port[i].GuTimeStamp < GuTimeStamp &&
1539 pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) {
1540 GuTimeStamp = pAC->Rlmt.Port[i].GuTimeStamp;
1541 *pSelect = i;
1542 }
1543 }
1544
1545 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1546 ("SK_RLMT_SELECT_GOINGUP found Port %d going up.\n", *pSelect))
1547 return (SK_TRUE);
1548} /* SkRlmtSelectGoingUp */
1549
1550
1551/******************************************************************************
1552 *
1553 * SkRlmtSelectDown - select new active port, criteria 7, 8 (CLP)
1554 *
1555 * Description:
1556 * This routine selects a port that is down.
1557 *
1558 * Context:
1559 * runtime, pageable?
1560 *
1561 * Returns:
1562 * SK_BOOL
1563 */
1564RLMT_STATIC SK_BOOL SkRlmtSelectDown(
1565SK_AC *pAC, /* Adapter Context */
1566SK_IOC IoC, /* I/O Context */
1567SK_U32 Active, /* Active port */
1568SK_U32 PrefPort, /* Preferred port */
1569SK_U32 *pSelect, /* New active port */
1570SK_BOOL AutoNegDone) /* Successfully auto-negotiated? */
1571{
1572 SK_U32 i;
1573 SK_BOOL PortFound;
1574
1575 PortFound = SK_FALSE;
1576
1577 /* Select first port that is PortDown. */
1578 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
1579 if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_DOWN &&
1580 pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) {
1581 *pSelect = i;
1582 if (pAC->Rlmt.Port[Active].PortState == SK_RLMT_PS_DOWN &&
1583 pAC->GIni.GP[Active].PAutoNegFail != AutoNegDone) {
1584 *pSelect = Active;
1585 }
1586 if (pAC->Rlmt.Port[PrefPort].PortState == SK_RLMT_PS_DOWN &&
1587 pAC->GIni.GP[PrefPort].PAutoNegFail != AutoNegDone) {
1588 *pSelect = PrefPort;
1589 }
1590 PortFound = SK_TRUE;
1591 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1592 ("SK_RLMT_SELECT_DOWN found Port %d down.\n", *pSelect))
1593 break;
1594 }
1595 }
1596 return (PortFound);
1597} /* SkRlmtSelectDown */
1598
1599
1600/******************************************************************************
1601 *
1602 * SkRlmtCheckSwitch - select new active port and switch to it
1603 *
1604 * Description:
1605 * This routine decides which port should be the active one and queues
1606 * port switching if necessary.
1607 *
1608 * Context:
1609 * runtime, pageable?
1610 *
1611 * Returns:
1612 * Nothing.
1613 */
1614RLMT_STATIC void SkRlmtCheckSwitch(
1615SK_AC *pAC, /* Adapter Context */
1616SK_IOC IoC, /* I/O Context */
1617SK_U32 NetIdx) /* Net index */
1618{
1619 SK_EVPARA Para;
1620 SK_U32 Active;
1621 SK_U32 PrefPort;
1622 SK_U32 i;
1623 SK_BOOL PortFound;
1624
1625 Active = pAC->Rlmt.Net[NetIdx].ActivePort; /* Index of active port. */
1626 PrefPort = pAC->Rlmt.Net[NetIdx].PrefPort; /* Index of preferred port. */
1627 PortFound = SK_FALSE;
1628 pAC->Rlmt.CheckSwitch = SK_FALSE;
1629
1630#if 0 /* RW 2001/10/18 - active port becomes always prefered one */
1631 if (pAC->Rlmt.Net[NetIdx].Preference == 0xFFFFFFFF) { /* Automatic */
1632 /* disable auto-fail back */
1633 PrefPort = Active;
1634 }
1635#endif
1636
1637 if (pAC->Rlmt.Net[NetIdx].LinksUp == 0) {
1638 /* Last link went down - shut down the net. */
1639 pAC->Rlmt.Net[NetIdx].RlmtState = SK_RLMT_RS_NET_DOWN;
1640 Para.Para32[0] = SK_RLMT_NET_DOWN_TEMP;
1641 Para.Para32[1] = NetIdx;
1642 SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_DOWN, Para);
1643
1644 Para.Para32[0] = pAC->Rlmt.Net[NetIdx].
1645 Port[pAC->Rlmt.Net[NetIdx].ActivePort]->PortNumber;
1646 Para.Para32[1] = NetIdx;
1647 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_DOWN, Para);
1648 return;
1649 } /* pAC->Rlmt.LinksUp == 0 */
1650 else if (pAC->Rlmt.Net[NetIdx].LinksUp == 1 &&
1651 pAC->Rlmt.Net[NetIdx].RlmtState == SK_RLMT_RS_NET_DOWN) {
1652 /* First link came up - get the net up. */
1653 pAC->Rlmt.Net[NetIdx].RlmtState = SK_RLMT_RS_NET_UP;
1654
1655 /*
1656 * If pAC->Rlmt.ActivePort != Para.Para32[0],
1657 * the DRV switches to the port that came up.
1658 */
1659 for (i = 0; i < pAC->Rlmt.Net[NetIdx].NumPorts; i++) {
1660 if (!pAC->Rlmt.Net[NetIdx].Port[i]->LinkDown) {
1661 if (!pAC->Rlmt.Net[NetIdx].Port[Active]->LinkDown) {
1662 i = Active;
1663 }
1664 if (!pAC->Rlmt.Net[NetIdx].Port[PrefPort]->LinkDown) {
1665 i = PrefPort;
1666 }
1667 PortFound = SK_TRUE;
1668 break;
1669 }
1670 }
1671
1672 if (PortFound) {
1673 Para.Para32[0] = pAC->Rlmt.Net[NetIdx].Port[i]->PortNumber;
1674 Para.Para32[1] = NetIdx;
1675 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_UP, Para);
1676
1677 pAC->Rlmt.Net[NetIdx].ActivePort = i;
1678 Para.Para32[0] = pAC->Rlmt.Net[NetIdx].Port[i]->PortNumber;
1679 Para.Para32[1] = NetIdx;
1680 SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_UP, Para);
1681
1682 if ((pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_TRANSPARENT) == 0 &&
1683 (Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC,
1684 pAC->Rlmt.Net[NetIdx].Port[i]->PortNumber,
1685 SK_PACKET_ANNOUNCE, &pAC->Addr.Net[NetIdx].
1686 CurrentMacAddress, &SkRlmtMcAddr)) != NULL) {
1687 /*
1688 * Send announce packet to RLMT multicast address to force
1689 * switches to learn the new location of the logical MAC address.
1690 */
1691 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
1692 }
1693 }
1694 else {
1695 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E007, SKERR_RLMT_E007_MSG);
1696 }
1697
1698 return;
1699 } /* LinksUp == 1 && RlmtState == SK_RLMT_RS_NET_DOWN */
1700 else { /* Cannot be reached in dual-net mode. */
1701 Para.Para32[0] = Active;
1702
1703 /*
1704 * Preselection:
1705 * If RLMT Mode != CheckLinkState
1706 * select port that received a broadcast frame substantially later
1707 * than all other ports
1708 * else select first port that is not SuspectRx
1709 * else select first port that is PortUp
1710 * else select port that is PortGoingUp for the longest time
1711 * else select first port that is PortDown
1712 * else stop.
1713 *
1714 * For the preselected port:
1715 * If ActivePort is equal in quality, select ActivePort.
1716 *
1717 * If PrefPort is equal in quality, select PrefPort.
1718 *
1719 * If ActivePort != SelectedPort,
1720 * If old ActivePort is LinkDown,
1721 * SwitchHard
1722 * else
1723 * SwitchSoft
1724 */
1725 /* check of ChgBcPrio flag added */
1726 if ((pAC->Rlmt.Net[0].RlmtMode != SK_RLMT_MODE_CLS) &&
1727 (!pAC->Rlmt.Net[0].ChgBcPrio)) {
1728
1729 if (!PortFound) {
1730 PortFound = SkRlmtSelectBcRx(
1731 pAC, IoC, Active, PrefPort, &Para.Para32[1]);
1732 }
1733
1734 if (!PortFound) {
1735 PortFound = SkRlmtSelectNotSuspect(
1736 pAC, IoC, Active, PrefPort, &Para.Para32[1]);
1737 }
1738 } /* pAC->Rlmt.RlmtMode != SK_RLMT_MODE_CLS */
1739
1740 /* with changed priority for last broadcast received */
1741 if ((pAC->Rlmt.Net[0].RlmtMode != SK_RLMT_MODE_CLS) &&
1742 (pAC->Rlmt.Net[0].ChgBcPrio)) {
1743 if (!PortFound) {
1744 PortFound = SkRlmtSelectNotSuspect(
1745 pAC, IoC, Active, PrefPort, &Para.Para32[1]);
1746 }
1747
1748 if (!PortFound) {
1749 PortFound = SkRlmtSelectBcRx(
1750 pAC, IoC, Active, PrefPort, &Para.Para32[1]);
1751 }
1752 } /* pAC->Rlmt.RlmtMode != SK_RLMT_MODE_CLS */
1753
1754 if (!PortFound) {
1755 PortFound = SkRlmtSelectUp(
1756 pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_SUCCESS);
1757 }
1758
1759 if (!PortFound) {
1760 PortFound = SkRlmtSelectUp(
1761 pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_FAILED);
1762 }
1763
1764 if (!PortFound) {
1765 PortFound = SkRlmtSelectGoingUp(
1766 pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_SUCCESS);
1767 }
1768
1769 if (!PortFound) {
1770 PortFound = SkRlmtSelectGoingUp(
1771 pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_FAILED);
1772 }
1773
1774 if (pAC->Rlmt.Net[0].RlmtMode != SK_RLMT_MODE_CLS) {
1775 if (!PortFound) {
1776 PortFound = SkRlmtSelectDown(pAC, IoC,
1777 Active, PrefPort, &Para.Para32[1], AUTONEG_SUCCESS);
1778 }
1779
1780 if (!PortFound) {
1781 PortFound = SkRlmtSelectDown(pAC, IoC,
1782 Active, PrefPort, &Para.Para32[1], AUTONEG_FAILED);
1783 }
1784 } /* pAC->Rlmt.RlmtMode != SK_RLMT_MODE_CLS */
1785
1786 if (PortFound) {
1787
1788 if (Para.Para32[1] != Active) {
1789 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1790 ("Active: %d, Para1: %d.\n", Active, Para.Para32[1]))
1791 pAC->Rlmt.Net[NetIdx].ActivePort = Para.Para32[1];
1792 Para.Para32[0] = pAC->Rlmt.Net[NetIdx].
1793 Port[Para.Para32[0]]->PortNumber;
1794 Para.Para32[1] = pAC->Rlmt.Net[NetIdx].
1795 Port[Para.Para32[1]]->PortNumber;
1796 SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[1], SK_LED_ACTIVE);
1797 if (pAC->Rlmt.Port[Active].LinkDown) {
1798 SkEventQueue(pAC, SKGE_DRV, SK_DRV_SWITCH_HARD, Para);
1799 }
1800 else {
1801 SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_STANDBY);
1802 SkEventQueue(pAC, SKGE_DRV, SK_DRV_SWITCH_SOFT, Para);
1803 }
1804 Para.Para32[1] = NetIdx;
1805 Para.Para32[0] =
1806 pAC->Rlmt.Net[NetIdx].Port[Para.Para32[0]]->PortNumber;
1807 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_DOWN, Para);
1808 Para.Para32[0] = pAC->Rlmt.Net[NetIdx].
1809 Port[pAC->Rlmt.Net[NetIdx].ActivePort]->PortNumber;
1810 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_UP, Para);
1811 if ((pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_TRANSPARENT) == 0 &&
1812 (Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, Para.Para32[0],
1813 SK_PACKET_ANNOUNCE, &pAC->Addr.Net[NetIdx].CurrentMacAddress,
1814 &SkRlmtMcAddr)) != NULL) {
1815 /*
1816 * Send announce packet to RLMT multicast address to force
1817 * switches to learn the new location of the logical
1818 * MAC address.
1819 */
1820 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para);
1821 } /* (Para.pParaPtr = SkRlmtBuildPacket(...)) != NULL */
1822 } /* Para.Para32[1] != Active */
1823 } /* PortFound */
1824 else {
1825 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E004, SKERR_RLMT_E004_MSG);
1826 }
1827 } /* LinksUp > 1 || LinksUp == 1 && RlmtState != SK_RLMT_RS_NET_DOWN */
1828 return;
1829} /* SkRlmtCheckSwitch */
1830
1831
1832/******************************************************************************
1833 *
1834 * SkRlmtCheckSeg - Report if segmentation is detected
1835 *
1836 * Description:
1837 * This routine checks if the ports see different root bridges and reports
1838 * segmentation in such a case.
1839 *
1840 * Context:
1841 * runtime, pageable?
1842 *
1843 * Returns:
1844 * Nothing.
1845 */
1846RLMT_STATIC void SkRlmtCheckSeg(
1847SK_AC *pAC, /* Adapter Context */
1848SK_IOC IoC, /* I/O Context */
1849SK_U32 NetIdx) /* Net number */
1850{
1851 SK_EVPARA Para;
1852 SK_RLMT_NET *pNet;
1853 SK_U32 i, j;
1854 SK_BOOL Equal;
1855
1856 pNet = &pAC->Rlmt.Net[NetIdx];
1857 pNet->RootIdSet = SK_FALSE;
1858 Equal = SK_TRUE;
1859
1860 for (i = 0; i < pNet->NumPorts; i++) {
1861 if (pNet->Port[i]->LinkDown || !pNet->Port[i]->RootIdSet) {
1862 continue;
1863 }
1864
1865 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_DUMP,
1866 ("Root ID %d: %02x %02x %02x %02x %02x %02x %02x %02x.\n", i,
1867 pNet->Port[i]->Root.Id[0], pNet->Port[i]->Root.Id[1],
1868 pNet->Port[i]->Root.Id[2], pNet->Port[i]->Root.Id[3],
1869 pNet->Port[i]->Root.Id[4], pNet->Port[i]->Root.Id[5],
1870 pNet->Port[i]->Root.Id[6], pNet->Port[i]->Root.Id[7]))
1871
1872 if (!pNet->RootIdSet) {
1873 pNet->Root = pNet->Port[i]->Root;
1874 pNet->RootIdSet = SK_TRUE;
1875 continue;
1876 }
1877
1878 for (j = 0; j < 8; j ++) {
1879 Equal &= pNet->Port[i]->Root.Id[j] == pNet->Root.Id[j];
1880 if (!Equal) {
1881 break;
1882 }
1883 }
1884
1885 if (!Equal) {
1886 SK_ERR_LOG(pAC, SK_ERRCL_COMM, SKERR_RLMT_E005, SKERR_RLMT_E005_MSG);
1887 Para.Para32[0] = NetIdx;
1888 Para.Para32[1] = (SK_U32)-1;
1889 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_SEGMENTATION, Para);
1890
1891 pNet->CheckingState &= ~SK_RLMT_RCS_REPORT_SEG;
1892
1893 /* 2000-03-06 RA: New. */
1894 Para.Para32[0] = NetIdx;
1895 Para.Para32[1] = (SK_U32)-1;
1896 SkTimerStart(pAC, IoC, &pNet->SegTimer, SK_RLMT_SEG_TO_VAL,
1897 SKGE_RLMT, SK_RLMT_SEG_TIM, Para);
1898 break;
1899 }
1900 } /* for (i = 0; i < pNet->NumPorts; i++) */
1901
1902 /* 2000-03-06 RA: Moved here. */
1903 /* Segmentation check not running anymore. */
1904 pNet->CheckingState &= ~SK_RLMT_RCS_SEG;
1905
1906} /* SkRlmtCheckSeg */
1907
1908
1909/******************************************************************************
1910 *
1911 * SkRlmtPortStart - initialize port variables and start port
1912 *
1913 * Description:
1914 * This routine initializes a port's variables and issues a PORT_START
1915 * to the HWAC module. This handles retries if the start fails or the
1916 * link eventually goes down.
1917 *
1918 * Context:
1919 * runtime, pageable?
1920 *
1921 * Returns:
1922 * Nothing
1923 */
1924RLMT_STATIC void SkRlmtPortStart(
1925SK_AC *pAC, /* Adapter Context */
1926SK_IOC IoC, /* I/O Context */
1927SK_U32 PortNumber) /* Port number */
1928{
1929 SK_EVPARA Para;
1930
1931 pAC->Rlmt.Port[PortNumber].PortState = SK_RLMT_PS_LINK_DOWN;
1932 pAC->Rlmt.Port[PortNumber].PortStarted = SK_TRUE;
1933 pAC->Rlmt.Port[PortNumber].LinkDown = SK_TRUE;
1934 pAC->Rlmt.Port[PortNumber].PortDown = SK_TRUE;
1935 pAC->Rlmt.Port[PortNumber].CheckingState = 0;
1936 pAC->Rlmt.Port[PortNumber].RootIdSet = SK_FALSE;
1937 Para.Para32[0] = PortNumber;
1938 Para.Para32[1] = (SK_U32)-1;
1939 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_START, Para);
1940} /* SkRlmtPortStart */
1941
1942
1943/******************************************************************************
1944 *
1945 * SkRlmtEvtPortStartTim - PORT_START_TIM
1946 *
1947 * Description:
1948 * This routine handles PORT_START_TIM events.
1949 *
1950 * Context:
1951 * runtime, pageable?
1952 * may be called after SK_INIT_IO
1953 *
1954 * Returns:
1955 * Nothing
1956 */
1957RLMT_STATIC void SkRlmtEvtPortStartTim(
1958SK_AC *pAC, /* Adapter Context */
1959SK_IOC IoC, /* I/O Context */
1960SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */
1961{
1962 SK_U32 i;
1963
1964 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1965 ("SK_RLMT_PORTSTART_TIMEOUT Port %d Event BEGIN.\n", Para.Para32[0]))
1966
1967 if (Para.Para32[1] != (SK_U32)-1) {
1968 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1969 ("Bad Parameter.\n"))
1970 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1971 ("SK_RLMT_PORTSTART_TIMEOUT Event EMPTY.\n"))
1972 return;
1973 }
1974
1975 /*
1976 * Used to start non-preferred ports if the preferred one
1977 * does not come up.
1978 * This timeout needs only be set when starting the first
1979 * (preferred) port.
1980 */
1981 if (pAC->Rlmt.Port[Para.Para32[0]].LinkDown) {
1982 /* PORT_START failed. */
1983 for (i = 0; i < pAC->Rlmt.Port[Para.Para32[0]].Net->NumPorts; i++) {
1984 if (!pAC->Rlmt.Port[Para.Para32[0]].Net->Port[i]->PortStarted) {
1985 SkRlmtPortStart(pAC, IoC,
1986 pAC->Rlmt.Port[Para.Para32[0]].Net->Port[i]->PortNumber);
1987 }
1988 }
1989 }
1990
1991 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
1992 ("SK_RLMT_PORTSTART_TIMEOUT Event END.\n"))
1993} /* SkRlmtEvtPortStartTim */
1994
1995
1996/******************************************************************************
1997 *
1998 * SkRlmtEvtLinkUp - LINK_UP
1999 *
2000 * Description:
2001 * This routine handles LLINK_UP events.
2002 *
2003 * Context:
2004 * runtime, pageable?
2005 * may be called after SK_INIT_IO
2006 *
2007 * Returns:
2008 * Nothing
2009 */
2010RLMT_STATIC void SkRlmtEvtLinkUp(
2011SK_AC *pAC, /* Adapter Context */
2012SK_IOC IoC, /* I/O Context */
2013SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 Undefined */
2014{
2015 SK_U32 i;
2016 SK_RLMT_PORT *pRPort;
2017 SK_EVPARA Para2;
2018
2019 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2020 ("SK_RLMT_LINK_UP Port %d Event BEGIN.\n", Para.Para32[0]))
2021
2022 pRPort = &pAC->Rlmt.Port[Para.Para32[0]];
2023 if (!pRPort->PortStarted) {
2024 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E008, SKERR_RLMT_E008_MSG);
2025
2026 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2027 ("SK_RLMT_LINK_UP Event EMPTY.\n"))
2028 return;
2029 }
2030
2031 if (!pRPort->LinkDown) {
2032 /* RA;:;: Any better solution? */
2033 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2034 ("SK_RLMT_LINK_UP Event EMPTY.\n"))
2035 return;
2036 }
2037
2038 SkTimerStop(pAC, IoC, &pRPort->UpTimer);
2039 SkTimerStop(pAC, IoC, &pRPort->DownRxTimer);
2040 SkTimerStop(pAC, IoC, &pRPort->DownTxTimer);
2041
2042 /* Do something if timer already fired? */
2043
2044 pRPort->LinkDown = SK_FALSE;
2045 pRPort->PortState = SK_RLMT_PS_GOING_UP;
2046 pRPort->GuTimeStamp = SkOsGetTime(pAC);
2047 pRPort->BcTimeStamp = 0;
2048 pRPort->Net->LinksUp++;
2049 if (pRPort->Net->LinksUp == 1) {
2050 SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_ACTIVE);
2051 }
2052 else {
2053 SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_STANDBY);
2054 }
2055
2056 for (i = 0; i < pRPort->Net->NumPorts; i++) {
2057 if (!pRPort->Net->Port[i]->PortStarted) {
2058 SkRlmtPortStart(pAC, IoC, pRPort->Net->Port[i]->PortNumber);
2059 }
2060 }
2061
2062 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);
2063
2064 if (pRPort->Net->LinksUp >= 2) {
2065 if (pRPort->Net->RlmtMode & SK_RLMT_CHECK_LOC_LINK) {
2066 /* Build the check chain. */
2067 SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber);
2068 }
2069 }
2070
2071 /* If the first link comes up, start the periodical RLMT timeout. */
2072 if (pRPort->Net->NumPorts > 1 && pRPort->Net->LinksUp == 1 &&
2073 (pRPort->Net->RlmtMode & SK_RLMT_CHECK_OTHERS) != 0) {
2074 Para2.Para32[0] = pRPort->Net->NetNumber;
2075 Para2.Para32[1] = (SK_U32)-1;
2076 SkTimerStart(pAC, IoC, &pRPort->Net->LocTimer,
2077 pRPort->Net->TimeoutValue, SKGE_RLMT, SK_RLMT_TIM, Para2);
2078 }
2079
2080 Para2 = Para;
2081 Para2.Para32[1] = (SK_U32)-1;
2082 SkTimerStart(pAC, IoC, &pRPort->UpTimer, SK_RLMT_PORTUP_TIM_VAL,
2083 SKGE_RLMT, SK_RLMT_PORTUP_TIM, Para2);
2084
2085 /* Later: if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK) && */
2086 if ((pRPort->Net->RlmtMode & SK_RLMT_TRANSPARENT) == 0 &&
2087 (pRPort->Net->RlmtMode & SK_RLMT_CHECK_LINK) != 0 &&
2088 (Para2.pParaPtr =
2089 SkRlmtBuildPacket(pAC, IoC, Para.Para32[0], SK_PACKET_ANNOUNCE,
2090 &pAC->Addr.Port[Para.Para32[0]].CurrentMacAddress, &SkRlmtMcAddr)
2091 ) != NULL) {
2092 /* Send "new" packet to RLMT multicast address. */
2093 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2);
2094 }
2095
2096 if (pRPort->Net->RlmtMode & SK_RLMT_CHECK_SEG) {
2097 if ((Para2.pParaPtr =
2098 SkRlmtBuildSpanningTreePacket(pAC, IoC, Para.Para32[0])) != NULL) {
2099 pAC->Rlmt.Port[Para.Para32[0]].RootIdSet = SK_FALSE;
2100 pRPort->Net->CheckingState |=
2101 SK_RLMT_RCS_SEG | SK_RLMT_RCS_REPORT_SEG;
2102
2103 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2);
2104
2105 Para.Para32[1] = (SK_U32)-1;
2106 SkTimerStart(pAC, IoC, &pRPort->Net->SegTimer,
2107 SK_RLMT_SEG_TO_VAL, SKGE_RLMT, SK_RLMT_SEG_TIM, Para);
2108 }
2109 }
2110
2111 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2112 ("SK_RLMT_LINK_UP Event END.\n"))
2113} /* SkRlmtEvtLinkUp */
2114
2115
2116/******************************************************************************
2117 *
2118 * SkRlmtEvtPortUpTim - PORT_UP_TIM
2119 *
2120 * Description:
2121 * This routine handles PORT_UP_TIM events.
2122 *
2123 * Context:
2124 * runtime, pageable?
2125 * may be called after SK_INIT_IO
2126 *
2127 * Returns:
2128 * Nothing
2129 */
2130RLMT_STATIC void SkRlmtEvtPortUpTim(
2131SK_AC *pAC, /* Adapter Context */
2132SK_IOC IoC, /* I/O Context */
2133SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */
2134{
2135 SK_RLMT_PORT *pRPort;
2136
2137 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2138 ("SK_RLMT_PORTUP_TIM Port %d Event BEGIN.\n", Para.Para32[0]))
2139
2140 if (Para.Para32[1] != (SK_U32)-1) {
2141 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2142 ("Bad Parameter.\n"))
2143 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2144 ("SK_RLMT_PORTUP_TIM Event EMPTY.\n"))
2145 return;
2146 }
2147
2148 pRPort = &pAC->Rlmt.Port[Para.Para32[0]];
2149 if (pRPort->LinkDown || (pRPort->PortState == SK_RLMT_PS_UP)) {
2150 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2151 ("SK_RLMT_PORTUP_TIM Port %d Event EMPTY.\n", Para.Para32[0]))
2152 return;
2153 }
2154
2155 pRPort->PortDown = SK_FALSE;
2156 pRPort->PortState = SK_RLMT_PS_UP;
2157 pRPort->Net->PortsUp++;
2158 if (pRPort->Net->RlmtState != SK_RLMT_RS_INIT) {
2159 if (pAC->Rlmt.NumNets <= 1) {
2160 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);
2161 }
2162 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_PORT_UP, Para);
2163 }
2164
2165 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2166 ("SK_RLMT_PORTUP_TIM Event END.\n"))
2167} /* SkRlmtEvtPortUpTim */
2168
2169
2170/******************************************************************************
2171 *
2172 * SkRlmtEvtPortDownTim - PORT_DOWN_*
2173 *
2174 * Description:
2175 * This routine handles PORT_DOWN_* events.
2176 *
2177 * Context:
2178 * runtime, pageable?
2179 * may be called after SK_INIT_IO
2180 *
2181 * Returns:
2182 * Nothing
2183 */
2184RLMT_STATIC void SkRlmtEvtPortDownX(
2185SK_AC *pAC, /* Adapter Context */
2186SK_IOC IoC, /* I/O Context */
2187SK_U32 Event, /* Event code */
2188SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */
2189{
2190 SK_RLMT_PORT *pRPort;
2191
2192 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2193 ("SK_RLMT_PORTDOWN* Port %d Event (%d) BEGIN.\n",
2194 Para.Para32[0], Event))
2195
2196 if (Para.Para32[1] != (SK_U32)-1) {
2197 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2198 ("Bad Parameter.\n"))
2199 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2200 ("SK_RLMT_PORTDOWN* Event EMPTY.\n"))
2201 return;
2202 }
2203
2204 pRPort = &pAC->Rlmt.Port[Para.Para32[0]];
2205 if (!pRPort->PortStarted || (Event == SK_RLMT_PORTDOWN_TX_TIM &&
2206 !(pRPort->CheckingState & SK_RLMT_PCS_TX))) {
2207 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2208 ("SK_RLMT_PORTDOWN* Event (%d) EMPTY.\n", Event))
2209 return;
2210 }
2211
2212 /* Stop port's timers. */
2213 SkTimerStop(pAC, IoC, &pRPort->UpTimer);
2214 SkTimerStop(pAC, IoC, &pRPort->DownRxTimer);
2215 SkTimerStop(pAC, IoC, &pRPort->DownTxTimer);
2216
2217 if (pRPort->PortState != SK_RLMT_PS_LINK_DOWN) {
2218 pRPort->PortState = SK_RLMT_PS_DOWN;
2219 }
2220
2221 if (!pRPort->PortDown) {
2222 pRPort->Net->PortsUp--;
2223 pRPort->PortDown = SK_TRUE;
2224 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_PORT_DOWN, Para);
2225 }
2226
2227 pRPort->PacketsPerTimeSlot = 0;
2228 /* pRPort->DataPacketsPerTimeSlot = 0; */
2229 pRPort->BpduPacketsPerTimeSlot = 0;
2230 pRPort->BcTimeStamp = 0;
2231
2232 /*
2233 * RA;:;: To be checked:
2234 * - actions at RLMT_STOP: We should not switch anymore.
2235 */
2236 if (pRPort->Net->RlmtState != SK_RLMT_RS_INIT) {
2237 if (Para.Para32[0] ==
2238 pRPort->Net->Port[pRPort->Net->ActivePort]->PortNumber) {
2239 /* Active Port went down. */
2240 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);
2241 }
2242 }
2243
2244 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2245 ("SK_RLMT_PORTDOWN* Event (%d) END.\n", Event))
2246} /* SkRlmtEvtPortDownX */
2247
2248
2249/******************************************************************************
2250 *
2251 * SkRlmtEvtLinkDown - LINK_DOWN
2252 *
2253 * Description:
2254 * This routine handles LINK_DOWN events.
2255 *
2256 * Context:
2257 * runtime, pageable?
2258 * may be called after SK_INIT_IO
2259 *
2260 * Returns:
2261 * Nothing
2262 */
2263RLMT_STATIC void SkRlmtEvtLinkDown(
2264SK_AC *pAC, /* Adapter Context */
2265SK_IOC IoC, /* I/O Context */
2266SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 Undefined */
2267{
2268 SK_RLMT_PORT *pRPort;
2269
2270 pRPort = &pAC->Rlmt.Port[Para.Para32[0]];
2271 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2272 ("SK_RLMT_LINK_DOWN Port %d Event BEGIN.\n", Para.Para32[0]))
2273
2274 if (!pAC->Rlmt.Port[Para.Para32[0]].LinkDown) {
2275 pRPort->Net->LinksUp--;
2276 pRPort->LinkDown = SK_TRUE;
2277 pRPort->PortState = SK_RLMT_PS_LINK_DOWN;
2278 SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_OFF);
2279
2280 if ((pRPort->Net->RlmtMode & SK_RLMT_CHECK_LOC_LINK) != 0) {
2281 /* Build the check chain. */
2282 SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber);
2283 }
2284
2285 /* Ensure that port is marked down. */
2286 Para.Para32[1] = -1;
2287 (void)SkRlmtEvent(pAC, IoC, SK_RLMT_PORTDOWN, Para);
2288 }
2289
2290 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2291 ("SK_RLMT_LINK_DOWN Event END.\n"))
2292} /* SkRlmtEvtLinkDown */
2293
2294
2295/******************************************************************************
2296 *
2297 * SkRlmtEvtPortAddr - PORT_ADDR
2298 *
2299 * Description:
2300 * This routine handles PORT_ADDR events.
2301 *
2302 * Context:
2303 * runtime, pageable?
2304 * may be called after SK_INIT_IO
2305 *
2306 * Returns:
2307 * Nothing
2308 */
2309RLMT_STATIC void SkRlmtEvtPortAddr(
2310SK_AC *pAC, /* Adapter Context */
2311SK_IOC IoC, /* I/O Context */
2312SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */
2313{
2314 SK_U32 i, j;
2315 SK_RLMT_PORT *pRPort;
2316 SK_MAC_ADDR *pOldMacAddr;
2317 SK_MAC_ADDR *pNewMacAddr;
2318
2319 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2320 ("SK_RLMT_PORT_ADDR Port %d Event BEGIN.\n", Para.Para32[0]))
2321
2322 if (Para.Para32[1] != (SK_U32)-1) {
2323 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2324 ("Bad Parameter.\n"))
2325 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2326 ("SK_RLMT_PORT_ADDR Event EMPTY.\n"))
2327 return;
2328 }
2329
2330 /* Port's physical MAC address changed. */
2331 pOldMacAddr = &pAC->Addr.Port[Para.Para32[0]].PreviousMacAddress;
2332 pNewMacAddr = &pAC->Addr.Port[Para.Para32[0]].CurrentMacAddress;
2333
2334 /*
2335 * NOTE: This is not scalable for solutions where ports are
2336 * checked remotely. There, we need to send an RLMT
2337 * address change packet - and how do we ensure delivery?
2338 */
2339 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
2340 pRPort = &pAC->Rlmt.Port[i];
2341 for (j = 0; j < pRPort->PortsChecked; j++) {
2342 if (SK_ADDR_EQUAL(
2343 pRPort->PortCheck[j].CheckAddr.a, pOldMacAddr->a)) {
2344 pRPort->PortCheck[j].CheckAddr = *pNewMacAddr;
2345 }
2346 }
2347 }
2348
2349 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2350 ("SK_RLMT_PORT_ADDR Event END.\n"))
2351} /* SkRlmtEvtPortAddr */
2352
2353
2354/******************************************************************************
2355 *
2356 * SkRlmtEvtStart - START
2357 *
2358 * Description:
2359 * This routine handles START events.
2360 *
2361 * Context:
2362 * runtime, pageable?
2363 * may be called after SK_INIT_IO
2364 *
2365 * Returns:
2366 * Nothing
2367 */
2368RLMT_STATIC void SkRlmtEvtStart(
2369SK_AC *pAC, /* Adapter Context */
2370SK_IOC IoC, /* I/O Context */
2371SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
2372{
2373 SK_EVPARA Para2;
2374 SK_U32 PortIdx;
2375 SK_U32 PortNumber;
2376
2377 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2378 ("SK_RLMT_START Net %d Event BEGIN.\n", Para.Para32[0]))
2379
2380 if (Para.Para32[1] != (SK_U32)-1) {
2381 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2382 ("Bad Parameter.\n"))
2383 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2384 ("SK_RLMT_START Event EMPTY.\n"))
2385 return;
2386 }
2387
2388 if (Para.Para32[0] >= pAC->Rlmt.NumNets) {
2389 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2390 ("Bad NetNumber %d.\n", Para.Para32[0]))
2391 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2392 ("SK_RLMT_START Event EMPTY.\n"))
2393 return;
2394 }
2395
2396 if (pAC->Rlmt.Net[Para.Para32[0]].RlmtState != SK_RLMT_RS_INIT) {
2397 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2398 ("SK_RLMT_START Event EMPTY.\n"))
2399 return;
2400 }
2401
2402 if (pAC->Rlmt.NetsStarted >= pAC->Rlmt.NumNets) {
2403 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2404 ("All nets should have been started.\n"))
2405 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2406 ("SK_RLMT_START Event EMPTY.\n"))
2407 return;
2408 }
2409
2410 if (pAC->Rlmt.Net[Para.Para32[0]].PrefPort >=
2411 pAC->Rlmt.Net[Para.Para32[0]].NumPorts) {
2412 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E009, SKERR_RLMT_E009_MSG);
2413
2414 /* Change PrefPort to internal default. */
2415 Para2.Para32[0] = 0xFFFFFFFF;
2416 Para2.Para32[1] = Para.Para32[0];
2417 (void)SkRlmtEvent(pAC, IoC, SK_RLMT_PREFPORT_CHANGE, Para2);
2418 }
2419
2420 PortIdx = pAC->Rlmt.Net[Para.Para32[0]].PrefPort;
2421 PortNumber = pAC->Rlmt.Net[Para.Para32[0]].Port[PortIdx]->PortNumber;
2422
2423 pAC->Rlmt.Net[Para.Para32[0]].LinksUp = 0;
2424 pAC->Rlmt.Net[Para.Para32[0]].PortsUp = 0;
2425 pAC->Rlmt.Net[Para.Para32[0]].CheckingState = 0;
2426 pAC->Rlmt.Net[Para.Para32[0]].RlmtState = SK_RLMT_RS_NET_DOWN;
2427
2428 /* Start preferred port. */
2429 SkRlmtPortStart(pAC, IoC, PortNumber);
2430
2431 /* Start Timer (for first port only). */
2432 Para2.Para32[0] = PortNumber;
2433 Para2.Para32[1] = (SK_U32)-1;
2434 SkTimerStart(pAC, IoC, &pAC->Rlmt.Port[PortNumber].UpTimer,
2435 SK_RLMT_PORTSTART_TIM_VAL, SKGE_RLMT, SK_RLMT_PORTSTART_TIM, Para2);
2436
2437 pAC->Rlmt.NetsStarted++;
2438
2439 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2440 ("SK_RLMT_START Event END.\n"))
2441} /* SkRlmtEvtStart */
2442
2443
2444/******************************************************************************
2445 *
2446 * SkRlmtEvtStop - STOP
2447 *
2448 * Description:
2449 * This routine handles STOP events.
2450 *
2451 * Context:
2452 * runtime, pageable?
2453 * may be called after SK_INIT_IO
2454 *
2455 * Returns:
2456 * Nothing
2457 */
2458RLMT_STATIC void SkRlmtEvtStop(
2459SK_AC *pAC, /* Adapter Context */
2460SK_IOC IoC, /* I/O Context */
2461SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
2462{
2463 SK_EVPARA Para2;
2464 SK_U32 PortNumber;
2465 SK_U32 i;
2466
2467 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2468 ("SK_RLMT_STOP Net %d Event BEGIN.\n", Para.Para32[0]))
2469
2470 if (Para.Para32[1] != (SK_U32)-1) {
2471 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2472 ("Bad Parameter.\n"))
2473 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2474 ("SK_RLMT_STOP Event EMPTY.\n"))
2475 return;
2476 }
2477
2478 if (Para.Para32[0] >= pAC->Rlmt.NumNets) {
2479 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2480 ("Bad NetNumber %d.\n", Para.Para32[0]))
2481 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2482 ("SK_RLMT_STOP Event EMPTY.\n"))
2483 return;
2484 }
2485
2486 if (pAC->Rlmt.Net[Para.Para32[0]].RlmtState == SK_RLMT_RS_INIT) {
2487 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2488 ("SK_RLMT_STOP Event EMPTY.\n"))
2489 return;
2490 }
2491
2492 if (pAC->Rlmt.NetsStarted == 0) {
2493 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2494 ("All nets are stopped.\n"))
2495 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2496 ("SK_RLMT_STOP Event EMPTY.\n"))
2497 return;
2498 }
2499
2500 /* Stop RLMT timers. */
2501 SkTimerStop(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].LocTimer);
2502 SkTimerStop(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].SegTimer);
2503
2504 /* Stop net. */
2505 pAC->Rlmt.Net[Para.Para32[0]].RlmtState = SK_RLMT_RS_INIT;
2506 pAC->Rlmt.Net[Para.Para32[0]].RootIdSet = SK_FALSE;
2507 Para2.Para32[0] = SK_RLMT_NET_DOWN_FINAL;
2508 Para2.Para32[1] = Para.Para32[0]; /* Net# */
2509 SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_DOWN, Para2);
2510
2511 /* Stop ports. */
2512 for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) {
2513 PortNumber = pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber;
2514 if (pAC->Rlmt.Port[PortNumber].PortState != SK_RLMT_PS_INIT) {
2515 SkTimerStop(pAC, IoC, &pAC->Rlmt.Port[PortNumber].UpTimer);
2516 SkTimerStop(pAC, IoC, &pAC->Rlmt.Port[PortNumber].DownRxTimer);
2517 SkTimerStop(pAC, IoC, &pAC->Rlmt.Port[PortNumber].DownTxTimer);
2518
2519 pAC->Rlmt.Port[PortNumber].PortState = SK_RLMT_PS_INIT;
2520 pAC->Rlmt.Port[PortNumber].RootIdSet = SK_FALSE;
2521 pAC->Rlmt.Port[PortNumber].PortStarted = SK_FALSE;
2522 Para2.Para32[0] = PortNumber;
2523 Para2.Para32[1] = (SK_U32)-1;
2524 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para2);
2525 }
2526 }
2527
2528 pAC->Rlmt.NetsStarted--;
2529
2530 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2531 ("SK_RLMT_STOP Event END.\n"))
2532} /* SkRlmtEvtStop */
2533
2534
2535/******************************************************************************
2536 *
2537 * SkRlmtEvtTim - TIM
2538 *
2539 * Description:
2540 * This routine handles TIM events.
2541 *
2542 * Context:
2543 * runtime, pageable?
2544 * may be called after SK_INIT_IO
2545 *
2546 * Returns:
2547 * Nothing
2548 */
2549RLMT_STATIC void SkRlmtEvtTim(
2550SK_AC *pAC, /* Adapter Context */
2551SK_IOC IoC, /* I/O Context */
2552SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
2553{
2554 SK_RLMT_PORT *pRPort;
2555 SK_U32 Timeout;
2556 SK_U32 NewTimeout;
2557 SK_U32 PortNumber;
2558 SK_U32 i;
2559
2560 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2561 ("SK_RLMT_TIM Event BEGIN.\n"))
2562
2563 if (Para.Para32[1] != (SK_U32)-1) {
2564 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2565 ("Bad Parameter.\n"))
2566 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2567 ("SK_RLMT_TIM Event EMPTY.\n"))
2568 return;
2569 }
2570
2571 if ((pAC->Rlmt.Net[Para.Para32[0]].RlmtMode & SK_RLMT_CHECK_OTHERS) == 0 ||
2572 pAC->Rlmt.Net[Para.Para32[0]].LinksUp == 0) {
2573 /* Mode changed or all links down: No more link checking. */
2574 return;
2575 }
2576
2577#if 0
2578 pAC->Rlmt.SwitchCheckCounter--;
2579 if (pAC->Rlmt.SwitchCheckCounter == 0) {
2580 pAC->Rlmt.SwitchCheckCounter;
2581 }
2582#endif /* 0 */
2583
2584 NewTimeout = SK_RLMT_DEF_TO_VAL;
2585 for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) {
2586 PortNumber = pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber;
2587 pRPort = &pAC->Rlmt.Port[PortNumber];
2588 if (!pRPort->LinkDown) {
2589 Timeout = SkRlmtCheckPort(pAC, IoC, PortNumber);
2590 if (Timeout < NewTimeout) {
2591 NewTimeout = Timeout;
2592 }
2593
2594 /*
2595 * These counters should be set to 0 for all ports before the
2596 * first frame is sent in the next loop.
2597 */
2598 pRPort->PacketsPerTimeSlot = 0;
2599 /* pRPort->DataPacketsPerTimeSlot = 0; */
2600 pRPort->BpduPacketsPerTimeSlot = 0;
2601 }
2602 }
2603 pAC->Rlmt.Net[Para.Para32[0]].TimeoutValue = NewTimeout;
2604
2605 if (pAC->Rlmt.Net[Para.Para32[0]].LinksUp > 1) {
2606 /*
2607 * If checking remote ports, also send packets if
2608 * (LinksUp == 1) &&
2609 * this port checks at least one (remote) port.
2610 */
2611
2612 /*
2613 * Must be new loop, as SkRlmtCheckPort can request to
2614 * check segmentation when e.g. checking the last port.
2615 */
2616 for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) {
2617 if (!pAC->Rlmt.Net[Para.Para32[0]].Port[i]->LinkDown) {
2618 SkRlmtSend(pAC, IoC,
2619 pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber);
2620 }
2621 }
2622 }
2623
2624 SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].LocTimer,
2625 pAC->Rlmt.Net[Para.Para32[0]].TimeoutValue, SKGE_RLMT, SK_RLMT_TIM,
2626 Para);
2627
2628 if (pAC->Rlmt.Net[Para.Para32[0]].LinksUp > 1 &&
2629 (pAC->Rlmt.Net[Para.Para32[0]].RlmtMode & SK_RLMT_CHECK_SEG) &&
2630 (pAC->Rlmt.Net[Para.Para32[0]].CheckingState & SK_RLMT_RCS_START_SEG)) {
2631 SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].SegTimer,
2632 SK_RLMT_SEG_TO_VAL, SKGE_RLMT, SK_RLMT_SEG_TIM, Para);
2633 pAC->Rlmt.Net[Para.Para32[0]].CheckingState &= ~SK_RLMT_RCS_START_SEG;
2634 pAC->Rlmt.Net[Para.Para32[0]].CheckingState |=
2635 SK_RLMT_RCS_SEG | SK_RLMT_RCS_REPORT_SEG;
2636 }
2637
2638 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2639 ("SK_RLMT_TIM Event END.\n"))
2640} /* SkRlmtEvtTim */
2641
2642
2643/******************************************************************************
2644 *
2645 * SkRlmtEvtSegTim - SEG_TIM
2646 *
2647 * Description:
2648 * This routine handles SEG_TIM events.
2649 *
2650 * Context:
2651 * runtime, pageable?
2652 * may be called after SK_INIT_IO
2653 *
2654 * Returns:
2655 * Nothing
2656 */
2657RLMT_STATIC void SkRlmtEvtSegTim(
2658SK_AC *pAC, /* Adapter Context */
2659SK_IOC IoC, /* I/O Context */
2660SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
2661{
2662#ifdef xDEBUG
2663 int j;
2664#endif /* DEBUG */
2665
2666 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2667 ("SK_RLMT_SEG_TIM Event BEGIN.\n"))
2668
2669 if (Para.Para32[1] != (SK_U32)-1) {
2670 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2671 ("Bad Parameter.\n"))
2672 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2673 ("SK_RLMT_SEG_TIM Event EMPTY.\n"))
2674 return;
2675 }
2676
2677#ifdef xDEBUG
2678 for (j = 0; j < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; j++) {
2679 SK_ADDR_PORT *pAPort;
2680 SK_U32 k;
2681 SK_U16 *InAddr;
2682 SK_U8 InAddr8[6];
2683
2684 InAddr = (SK_U16 *)&InAddr8[0];
2685 pAPort = pAC->Rlmt.Net[Para.Para32[0]].Port[j]->AddrPort;
2686 for (k = 0; k < pAPort->NextExactMatchRlmt; k++) {
2687 /* Get exact match address k from port j. */
2688 XM_INADDR(IoC, pAC->Rlmt.Net[Para.Para32[0]].Port[j]->PortNumber,
2689 XM_EXM(k), InAddr);
2690 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2691 ("MC address %d on Port %u: %02x %02x %02x %02x %02x %02x -- %02x %02x %02x %02x %02x %02x.\n",
2692 k, pAC->Rlmt.Net[Para.Para32[0]].Port[j]->PortNumber,
2693 InAddr8[0], InAddr8[1], InAddr8[2],
2694 InAddr8[3], InAddr8[4], InAddr8[5],
2695 pAPort->Exact[k].a[0], pAPort->Exact[k].a[1],
2696 pAPort->Exact[k].a[2], pAPort->Exact[k].a[3],
2697 pAPort->Exact[k].a[4], pAPort->Exact[k].a[5]))
2698 }
2699 }
2700#endif /* xDEBUG */
2701
2702 SkRlmtCheckSeg(pAC, IoC, Para.Para32[0]);
2703
2704 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2705 ("SK_RLMT_SEG_TIM Event END.\n"))
2706} /* SkRlmtEvtSegTim */
2707
2708
2709/******************************************************************************
2710 *
2711 * SkRlmtEvtPacketRx - PACKET_RECEIVED
2712 *
2713 * Description:
2714 * This routine handles PACKET_RECEIVED events.
2715 *
2716 * Context:
2717 * runtime, pageable?
2718 * may be called after SK_INIT_IO
2719 *
2720 * Returns:
2721 * Nothing
2722 */
2723RLMT_STATIC void SkRlmtEvtPacketRx(
2724SK_AC *pAC, /* Adapter Context */
2725SK_IOC IoC, /* I/O Context */
2726SK_EVPARA Para) /* SK_MBUF *pMb */
2727{
2728 SK_MBUF *pMb;
2729 SK_MBUF *pNextMb;
2730 SK_U32 NetNumber;
2731
2732
2733 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2734 ("SK_RLMT_PACKET_RECEIVED Event BEGIN.\n"))
2735
2736 /* Should we ignore frames during port switching? */
2737
2738#ifdef DEBUG
2739 pMb = Para.pParaPtr;
2740 if (pMb == NULL) {
2741 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, ("No mbuf.\n"))
2742 }
2743 else if (pMb->pNext != NULL) {
2744 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2745 ("More than one mbuf or pMb->pNext not set.\n"))
2746 }
2747#endif /* DEBUG */
2748
2749 for (pMb = Para.pParaPtr; pMb != NULL; pMb = pNextMb) {
2750 pNextMb = pMb->pNext;
2751 pMb->pNext = NULL;
2752
2753 NetNumber = pAC->Rlmt.Port[pMb->PortIdx].Net->NetNumber;
2754 if (pAC->Rlmt.Net[NetNumber].RlmtState == SK_RLMT_RS_INIT) {
2755 SkDrvFreeRlmtMbuf(pAC, IoC, pMb);
2756 }
2757 else {
2758 SkRlmtPacketReceive(pAC, IoC, pMb);
2759 }
2760 }
2761
2762 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2763 ("SK_RLMT_PACKET_RECEIVED Event END.\n"))
2764} /* SkRlmtEvtPacketRx */
2765
2766
2767/******************************************************************************
2768 *
2769 * SkRlmtEvtStatsClear - STATS_CLEAR
2770 *
2771 * Description:
2772 * This routine handles STATS_CLEAR events.
2773 *
2774 * Context:
2775 * runtime, pageable?
2776 * may be called after SK_INIT_IO
2777 *
2778 * Returns:
2779 * Nothing
2780 */
2781RLMT_STATIC void SkRlmtEvtStatsClear(
2782SK_AC *pAC, /* Adapter Context */
2783SK_IOC IoC, /* I/O Context */
2784SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
2785{
2786 SK_U32 i;
2787 SK_RLMT_PORT *pRPort;
2788
2789 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2790 ("SK_RLMT_STATS_CLEAR Event BEGIN.\n"))
2791
2792 if (Para.Para32[1] != (SK_U32)-1) {
2793 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2794 ("Bad Parameter.\n"))
2795 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2796 ("SK_RLMT_STATS_CLEAR Event EMPTY.\n"))
2797 return;
2798 }
2799
2800 if (Para.Para32[0] >= pAC->Rlmt.NumNets) {
2801 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2802 ("Bad NetNumber %d.\n", Para.Para32[0]))
2803 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2804 ("SK_RLMT_STATS_CLEAR Event EMPTY.\n"))
2805 return;
2806 }
2807
2808 /* Clear statistics for logical and physical ports. */
2809 for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) {
2810 pRPort =
2811 &pAC->Rlmt.Port[pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber];
2812 pRPort->TxHelloCts = 0;
2813 pRPort->RxHelloCts = 0;
2814 pRPort->TxSpHelloReqCts = 0;
2815 pRPort->RxSpHelloCts = 0;
2816 }
2817
2818 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2819 ("SK_RLMT_STATS_CLEAR Event END.\n"))
2820} /* SkRlmtEvtStatsClear */
2821
2822
2823/******************************************************************************
2824 *
2825 * SkRlmtEvtStatsUpdate - STATS_UPDATE
2826 *
2827 * Description:
2828 * This routine handles STATS_UPDATE events.
2829 *
2830 * Context:
2831 * runtime, pageable?
2832 * may be called after SK_INIT_IO
2833 *
2834 * Returns:
2835 * Nothing
2836 */
2837RLMT_STATIC void SkRlmtEvtStatsUpdate(
2838SK_AC *pAC, /* Adapter Context */
2839SK_IOC IoC, /* I/O Context */
2840SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
2841{
2842 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2843 ("SK_RLMT_STATS_UPDATE Event BEGIN.\n"))
2844
2845 if (Para.Para32[1] != (SK_U32)-1) {
2846 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2847 ("Bad Parameter.\n"))
2848 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2849 ("SK_RLMT_STATS_UPDATE Event EMPTY.\n"))
2850 return;
2851 }
2852
2853 if (Para.Para32[0] >= pAC->Rlmt.NumNets) {
2854 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2855 ("Bad NetNumber %d.\n", Para.Para32[0]))
2856 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2857 ("SK_RLMT_STATS_UPDATE Event EMPTY.\n"))
2858 return;
2859 }
2860
2861 /* Update statistics - currently always up-to-date. */
2862
2863 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2864 ("SK_RLMT_STATS_UPDATE Event END.\n"))
2865} /* SkRlmtEvtStatsUpdate */
2866
2867
2868/******************************************************************************
2869 *
2870 * SkRlmtEvtPrefportChange - PREFPORT_CHANGE
2871 *
2872 * Description:
2873 * This routine handles PREFPORT_CHANGE events.
2874 *
2875 * Context:
2876 * runtime, pageable?
2877 * may be called after SK_INIT_IO
2878 *
2879 * Returns:
2880 * Nothing
2881 */
2882RLMT_STATIC void SkRlmtEvtPrefportChange(
2883SK_AC *pAC, /* Adapter Context */
2884SK_IOC IoC, /* I/O Context */
2885SK_EVPARA Para) /* SK_U32 PortIndex; SK_U32 NetNumber */
2886{
2887 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2888 ("SK_RLMT_PREFPORT_CHANGE to Port %d Event BEGIN.\n", Para.Para32[0]))
2889
2890 if (Para.Para32[1] >= pAC->Rlmt.NumNets) {
2891 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2892 ("Bad NetNumber %d.\n", Para.Para32[1]))
2893 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2894 ("SK_RLMT_PREFPORT_CHANGE Event EMPTY.\n"))
2895 return;
2896 }
2897
2898 /* 0xFFFFFFFF == auto-mode. */
2899 if (Para.Para32[0] == 0xFFFFFFFF) {
2900 pAC->Rlmt.Net[Para.Para32[1]].PrefPort = SK_RLMT_DEF_PREF_PORT;
2901 }
2902 else {
2903 if (Para.Para32[0] >= pAC->Rlmt.Net[Para.Para32[1]].NumPorts) {
2904 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E010, SKERR_RLMT_E010_MSG);
2905
2906 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2907 ("SK_RLMT_PREFPORT_CHANGE Event EMPTY.\n"))
2908 return;
2909 }
2910
2911 pAC->Rlmt.Net[Para.Para32[1]].PrefPort = Para.Para32[0];
2912 }
2913
2914 pAC->Rlmt.Net[Para.Para32[1]].Preference = Para.Para32[0];
2915
2916 if (pAC->Rlmt.Net[Para.Para32[1]].RlmtState != SK_RLMT_RS_INIT) {
2917 SkRlmtCheckSwitch(pAC, IoC, Para.Para32[1]);
2918 }
2919
2920 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2921 ("SK_RLMT_PREFPORT_CHANGE Event END.\n"))
2922} /* SkRlmtEvtPrefportChange */
2923
2924
2925/******************************************************************************
2926 *
2927 * SkRlmtEvtSetNets - SET_NETS
2928 *
2929 * Description:
2930 * This routine handles SET_NETS events.
2931 *
2932 * Context:
2933 * runtime, pageable?
2934 * may be called after SK_INIT_IO
2935 *
2936 * Returns:
2937 * Nothing
2938 */
2939RLMT_STATIC void SkRlmtEvtSetNets(
2940SK_AC *pAC, /* Adapter Context */
2941SK_IOC IoC, /* I/O Context */
2942SK_EVPARA Para) /* SK_U32 NumNets; SK_U32 -1 */
2943{
2944 int i;
2945
2946 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2947 ("SK_RLMT_SET_NETS Event BEGIN.\n"))
2948
2949 if (Para.Para32[1] != (SK_U32)-1) {
2950 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2951 ("Bad Parameter.\n"))
2952 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2953 ("SK_RLMT_SET_NETS Event EMPTY.\n"))
2954 return;
2955 }
2956
2957 if (Para.Para32[0] == 0 || Para.Para32[0] > SK_MAX_NETS ||
2958 Para.Para32[0] > (SK_U32)pAC->GIni.GIMacsFound) {
2959 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2960 ("Bad number of nets: %d.\n", Para.Para32[0]))
2961 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2962 ("SK_RLMT_SET_NETS Event EMPTY.\n"))
2963 return;
2964 }
2965
2966 if (Para.Para32[0] == pAC->Rlmt.NumNets) { /* No change. */
2967 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2968 ("SK_RLMT_SET_NETS Event EMPTY.\n"))
2969 return;
2970 }
2971
2972 /* Entering and leaving dual mode only allowed while nets are stopped. */
2973 if (pAC->Rlmt.NetsStarted > 0) {
2974 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2975 ("Changing dual mode only allowed while all nets are stopped.\n"))
2976 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
2977 ("SK_RLMT_SET_NETS Event EMPTY.\n"))
2978 return;
2979 }
2980
2981 if (Para.Para32[0] == 1) {
2982 if (pAC->Rlmt.NumNets > 1) {
2983 /* Clear logical MAC addr from second net's active port. */
2984 (void)SkAddrOverride(pAC, IoC, pAC->Rlmt.Net[1].Port[pAC->Addr.
2985 Net[1].ActivePort]->PortNumber, NULL, SK_ADDR_CLEAR_LOGICAL);
2986 pAC->Rlmt.Net[1].NumPorts = 0;
2987 }
2988
2989 pAC->Rlmt.NumNets = Para.Para32[0];
2990 for (i = 0; (SK_U32)i < pAC->Rlmt.NumNets; i++) {
2991 pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT;
2992 pAC->Rlmt.Net[i].RootIdSet = SK_FALSE;
2993 pAC->Rlmt.Net[i].Preference = 0xFFFFFFFF; /* "Automatic" */
2994 pAC->Rlmt.Net[i].PrefPort = SK_RLMT_DEF_PREF_PORT;
2995 /* Just assuming. */
2996 pAC->Rlmt.Net[i].ActivePort = pAC->Rlmt.Net[i].PrefPort;
2997 pAC->Rlmt.Net[i].RlmtMode = SK_RLMT_DEF_MODE;
2998 pAC->Rlmt.Net[i].TimeoutValue = SK_RLMT_DEF_TO_VAL;
2999 pAC->Rlmt.Net[i].NetNumber = i;
3000 }
3001
3002 pAC->Rlmt.Port[1].Net= &pAC->Rlmt.Net[0];
3003 pAC->Rlmt.Net[0].NumPorts = pAC->GIni.GIMacsFound;
3004
3005 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_SET_NETS, Para);
3006
3007 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
3008 ("RLMT: Changed to one net with two ports.\n"))
3009 }
3010 else if (Para.Para32[0] == 2) {
3011 pAC->Rlmt.Port[1].Net= &pAC->Rlmt.Net[1];
3012 pAC->Rlmt.Net[1].NumPorts = pAC->GIni.GIMacsFound - 1;
3013 pAC->Rlmt.Net[0].NumPorts =
3014 pAC->GIni.GIMacsFound - pAC->Rlmt.Net[1].NumPorts;
3015
3016 pAC->Rlmt.NumNets = Para.Para32[0];
3017 for (i = 0; (SK_U32)i < pAC->Rlmt.NumNets; i++) {
3018 pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT;
3019 pAC->Rlmt.Net[i].RootIdSet = SK_FALSE;
3020 pAC->Rlmt.Net[i].Preference = 0xFFFFFFFF; /* "Automatic" */
3021 pAC->Rlmt.Net[i].PrefPort = SK_RLMT_DEF_PREF_PORT;
3022 /* Just assuming. */
3023 pAC->Rlmt.Net[i].ActivePort = pAC->Rlmt.Net[i].PrefPort;
3024 pAC->Rlmt.Net[i].RlmtMode = SK_RLMT_DEF_MODE;
3025 pAC->Rlmt.Net[i].TimeoutValue = SK_RLMT_DEF_TO_VAL;
3026
3027 pAC->Rlmt.Net[i].NetNumber = i;
3028 }
3029
3030 /* Set logical MAC addr on second net's active port. */
3031 (void)SkAddrOverride(pAC, IoC, pAC->Rlmt.Net[1].Port[pAC->Addr.
3032 Net[1].ActivePort]->PortNumber, NULL, SK_ADDR_SET_LOGICAL);
3033
3034 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_SET_NETS, Para);
3035
3036 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
3037 ("RLMT: Changed to two nets with one port each.\n"))
3038 }
3039 else {
3040 /* Not implemented for more than two nets. */
3041 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
3042 ("SetNets not implemented for more than two nets.\n"))
3043 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
3044 ("SK_RLMT_SET_NETS Event EMPTY.\n"))
3045 return;
3046 }
3047
3048 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
3049 ("SK_RLMT_SET_NETS Event END.\n"))
3050} /* SkRlmtSetNets */
3051
3052
3053/******************************************************************************
3054 *
3055 * SkRlmtEvtModeChange - MODE_CHANGE
3056 *
3057 * Description:
3058 * This routine handles MODE_CHANGE events.
3059 *
3060 * Context:
3061 * runtime, pageable?
3062 * may be called after SK_INIT_IO
3063 *
3064 * Returns:
3065 * Nothing
3066 */
3067RLMT_STATIC void SkRlmtEvtModeChange(
3068SK_AC *pAC, /* Adapter Context */
3069SK_IOC IoC, /* I/O Context */
3070SK_EVPARA Para) /* SK_U32 NewMode; SK_U32 NetNumber */
3071{
3072 SK_EVPARA Para2;
3073 SK_U32 i;
3074 SK_U32 PrevRlmtMode;
3075
3076 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
3077 ("SK_RLMT_MODE_CHANGE Event BEGIN.\n"))
3078
3079 if (Para.Para32[1] >= pAC->Rlmt.NumNets) {
3080 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
3081 ("Bad NetNumber %d.\n", Para.Para32[1]))
3082 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
3083 ("SK_RLMT_MODE_CHANGE Event EMPTY.\n"))
3084 return;
3085 }
3086
3087 Para.Para32[0] |= SK_RLMT_CHECK_LINK;
3088
3089 if ((pAC->Rlmt.Net[Para.Para32[1]].NumPorts == 1) &&
3090 Para.Para32[0] != SK_RLMT_MODE_CLS) {
3091 pAC->Rlmt.Net[Para.Para32[1]].RlmtMode = SK_RLMT_MODE_CLS;
3092 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
3093 ("Forced RLMT mode to CLS on single port net.\n"))
3094 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
3095 ("SK_RLMT_MODE_CHANGE Event EMPTY.\n"))
3096 return;
3097 }
3098
3099 /* Update RLMT mode. */
3100 PrevRlmtMode = pAC->Rlmt.Net[Para.Para32[1]].RlmtMode;
3101 pAC->Rlmt.Net[Para.Para32[1]].RlmtMode = Para.Para32[0];
3102
3103 if ((PrevRlmtMode & SK_RLMT_CHECK_LOC_LINK) !=
3104 (pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & SK_RLMT_CHECK_LOC_LINK)) {
3105 /* SK_RLMT_CHECK_LOC_LINK bit changed. */
3106 if ((PrevRlmtMode & SK_RLMT_CHECK_OTHERS) == 0 &&
3107 pAC->Rlmt.Net[Para.Para32[1]].NumPorts > 1 &&
3108 pAC->Rlmt.Net[Para.Para32[1]].PortsUp >= 1) {
3109 /* 20001207 RA: Was "PortsUp == 1". */
3110 Para2.Para32[0] = Para.Para32[1];
3111 Para2.Para32[1] = (SK_U32)-1;
3112 SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[1]].LocTimer,
3113 pAC->Rlmt.Net[Para.Para32[1]].TimeoutValue,
3114 SKGE_RLMT, SK_RLMT_TIM, Para2);
3115 }
3116 }
3117
3118 if ((PrevRlmtMode & SK_RLMT_CHECK_SEG) !=
3119 (pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & SK_RLMT_CHECK_SEG)) {
3120 /* SK_RLMT_CHECK_SEG bit changed. */
3121 for (i = 0; i < pAC->Rlmt.Net[Para.Para32[1]].NumPorts; i++) {
3122 (void)SkAddrMcClear(pAC, IoC,
3123 pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber,
3124 SK_ADDR_PERMANENT | SK_MC_SW_ONLY);
3125
3126 /* Add RLMT MC address. */
3127 (void)SkAddrMcAdd(pAC, IoC,
3128 pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber,
3129 &SkRlmtMcAddr, SK_ADDR_PERMANENT);
3130
3131 if ((pAC->Rlmt.Net[Para.Para32[1]].RlmtMode &
3132 SK_RLMT_CHECK_SEG) != 0) {
3133 /* Add BPDU MC address. */
3134 (void)SkAddrMcAdd(pAC, IoC,
3135 pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber,
3136 &BridgeMcAddr, SK_ADDR_PERMANENT);
3137
3138 if (pAC->Rlmt.Net[Para.Para32[1]].RlmtState != SK_RLMT_RS_INIT) {
3139 if (!pAC->Rlmt.Net[Para.Para32[1]].Port[i]->LinkDown &&
3140 (Para2.pParaPtr = SkRlmtBuildSpanningTreePacket(
3141 pAC, IoC, i)) != NULL) {
3142 pAC->Rlmt.Net[Para.Para32[1]].Port[i]->RootIdSet =
3143 SK_FALSE;
3144 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2);
3145 }
3146 }
3147 }
3148 (void)SkAddrMcUpdate(pAC, IoC,
3149 pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber);
3150 } /* for ... */
3151
3152 if ((pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & SK_RLMT_CHECK_SEG) != 0) {
3153 Para2.Para32[0] = Para.Para32[1];
3154 Para2.Para32[1] = (SK_U32)-1;
3155 SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[1]].SegTimer,
3156 SK_RLMT_SEG_TO_VAL, SKGE_RLMT, SK_RLMT_SEG_TIM, Para2);
3157 }
3158 } /* SK_RLMT_CHECK_SEG bit changed. */
3159
3160 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
3161 ("SK_RLMT_MODE_CHANGE Event END.\n"))
3162} /* SkRlmtEvtModeChange */
3163
3164
3165/******************************************************************************
3166 *
3167 * SkRlmtEvent - a PORT- or an RLMT-specific event happened
3168 *
3169 * Description:
3170 * This routine calls subroutines to handle PORT- and RLMT-specific events.
3171 *
3172 * Context:
3173 * runtime, pageable?
3174 * may be called after SK_INIT_IO
3175 *
3176 * Returns:
3177 * 0
3178 */
3179int SkRlmtEvent(
3180SK_AC *pAC, /* Adapter Context */
3181SK_IOC IoC, /* I/O Context */
3182SK_U32 Event, /* Event code */
3183SK_EVPARA Para) /* Event-specific parameter */
3184{
3185 switch (Event) {
3186
3187 /* ----- PORT events ----- */
3188
3189 case SK_RLMT_PORTSTART_TIM: /* From RLMT via TIME. */
3190 SkRlmtEvtPortStartTim(pAC, IoC, Para);
3191 break;
3192 case SK_RLMT_LINK_UP: /* From SIRQ. */
3193 SkRlmtEvtLinkUp(pAC, IoC, Para);
3194 break;
3195 case SK_RLMT_PORTUP_TIM: /* From RLMT via TIME. */
3196 SkRlmtEvtPortUpTim(pAC, IoC, Para);
3197 break;
3198 case SK_RLMT_PORTDOWN: /* From RLMT. */
3199 case SK_RLMT_PORTDOWN_RX_TIM: /* From RLMT via TIME. */
3200 case SK_RLMT_PORTDOWN_TX_TIM: /* From RLMT via TIME. */
3201 SkRlmtEvtPortDownX(pAC, IoC, Event, Para);
3202 break;
3203 case SK_RLMT_LINK_DOWN: /* From SIRQ. */
3204 SkRlmtEvtLinkDown(pAC, IoC, Para);
3205 break;
3206 case SK_RLMT_PORT_ADDR: /* From ADDR. */
3207 SkRlmtEvtPortAddr(pAC, IoC, Para);
3208 break;
3209
3210 /* ----- RLMT events ----- */
3211
3212 case SK_RLMT_START: /* From DRV. */
3213 SkRlmtEvtStart(pAC, IoC, Para);
3214 break;
3215 case SK_RLMT_STOP: /* From DRV. */
3216 SkRlmtEvtStop(pAC, IoC, Para);
3217 break;
3218 case SK_RLMT_TIM: /* From RLMT via TIME. */
3219 SkRlmtEvtTim(pAC, IoC, Para);
3220 break;
3221 case SK_RLMT_SEG_TIM:
3222 SkRlmtEvtSegTim(pAC, IoC, Para);
3223 break;
3224 case SK_RLMT_PACKET_RECEIVED: /* From DRV. */
3225 SkRlmtEvtPacketRx(pAC, IoC, Para);
3226 break;
3227 case SK_RLMT_STATS_CLEAR: /* From PNMI. */
3228 SkRlmtEvtStatsClear(pAC, IoC, Para);
3229 break;
3230 case SK_RLMT_STATS_UPDATE: /* From PNMI. */
3231 SkRlmtEvtStatsUpdate(pAC, IoC, Para);
3232 break;
3233 case SK_RLMT_PREFPORT_CHANGE: /* From PNMI. */
3234 SkRlmtEvtPrefportChange(pAC, IoC, Para);
3235 break;
3236 case SK_RLMT_MODE_CHANGE: /* From PNMI. */
3237 SkRlmtEvtModeChange(pAC, IoC, Para);
3238 break;
3239 case SK_RLMT_SET_NETS: /* From DRV. */
3240 SkRlmtEvtSetNets(pAC, IoC, Para);
3241 break;
3242
3243 /* ----- Unknown events ----- */
3244
3245 default: /* Create error log entry. */
3246 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
3247 ("Unknown RLMT Event %d.\n", Event))
3248 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E003, SKERR_RLMT_E003_MSG);
3249 break;
3250 } /* switch() */
3251
3252 return (0);
3253} /* SkRlmtEvent */
3254
3255#ifdef __cplusplus
3256}
3257#endif /* __cplusplus */
diff --git a/drivers/net/sk98lin/sktimer.c b/drivers/net/sk98lin/sktimer.c
new file mode 100644
index 0000000000..4e462955ec
--- /dev/null
+++ b/drivers/net/sk98lin/sktimer.c
@@ -0,0 +1,250 @@
1/******************************************************************************
2 *
3 * Name: sktimer.c
4 * Project: Gigabit Ethernet Adapters, Event Scheduler Module
5 * Version: $Revision: 1.14 $
6 * Date: $Date: 2003/09/16 13:46:51 $
7 * Purpose: High level timer functions.
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25
26/*
27 * Event queue and dispatcher
28 */
29#if (defined(DEBUG) || ((!defined(LINT)) && (!defined(SK_SLIM))))
30static const char SysKonnectFileId[] =
31 "@(#) $Id: sktimer.c,v 1.14 2003/09/16 13:46:51 rschmidt Exp $ (C) Marvell.";
32#endif
33
34#include "h/skdrv1st.h" /* Driver Specific Definitions */
35#include "h/skdrv2nd.h" /* Adapter Control- and Driver specific Def. */
36
37#ifdef __C2MAN__
38/*
39 Event queue management.
40
41 General Description:
42
43 */
44intro()
45{}
46#endif
47
48
49/* Forward declaration */
50static void timer_done(SK_AC *pAC,SK_IOC Ioc,int Restart);
51
52
53/*
54 * Inits the software timer
55 *
56 * needs to be called during Init level 1.
57 */
58void SkTimerInit(
59SK_AC *pAC, /* Adapters context */
60SK_IOC Ioc, /* IoContext */
61int Level) /* Init Level */
62{
63 switch (Level) {
64 case SK_INIT_DATA:
65 pAC->Tim.StQueue = NULL;
66 break;
67 case SK_INIT_IO:
68 SkHwtInit(pAC, Ioc);
69 SkTimerDone(pAC, Ioc);
70 break;
71 default:
72 break;
73 }
74}
75
76/*
77 * Stops a high level timer
78 * - If a timer is not in the queue the function returns normally, too.
79 */
80void SkTimerStop(
81SK_AC *pAC, /* Adapters context */
82SK_IOC Ioc, /* IoContext */
83SK_TIMER *pTimer) /* Timer Pointer to be started */
84{
85 SK_TIMER **ppTimPrev;
86 SK_TIMER *pTm;
87
88 /*
89 * remove timer from queue
90 */
91 pTimer->TmActive = SK_FALSE;
92
93 if (pAC->Tim.StQueue == pTimer && !pTimer->TmNext) {
94 SkHwtStop(pAC, Ioc);
95 }
96
97 for (ppTimPrev = &pAC->Tim.StQueue; (pTm = *ppTimPrev);
98 ppTimPrev = &pTm->TmNext ) {
99
100 if (pTm == pTimer) {
101 /*
102 * Timer found in queue
103 * - dequeue it and
104 * - correct delta of the next timer
105 */
106 *ppTimPrev = pTm->TmNext;
107
108 if (pTm->TmNext) {
109 /* correct delta of next timer in queue */
110 pTm->TmNext->TmDelta += pTm->TmDelta;
111 }
112 return;
113 }
114 }
115}
116
117/*
118 * Start a high level software timer
119 */
120void SkTimerStart(
121SK_AC *pAC, /* Adapters context */
122SK_IOC Ioc, /* IoContext */
123SK_TIMER *pTimer, /* Timer Pointer to be started */
124SK_U32 Time, /* Time value */
125SK_U32 Class, /* Event Class for this timer */
126SK_U32 Event, /* Event Value for this timer */
127SK_EVPARA Para) /* Event Parameter for this timer */
128{
129 SK_TIMER **ppTimPrev;
130 SK_TIMER *pTm;
131 SK_U32 Delta;
132
133 Time /= 16; /* input is uS, clock ticks are 16uS */
134
135 if (!Time)
136 Time = 1;
137
138 SkTimerStop(pAC, Ioc, pTimer);
139
140 pTimer->TmClass = Class;
141 pTimer->TmEvent = Event;
142 pTimer->TmPara = Para;
143 pTimer->TmActive = SK_TRUE;
144
145 if (!pAC->Tim.StQueue) {
146 /* First Timer to be started */
147 pAC->Tim.StQueue = pTimer;
148 pTimer->TmNext = NULL;
149 pTimer->TmDelta = Time;
150
151 SkHwtStart(pAC, Ioc, Time);
152
153 return;
154 }
155
156 /*
157 * timer correction
158 */
159 timer_done(pAC, Ioc, 0);
160
161 /*
162 * find position in queue
163 */
164 Delta = 0;
165 for (ppTimPrev = &pAC->Tim.StQueue; (pTm = *ppTimPrev);
166 ppTimPrev = &pTm->TmNext ) {
167
168 if (Delta + pTm->TmDelta > Time) {
169 /* Position found */
170 /* Here the timer needs to be inserted. */
171 break;
172 }
173 Delta += pTm->TmDelta;
174 }
175
176 /* insert in queue */
177 *ppTimPrev = pTimer;
178 pTimer->TmNext = pTm;
179 pTimer->TmDelta = Time - Delta;
180
181 if (pTm) {
182 /* There is a next timer
183 * -> correct its Delta value.
184 */
185 pTm->TmDelta -= pTimer->TmDelta;
186 }
187
188 /* restart with first */
189 SkHwtStart(pAC, Ioc, pAC->Tim.StQueue->TmDelta);
190}
191
192
193void SkTimerDone(
194SK_AC *pAC, /* Adapters context */
195SK_IOC Ioc) /* IoContext */
196{
197 timer_done(pAC, Ioc, 1);
198}
199
200
201static void timer_done(
202SK_AC *pAC, /* Adapters context */
203SK_IOC Ioc, /* IoContext */
204int Restart) /* Do we need to restart the Hardware timer ? */
205{
206 SK_U32 Delta;
207 SK_TIMER *pTm;
208 SK_TIMER *pTComp; /* Timer completed now now */
209 SK_TIMER **ppLast; /* Next field of Last timer to be deq */
210 int Done = 0;
211
212 Delta = SkHwtRead(pAC, Ioc);
213
214 ppLast = &pAC->Tim.StQueue;
215 pTm = pAC->Tim.StQueue;
216 while (pTm && !Done) {
217 if (Delta >= pTm->TmDelta) {
218 /* Timer ran out */
219 pTm->TmActive = SK_FALSE;
220 Delta -= pTm->TmDelta;
221 ppLast = &pTm->TmNext;
222 pTm = pTm->TmNext;
223 }
224 else {
225 /* We found the first timer that did not run out */
226 pTm->TmDelta -= Delta;
227 Delta = 0;
228 Done = 1;
229 }
230 }
231 *ppLast = NULL;
232 /*
233 * pTm points to the first Timer that did not run out.
234 * StQueue points to the first Timer that run out.
235 */
236
237 for ( pTComp = pAC->Tim.StQueue; pTComp; pTComp = pTComp->TmNext) {
238 SkEventQueue(pAC,pTComp->TmClass, pTComp->TmEvent, pTComp->TmPara);
239 }
240
241 /* Set head of timer queue to the first timer that did not run out */
242 pAC->Tim.StQueue = pTm;
243
244 if (Restart && pAC->Tim.StQueue) {
245 /* Restart HW timer */
246 SkHwtStart(pAC, Ioc, pAC->Tim.StQueue->TmDelta);
247 }
248}
249
250/* End of file */
diff --git a/drivers/net/sk98lin/skvpd.c b/drivers/net/sk98lin/skvpd.c
new file mode 100644
index 0000000000..1e662aaebf
--- /dev/null
+++ b/drivers/net/sk98lin/skvpd.c
@@ -0,0 +1,1091 @@
1/******************************************************************************
2 *
3 * Name: skvpd.c
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.37 $
6 * Date: $Date: 2003/01/13 10:42:45 $
7 * Purpose: Shared software to read and write VPD data
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2003 SysKonnect GmbH.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * The information in this file is provided "AS IS" without warranty.
21 *
22 ******************************************************************************/
23
24/*
25 Please refer skvpd.txt for information how to include this module
26 */
27static const char SysKonnectFileId[] =
28 "@(#)$Id: skvpd.c,v 1.37 2003/01/13 10:42:45 rschmidt Exp $ (C) SK";
29
30#include "h/skdrv1st.h"
31#include "h/sktypes.h"
32#include "h/skdebug.h"
33#include "h/skdrv2nd.h"
34
35/*
36 * Static functions
37 */
38#ifndef SK_KR_PROTO
39static SK_VPD_PARA *vpd_find_para(
40 SK_AC *pAC,
41 const char *key,
42 SK_VPD_PARA *p);
43#else /* SK_KR_PROTO */
44static SK_VPD_PARA *vpd_find_para();
45#endif /* SK_KR_PROTO */
46
47/*
48 * waits for a completion of a VPD transfer
49 * The VPD transfer must complete within SK_TICKS_PER_SEC/16
50 *
51 * returns 0: success, transfer completes
52 * error exit(9) with a error message
53 */
54static int VpdWait(
55SK_AC *pAC, /* Adapters context */
56SK_IOC IoC, /* IO Context */
57int event) /* event to wait for (VPD_READ / VPD_write) completion*/
58{
59 SK_U64 start_time;
60 SK_U16 state;
61
62 SK_DBG_MSG(pAC,SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
63 ("VPD wait for %s\n", event?"Write":"Read"));
64 start_time = SkOsGetTime(pAC);
65 do {
66 if (SkOsGetTime(pAC) - start_time > SK_TICKS_PER_SEC) {
67
68 /* Bug fix AF: Thu Mar 28 2002
69 * Do not call: VPD_STOP(pAC, IoC);
70 * A pending VPD read cycle can not be aborted by writing
71 * VPD_WRITE to the PCI_VPD_ADR_REG (VPD address register).
72 * Although the write threshold in the OUR-register protects
73 * VPD read only space from being overwritten this does not
74 * protect a VPD read from being `converted` into a VPD write
75 * operation (on the fly). As a consequence the VPD_STOP would
76 * delete VPD read only data. In case of any problems with the
77 * I2C bus we exit the loop here. The I2C read operation can
78 * not be aborted except by a reset (->LR).
79 */
80 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_FATAL | SK_DBGCAT_ERR,
81 ("ERROR:VPD wait timeout\n"));
82 return(1);
83 }
84
85 VPD_IN16(pAC, IoC, PCI_VPD_ADR_REG, &state);
86
87 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
88 ("state = %x, event %x\n",state,event));
89 } while((int)(state & PCI_VPD_FLAG) == event);
90
91 return(0);
92}
93
94#ifdef SKDIAG
95
96/*
97 * Read the dword at address 'addr' from the VPD EEPROM.
98 *
99 * Needed Time: MIN 1,3 ms MAX 2,6 ms
100 *
101 * Note: The DWord is returned in the endianess of the machine the routine
102 * is running on.
103 *
104 * Returns the data read.
105 */
106SK_U32 VpdReadDWord(
107SK_AC *pAC, /* Adapters context */
108SK_IOC IoC, /* IO Context */
109int addr) /* VPD address */
110{
111 SK_U32 Rtv;
112
113 /* start VPD read */
114 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
115 ("VPD read dword at 0x%x\n",addr));
116 addr &= ~VPD_WRITE; /* ensure the R/W bit is set to read */
117
118 VPD_OUT16(pAC, IoC, PCI_VPD_ADR_REG, (SK_U16)addr);
119
120 /* ignore return code here */
121 (void)VpdWait(pAC, IoC, VPD_READ);
122
123 /* Don't swap here, it's a data stream of bytes */
124 Rtv = 0;
125
126 VPD_IN32(pAC, IoC, PCI_VPD_DAT_REG, &Rtv);
127
128 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
129 ("VPD read dword data = 0x%x\n",Rtv));
130 return(Rtv);
131}
132
133#endif /* SKDIAG */
134
135/*
136 * Read one Stream of 'len' bytes of VPD data, starting at 'addr' from
137 * or to the I2C EEPROM.
138 *
139 * Returns number of bytes read / written.
140 */
141static int VpdWriteStream(
142SK_AC *pAC, /* Adapters context */
143SK_IOC IoC, /* IO Context */
144char *buf, /* data buffer */
145int Addr, /* VPD start address */
146int Len) /* number of bytes to read / to write */
147{
148 int i;
149 int j;
150 SK_U16 AdrReg;
151 int Rtv;
152 SK_U8 * pComp; /* Compare pointer */
153 SK_U8 Data; /* Input Data for Compare */
154
155 /* Init Compare Pointer */
156 pComp = (SK_U8 *) buf;
157
158 for (i = 0; i < Len; i++, buf++) {
159 if ((i%sizeof(SK_U32)) == 0) {
160 /*
161 * At the begin of each cycle read the Data Reg
162 * So it is initialized even if only a few bytes
163 * are written.
164 */
165 AdrReg = (SK_U16) Addr;
166 AdrReg &= ~VPD_WRITE; /* READ operation */
167
168 VPD_OUT16(pAC, IoC, PCI_VPD_ADR_REG, AdrReg);
169
170 /* Wait for termination */
171 Rtv = VpdWait(pAC, IoC, VPD_READ);
172 if (Rtv != 0) {
173 return(i);
174 }
175 }
176
177 /* Write current Byte */
178 VPD_OUT8(pAC, IoC, PCI_VPD_DAT_REG + (i%sizeof(SK_U32)),
179 *(SK_U8*)buf);
180
181 if (((i%sizeof(SK_U32)) == 3) || (i == (Len - 1))) {
182 /* New Address needs to be written to VPD_ADDR reg */
183 AdrReg = (SK_U16) Addr;
184 Addr += sizeof(SK_U32);
185 AdrReg |= VPD_WRITE; /* WRITE operation */
186
187 VPD_OUT16(pAC, IoC, PCI_VPD_ADR_REG, AdrReg);
188
189 /* Wait for termination */
190 Rtv = VpdWait(pAC, IoC, VPD_WRITE);
191 if (Rtv != 0) {
192 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
193 ("Write Timed Out\n"));
194 return(i - (i%sizeof(SK_U32)));
195 }
196
197 /*
198 * Now re-read to verify
199 */
200 AdrReg &= ~VPD_WRITE; /* READ operation */
201
202 VPD_OUT16(pAC, IoC, PCI_VPD_ADR_REG, AdrReg);
203
204 /* Wait for termination */
205 Rtv = VpdWait(pAC, IoC, VPD_READ);
206 if (Rtv != 0) {
207 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
208 ("Verify Timed Out\n"));
209 return(i - (i%sizeof(SK_U32)));
210 }
211
212 for (j = 0; j <= (int)(i%sizeof(SK_U32)); j++, pComp++) {
213
214 VPD_IN8(pAC, IoC, PCI_VPD_DAT_REG + j, &Data);
215
216 if (Data != *pComp) {
217 /* Verify Error */
218 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
219 ("WriteStream Verify Error\n"));
220 return(i - (i%sizeof(SK_U32)) + j);
221 }
222 }
223 }
224 }
225
226 return(Len);
227}
228
229
230/*
231 * Read one Stream of 'len' bytes of VPD data, starting at 'addr' from
232 * or to the I2C EEPROM.
233 *
234 * Returns number of bytes read / written.
235 */
236static int VpdReadStream(
237SK_AC *pAC, /* Adapters context */
238SK_IOC IoC, /* IO Context */
239char *buf, /* data buffer */
240int Addr, /* VPD start address */
241int Len) /* number of bytes to read / to write */
242{
243 int i;
244 SK_U16 AdrReg;
245 int Rtv;
246
247 for (i = 0; i < Len; i++, buf++) {
248 if ((i%sizeof(SK_U32)) == 0) {
249 /* New Address needs to be written to VPD_ADDR reg */
250 AdrReg = (SK_U16) Addr;
251 Addr += sizeof(SK_U32);
252 AdrReg &= ~VPD_WRITE; /* READ operation */
253
254 VPD_OUT16(pAC, IoC, PCI_VPD_ADR_REG, AdrReg);
255
256 /* Wait for termination */
257 Rtv = VpdWait(pAC, IoC, VPD_READ);
258 if (Rtv != 0) {
259 return(i);
260 }
261 }
262 VPD_IN8(pAC, IoC, PCI_VPD_DAT_REG + (i%sizeof(SK_U32)),
263 (SK_U8 *)buf);
264 }
265
266 return(Len);
267}
268
269/*
270 * Read ore writes 'len' bytes of VPD data, starting at 'addr' from
271 * or to the I2C EEPROM.
272 *
273 * Returns number of bytes read / written.
274 */
275static int VpdTransferBlock(
276SK_AC *pAC, /* Adapters context */
277SK_IOC IoC, /* IO Context */
278char *buf, /* data buffer */
279int addr, /* VPD start address */
280int len, /* number of bytes to read / to write */
281int dir) /* transfer direction may be VPD_READ or VPD_WRITE */
282{
283 int Rtv; /* Return value */
284 int vpd_rom_size;
285
286 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
287 ("VPD %s block, addr = 0x%x, len = %d\n",
288 dir ? "write" : "read", addr, len));
289
290 if (len == 0)
291 return(0);
292
293 vpd_rom_size = pAC->vpd.rom_size;
294
295 if (addr > vpd_rom_size - 4) {
296 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
297 ("Address error: 0x%x, exp. < 0x%x\n",
298 addr, vpd_rom_size - 4));
299 return(0);
300 }
301
302 if (addr + len > vpd_rom_size) {
303 len = vpd_rom_size - addr;
304 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
305 ("Warning: len was cut to %d\n", len));
306 }
307
308 if (dir == VPD_READ) {
309 Rtv = VpdReadStream(pAC, IoC, buf, addr, len);
310 }
311 else {
312 Rtv = VpdWriteStream(pAC, IoC, buf, addr, len);
313 }
314
315 return(Rtv);
316}
317
318#ifdef SKDIAG
319
320/*
321 * Read 'len' bytes of VPD data, starting at 'addr'.
322 *
323 * Returns number of bytes read.
324 */
325int VpdReadBlock(
326SK_AC *pAC, /* pAC pointer */
327SK_IOC IoC, /* IO Context */
328char *buf, /* buffer were the data should be stored */
329int addr, /* start reading at the VPD address */
330int len) /* number of bytes to read */
331{
332 return(VpdTransferBlock(pAC, IoC, buf, addr, len, VPD_READ));
333}
334
335/*
336 * Write 'len' bytes of *but to the VPD EEPROM, starting at 'addr'.
337 *
338 * Returns number of bytes writes.
339 */
340int VpdWriteBlock(
341SK_AC *pAC, /* pAC pointer */
342SK_IOC IoC, /* IO Context */
343char *buf, /* buffer, holds the data to write */
344int addr, /* start writing at the VPD address */
345int len) /* number of bytes to write */
346{
347 return(VpdTransferBlock(pAC, IoC, buf, addr, len, VPD_WRITE));
348}
349#endif /* SKDIAG */
350
351/*
352 * (re)initialize the VPD buffer
353 *
354 * Reads the VPD data from the EEPROM into the VPD buffer.
355 * Get the remaining read only and read / write space.
356 *
357 * return 0: success
358 * 1: fatal VPD error
359 */
360static int VpdInit(
361SK_AC *pAC, /* Adapters context */
362SK_IOC IoC) /* IO Context */
363{
364 SK_VPD_PARA *r, rp; /* RW or RV */
365 int i;
366 unsigned char x;
367 int vpd_size;
368 SK_U16 dev_id;
369 SK_U32 our_reg2;
370
371 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_INIT, ("VpdInit .. "));
372
373 VPD_IN16(pAC, IoC, PCI_DEVICE_ID, &dev_id);
374
375 VPD_IN32(pAC, IoC, PCI_OUR_REG_2, &our_reg2);
376
377 pAC->vpd.rom_size = 256 << ((our_reg2 & PCI_VPD_ROM_SZ) >> 14);
378
379 /*
380 * this function might get used before the hardware is initialized
381 * therefore we cannot always trust in GIChipId
382 */
383 if (((pAC->vpd.v.vpd_status & VPD_VALID) == 0 &&
384 dev_id != VPD_DEV_ID_GENESIS) ||
385 ((pAC->vpd.v.vpd_status & VPD_VALID) != 0 &&
386 !pAC->GIni.GIGenesis)) {
387
388 /* for Yukon the VPD size is always 256 */
389 vpd_size = VPD_SIZE_YUKON;
390 }
391 else {
392 /* Genesis uses the maximum ROM size up to 512 for VPD */
393 if (pAC->vpd.rom_size > VPD_SIZE_GENESIS) {
394 vpd_size = VPD_SIZE_GENESIS;
395 }
396 else {
397 vpd_size = pAC->vpd.rom_size;
398 }
399 }
400
401 /* read the VPD data into the VPD buffer */
402 if (VpdTransferBlock(pAC, IoC, pAC->vpd.vpd_buf, 0, vpd_size, VPD_READ)
403 != vpd_size) {
404
405 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
406 ("Block Read Error\n"));
407 return(1);
408 }
409
410 pAC->vpd.vpd_size = vpd_size;
411
412 /* Asus K8V Se Deluxe bugfix. Correct VPD content */
413 /* MBo April 2004 */
414 if (((unsigned char)pAC->vpd.vpd_buf[0x3f] == 0x38) &&
415 ((unsigned char)pAC->vpd.vpd_buf[0x40] == 0x3c) &&
416 ((unsigned char)pAC->vpd.vpd_buf[0x41] == 0x45)) {
417 printk("sk98lin: Asus mainboard with buggy VPD? "
418 "Correcting data.\n");
419 pAC->vpd.vpd_buf[0x40] = 0x38;
420 }
421
422
423 /* find the end tag of the RO area */
424 if (!(r = vpd_find_para(pAC, VPD_RV, &rp))) {
425 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
426 ("Encoding Error: RV Tag not found\n"));
427 return(1);
428 }
429
430 if (r->p_val + r->p_len > pAC->vpd.vpd_buf + vpd_size/2) {
431 SK_DBG_MSG(pAC,SK_DBGMOD_VPD,SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
432 ("Encoding Error: Invalid VPD struct size\n"));
433 return(1);
434 }
435 pAC->vpd.v.vpd_free_ro = r->p_len - 1;
436
437 /* test the checksum */
438 for (i = 0, x = 0; (unsigned)i <= (unsigned)vpd_size/2 - r->p_len; i++) {
439 x += pAC->vpd.vpd_buf[i];
440 }
441
442 if (x != 0) {
443 /* checksum error */
444 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
445 ("VPD Checksum Error\n"));
446 return(1);
447 }
448
449 /* find and check the end tag of the RW area */
450 if (!(r = vpd_find_para(pAC, VPD_RW, &rp))) {
451 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
452 ("Encoding Error: RV Tag not found\n"));
453 return(1);
454 }
455
456 if (r->p_val < pAC->vpd.vpd_buf + vpd_size/2) {
457 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
458 ("Encoding Error: Invalid VPD struct size\n"));
459 return(1);
460 }
461 pAC->vpd.v.vpd_free_rw = r->p_len;
462
463 /* everything seems to be ok */
464 if (pAC->GIni.GIChipId != 0) {
465 pAC->vpd.v.vpd_status |= VPD_VALID;
466 }
467
468 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_INIT,
469 ("done. Free RO = %d, Free RW = %d\n",
470 pAC->vpd.v.vpd_free_ro, pAC->vpd.v.vpd_free_rw));
471
472 return(0);
473}
474
475/*
476 * find the Keyword 'key' in the VPD buffer and fills the
477 * parameter struct 'p' with it's values
478 *
479 * returns *p success
480 * 0: parameter was not found or VPD encoding error
481 */
482static SK_VPD_PARA *vpd_find_para(
483SK_AC *pAC, /* common data base */
484const char *key, /* keyword to find (e.g. "MN") */
485SK_VPD_PARA *p) /* parameter description struct */
486{
487 char *v ; /* points to VPD buffer */
488 int max; /* Maximum Number of Iterations */
489
490 v = pAC->vpd.vpd_buf;
491 max = 128;
492
493 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
494 ("VPD find para %s .. ",key));
495
496 /* check mandatory resource type ID string (Product Name) */
497 if (*v != (char)RES_ID) {
498 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
499 ("Error: 0x%x missing\n", RES_ID));
500 return NULL;
501 }
502
503 if (strcmp(key, VPD_NAME) == 0) {
504 p->p_len = VPD_GET_RES_LEN(v);
505 p->p_val = VPD_GET_VAL(v);
506 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
507 ("found, len = %d\n", p->p_len));
508 return(p);
509 }
510
511 v += 3 + VPD_GET_RES_LEN(v) + 3;
512 for (;; ) {
513 if (SK_MEMCMP(key,v,2) == 0) {
514 p->p_len = VPD_GET_VPD_LEN(v);
515 p->p_val = VPD_GET_VAL(v);
516 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
517 ("found, len = %d\n",p->p_len));
518 return(p);
519 }
520
521 /* exit when reaching the "RW" Tag or the maximum of itera. */
522 max--;
523 if (SK_MEMCMP(VPD_RW,v,2) == 0 || max == 0) {
524 break;
525 }
526
527 if (SK_MEMCMP(VPD_RV,v,2) == 0) {
528 v += 3 + VPD_GET_VPD_LEN(v) + 3; /* skip VPD-W */
529 }
530 else {
531 v += 3 + VPD_GET_VPD_LEN(v);
532 }
533 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
534 ("scanning '%c%c' len = %d\n",v[0],v[1],v[2]));
535 }
536
537#ifdef DEBUG
538 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL, ("not found\n"));
539 if (max == 0) {
540 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
541 ("Key/Len Encoding error\n"));
542 }
543#endif /* DEBUG */
544 return NULL;
545}
546
547/*
548 * Move 'n' bytes. Begin with the last byte if 'n' is > 0,
549 * Start with the last byte if n is < 0.
550 *
551 * returns nothing
552 */
553static void vpd_move_para(
554char *start, /* start of memory block */
555char *end, /* end of memory block to move */
556int n) /* number of bytes the memory block has to be moved */
557{
558 char *p;
559 int i; /* number of byte copied */
560
561 if (n == 0)
562 return;
563
564 i = (int) (end - start + 1);
565 if (n < 0) {
566 p = start + n;
567 while (i != 0) {
568 *p++ = *start++;
569 i--;
570 }
571 }
572 else {
573 p = end + n;
574 while (i != 0) {
575 *p-- = *end--;
576 i--;
577 }
578 }
579}
580
581/*
582 * setup the VPD keyword 'key' at 'ip'.
583 *
584 * returns nothing
585 */
586static void vpd_insert_key(
587const char *key, /* keyword to insert */
588const char *buf, /* buffer with the keyword value */
589int len, /* length of the value string */
590char *ip) /* inseration point */
591{
592 SK_VPD_KEY *p;
593
594 p = (SK_VPD_KEY *) ip;
595 p->p_key[0] = key[0];
596 p->p_key[1] = key[1];
597 p->p_len = (unsigned char) len;
598 SK_MEMCPY(&p->p_val,buf,len);
599}
600
601/*
602 * Setup the VPD end tag "RV" / "RW".
603 * Also correct the remaining space variables vpd_free_ro / vpd_free_rw.
604 *
605 * returns 0: success
606 * 1: encoding error
607 */
608static int vpd_mod_endtag(
609SK_AC *pAC, /* common data base */
610char *etp) /* end pointer input position */
611{
612 SK_VPD_KEY *p;
613 unsigned char x;
614 int i;
615 int vpd_size;
616
617 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
618 ("VPD modify endtag at 0x%x = '%c%c'\n",etp,etp[0],etp[1]));
619
620 vpd_size = pAC->vpd.vpd_size;
621
622 p = (SK_VPD_KEY *) etp;
623
624 if (p->p_key[0] != 'R' || (p->p_key[1] != 'V' && p->p_key[1] != 'W')) {
625 /* something wrong here, encoding error */
626 SK_DBG_MSG(pAC,SK_DBGMOD_VPD,SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
627 ("Encoding Error: invalid end tag\n"));
628 return(1);
629 }
630 if (etp > pAC->vpd.vpd_buf + vpd_size/2) {
631 /* create "RW" tag */
632 p->p_len = (unsigned char)(pAC->vpd.vpd_buf+vpd_size-etp-3-1);
633 pAC->vpd.v.vpd_free_rw = (int) p->p_len;
634 i = pAC->vpd.v.vpd_free_rw;
635 etp += 3;
636 }
637 else {
638 /* create "RV" tag */
639 p->p_len = (unsigned char)(pAC->vpd.vpd_buf+vpd_size/2-etp-3);
640 pAC->vpd.v.vpd_free_ro = (int) p->p_len - 1;
641
642 /* setup checksum */
643 for (i = 0, x = 0; i < vpd_size/2 - p->p_len; i++) {
644 x += pAC->vpd.vpd_buf[i];
645 }
646 p->p_val = (char) 0 - x;
647 i = pAC->vpd.v.vpd_free_ro;
648 etp += 4;
649 }
650 while (i) {
651 *etp++ = 0x00;
652 i--;
653 }
654
655 return(0);
656}
657
658/*
659 * Insert a VPD keyword into the VPD buffer.
660 *
661 * The keyword 'key' is inserted at the position 'ip' in the
662 * VPD buffer.
663 * The keywords behind the input position will
664 * be moved. The VPD end tag "RV" or "RW" is generated again.
665 *
666 * returns 0: success
667 * 2: value string was cut
668 * 4: VPD full, keyword was not written
669 * 6: fatal VPD error
670 *
671 */
672static int VpdSetupPara(
673SK_AC *pAC, /* common data base */
674const char *key, /* keyword to insert */
675const char *buf, /* buffer with the keyword value */
676int len, /* length of the keyword value */
677int type, /* VPD_RO_KEY or VPD_RW_KEY */
678int op) /* operation to do: ADD_KEY or OWR_KEY */
679{
680 SK_VPD_PARA vp;
681 char *etp; /* end tag position */
682 int free; /* remaining space in selected area */
683 char *ip; /* input position inside the VPD buffer */
684 int rtv; /* return code */
685 int head; /* additional haeder bytes to move */
686 int found; /* additinoal bytes if the keyword was found */
687 int vpd_size;
688
689 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
690 ("VPD setup para key = %s, val = %s\n",key,buf));
691
692 vpd_size = pAC->vpd.vpd_size;
693
694 rtv = 0;
695 ip = NULL;
696 if (type == VPD_RW_KEY) {
697 /* end tag is "RW" */
698 free = pAC->vpd.v.vpd_free_rw;
699 etp = pAC->vpd.vpd_buf + (vpd_size - free - 1 - 3);
700 }
701 else {
702 /* end tag is "RV" */
703 free = pAC->vpd.v.vpd_free_ro;
704 etp = pAC->vpd.vpd_buf + (vpd_size/2 - free - 4);
705 }
706 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
707 ("Free RO = %d, Free RW = %d\n",
708 pAC->vpd.v.vpd_free_ro, pAC->vpd.v.vpd_free_rw));
709
710 head = 0;
711 found = 0;
712 if (op == OWR_KEY) {
713 if (vpd_find_para(pAC, key, &vp)) {
714 found = 3;
715 ip = vp.p_val - 3;
716 free += vp.p_len + 3;
717 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
718 ("Overwrite Key\n"));
719 }
720 else {
721 op = ADD_KEY;
722 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
723 ("Add Key\n"));
724 }
725 }
726 if (op == ADD_KEY) {
727 ip = etp;
728 vp.p_len = 0;
729 head = 3;
730 }
731
732 if (len + 3 > free) {
733 if (free < 7) {
734 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
735 ("VPD Buffer Overflow, keyword not written\n"));
736 return(4);
737 }
738 /* cut it again */
739 len = free - 3;
740 rtv = 2;
741 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
742 ("VPD Buffer Full, Keyword was cut\n"));
743 }
744
745 vpd_move_para(ip + vp.p_len + found, etp+2, len-vp.p_len+head);
746 vpd_insert_key(key, buf, len, ip);
747 if (vpd_mod_endtag(pAC, etp + len - vp.p_len + head)) {
748 pAC->vpd.v.vpd_status &= ~VPD_VALID;
749 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
750 ("VPD Encoding Error\n"));
751 return(6);
752 }
753
754 return(rtv);
755}
756
757
758/*
759 * Read the contents of the VPD EEPROM and copy it to the
760 * VPD buffer if not already done.
761 *
762 * return: A pointer to the vpd_status structure. The structure contains
763 * this fields.
764 */
765SK_VPD_STATUS *VpdStat(
766SK_AC *pAC, /* Adapters context */
767SK_IOC IoC) /* IO Context */
768{
769 if ((pAC->vpd.v.vpd_status & VPD_VALID) == 0) {
770 (void)VpdInit(pAC, IoC);
771 }
772 return(&pAC->vpd.v);
773}
774
775
776/*
777 * Read the contents of the VPD EEPROM and copy it to the VPD
778 * buffer if not already done.
779 * Scan the VPD buffer for VPD keywords and create the VPD
780 * keyword list by copying the keywords to 'buf', all after
781 * each other and terminated with a '\0'.
782 *
783 * Exceptions: o The Resource Type ID String (product name) is called "Name"
784 * o The VPD end tags 'RV' and 'RW' are not listed
785 *
786 * The number of copied keywords is counted in 'elements'.
787 *
788 * returns 0: success
789 * 2: buffer overfull, one or more keywords are missing
790 * 6: fatal VPD error
791 *
792 * example values after returning:
793 *
794 * buf = "Name\0PN\0EC\0MN\0SN\0CP\0VF\0VL\0YA\0"
795 * *len = 30
796 * *elements = 9
797 */
798int VpdKeys(
799SK_AC *pAC, /* common data base */
800SK_IOC IoC, /* IO Context */
801char *buf, /* buffer where to copy the keywords */
802int *len, /* buffer length */
803int *elements) /* number of keywords returned */
804{
805 char *v;
806 int n;
807
808 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_RX, ("list VPD keys .. "));
809 *elements = 0;
810 if ((pAC->vpd.v.vpd_status & VPD_VALID) == 0) {
811 if (VpdInit(pAC, IoC) != 0) {
812 *len = 0;
813 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
814 ("VPD Init Error, terminated\n"));
815 return(6);
816 }
817 }
818
819 if ((signed)strlen(VPD_NAME) + 1 <= *len) {
820 v = pAC->vpd.vpd_buf;
821 strcpy(buf,VPD_NAME);
822 n = strlen(VPD_NAME) + 1;
823 buf += n;
824 *elements = 1;
825 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_RX,
826 ("'%c%c' ",v[0],v[1]));
827 }
828 else {
829 *len = 0;
830 SK_DBG_MSG(pAC,SK_DBGMOD_VPD,SK_DBGCAT_ERR,
831 ("buffer overflow\n"));
832 return(2);
833 }
834
835 v += 3 + VPD_GET_RES_LEN(v) + 3;
836 for (;; ) {
837 /* exit when reaching the "RW" Tag */
838 if (SK_MEMCMP(VPD_RW,v,2) == 0) {
839 break;
840 }
841
842 if (SK_MEMCMP(VPD_RV,v,2) == 0) {
843 v += 3 + VPD_GET_VPD_LEN(v) + 3; /* skip VPD-W */
844 continue;
845 }
846
847 if (n+3 <= *len) {
848 SK_MEMCPY(buf,v,2);
849 buf += 2;
850 *buf++ = '\0';
851 n += 3;
852 v += 3 + VPD_GET_VPD_LEN(v);
853 *elements += 1;
854 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_RX,
855 ("'%c%c' ",v[0],v[1]));
856 }
857 else {
858 *len = n;
859 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
860 ("buffer overflow\n"));
861 return(2);
862 }
863 }
864
865 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_RX, ("\n"));
866 *len = n;
867 return(0);
868}
869
870
871/*
872 * Read the contents of the VPD EEPROM and copy it to the
873 * VPD buffer if not already done. Search for the VPD keyword
874 * 'key' and copy its value to 'buf'. Add a terminating '\0'.
875 * If the value does not fit into the buffer cut it after
876 * 'len' - 1 bytes.
877 *
878 * returns 0: success
879 * 1: keyword not found
880 * 2: value string was cut
881 * 3: VPD transfer timeout
882 * 6: fatal VPD error
883 */
884int VpdRead(
885SK_AC *pAC, /* common data base */
886SK_IOC IoC, /* IO Context */
887const char *key, /* keyword to read (e.g. "MN") */
888char *buf, /* buffer where to copy the keyword value */
889int *len) /* buffer length */
890{
891 SK_VPD_PARA *p, vp;
892
893 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_RX, ("VPD read %s .. ", key));
894 if ((pAC->vpd.v.vpd_status & VPD_VALID) == 0) {
895 if (VpdInit(pAC, IoC) != 0) {
896 *len = 0;
897 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
898 ("VPD init error\n"));
899 return(6);
900 }
901 }
902
903 if ((p = vpd_find_para(pAC, key, &vp)) != NULL) {
904 if (p->p_len > (*(unsigned *)len)-1) {
905 p->p_len = *len - 1;
906 }
907 SK_MEMCPY(buf, p->p_val, p->p_len);
908 buf[p->p_len] = '\0';
909 *len = p->p_len;
910 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_RX,
911 ("%c%c%c%c.., len = %d\n",
912 buf[0],buf[1],buf[2],buf[3],*len));
913 }
914 else {
915 *len = 0;
916 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR, ("not found\n"));
917 return(1);
918 }
919 return(0);
920}
921
922
923/*
924 * Check whether a given key may be written
925 *
926 * returns
927 * SK_TRUE Yes it may be written
928 * SK_FALSE No it may be written
929 */
930SK_BOOL VpdMayWrite(
931char *key) /* keyword to write (allowed values "Yx", "Vx") */
932{
933 if ((*key != 'Y' && *key != 'V') ||
934 key[1] < '0' || key[1] > 'Z' ||
935 (key[1] > '9' && key[1] < 'A') || strlen(key) != 2) {
936
937 return(SK_FALSE);
938 }
939 return(SK_TRUE);
940}
941
942/*
943 * Read the contents of the VPD EEPROM and copy it to the VPD
944 * buffer if not already done. Insert/overwrite the keyword 'key'
945 * in the VPD buffer. Cut the keyword value if it does not fit
946 * into the VPD read / write area.
947 *
948 * returns 0: success
949 * 2: value string was cut
950 * 3: VPD transfer timeout
951 * 4: VPD full, keyword was not written
952 * 5: keyword cannot be written
953 * 6: fatal VPD error
954 */
955int VpdWrite(
956SK_AC *pAC, /* common data base */
957SK_IOC IoC, /* IO Context */
958const char *key, /* keyword to write (allowed values "Yx", "Vx") */
959const char *buf) /* buffer where the keyword value can be read from */
960{
961 int len; /* length of the keyword to write */
962 int rtv; /* return code */
963 int rtv2;
964
965 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_TX,
966 ("VPD write %s = %s\n",key,buf));
967
968 if ((*key != 'Y' && *key != 'V') ||
969 key[1] < '0' || key[1] > 'Z' ||
970 (key[1] > '9' && key[1] < 'A') || strlen(key) != 2) {
971
972 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
973 ("illegal key tag, keyword not written\n"));
974 return(5);
975 }
976
977 if ((pAC->vpd.v.vpd_status & VPD_VALID) == 0) {
978 if (VpdInit(pAC, IoC) != 0) {
979 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
980 ("VPD init error\n"));
981 return(6);
982 }
983 }
984
985 rtv = 0;
986 len = strlen(buf);
987 if (len > VPD_MAX_LEN) {
988 /* cut it */
989 len = VPD_MAX_LEN;
990 rtv = 2;
991 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
992 ("keyword too long, cut after %d bytes\n",VPD_MAX_LEN));
993 }
994 if ((rtv2 = VpdSetupPara(pAC, key, buf, len, VPD_RW_KEY, OWR_KEY)) != 0) {
995 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
996 ("VPD write error\n"));
997 return(rtv2);
998 }
999
1000 return(rtv);
1001}
1002
1003/*
1004 * Read the contents of the VPD EEPROM and copy it to the
1005 * VPD buffer if not already done. Remove the VPD keyword
1006 * 'key' from the VPD buffer.
1007 * Only the keywords in the read/write area can be deleted.
1008 * Keywords in the read only area cannot be deleted.
1009 *
1010 * returns 0: success, keyword was removed
1011 * 1: keyword not found
1012 * 5: keyword cannot be deleted
1013 * 6: fatal VPD error
1014 */
1015int VpdDelete(
1016SK_AC *pAC, /* common data base */
1017SK_IOC IoC, /* IO Context */
1018char *key) /* keyword to read (e.g. "MN") */
1019{
1020 SK_VPD_PARA *p, vp;
1021 char *etp;
1022 int vpd_size;
1023
1024 vpd_size = pAC->vpd.vpd_size;
1025
1026 SK_DBG_MSG(pAC,SK_DBGMOD_VPD,SK_DBGCAT_TX,("VPD delete key %s\n",key));
1027 if ((pAC->vpd.v.vpd_status & VPD_VALID) == 0) {
1028 if (VpdInit(pAC, IoC) != 0) {
1029 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
1030 ("VPD init error\n"));
1031 return(6);
1032 }
1033 }
1034
1035 if ((p = vpd_find_para(pAC, key, &vp)) != NULL) {
1036 if (p->p_val < pAC->vpd.vpd_buf + vpd_size/2) {
1037 /* try to delete read only keyword */
1038 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
1039 ("cannot delete RO keyword\n"));
1040 return(5);
1041 }
1042
1043 etp = pAC->vpd.vpd_buf + (vpd_size-pAC->vpd.v.vpd_free_rw-1-3);
1044
1045 vpd_move_para(vp.p_val+vp.p_len, etp+2,
1046 - ((int)(vp.p_len + 3)));
1047 if (vpd_mod_endtag(pAC, etp - vp.p_len - 3)) {
1048 pAC->vpd.v.vpd_status &= ~VPD_VALID;
1049 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
1050 ("VPD encoding error\n"));
1051 return(6);
1052 }
1053 }
1054 else {
1055 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
1056 ("keyword not found\n"));
1057 return(1);
1058 }
1059
1060 return(0);
1061}
1062
1063/*
1064 * If the VPD buffer contains valid data write the VPD
1065 * read/write area back to the VPD EEPROM.
1066 *
1067 * returns 0: success
1068 * 3: VPD transfer timeout
1069 */
1070int VpdUpdate(
1071SK_AC *pAC, /* Adapters context */
1072SK_IOC IoC) /* IO Context */
1073{
1074 int vpd_size;
1075
1076 vpd_size = pAC->vpd.vpd_size;
1077
1078 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_TX, ("VPD update .. "));
1079 if ((pAC->vpd.v.vpd_status & VPD_VALID) != 0) {
1080 if (VpdTransferBlock(pAC, IoC, pAC->vpd.vpd_buf + vpd_size/2,
1081 vpd_size/2, vpd_size/2, VPD_WRITE) != vpd_size/2) {
1082
1083 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
1084 ("transfer timed out\n"));
1085 return(3);
1086 }
1087 }
1088 SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_TX, ("done\n"));
1089 return(0);
1090}
1091
diff --git a/drivers/net/sk98lin/skxmac2.c b/drivers/net/sk98lin/skxmac2.c
new file mode 100644
index 0000000000..b4e75022a6
--- /dev/null
+++ b/drivers/net/sk98lin/skxmac2.c
@@ -0,0 +1,4160 @@
1/******************************************************************************
2 *
3 * Name: skxmac2.c
4 * Project: Gigabit Ethernet Adapters, Common Modules
5 * Version: $Revision: 1.102 $
6 * Date: $Date: 2003/10/02 16:53:58 $
7 * Purpose: Contains functions to initialize the MACs and PHYs
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * The information in this file is provided "AS IS" without warranty.
22 *
23 ******************************************************************************/
24
25#include "h/skdrv1st.h"
26#include "h/skdrv2nd.h"
27
28/* typedefs *******************************************************************/
29
30/* BCOM PHY magic pattern list */
31typedef struct s_PhyHack {
32 int PhyReg; /* Phy register */
33 SK_U16 PhyVal; /* Value to write */
34} BCOM_HACK;
35
36/* local variables ************************************************************/
37
38#if (defined(DEBUG) || ((!defined(LINT)) && (!defined(SK_SLIM))))
39static const char SysKonnectFileId[] =
40 "@(#) $Id: skxmac2.c,v 1.102 2003/10/02 16:53:58 rschmidt Exp $ (C) Marvell.";
41#endif
42
43#ifdef GENESIS
44static BCOM_HACK BcomRegA1Hack[] = {
45 { 0x18, 0x0c20 }, { 0x17, 0x0012 }, { 0x15, 0x1104 }, { 0x17, 0x0013 },
46 { 0x15, 0x0404 }, { 0x17, 0x8006 }, { 0x15, 0x0132 }, { 0x17, 0x8006 },
47 { 0x15, 0x0232 }, { 0x17, 0x800D }, { 0x15, 0x000F }, { 0x18, 0x0420 },
48 { 0, 0 }
49};
50static BCOM_HACK BcomRegC0Hack[] = {
51 { 0x18, 0x0c20 }, { 0x17, 0x0012 }, { 0x15, 0x1204 }, { 0x17, 0x0013 },
52 { 0x15, 0x0A04 }, { 0x18, 0x0420 },
53 { 0, 0 }
54};
55#endif
56
57/* function prototypes ********************************************************/
58#ifdef GENESIS
59static void SkXmInitPhyXmac(SK_AC*, SK_IOC, int, SK_BOOL);
60static void SkXmInitPhyBcom(SK_AC*, SK_IOC, int, SK_BOOL);
61static int SkXmAutoNegDoneXmac(SK_AC*, SK_IOC, int);
62static int SkXmAutoNegDoneBcom(SK_AC*, SK_IOC, int);
63#endif /* GENESIS */
64#ifdef YUKON
65static void SkGmInitPhyMarv(SK_AC*, SK_IOC, int, SK_BOOL);
66static int SkGmAutoNegDoneMarv(SK_AC*, SK_IOC, int);
67#endif /* YUKON */
68#ifdef OTHER_PHY
69static void SkXmInitPhyLone(SK_AC*, SK_IOC, int, SK_BOOL);
70static void SkXmInitPhyNat (SK_AC*, SK_IOC, int, SK_BOOL);
71static int SkXmAutoNegDoneLone(SK_AC*, SK_IOC, int);
72static int SkXmAutoNegDoneNat (SK_AC*, SK_IOC, int);
73#endif /* OTHER_PHY */
74
75
76#ifdef GENESIS
77/******************************************************************************
78 *
79 * SkXmPhyRead() - Read from XMAC PHY register
80 *
81 * Description: reads a 16-bit word from XMAC PHY or ext. PHY
82 *
83 * Returns:
84 * nothing
85 */
86void SkXmPhyRead(
87SK_AC *pAC, /* Adapter Context */
88SK_IOC IoC, /* I/O Context */
89int Port, /* Port Index (MAC_1 + n) */
90int PhyReg, /* Register Address (Offset) */
91SK_U16 SK_FAR *pVal) /* Pointer to Value */
92{
93 SK_U16 Mmu;
94 SK_GEPORT *pPrt;
95
96 pPrt = &pAC->GIni.GP[Port];
97
98 /* write the PHY register's address */
99 XM_OUT16(IoC, Port, XM_PHY_ADDR, PhyReg | pPrt->PhyAddr);
100
101 /* get the PHY register's value */
102 XM_IN16(IoC, Port, XM_PHY_DATA, pVal);
103
104 if (pPrt->PhyType != SK_PHY_XMAC) {
105 do {
106 XM_IN16(IoC, Port, XM_MMU_CMD, &Mmu);
107 /* wait until 'Ready' is set */
108 } while ((Mmu & XM_MMU_PHY_RDY) == 0);
109
110 /* get the PHY register's value */
111 XM_IN16(IoC, Port, XM_PHY_DATA, pVal);
112 }
113} /* SkXmPhyRead */
114
115
116/******************************************************************************
117 *
118 * SkXmPhyWrite() - Write to XMAC PHY register
119 *
120 * Description: writes a 16-bit word to XMAC PHY or ext. PHY
121 *
122 * Returns:
123 * nothing
124 */
125void SkXmPhyWrite(
126SK_AC *pAC, /* Adapter Context */
127SK_IOC IoC, /* I/O Context */
128int Port, /* Port Index (MAC_1 + n) */
129int PhyReg, /* Register Address (Offset) */
130SK_U16 Val) /* Value */
131{
132 SK_U16 Mmu;
133 SK_GEPORT *pPrt;
134
135 pPrt = &pAC->GIni.GP[Port];
136
137 if (pPrt->PhyType != SK_PHY_XMAC) {
138 do {
139 XM_IN16(IoC, Port, XM_MMU_CMD, &Mmu);
140 /* wait until 'Busy' is cleared */
141 } while ((Mmu & XM_MMU_PHY_BUSY) != 0);
142 }
143
144 /* write the PHY register's address */
145 XM_OUT16(IoC, Port, XM_PHY_ADDR, PhyReg | pPrt->PhyAddr);
146
147 /* write the PHY register's value */
148 XM_OUT16(IoC, Port, XM_PHY_DATA, Val);
149
150 if (pPrt->PhyType != SK_PHY_XMAC) {
151 do {
152 XM_IN16(IoC, Port, XM_MMU_CMD, &Mmu);
153 /* wait until 'Busy' is cleared */
154 } while ((Mmu & XM_MMU_PHY_BUSY) != 0);
155 }
156} /* SkXmPhyWrite */
157#endif /* GENESIS */
158
159
160#ifdef YUKON
161/******************************************************************************
162 *
163 * SkGmPhyRead() - Read from GPHY register
164 *
165 * Description: reads a 16-bit word from GPHY through MDIO
166 *
167 * Returns:
168 * nothing
169 */
170void SkGmPhyRead(
171SK_AC *pAC, /* Adapter Context */
172SK_IOC IoC, /* I/O Context */
173int Port, /* Port Index (MAC_1 + n) */
174int PhyReg, /* Register Address (Offset) */
175SK_U16 SK_FAR *pVal) /* Pointer to Value */
176{
177 SK_U16 Ctrl;
178 SK_GEPORT *pPrt;
179#ifdef VCPU
180 u_long SimCyle;
181 u_long SimLowTime;
182
183 VCPUgetTime(&SimCyle, &SimLowTime);
184 VCPUprintf(0, "SkGmPhyRead(%u), SimCyle=%u, SimLowTime=%u\n",
185 PhyReg, SimCyle, SimLowTime);
186#endif /* VCPU */
187
188 pPrt = &pAC->GIni.GP[Port];
189
190 /* set PHY-Register offset and 'Read' OpCode (= 1) */
191 *pVal = (SK_U16)(GM_SMI_CT_PHY_AD(pPrt->PhyAddr) |
192 GM_SMI_CT_REG_AD(PhyReg) | GM_SMI_CT_OP_RD);
193
194 GM_OUT16(IoC, Port, GM_SMI_CTRL, *pVal);
195
196 GM_IN16(IoC, Port, GM_SMI_CTRL, &Ctrl);
197
198 /* additional check for MDC/MDIO activity */
199 if ((Ctrl & GM_SMI_CT_BUSY) == 0) {
200 *pVal = 0;
201 return;
202 }
203
204 *pVal |= GM_SMI_CT_BUSY;
205
206 do {
207#ifdef VCPU
208 VCPUwaitTime(1000);
209#endif /* VCPU */
210
211 GM_IN16(IoC, Port, GM_SMI_CTRL, &Ctrl);
212
213 /* wait until 'ReadValid' is set */
214 } while (Ctrl == *pVal);
215
216 /* get the PHY register's value */
217 GM_IN16(IoC, Port, GM_SMI_DATA, pVal);
218
219#ifdef VCPU
220 VCPUgetTime(&SimCyle, &SimLowTime);
221 VCPUprintf(0, "VCPUgetTime(), SimCyle=%u, SimLowTime=%u\n",
222 SimCyle, SimLowTime);
223#endif /* VCPU */
224
225} /* SkGmPhyRead */
226
227
228/******************************************************************************
229 *
230 * SkGmPhyWrite() - Write to GPHY register
231 *
232 * Description: writes a 16-bit word to GPHY through MDIO
233 *
234 * Returns:
235 * nothing
236 */
237void SkGmPhyWrite(
238SK_AC *pAC, /* Adapter Context */
239SK_IOC IoC, /* I/O Context */
240int Port, /* Port Index (MAC_1 + n) */
241int PhyReg, /* Register Address (Offset) */
242SK_U16 Val) /* Value */
243{
244 SK_U16 Ctrl;
245 SK_GEPORT *pPrt;
246#ifdef VCPU
247 SK_U32 DWord;
248 u_long SimCyle;
249 u_long SimLowTime;
250
251 VCPUgetTime(&SimCyle, &SimLowTime);
252 VCPUprintf(0, "SkGmPhyWrite(Reg=%u, Val=0x%04x), SimCyle=%u, SimLowTime=%u\n",
253 PhyReg, Val, SimCyle, SimLowTime);
254#endif /* VCPU */
255
256 pPrt = &pAC->GIni.GP[Port];
257
258 /* write the PHY register's value */
259 GM_OUT16(IoC, Port, GM_SMI_DATA, Val);
260
261 /* set PHY-Register offset and 'Write' OpCode (= 0) */
262 Val = GM_SMI_CT_PHY_AD(pPrt->PhyAddr) | GM_SMI_CT_REG_AD(PhyReg);
263
264 GM_OUT16(IoC, Port, GM_SMI_CTRL, Val);
265
266 GM_IN16(IoC, Port, GM_SMI_CTRL, &Ctrl);
267
268 /* additional check for MDC/MDIO activity */
269 if ((Ctrl & GM_SMI_CT_BUSY) == 0) {
270 return;
271 }
272
273 Val |= GM_SMI_CT_BUSY;
274
275 do {
276#ifdef VCPU
277 /* read Timer value */
278 SK_IN32(IoC, B2_TI_VAL, &DWord);
279
280 VCPUwaitTime(1000);
281#endif /* VCPU */
282
283 GM_IN16(IoC, Port, GM_SMI_CTRL, &Ctrl);
284
285 /* wait until 'Busy' is cleared */
286 } while (Ctrl == Val);
287
288#ifdef VCPU
289 VCPUgetTime(&SimCyle, &SimLowTime);
290 VCPUprintf(0, "VCPUgetTime(), SimCyle=%u, SimLowTime=%u\n",
291 SimCyle, SimLowTime);
292#endif /* VCPU */
293
294} /* SkGmPhyWrite */
295#endif /* YUKON */
296
297
298#ifdef SK_DIAG
299/******************************************************************************
300 *
301 * SkGePhyRead() - Read from PHY register
302 *
303 * Description: calls a read PHY routine dep. on board type
304 *
305 * Returns:
306 * nothing
307 */
308void SkGePhyRead(
309SK_AC *pAC, /* Adapter Context */
310SK_IOC IoC, /* I/O Context */
311int Port, /* Port Index (MAC_1 + n) */
312int PhyReg, /* Register Address (Offset) */
313SK_U16 *pVal) /* Pointer to Value */
314{
315 void (*r_func)(SK_AC *pAC, SK_IOC IoC, int Port, int Reg, SK_U16 *pVal);
316
317 if (pAC->GIni.GIGenesis) {
318 r_func = SkXmPhyRead;
319 }
320 else {
321 r_func = SkGmPhyRead;
322 }
323
324 r_func(pAC, IoC, Port, PhyReg, pVal);
325} /* SkGePhyRead */
326
327
328/******************************************************************************
329 *
330 * SkGePhyWrite() - Write to PHY register
331 *
332 * Description: calls a write PHY routine dep. on board type
333 *
334 * Returns:
335 * nothing
336 */
337void SkGePhyWrite(
338SK_AC *pAC, /* Adapter Context */
339SK_IOC IoC, /* I/O Context */
340int Port, /* Port Index (MAC_1 + n) */
341int PhyReg, /* Register Address (Offset) */
342SK_U16 Val) /* Value */
343{
344 void (*w_func)(SK_AC *pAC, SK_IOC IoC, int Port, int Reg, SK_U16 Val);
345
346 if (pAC->GIni.GIGenesis) {
347 w_func = SkXmPhyWrite;
348 }
349 else {
350 w_func = SkGmPhyWrite;
351 }
352
353 w_func(pAC, IoC, Port, PhyReg, Val);
354} /* SkGePhyWrite */
355#endif /* SK_DIAG */
356
357
358/******************************************************************************
359 *
360 * SkMacPromiscMode() - Enable / Disable Promiscuous Mode
361 *
362 * Description:
363 * enables / disables promiscuous mode by setting Mode Register (XMAC) or
364 * Receive Control Register (GMAC) dep. on board type
365 *
366 * Returns:
367 * nothing
368 */
369void SkMacPromiscMode(
370SK_AC *pAC, /* adapter context */
371SK_IOC IoC, /* IO context */
372int Port, /* Port Index (MAC_1 + n) */
373SK_BOOL Enable) /* Enable / Disable */
374{
375#ifdef YUKON
376 SK_U16 RcReg;
377#endif
378#ifdef GENESIS
379 SK_U32 MdReg;
380#endif
381
382#ifdef GENESIS
383 if (pAC->GIni.GIGenesis) {
384
385 XM_IN32(IoC, Port, XM_MODE, &MdReg);
386 /* enable or disable promiscuous mode */
387 if (Enable) {
388 MdReg |= XM_MD_ENA_PROM;
389 }
390 else {
391 MdReg &= ~XM_MD_ENA_PROM;
392 }
393 /* setup Mode Register */
394 XM_OUT32(IoC, Port, XM_MODE, MdReg);
395 }
396#endif /* GENESIS */
397
398#ifdef YUKON
399 if (pAC->GIni.GIYukon) {
400
401 GM_IN16(IoC, Port, GM_RX_CTRL, &RcReg);
402
403 /* enable or disable unicast and multicast filtering */
404 if (Enable) {
405 RcReg &= ~(GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA);
406 }
407 else {
408 RcReg |= (GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA);
409 }
410 /* setup Receive Control Register */
411 GM_OUT16(IoC, Port, GM_RX_CTRL, RcReg);
412 }
413#endif /* YUKON */
414
415} /* SkMacPromiscMode*/
416
417
418/******************************************************************************
419 *
420 * SkMacHashing() - Enable / Disable Hashing
421 *
422 * Description:
423 * enables / disables hashing by setting Mode Register (XMAC) or
424 * Receive Control Register (GMAC) dep. on board type
425 *
426 * Returns:
427 * nothing
428 */
429void SkMacHashing(
430SK_AC *pAC, /* adapter context */
431SK_IOC IoC, /* IO context */
432int Port, /* Port Index (MAC_1 + n) */
433SK_BOOL Enable) /* Enable / Disable */
434{
435#ifdef YUKON
436 SK_U16 RcReg;
437#endif
438#ifdef GENESIS
439 SK_U32 MdReg;
440#endif
441
442#ifdef GENESIS
443 if (pAC->GIni.GIGenesis) {
444
445 XM_IN32(IoC, Port, XM_MODE, &MdReg);
446 /* enable or disable hashing */
447 if (Enable) {
448 MdReg |= XM_MD_ENA_HASH;
449 }
450 else {
451 MdReg &= ~XM_MD_ENA_HASH;
452 }
453 /* setup Mode Register */
454 XM_OUT32(IoC, Port, XM_MODE, MdReg);
455 }
456#endif /* GENESIS */
457
458#ifdef YUKON
459 if (pAC->GIni.GIYukon) {
460
461 GM_IN16(IoC, Port, GM_RX_CTRL, &RcReg);
462
463 /* enable or disable multicast filtering */
464 if (Enable) {
465 RcReg |= GM_RXCR_MCF_ENA;
466 }
467 else {
468 RcReg &= ~GM_RXCR_MCF_ENA;
469 }
470 /* setup Receive Control Register */
471 GM_OUT16(IoC, Port, GM_RX_CTRL, RcReg);
472 }
473#endif /* YUKON */
474
475} /* SkMacHashing*/
476
477
478#ifdef SK_DIAG
479/******************************************************************************
480 *
481 * SkXmSetRxCmd() - Modify the value of the XMAC's Rx Command Register
482 *
483 * Description:
484 * The features
485 * - FCS stripping, SK_STRIP_FCS_ON/OFF
486 * - pad byte stripping, SK_STRIP_PAD_ON/OFF
487 * - don't set XMR_FS_ERR in status SK_LENERR_OK_ON/OFF
488 * for inrange length error frames
489 * - don't set XMR_FS_ERR in status SK_BIG_PK_OK_ON/OFF
490 * for frames > 1514 bytes
491 * - enable Rx of own packets SK_SELF_RX_ON/OFF
492 *
493 * for incoming packets may be enabled/disabled by this function.
494 * Additional modes may be added later.
495 * Multiple modes can be enabled/disabled at the same time.
496 * The new configuration is written to the Rx Command register immediately.
497 *
498 * Returns:
499 * nothing
500 */
501static void SkXmSetRxCmd(
502SK_AC *pAC, /* adapter context */
503SK_IOC IoC, /* IO context */
504int Port, /* Port Index (MAC_1 + n) */
505int Mode) /* Mode is SK_STRIP_FCS_ON/OFF, SK_STRIP_PAD_ON/OFF,
506 SK_LENERR_OK_ON/OFF, or SK_BIG_PK_OK_ON/OFF */
507{
508 SK_U16 OldRxCmd;
509 SK_U16 RxCmd;
510
511 XM_IN16(IoC, Port, XM_RX_CMD, &OldRxCmd);
512
513 RxCmd = OldRxCmd;
514
515 switch (Mode & (SK_STRIP_FCS_ON | SK_STRIP_FCS_OFF)) {
516 case SK_STRIP_FCS_ON:
517 RxCmd |= XM_RX_STRIP_FCS;
518 break;
519 case SK_STRIP_FCS_OFF:
520 RxCmd &= ~XM_RX_STRIP_FCS;
521 break;
522 }
523
524 switch (Mode & (SK_STRIP_PAD_ON | SK_STRIP_PAD_OFF)) {
525 case SK_STRIP_PAD_ON:
526 RxCmd |= XM_RX_STRIP_PAD;
527 break;
528 case SK_STRIP_PAD_OFF:
529 RxCmd &= ~XM_RX_STRIP_PAD;
530 break;
531 }
532
533 switch (Mode & (SK_LENERR_OK_ON | SK_LENERR_OK_OFF)) {
534 case SK_LENERR_OK_ON:
535 RxCmd |= XM_RX_LENERR_OK;
536 break;
537 case SK_LENERR_OK_OFF:
538 RxCmd &= ~XM_RX_LENERR_OK;
539 break;
540 }
541
542 switch (Mode & (SK_BIG_PK_OK_ON | SK_BIG_PK_OK_OFF)) {
543 case SK_BIG_PK_OK_ON:
544 RxCmd |= XM_RX_BIG_PK_OK;
545 break;
546 case SK_BIG_PK_OK_OFF:
547 RxCmd &= ~XM_RX_BIG_PK_OK;
548 break;
549 }
550
551 switch (Mode & (SK_SELF_RX_ON | SK_SELF_RX_OFF)) {
552 case SK_SELF_RX_ON:
553 RxCmd |= XM_RX_SELF_RX;
554 break;
555 case SK_SELF_RX_OFF:
556 RxCmd &= ~XM_RX_SELF_RX;
557 break;
558 }
559
560 /* Write the new mode to the Rx command register if required */
561 if (OldRxCmd != RxCmd) {
562 XM_OUT16(IoC, Port, XM_RX_CMD, RxCmd);
563 }
564} /* SkXmSetRxCmd */
565
566
567/******************************************************************************
568 *
569 * SkGmSetRxCmd() - Modify the value of the GMAC's Rx Control Register
570 *
571 * Description:
572 * The features
573 * - FCS (CRC) stripping, SK_STRIP_FCS_ON/OFF
574 * - don't set GMR_FS_LONG_ERR SK_BIG_PK_OK_ON/OFF
575 * for frames > 1514 bytes
576 * - enable Rx of own packets SK_SELF_RX_ON/OFF
577 *
578 * for incoming packets may be enabled/disabled by this function.
579 * Additional modes may be added later.
580 * Multiple modes can be enabled/disabled at the same time.
581 * The new configuration is written to the Rx Command register immediately.
582 *
583 * Returns:
584 * nothing
585 */
586static void SkGmSetRxCmd(
587SK_AC *pAC, /* adapter context */
588SK_IOC IoC, /* IO context */
589int Port, /* Port Index (MAC_1 + n) */
590int Mode) /* Mode is SK_STRIP_FCS_ON/OFF, SK_STRIP_PAD_ON/OFF,
591 SK_LENERR_OK_ON/OFF, or SK_BIG_PK_OK_ON/OFF */
592{
593 SK_U16 OldRxCmd;
594 SK_U16 RxCmd;
595
596 if ((Mode & (SK_STRIP_FCS_ON | SK_STRIP_FCS_OFF)) != 0) {
597
598 GM_IN16(IoC, Port, GM_RX_CTRL, &OldRxCmd);
599
600 RxCmd = OldRxCmd;
601
602 if ((Mode & SK_STRIP_FCS_ON) != 0) {
603 RxCmd |= GM_RXCR_CRC_DIS;
604 }
605 else {
606 RxCmd &= ~GM_RXCR_CRC_DIS;
607 }
608 /* Write the new mode to the Rx control register if required */
609 if (OldRxCmd != RxCmd) {
610 GM_OUT16(IoC, Port, GM_RX_CTRL, RxCmd);
611 }
612 }
613
614 if ((Mode & (SK_BIG_PK_OK_ON | SK_BIG_PK_OK_OFF)) != 0) {
615
616 GM_IN16(IoC, Port, GM_SERIAL_MODE, &OldRxCmd);
617
618 RxCmd = OldRxCmd;
619
620 if ((Mode & SK_BIG_PK_OK_ON) != 0) {
621 RxCmd |= GM_SMOD_JUMBO_ENA;
622 }
623 else {
624 RxCmd &= ~GM_SMOD_JUMBO_ENA;
625 }
626 /* Write the new mode to the Rx control register if required */
627 if (OldRxCmd != RxCmd) {
628 GM_OUT16(IoC, Port, GM_SERIAL_MODE, RxCmd);
629 }
630 }
631} /* SkGmSetRxCmd */
632
633
634/******************************************************************************
635 *
636 * SkMacSetRxCmd() - Modify the value of the MAC's Rx Control Register
637 *
638 * Description: modifies the MAC's Rx Control reg. dep. on board type
639 *
640 * Returns:
641 * nothing
642 */
643void SkMacSetRxCmd(
644SK_AC *pAC, /* adapter context */
645SK_IOC IoC, /* IO context */
646int Port, /* Port Index (MAC_1 + n) */
647int Mode) /* Rx Mode */
648{
649 if (pAC->GIni.GIGenesis) {
650
651 SkXmSetRxCmd(pAC, IoC, Port, Mode);
652 }
653 else {
654
655 SkGmSetRxCmd(pAC, IoC, Port, Mode);
656 }
657
658} /* SkMacSetRxCmd */
659
660
661/******************************************************************************
662 *
663 * SkMacCrcGener() - Enable / Disable CRC Generation
664 *
665 * Description: enables / disables CRC generation dep. on board type
666 *
667 * Returns:
668 * nothing
669 */
670void SkMacCrcGener(
671SK_AC *pAC, /* adapter context */
672SK_IOC IoC, /* IO context */
673int Port, /* Port Index (MAC_1 + n) */
674SK_BOOL Enable) /* Enable / Disable */
675{
676 SK_U16 Word;
677
678 if (pAC->GIni.GIGenesis) {
679
680 XM_IN16(IoC, Port, XM_TX_CMD, &Word);
681
682 if (Enable) {
683 Word &= ~XM_TX_NO_CRC;
684 }
685 else {
686 Word |= XM_TX_NO_CRC;
687 }
688 /* setup Tx Command Register */
689 XM_OUT16(IoC, Port, XM_TX_CMD, Word);
690 }
691 else {
692
693 GM_IN16(IoC, Port, GM_TX_CTRL, &Word);
694
695 if (Enable) {
696 Word &= ~GM_TXCR_CRC_DIS;
697 }
698 else {
699 Word |= GM_TXCR_CRC_DIS;
700 }
701 /* setup Tx Control Register */
702 GM_OUT16(IoC, Port, GM_TX_CTRL, Word);
703 }
704
705} /* SkMacCrcGener*/
706
707#endif /* SK_DIAG */
708
709
710#ifdef GENESIS
711/******************************************************************************
712 *
713 * SkXmClrExactAddr() - Clear Exact Match Address Registers
714 *
715 * Description:
716 * All Exact Match Address registers of the XMAC 'Port' will be
717 * cleared starting with 'StartNum' up to (and including) the
718 * Exact Match address number of 'StopNum'.
719 *
720 * Returns:
721 * nothing
722 */
723void SkXmClrExactAddr(
724SK_AC *pAC, /* adapter context */
725SK_IOC IoC, /* IO context */
726int Port, /* Port Index (MAC_1 + n) */
727int StartNum, /* Begin with this Address Register Index (0..15) */
728int StopNum) /* Stop after finished with this Register Idx (0..15) */
729{
730 int i;
731 SK_U16 ZeroAddr[3] = {0x0000, 0x0000, 0x0000};
732
733 if ((unsigned)StartNum > 15 || (unsigned)StopNum > 15 ||
734 StartNum > StopNum) {
735
736 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E001, SKERR_HWI_E001MSG);
737 return;
738 }
739
740 for (i = StartNum; i <= StopNum; i++) {
741 XM_OUTADDR(IoC, Port, XM_EXM(i), &ZeroAddr[0]);
742 }
743} /* SkXmClrExactAddr */
744#endif /* GENESIS */
745
746
747/******************************************************************************
748 *
749 * SkMacFlushTxFifo() - Flush the MAC's transmit FIFO
750 *
751 * Description:
752 * Flush the transmit FIFO of the MAC specified by the index 'Port'
753 *
754 * Returns:
755 * nothing
756 */
757void SkMacFlushTxFifo(
758SK_AC *pAC, /* adapter context */
759SK_IOC IoC, /* IO context */
760int Port) /* Port Index (MAC_1 + n) */
761{
762#ifdef GENESIS
763 SK_U32 MdReg;
764
765 if (pAC->GIni.GIGenesis) {
766
767 XM_IN32(IoC, Port, XM_MODE, &MdReg);
768
769 XM_OUT32(IoC, Port, XM_MODE, MdReg | XM_MD_FTF);
770 }
771#endif /* GENESIS */
772
773#ifdef YUKON
774 if (pAC->GIni.GIYukon) {
775 /* no way to flush the FIFO we have to issue a reset */
776 /* TBD */
777 }
778#endif /* YUKON */
779
780} /* SkMacFlushTxFifo */
781
782
783/******************************************************************************
784 *
785 * SkMacFlushRxFifo() - Flush the MAC's receive FIFO
786 *
787 * Description:
788 * Flush the receive FIFO of the MAC specified by the index 'Port'
789 *
790 * Returns:
791 * nothing
792 */
793static void SkMacFlushRxFifo(
794SK_AC *pAC, /* adapter context */
795SK_IOC IoC, /* IO context */
796int Port) /* Port Index (MAC_1 + n) */
797{
798#ifdef GENESIS
799 SK_U32 MdReg;
800
801 if (pAC->GIni.GIGenesis) {
802
803 XM_IN32(IoC, Port, XM_MODE, &MdReg);
804
805 XM_OUT32(IoC, Port, XM_MODE, MdReg | XM_MD_FRF);
806 }
807#endif /* GENESIS */
808
809#ifdef YUKON
810 if (pAC->GIni.GIYukon) {
811 /* no way to flush the FIFO we have to issue a reset */
812 /* TBD */
813 }
814#endif /* YUKON */
815
816} /* SkMacFlushRxFifo */
817
818
819#ifdef GENESIS
820/******************************************************************************
821 *
822 * SkXmSoftRst() - Do a XMAC software reset
823 *
824 * Description:
825 * The PHY registers should not be destroyed during this
826 * kind of software reset. Therefore the XMAC Software Reset
827 * (XM_GP_RES_MAC bit in XM_GP_PORT) must not be used!
828 *
829 * The software reset is done by
830 * - disabling the Rx and Tx state machine,
831 * - resetting the statistics module,
832 * - clear all other significant XMAC Mode,
833 * Command, and Control Registers
834 * - clearing the Hash Register and the
835 * Exact Match Address registers, and
836 * - flushing the XMAC's Rx and Tx FIFOs.
837 *
838 * Note:
839 * Another requirement when stopping the XMAC is to
840 * avoid sending corrupted frames on the network.
841 * Disabling the Tx state machine will NOT interrupt
842 * the currently transmitted frame. But we must take care
843 * that the Tx FIFO is cleared AFTER the current frame
844 * is complete sent to the network.
845 *
846 * It takes about 12ns to send a frame with 1538 bytes.
847 * One PCI clock goes at least 15ns (66MHz). Therefore
848 * after reading XM_GP_PORT back, we are sure that the
849 * transmitter is disabled AND idle. And this means
850 * we may flush the transmit FIFO now.
851 *
852 * Returns:
853 * nothing
854 */
855static void SkXmSoftRst(
856SK_AC *pAC, /* adapter context */
857SK_IOC IoC, /* IO context */
858int Port) /* Port Index (MAC_1 + n) */
859{
860 SK_U16 ZeroAddr[4] = {0x0000, 0x0000, 0x0000, 0x0000};
861
862 /* reset the statistics module */
863 XM_OUT32(IoC, Port, XM_GP_PORT, XM_GP_RES_STAT);
864
865 /* disable all XMAC IRQs */
866 XM_OUT16(IoC, Port, XM_IMSK, 0xffff);
867
868 XM_OUT32(IoC, Port, XM_MODE, 0); /* clear Mode Reg */
869
870 XM_OUT16(IoC, Port, XM_TX_CMD, 0); /* reset TX CMD Reg */
871 XM_OUT16(IoC, Port, XM_RX_CMD, 0); /* reset RX CMD Reg */
872
873 /* disable all PHY IRQs */
874 switch (pAC->GIni.GP[Port].PhyType) {
875 case SK_PHY_BCOM:
876 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_INT_MASK, 0xffff);
877 break;
878#ifdef OTHER_PHY
879 case SK_PHY_LONE:
880 SkXmPhyWrite(pAC, IoC, Port, PHY_LONE_INT_ENAB, 0);
881 break;
882 case SK_PHY_NAT:
883 /* todo: National
884 SkXmPhyWrite(pAC, IoC, Port, PHY_NAT_INT_MASK, 0xffff); */
885 break;
886#endif /* OTHER_PHY */
887 }
888
889 /* clear the Hash Register */
890 XM_OUTHASH(IoC, Port, XM_HSM, &ZeroAddr);
891
892 /* clear the Exact Match Address registers */
893 SkXmClrExactAddr(pAC, IoC, Port, 0, 15);
894
895 /* clear the Source Check Address registers */
896 XM_OUTHASH(IoC, Port, XM_SRC_CHK, &ZeroAddr);
897
898} /* SkXmSoftRst */
899
900
901/******************************************************************************
902 *
903 * SkXmHardRst() - Do a XMAC hardware reset
904 *
905 * Description:
906 * The XMAC of the specified 'Port' and all connected devices
907 * (PHY and SERDES) will receive a reset signal on its *Reset pins.
908 * External PHYs must be reset by clearing a bit in the GPIO register
909 * (Timing requirements: Broadcom: 400ns, Level One: none, National: 80ns).
910 *
911 * ATTENTION:
912 * It is absolutely necessary to reset the SW_RST Bit first
913 * before calling this function.
914 *
915 * Returns:
916 * nothing
917 */
918static void SkXmHardRst(
919SK_AC *pAC, /* adapter context */
920SK_IOC IoC, /* IO context */
921int Port) /* Port Index (MAC_1 + n) */
922{
923 SK_U32 Reg;
924 int i;
925 int TOut;
926 SK_U16 Word;
927
928 for (i = 0; i < 4; i++) {
929 /* TX_MFF_CTRL1 has 32 bits, but only the lowest 16 bits are used */
930 SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), MFF_CLR_MAC_RST);
931
932 TOut = 0;
933 do {
934 if (TOut++ > 10000) {
935 /*
936 * Adapter seems to be in RESET state.
937 * Registers cannot be written.
938 */
939 return;
940 }
941
942 SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), MFF_SET_MAC_RST);
943
944 SK_IN16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), &Word);
945
946 } while ((Word & MFF_SET_MAC_RST) == 0);
947 }
948
949 /* For external PHYs there must be special handling */
950 if (pAC->GIni.GP[Port].PhyType != SK_PHY_XMAC) {
951
952 SK_IN32(IoC, B2_GP_IO, &Reg);
953
954 if (Port == 0) {
955 Reg |= GP_DIR_0; /* set to output */
956 Reg &= ~GP_IO_0; /* set PHY reset (active low) */
957 }
958 else {
959 Reg |= GP_DIR_2; /* set to output */
960 Reg &= ~GP_IO_2; /* set PHY reset (active low) */
961 }
962 /* reset external PHY */
963 SK_OUT32(IoC, B2_GP_IO, Reg);
964
965 /* short delay */
966 SK_IN32(IoC, B2_GP_IO, &Reg);
967 }
968} /* SkXmHardRst */
969
970
971/******************************************************************************
972 *
973 * SkXmClearRst() - Release the PHY & XMAC reset
974 *
975 * Description:
976 *
977 * Returns:
978 * nothing
979 */
980static void SkXmClearRst(
981SK_AC *pAC, /* adapter context */
982SK_IOC IoC, /* IO context */
983int Port) /* Port Index (MAC_1 + n) */
984{
985 SK_U32 DWord;
986
987 /* clear HW reset */
988 SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), MFF_CLR_MAC_RST);
989
990 if (pAC->GIni.GP[Port].PhyType != SK_PHY_XMAC) {
991
992 SK_IN32(IoC, B2_GP_IO, &DWord);
993
994 if (Port == 0) {
995 DWord |= (GP_DIR_0 | GP_IO_0); /* set to output */
996 }
997 else {
998 DWord |= (GP_DIR_2 | GP_IO_2); /* set to output */
999 }
1000 /* Clear PHY reset */
1001 SK_OUT32(IoC, B2_GP_IO, DWord);
1002
1003 /* Enable GMII interface */
1004 XM_OUT16(IoC, Port, XM_HW_CFG, XM_HW_GMII_MD);
1005 }
1006} /* SkXmClearRst */
1007#endif /* GENESIS */
1008
1009
1010#ifdef YUKON
1011/******************************************************************************
1012 *
1013 * SkGmSoftRst() - Do a GMAC software reset
1014 *
1015 * Description:
1016 * The GPHY registers should not be destroyed during this
1017 * kind of software reset.
1018 *
1019 * Returns:
1020 * nothing
1021 */
1022static void SkGmSoftRst(
1023SK_AC *pAC, /* adapter context */
1024SK_IOC IoC, /* IO context */
1025int Port) /* Port Index (MAC_1 + n) */
1026{
1027 SK_U16 EmptyHash[4] = {0x0000, 0x0000, 0x0000, 0x0000};
1028 SK_U16 RxCtrl;
1029
1030 /* reset the statistics module */
1031
1032 /* disable all GMAC IRQs */
1033 SK_OUT8(IoC, GMAC_IRQ_MSK, 0);
1034
1035 /* disable all PHY IRQs */
1036 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_INT_MASK, 0);
1037
1038 /* clear the Hash Register */
1039 GM_OUTHASH(IoC, Port, GM_MC_ADDR_H1, EmptyHash);
1040
1041 /* Enable Unicast and Multicast filtering */
1042 GM_IN16(IoC, Port, GM_RX_CTRL, &RxCtrl);
1043
1044 GM_OUT16(IoC, Port, GM_RX_CTRL,
1045 (SK_U16)(RxCtrl | GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA));
1046
1047} /* SkGmSoftRst */
1048
1049
1050/******************************************************************************
1051 *
1052 * SkGmHardRst() - Do a GMAC hardware reset
1053 *
1054 * Description:
1055 *
1056 * Returns:
1057 * nothing
1058 */
1059static void SkGmHardRst(
1060SK_AC *pAC, /* adapter context */
1061SK_IOC IoC, /* IO context */
1062int Port) /* Port Index (MAC_1 + n) */
1063{
1064 SK_U32 DWord;
1065
1066 /* WA code for COMA mode */
1067 if (pAC->GIni.GIYukonLite &&
1068 pAC->GIni.GIChipRev >= CHIP_REV_YU_LITE_A3) {
1069
1070 SK_IN32(IoC, B2_GP_IO, &DWord);
1071
1072 DWord |= (GP_DIR_9 | GP_IO_9);
1073
1074 /* set PHY reset */
1075 SK_OUT32(IoC, B2_GP_IO, DWord);
1076 }
1077
1078 /* set GPHY Control reset */
1079 SK_OUT32(IoC, MR_ADDR(Port, GPHY_CTRL), GPC_RST_SET);
1080
1081 /* set GMAC Control reset */
1082 SK_OUT32(IoC, MR_ADDR(Port, GMAC_CTRL), GMC_RST_SET);
1083
1084} /* SkGmHardRst */
1085
1086
1087/******************************************************************************
1088 *
1089 * SkGmClearRst() - Release the GPHY & GMAC reset
1090 *
1091 * Description:
1092 *
1093 * Returns:
1094 * nothing
1095 */
1096static void SkGmClearRst(
1097SK_AC *pAC, /* adapter context */
1098SK_IOC IoC, /* IO context */
1099int Port) /* Port Index (MAC_1 + n) */
1100{
1101 SK_U32 DWord;
1102
1103#ifdef XXX
1104 /* clear GMAC Control reset */
1105 SK_OUT32(IoC, MR_ADDR(Port, GMAC_CTRL), GMC_RST_CLR);
1106
1107 /* set GMAC Control reset */
1108 SK_OUT32(IoC, MR_ADDR(Port, GMAC_CTRL), GMC_RST_SET);
1109#endif /* XXX */
1110
1111 /* WA code for COMA mode */
1112 if (pAC->GIni.GIYukonLite &&
1113 pAC->GIni.GIChipRev >= CHIP_REV_YU_LITE_A3) {
1114
1115 SK_IN32(IoC, B2_GP_IO, &DWord);
1116
1117 DWord |= GP_DIR_9; /* set to output */
1118 DWord &= ~GP_IO_9; /* clear PHY reset (active high) */
1119
1120 /* clear PHY reset */
1121 SK_OUT32(IoC, B2_GP_IO, DWord);
1122 }
1123
1124 /* set HWCFG_MODE */
1125 DWord = GPC_INT_POL_HI | GPC_DIS_FC | GPC_DIS_SLEEP |
1126 GPC_ENA_XC | GPC_ANEG_ADV_ALL_M | GPC_ENA_PAUSE |
1127 (pAC->GIni.GICopperType ? GPC_HWCFG_GMII_COP :
1128 GPC_HWCFG_GMII_FIB);
1129
1130 /* set GPHY Control reset */
1131 SK_OUT32(IoC, MR_ADDR(Port, GPHY_CTRL), DWord | GPC_RST_SET);
1132
1133 /* release GPHY Control reset */
1134 SK_OUT32(IoC, MR_ADDR(Port, GPHY_CTRL), DWord | GPC_RST_CLR);
1135
1136#ifdef VCPU
1137 VCpuWait(9000);
1138#endif /* VCPU */
1139
1140 /* clear GMAC Control reset */
1141 SK_OUT32(IoC, MR_ADDR(Port, GMAC_CTRL), GMC_PAUSE_ON | GMC_RST_CLR);
1142
1143#ifdef VCPU
1144 VCpuWait(2000);
1145
1146 SK_IN32(IoC, MR_ADDR(Port, GPHY_CTRL), &DWord);
1147
1148 SK_IN32(IoC, B0_ISRC, &DWord);
1149#endif /* VCPU */
1150
1151} /* SkGmClearRst */
1152#endif /* YUKON */
1153
1154
1155/******************************************************************************
1156 *
1157 * SkMacSoftRst() - Do a MAC software reset
1158 *
1159 * Description: calls a MAC software reset routine dep. on board type
1160 *
1161 * Returns:
1162 * nothing
1163 */
1164void SkMacSoftRst(
1165SK_AC *pAC, /* adapter context */
1166SK_IOC IoC, /* IO context */
1167int Port) /* Port Index (MAC_1 + n) */
1168{
1169 SK_GEPORT *pPrt;
1170
1171 pPrt = &pAC->GIni.GP[Port];
1172
1173 /* disable receiver and transmitter */
1174 SkMacRxTxDisable(pAC, IoC, Port);
1175
1176#ifdef GENESIS
1177 if (pAC->GIni.GIGenesis) {
1178
1179 SkXmSoftRst(pAC, IoC, Port);
1180 }
1181#endif /* GENESIS */
1182
1183#ifdef YUKON
1184 if (pAC->GIni.GIYukon) {
1185
1186 SkGmSoftRst(pAC, IoC, Port);
1187 }
1188#endif /* YUKON */
1189
1190 /* flush the MAC's Rx and Tx FIFOs */
1191 SkMacFlushTxFifo(pAC, IoC, Port);
1192
1193 SkMacFlushRxFifo(pAC, IoC, Port);
1194
1195 pPrt->PState = SK_PRT_STOP;
1196
1197} /* SkMacSoftRst */
1198
1199
1200/******************************************************************************
1201 *
1202 * SkMacHardRst() - Do a MAC hardware reset
1203 *
1204 * Description: calls a MAC hardware reset routine dep. on board type
1205 *
1206 * Returns:
1207 * nothing
1208 */
1209void SkMacHardRst(
1210SK_AC *pAC, /* adapter context */
1211SK_IOC IoC, /* IO context */
1212int Port) /* Port Index (MAC_1 + n) */
1213{
1214
1215#ifdef GENESIS
1216 if (pAC->GIni.GIGenesis) {
1217
1218 SkXmHardRst(pAC, IoC, Port);
1219 }
1220#endif /* GENESIS */
1221
1222#ifdef YUKON
1223 if (pAC->GIni.GIYukon) {
1224
1225 SkGmHardRst(pAC, IoC, Port);
1226 }
1227#endif /* YUKON */
1228
1229 pAC->GIni.GP[Port].PState = SK_PRT_RESET;
1230
1231} /* SkMacHardRst */
1232
1233
1234#ifdef GENESIS
1235/******************************************************************************
1236 *
1237 * SkXmInitMac() - Initialize the XMAC II
1238 *
1239 * Description:
1240 * Initialize the XMAC of the specified port.
1241 * The XMAC must be reset or stopped before calling this function.
1242 *
1243 * Note:
1244 * The XMAC's Rx and Tx state machine is still disabled when returning.
1245 *
1246 * Returns:
1247 * nothing
1248 */
1249void SkXmInitMac(
1250SK_AC *pAC, /* adapter context */
1251SK_IOC IoC, /* IO context */
1252int Port) /* Port Index (MAC_1 + n) */
1253{
1254 SK_GEPORT *pPrt;
1255 int i;
1256 SK_U16 SWord;
1257
1258 pPrt = &pAC->GIni.GP[Port];
1259
1260 if (pPrt->PState == SK_PRT_STOP) {
1261 /* Port State: SK_PRT_STOP */
1262 /* Verify that the reset bit is cleared */
1263 SK_IN16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), &SWord);
1264
1265 if ((SWord & MFF_SET_MAC_RST) != 0) {
1266 /* PState does not match HW state */
1267 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E006, SKERR_HWI_E006MSG);
1268 /* Correct it */
1269 pPrt->PState = SK_PRT_RESET;
1270 }
1271 }
1272
1273 if (pPrt->PState == SK_PRT_RESET) {
1274
1275 SkXmClearRst(pAC, IoC, Port);
1276
1277 if (pPrt->PhyType != SK_PHY_XMAC) {
1278 /* read Id from external PHY (all have the same address) */
1279 SkXmPhyRead(pAC, IoC, Port, PHY_XMAC_ID1, &pPrt->PhyId1);
1280
1281 /*
1282 * Optimize MDIO transfer by suppressing preamble.
1283 * Must be done AFTER first access to BCOM chip.
1284 */
1285 XM_IN16(IoC, Port, XM_MMU_CMD, &SWord);
1286
1287 XM_OUT16(IoC, Port, XM_MMU_CMD, SWord | XM_MMU_NO_PRE);
1288
1289 if (pPrt->PhyId1 == PHY_BCOM_ID1_C0) {
1290 /*
1291 * Workaround BCOM Errata for the C0 type.
1292 * Write magic patterns to reserved registers.
1293 */
1294 i = 0;
1295 while (BcomRegC0Hack[i].PhyReg != 0) {
1296 SkXmPhyWrite(pAC, IoC, Port, BcomRegC0Hack[i].PhyReg,
1297 BcomRegC0Hack[i].PhyVal);
1298 i++;
1299 }
1300 }
1301 else if (pPrt->PhyId1 == PHY_BCOM_ID1_A1) {
1302 /*
1303 * Workaround BCOM Errata for the A1 type.
1304 * Write magic patterns to reserved registers.
1305 */
1306 i = 0;
1307 while (BcomRegA1Hack[i].PhyReg != 0) {
1308 SkXmPhyWrite(pAC, IoC, Port, BcomRegA1Hack[i].PhyReg,
1309 BcomRegA1Hack[i].PhyVal);
1310 i++;
1311 }
1312 }
1313
1314 /*
1315 * Workaround BCOM Errata (#10523) for all BCom PHYs.
1316 * Disable Power Management after reset.
1317 */
1318 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUX_CTRL, &SWord);
1319
1320 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_AUX_CTRL,
1321 (SK_U16)(SWord | PHY_B_AC_DIS_PM));
1322
1323 /* PHY LED initialization is done in SkGeXmitLED() */
1324 }
1325
1326 /* Dummy read the Interrupt source register */
1327 XM_IN16(IoC, Port, XM_ISRC, &SWord);
1328
1329 /*
1330 * The auto-negotiation process starts immediately after
1331 * clearing the reset. The auto-negotiation process should be
1332 * started by the SIRQ, therefore stop it here immediately.
1333 */
1334 SkMacInitPhy(pAC, IoC, Port, SK_FALSE);
1335
1336#ifdef TEST_ONLY
1337 /* temp. code: enable signal detect */
1338 /* WARNING: do not override GMII setting above */
1339 XM_OUT16(IoC, Port, XM_HW_CFG, XM_HW_COM4SIG);
1340#endif
1341 }
1342
1343 /*
1344 * configure the XMACs Station Address
1345 * B2_MAC_2 = xx xx xx xx xx x1 is programmed to XMAC A
1346 * B2_MAC_3 = xx xx xx xx xx x2 is programmed to XMAC B
1347 */
1348 for (i = 0; i < 3; i++) {
1349 /*
1350 * The following 2 statements are together endianess
1351 * independent. Remember this when changing.
1352 */
1353 SK_IN16(IoC, (B2_MAC_2 + Port * 8 + i * 2), &SWord);
1354
1355 XM_OUT16(IoC, Port, (XM_SA + i * 2), SWord);
1356 }
1357
1358 /* Tx Inter Packet Gap (XM_TX_IPG): use default */
1359 /* Tx High Water Mark (XM_TX_HI_WM): use default */
1360 /* Tx Low Water Mark (XM_TX_LO_WM): use default */
1361 /* Host Request Threshold (XM_HT_THR): use default */
1362 /* Rx Request Threshold (XM_RX_THR): use default */
1363 /* Rx Low Water Mark (XM_RX_LO_WM): use default */
1364
1365 /* configure Rx High Water Mark (XM_RX_HI_WM) */
1366 XM_OUT16(IoC, Port, XM_RX_HI_WM, SK_XM_RX_HI_WM);
1367
1368 /* Configure Tx Request Threshold */
1369 SWord = SK_XM_THR_SL; /* for single port */
1370
1371 if (pAC->GIni.GIMacsFound > 1) {
1372 switch (pAC->GIni.GIPortUsage) {
1373 case SK_RED_LINK:
1374 SWord = SK_XM_THR_REDL; /* redundant link */
1375 break;
1376 case SK_MUL_LINK:
1377 SWord = SK_XM_THR_MULL; /* load balancing */
1378 break;
1379 case SK_JUMBO_LINK:
1380 SWord = SK_XM_THR_JUMBO; /* jumbo frames */
1381 break;
1382 default:
1383 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E014, SKERR_HWI_E014MSG);
1384 break;
1385 }
1386 }
1387 XM_OUT16(IoC, Port, XM_TX_THR, SWord);
1388
1389 /* setup register defaults for the Tx Command Register */
1390 XM_OUT16(IoC, Port, XM_TX_CMD, XM_TX_AUTO_PAD);
1391
1392 /* setup register defaults for the Rx Command Register */
1393 SWord = XM_RX_STRIP_FCS | XM_RX_LENERR_OK;
1394
1395 if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) {
1396 SWord |= XM_RX_BIG_PK_OK;
1397 }
1398
1399 if (pPrt->PLinkMode == SK_LMODE_HALF) {
1400 /*
1401 * If in manual half duplex mode the other side might be in
1402 * full duplex mode, so ignore if a carrier extension is not seen
1403 * on frames received
1404 */
1405 SWord |= XM_RX_DIS_CEXT;
1406 }
1407
1408 XM_OUT16(IoC, Port, XM_RX_CMD, SWord);
1409
1410 /*
1411 * setup register defaults for the Mode Register
1412 * - Don't strip error frames to avoid Store & Forward
1413 * on the Rx side.
1414 * - Enable 'Check Station Address' bit
1415 * - Enable 'Check Address Array' bit
1416 */
1417 XM_OUT32(IoC, Port, XM_MODE, XM_DEF_MODE);
1418
1419 /*
1420 * Initialize the Receive Counter Event Mask (XM_RX_EV_MSK)
1421 * - Enable all bits excepting 'Octets Rx OK Low CntOv'
1422 * and 'Octets Rx OK Hi Cnt Ov'.
1423 */
1424 XM_OUT32(IoC, Port, XM_RX_EV_MSK, XMR_DEF_MSK);
1425
1426 /*
1427 * Initialize the Transmit Counter Event Mask (XM_TX_EV_MSK)
1428 * - Enable all bits excepting 'Octets Tx OK Low CntOv'
1429 * and 'Octets Tx OK Hi Cnt Ov'.
1430 */
1431 XM_OUT32(IoC, Port, XM_TX_EV_MSK, XMT_DEF_MSK);
1432
1433 /*
1434 * Do NOT init XMAC interrupt mask here.
1435 * All interrupts remain disable until link comes up!
1436 */
1437
1438 /*
1439 * Any additional configuration changes may be done now.
1440 * The last action is to enable the Rx and Tx state machine.
1441 * This should be done after the auto-negotiation process
1442 * has been completed successfully.
1443 */
1444} /* SkXmInitMac */
1445#endif /* GENESIS */
1446
1447
1448#ifdef YUKON
1449/******************************************************************************
1450 *
1451 * SkGmInitMac() - Initialize the GMAC
1452 *
1453 * Description:
1454 * Initialize the GMAC of the specified port.
1455 * The GMAC must be reset or stopped before calling this function.
1456 *
1457 * Note:
1458 * The GMAC's Rx and Tx state machine is still disabled when returning.
1459 *
1460 * Returns:
1461 * nothing
1462 */
1463void SkGmInitMac(
1464SK_AC *pAC, /* adapter context */
1465SK_IOC IoC, /* IO context */
1466int Port) /* Port Index (MAC_1 + n) */
1467{
1468 SK_GEPORT *pPrt;
1469 int i;
1470 SK_U16 SWord;
1471 SK_U32 DWord;
1472
1473 pPrt = &pAC->GIni.GP[Port];
1474
1475 if (pPrt->PState == SK_PRT_STOP) {
1476 /* Port State: SK_PRT_STOP */
1477 /* Verify that the reset bit is cleared */
1478 SK_IN32(IoC, MR_ADDR(Port, GMAC_CTRL), &DWord);
1479
1480 if ((DWord & GMC_RST_SET) != 0) {
1481 /* PState does not match HW state */
1482 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E006, SKERR_HWI_E006MSG);
1483 /* Correct it */
1484 pPrt->PState = SK_PRT_RESET;
1485 }
1486 }
1487
1488 if (pPrt->PState == SK_PRT_RESET) {
1489
1490 SkGmHardRst(pAC, IoC, Port);
1491
1492 SkGmClearRst(pAC, IoC, Port);
1493
1494 /* Auto-negotiation ? */
1495 if (pPrt->PLinkMode == SK_LMODE_HALF || pPrt->PLinkMode == SK_LMODE_FULL) {
1496 /* Auto-negotiation disabled */
1497
1498 /* get General Purpose Control */
1499 GM_IN16(IoC, Port, GM_GP_CTRL, &SWord);
1500
1501 /* disable auto-update for speed, duplex and flow-control */
1502 SWord |= GM_GPCR_AU_ALL_DIS;
1503
1504 /* setup General Purpose Control Register */
1505 GM_OUT16(IoC, Port, GM_GP_CTRL, SWord);
1506
1507 SWord = GM_GPCR_AU_ALL_DIS;
1508 }
1509 else {
1510 SWord = 0;
1511 }
1512
1513 /* speed settings */
1514 switch (pPrt->PLinkSpeed) {
1515 case SK_LSPEED_AUTO:
1516 case SK_LSPEED_1000MBPS:
1517 SWord |= GM_GPCR_SPEED_1000 | GM_GPCR_SPEED_100;
1518 break;
1519 case SK_LSPEED_100MBPS:
1520 SWord |= GM_GPCR_SPEED_100;
1521 break;
1522 case SK_LSPEED_10MBPS:
1523 break;
1524 }
1525
1526 /* duplex settings */
1527 if (pPrt->PLinkMode != SK_LMODE_HALF) {
1528 /* set full duplex */
1529 SWord |= GM_GPCR_DUP_FULL;
1530 }
1531
1532 /* flow-control settings */
1533 switch (pPrt->PFlowCtrlMode) {
1534 case SK_FLOW_MODE_NONE:
1535 /* set Pause Off */
1536 SK_OUT32(IoC, MR_ADDR(Port, GMAC_CTRL), GMC_PAUSE_OFF);
1537 /* disable Tx & Rx flow-control */
1538 SWord |= GM_GPCR_FC_TX_DIS | GM_GPCR_FC_RX_DIS | GM_GPCR_AU_FCT_DIS;
1539 break;
1540 case SK_FLOW_MODE_LOC_SEND:
1541 /* disable Rx flow-control */
1542 SWord |= GM_GPCR_FC_RX_DIS | GM_GPCR_AU_FCT_DIS;
1543 break;
1544 case SK_FLOW_MODE_SYMMETRIC:
1545 case SK_FLOW_MODE_SYM_OR_REM:
1546 /* enable Tx & Rx flow-control */
1547 break;
1548 }
1549
1550 /* setup General Purpose Control Register */
1551 GM_OUT16(IoC, Port, GM_GP_CTRL, SWord);
1552
1553 /* dummy read the Interrupt Source Register */
1554 SK_IN16(IoC, GMAC_IRQ_SRC, &SWord);
1555
1556#ifndef VCPU
1557 /* read Id from PHY */
1558 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_ID1, &pPrt->PhyId1);
1559
1560 SkGmInitPhyMarv(pAC, IoC, Port, SK_FALSE);
1561#endif /* VCPU */
1562 }
1563
1564 (void)SkGmResetCounter(pAC, IoC, Port);
1565
1566 /* setup Transmit Control Register */
1567 GM_OUT16(IoC, Port, GM_TX_CTRL, TX_COL_THR(pPrt->PMacColThres));
1568
1569 /* setup Receive Control Register */
1570 GM_OUT16(IoC, Port, GM_RX_CTRL, GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA |
1571 GM_RXCR_CRC_DIS);
1572
1573 /* setup Transmit Flow Control Register */
1574 GM_OUT16(IoC, Port, GM_TX_FLOW_CTRL, 0xffff);
1575
1576 /* setup Transmit Parameter Register */
1577#ifdef VCPU
1578 GM_IN16(IoC, Port, GM_TX_PARAM, &SWord);
1579#endif /* VCPU */
1580
1581 SWord = TX_JAM_LEN_VAL(pPrt->PMacJamLen) |
1582 TX_JAM_IPG_VAL(pPrt->PMacJamIpgVal) |
1583 TX_IPG_JAM_DATA(pPrt->PMacJamIpgData);
1584
1585 GM_OUT16(IoC, Port, GM_TX_PARAM, SWord);
1586
1587 /* configure the Serial Mode Register */
1588#ifdef VCPU
1589 GM_IN16(IoC, Port, GM_SERIAL_MODE, &SWord);
1590#endif /* VCPU */
1591
1592 SWord = GM_SMOD_VLAN_ENA | IPG_DATA_VAL(pPrt->PMacIpgData);
1593
1594 if (pPrt->PMacLimit4) {
1595 /* reset of collision counter after 4 consecutive collisions */
1596 SWord |= GM_SMOD_LIMIT_4;
1597 }
1598
1599 if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) {
1600 /* enable jumbo mode (Max. Frame Length = 9018) */
1601 SWord |= GM_SMOD_JUMBO_ENA;
1602 }
1603
1604 GM_OUT16(IoC, Port, GM_SERIAL_MODE, SWord);
1605
1606 /*
1607 * configure the GMACs Station Addresses
1608 * in PROM you can find our addresses at:
1609 * B2_MAC_1 = xx xx xx xx xx x0 virtual address
1610 * B2_MAC_2 = xx xx xx xx xx x1 is programmed to GMAC A
1611 * B2_MAC_3 = xx xx xx xx xx x2 is reserved for DualPort
1612 */
1613
1614 for (i = 0; i < 3; i++) {
1615 /*
1616 * The following 2 statements are together endianess
1617 * independent. Remember this when changing.
1618 */
1619 /* physical address: will be used for pause frames */
1620 SK_IN16(IoC, (B2_MAC_2 + Port * 8 + i * 2), &SWord);
1621
1622#ifdef WA_DEV_16
1623 /* WA for deviation #16 */
1624 if (pAC->GIni.GIChipId == CHIP_ID_YUKON && pAC->GIni.GIChipRev == 0) {
1625 /* swap the address bytes */
1626 SWord = ((SWord & 0xff00) >> 8) | ((SWord & 0x00ff) << 8);
1627
1628 /* write to register in reversed order */
1629 GM_OUT16(IoC, Port, (GM_SRC_ADDR_1L + (2 - i) * 4), SWord);
1630 }
1631 else {
1632 GM_OUT16(IoC, Port, (GM_SRC_ADDR_1L + i * 4), SWord);
1633 }
1634#else
1635 GM_OUT16(IoC, Port, (GM_SRC_ADDR_1L + i * 4), SWord);
1636#endif /* WA_DEV_16 */
1637
1638 /* virtual address: will be used for data */
1639 SK_IN16(IoC, (B2_MAC_1 + Port * 8 + i * 2), &SWord);
1640
1641 GM_OUT16(IoC, Port, (GM_SRC_ADDR_2L + i * 4), SWord);
1642
1643 /* reset Multicast filtering Hash registers 1-3 */
1644 GM_OUT16(IoC, Port, GM_MC_ADDR_H1 + 4*i, 0);
1645 }
1646
1647 /* reset Multicast filtering Hash register 4 */
1648 GM_OUT16(IoC, Port, GM_MC_ADDR_H4, 0);
1649
1650 /* enable interrupt mask for counter overflows */
1651 GM_OUT16(IoC, Port, GM_TX_IRQ_MSK, 0);
1652 GM_OUT16(IoC, Port, GM_RX_IRQ_MSK, 0);
1653 GM_OUT16(IoC, Port, GM_TR_IRQ_MSK, 0);
1654
1655#if defined(SK_DIAG) || defined(DEBUG)
1656 /* read General Purpose Status */
1657 GM_IN16(IoC, Port, GM_GP_STAT, &SWord);
1658
1659 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1660 ("MAC Stat Reg.=0x%04X\n", SWord));
1661#endif /* SK_DIAG || DEBUG */
1662
1663#ifdef SK_DIAG
1664 c_print("MAC Stat Reg=0x%04X\n", SWord);
1665#endif /* SK_DIAG */
1666
1667} /* SkGmInitMac */
1668#endif /* YUKON */
1669
1670
1671#ifdef GENESIS
1672/******************************************************************************
1673 *
1674 * SkXmInitDupMd() - Initialize the XMACs Duplex Mode
1675 *
1676 * Description:
1677 * This function initializes the XMACs Duplex Mode.
1678 * It should be called after successfully finishing
1679 * the Auto-negotiation Process
1680 *
1681 * Returns:
1682 * nothing
1683 */
1684static void SkXmInitDupMd(
1685SK_AC *pAC, /* adapter context */
1686SK_IOC IoC, /* IO context */
1687int Port) /* Port Index (MAC_1 + n) */
1688{
1689 switch (pAC->GIni.GP[Port].PLinkModeStatus) {
1690 case SK_LMODE_STAT_AUTOHALF:
1691 case SK_LMODE_STAT_HALF:
1692 /* Configuration Actions for Half Duplex Mode */
1693 /*
1694 * XM_BURST = default value. We are probable not quick
1695 * enough at the 'XMAC' bus to burst 8kB.
1696 * The XMAC stops bursting if no transmit frames
1697 * are available or the burst limit is exceeded.
1698 */
1699 /* XM_TX_RT_LIM = default value (15) */
1700 /* XM_TX_STIME = default value (0xff = 4096 bit times) */
1701 break;
1702 case SK_LMODE_STAT_AUTOFULL:
1703 case SK_LMODE_STAT_FULL:
1704 /* Configuration Actions for Full Duplex Mode */
1705 /*
1706 * The duplex mode is configured by the PHY,
1707 * therefore it seems to be that there is nothing
1708 * to do here.
1709 */
1710 break;
1711 case SK_LMODE_STAT_UNKNOWN:
1712 default:
1713 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E007, SKERR_HWI_E007MSG);
1714 break;
1715 }
1716} /* SkXmInitDupMd */
1717
1718
1719/******************************************************************************
1720 *
1721 * SkXmInitPauseMd() - initialize the Pause Mode to be used for this port
1722 *
1723 * Description:
1724 * This function initializes the Pause Mode which should
1725 * be used for this port.
1726 * It should be called after successfully finishing
1727 * the Auto-negotiation Process
1728 *
1729 * Returns:
1730 * nothing
1731 */
1732static void SkXmInitPauseMd(
1733SK_AC *pAC, /* adapter context */
1734SK_IOC IoC, /* IO context */
1735int Port) /* Port Index (MAC_1 + n) */
1736{
1737 SK_GEPORT *pPrt;
1738 SK_U32 DWord;
1739 SK_U16 Word;
1740
1741 pPrt = &pAC->GIni.GP[Port];
1742
1743 XM_IN16(IoC, Port, XM_MMU_CMD, &Word);
1744
1745 if (pPrt->PFlowCtrlStatus == SK_FLOW_STAT_NONE ||
1746 pPrt->PFlowCtrlStatus == SK_FLOW_STAT_LOC_SEND) {
1747
1748 /* Disable Pause Frame Reception */
1749 Word |= XM_MMU_IGN_PF;
1750 }
1751 else {
1752 /*
1753 * enabling pause frame reception is required for 1000BT
1754 * because the XMAC is not reset if the link is going down
1755 */
1756 /* Enable Pause Frame Reception */
1757 Word &= ~XM_MMU_IGN_PF;
1758 }
1759
1760 XM_OUT16(IoC, Port, XM_MMU_CMD, Word);
1761
1762 XM_IN32(IoC, Port, XM_MODE, &DWord);
1763
1764 if (pPrt->PFlowCtrlStatus == SK_FLOW_STAT_SYMMETRIC ||
1765 pPrt->PFlowCtrlStatus == SK_FLOW_STAT_LOC_SEND) {
1766
1767 /*
1768 * Configure Pause Frame Generation
1769 * Use internal and external Pause Frame Generation.
1770 * Sending pause frames is edge triggered.
1771 * Send a Pause frame with the maximum pause time if
1772 * internal oder external FIFO full condition occurs.
1773 * Send a zero pause time frame to re-start transmission.
1774 */
1775
1776 /* XM_PAUSE_DA = '010000C28001' (default) */
1777
1778 /* XM_MAC_PTIME = 0xffff (maximum) */
1779 /* remember this value is defined in big endian (!) */
1780 XM_OUT16(IoC, Port, XM_MAC_PTIME, 0xffff);
1781
1782 /* Set Pause Mode in Mode Register */
1783 DWord |= XM_PAUSE_MODE;
1784
1785 /* Set Pause Mode in MAC Rx FIFO */
1786 SK_OUT16(IoC, MR_ADDR(Port, RX_MFF_CTRL1), MFF_ENA_PAUSE);
1787 }
1788 else {
1789 /*
1790 * disable pause frame generation is required for 1000BT
1791 * because the XMAC is not reset if the link is going down
1792 */
1793 /* Disable Pause Mode in Mode Register */
1794 DWord &= ~XM_PAUSE_MODE;
1795
1796 /* Disable Pause Mode in MAC Rx FIFO */
1797 SK_OUT16(IoC, MR_ADDR(Port, RX_MFF_CTRL1), MFF_DIS_PAUSE);
1798 }
1799
1800 XM_OUT32(IoC, Port, XM_MODE, DWord);
1801} /* SkXmInitPauseMd*/
1802
1803
1804/******************************************************************************
1805 *
1806 * SkXmInitPhyXmac() - Initialize the XMAC Phy registers
1807 *
1808 * Description: initializes all the XMACs Phy registers
1809 *
1810 * Note:
1811 *
1812 * Returns:
1813 * nothing
1814 */
1815static void SkXmInitPhyXmac(
1816SK_AC *pAC, /* adapter context */
1817SK_IOC IoC, /* IO context */
1818int Port, /* Port Index (MAC_1 + n) */
1819SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
1820{
1821 SK_GEPORT *pPrt;
1822 SK_U16 Ctrl;
1823
1824 pPrt = &pAC->GIni.GP[Port];
1825 Ctrl = 0;
1826
1827 /* Auto-negotiation ? */
1828 if (pPrt->PLinkMode == SK_LMODE_HALF || pPrt->PLinkMode == SK_LMODE_FULL) {
1829 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1830 ("InitPhyXmac: no auto-negotiation Port %d\n", Port));
1831 /* Set DuplexMode in Config register */
1832 if (pPrt->PLinkMode == SK_LMODE_FULL) {
1833 Ctrl |= PHY_CT_DUP_MD;
1834 }
1835
1836 /*
1837 * Do NOT enable Auto-negotiation here. This would hold
1838 * the link down because no IDLEs are transmitted
1839 */
1840 }
1841 else {
1842 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1843 ("InitPhyXmac: with auto-negotiation Port %d\n", Port));
1844 /* Set Auto-negotiation advertisement */
1845
1846 /* Set Full/half duplex capabilities */
1847 switch (pPrt->PLinkMode) {
1848 case SK_LMODE_AUTOHALF:
1849 Ctrl |= PHY_X_AN_HD;
1850 break;
1851 case SK_LMODE_AUTOFULL:
1852 Ctrl |= PHY_X_AN_FD;
1853 break;
1854 case SK_LMODE_AUTOBOTH:
1855 Ctrl |= PHY_X_AN_FD | PHY_X_AN_HD;
1856 break;
1857 default:
1858 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E015,
1859 SKERR_HWI_E015MSG);
1860 }
1861
1862 /* Set Flow-control capabilities */
1863 switch (pPrt->PFlowCtrlMode) {
1864 case SK_FLOW_MODE_NONE:
1865 Ctrl |= PHY_X_P_NO_PAUSE;
1866 break;
1867 case SK_FLOW_MODE_LOC_SEND:
1868 Ctrl |= PHY_X_P_ASYM_MD;
1869 break;
1870 case SK_FLOW_MODE_SYMMETRIC:
1871 Ctrl |= PHY_X_P_SYM_MD;
1872 break;
1873 case SK_FLOW_MODE_SYM_OR_REM:
1874 Ctrl |= PHY_X_P_BOTH_MD;
1875 break;
1876 default:
1877 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E016,
1878 SKERR_HWI_E016MSG);
1879 }
1880
1881 /* Write AutoNeg Advertisement Register */
1882 SkXmPhyWrite(pAC, IoC, Port, PHY_XMAC_AUNE_ADV, Ctrl);
1883
1884 /* Restart Auto-negotiation */
1885 Ctrl = PHY_CT_ANE | PHY_CT_RE_CFG;
1886 }
1887
1888 if (DoLoop) {
1889 /* Set the Phy Loopback bit, too */
1890 Ctrl |= PHY_CT_LOOP;
1891 }
1892
1893 /* Write to the Phy control register */
1894 SkXmPhyWrite(pAC, IoC, Port, PHY_XMAC_CTRL, Ctrl);
1895} /* SkXmInitPhyXmac */
1896
1897
1898/******************************************************************************
1899 *
1900 * SkXmInitPhyBcom() - Initialize the Broadcom Phy registers
1901 *
1902 * Description: initializes all the Broadcom Phy registers
1903 *
1904 * Note:
1905 *
1906 * Returns:
1907 * nothing
1908 */
1909static void SkXmInitPhyBcom(
1910SK_AC *pAC, /* adapter context */
1911SK_IOC IoC, /* IO context */
1912int Port, /* Port Index (MAC_1 + n) */
1913SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
1914{
1915 SK_GEPORT *pPrt;
1916 SK_U16 Ctrl1;
1917 SK_U16 Ctrl2;
1918 SK_U16 Ctrl3;
1919 SK_U16 Ctrl4;
1920 SK_U16 Ctrl5;
1921
1922 Ctrl1 = PHY_CT_SP1000;
1923 Ctrl2 = 0;
1924 Ctrl3 = PHY_SEL_TYPE;
1925 Ctrl4 = PHY_B_PEC_EN_LTR;
1926 Ctrl5 = PHY_B_AC_TX_TST;
1927
1928 pPrt = &pAC->GIni.GP[Port];
1929
1930 /* manually Master/Slave ? */
1931 if (pPrt->PMSMode != SK_MS_MODE_AUTO) {
1932 Ctrl2 |= PHY_B_1000C_MSE;
1933
1934 if (pPrt->PMSMode == SK_MS_MODE_MASTER) {
1935 Ctrl2 |= PHY_B_1000C_MSC;
1936 }
1937 }
1938 /* Auto-negotiation ? */
1939 if (pPrt->PLinkMode == SK_LMODE_HALF || pPrt->PLinkMode == SK_LMODE_FULL) {
1940 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1941 ("InitPhyBcom: no auto-negotiation Port %d\n", Port));
1942 /* Set DuplexMode in Config register */
1943 if (pPrt->PLinkMode == SK_LMODE_FULL) {
1944 Ctrl1 |= PHY_CT_DUP_MD;
1945 }
1946
1947 /* Determine Master/Slave manually if not already done */
1948 if (pPrt->PMSMode == SK_MS_MODE_AUTO) {
1949 Ctrl2 |= PHY_B_1000C_MSE; /* set it to Slave */
1950 }
1951
1952 /*
1953 * Do NOT enable Auto-negotiation here. This would hold
1954 * the link down because no IDLES are transmitted
1955 */
1956 }
1957 else {
1958 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
1959 ("InitPhyBcom: with auto-negotiation Port %d\n", Port));
1960 /* Set Auto-negotiation advertisement */
1961
1962 /*
1963 * Workaround BCOM Errata #1 for the C5 type.
1964 * 1000Base-T Link Acquisition Failure in Slave Mode
1965 * Set Repeater/DTE bit 10 of the 1000Base-T Control Register
1966 */
1967 Ctrl2 |= PHY_B_1000C_RD;
1968
1969 /* Set Full/half duplex capabilities */
1970 switch (pPrt->PLinkMode) {
1971 case SK_LMODE_AUTOHALF:
1972 Ctrl2 |= PHY_B_1000C_AHD;
1973 break;
1974 case SK_LMODE_AUTOFULL:
1975 Ctrl2 |= PHY_B_1000C_AFD;
1976 break;
1977 case SK_LMODE_AUTOBOTH:
1978 Ctrl2 |= PHY_B_1000C_AFD | PHY_B_1000C_AHD;
1979 break;
1980 default:
1981 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E015,
1982 SKERR_HWI_E015MSG);
1983 }
1984
1985 /* Set Flow-control capabilities */
1986 switch (pPrt->PFlowCtrlMode) {
1987 case SK_FLOW_MODE_NONE:
1988 Ctrl3 |= PHY_B_P_NO_PAUSE;
1989 break;
1990 case SK_FLOW_MODE_LOC_SEND:
1991 Ctrl3 |= PHY_B_P_ASYM_MD;
1992 break;
1993 case SK_FLOW_MODE_SYMMETRIC:
1994 Ctrl3 |= PHY_B_P_SYM_MD;
1995 break;
1996 case SK_FLOW_MODE_SYM_OR_REM:
1997 Ctrl3 |= PHY_B_P_BOTH_MD;
1998 break;
1999 default:
2000 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E016,
2001 SKERR_HWI_E016MSG);
2002 }
2003
2004 /* Restart Auto-negotiation */
2005 Ctrl1 |= PHY_CT_ANE | PHY_CT_RE_CFG;
2006 }
2007
2008 /* Initialize LED register here? */
2009 /* No. Please do it in SkDgXmitLed() (if required) and swap
2010 init order of LEDs and XMAC. (MAl) */
2011
2012 /* Write 1000Base-T Control Register */
2013 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_1000T_CTRL, Ctrl2);
2014 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2015 ("Set 1000B-T Ctrl Reg=0x%04X\n", Ctrl2));
2016
2017 /* Write AutoNeg Advertisement Register */
2018 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_AUNE_ADV, Ctrl3);
2019 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2020 ("Set Auto-Neg.Adv.Reg=0x%04X\n", Ctrl3));
2021
2022 if (DoLoop) {
2023 /* Set the Phy Loopback bit, too */
2024 Ctrl1 |= PHY_CT_LOOP;
2025 }
2026
2027 if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) {
2028 /* configure FIFO to high latency for transmission of ext. packets */
2029 Ctrl4 |= PHY_B_PEC_HIGH_LA;
2030
2031 /* configure reception of extended packets */
2032 Ctrl5 |= PHY_B_AC_LONG_PACK;
2033
2034 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_AUX_CTRL, Ctrl5);
2035 }
2036
2037 /* Configure LED Traffic Mode and Jumbo Frame usage if specified */
2038 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_P_EXT_CTRL, Ctrl4);
2039
2040 /* Write to the Phy control register */
2041 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_CTRL, Ctrl1);
2042 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2043 ("PHY Control Reg=0x%04X\n", Ctrl1));
2044} /* SkXmInitPhyBcom */
2045#endif /* GENESIS */
2046
2047#ifdef YUKON
2048/******************************************************************************
2049 *
2050 * SkGmInitPhyMarv() - Initialize the Marvell Phy registers
2051 *
2052 * Description: initializes all the Marvell Phy registers
2053 *
2054 * Note:
2055 *
2056 * Returns:
2057 * nothing
2058 */
2059static void SkGmInitPhyMarv(
2060SK_AC *pAC, /* adapter context */
2061SK_IOC IoC, /* IO context */
2062int Port, /* Port Index (MAC_1 + n) */
2063SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
2064{
2065 SK_GEPORT *pPrt;
2066 SK_U16 PhyCtrl;
2067 SK_U16 C1000BaseT;
2068 SK_U16 AutoNegAdv;
2069 SK_U16 ExtPhyCtrl;
2070 SK_U16 LedCtrl;
2071 SK_BOOL AutoNeg;
2072#if defined(SK_DIAG) || defined(DEBUG)
2073 SK_U16 PhyStat;
2074 SK_U16 PhyStat1;
2075 SK_U16 PhySpecStat;
2076#endif /* SK_DIAG || DEBUG */
2077
2078 pPrt = &pAC->GIni.GP[Port];
2079
2080 /* Auto-negotiation ? */
2081 if (pPrt->PLinkMode == SK_LMODE_HALF || pPrt->PLinkMode == SK_LMODE_FULL) {
2082 AutoNeg = SK_FALSE;
2083 }
2084 else {
2085 AutoNeg = SK_TRUE;
2086 }
2087
2088 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2089 ("InitPhyMarv: Port %d, auto-negotiation %s\n",
2090 Port, AutoNeg ? "ON" : "OFF"));
2091
2092#ifdef VCPU
2093 VCPUprintf(0, "SkGmInitPhyMarv(), Port=%u, DoLoop=%u\n",
2094 Port, DoLoop);
2095#else /* VCPU */
2096 if (DoLoop) {
2097 /* Set 'MAC Power up'-bit, set Manual MDI configuration */
2098 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_PHY_CTRL,
2099 PHY_M_PC_MAC_POW_UP);
2100 }
2101 else if (AutoNeg && pPrt->PLinkSpeed == SK_LSPEED_AUTO) {
2102 /* Read Ext. PHY Specific Control */
2103 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_EXT_CTRL, &ExtPhyCtrl);
2104
2105 ExtPhyCtrl &= ~(PHY_M_EC_M_DSC_MSK | PHY_M_EC_S_DSC_MSK |
2106 PHY_M_EC_MAC_S_MSK);
2107
2108 ExtPhyCtrl |= PHY_M_EC_MAC_S(MAC_TX_CLK_25_MHZ) |
2109 PHY_M_EC_M_DSC(0) | PHY_M_EC_S_DSC(1);
2110
2111 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_EXT_CTRL, ExtPhyCtrl);
2112 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2113 ("Set Ext. PHY Ctrl=0x%04X\n", ExtPhyCtrl));
2114 }
2115
2116 /* Read PHY Control */
2117 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_CTRL, &PhyCtrl);
2118
2119 if (!AutoNeg) {
2120 /* Disable Auto-negotiation */
2121 PhyCtrl &= ~PHY_CT_ANE;
2122 }
2123
2124 PhyCtrl |= PHY_CT_RESET;
2125 /* Assert software reset */
2126 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_CTRL, PhyCtrl);
2127#endif /* VCPU */
2128
2129 PhyCtrl = 0 /* PHY_CT_COL_TST */;
2130 C1000BaseT = 0;
2131 AutoNegAdv = PHY_SEL_TYPE;
2132
2133 /* manually Master/Slave ? */
2134 if (pPrt->PMSMode != SK_MS_MODE_AUTO) {
2135 /* enable Manual Master/Slave */
2136 C1000BaseT |= PHY_M_1000C_MSE;
2137
2138 if (pPrt->PMSMode == SK_MS_MODE_MASTER) {
2139 C1000BaseT |= PHY_M_1000C_MSC; /* set it to Master */
2140 }
2141 }
2142
2143 /* Auto-negotiation ? */
2144 if (!AutoNeg) {
2145
2146 if (pPrt->PLinkMode == SK_LMODE_FULL) {
2147 /* Set Full Duplex Mode */
2148 PhyCtrl |= PHY_CT_DUP_MD;
2149 }
2150
2151 /* Set Master/Slave manually if not already done */
2152 if (pPrt->PMSMode == SK_MS_MODE_AUTO) {
2153 C1000BaseT |= PHY_M_1000C_MSE; /* set it to Slave */
2154 }
2155
2156 /* Set Speed */
2157 switch (pPrt->PLinkSpeed) {
2158 case SK_LSPEED_AUTO:
2159 case SK_LSPEED_1000MBPS:
2160 PhyCtrl |= PHY_CT_SP1000;
2161 break;
2162 case SK_LSPEED_100MBPS:
2163 PhyCtrl |= PHY_CT_SP100;
2164 break;
2165 case SK_LSPEED_10MBPS:
2166 break;
2167 default:
2168 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E019,
2169 SKERR_HWI_E019MSG);
2170 }
2171
2172 if (!DoLoop) {
2173 PhyCtrl |= PHY_CT_RESET;
2174 }
2175 }
2176 else {
2177 /* Set Auto-negotiation advertisement */
2178
2179 if (pAC->GIni.GICopperType) {
2180 /* Set Speed capabilities */
2181 switch (pPrt->PLinkSpeed) {
2182 case SK_LSPEED_AUTO:
2183 C1000BaseT |= PHY_M_1000C_AHD | PHY_M_1000C_AFD;
2184 AutoNegAdv |= PHY_M_AN_100_FD | PHY_M_AN_100_HD |
2185 PHY_M_AN_10_FD | PHY_M_AN_10_HD;
2186 break;
2187 case SK_LSPEED_1000MBPS:
2188 C1000BaseT |= PHY_M_1000C_AHD | PHY_M_1000C_AFD;
2189 break;
2190 case SK_LSPEED_100MBPS:
2191 AutoNegAdv |= PHY_M_AN_100_FD | PHY_M_AN_100_HD |
2192 /* advertise 10Base-T also */
2193 PHY_M_AN_10_FD | PHY_M_AN_10_HD;
2194 break;
2195 case SK_LSPEED_10MBPS:
2196 AutoNegAdv |= PHY_M_AN_10_FD | PHY_M_AN_10_HD;
2197 break;
2198 default:
2199 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E019,
2200 SKERR_HWI_E019MSG);
2201 }
2202
2203 /* Set Full/half duplex capabilities */
2204 switch (pPrt->PLinkMode) {
2205 case SK_LMODE_AUTOHALF:
2206 C1000BaseT &= ~PHY_M_1000C_AFD;
2207 AutoNegAdv &= ~(PHY_M_AN_100_FD | PHY_M_AN_10_FD);
2208 break;
2209 case SK_LMODE_AUTOFULL:
2210 C1000BaseT &= ~PHY_M_1000C_AHD;
2211 AutoNegAdv &= ~(PHY_M_AN_100_HD | PHY_M_AN_10_HD);
2212 break;
2213 case SK_LMODE_AUTOBOTH:
2214 break;
2215 default:
2216 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E015,
2217 SKERR_HWI_E015MSG);
2218 }
2219
2220 /* Set Flow-control capabilities */
2221 switch (pPrt->PFlowCtrlMode) {
2222 case SK_FLOW_MODE_NONE:
2223 AutoNegAdv |= PHY_B_P_NO_PAUSE;
2224 break;
2225 case SK_FLOW_MODE_LOC_SEND:
2226 AutoNegAdv |= PHY_B_P_ASYM_MD;
2227 break;
2228 case SK_FLOW_MODE_SYMMETRIC:
2229 AutoNegAdv |= PHY_B_P_SYM_MD;
2230 break;
2231 case SK_FLOW_MODE_SYM_OR_REM:
2232 AutoNegAdv |= PHY_B_P_BOTH_MD;
2233 break;
2234 default:
2235 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E016,
2236 SKERR_HWI_E016MSG);
2237 }
2238 }
2239 else { /* special defines for FIBER (88E1011S only) */
2240
2241 /* Set Full/half duplex capabilities */
2242 switch (pPrt->PLinkMode) {
2243 case SK_LMODE_AUTOHALF:
2244 AutoNegAdv |= PHY_M_AN_1000X_AHD;
2245 break;
2246 case SK_LMODE_AUTOFULL:
2247 AutoNegAdv |= PHY_M_AN_1000X_AFD;
2248 break;
2249 case SK_LMODE_AUTOBOTH:
2250 AutoNegAdv |= PHY_M_AN_1000X_AHD | PHY_M_AN_1000X_AFD;
2251 break;
2252 default:
2253 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E015,
2254 SKERR_HWI_E015MSG);
2255 }
2256
2257 /* Set Flow-control capabilities */
2258 switch (pPrt->PFlowCtrlMode) {
2259 case SK_FLOW_MODE_NONE:
2260 AutoNegAdv |= PHY_M_P_NO_PAUSE_X;
2261 break;
2262 case SK_FLOW_MODE_LOC_SEND:
2263 AutoNegAdv |= PHY_M_P_ASYM_MD_X;
2264 break;
2265 case SK_FLOW_MODE_SYMMETRIC:
2266 AutoNegAdv |= PHY_M_P_SYM_MD_X;
2267 break;
2268 case SK_FLOW_MODE_SYM_OR_REM:
2269 AutoNegAdv |= PHY_M_P_BOTH_MD_X;
2270 break;
2271 default:
2272 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E016,
2273 SKERR_HWI_E016MSG);
2274 }
2275 }
2276
2277 if (!DoLoop) {
2278 /* Restart Auto-negotiation */
2279 PhyCtrl |= PHY_CT_ANE | PHY_CT_RE_CFG;
2280 }
2281 }
2282
2283#ifdef VCPU
2284 /*
2285 * E-mail from Gu Lin (08-03-2002):
2286 */
2287
2288 /* Program PHY register 30 as 16'h0708 for simulation speed up */
2289 SkGmPhyWrite(pAC, IoC, Port, 30, 0x0700 /* 0x0708 */);
2290
2291 VCpuWait(2000);
2292
2293#else /* VCPU */
2294
2295 /* Write 1000Base-T Control Register */
2296 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_1000T_CTRL, C1000BaseT);
2297 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2298 ("Set 1000B-T Ctrl =0x%04X\n", C1000BaseT));
2299
2300 /* Write AutoNeg Advertisement Register */
2301 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_AUNE_ADV, AutoNegAdv);
2302 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2303 ("Set Auto-Neg.Adv.=0x%04X\n", AutoNegAdv));
2304#endif /* VCPU */
2305
2306 if (DoLoop) {
2307 /* Set the PHY Loopback bit */
2308 PhyCtrl |= PHY_CT_LOOP;
2309
2310#ifdef XXX
2311 /* Program PHY register 16 as 16'h0400 to force link good */
2312 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_PHY_CTRL, PHY_M_PC_FL_GOOD);
2313#endif /* XXX */
2314
2315#ifndef VCPU
2316 if (pPrt->PLinkSpeed != SK_LSPEED_AUTO) {
2317 /* Write Ext. PHY Specific Control */
2318 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_EXT_CTRL,
2319 (SK_U16)((pPrt->PLinkSpeed + 2) << 4));
2320 }
2321#endif /* VCPU */
2322 }
2323#ifdef TEST_ONLY
2324 else if (pPrt->PLinkSpeed == SK_LSPEED_10MBPS) {
2325 /* Write PHY Specific Control */
2326 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_PHY_CTRL,
2327 PHY_M_PC_EN_DET_MSK);
2328 }
2329#endif
2330
2331 /* Write to the PHY Control register */
2332 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_CTRL, PhyCtrl);
2333 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2334 ("Set PHY Ctrl Reg.=0x%04X\n", PhyCtrl));
2335
2336#ifdef VCPU
2337 VCpuWait(2000);
2338#else
2339
2340 LedCtrl = PHY_M_LED_PULS_DUR(PULS_170MS) | PHY_M_LED_BLINK_RT(BLINK_84MS);
2341
2342 if ((pAC->GIni.GILedBlinkCtrl & SK_ACT_LED_BLINK) != 0) {
2343 LedCtrl |= PHY_M_LEDC_RX_CTRL | PHY_M_LEDC_TX_CTRL;
2344 }
2345
2346 if ((pAC->GIni.GILedBlinkCtrl & SK_DUP_LED_NORMAL) != 0) {
2347 LedCtrl |= PHY_M_LEDC_DP_CTRL;
2348 }
2349
2350 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_LED_CTRL, LedCtrl);
2351
2352 if ((pAC->GIni.GILedBlinkCtrl & SK_LED_LINK100_ON) != 0) {
2353 /* only in forced 100 Mbps mode */
2354 if (!AutoNeg && pPrt->PLinkSpeed == SK_LSPEED_100MBPS) {
2355
2356 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_LED_OVER,
2357 PHY_M_LED_MO_100(MO_LED_ON));
2358 }
2359 }
2360
2361#ifdef SK_DIAG
2362 c_print("Set PHY Ctrl=0x%04X\n", PhyCtrl);
2363 c_print("Set 1000 B-T=0x%04X\n", C1000BaseT);
2364 c_print("Set Auto-Neg=0x%04X\n", AutoNegAdv);
2365 c_print("Set Ext Ctrl=0x%04X\n", ExtPhyCtrl);
2366#endif /* SK_DIAG */
2367
2368#if defined(SK_DIAG) || defined(DEBUG)
2369 /* Read PHY Control */
2370 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_CTRL, &PhyCtrl);
2371 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2372 ("PHY Ctrl Reg.=0x%04X\n", PhyCtrl));
2373
2374 /* Read 1000Base-T Control Register */
2375 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_1000T_CTRL, &C1000BaseT);
2376 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2377 ("1000B-T Ctrl =0x%04X\n", C1000BaseT));
2378
2379 /* Read AutoNeg Advertisement Register */
2380 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_AUNE_ADV, &AutoNegAdv);
2381 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2382 ("Auto-Neg.Adv.=0x%04X\n", AutoNegAdv));
2383
2384 /* Read Ext. PHY Specific Control */
2385 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_EXT_CTRL, &ExtPhyCtrl);
2386 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2387 ("Ext. PHY Ctrl=0x%04X\n", ExtPhyCtrl));
2388
2389 /* Read PHY Status */
2390 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_STAT, &PhyStat);
2391 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2392 ("PHY Stat Reg.=0x%04X\n", PhyStat));
2393 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_STAT, &PhyStat1);
2394 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2395 ("PHY Stat Reg.=0x%04X\n", PhyStat1));
2396
2397 /* Read PHY Specific Status */
2398 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_PHY_STAT, &PhySpecStat);
2399 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2400 ("PHY Spec Stat=0x%04X\n", PhySpecStat));
2401#endif /* SK_DIAG || DEBUG */
2402
2403#ifdef SK_DIAG
2404 c_print("PHY Ctrl Reg=0x%04X\n", PhyCtrl);
2405 c_print("PHY 1000 Reg=0x%04X\n", C1000BaseT);
2406 c_print("PHY AnAd Reg=0x%04X\n", AutoNegAdv);
2407 c_print("Ext Ctrl Reg=0x%04X\n", ExtPhyCtrl);
2408 c_print("PHY Stat Reg=0x%04X\n", PhyStat);
2409 c_print("PHY Stat Reg=0x%04X\n", PhyStat1);
2410 c_print("PHY Spec Reg=0x%04X\n", PhySpecStat);
2411#endif /* SK_DIAG */
2412
2413#endif /* VCPU */
2414
2415} /* SkGmInitPhyMarv */
2416#endif /* YUKON */
2417
2418
2419#ifdef OTHER_PHY
2420/******************************************************************************
2421 *
2422 * SkXmInitPhyLone() - Initialize the Level One Phy registers
2423 *
2424 * Description: initializes all the Level One Phy registers
2425 *
2426 * Note:
2427 *
2428 * Returns:
2429 * nothing
2430 */
2431static void SkXmInitPhyLone(
2432SK_AC *pAC, /* adapter context */
2433SK_IOC IoC, /* IO context */
2434int Port, /* Port Index (MAC_1 + n) */
2435SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
2436{
2437 SK_GEPORT *pPrt;
2438 SK_U16 Ctrl1;
2439 SK_U16 Ctrl2;
2440 SK_U16 Ctrl3;
2441
2442 Ctrl1 = PHY_CT_SP1000;
2443 Ctrl2 = 0;
2444 Ctrl3 = PHY_SEL_TYPE;
2445
2446 pPrt = &pAC->GIni.GP[Port];
2447
2448 /* manually Master/Slave ? */
2449 if (pPrt->PMSMode != SK_MS_MODE_AUTO) {
2450 Ctrl2 |= PHY_L_1000C_MSE;
2451
2452 if (pPrt->PMSMode == SK_MS_MODE_MASTER) {
2453 Ctrl2 |= PHY_L_1000C_MSC;
2454 }
2455 }
2456 /* Auto-negotiation ? */
2457 if (pPrt->PLinkMode == SK_LMODE_HALF || pPrt->PLinkMode == SK_LMODE_FULL) {
2458 /*
2459 * level one spec say: "1000 Mbps: manual mode not allowed"
2460 * but lets see what happens...
2461 */
2462 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2463 ("InitPhyLone: no auto-negotiation Port %d\n", Port));
2464 /* Set DuplexMode in Config register */
2465 if (pPrt->PLinkMode == SK_LMODE_FULL) {
2466 Ctrl1 |= PHY_CT_DUP_MD;
2467 }
2468
2469 /* Determine Master/Slave manually if not already done */
2470 if (pPrt->PMSMode == SK_MS_MODE_AUTO) {
2471 Ctrl2 |= PHY_L_1000C_MSE; /* set it to Slave */
2472 }
2473
2474 /*
2475 * Do NOT enable Auto-negotiation here. This would hold
2476 * the link down because no IDLES are transmitted
2477 */
2478 }
2479 else {
2480 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2481 ("InitPhyLone: with auto-negotiation Port %d\n", Port));
2482 /* Set Auto-negotiation advertisement */
2483
2484 /* Set Full/half duplex capabilities */
2485 switch (pPrt->PLinkMode) {
2486 case SK_LMODE_AUTOHALF:
2487 Ctrl2 |= PHY_L_1000C_AHD;
2488 break;
2489 case SK_LMODE_AUTOFULL:
2490 Ctrl2 |= PHY_L_1000C_AFD;
2491 break;
2492 case SK_LMODE_AUTOBOTH:
2493 Ctrl2 |= PHY_L_1000C_AFD | PHY_L_1000C_AHD;
2494 break;
2495 default:
2496 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E015,
2497 SKERR_HWI_E015MSG);
2498 }
2499
2500 /* Set Flow-control capabilities */
2501 switch (pPrt->PFlowCtrlMode) {
2502 case SK_FLOW_MODE_NONE:
2503 Ctrl3 |= PHY_L_P_NO_PAUSE;
2504 break;
2505 case SK_FLOW_MODE_LOC_SEND:
2506 Ctrl3 |= PHY_L_P_ASYM_MD;
2507 break;
2508 case SK_FLOW_MODE_SYMMETRIC:
2509 Ctrl3 |= PHY_L_P_SYM_MD;
2510 break;
2511 case SK_FLOW_MODE_SYM_OR_REM:
2512 Ctrl3 |= PHY_L_P_BOTH_MD;
2513 break;
2514 default:
2515 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E016,
2516 SKERR_HWI_E016MSG);
2517 }
2518
2519 /* Restart Auto-negotiation */
2520 Ctrl1 = PHY_CT_ANE | PHY_CT_RE_CFG;
2521 }
2522
2523 /* Write 1000Base-T Control Register */
2524 SkXmPhyWrite(pAC, IoC, Port, PHY_LONE_1000T_CTRL, Ctrl2);
2525 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2526 ("1000B-T Ctrl Reg=0x%04X\n", Ctrl2));
2527
2528 /* Write AutoNeg Advertisement Register */
2529 SkXmPhyWrite(pAC, IoC, Port, PHY_LONE_AUNE_ADV, Ctrl3);
2530 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2531 ("Auto-Neg.Adv.Reg=0x%04X\n", Ctrl3));
2532
2533 if (DoLoop) {
2534 /* Set the Phy Loopback bit, too */
2535 Ctrl1 |= PHY_CT_LOOP;
2536 }
2537
2538 /* Write to the Phy control register */
2539 SkXmPhyWrite(pAC, IoC, Port, PHY_LONE_CTRL, Ctrl1);
2540 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2541 ("PHY Control Reg=0x%04X\n", Ctrl1));
2542} /* SkXmInitPhyLone */
2543
2544
2545/******************************************************************************
2546 *
2547 * SkXmInitPhyNat() - Initialize the National Phy registers
2548 *
2549 * Description: initializes all the National Phy registers
2550 *
2551 * Note:
2552 *
2553 * Returns:
2554 * nothing
2555 */
2556static void SkXmInitPhyNat(
2557SK_AC *pAC, /* adapter context */
2558SK_IOC IoC, /* IO context */
2559int Port, /* Port Index (MAC_1 + n) */
2560SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
2561{
2562/* todo: National */
2563} /* SkXmInitPhyNat */
2564#endif /* OTHER_PHY */
2565
2566
2567/******************************************************************************
2568 *
2569 * SkMacInitPhy() - Initialize the PHY registers
2570 *
2571 * Description: calls the Init PHY routines dep. on board type
2572 *
2573 * Note:
2574 *
2575 * Returns:
2576 * nothing
2577 */
2578void SkMacInitPhy(
2579SK_AC *pAC, /* adapter context */
2580SK_IOC IoC, /* IO context */
2581int Port, /* Port Index (MAC_1 + n) */
2582SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
2583{
2584 SK_GEPORT *pPrt;
2585
2586 pPrt = &pAC->GIni.GP[Port];
2587
2588#ifdef GENESIS
2589 if (pAC->GIni.GIGenesis) {
2590
2591 switch (pPrt->PhyType) {
2592 case SK_PHY_XMAC:
2593 SkXmInitPhyXmac(pAC, IoC, Port, DoLoop);
2594 break;
2595 case SK_PHY_BCOM:
2596 SkXmInitPhyBcom(pAC, IoC, Port, DoLoop);
2597 break;
2598#ifdef OTHER_PHY
2599 case SK_PHY_LONE:
2600 SkXmInitPhyLone(pAC, IoC, Port, DoLoop);
2601 break;
2602 case SK_PHY_NAT:
2603 SkXmInitPhyNat(pAC, IoC, Port, DoLoop);
2604 break;
2605#endif /* OTHER_PHY */
2606 }
2607 }
2608#endif /* GENESIS */
2609
2610#ifdef YUKON
2611 if (pAC->GIni.GIYukon) {
2612
2613 SkGmInitPhyMarv(pAC, IoC, Port, DoLoop);
2614 }
2615#endif /* YUKON */
2616
2617} /* SkMacInitPhy */
2618
2619
2620#ifdef GENESIS
2621/******************************************************************************
2622 *
2623 * SkXmAutoNegDoneXmac() - Auto-negotiation handling
2624 *
2625 * Description:
2626 * This function handles the auto-negotiation if the Done bit is set.
2627 *
2628 * Returns:
2629 * SK_AND_OK o.k.
2630 * SK_AND_DUP_CAP Duplex capability error happened
2631 * SK_AND_OTHER Other error happened
2632 */
2633static int SkXmAutoNegDoneXmac(
2634SK_AC *pAC, /* adapter context */
2635SK_IOC IoC, /* IO context */
2636int Port) /* Port Index (MAC_1 + n) */
2637{
2638 SK_GEPORT *pPrt;
2639 SK_U16 ResAb; /* Resolved Ability */
2640 SK_U16 LPAb; /* Link Partner Ability */
2641
2642 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2643 ("AutoNegDoneXmac, Port %d\n", Port));
2644
2645 pPrt = &pAC->GIni.GP[Port];
2646
2647 /* Get PHY parameters */
2648 SkXmPhyRead(pAC, IoC, Port, PHY_XMAC_AUNE_LP, &LPAb);
2649 SkXmPhyRead(pAC, IoC, Port, PHY_XMAC_RES_ABI, &ResAb);
2650
2651 if ((LPAb & PHY_X_AN_RFB) != 0) {
2652 /* At least one of the remote fault bit is set */
2653 /* Error */
2654 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2655 ("AutoNegFail: Remote fault bit set Port %d\n", Port));
2656 pPrt->PAutoNegFail = SK_TRUE;
2657 return(SK_AND_OTHER);
2658 }
2659
2660 /* Check Duplex mismatch */
2661 if ((ResAb & (PHY_X_RS_HD | PHY_X_RS_FD)) == PHY_X_RS_FD) {
2662 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_AUTOFULL;
2663 }
2664 else if ((ResAb & (PHY_X_RS_HD | PHY_X_RS_FD)) == PHY_X_RS_HD) {
2665 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_AUTOHALF;
2666 }
2667 else {
2668 /* Error */
2669 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2670 ("AutoNegFail: Duplex mode mismatch Port %d\n", Port));
2671 pPrt->PAutoNegFail = SK_TRUE;
2672 return(SK_AND_DUP_CAP);
2673 }
2674
2675 /* Check PAUSE mismatch */
2676 /* We are NOT using chapter 4.23 of the Xaqti manual */
2677 /* We are using IEEE 802.3z/D5.0 Table 37-4 */
2678 if ((pPrt->PFlowCtrlMode == SK_FLOW_MODE_SYMMETRIC ||
2679 pPrt->PFlowCtrlMode == SK_FLOW_MODE_SYM_OR_REM) &&
2680 (LPAb & PHY_X_P_SYM_MD) != 0) {
2681 /* Symmetric PAUSE */
2682 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_SYMMETRIC;
2683 }
2684 else if (pPrt->PFlowCtrlMode == SK_FLOW_MODE_SYM_OR_REM &&
2685 (LPAb & PHY_X_RS_PAUSE) == PHY_X_P_ASYM_MD) {
2686 /* Enable PAUSE receive, disable PAUSE transmit */
2687 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_REM_SEND;
2688 }
2689 else if (pPrt->PFlowCtrlMode == SK_FLOW_MODE_LOC_SEND &&
2690 (LPAb & PHY_X_RS_PAUSE) == PHY_X_P_BOTH_MD) {
2691 /* Disable PAUSE receive, enable PAUSE transmit */
2692 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_LOC_SEND;
2693 }
2694 else {
2695 /* PAUSE mismatch -> no PAUSE */
2696 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE;
2697 }
2698 pPrt->PLinkSpeedUsed = (SK_U8)SK_LSPEED_STAT_1000MBPS;
2699
2700 return(SK_AND_OK);
2701} /* SkXmAutoNegDoneXmac */
2702
2703
2704/******************************************************************************
2705 *
2706 * SkXmAutoNegDoneBcom() - Auto-negotiation handling
2707 *
2708 * Description:
2709 * This function handles the auto-negotiation if the Done bit is set.
2710 *
2711 * Returns:
2712 * SK_AND_OK o.k.
2713 * SK_AND_DUP_CAP Duplex capability error happened
2714 * SK_AND_OTHER Other error happened
2715 */
2716static int SkXmAutoNegDoneBcom(
2717SK_AC *pAC, /* adapter context */
2718SK_IOC IoC, /* IO context */
2719int Port) /* Port Index (MAC_1 + n) */
2720{
2721 SK_GEPORT *pPrt;
2722 SK_U16 LPAb; /* Link Partner Ability */
2723 SK_U16 AuxStat; /* Auxiliary Status */
2724
2725#ifdef TEST_ONLY
272601-Sep-2000 RA;:;:
2727 SK_U16 ResAb; /* Resolved Ability */
2728#endif /* 0 */
2729
2730 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2731 ("AutoNegDoneBcom, Port %d\n", Port));
2732 pPrt = &pAC->GIni.GP[Port];
2733
2734 /* Get PHY parameters */
2735 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUNE_LP, &LPAb);
2736#ifdef TEST_ONLY
273701-Sep-2000 RA;:;:
2738 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_1000T_STAT, &ResAb);
2739#endif /* 0 */
2740
2741 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUX_STAT, &AuxStat);
2742
2743 if ((LPAb & PHY_B_AN_RF) != 0) {
2744 /* Remote fault bit is set: Error */
2745 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2746 ("AutoNegFail: Remote fault bit set Port %d\n", Port));
2747 pPrt->PAutoNegFail = SK_TRUE;
2748 return(SK_AND_OTHER);
2749 }
2750
2751 /* Check Duplex mismatch */
2752 if ((AuxStat & PHY_B_AS_AN_RES_MSK) == PHY_B_RES_1000FD) {
2753 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_AUTOFULL;
2754 }
2755 else if ((AuxStat & PHY_B_AS_AN_RES_MSK) == PHY_B_RES_1000HD) {
2756 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_AUTOHALF;
2757 }
2758 else {
2759 /* Error */
2760 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2761 ("AutoNegFail: Duplex mode mismatch Port %d\n", Port));
2762 pPrt->PAutoNegFail = SK_TRUE;
2763 return(SK_AND_DUP_CAP);
2764 }
2765
2766#ifdef TEST_ONLY
276701-Sep-2000 RA;:;:
2768 /* Check Master/Slave resolution */
2769 if ((ResAb & PHY_B_1000S_MSF) != 0) {
2770 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2771 ("Master/Slave Fault Port %d\n", Port));
2772 pPrt->PAutoNegFail = SK_TRUE;
2773 pPrt->PMSStatus = SK_MS_STAT_FAULT;
2774 return(SK_AND_OTHER);
2775 }
2776
2777 pPrt->PMSStatus = ((ResAb & PHY_B_1000S_MSR) != 0) ?
2778 SK_MS_STAT_MASTER : SK_MS_STAT_SLAVE;
2779#endif /* 0 */
2780
2781 /* Check PAUSE mismatch ??? */
2782 /* We are using IEEE 802.3z/D5.0 Table 37-4 */
2783 if ((AuxStat & PHY_B_AS_PAUSE_MSK) == PHY_B_AS_PAUSE_MSK) {
2784 /* Symmetric PAUSE */
2785 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_SYMMETRIC;
2786 }
2787 else if ((AuxStat & PHY_B_AS_PAUSE_MSK) == PHY_B_AS_PRR) {
2788 /* Enable PAUSE receive, disable PAUSE transmit */
2789 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_REM_SEND;
2790 }
2791 else if ((AuxStat & PHY_B_AS_PAUSE_MSK) == PHY_B_AS_PRT) {
2792 /* Disable PAUSE receive, enable PAUSE transmit */
2793 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_LOC_SEND;
2794 }
2795 else {
2796 /* PAUSE mismatch -> no PAUSE */
2797 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE;
2798 }
2799 pPrt->PLinkSpeedUsed = (SK_U8)SK_LSPEED_STAT_1000MBPS;
2800
2801 return(SK_AND_OK);
2802} /* SkXmAutoNegDoneBcom */
2803#endif /* GENESIS */
2804
2805
2806#ifdef YUKON
2807/******************************************************************************
2808 *
2809 * SkGmAutoNegDoneMarv() - Auto-negotiation handling
2810 *
2811 * Description:
2812 * This function handles the auto-negotiation if the Done bit is set.
2813 *
2814 * Returns:
2815 * SK_AND_OK o.k.
2816 * SK_AND_DUP_CAP Duplex capability error happened
2817 * SK_AND_OTHER Other error happened
2818 */
2819static int SkGmAutoNegDoneMarv(
2820SK_AC *pAC, /* adapter context */
2821SK_IOC IoC, /* IO context */
2822int Port) /* Port Index (MAC_1 + n) */
2823{
2824 SK_GEPORT *pPrt;
2825 SK_U16 LPAb; /* Link Partner Ability */
2826 SK_U16 ResAb; /* Resolved Ability */
2827 SK_U16 AuxStat; /* Auxiliary Status */
2828
2829 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2830 ("AutoNegDoneMarv, Port %d\n", Port));
2831 pPrt = &pAC->GIni.GP[Port];
2832
2833 /* Get PHY parameters */
2834 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_AUNE_LP, &LPAb);
2835 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2836 ("Link P.Abil.=0x%04X\n", LPAb));
2837
2838 if ((LPAb & PHY_M_AN_RF) != 0) {
2839 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2840 ("AutoNegFail: Remote fault bit set Port %d\n", Port));
2841 pPrt->PAutoNegFail = SK_TRUE;
2842 return(SK_AND_OTHER);
2843 }
2844
2845 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_1000T_STAT, &ResAb);
2846
2847 /* Check Master/Slave resolution */
2848 if ((ResAb & PHY_B_1000S_MSF) != 0) {
2849 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2850 ("Master/Slave Fault Port %d\n", Port));
2851 pPrt->PAutoNegFail = SK_TRUE;
2852 pPrt->PMSStatus = SK_MS_STAT_FAULT;
2853 return(SK_AND_OTHER);
2854 }
2855
2856 pPrt->PMSStatus = ((ResAb & PHY_B_1000S_MSR) != 0) ?
2857 (SK_U8)SK_MS_STAT_MASTER : (SK_U8)SK_MS_STAT_SLAVE;
2858
2859 /* Read PHY Specific Status */
2860 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_PHY_STAT, &AuxStat);
2861
2862 /* Check Speed & Duplex resolved */
2863 if ((AuxStat & PHY_M_PS_SPDUP_RES) == 0) {
2864 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2865 ("AutoNegFail: Speed & Duplex not resolved, Port %d\n", Port));
2866 pPrt->PAutoNegFail = SK_TRUE;
2867 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_UNKNOWN;
2868 return(SK_AND_DUP_CAP);
2869 }
2870
2871 if ((AuxStat & PHY_M_PS_FULL_DUP) != 0) {
2872 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_AUTOFULL;
2873 }
2874 else {
2875 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_AUTOHALF;
2876 }
2877
2878 /* Check PAUSE mismatch ??? */
2879 /* We are using IEEE 802.3z/D5.0 Table 37-4 */
2880 if ((AuxStat & PHY_M_PS_PAUSE_MSK) == PHY_M_PS_PAUSE_MSK) {
2881 /* Symmetric PAUSE */
2882 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_SYMMETRIC;
2883 }
2884 else if ((AuxStat & PHY_M_PS_PAUSE_MSK) == PHY_M_PS_RX_P_EN) {
2885 /* Enable PAUSE receive, disable PAUSE transmit */
2886 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_REM_SEND;
2887 }
2888 else if ((AuxStat & PHY_M_PS_PAUSE_MSK) == PHY_M_PS_TX_P_EN) {
2889 /* Disable PAUSE receive, enable PAUSE transmit */
2890 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_LOC_SEND;
2891 }
2892 else {
2893 /* PAUSE mismatch -> no PAUSE */
2894 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE;
2895 }
2896
2897 /* set used link speed */
2898 switch ((unsigned)(AuxStat & PHY_M_PS_SPEED_MSK)) {
2899 case (unsigned)PHY_M_PS_SPEED_1000:
2900 pPrt->PLinkSpeedUsed = (SK_U8)SK_LSPEED_STAT_1000MBPS;
2901 break;
2902 case PHY_M_PS_SPEED_100:
2903 pPrt->PLinkSpeedUsed = (SK_U8)SK_LSPEED_STAT_100MBPS;
2904 break;
2905 default:
2906 pPrt->PLinkSpeedUsed = (SK_U8)SK_LSPEED_STAT_10MBPS;
2907 }
2908
2909 return(SK_AND_OK);
2910} /* SkGmAutoNegDoneMarv */
2911#endif /* YUKON */
2912
2913
2914#ifdef OTHER_PHY
2915/******************************************************************************
2916 *
2917 * SkXmAutoNegDoneLone() - Auto-negotiation handling
2918 *
2919 * Description:
2920 * This function handles the auto-negotiation if the Done bit is set.
2921 *
2922 * Returns:
2923 * SK_AND_OK o.k.
2924 * SK_AND_DUP_CAP Duplex capability error happened
2925 * SK_AND_OTHER Other error happened
2926 */
2927static int SkXmAutoNegDoneLone(
2928SK_AC *pAC, /* adapter context */
2929SK_IOC IoC, /* IO context */
2930int Port) /* Port Index (MAC_1 + n) */
2931{
2932 SK_GEPORT *pPrt;
2933 SK_U16 ResAb; /* Resolved Ability */
2934 SK_U16 LPAb; /* Link Partner Ability */
2935 SK_U16 QuickStat; /* Auxiliary Status */
2936
2937 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2938 ("AutoNegDoneLone, Port %d\n", Port));
2939 pPrt = &pAC->GIni.GP[Port];
2940
2941 /* Get PHY parameters */
2942 SkXmPhyRead(pAC, IoC, Port, PHY_LONE_AUNE_LP, &LPAb);
2943 SkXmPhyRead(pAC, IoC, Port, PHY_LONE_1000T_STAT, &ResAb);
2944 SkXmPhyRead(pAC, IoC, Port, PHY_LONE_Q_STAT, &QuickStat);
2945
2946 if ((LPAb & PHY_L_AN_RF) != 0) {
2947 /* Remote fault bit is set */
2948 /* Error */
2949 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2950 ("AutoNegFail: Remote fault bit set Port %d\n", Port));
2951 pPrt->PAutoNegFail = SK_TRUE;
2952 return(SK_AND_OTHER);
2953 }
2954
2955 /* Check Duplex mismatch */
2956 if ((QuickStat & PHY_L_QS_DUP_MOD) != 0) {
2957 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_AUTOFULL;
2958 }
2959 else {
2960 pPrt->PLinkModeStatus = (SK_U8)SK_LMODE_STAT_AUTOHALF;
2961 }
2962
2963 /* Check Master/Slave resolution */
2964 if ((ResAb & PHY_L_1000S_MSF) != 0) {
2965 /* Error */
2966 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
2967 ("Master/Slave Fault Port %d\n", Port));
2968 pPrt->PAutoNegFail = SK_TRUE;
2969 pPrt->PMSStatus = SK_MS_STAT_FAULT;
2970 return(SK_AND_OTHER);
2971 }
2972 else if (ResAb & PHY_L_1000S_MSR) {
2973 pPrt->PMSStatus = SK_MS_STAT_MASTER;
2974 }
2975 else {
2976 pPrt->PMSStatus = SK_MS_STAT_SLAVE;
2977 }
2978
2979 /* Check PAUSE mismatch */
2980 /* We are using IEEE 802.3z/D5.0 Table 37-4 */
2981 /* we must manually resolve the abilities here */
2982 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE;
2983
2984 switch (pPrt->PFlowCtrlMode) {
2985 case SK_FLOW_MODE_NONE:
2986 /* default */
2987 break;
2988 case SK_FLOW_MODE_LOC_SEND:
2989 if ((QuickStat & (PHY_L_QS_PAUSE | PHY_L_QS_AS_PAUSE)) ==
2990 (PHY_L_QS_PAUSE | PHY_L_QS_AS_PAUSE)) {
2991 /* Disable PAUSE receive, enable PAUSE transmit */
2992 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_LOC_SEND;
2993 }
2994 break;
2995 case SK_FLOW_MODE_SYMMETRIC:
2996 if ((QuickStat & PHY_L_QS_PAUSE) != 0) {
2997 /* Symmetric PAUSE */
2998 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_SYMMETRIC;
2999 }
3000 break;
3001 case SK_FLOW_MODE_SYM_OR_REM:
3002 if ((QuickStat & (PHY_L_QS_PAUSE | PHY_L_QS_AS_PAUSE)) ==
3003 PHY_L_QS_AS_PAUSE) {
3004 /* Enable PAUSE receive, disable PAUSE transmit */
3005 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_REM_SEND;
3006 }
3007 else if ((QuickStat & PHY_L_QS_PAUSE) != 0) {
3008 /* Symmetric PAUSE */
3009 pPrt->PFlowCtrlStatus = SK_FLOW_STAT_SYMMETRIC;
3010 }
3011 break;
3012 default:
3013 SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E016,
3014 SKERR_HWI_E016MSG);
3015 }
3016
3017 return(SK_AND_OK);
3018} /* SkXmAutoNegDoneLone */
3019
3020
3021/******************************************************************************
3022 *
3023 * SkXmAutoNegDoneNat() - Auto-negotiation handling
3024 *
3025 * Description:
3026 * This function handles the auto-negotiation if the Done bit is set.
3027 *
3028 * Returns:
3029 * SK_AND_OK o.k.
3030 * SK_AND_DUP_CAP Duplex capability error happened
3031 * SK_AND_OTHER Other error happened
3032 */
3033static int SkXmAutoNegDoneNat(
3034SK_AC *pAC, /* adapter context */
3035SK_IOC IoC, /* IO context */
3036int Port) /* Port Index (MAC_1 + n) */
3037{
3038/* todo: National */
3039 return(SK_AND_OK);
3040} /* SkXmAutoNegDoneNat */
3041#endif /* OTHER_PHY */
3042
3043
3044/******************************************************************************
3045 *
3046 * SkMacAutoNegDone() - Auto-negotiation handling
3047 *
3048 * Description: calls the auto-negotiation done routines dep. on board type
3049 *
3050 * Returns:
3051 * SK_AND_OK o.k.
3052 * SK_AND_DUP_CAP Duplex capability error happened
3053 * SK_AND_OTHER Other error happened
3054 */
3055int SkMacAutoNegDone(
3056SK_AC *pAC, /* adapter context */
3057SK_IOC IoC, /* IO context */
3058int Port) /* Port Index (MAC_1 + n) */
3059{
3060 SK_GEPORT *pPrt;
3061 int Rtv;
3062
3063 Rtv = SK_AND_OK;
3064
3065 pPrt = &pAC->GIni.GP[Port];
3066
3067#ifdef GENESIS
3068 if (pAC->GIni.GIGenesis) {
3069
3070 switch (pPrt->PhyType) {
3071
3072 case SK_PHY_XMAC:
3073 Rtv = SkXmAutoNegDoneXmac(pAC, IoC, Port);
3074 break;
3075 case SK_PHY_BCOM:
3076 Rtv = SkXmAutoNegDoneBcom(pAC, IoC, Port);
3077 break;
3078#ifdef OTHER_PHY
3079 case SK_PHY_LONE:
3080 Rtv = SkXmAutoNegDoneLone(pAC, IoC, Port);
3081 break;
3082 case SK_PHY_NAT:
3083 Rtv = SkXmAutoNegDoneNat(pAC, IoC, Port);
3084 break;
3085#endif /* OTHER_PHY */
3086 default:
3087 return(SK_AND_OTHER);
3088 }
3089 }
3090#endif /* GENESIS */
3091
3092#ifdef YUKON
3093 if (pAC->GIni.GIYukon) {
3094
3095 Rtv = SkGmAutoNegDoneMarv(pAC, IoC, Port);
3096 }
3097#endif /* YUKON */
3098
3099 if (Rtv != SK_AND_OK) {
3100 return(Rtv);
3101 }
3102
3103 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
3104 ("AutoNeg done Port %d\n", Port));
3105
3106 /* We checked everything and may now enable the link */
3107 pPrt->PAutoNegFail = SK_FALSE;
3108
3109 SkMacRxTxEnable(pAC, IoC, Port);
3110
3111 return(SK_AND_OK);
3112} /* SkMacAutoNegDone */
3113
3114
3115/******************************************************************************
3116 *
3117 * SkMacRxTxEnable() - Enable Rx/Tx activity if port is up
3118 *
3119 * Description: enables Rx/Tx dep. on board type
3120 *
3121 * Returns:
3122 * 0 o.k.
3123 * != 0 Error happened
3124 */
3125int SkMacRxTxEnable(
3126SK_AC *pAC, /* adapter context */
3127SK_IOC IoC, /* IO context */
3128int Port) /* Port Index (MAC_1 + n) */
3129{
3130 SK_GEPORT *pPrt;
3131 SK_U16 Reg; /* 16-bit register value */
3132 SK_U16 IntMask; /* MAC interrupt mask */
3133#ifdef GENESIS
3134 SK_U16 SWord;
3135#endif
3136
3137 pPrt = &pAC->GIni.GP[Port];
3138
3139 if (!pPrt->PHWLinkUp) {
3140 /* The Hardware link is NOT up */
3141 return(0);
3142 }
3143
3144 if ((pPrt->PLinkMode == SK_LMODE_AUTOHALF ||
3145 pPrt->PLinkMode == SK_LMODE_AUTOFULL ||
3146 pPrt->PLinkMode == SK_LMODE_AUTOBOTH) &&
3147 pPrt->PAutoNegFail) {
3148 /* Auto-negotiation is not done or failed */
3149 return(0);
3150 }
3151
3152#ifdef GENESIS
3153 if (pAC->GIni.GIGenesis) {
3154 /* set Duplex Mode and Pause Mode */
3155 SkXmInitDupMd(pAC, IoC, Port);
3156
3157 SkXmInitPauseMd(pAC, IoC, Port);
3158
3159 /*
3160 * Initialize the Interrupt Mask Register. Default IRQs are...
3161 * - Link Asynchronous Event
3162 * - Link Partner requests config
3163 * - Auto Negotiation Done
3164 * - Rx Counter Event Overflow
3165 * - Tx Counter Event Overflow
3166 * - Transmit FIFO Underrun
3167 */
3168 IntMask = XM_DEF_MSK;
3169
3170#ifdef DEBUG
3171 /* add IRQ for Receive FIFO Overflow */
3172 IntMask &= ~XM_IS_RXF_OV;
3173#endif /* DEBUG */
3174
3175 if (pPrt->PhyType != SK_PHY_XMAC) {
3176 /* disable GP0 interrupt bit */
3177 IntMask |= XM_IS_INP_ASS;
3178 }
3179 XM_OUT16(IoC, Port, XM_IMSK, IntMask);
3180
3181 /* get MMU Command Reg. */
3182 XM_IN16(IoC, Port, XM_MMU_CMD, &Reg);
3183
3184 if (pPrt->PhyType != SK_PHY_XMAC &&
3185 (pPrt->PLinkModeStatus == SK_LMODE_STAT_FULL ||
3186 pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOFULL)) {
3187 /* set to Full Duplex */
3188 Reg |= XM_MMU_GMII_FD;
3189 }
3190
3191 switch (pPrt->PhyType) {
3192 case SK_PHY_BCOM:
3193 /*
3194 * Workaround BCOM Errata (#10523) for all BCom Phys
3195 * Enable Power Management after link up
3196 */
3197 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUX_CTRL, &SWord);
3198 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_AUX_CTRL,
3199 (SK_U16)(SWord & ~PHY_B_AC_DIS_PM));
3200 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_INT_MASK,
3201 (SK_U16)PHY_B_DEF_MSK);
3202 break;
3203#ifdef OTHER_PHY
3204 case SK_PHY_LONE:
3205 SkXmPhyWrite(pAC, IoC, Port, PHY_LONE_INT_ENAB, PHY_L_DEF_MSK);
3206 break;
3207 case SK_PHY_NAT:
3208 /* todo National:
3209 SkXmPhyWrite(pAC, IoC, Port, PHY_NAT_INT_MASK, PHY_N_DEF_MSK); */
3210 /* no interrupts possible from National ??? */
3211 break;
3212#endif /* OTHER_PHY */
3213 }
3214
3215 /* enable Rx/Tx */
3216 XM_OUT16(IoC, Port, XM_MMU_CMD, Reg | XM_MMU_ENA_RX | XM_MMU_ENA_TX);
3217 }
3218#endif /* GENESIS */
3219
3220#ifdef YUKON
3221 if (pAC->GIni.GIYukon) {
3222 /*
3223 * Initialize the Interrupt Mask Register. Default IRQs are...
3224 * - Rx Counter Event Overflow
3225 * - Tx Counter Event Overflow
3226 * - Transmit FIFO Underrun
3227 */
3228 IntMask = GMAC_DEF_MSK;
3229
3230#ifdef DEBUG
3231 /* add IRQ for Receive FIFO Overrun */
3232 IntMask |= GM_IS_RX_FF_OR;
3233#endif /* DEBUG */
3234
3235 SK_OUT8(IoC, GMAC_IRQ_MSK, (SK_U8)IntMask);
3236
3237 /* get General Purpose Control */
3238 GM_IN16(IoC, Port, GM_GP_CTRL, &Reg);
3239
3240 if (pPrt->PLinkModeStatus == SK_LMODE_STAT_FULL ||
3241 pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOFULL) {
3242 /* set to Full Duplex */
3243 Reg |= GM_GPCR_DUP_FULL;
3244 }
3245
3246 /* enable Rx/Tx */
3247 GM_OUT16(IoC, Port, GM_GP_CTRL, (SK_U16)(Reg | GM_GPCR_RX_ENA |
3248 GM_GPCR_TX_ENA));
3249
3250#ifndef VCPU
3251 /* Enable all PHY interrupts */
3252 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_INT_MASK,
3253 (SK_U16)PHY_M_DEF_MSK);
3254#endif /* VCPU */
3255 }
3256#endif /* YUKON */
3257
3258 return(0);
3259
3260} /* SkMacRxTxEnable */
3261
3262
3263/******************************************************************************
3264 *
3265 * SkMacRxTxDisable() - Disable Receiver and Transmitter
3266 *
3267 * Description: disables Rx/Tx dep. on board type
3268 *
3269 * Returns: N/A
3270 */
3271void SkMacRxTxDisable(
3272SK_AC *pAC, /* Adapter Context */
3273SK_IOC IoC, /* IO context */
3274int Port) /* Port Index (MAC_1 + n) */
3275{
3276 SK_U16 Word;
3277
3278#ifdef GENESIS
3279 if (pAC->GIni.GIGenesis) {
3280
3281 XM_IN16(IoC, Port, XM_MMU_CMD, &Word);
3282
3283 XM_OUT16(IoC, Port, XM_MMU_CMD, Word & ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX));
3284
3285 /* dummy read to ensure writing */
3286 XM_IN16(IoC, Port, XM_MMU_CMD, &Word);
3287 }
3288#endif /* GENESIS */
3289
3290#ifdef YUKON
3291 if (pAC->GIni.GIYukon) {
3292
3293 GM_IN16(IoC, Port, GM_GP_CTRL, &Word);
3294
3295 GM_OUT16(IoC, Port, GM_GP_CTRL, (SK_U16)(Word & ~(GM_GPCR_RX_ENA |
3296 GM_GPCR_TX_ENA)));
3297
3298 /* dummy read to ensure writing */
3299 GM_IN16(IoC, Port, GM_GP_CTRL, &Word);
3300 }
3301#endif /* YUKON */
3302
3303} /* SkMacRxTxDisable */
3304
3305
3306/******************************************************************************
3307 *
3308 * SkMacIrqDisable() - Disable IRQ from MAC
3309 *
3310 * Description: sets the IRQ-mask to disable IRQ dep. on board type
3311 *
3312 * Returns: N/A
3313 */
3314void SkMacIrqDisable(
3315SK_AC *pAC, /* Adapter Context */
3316SK_IOC IoC, /* IO context */
3317int Port) /* Port Index (MAC_1 + n) */
3318{
3319 SK_GEPORT *pPrt;
3320#ifdef GENESIS
3321 SK_U16 Word;
3322#endif
3323
3324 pPrt = &pAC->GIni.GP[Port];
3325
3326#ifdef GENESIS
3327 if (pAC->GIni.GIGenesis) {
3328
3329 /* disable all XMAC IRQs */
3330 XM_OUT16(IoC, Port, XM_IMSK, 0xffff);
3331
3332 /* Disable all PHY interrupts */
3333 switch (pPrt->PhyType) {
3334 case SK_PHY_BCOM:
3335 /* Make sure that PHY is initialized */
3336 if (pPrt->PState != SK_PRT_RESET) {
3337 /* NOT allowed if BCOM is in RESET state */
3338 /* Workaround BCOM Errata (#10523) all BCom */
3339 /* Disable Power Management if link is down */
3340 SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUX_CTRL, &Word);
3341 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_AUX_CTRL,
3342 (SK_U16)(Word | PHY_B_AC_DIS_PM));
3343 SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_INT_MASK, 0xffff);
3344 }
3345 break;
3346#ifdef OTHER_PHY
3347 case SK_PHY_LONE:
3348 SkXmPhyWrite(pAC, IoC, Port, PHY_LONE_INT_ENAB, 0);
3349 break;
3350 case SK_PHY_NAT:
3351 /* todo: National
3352 SkXmPhyWrite(pAC, IoC, Port, PHY_NAT_INT_MASK, 0xffff); */
3353 break;
3354#endif /* OTHER_PHY */
3355 }
3356 }
3357#endif /* GENESIS */
3358
3359#ifdef YUKON
3360 if (pAC->GIni.GIYukon) {
3361 /* disable all GMAC IRQs */
3362 SK_OUT8(IoC, GMAC_IRQ_MSK, 0);
3363
3364#ifndef VCPU
3365 /* Disable all PHY interrupts */
3366 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_INT_MASK, 0);
3367#endif /* VCPU */
3368 }
3369#endif /* YUKON */
3370
3371} /* SkMacIrqDisable */
3372
3373
3374#ifdef SK_DIAG
3375/******************************************************************************
3376 *
3377 * SkXmSendCont() - Enable / Disable Send Continuous Mode
3378 *
3379 * Description: enable / disable Send Continuous Mode on XMAC
3380 *
3381 * Returns:
3382 * nothing
3383 */
3384void SkXmSendCont(
3385SK_AC *pAC, /* adapter context */
3386SK_IOC IoC, /* IO context */
3387int Port, /* Port Index (MAC_1 + n) */
3388SK_BOOL Enable) /* Enable / Disable */
3389{
3390 SK_U32 MdReg;
3391
3392 XM_IN32(IoC, Port, XM_MODE, &MdReg);
3393
3394 if (Enable) {
3395 MdReg |= XM_MD_TX_CONT;
3396 }
3397 else {
3398 MdReg &= ~XM_MD_TX_CONT;
3399 }
3400 /* setup Mode Register */
3401 XM_OUT32(IoC, Port, XM_MODE, MdReg);
3402
3403} /* SkXmSendCont */
3404
3405
3406/******************************************************************************
3407 *
3408 * SkMacTimeStamp() - Enable / Disable Time Stamp
3409 *
3410 * Description: enable / disable Time Stamp generation for Rx packets
3411 *
3412 * Returns:
3413 * nothing
3414 */
3415void SkMacTimeStamp(
3416SK_AC *pAC, /* adapter context */
3417SK_IOC IoC, /* IO context */
3418int Port, /* Port Index (MAC_1 + n) */
3419SK_BOOL Enable) /* Enable / Disable */
3420{
3421 SK_U32 MdReg;
3422 SK_U8 TimeCtrl;
3423
3424 if (pAC->GIni.GIGenesis) {
3425
3426 XM_IN32(IoC, Port, XM_MODE, &MdReg);
3427
3428 if (Enable) {
3429 MdReg |= XM_MD_ATS;
3430 }
3431 else {
3432 MdReg &= ~XM_MD_ATS;
3433 }
3434 /* setup Mode Register */
3435 XM_OUT32(IoC, Port, XM_MODE, MdReg);
3436 }
3437 else {
3438 if (Enable) {
3439 TimeCtrl = GMT_ST_START | GMT_ST_CLR_IRQ;
3440 }
3441 else {
3442 TimeCtrl = GMT_ST_STOP | GMT_ST_CLR_IRQ;
3443 }
3444 /* Start/Stop Time Stamp Timer */
3445 SK_OUT8(IoC, GMAC_TI_ST_CTRL, TimeCtrl);
3446 }
3447
3448} /* SkMacTimeStamp*/
3449
3450#else /* !SK_DIAG */
3451
3452#ifdef GENESIS
3453/******************************************************************************
3454 *
3455 * SkXmAutoNegLipaXmac() - Decides whether Link Partner could do auto-neg
3456 *
3457 * This function analyses the Interrupt status word. If any of the
3458 * Auto-negotiating interrupt bits are set, the PLipaAutoNeg variable
3459 * is set true.
3460 */
3461void SkXmAutoNegLipaXmac(
3462SK_AC *pAC, /* adapter context */
3463SK_IOC IoC, /* IO context */
3464int Port, /* Port Index (MAC_1 + n) */
3465SK_U16 IStatus) /* Interrupt Status word to analyse */
3466{
3467 SK_GEPORT *pPrt;
3468
3469 pPrt = &pAC->GIni.GP[Port];
3470
3471 if (pPrt->PLipaAutoNeg != SK_LIPA_AUTO &&
3472 (IStatus & (XM_IS_LIPA_RC | XM_IS_RX_PAGE | XM_IS_AND)) != 0) {
3473
3474 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
3475 ("AutoNegLipa: AutoNeg detected on Port %d, IStatus=0x%04X\n",
3476 Port, IStatus));
3477 pPrt->PLipaAutoNeg = SK_LIPA_AUTO;
3478 }
3479} /* SkXmAutoNegLipaXmac */
3480#endif /* GENESIS */
3481
3482
3483/******************************************************************************
3484 *
3485 * SkMacAutoNegLipaPhy() - Decides whether Link Partner could do auto-neg
3486 *
3487 * This function analyses the PHY status word.
3488 * If any of the Auto-negotiating bits are set, the PLipaAutoNeg variable
3489 * is set true.
3490 */
3491void SkMacAutoNegLipaPhy(
3492SK_AC *pAC, /* adapter context */
3493SK_IOC IoC, /* IO context */
3494int Port, /* Port Index (MAC_1 + n) */
3495SK_U16 PhyStat) /* PHY Status word to analyse */
3496{
3497 SK_GEPORT *pPrt;
3498
3499 pPrt = &pAC->GIni.GP[Port];
3500
3501 if (pPrt->PLipaAutoNeg != SK_LIPA_AUTO &&
3502 (PhyStat & PHY_ST_AN_OVER) != 0) {
3503
3504 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
3505 ("AutoNegLipa: AutoNeg detected on Port %d, PhyStat=0x%04X\n",
3506 Port, PhyStat));
3507 pPrt->PLipaAutoNeg = SK_LIPA_AUTO;
3508 }
3509} /* SkMacAutoNegLipaPhy */
3510
3511
3512#ifdef GENESIS
3513/******************************************************************************
3514 *
3515 * SkXmIrq() - Interrupt Service Routine
3516 *
3517 * Description: services an Interrupt Request of the XMAC
3518 *
3519 * Note:
3520 * With an external PHY, some interrupt bits are not meaningfull any more:
3521 * - LinkAsyncEvent (bit #14) XM_IS_LNK_AE
3522 * - LinkPartnerReqConfig (bit #10) XM_IS_LIPA_RC
3523 * - Page Received (bit #9) XM_IS_RX_PAGE
3524 * - NextPageLoadedForXmt (bit #8) XM_IS_TX_PAGE
3525 * - AutoNegDone (bit #7) XM_IS_AND
3526 * Also probably not valid any more is the GP0 input bit:
3527 * - GPRegisterBit0set XM_IS_INP_ASS
3528 *
3529 * Returns:
3530 * nothing
3531 */
3532static void SkXmIrq(
3533SK_AC *pAC, /* adapter context */
3534SK_IOC IoC, /* IO context */
3535int Port) /* Port Index (MAC_1 + n) */
3536{
3537 SK_GEPORT *pPrt;
3538 SK_EVPARA Para;
3539 SK_U16 IStatus; /* Interrupt status read from the XMAC */
3540 SK_U16 IStatus2;
3541#ifdef SK_SLIM
3542 SK_U64 OverflowStatus;
3543#endif
3544
3545 pPrt = &pAC->GIni.GP[Port];
3546
3547 XM_IN16(IoC, Port, XM_ISRC, &IStatus);
3548
3549 /* LinkPartner Auto-negable? */
3550 if (pPrt->PhyType == SK_PHY_XMAC) {
3551 SkXmAutoNegLipaXmac(pAC, IoC, Port, IStatus);
3552 }
3553 else {
3554 /* mask bits that are not used with ext. PHY */
3555 IStatus &= ~(XM_IS_LNK_AE | XM_IS_LIPA_RC |
3556 XM_IS_RX_PAGE | XM_IS_TX_PAGE |
3557 XM_IS_AND | XM_IS_INP_ASS);
3558 }
3559
3560 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
3561 ("XmacIrq Port %d Isr 0x%04X\n", Port, IStatus));
3562
3563 if (!pPrt->PHWLinkUp) {
3564 /* Spurious XMAC interrupt */
3565 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
3566 ("SkXmIrq: spurious interrupt on Port %d\n", Port));
3567 return;
3568 }
3569
3570 if ((IStatus & XM_IS_INP_ASS) != 0) {
3571 /* Reread ISR Register if link is not in sync */
3572 XM_IN16(IoC, Port, XM_ISRC, &IStatus2);
3573
3574 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
3575 ("SkXmIrq: Link async. Double check Port %d 0x%04X 0x%04X\n",
3576 Port, IStatus, IStatus2));
3577 IStatus &= ~XM_IS_INP_ASS;
3578 IStatus |= IStatus2;
3579 }
3580
3581 if ((IStatus & XM_IS_LNK_AE) != 0) {
3582 /* not used, GP0 is used instead */
3583 }
3584
3585 if ((IStatus & XM_IS_TX_ABORT) != 0) {
3586 /* not used */
3587 }
3588
3589 if ((IStatus & XM_IS_FRC_INT) != 0) {
3590 /* not used, use ASIC IRQ instead if needed */
3591 }
3592
3593 if ((IStatus & (XM_IS_INP_ASS | XM_IS_LIPA_RC | XM_IS_RX_PAGE)) != 0) {
3594 SkHWLinkDown(pAC, IoC, Port);
3595
3596 /* Signal to RLMT */
3597 Para.Para32[0] = (SK_U32)Port;
3598 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
3599
3600 /* Start workaround Errata #2 timer */
3601 SkTimerStart(pAC, IoC, &pPrt->PWaTimer, SK_WA_INA_TIME,
3602 SKGE_HWAC, SK_HWEV_WATIM, Para);
3603 }
3604
3605 if ((IStatus & XM_IS_RX_PAGE) != 0) {
3606 /* not used */
3607 }
3608
3609 if ((IStatus & XM_IS_TX_PAGE) != 0) {
3610 /* not used */
3611 }
3612
3613 if ((IStatus & XM_IS_AND) != 0) {
3614 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
3615 ("SkXmIrq: AND on link that is up Port %d\n", Port));
3616 }
3617
3618 if ((IStatus & XM_IS_TSC_OV) != 0) {
3619 /* not used */
3620 }
3621
3622 /* Combined Tx & Rx Counter Overflow SIRQ Event */
3623 if ((IStatus & (XM_IS_RXC_OV | XM_IS_TXC_OV)) != 0) {
3624#ifdef SK_SLIM
3625 SkXmOverflowStatus(pAC, IoC, Port, IStatus, &OverflowStatus);
3626#else
3627 Para.Para32[0] = (SK_U32)Port;
3628 Para.Para32[1] = (SK_U32)IStatus;
3629 SkPnmiEvent(pAC, IoC, SK_PNMI_EVT_SIRQ_OVERFLOW, Para);
3630#endif /* SK_SLIM */
3631 }
3632
3633 if ((IStatus & XM_IS_RXF_OV) != 0) {
3634 /* normal situation -> no effect */
3635#ifdef DEBUG
3636 pPrt->PRxOverCnt++;
3637#endif /* DEBUG */
3638 }
3639
3640 if ((IStatus & XM_IS_TXF_UR) != 0) {
3641 /* may NOT happen -> error log */
3642 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E020, SKERR_SIRQ_E020MSG);
3643 }
3644
3645 if ((IStatus & XM_IS_TX_COMP) != 0) {
3646 /* not served here */
3647 }
3648
3649 if ((IStatus & XM_IS_RX_COMP) != 0) {
3650 /* not served here */
3651 }
3652} /* SkXmIrq */
3653#endif /* GENESIS */
3654
3655
3656#ifdef YUKON
3657/******************************************************************************
3658 *
3659 * SkGmIrq() - Interrupt Service Routine
3660 *
3661 * Description: services an Interrupt Request of the GMAC
3662 *
3663 * Note:
3664 *
3665 * Returns:
3666 * nothing
3667 */
3668static void SkGmIrq(
3669SK_AC *pAC, /* adapter context */
3670SK_IOC IoC, /* IO context */
3671int Port) /* Port Index (MAC_1 + n) */
3672{
3673 SK_GEPORT *pPrt;
3674 SK_U8 IStatus; /* Interrupt status */
3675#ifdef SK_SLIM
3676 SK_U64 OverflowStatus;
3677#else
3678 SK_EVPARA Para;
3679#endif
3680
3681 pPrt = &pAC->GIni.GP[Port];
3682
3683 SK_IN8(IoC, GMAC_IRQ_SRC, &IStatus);
3684
3685#ifdef XXX
3686 /* LinkPartner Auto-negable? */
3687 SkMacAutoNegLipaPhy(pAC, IoC, Port, IStatus);
3688#endif /* XXX */
3689
3690 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
3691 ("GmacIrq Port %d Isr 0x%04X\n", Port, IStatus));
3692
3693 /* Combined Tx & Rx Counter Overflow SIRQ Event */
3694 if (IStatus & (GM_IS_RX_CO_OV | GM_IS_TX_CO_OV)) {
3695 /* these IRQs will be cleared by reading GMACs register */
3696#ifdef SK_SLIM
3697 SkGmOverflowStatus(pAC, IoC, Port, IStatus, &OverflowStatus);
3698#else
3699 Para.Para32[0] = (SK_U32)Port;
3700 Para.Para32[1] = (SK_U32)IStatus;
3701 SkPnmiEvent(pAC, IoC, SK_PNMI_EVT_SIRQ_OVERFLOW, Para);
3702#endif
3703 }
3704
3705 if (IStatus & GM_IS_RX_FF_OR) {
3706 /* clear GMAC Rx FIFO Overrun IRQ */
3707 SK_OUT8(IoC, MR_ADDR(Port, RX_GMF_CTRL_T), (SK_U8)GMF_CLI_RX_FO);
3708#ifdef DEBUG
3709 pPrt->PRxOverCnt++;
3710#endif /* DEBUG */
3711 }
3712
3713 if (IStatus & GM_IS_TX_FF_UR) {
3714 /* clear GMAC Tx FIFO Underrun IRQ */
3715 SK_OUT8(IoC, MR_ADDR(Port, TX_GMF_CTRL_T), (SK_U8)GMF_CLI_TX_FU);
3716 /* may NOT happen -> error log */
3717 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E020, SKERR_SIRQ_E020MSG);
3718 }
3719
3720 if (IStatus & GM_IS_TX_COMPL) {
3721 /* not served here */
3722 }
3723
3724 if (IStatus & GM_IS_RX_COMPL) {
3725 /* not served here */
3726 }
3727} /* SkGmIrq */
3728#endif /* YUKON */
3729
3730
3731/******************************************************************************
3732 *
3733 * SkMacIrq() - Interrupt Service Routine for MAC
3734 *
3735 * Description: calls the Interrupt Service Routine dep. on board type
3736 *
3737 * Returns:
3738 * nothing
3739 */
3740void SkMacIrq(
3741SK_AC *pAC, /* adapter context */
3742SK_IOC IoC, /* IO context */
3743int Port) /* Port Index (MAC_1 + n) */
3744{
3745#ifdef GENESIS
3746 if (pAC->GIni.GIGenesis) {
3747 /* IRQ from XMAC */
3748 SkXmIrq(pAC, IoC, Port);
3749 }
3750#endif /* GENESIS */
3751
3752#ifdef YUKON
3753 if (pAC->GIni.GIYukon) {
3754 /* IRQ from GMAC */
3755 SkGmIrq(pAC, IoC, Port);
3756 }
3757#endif /* YUKON */
3758
3759} /* SkMacIrq */
3760
3761#endif /* !SK_DIAG */
3762
3763#ifdef GENESIS
3764/******************************************************************************
3765 *
3766 * SkXmUpdateStats() - Force the XMAC to output the current statistic
3767 *
3768 * Description:
3769 * The XMAC holds its statistic internally. To obtain the current
3770 * values a command must be sent so that the statistic data will
3771 * be written to a predefined memory area on the adapter.
3772 *
3773 * Returns:
3774 * 0: success
3775 * 1: something went wrong
3776 */
3777int SkXmUpdateStats(
3778SK_AC *pAC, /* adapter context */
3779SK_IOC IoC, /* IO context */
3780unsigned int Port) /* Port Index (MAC_1 + n) */
3781{
3782 SK_GEPORT *pPrt;
3783 SK_U16 StatReg;
3784 int WaitIndex;
3785
3786 pPrt = &pAC->GIni.GP[Port];
3787 WaitIndex = 0;
3788
3789 /* Send an update command to XMAC specified */
3790 XM_OUT16(IoC, Port, XM_STAT_CMD, XM_SC_SNP_TXC | XM_SC_SNP_RXC);
3791
3792 /*
3793 * It is an auto-clearing register. If the command bits
3794 * went to zero again, the statistics are transferred.
3795 * Normally the command should be executed immediately.
3796 * But just to be sure we execute a loop.
3797 */
3798 do {
3799
3800 XM_IN16(IoC, Port, XM_STAT_CMD, &StatReg);
3801
3802 if (++WaitIndex > 10) {
3803
3804 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_HWI_E021, SKERR_HWI_E021MSG);
3805
3806 return(1);
3807 }
3808 } while ((StatReg & (XM_SC_SNP_TXC | XM_SC_SNP_RXC)) != 0);
3809
3810 return(0);
3811} /* SkXmUpdateStats */
3812
3813
3814/******************************************************************************
3815 *
3816 * SkXmMacStatistic() - Get XMAC counter value
3817 *
3818 * Description:
3819 * Gets the 32bit counter value. Except for the octet counters
3820 * the lower 32bit are counted in hardware and the upper 32bit
3821 * must be counted in software by monitoring counter overflow interrupts.
3822 *
3823 * Returns:
3824 * 0: success
3825 * 1: something went wrong
3826 */
3827int SkXmMacStatistic(
3828SK_AC *pAC, /* adapter context */
3829SK_IOC IoC, /* IO context */
3830unsigned int Port, /* Port Index (MAC_1 + n) */
3831SK_U16 StatAddr, /* MIB counter base address */
3832SK_U32 SK_FAR *pVal) /* ptr to return statistic value */
3833{
3834 if ((StatAddr < XM_TXF_OK) || (StatAddr > XM_RXF_MAX_SZ)) {
3835
3836 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E022, SKERR_HWI_E022MSG);
3837
3838 return(1);
3839 }
3840
3841 XM_IN32(IoC, Port, StatAddr, pVal);
3842
3843 return(0);
3844} /* SkXmMacStatistic */
3845
3846
3847/******************************************************************************
3848 *
3849 * SkXmResetCounter() - Clear MAC statistic counter
3850 *
3851 * Description:
3852 * Force the XMAC to clear its statistic counter.
3853 *
3854 * Returns:
3855 * 0: success
3856 * 1: something went wrong
3857 */
3858int SkXmResetCounter(
3859SK_AC *pAC, /* adapter context */
3860SK_IOC IoC, /* IO context */
3861unsigned int Port) /* Port Index (MAC_1 + n) */
3862{
3863 XM_OUT16(IoC, Port, XM_STAT_CMD, XM_SC_CLR_RXC | XM_SC_CLR_TXC);
3864 /* Clear two times according to Errata #3 */
3865 XM_OUT16(IoC, Port, XM_STAT_CMD, XM_SC_CLR_RXC | XM_SC_CLR_TXC);
3866
3867 return(0);
3868} /* SkXmResetCounter */
3869
3870
3871/******************************************************************************
3872 *
3873 * SkXmOverflowStatus() - Gets the status of counter overflow interrupt
3874 *
3875 * Description:
3876 * Checks the source causing an counter overflow interrupt. On success the
3877 * resulting counter overflow status is written to <pStatus>, whereas the
3878 * upper dword stores the XMAC ReceiveCounterEvent register and the lower
3879 * dword the XMAC TransmitCounterEvent register.
3880 *
3881 * Note:
3882 * For XMAC the interrupt source is a self-clearing register, so the source
3883 * must be checked only once. SIRQ module does another check to be sure
3884 * that no interrupt get lost during process time.
3885 *
3886 * Returns:
3887 * 0: success
3888 * 1: something went wrong
3889 */
3890int SkXmOverflowStatus(
3891SK_AC *pAC, /* adapter context */
3892SK_IOC IoC, /* IO context */
3893unsigned int Port, /* Port Index (MAC_1 + n) */
3894SK_U16 IStatus, /* Interupt Status from MAC */
3895SK_U64 SK_FAR *pStatus) /* ptr for return overflow status value */
3896{
3897 SK_U64 Status; /* Overflow status */
3898 SK_U32 RegVal;
3899
3900 Status = 0;
3901
3902 if ((IStatus & XM_IS_RXC_OV) != 0) {
3903
3904 XM_IN32(IoC, Port, XM_RX_CNT_EV, &RegVal);
3905 Status |= (SK_U64)RegVal << 32;
3906 }
3907
3908 if ((IStatus & XM_IS_TXC_OV) != 0) {
3909
3910 XM_IN32(IoC, Port, XM_TX_CNT_EV, &RegVal);
3911 Status |= (SK_U64)RegVal;
3912 }
3913
3914 *pStatus = Status;
3915
3916 return(0);
3917} /* SkXmOverflowStatus */
3918#endif /* GENESIS */
3919
3920
3921#ifdef YUKON
3922/******************************************************************************
3923 *
3924 * SkGmUpdateStats() - Force the GMAC to output the current statistic
3925 *
3926 * Description:
3927 * Empty function for GMAC. Statistic data is accessible in direct way.
3928 *
3929 * Returns:
3930 * 0: success
3931 * 1: something went wrong
3932 */
3933int SkGmUpdateStats(
3934SK_AC *pAC, /* adapter context */
3935SK_IOC IoC, /* IO context */
3936unsigned int Port) /* Port Index (MAC_1 + n) */
3937{
3938 return(0);
3939}
3940
3941
3942/******************************************************************************
3943 *
3944 * SkGmMacStatistic() - Get GMAC counter value
3945 *
3946 * Description:
3947 * Gets the 32bit counter value. Except for the octet counters
3948 * the lower 32bit are counted in hardware and the upper 32bit
3949 * must be counted in software by monitoring counter overflow interrupts.
3950 *
3951 * Returns:
3952 * 0: success
3953 * 1: something went wrong
3954 */
3955int SkGmMacStatistic(
3956SK_AC *pAC, /* adapter context */
3957SK_IOC IoC, /* IO context */
3958unsigned int Port, /* Port Index (MAC_1 + n) */
3959SK_U16 StatAddr, /* MIB counter base address */
3960SK_U32 SK_FAR *pVal) /* ptr to return statistic value */
3961{
3962
3963 if ((StatAddr < GM_RXF_UC_OK) || (StatAddr > GM_TXE_FIFO_UR)) {
3964
3965 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E022, SKERR_HWI_E022MSG);
3966
3967 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
3968 ("SkGmMacStat: wrong MIB counter 0x%04X\n", StatAddr));
3969 return(1);
3970 }
3971
3972 GM_IN32(IoC, Port, StatAddr, pVal);
3973
3974 return(0);
3975} /* SkGmMacStatistic */
3976
3977
3978/******************************************************************************
3979 *
3980 * SkGmResetCounter() - Clear MAC statistic counter
3981 *
3982 * Description:
3983 * Force GMAC to clear its statistic counter.
3984 *
3985 * Returns:
3986 * 0: success
3987 * 1: something went wrong
3988 */
3989int SkGmResetCounter(
3990SK_AC *pAC, /* adapter context */
3991SK_IOC IoC, /* IO context */
3992unsigned int Port) /* Port Index (MAC_1 + n) */
3993{
3994 SK_U16 Reg; /* Phy Address Register */
3995 SK_U16 Word;
3996 int i;
3997
3998 GM_IN16(IoC, Port, GM_PHY_ADDR, &Reg);
3999
4000 /* set MIB Clear Counter Mode */
4001 GM_OUT16(IoC, Port, GM_PHY_ADDR, Reg | GM_PAR_MIB_CLR);
4002
4003 /* read all MIB Counters with Clear Mode set */
4004 for (i = 0; i < GM_MIB_CNT_SIZE; i++) {
4005 /* the reset is performed only when the lower 16 bits are read */
4006 GM_IN16(IoC, Port, GM_MIB_CNT_BASE + 8*i, &Word);
4007 }
4008
4009 /* clear MIB Clear Counter Mode */
4010 GM_OUT16(IoC, Port, GM_PHY_ADDR, Reg);
4011
4012 return(0);
4013} /* SkGmResetCounter */
4014
4015
4016/******************************************************************************
4017 *
4018 * SkGmOverflowStatus() - Gets the status of counter overflow interrupt
4019 *
4020 * Description:
4021 * Checks the source causing an counter overflow interrupt. On success the
4022 * resulting counter overflow status is written to <pStatus>, whereas the
4023 * the following bit coding is used:
4024 * 63:56 - unused
4025 * 55:48 - TxRx interrupt register bit7:0
4026 * 32:47 - Rx interrupt register
4027 * 31:24 - unused
4028 * 23:16 - TxRx interrupt register bit15:8
4029 * 15:0 - Tx interrupt register
4030 *
4031 * Returns:
4032 * 0: success
4033 * 1: something went wrong
4034 */
4035int SkGmOverflowStatus(
4036SK_AC *pAC, /* adapter context */
4037SK_IOC IoC, /* IO context */
4038unsigned int Port, /* Port Index (MAC_1 + n) */
4039SK_U16 IStatus, /* Interupt Status from MAC */
4040SK_U64 SK_FAR *pStatus) /* ptr for return overflow status value */
4041{
4042 SK_U64 Status; /* Overflow status */
4043 SK_U16 RegVal;
4044
4045 Status = 0;
4046
4047 if ((IStatus & GM_IS_RX_CO_OV) != 0) {
4048 /* this register is self-clearing after read */
4049 GM_IN16(IoC, Port, GM_RX_IRQ_SRC, &RegVal);
4050 Status |= (SK_U64)RegVal << 32;
4051 }
4052
4053 if ((IStatus & GM_IS_TX_CO_OV) != 0) {
4054 /* this register is self-clearing after read */
4055 GM_IN16(IoC, Port, GM_TX_IRQ_SRC, &RegVal);
4056 Status |= (SK_U64)RegVal;
4057 }
4058
4059 /* this register is self-clearing after read */
4060 GM_IN16(IoC, Port, GM_TR_IRQ_SRC, &RegVal);
4061 /* Rx overflow interrupt register bits (LoByte)*/
4062 Status |= (SK_U64)((SK_U8)RegVal) << 48;
4063 /* Tx overflow interrupt register bits (HiByte)*/
4064 Status |= (SK_U64)(RegVal >> 8) << 16;
4065
4066 *pStatus = Status;
4067
4068 return(0);
4069} /* SkGmOverflowStatus */
4070
4071
4072#ifndef SK_SLIM
4073/******************************************************************************
4074 *
4075 * SkGmCableDiagStatus() - Starts / Gets status of cable diagnostic test
4076 *
4077 * Description:
4078 * starts the cable diagnostic test if 'StartTest' is true
4079 * gets the results if 'StartTest' is true
4080 *
4081 * NOTE: this test is meaningful only when link is down
4082 *
4083 * Returns:
4084 * 0: success
4085 * 1: no YUKON copper
4086 * 2: test in progress
4087 */
4088int SkGmCableDiagStatus(
4089SK_AC *pAC, /* adapter context */
4090SK_IOC IoC, /* IO context */
4091int Port, /* Port Index (MAC_1 + n) */
4092SK_BOOL StartTest) /* flag for start / get result */
4093{
4094 int i;
4095 SK_U16 RegVal;
4096 SK_GEPORT *pPrt;
4097
4098 pPrt = &pAC->GIni.GP[Port];
4099
4100 if (pPrt->PhyType != SK_PHY_MARV_COPPER) {
4101
4102 return(1);
4103 }
4104
4105 if (StartTest) {
4106 /* only start the cable test */
4107 if ((pPrt->PhyId1 & PHY_I1_REV_MSK) < 4) {
4108 /* apply TDR workaround from Marvell */
4109 SkGmPhyWrite(pAC, IoC, Port, 29, 0x001e);
4110
4111 SkGmPhyWrite(pAC, IoC, Port, 30, 0xcc00);
4112 SkGmPhyWrite(pAC, IoC, Port, 30, 0xc800);
4113 SkGmPhyWrite(pAC, IoC, Port, 30, 0xc400);
4114 SkGmPhyWrite(pAC, IoC, Port, 30, 0xc000);
4115 SkGmPhyWrite(pAC, IoC, Port, 30, 0xc100);
4116 }
4117
4118 /* set address to 0 for MDI[0] */
4119 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_EXT_ADR, 0);
4120
4121 /* Read Cable Diagnostic Reg */
4122 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_CABLE_DIAG, &RegVal);
4123
4124 /* start Cable Diagnostic Test */
4125 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_CABLE_DIAG,
4126 (SK_U16)(RegVal | PHY_M_CABD_ENA_TEST));
4127
4128 return(0);
4129 }
4130
4131 /* Read Cable Diagnostic Reg */
4132 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_CABLE_DIAG, &RegVal);
4133
4134 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
4135 ("PHY Cable Diag.=0x%04X\n", RegVal));
4136
4137 if ((RegVal & PHY_M_CABD_ENA_TEST) != 0) {
4138 /* test is running */
4139 return(2);
4140 }
4141
4142 /* get the test results */
4143 for (i = 0; i < 4; i++) {
4144 /* set address to i for MDI[i] */
4145 SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_EXT_ADR, (SK_U16)i);
4146
4147 /* get Cable Diagnostic values */
4148 SkGmPhyRead(pAC, IoC, Port, PHY_MARV_CABLE_DIAG, &RegVal);
4149
4150 pPrt->PMdiPairLen[i] = (SK_U8)(RegVal & PHY_M_CABD_DIST_MSK);
4151
4152 pPrt->PMdiPairSts[i] = (SK_U8)((RegVal & PHY_M_CABD_STAT_MSK) >> 13);
4153 }
4154
4155 return(0);
4156} /* SkGmCableDiagStatus */
4157#endif /* !SK_SLIM */
4158#endif /* YUKON */
4159
4160/* End of file */
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 7575924363..ea117fc3d5 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -51,7 +51,7 @@
51#include "sky2.h" 51#include "sky2.h"
52 52
53#define DRV_NAME "sky2" 53#define DRV_NAME "sky2"
54#define DRV_VERSION "1.16" 54#define DRV_VERSION "1.18"
55#define PFX DRV_NAME " " 55#define PFX DRV_NAME " "
56 56
57/* 57/*
@@ -99,10 +99,6 @@ static int disable_msi = 0;
99module_param(disable_msi, int, 0); 99module_param(disable_msi, int, 0);
100MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); 100MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
101 101
102static int idle_timeout = 100;
103module_param(idle_timeout, int, 0);
104MODULE_PARM_DESC(idle_timeout, "Watchdog timer for lost interrupts (ms)");
105
106static const struct pci_device_id sky2_id_table[] = { 102static const struct pci_device_id sky2_id_table[] = {
107 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */ 103 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */
108 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */ 104 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */
@@ -122,12 +118,15 @@ static const struct pci_device_id sky2_id_table[] = {
122 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4351) }, /* 88E8036 */ 118 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4351) }, /* 88E8036 */
123 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4352) }, /* 88E8038 */ 119 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4352) }, /* 88E8038 */
124 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4353) }, /* 88E8039 */ 120 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4353) }, /* 88E8039 */
121 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4354) }, /* 88E8040 */
125 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4356) }, /* 88EC033 */ 122 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4356) }, /* 88EC033 */
123 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x435A) }, /* 88E8048 */
126 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4360) }, /* 88E8052 */ 124 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4360) }, /* 88E8052 */
127 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4361) }, /* 88E8050 */ 125 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4361) }, /* 88E8050 */
128 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4362) }, /* 88E8053 */ 126 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4362) }, /* 88E8053 */
129 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4363) }, /* 88E8055 */ 127 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4363) }, /* 88E8055 */
130 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4364) }, /* 88E8056 */ 128 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4364) }, /* 88E8056 */
129 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4365) }, /* 88E8070 */
131 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4366) }, /* 88EC036 */ 130 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4366) }, /* 88EC036 */
132 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4367) }, /* 88EC032 */ 131 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4367) }, /* 88EC032 */
133 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4368) }, /* 88EC034 */ 132 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4368) }, /* 88EC034 */
@@ -151,8 +150,11 @@ static const char *yukon2_name[] = {
151 "Extreme", /* 0xb5 */ 150 "Extreme", /* 0xb5 */
152 "EC", /* 0xb6 */ 151 "EC", /* 0xb6 */
153 "FE", /* 0xb7 */ 152 "FE", /* 0xb7 */
153 "FE+", /* 0xb8 */
154}; 154};
155 155
156static void sky2_set_multicast(struct net_device *dev);
157
156/* Access to external PHY */ 158/* Access to external PHY */
157static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val) 159static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val)
158{ 160{
@@ -219,9 +221,11 @@ static void sky2_power_on(struct sky2_hw *hw)
219 else 221 else
220 sky2_write8(hw, B2_Y2_CLK_GATE, 0); 222 sky2_write8(hw, B2_Y2_CLK_GATE, 0);
221 223
222 if (hw->chip_id == CHIP_ID_YUKON_EC_U || hw->chip_id == CHIP_ID_YUKON_EX) { 224 if (hw->flags & SKY2_HW_ADV_POWER_CTL) {
223 u32 reg; 225 u32 reg;
224 226
227 sky2_pci_write32(hw, PCI_DEV_REG3, 0);
228
225 reg = sky2_pci_read32(hw, PCI_DEV_REG4); 229 reg = sky2_pci_read32(hw, PCI_DEV_REG4);
226 /* set all bits to 0 except bits 15..12 and 8 */ 230 /* set all bits to 0 except bits 15..12 and 8 */
227 reg &= P_ASPM_CONTROL_MSK; 231 reg &= P_ASPM_CONTROL_MSK;
@@ -238,6 +242,8 @@ static void sky2_power_on(struct sky2_hw *hw)
238 reg = sky2_read32(hw, B2_GP_IO); 242 reg = sky2_read32(hw, B2_GP_IO);
239 reg |= GLB_GPIO_STAT_RACE_DIS; 243 reg |= GLB_GPIO_STAT_RACE_DIS;
240 sky2_write32(hw, B2_GP_IO, reg); 244 sky2_write32(hw, B2_GP_IO, reg);
245
246 sky2_read32(hw, B2_GP_IO);
241 } 247 }
242} 248}
243 249
@@ -308,10 +314,8 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
308 struct sky2_port *sky2 = netdev_priv(hw->dev[port]); 314 struct sky2_port *sky2 = netdev_priv(hw->dev[port]);
309 u16 ctrl, ct1000, adv, pg, ledctrl, ledover, reg; 315 u16 ctrl, ct1000, adv, pg, ledctrl, ledover, reg;
310 316
311 if (sky2->autoneg == AUTONEG_ENABLE 317 if (sky2->autoneg == AUTONEG_ENABLE &&
312 && !(hw->chip_id == CHIP_ID_YUKON_XL 318 !(hw->flags & SKY2_HW_NEWER_PHY)) {
313 || hw->chip_id == CHIP_ID_YUKON_EC_U
314 || hw->chip_id == CHIP_ID_YUKON_EX)) {
315 u16 ectrl = gm_phy_read(hw, port, PHY_MARV_EXT_CTRL); 319 u16 ectrl = gm_phy_read(hw, port, PHY_MARV_EXT_CTRL);
316 320
317 ectrl &= ~(PHY_M_EC_M_DSC_MSK | PHY_M_EC_S_DSC_MSK | 321 ectrl &= ~(PHY_M_EC_M_DSC_MSK | PHY_M_EC_S_DSC_MSK |
@@ -331,9 +335,19 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
331 335
332 ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL); 336 ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
333 if (sky2_is_copper(hw)) { 337 if (sky2_is_copper(hw)) {
334 if (hw->chip_id == CHIP_ID_YUKON_FE) { 338 if (!(hw->flags & SKY2_HW_GIGABIT)) {
335 /* enable automatic crossover */ 339 /* enable automatic crossover */
336 ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO) >> 1; 340 ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO) >> 1;
341
342 if (hw->chip_id == CHIP_ID_YUKON_FE_P &&
343 hw->chip_rev == CHIP_REV_YU_FE2_A0) {
344 u16 spec;
345
346 /* Enable Class A driver for FE+ A0 */
347 spec = gm_phy_read(hw, port, PHY_MARV_FE_SPEC_2);
348 spec |= PHY_M_FESC_SEL_CL_A;
349 gm_phy_write(hw, port, PHY_MARV_FE_SPEC_2, spec);
350 }
337 } else { 351 } else {
338 /* disable energy detect */ 352 /* disable energy detect */
339 ctrl &= ~PHY_M_PC_EN_DET_MSK; 353 ctrl &= ~PHY_M_PC_EN_DET_MSK;
@@ -343,9 +357,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
343 357
344 /* downshift on PHY 88E1112 and 88E1149 is changed */ 358 /* downshift on PHY 88E1112 and 88E1149 is changed */
345 if (sky2->autoneg == AUTONEG_ENABLE 359 if (sky2->autoneg == AUTONEG_ENABLE
346 && (hw->chip_id == CHIP_ID_YUKON_XL 360 && (hw->flags & SKY2_HW_NEWER_PHY)) {
347 || hw->chip_id == CHIP_ID_YUKON_EC_U
348 || hw->chip_id == CHIP_ID_YUKON_EX)) {
349 /* set downshift counter to 3x and enable downshift */ 361 /* set downshift counter to 3x and enable downshift */
350 ctrl &= ~PHY_M_PC_DSC_MSK; 362 ctrl &= ~PHY_M_PC_DSC_MSK;
351 ctrl |= PHY_M_PC_DSC(2) | PHY_M_PC_DOWN_S_ENA; 363 ctrl |= PHY_M_PC_DSC(2) | PHY_M_PC_DOWN_S_ENA;
@@ -361,7 +373,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
361 gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl); 373 gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl);
362 374
363 /* special setup for PHY 88E1112 Fiber */ 375 /* special setup for PHY 88E1112 Fiber */
364 if (hw->chip_id == CHIP_ID_YUKON_XL && !sky2_is_copper(hw)) { 376 if (hw->chip_id == CHIP_ID_YUKON_XL && (hw->flags & SKY2_HW_FIBRE_PHY)) {
365 pg = gm_phy_read(hw, port, PHY_MARV_EXT_ADR); 377 pg = gm_phy_read(hw, port, PHY_MARV_EXT_ADR);
366 378
367 /* Fiber: select 1000BASE-X only mode MAC Specific Ctrl Reg. */ 379 /* Fiber: select 1000BASE-X only mode MAC Specific Ctrl Reg. */
@@ -452,7 +464,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
452 464
453 gma_write16(hw, port, GM_GP_CTRL, reg); 465 gma_write16(hw, port, GM_GP_CTRL, reg);
454 466
455 if (hw->chip_id != CHIP_ID_YUKON_FE) 467 if (hw->flags & SKY2_HW_GIGABIT)
456 gm_phy_write(hw, port, PHY_MARV_1000T_CTRL, ct1000); 468 gm_phy_write(hw, port, PHY_MARV_1000T_CTRL, ct1000);
457 469
458 gm_phy_write(hw, port, PHY_MARV_AUNE_ADV, adv); 470 gm_phy_write(hw, port, PHY_MARV_AUNE_ADV, adv);
@@ -476,6 +488,23 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
476 gm_phy_write(hw, port, PHY_MARV_FE_LED_PAR, ctrl); 488 gm_phy_write(hw, port, PHY_MARV_FE_LED_PAR, ctrl);
477 break; 489 break;
478 490
491 case CHIP_ID_YUKON_FE_P:
492 /* Enable Link Partner Next Page */
493 ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
494 ctrl |= PHY_M_PC_ENA_LIP_NP;
495
496 /* disable Energy Detect and enable scrambler */
497 ctrl &= ~(PHY_M_PC_ENA_ENE_DT | PHY_M_PC_DIS_SCRAMB);
498 gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl);
499
500 /* set LED2 -> ACT, LED1 -> LINK, LED0 -> SPEED */
501 ctrl = PHY_M_FELP_LED2_CTRL(LED_PAR_CTRL_ACT_BL) |
502 PHY_M_FELP_LED1_CTRL(LED_PAR_CTRL_LINK) |
503 PHY_M_FELP_LED0_CTRL(LED_PAR_CTRL_SPEED);
504
505 gm_phy_write(hw, port, PHY_MARV_FE_LED_PAR, ctrl);
506 break;
507
479 case CHIP_ID_YUKON_XL: 508 case CHIP_ID_YUKON_XL:
480 pg = gm_phy_read(hw, port, PHY_MARV_EXT_ADR); 509 pg = gm_phy_read(hw, port, PHY_MARV_EXT_ADR);
481 510
@@ -545,7 +574,13 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
545 574
546 /* set page register to 0 */ 575 /* set page register to 0 */
547 gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 0); 576 gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 0);
577 } else if (hw->chip_id == CHIP_ID_YUKON_FE_P &&
578 hw->chip_rev == CHIP_REV_YU_FE2_A0) {
579 /* apply workaround for integrated resistors calibration */
580 gm_phy_write(hw, port, PHY_MARV_PAGE_ADDR, 17);
581 gm_phy_write(hw, port, PHY_MARV_PAGE_DATA, 0x3f60);
548 } else if (hw->chip_id != CHIP_ID_YUKON_EX) { 582 } else if (hw->chip_id != CHIP_ID_YUKON_EX) {
583 /* no effect on Yukon-XL */
549 gm_phy_write(hw, port, PHY_MARV_LED_CTRL, ledctrl); 584 gm_phy_write(hw, port, PHY_MARV_LED_CTRL, ledctrl);
550 585
551 if (sky2->autoneg == AUTONEG_DISABLE || sky2->speed == SPEED_100) { 586 if (sky2->autoneg == AUTONEG_DISABLE || sky2->speed == SPEED_100) {
@@ -666,25 +701,25 @@ static void sky2_wol_init(struct sky2_port *sky2)
666 701
667static void sky2_set_tx_stfwd(struct sky2_hw *hw, unsigned port) 702static void sky2_set_tx_stfwd(struct sky2_hw *hw, unsigned port)
668{ 703{
669 if (hw->chip_id == CHIP_ID_YUKON_EX && hw->chip_rev != CHIP_REV_YU_EX_A0) { 704 struct net_device *dev = hw->dev[port];
705
706 if (dev->mtu <= ETH_DATA_LEN)
670 sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), 707 sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T),
671 TX_STFW_ENA | 708 TX_JUMBO_DIS | TX_STFW_ENA);
672 (hw->dev[port]->mtu > ETH_DATA_LEN) ? TX_JUMBO_ENA : TX_JUMBO_DIS); 709
673 } else { 710 else if (hw->chip_id != CHIP_ID_YUKON_EC_U)
674 if (hw->dev[port]->mtu > ETH_DATA_LEN) { 711 sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T),
675 /* set Tx GMAC FIFO Almost Empty Threshold */ 712 TX_STFW_ENA | TX_JUMBO_ENA);
676 sky2_write32(hw, SK_REG(port, TX_GMF_AE_THR), 713 else {
677 (ECU_JUMBO_WM << 16) | ECU_AE_THR); 714 /* set Tx GMAC FIFO Almost Empty Threshold */
715 sky2_write32(hw, SK_REG(port, TX_GMF_AE_THR),
716 (ECU_JUMBO_WM << 16) | ECU_AE_THR);
678 717
679 sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), 718 sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T),
680 TX_JUMBO_ENA | TX_STFW_DIS); 719 TX_JUMBO_ENA | TX_STFW_DIS);
681 720
682 /* Can't do offload because of lack of store/forward */ 721 /* Can't do offload because of lack of store/forward */
683 hw->dev[port]->features &= ~(NETIF_F_TSO | NETIF_F_SG 722 dev->features &= ~(NETIF_F_TSO | NETIF_F_SG | NETIF_F_ALL_CSUM);
684 | NETIF_F_ALL_CSUM);
685 } else
686 sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T),
687 TX_JUMBO_DIS | TX_STFW_ENA);
688 } 723 }
689} 724}
690 725
@@ -770,7 +805,8 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
770 /* Configure Rx MAC FIFO */ 805 /* Configure Rx MAC FIFO */
771 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_CLR); 806 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_CLR);
772 rx_reg = GMF_OPER_ON | GMF_RX_F_FL_ON; 807 rx_reg = GMF_OPER_ON | GMF_RX_F_FL_ON;
773 if (hw->chip_id == CHIP_ID_YUKON_EX) 808 if (hw->chip_id == CHIP_ID_YUKON_EX ||
809 hw->chip_id == CHIP_ID_YUKON_FE_P)
774 rx_reg |= GMF_RX_OVER_ON; 810 rx_reg |= GMF_RX_OVER_ON;
775 811
776 sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), rx_reg); 812 sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), rx_reg);
@@ -779,13 +815,19 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
779 sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR); 815 sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR);
780 816
781 /* Set threshold to 0xa (64 bytes) + 1 to workaround pause bug */ 817 /* Set threshold to 0xa (64 bytes) + 1 to workaround pause bug */
782 sky2_write16(hw, SK_REG(port, RX_GMF_FL_THR), RX_GMF_FL_THR_DEF+1); 818 reg = RX_GMF_FL_THR_DEF + 1;
819 /* Another magic mystery workaround from sk98lin */
820 if (hw->chip_id == CHIP_ID_YUKON_FE_P &&
821 hw->chip_rev == CHIP_REV_YU_FE2_A0)
822 reg = 0x178;
823 sky2_write16(hw, SK_REG(port, RX_GMF_FL_THR), reg);
783 824
784 /* Configure Tx MAC FIFO */ 825 /* Configure Tx MAC FIFO */
785 sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_CLR); 826 sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_CLR);
786 sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON); 827 sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON);
787 828
788 if (hw->chip_id == CHIP_ID_YUKON_EC_U || hw->chip_id == CHIP_ID_YUKON_EX) { 829 /* On chips without ram buffer, pause is controled by MAC level */
830 if (sky2_read8(hw, B2_E_0) == 0) {
789 sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 768/8); 831 sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 768/8);
790 sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8); 832 sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8);
791 833
@@ -868,6 +910,20 @@ static inline struct sky2_tx_le *get_tx_le(struct sky2_port *sky2)
868 return le; 910 return le;
869} 911}
870 912
913static void tx_init(struct sky2_port *sky2)
914{
915 struct sky2_tx_le *le;
916
917 sky2->tx_prod = sky2->tx_cons = 0;
918 sky2->tx_tcpsum = 0;
919 sky2->tx_last_mss = 0;
920
921 le = get_tx_le(sky2);
922 le->addr = 0;
923 le->opcode = OP_ADDR64 | HW_OWNER;
924 sky2->tx_addr64 = 0;
925}
926
871static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2, 927static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2,
872 struct sky2_tx_le *le) 928 struct sky2_tx_le *le)
873{ 929{
@@ -964,19 +1020,15 @@ static void sky2_rx_unmap_skb(struct pci_dev *pdev, struct rx_ring_info *re)
964 */ 1020 */
965static void rx_set_checksum(struct sky2_port *sky2) 1021static void rx_set_checksum(struct sky2_port *sky2)
966{ 1022{
967 struct sky2_rx_le *le; 1023 struct sky2_rx_le *le = sky2_next_rx(sky2);
968 1024
969 if (sky2->hw->chip_id != CHIP_ID_YUKON_EX) { 1025 le->addr = cpu_to_le32((ETH_HLEN << 16) | ETH_HLEN);
970 le = sky2_next_rx(sky2); 1026 le->ctrl = 0;
971 le->addr = cpu_to_le32((ETH_HLEN << 16) | ETH_HLEN); 1027 le->opcode = OP_TCPSTART | HW_OWNER;
972 le->ctrl = 0;
973 le->opcode = OP_TCPSTART | HW_OWNER;
974
975 sky2_write32(sky2->hw,
976 Q_ADDR(rxqaddr[sky2->port], Q_CSR),
977 sky2->rx_csum ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM);
978 }
979 1028
1029 sky2_write32(sky2->hw,
1030 Q_ADDR(rxqaddr[sky2->port], Q_CSR),
1031 sky2->rx_csum ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM);
980} 1032}
981 1033
982/* 1034/*
@@ -1172,7 +1224,8 @@ static int sky2_rx_start(struct sky2_port *sky2)
1172 1224
1173 sky2_prefetch_init(hw, rxq, sky2->rx_le_map, RX_LE_SIZE - 1); 1225 sky2_prefetch_init(hw, rxq, sky2->rx_le_map, RX_LE_SIZE - 1);
1174 1226
1175 rx_set_checksum(sky2); 1227 if (!(hw->flags & SKY2_HW_NEW_LE))
1228 rx_set_checksum(sky2);
1176 1229
1177 /* Space needed for frame data + headers rounded up */ 1230 /* Space needed for frame data + headers rounded up */
1178 size = roundup(sky2->netdev->mtu + ETH_HLEN + VLAN_HLEN, 8); 1231 size = roundup(sky2->netdev->mtu + ETH_HLEN + VLAN_HLEN, 8);
@@ -1243,7 +1296,7 @@ static int sky2_up(struct net_device *dev)
1243 struct sky2_port *sky2 = netdev_priv(dev); 1296 struct sky2_port *sky2 = netdev_priv(dev);
1244 struct sky2_hw *hw = sky2->hw; 1297 struct sky2_hw *hw = sky2->hw;
1245 unsigned port = sky2->port; 1298 unsigned port = sky2->port;
1246 u32 ramsize, imask; 1299 u32 imask, ramsize;
1247 int cap, err = -ENOMEM; 1300 int cap, err = -ENOMEM;
1248 struct net_device *otherdev = hw->dev[sky2->port^1]; 1301 struct net_device *otherdev = hw->dev[sky2->port^1];
1249 1302
@@ -1281,7 +1334,8 @@ static int sky2_up(struct net_device *dev)
1281 GFP_KERNEL); 1334 GFP_KERNEL);
1282 if (!sky2->tx_ring) 1335 if (!sky2->tx_ring)
1283 goto err_out; 1336 goto err_out;
1284 sky2->tx_prod = sky2->tx_cons = 0; 1337
1338 tx_init(sky2);
1285 1339
1286 sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES, 1340 sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES,
1287 &sky2->rx_le_map); 1341 &sky2->rx_le_map);
@@ -1300,11 +1354,10 @@ static int sky2_up(struct net_device *dev)
1300 1354
1301 /* Register is number of 4K blocks on internal RAM buffer. */ 1355 /* Register is number of 4K blocks on internal RAM buffer. */
1302 ramsize = sky2_read8(hw, B2_E_0) * 4; 1356 ramsize = sky2_read8(hw, B2_E_0) * 4;
1303 printk(KERN_INFO PFX "%s: ram buffer %dK\n", dev->name, ramsize);
1304
1305 if (ramsize > 0) { 1357 if (ramsize > 0) {
1306 u32 rxspace; 1358 u32 rxspace;
1307 1359
1360 pr_debug(PFX "%s: ram buffer %dK\n", dev->name, ramsize);
1308 if (ramsize < 16) 1361 if (ramsize < 16)
1309 rxspace = ramsize / 2; 1362 rxspace = ramsize / 2;
1310 else 1363 else
@@ -1433,13 +1486,15 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
1433 /* Check for TCP Segmentation Offload */ 1486 /* Check for TCP Segmentation Offload */
1434 mss = skb_shinfo(skb)->gso_size; 1487 mss = skb_shinfo(skb)->gso_size;
1435 if (mss != 0) { 1488 if (mss != 0) {
1436 if (hw->chip_id != CHIP_ID_YUKON_EX) 1489
1490 if (!(hw->flags & SKY2_HW_NEW_LE))
1437 mss += ETH_HLEN + ip_hdrlen(skb) + tcp_hdrlen(skb); 1491 mss += ETH_HLEN + ip_hdrlen(skb) + tcp_hdrlen(skb);
1438 1492
1439 if (mss != sky2->tx_last_mss) { 1493 if (mss != sky2->tx_last_mss) {
1440 le = get_tx_le(sky2); 1494 le = get_tx_le(sky2);
1441 le->addr = cpu_to_le32(mss); 1495 le->addr = cpu_to_le32(mss);
1442 if (hw->chip_id == CHIP_ID_YUKON_EX) 1496
1497 if (hw->flags & SKY2_HW_NEW_LE)
1443 le->opcode = OP_MSS | HW_OWNER; 1498 le->opcode = OP_MSS | HW_OWNER;
1444 else 1499 else
1445 le->opcode = OP_LRGLEN | HW_OWNER; 1500 le->opcode = OP_LRGLEN | HW_OWNER;
@@ -1465,8 +1520,7 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
1465 /* Handle TCP checksum offload */ 1520 /* Handle TCP checksum offload */
1466 if (skb->ip_summed == CHECKSUM_PARTIAL) { 1521 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1467 /* On Yukon EX (some versions) encoding change. */ 1522 /* On Yukon EX (some versions) encoding change. */
1468 if (hw->chip_id == CHIP_ID_YUKON_EX 1523 if (hw->flags & SKY2_HW_AUTO_TX_SUM)
1469 && hw->chip_rev != CHIP_REV_YU_EX_B0)
1470 ctrl |= CALSUM; /* auto checksum */ 1524 ctrl |= CALSUM; /* auto checksum */
1471 else { 1525 else {
1472 const unsigned offset = skb_transport_offset(skb); 1526 const unsigned offset = skb_transport_offset(skb);
@@ -1702,11 +1756,15 @@ static int sky2_down(struct net_device *dev)
1702 1756
1703static u16 sky2_phy_speed(const struct sky2_hw *hw, u16 aux) 1757static u16 sky2_phy_speed(const struct sky2_hw *hw, u16 aux)
1704{ 1758{
1705 if (!sky2_is_copper(hw)) 1759 if (hw->flags & SKY2_HW_FIBRE_PHY)
1706 return SPEED_1000; 1760 return SPEED_1000;
1707 1761
1708 if (hw->chip_id == CHIP_ID_YUKON_FE) 1762 if (!(hw->flags & SKY2_HW_GIGABIT)) {
1709 return (aux & PHY_M_PS_SPEED_100) ? SPEED_100 : SPEED_10; 1763 if (aux & PHY_M_PS_SPEED_100)
1764 return SPEED_100;
1765 else
1766 return SPEED_10;
1767 }
1710 1768
1711 switch (aux & PHY_M_PS_SPEED_MSK) { 1769 switch (aux & PHY_M_PS_SPEED_MSK) {
1712 case PHY_M_PS_SPEED_1000: 1770 case PHY_M_PS_SPEED_1000:
@@ -1739,13 +1797,13 @@ static void sky2_link_up(struct sky2_port *sky2)
1739 1797
1740 netif_carrier_on(sky2->netdev); 1798 netif_carrier_on(sky2->netdev);
1741 1799
1800 mod_timer(&hw->watchdog_timer, jiffies + 1);
1801
1742 /* Turn on link LED */ 1802 /* Turn on link LED */
1743 sky2_write8(hw, SK_REG(port, LNK_LED_REG), 1803 sky2_write8(hw, SK_REG(port, LNK_LED_REG),
1744 LINKLED_ON | LINKLED_BLINK_OFF | LINKLED_LINKSYNC_OFF); 1804 LINKLED_ON | LINKLED_BLINK_OFF | LINKLED_LINKSYNC_OFF);
1745 1805
1746 if (hw->chip_id == CHIP_ID_YUKON_XL 1806 if (hw->flags & SKY2_HW_NEWER_PHY) {
1747 || hw->chip_id == CHIP_ID_YUKON_EC_U
1748 || hw->chip_id == CHIP_ID_YUKON_EX) {
1749 u16 pg = gm_phy_read(hw, port, PHY_MARV_EXT_ADR); 1807 u16 pg = gm_phy_read(hw, port, PHY_MARV_EXT_ADR);
1750 u16 led = PHY_M_LEDC_LOS_CTRL(1); /* link active */ 1808 u16 led = PHY_M_LEDC_LOS_CTRL(1); /* link active */
1751 1809
@@ -1832,7 +1890,7 @@ static int sky2_autoneg_done(struct sky2_port *sky2, u16 aux)
1832 /* Since the pause result bits seem to in different positions on 1890 /* Since the pause result bits seem to in different positions on
1833 * different chips. look at registers. 1891 * different chips. look at registers.
1834 */ 1892 */
1835 if (!sky2_is_copper(hw)) { 1893 if (hw->flags & SKY2_HW_FIBRE_PHY) {
1836 /* Shift for bits in fiber PHY */ 1894 /* Shift for bits in fiber PHY */
1837 advert &= ~(ADVERTISE_PAUSE_CAP|ADVERTISE_PAUSE_ASYM); 1895 advert &= ~(ADVERTISE_PAUSE_CAP|ADVERTISE_PAUSE_ASYM);
1838 lpa &= ~(LPA_PAUSE_CAP|LPA_PAUSE_ASYM); 1896 lpa &= ~(LPA_PAUSE_CAP|LPA_PAUSE_ASYM);
@@ -1943,7 +2001,9 @@ static int sky2_change_mtu(struct net_device *dev, int new_mtu)
1943 if (new_mtu < ETH_ZLEN || new_mtu > ETH_JUMBO_MTU) 2001 if (new_mtu < ETH_ZLEN || new_mtu > ETH_JUMBO_MTU)
1944 return -EINVAL; 2002 return -EINVAL;
1945 2003
1946 if (new_mtu > ETH_DATA_LEN && hw->chip_id == CHIP_ID_YUKON_FE) 2004 if (new_mtu > ETH_DATA_LEN &&
2005 (hw->chip_id == CHIP_ID_YUKON_FE ||
2006 hw->chip_id == CHIP_ID_YUKON_FE_P))
1947 return -EINVAL; 2007 return -EINVAL;
1948 2008
1949 if (!netif_running(dev)) { 2009 if (!netif_running(dev)) {
@@ -1960,7 +2020,7 @@ static int sky2_change_mtu(struct net_device *dev, int new_mtu)
1960 2020
1961 synchronize_irq(hw->pdev->irq); 2021 synchronize_irq(hw->pdev->irq);
1962 2022
1963 if (hw->chip_id == CHIP_ID_YUKON_EC_U || hw->chip_id == CHIP_ID_YUKON_EX) 2023 if (sky2_read8(hw, B2_E_0) == 0)
1964 sky2_set_tx_stfwd(hw, port); 2024 sky2_set_tx_stfwd(hw, port);
1965 2025
1966 ctl = gma_read16(hw, port, GM_GP_CTRL); 2026 ctl = gma_read16(hw, port, GM_GP_CTRL);
@@ -2088,6 +2148,13 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
2088 struct sky2_port *sky2 = netdev_priv(dev); 2148 struct sky2_port *sky2 = netdev_priv(dev);
2089 struct rx_ring_info *re = sky2->rx_ring + sky2->rx_next; 2149 struct rx_ring_info *re = sky2->rx_ring + sky2->rx_next;
2090 struct sk_buff *skb = NULL; 2150 struct sk_buff *skb = NULL;
2151 u16 count = (status & GMR_FS_LEN) >> 16;
2152
2153#ifdef SKY2_VLAN_TAG_USED
2154 /* Account for vlan tag */
2155 if (sky2->vlgrp && (status & GMR_FS_VLAN))
2156 count -= VLAN_HLEN;
2157#endif
2091 2158
2092 if (unlikely(netif_msg_rx_status(sky2))) 2159 if (unlikely(netif_msg_rx_status(sky2)))
2093 printk(KERN_DEBUG PFX "%s: rx slot %u status 0x%x len %d\n", 2160 printk(KERN_DEBUG PFX "%s: rx slot %u status 0x%x len %d\n",
@@ -2096,15 +2163,26 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
2096 sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending; 2163 sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending;
2097 prefetch(sky2->rx_ring + sky2->rx_next); 2164 prefetch(sky2->rx_ring + sky2->rx_next);
2098 2165
2166 /* This chip has hardware problems that generates bogus status.
2167 * So do only marginal checking and expect higher level protocols
2168 * to handle crap frames.
2169 */
2170 if (sky2->hw->chip_id == CHIP_ID_YUKON_FE_P &&
2171 sky2->hw->chip_rev == CHIP_REV_YU_FE2_A0 &&
2172 length != count)
2173 goto okay;
2174
2099 if (status & GMR_FS_ANY_ERR) 2175 if (status & GMR_FS_ANY_ERR)
2100 goto error; 2176 goto error;
2101 2177
2102 if (!(status & GMR_FS_RX_OK)) 2178 if (!(status & GMR_FS_RX_OK))
2103 goto resubmit; 2179 goto resubmit;
2104 2180
2105 if (status >> 16 != length) 2181 /* if length reported by DMA does not match PHY, packet was truncated */
2106 goto len_mismatch; 2182 if (length != count)
2183 goto len_error;
2107 2184
2185okay:
2108 if (length < copybreak) 2186 if (length < copybreak)
2109 skb = receive_copy(sky2, re, length); 2187 skb = receive_copy(sky2, re, length);
2110 else 2188 else
@@ -2114,10 +2192,14 @@ resubmit:
2114 2192
2115 return skb; 2193 return skb;
2116 2194
2117len_mismatch: 2195len_error:
2118 /* Truncation of overlength packets 2196 /* Truncation of overlength packets
2119 causes PHY length to not match MAC length */ 2197 causes PHY length to not match MAC length */
2120 ++sky2->net_stats.rx_length_errors; 2198 ++sky2->net_stats.rx_length_errors;
2199 if (netif_msg_rx_err(sky2) && net_ratelimit())
2200 pr_info(PFX "%s: rx length error: status %#x length %d\n",
2201 dev->name, status, length);
2202 goto resubmit;
2121 2203
2122error: 2204error:
2123 ++sky2->net_stats.rx_errors; 2205 ++sky2->net_stats.rx_errors;
@@ -2187,7 +2269,7 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)
2187 } 2269 }
2188 2270
2189 /* This chip reports checksum status differently */ 2271 /* This chip reports checksum status differently */
2190 if (hw->chip_id == CHIP_ID_YUKON_EX) { 2272 if (hw->flags & SKY2_HW_NEW_LE) {
2191 if (sky2->rx_csum && 2273 if (sky2->rx_csum &&
2192 (le->css & (CSS_ISIPV4 | CSS_ISIPV6)) && 2274 (le->css & (CSS_ISIPV4 | CSS_ISIPV6)) &&
2193 (le->css & CSS_TCPUDPCSOK)) 2275 (le->css & CSS_TCPUDPCSOK))
@@ -2228,8 +2310,14 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)
2228 if (!sky2->rx_csum) 2310 if (!sky2->rx_csum)
2229 break; 2311 break;
2230 2312
2231 if (hw->chip_id == CHIP_ID_YUKON_EX) 2313 /* If this happens then driver assuming wrong format */
2314 if (unlikely(hw->flags & SKY2_HW_NEW_LE)) {
2315 if (net_ratelimit())
2316 printk(KERN_NOTICE "%s: unexpected"
2317 " checksum status\n",
2318 dev->name);
2232 break; 2319 break;
2320 }
2233 2321
2234 /* Both checksum counters are programmed to start at 2322 /* Both checksum counters are programmed to start at
2235 * the same offset, so unless there is a problem they 2323 * the same offset, so unless there is a problem they
@@ -2421,25 +2509,72 @@ static void sky2_le_error(struct sky2_hw *hw, unsigned port,
2421 sky2_write32(hw, Q_ADDR(q, Q_CSR), BMU_CLR_IRQ_CHK); 2509 sky2_write32(hw, Q_ADDR(q, Q_CSR), BMU_CLR_IRQ_CHK);
2422} 2510}
2423 2511
2424/* If idle then force a fake soft NAPI poll once a second 2512static int sky2_rx_hung(struct net_device *dev)
2425 * to work around cases where sharing an edge triggered interrupt.
2426 */
2427static inline void sky2_idle_start(struct sky2_hw *hw)
2428{ 2513{
2429 if (idle_timeout > 0) 2514 struct sky2_port *sky2 = netdev_priv(dev);
2430 mod_timer(&hw->idle_timer, 2515 struct sky2_hw *hw = sky2->hw;
2431 jiffies + msecs_to_jiffies(idle_timeout)); 2516 unsigned port = sky2->port;
2517 unsigned rxq = rxqaddr[port];
2518 u32 mac_rp = sky2_read32(hw, SK_REG(port, RX_GMF_RP));
2519 u8 mac_lev = sky2_read8(hw, SK_REG(port, RX_GMF_RLEV));
2520 u8 fifo_rp = sky2_read8(hw, Q_ADDR(rxq, Q_RP));
2521 u8 fifo_lev = sky2_read8(hw, Q_ADDR(rxq, Q_RL));
2522
2523 /* If idle and MAC or PCI is stuck */
2524 if (sky2->check.last == dev->last_rx &&
2525 ((mac_rp == sky2->check.mac_rp &&
2526 mac_lev != 0 && mac_lev >= sky2->check.mac_lev) ||
2527 /* Check if the PCI RX hang */
2528 (fifo_rp == sky2->check.fifo_rp &&
2529 fifo_lev != 0 && fifo_lev >= sky2->check.fifo_lev))) {
2530 printk(KERN_DEBUG PFX "%s: hung mac %d:%d fifo %d (%d:%d)\n",
2531 dev->name, mac_lev, mac_rp, fifo_lev, fifo_rp,
2532 sky2_read8(hw, Q_ADDR(rxq, Q_WP)));
2533 return 1;
2534 } else {
2535 sky2->check.last = dev->last_rx;
2536 sky2->check.mac_rp = mac_rp;
2537 sky2->check.mac_lev = mac_lev;
2538 sky2->check.fifo_rp = fifo_rp;
2539 sky2->check.fifo_lev = fifo_lev;
2540 return 0;
2541 }
2432} 2542}
2433 2543
2434static void sky2_idle(unsigned long arg) 2544static void sky2_watchdog(unsigned long arg)
2435{ 2545{
2436 struct sky2_hw *hw = (struct sky2_hw *) arg; 2546 struct sky2_hw *hw = (struct sky2_hw *) arg;
2437 struct net_device *dev = hw->dev[0]; 2547 struct net_device *dev;
2548
2549 /* Check for lost IRQ once a second */
2550 if (sky2_read32(hw, B0_ISRC)) {
2551 dev = hw->dev[0];
2552 if (__netif_rx_schedule_prep(dev))
2553 __netif_rx_schedule(dev);
2554 } else {
2555 int i, active = 0;
2438 2556
2439 if (__netif_rx_schedule_prep(dev)) 2557 for (i = 0; i < hw->ports; i++) {
2440 __netif_rx_schedule(dev); 2558 dev = hw->dev[i];
2559 if (!netif_running(dev))
2560 continue;
2561 ++active;
2562
2563 /* For chips with Rx FIFO, check if stuck */
2564 if ((hw->flags & SKY2_HW_FIFO_HANG_CHECK) &&
2565 sky2_rx_hung(dev)) {
2566 pr_info(PFX "%s: receiver hang detected\n",
2567 dev->name);
2568 schedule_work(&hw->restart_work);
2569 return;
2570 }
2571 }
2441 2572
2442 mod_timer(&hw->idle_timer, jiffies + msecs_to_jiffies(idle_timeout)); 2573 if (active == 0)
2574 return;
2575 }
2576
2577 mod_timer(&hw->watchdog_timer, round_jiffies(jiffies + HZ));
2443} 2578}
2444 2579
2445/* Hardware/software error handling */ 2580/* Hardware/software error handling */
@@ -2536,17 +2671,25 @@ static void sky2_netpoll(struct net_device *dev)
2536#endif 2671#endif
2537 2672
2538/* Chip internal frequency for clock calculations */ 2673/* Chip internal frequency for clock calculations */
2539static inline u32 sky2_mhz(const struct sky2_hw *hw) 2674static u32 sky2_mhz(const struct sky2_hw *hw)
2540{ 2675{
2541 switch (hw->chip_id) { 2676 switch (hw->chip_id) {
2542 case CHIP_ID_YUKON_EC: 2677 case CHIP_ID_YUKON_EC:
2543 case CHIP_ID_YUKON_EC_U: 2678 case CHIP_ID_YUKON_EC_U:
2544 case CHIP_ID_YUKON_EX: 2679 case CHIP_ID_YUKON_EX:
2545 return 125; /* 125 Mhz */ 2680 return 125;
2681
2546 case CHIP_ID_YUKON_FE: 2682 case CHIP_ID_YUKON_FE:
2547 return 100; /* 100 Mhz */ 2683 return 100;
2548 default: /* YUKON_XL */ 2684
2549 return 156; /* 156 Mhz */ 2685 case CHIP_ID_YUKON_FE_P:
2686 return 50;
2687
2688 case CHIP_ID_YUKON_XL:
2689 return 156;
2690
2691 default:
2692 BUG();
2550 } 2693 }
2551} 2694}
2552 2695
@@ -2571,23 +2714,63 @@ static int __devinit sky2_init(struct sky2_hw *hw)
2571 sky2_write8(hw, B0_CTST, CS_RST_CLR); 2714 sky2_write8(hw, B0_CTST, CS_RST_CLR);
2572 2715
2573 hw->chip_id = sky2_read8(hw, B2_CHIP_ID); 2716 hw->chip_id = sky2_read8(hw, B2_CHIP_ID);
2574 if (hw->chip_id < CHIP_ID_YUKON_XL || hw->chip_id > CHIP_ID_YUKON_FE) { 2717 hw->chip_rev = (sky2_read8(hw, B2_MAC_CFG) & CFG_CHIP_R_MSK) >> 4;
2718
2719 switch(hw->chip_id) {
2720 case CHIP_ID_YUKON_XL:
2721 hw->flags = SKY2_HW_GIGABIT
2722 | SKY2_HW_NEWER_PHY;
2723 if (hw->chip_rev < 3)
2724 hw->flags |= SKY2_HW_FIFO_HANG_CHECK;
2725
2726 break;
2727
2728 case CHIP_ID_YUKON_EC_U:
2729 hw->flags = SKY2_HW_GIGABIT
2730 | SKY2_HW_NEWER_PHY
2731 | SKY2_HW_ADV_POWER_CTL;
2732 break;
2733
2734 case CHIP_ID_YUKON_EX:
2735 hw->flags = SKY2_HW_GIGABIT
2736 | SKY2_HW_NEWER_PHY
2737 | SKY2_HW_NEW_LE
2738 | SKY2_HW_ADV_POWER_CTL;
2739
2740 /* New transmit checksum */
2741 if (hw->chip_rev != CHIP_REV_YU_EX_B0)
2742 hw->flags |= SKY2_HW_AUTO_TX_SUM;
2743 break;
2744
2745 case CHIP_ID_YUKON_EC:
2746 /* This rev is really old, and requires untested workarounds */
2747 if (hw->chip_rev == CHIP_REV_YU_EC_A1) {
2748 dev_err(&hw->pdev->dev, "unsupported revision Yukon-EC rev A1\n");
2749 return -EOPNOTSUPP;
2750 }
2751 hw->flags = SKY2_HW_GIGABIT | SKY2_HW_FIFO_HANG_CHECK;
2752 break;
2753
2754 case CHIP_ID_YUKON_FE:
2755 break;
2756
2757 case CHIP_ID_YUKON_FE_P:
2758 hw->flags = SKY2_HW_NEWER_PHY
2759 | SKY2_HW_NEW_LE
2760 | SKY2_HW_AUTO_TX_SUM
2761 | SKY2_HW_ADV_POWER_CTL;
2762 break;
2763 default:
2575 dev_err(&hw->pdev->dev, "unsupported chip type 0x%x\n", 2764 dev_err(&hw->pdev->dev, "unsupported chip type 0x%x\n",
2576 hw->chip_id); 2765 hw->chip_id);
2577 return -EOPNOTSUPP; 2766 return -EOPNOTSUPP;
2578 } 2767 }
2579 2768
2580 hw->chip_rev = (sky2_read8(hw, B2_MAC_CFG) & CFG_CHIP_R_MSK) >> 4; 2769 hw->pmd_type = sky2_read8(hw, B2_PMD_TYP);
2770 if (hw->pmd_type == 'L' || hw->pmd_type == 'S' || hw->pmd_type == 'P')
2771 hw->flags |= SKY2_HW_FIBRE_PHY;
2581 2772
2582 /* This rev is really old, and requires untested workarounds */
2583 if (hw->chip_id == CHIP_ID_YUKON_EC && hw->chip_rev == CHIP_REV_YU_EC_A1) {
2584 dev_err(&hw->pdev->dev, "unsupported revision Yukon-%s (0x%x) rev %d\n",
2585 yukon2_name[hw->chip_id - CHIP_ID_YUKON_XL],
2586 hw->chip_id, hw->chip_rev);
2587 return -EOPNOTSUPP;
2588 }
2589 2773
2590 hw->pmd_type = sky2_read8(hw, B2_PMD_TYP);
2591 hw->ports = 1; 2774 hw->ports = 1;
2592 t8 = sky2_read8(hw, B2_Y2_HW_RES); 2775 t8 = sky2_read8(hw, B2_Y2_HW_RES);
2593 if ((t8 & CFG_DUAL_MAC_MSK) == CFG_DUAL_MAC_MSK) { 2776 if ((t8 & CFG_DUAL_MAC_MSK) == CFG_DUAL_MAC_MSK) {
@@ -2727,8 +2910,6 @@ static void sky2_restart(struct work_struct *work)
2727 struct net_device *dev; 2910 struct net_device *dev;
2728 int i, err; 2911 int i, err;
2729 2912
2730 del_timer_sync(&hw->idle_timer);
2731
2732 rtnl_lock(); 2913 rtnl_lock();
2733 sky2_write32(hw, B0_IMSK, 0); 2914 sky2_write32(hw, B0_IMSK, 0);
2734 sky2_read32(hw, B0_IMSK); 2915 sky2_read32(hw, B0_IMSK);
@@ -2757,8 +2938,6 @@ static void sky2_restart(struct work_struct *work)
2757 } 2938 }
2758 } 2939 }
2759 2940
2760 sky2_idle_start(hw);
2761
2762 rtnl_unlock(); 2941 rtnl_unlock();
2763} 2942}
2764 2943
@@ -2785,7 +2964,9 @@ static int sky2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
2785 2964
2786 sky2->wol = wol->wolopts; 2965 sky2->wol = wol->wolopts;
2787 2966
2788 if (hw->chip_id == CHIP_ID_YUKON_EC_U || hw->chip_id == CHIP_ID_YUKON_EX) 2967 if (hw->chip_id == CHIP_ID_YUKON_EC_U ||
2968 hw->chip_id == CHIP_ID_YUKON_EX ||
2969 hw->chip_id == CHIP_ID_YUKON_FE_P)
2789 sky2_write32(hw, B0_CTST, sky2->wol 2970 sky2_write32(hw, B0_CTST, sky2->wol
2790 ? Y2_HW_WOL_ON : Y2_HW_WOL_OFF); 2971 ? Y2_HW_WOL_ON : Y2_HW_WOL_OFF);
2791 2972
@@ -2803,7 +2984,7 @@ static u32 sky2_supported_modes(const struct sky2_hw *hw)
2803 | SUPPORTED_100baseT_Full 2984 | SUPPORTED_100baseT_Full
2804 | SUPPORTED_Autoneg | SUPPORTED_TP; 2985 | SUPPORTED_Autoneg | SUPPORTED_TP;
2805 2986
2806 if (hw->chip_id != CHIP_ID_YUKON_FE) 2987 if (hw->flags & SKY2_HW_GIGABIT)
2807 modes |= SUPPORTED_1000baseT_Half 2988 modes |= SUPPORTED_1000baseT_Half
2808 | SUPPORTED_1000baseT_Full; 2989 | SUPPORTED_1000baseT_Full;
2809 return modes; 2990 return modes;
@@ -2823,13 +3004,6 @@ static int sky2_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
2823 ecmd->supported = sky2_supported_modes(hw); 3004 ecmd->supported = sky2_supported_modes(hw);
2824 ecmd->phy_address = PHY_ADDR_MARV; 3005 ecmd->phy_address = PHY_ADDR_MARV;
2825 if (sky2_is_copper(hw)) { 3006 if (sky2_is_copper(hw)) {
2826 ecmd->supported = SUPPORTED_10baseT_Half
2827 | SUPPORTED_10baseT_Full
2828 | SUPPORTED_100baseT_Half
2829 | SUPPORTED_100baseT_Full
2830 | SUPPORTED_1000baseT_Half
2831 | SUPPORTED_1000baseT_Full
2832 | SUPPORTED_Autoneg | SUPPORTED_TP;
2833 ecmd->port = PORT_TP; 3007 ecmd->port = PORT_TP;
2834 ecmd->speed = sky2->speed; 3008 ecmd->speed = sky2->speed;
2835 } else { 3009 } else {
@@ -2896,8 +3070,10 @@ static int sky2_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
2896 sky2->autoneg = ecmd->autoneg; 3070 sky2->autoneg = ecmd->autoneg;
2897 sky2->advertising = ecmd->advertising; 3071 sky2->advertising = ecmd->advertising;
2898 3072
2899 if (netif_running(dev)) 3073 if (netif_running(dev)) {
2900 sky2_phy_reinit(sky2); 3074 sky2_phy_reinit(sky2);
3075 sky2_set_multicast(dev);
3076 }
2901 3077
2902 return 0; 3078 return 0;
2903} 3079}
@@ -2990,6 +3166,7 @@ static int sky2_nway_reset(struct net_device *dev)
2990 return -EINVAL; 3166 return -EINVAL;
2991 3167
2992 sky2_phy_reinit(sky2); 3168 sky2_phy_reinit(sky2);
3169 sky2_set_multicast(dev);
2993 3170
2994 return 0; 3171 return 0;
2995} 3172}
@@ -3805,8 +3982,12 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw,
3805 dev->features |= NETIF_F_HIGHDMA; 3982 dev->features |= NETIF_F_HIGHDMA;
3806 3983
3807#ifdef SKY2_VLAN_TAG_USED 3984#ifdef SKY2_VLAN_TAG_USED
3808 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; 3985 /* The workaround for FE+ status conflicts with VLAN tag detection. */
3809 dev->vlan_rx_register = sky2_vlan_rx_register; 3986 if (!(sky2->hw->chip_id == CHIP_ID_YUKON_FE_P &&
3987 sky2->hw->chip_rev == CHIP_REV_YU_FE2_A0)) {
3988 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
3989 dev->vlan_rx_register = sky2_vlan_rx_register;
3990 }
3810#endif 3991#endif
3811 3992
3812 /* read the mac address */ 3993 /* read the mac address */
@@ -3837,7 +4018,7 @@ static irqreturn_t __devinit sky2_test_intr(int irq, void *dev_id)
3837 return IRQ_NONE; 4018 return IRQ_NONE;
3838 4019
3839 if (status & Y2_IS_IRQ_SW) { 4020 if (status & Y2_IS_IRQ_SW) {
3840 hw->msi = 1; 4021 hw->flags |= SKY2_HW_USE_MSI;
3841 wake_up(&hw->msi_wait); 4022 wake_up(&hw->msi_wait);
3842 sky2_write8(hw, B0_CTST, CS_CL_SW_IRQ); 4023 sky2_write8(hw, B0_CTST, CS_CL_SW_IRQ);
3843 } 4024 }
@@ -3865,9 +4046,9 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)
3865 sky2_write8(hw, B0_CTST, CS_ST_SW_IRQ); 4046 sky2_write8(hw, B0_CTST, CS_ST_SW_IRQ);
3866 sky2_read8(hw, B0_CTST); 4047 sky2_read8(hw, B0_CTST);
3867 4048
3868 wait_event_timeout(hw->msi_wait, hw->msi, HZ/10); 4049 wait_event_timeout(hw->msi_wait, (hw->flags & SKY2_HW_USE_MSI), HZ/10);
3869 4050
3870 if (!hw->msi) { 4051 if (!(hw->flags & SKY2_HW_USE_MSI)) {
3871 /* MSI test failed, go back to INTx mode */ 4052 /* MSI test failed, go back to INTx mode */
3872 dev_info(&pdev->dev, "No interrupt generated using MSI, " 4053 dev_info(&pdev->dev, "No interrupt generated using MSI, "
3873 "switching to INTx mode.\n"); 4054 "switching to INTx mode.\n");
@@ -4000,7 +4181,8 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
4000 goto err_out_free_netdev; 4181 goto err_out_free_netdev;
4001 } 4182 }
4002 4183
4003 err = request_irq(pdev->irq, sky2_intr, hw->msi ? 0 : IRQF_SHARED, 4184 err = request_irq(pdev->irq, sky2_intr,
4185 (hw->flags & SKY2_HW_USE_MSI) ? 0 : IRQF_SHARED,
4004 dev->name, hw); 4186 dev->name, hw);
4005 if (err) { 4187 if (err) {
4006 dev_err(&pdev->dev, "cannot assign irq %d\n", pdev->irq); 4188 dev_err(&pdev->dev, "cannot assign irq %d\n", pdev->irq);
@@ -4025,17 +4207,15 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
4025 sky2_show_addr(dev1); 4207 sky2_show_addr(dev1);
4026 } 4208 }
4027 4209
4028 setup_timer(&hw->idle_timer, sky2_idle, (unsigned long) hw); 4210 setup_timer(&hw->watchdog_timer, sky2_watchdog, (unsigned long) hw);
4029 INIT_WORK(&hw->restart_work, sky2_restart); 4211 INIT_WORK(&hw->restart_work, sky2_restart);
4030 4212
4031 sky2_idle_start(hw);
4032
4033 pci_set_drvdata(pdev, hw); 4213 pci_set_drvdata(pdev, hw);
4034 4214
4035 return 0; 4215 return 0;
4036 4216
4037err_out_unregister: 4217err_out_unregister:
4038 if (hw->msi) 4218 if (hw->flags & SKY2_HW_USE_MSI)
4039 pci_disable_msi(pdev); 4219 pci_disable_msi(pdev);
4040 unregister_netdev(dev); 4220 unregister_netdev(dev);
4041err_out_free_netdev: 4221err_out_free_netdev:
@@ -4064,7 +4244,7 @@ static void __devexit sky2_remove(struct pci_dev *pdev)
4064 if (!hw) 4244 if (!hw)
4065 return; 4245 return;
4066 4246
4067 del_timer_sync(&hw->idle_timer); 4247 del_timer_sync(&hw->watchdog_timer);
4068 4248
4069 flush_scheduled_work(); 4249 flush_scheduled_work();
4070 4250
@@ -4084,7 +4264,7 @@ static void __devexit sky2_remove(struct pci_dev *pdev)
4084 sky2_read8(hw, B0_CTST); 4264 sky2_read8(hw, B0_CTST);
4085 4265
4086 free_irq(pdev->irq, hw); 4266 free_irq(pdev->irq, hw);
4087 if (hw->msi) 4267 if (hw->flags & SKY2_HW_USE_MSI)
4088 pci_disable_msi(pdev); 4268 pci_disable_msi(pdev);
4089 pci_free_consistent(pdev, STATUS_LE_BYTES, hw->st_le, hw->st_dma); 4269 pci_free_consistent(pdev, STATUS_LE_BYTES, hw->st_le, hw->st_dma);
4090 pci_release_regions(pdev); 4270 pci_release_regions(pdev);
@@ -4108,7 +4288,6 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state)
4108 if (!hw) 4288 if (!hw)
4109 return 0; 4289 return 0;
4110 4290
4111 del_timer_sync(&hw->idle_timer);
4112 netif_poll_disable(hw->dev[0]); 4291 netif_poll_disable(hw->dev[0]);
4113 4292
4114 for (i = 0; i < hw->ports; i++) { 4293 for (i = 0; i < hw->ports; i++) {
@@ -4153,7 +4332,9 @@ static int sky2_resume(struct pci_dev *pdev)
4153 pci_enable_wake(pdev, PCI_D0, 0); 4332 pci_enable_wake(pdev, PCI_D0, 0);
4154 4333
4155 /* Re-enable all clocks */ 4334 /* Re-enable all clocks */
4156 if (hw->chip_id == CHIP_ID_YUKON_EX || hw->chip_id == CHIP_ID_YUKON_EC_U) 4335 if (hw->chip_id == CHIP_ID_YUKON_EX ||
4336 hw->chip_id == CHIP_ID_YUKON_EC_U ||
4337 hw->chip_id == CHIP_ID_YUKON_FE_P)
4157 sky2_pci_write32(hw, PCI_DEV_REG3, 0); 4338 sky2_pci_write32(hw, PCI_DEV_REG3, 0);
4158 4339
4159 sky2_reset(hw); 4340 sky2_reset(hw);
@@ -4170,11 +4351,13 @@ static int sky2_resume(struct pci_dev *pdev)
4170 dev_close(dev); 4351 dev_close(dev);
4171 goto out; 4352 goto out;
4172 } 4353 }
4354
4355 sky2_set_multicast(dev);
4173 } 4356 }
4174 } 4357 }
4175 4358
4176 netif_poll_enable(hw->dev[0]); 4359 netif_poll_enable(hw->dev[0]);
4177 sky2_idle_start(hw); 4360
4178 return 0; 4361 return 0;
4179out: 4362out:
4180 dev_err(&pdev->dev, "resume failed (%d)\n", err); 4363 dev_err(&pdev->dev, "resume failed (%d)\n", err);
@@ -4191,7 +4374,6 @@ static void sky2_shutdown(struct pci_dev *pdev)
4191 if (!hw) 4374 if (!hw)
4192 return; 4375 return;
4193 4376
4194 del_timer_sync(&hw->idle_timer);
4195 netif_poll_disable(hw->dev[0]); 4377 netif_poll_disable(hw->dev[0]);
4196 4378
4197 for (i = 0; i < hw->ports; i++) { 4379 for (i = 0; i < hw->ports; i++) {
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index dce4d276d4..8bc5c54e3e 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -470,18 +470,24 @@ enum {
470 CHIP_ID_YUKON_EX = 0xb5, /* Chip ID for YUKON-2 Extreme */ 470 CHIP_ID_YUKON_EX = 0xb5, /* Chip ID for YUKON-2 Extreme */
471 CHIP_ID_YUKON_EC = 0xb6, /* Chip ID for YUKON-2 EC */ 471 CHIP_ID_YUKON_EC = 0xb6, /* Chip ID for YUKON-2 EC */
472 CHIP_ID_YUKON_FE = 0xb7, /* Chip ID for YUKON-2 FE */ 472 CHIP_ID_YUKON_FE = 0xb7, /* Chip ID for YUKON-2 FE */
473 473 CHIP_ID_YUKON_FE_P = 0xb8, /* Chip ID for YUKON-2 FE+ */
474};
475enum yukon_ec_rev {
474 CHIP_REV_YU_EC_A1 = 0, /* Chip Rev. for Yukon-EC A1/A0 */ 476 CHIP_REV_YU_EC_A1 = 0, /* Chip Rev. for Yukon-EC A1/A0 */
475 CHIP_REV_YU_EC_A2 = 1, /* Chip Rev. for Yukon-EC A2 */ 477 CHIP_REV_YU_EC_A2 = 1, /* Chip Rev. for Yukon-EC A2 */
476 CHIP_REV_YU_EC_A3 = 2, /* Chip Rev. for Yukon-EC A3 */ 478 CHIP_REV_YU_EC_A3 = 2, /* Chip Rev. for Yukon-EC A3 */
477 479};
480enum yukon_ec_u_rev {
478 CHIP_REV_YU_EC_U_A0 = 1, 481 CHIP_REV_YU_EC_U_A0 = 1,
479 CHIP_REV_YU_EC_U_A1 = 2, 482 CHIP_REV_YU_EC_U_A1 = 2,
480 CHIP_REV_YU_EC_U_B0 = 3, 483 CHIP_REV_YU_EC_U_B0 = 3,
481 484};
485enum yukon_fe_rev {
482 CHIP_REV_YU_FE_A1 = 1, 486 CHIP_REV_YU_FE_A1 = 1,
483 CHIP_REV_YU_FE_A2 = 2, 487 CHIP_REV_YU_FE_A2 = 2,
484 488};
489enum yukon_fe_p_rev {
490 CHIP_REV_YU_FE2_A0 = 0,
485}; 491};
486enum yukon_ex_rev { 492enum yukon_ex_rev {
487 CHIP_REV_YU_EX_A0 = 1, 493 CHIP_REV_YU_EX_A0 = 1,
@@ -1668,7 +1674,7 @@ enum {
1668 1674
1669/* Receive Frame Status Encoding */ 1675/* Receive Frame Status Encoding */
1670enum { 1676enum {
1671 GMR_FS_LEN = 0xffff<<16, /* Bit 31..16: Rx Frame Length */ 1677 GMR_FS_LEN = 0x7fff<<16, /* Bit 30..16: Rx Frame Length */
1672 GMR_FS_VLAN = 1<<13, /* VLAN Packet */ 1678 GMR_FS_VLAN = 1<<13, /* VLAN Packet */
1673 GMR_FS_JABBER = 1<<12, /* Jabber Packet */ 1679 GMR_FS_JABBER = 1<<12, /* Jabber Packet */
1674 GMR_FS_UN_SIZE = 1<<11, /* Undersize Packet */ 1680 GMR_FS_UN_SIZE = 1<<11, /* Undersize Packet */
@@ -1729,6 +1735,10 @@ enum {
1729 GMF_RX_CTRL_DEF = GMF_OPER_ON | GMF_RX_F_FL_ON, 1735 GMF_RX_CTRL_DEF = GMF_OPER_ON | GMF_RX_F_FL_ON,
1730}; 1736};
1731 1737
1738/* TX_GMF_EA 32 bit Tx GMAC FIFO End Address */
1739enum {
1740 TX_DYN_WM_ENA = 3, /* Yukon-FE+ specific */
1741};
1732 1742
1733/* TX_GMF_CTRL_T 32 bit Tx GMAC FIFO Control/Test */ 1743/* TX_GMF_CTRL_T 32 bit Tx GMAC FIFO Control/Test */
1734enum { 1744enum {
@@ -2017,6 +2027,14 @@ struct sky2_port {
2017 u16 rx_tag; 2027 u16 rx_tag;
2018 struct vlan_group *vlgrp; 2028 struct vlan_group *vlgrp;
2019#endif 2029#endif
2030 struct {
2031 unsigned long last;
2032 u32 mac_rp;
2033 u8 mac_lev;
2034 u8 fifo_rp;
2035 u8 fifo_lev;
2036 } check;
2037
2020 2038
2021 dma_addr_t rx_le_map; 2039 dma_addr_t rx_le_map;
2022 dma_addr_t tx_le_map; 2040 dma_addr_t tx_le_map;
@@ -2040,6 +2058,15 @@ struct sky2_hw {
2040 void __iomem *regs; 2058 void __iomem *regs;
2041 struct pci_dev *pdev; 2059 struct pci_dev *pdev;
2042 struct net_device *dev[2]; 2060 struct net_device *dev[2];
2061 unsigned long flags;
2062#define SKY2_HW_USE_MSI 0x00000001
2063#define SKY2_HW_FIBRE_PHY 0x00000002
2064#define SKY2_HW_GIGABIT 0x00000004
2065#define SKY2_HW_NEWER_PHY 0x00000008
2066#define SKY2_HW_FIFO_HANG_CHECK 0x00000010
2067#define SKY2_HW_NEW_LE 0x00000020 /* new LSOv2 format */
2068#define SKY2_HW_AUTO_TX_SUM 0x00000040 /* new IP decode for Tx */
2069#define SKY2_HW_ADV_POWER_CTL 0x00000080 /* additional PHY power regs */
2043 2070
2044 u8 chip_id; 2071 u8 chip_id;
2045 u8 chip_rev; 2072 u8 chip_rev;
@@ -2050,15 +2077,14 @@ struct sky2_hw {
2050 u32 st_idx; 2077 u32 st_idx;
2051 dma_addr_t st_dma; 2078 dma_addr_t st_dma;
2052 2079
2053 struct timer_list idle_timer; 2080 struct timer_list watchdog_timer;
2054 struct work_struct restart_work; 2081 struct work_struct restart_work;
2055 int msi;
2056 wait_queue_head_t msi_wait; 2082 wait_queue_head_t msi_wait;
2057}; 2083};
2058 2084
2059static inline int sky2_is_copper(const struct sky2_hw *hw) 2085static inline int sky2_is_copper(const struct sky2_hw *hw)
2060{ 2086{
2061 return !(hw->pmd_type == 'L' || hw->pmd_type == 'S' || hw->pmd_type == 'P'); 2087 return !(hw->flags & SKY2_HW_FIBRE_PHY);
2062} 2088}
2063 2089
2064/* Register accessor for memory mapped device */ 2090/* Register accessor for memory mapped device */
diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index 65bd20fac8..3fd4735006 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -957,7 +957,7 @@ slip_close(struct tty_struct *tty)
957 * STANDARD SLIP ENCAPSULATION * 957 * STANDARD SLIP ENCAPSULATION *
958 ************************************************************************/ 958 ************************************************************************/
959 959
960int 960static int
961slip_esc(unsigned char *s, unsigned char *d, int len) 961slip_esc(unsigned char *s, unsigned char *d, int len)
962{ 962{
963 unsigned char *ptr = d; 963 unsigned char *ptr = d;
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index 590b12c724..82d837ab4d 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -1441,17 +1441,14 @@ static void
1441spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg) 1441spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg)
1442{ 1442{
1443 u32 error_reg1, error_reg2; 1443 u32 error_reg1, error_reg2;
1444 u32 mask_reg1, mask_reg2;
1445 u32 i; 1444 u32 i;
1446 int show_error = 1; 1445 int show_error = 1;
1447 1446
1448 error_reg1 = spider_net_read_reg(card, SPIDER_NET_GHIINT1STS); 1447 error_reg1 = spider_net_read_reg(card, SPIDER_NET_GHIINT1STS);
1449 error_reg2 = spider_net_read_reg(card, SPIDER_NET_GHIINT2STS); 1448 error_reg2 = spider_net_read_reg(card, SPIDER_NET_GHIINT2STS);
1450 mask_reg1 = spider_net_read_reg(card, SPIDER_NET_GHIINT1MSK);
1451 mask_reg2 = spider_net_read_reg(card,SPIDER_NET_GHIINT2MSK);
1452 1449
1453 error_reg1 &= mask_reg1; 1450 error_reg1 &= SPIDER_NET_INT1_MASK_VALUE;
1454 error_reg2 &= mask_reg2; 1451 error_reg2 &= SPIDER_NET_INT2_MASK_VALUE;
1455 1452
1456 /* check GHIINT0STS ************************************/ 1453 /* check GHIINT0STS ************************************/
1457 if (status_reg) 1454 if (status_reg)
@@ -1679,11 +1676,10 @@ spider_net_interrupt(int irq, void *ptr)
1679{ 1676{
1680 struct net_device *netdev = ptr; 1677 struct net_device *netdev = ptr;
1681 struct spider_net_card *card = netdev_priv(netdev); 1678 struct spider_net_card *card = netdev_priv(netdev);
1682 u32 status_reg, mask_reg; 1679 u32 status_reg;
1683 1680
1684 status_reg = spider_net_read_reg(card, SPIDER_NET_GHIINT0STS); 1681 status_reg = spider_net_read_reg(card, SPIDER_NET_GHIINT0STS);
1685 mask_reg = spider_net_read_reg(card, SPIDER_NET_GHIINT0MSK); 1682 status_reg &= SPIDER_NET_INT0_MASK_VALUE;
1686 status_reg &= mask_reg;
1687 1683
1688 if (!status_reg) 1684 if (!status_reg)
1689 return IRQ_NONE; 1685 return IRQ_NONE;
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 58740428dd..9034a05734 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -64,8 +64,8 @@
64 64
65#define DRV_MODULE_NAME "tg3" 65#define DRV_MODULE_NAME "tg3"
66#define PFX DRV_MODULE_NAME ": " 66#define PFX DRV_MODULE_NAME ": "
67#define DRV_MODULE_VERSION "3.80" 67#define DRV_MODULE_VERSION "3.81"
68#define DRV_MODULE_RELDATE "August 2, 2007" 68#define DRV_MODULE_RELDATE "September 5, 2007"
69 69
70#define TG3_DEF_MAC_MODE 0 70#define TG3_DEF_MAC_MODE 0
71#define TG3_DEF_RX_MODE 0 71#define TG3_DEF_RX_MODE 0
@@ -7127,6 +7127,10 @@ static int tg3_open(struct net_device *dev)
7127 } else if (pci_enable_msi(tp->pdev) == 0) { 7127 } else if (pci_enable_msi(tp->pdev) == 0) {
7128 u32 msi_mode; 7128 u32 msi_mode;
7129 7129
7130 /* Hardware bug - MSI won't work if INTX disabled. */
7131 if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS)
7132 pci_intx(tp->pdev, 1);
7133
7130 msi_mode = tr32(MSGINT_MODE); 7134 msi_mode = tr32(MSGINT_MODE);
7131 tw32(MSGINT_MODE, msi_mode | MSGINT_MODE_ENABLE); 7135 tw32(MSGINT_MODE, msi_mode | MSGINT_MODE_ENABLE);
7132 tp->tg3_flags2 |= TG3_FLG2_USING_MSI; 7136 tp->tg3_flags2 |= TG3_FLG2_USING_MSI;
@@ -12172,6 +12176,11 @@ static int tg3_resume(struct pci_dev *pdev)
12172 if (err) 12176 if (err)
12173 return err; 12177 return err;
12174 12178
12179 /* Hardware bug - MSI won't work if INTX disabled. */
12180 if ((tp->tg3_flags2 & TG3_FLG2_5780_CLASS) &&
12181 (tp->tg3_flags2 & TG3_FLG2_USING_MSI))
12182 pci_intx(tp->pdev, 1);
12183
12175 netif_device_attach(dev); 12184 netif_device_attach(dev);
12176 12185
12177 tg3_full_lock(tp, 0); 12186 tg3_full_lock(tp, 0);
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 12e01b2410..9a38dfe45f 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -2148,7 +2148,7 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth)
2148 for (j = 0; j < ugeth->ug_info->bdRingLenTx[i]; j++) { 2148 for (j = 0; j < ugeth->ug_info->bdRingLenTx[i]; j++) {
2149 if (ugeth->tx_skbuff[i][j]) { 2149 if (ugeth->tx_skbuff[i][j]) {
2150 dma_unmap_single(NULL, 2150 dma_unmap_single(NULL,
2151 ((qe_bd_t *)bd)->buf, 2151 ((struct qe_bd *)bd)->buf,
2152 (in_be32((u32 *)bd) & 2152 (in_be32((u32 *)bd) &
2153 BD_LENGTH_MASK), 2153 BD_LENGTH_MASK),
2154 DMA_TO_DEVICE); 2154 DMA_TO_DEVICE);
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index 16c7a0e878..a2de32fabc 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -405,7 +405,7 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
405 dev->net->ethtool_ops = &dm9601_ethtool_ops; 405 dev->net->ethtool_ops = &dm9601_ethtool_ops;
406 dev->net->hard_header_len += DM_TX_OVERHEAD; 406 dev->net->hard_header_len += DM_TX_OVERHEAD;
407 dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; 407 dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
408 dev->rx_urb_size = dev->net->mtu + DM_RX_OVERHEAD; 408 dev->rx_urb_size = dev->net->mtu + ETH_HLEN + DM_RX_OVERHEAD;
409 409
410 dev->mii.dev = dev->net; 410 dev->mii.dev = dev->net;
411 dev->mii.mdio_read = dm9601_mdio_read; 411 dev->mii.mdio_read = dm9601_mdio_read;
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index ef35bc6c4a..4eb6d97528 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -43,7 +43,7 @@ obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
43obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o 43obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o
44 44
45obj-$(CONFIG_USB_ZD1201) += zd1201.o 45obj-$(CONFIG_USB_ZD1201) += zd1201.o
46obj-$(CONFIG_LIBERTAS_USB) += libertas/ 46obj-$(CONFIG_LIBERTAS) += libertas/
47 47
48rtl8187-objs := rtl8187_dev.o rtl8187_rtl8225.o 48rtl8187-objs := rtl8187_dev.o rtl8187_rtl8225.o
49obj-$(CONFIG_RTL8187) += rtl8187.o 49obj-$(CONFIG_RTL8187) += rtl8187.o
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
index c5d6753a55..dfbd01eaaf 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -3183,6 +3183,9 @@ static void bcm43xx_periodic_work_handler(struct work_struct *work)
3183 unsigned long orig_trans_start = 0; 3183 unsigned long orig_trans_start = 0;
3184 3184
3185 mutex_lock(&bcm->mutex); 3185 mutex_lock(&bcm->mutex);
3186 /* keep from doing and rearming periodic work if shutting down */
3187 if (bcm43xx_status(bcm) == BCM43xx_STAT_UNINIT)
3188 goto unlock_mutex;
3186 if (unlikely(bcm->periodic_state % 60 == 0)) { 3189 if (unlikely(bcm->periodic_state % 60 == 0)) {
3187 /* Periodic work will take a long time, so we want it to 3190 /* Periodic work will take a long time, so we want it to
3188 * be preemtible. 3191 * be preemtible.
@@ -3228,14 +3231,10 @@ static void bcm43xx_periodic_work_handler(struct work_struct *work)
3228 mmiowb(); 3231 mmiowb();
3229 bcm->periodic_state++; 3232 bcm->periodic_state++;
3230 spin_unlock_irqrestore(&bcm->irq_lock, flags); 3233 spin_unlock_irqrestore(&bcm->irq_lock, flags);
3234unlock_mutex:
3231 mutex_unlock(&bcm->mutex); 3235 mutex_unlock(&bcm->mutex);
3232} 3236}
3233 3237
3234void bcm43xx_periodic_tasks_delete(struct bcm43xx_private *bcm)
3235{
3236 cancel_rearming_delayed_work(&bcm->periodic_work);
3237}
3238
3239void bcm43xx_periodic_tasks_setup(struct bcm43xx_private *bcm) 3238void bcm43xx_periodic_tasks_setup(struct bcm43xx_private *bcm)
3240{ 3239{
3241 struct delayed_work *work = &bcm->periodic_work; 3240 struct delayed_work *work = &bcm->periodic_work;
@@ -3285,6 +3284,14 @@ static int bcm43xx_rng_init(struct bcm43xx_private *bcm)
3285 return err; 3284 return err;
3286} 3285}
3287 3286
3287void bcm43xx_cancel_work(struct bcm43xx_private *bcm)
3288{
3289 /* The system must be unlocked when this routine is entered.
3290 * If not, the next 2 steps may deadlock */
3291 cancel_work_sync(&bcm->restart_work);
3292 cancel_delayed_work_sync(&bcm->periodic_work);
3293}
3294
3288static int bcm43xx_shutdown_all_wireless_cores(struct bcm43xx_private *bcm) 3295static int bcm43xx_shutdown_all_wireless_cores(struct bcm43xx_private *bcm)
3289{ 3296{
3290 int ret = 0; 3297 int ret = 0;
@@ -3321,7 +3328,12 @@ static void bcm43xx_free_board(struct bcm43xx_private *bcm)
3321{ 3328{
3322 bcm43xx_rng_exit(bcm); 3329 bcm43xx_rng_exit(bcm);
3323 bcm43xx_sysfs_unregister(bcm); 3330 bcm43xx_sysfs_unregister(bcm);
3324 bcm43xx_periodic_tasks_delete(bcm); 3331
3332 mutex_lock(&(bcm)->mutex);
3333 bcm43xx_set_status(bcm, BCM43xx_STAT_UNINIT);
3334 mutex_unlock(&(bcm)->mutex);
3335
3336 bcm43xx_cancel_work(bcm);
3325 3337
3326 mutex_lock(&(bcm)->mutex); 3338 mutex_lock(&(bcm)->mutex);
3327 bcm43xx_shutdown_all_wireless_cores(bcm); 3339 bcm43xx_shutdown_all_wireless_cores(bcm);
@@ -4016,7 +4028,7 @@ static int bcm43xx_net_stop(struct net_device *net_dev)
4016 err = bcm43xx_disable_interrupts_sync(bcm); 4028 err = bcm43xx_disable_interrupts_sync(bcm);
4017 assert(!err); 4029 assert(!err);
4018 bcm43xx_free_board(bcm); 4030 bcm43xx_free_board(bcm);
4019 flush_scheduled_work(); 4031 bcm43xx_cancel_work(bcm);
4020 4032
4021 return 0; 4033 return 0;
4022} 4034}
@@ -4148,9 +4160,9 @@ static void bcm43xx_chip_reset(struct work_struct *work)
4148 struct bcm43xx_phyinfo *phy; 4160 struct bcm43xx_phyinfo *phy;
4149 int err = -ENODEV; 4161 int err = -ENODEV;
4150 4162
4163 bcm43xx_cancel_work(bcm);
4151 mutex_lock(&(bcm)->mutex); 4164 mutex_lock(&(bcm)->mutex);
4152 if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) { 4165 if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) {
4153 bcm43xx_periodic_tasks_delete(bcm);
4154 phy = bcm43xx_current_phy(bcm); 4166 phy = bcm43xx_current_phy(bcm);
4155 err = bcm43xx_select_wireless_core(bcm, phy->type); 4167 err = bcm43xx_select_wireless_core(bcm, phy->type);
4156 if (!err) 4168 if (!err)
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.h b/drivers/net/wireless/bcm43xx/bcm43xx_main.h
index c8f3c532ba..14cfbeb582 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_main.h
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.h
@@ -122,7 +122,7 @@ void bcm43xx_wireless_core_reset(struct bcm43xx_private *bcm, int connect_phy);
122void bcm43xx_mac_suspend(struct bcm43xx_private *bcm); 122void bcm43xx_mac_suspend(struct bcm43xx_private *bcm);
123void bcm43xx_mac_enable(struct bcm43xx_private *bcm); 123void bcm43xx_mac_enable(struct bcm43xx_private *bcm);
124 124
125void bcm43xx_periodic_tasks_delete(struct bcm43xx_private *bcm); 125void bcm43xx_cancel_work(struct bcm43xx_private *bcm);
126void bcm43xx_periodic_tasks_setup(struct bcm43xx_private *bcm); 126void bcm43xx_periodic_tasks_setup(struct bcm43xx_private *bcm);
127 127
128void bcm43xx_controller_restart(struct bcm43xx_private *bcm, const char *reason); 128void bcm43xx_controller_restart(struct bcm43xx_private *bcm, const char *reason);
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c b/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c
index c71b998a36..8ab5f93d19 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c
@@ -327,7 +327,7 @@ static ssize_t bcm43xx_attr_phymode_store(struct device *dev,
327 goto out; 327 goto out;
328 } 328 }
329 329
330 bcm43xx_periodic_tasks_delete(bcm); 330 bcm43xx_cancel_work(bcm);
331 mutex_lock(&(bcm)->mutex); 331 mutex_lock(&(bcm)->mutex);
332 err = bcm43xx_select_wireless_core(bcm, phytype); 332 err = bcm43xx_select_wireless_core(bcm, phytype);
333 if (!err) 333 if (!err)
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c
index d6d9413d7f..6acfdc49dc 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c
@@ -444,7 +444,7 @@ static int bcm43xx_wx_set_xmitpower(struct net_device *net_dev,
444 u16 maxpower; 444 u16 maxpower;
445 445
446 if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM) { 446 if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM) {
447 printk(PFX KERN_ERR "TX power not in dBm.\n"); 447 printk(KERN_ERR PFX "TX power not in dBm.\n");
448 return -EOPNOTSUPP; 448 return -EOPNOTSUPP;
449 } 449 }
450 450
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
index 70db38c0ce..56829f82be 100644
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -267,7 +267,10 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context)
267 267
268 if (subevent == 0x80) { 268 if (subevent == 0x80) {
269 dbg("%s: generationg bus event\n", __FUNCTION__); 269 dbg("%s: generationg bus event\n", __FUNCTION__);
270 acpi_bus_generate_event(note->device, note->event, detail); 270 acpi_bus_generate_proc_event(note->device, note->event, detail);
271 acpi_bus_generate_netlink_event(note->device->pnp.device_class,
272 note->device->dev.bus_id,
273 note->event, detail);
271 } else 274 } else
272 note->event = event; 275 note->event = event;
273} 276}
@@ -399,7 +402,7 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
399 402
400 status = acpi_get_object_info(handle, &info_buffer); 403 status = acpi_get_object_info(handle, &info_buffer);
401 if (ACPI_FAILURE(status)) { 404 if (ACPI_FAILURE(status)) {
402 err("%s: Failed to get device information", __FUNCTION__); 405 err("%s: Failed to get device information\n", __FUNCTION__);
403 return 0; 406 return 0;
404 } 407 }
405 info.hardware_id.value[sizeof(info.hardware_id.value) - 1] = '\0'; 408 info.hardware_id.value[sizeof(info.hardware_id.value) - 1] = '\0';
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c
index 79ff6b4de3..37d72f123a 100644
--- a/drivers/pci/hotplug/cpqphp_ctrl.c
+++ b/drivers/pci/hotplug/cpqphp_ctrl.c
@@ -1746,10 +1746,8 @@ static void pushbutton_helper_thread(unsigned long data)
1746static int event_thread(void* data) 1746static int event_thread(void* data)
1747{ 1747{
1748 struct controller *ctrl; 1748 struct controller *ctrl;
1749 lock_kernel(); 1749
1750 daemonize("phpd_event"); 1750 daemonize("phpd_event");
1751
1752 unlock_kernel();
1753 1751
1754 while (1) { 1752 while (1) {
1755 dbg("!!!!event_thread sleeping\n"); 1753 dbg("!!!!event_thread sleeping\n");
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index c6e132d7c0..4c36e80f6d 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -5,12 +5,7 @@ extern int pci_uevent(struct device *dev, char **envp, int num_envp,
5extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); 5extern int pci_create_sysfs_dev_files(struct pci_dev *pdev);
6extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); 6extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev);
7extern void pci_cleanup_rom(struct pci_dev *dev); 7extern void pci_cleanup_rom(struct pci_dev *dev);
8extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, 8
9 resource_size_t size, resource_size_t align,
10 resource_size_t min, unsigned int type_mask,
11 void (*alignf)(void *, struct resource *,
12 resource_size_t, resource_size_t),
13 void *alignf_data);
14/* Firmware callbacks */ 9/* Firmware callbacks */
15extern pci_power_t (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state); 10extern pci_power_t (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state);
16extern int (*platform_pci_set_power_state)(struct pci_dev *dev, pci_power_t state); 11extern int (*platform_pci_set_power_state)(struct pci_dev *dev, pci_power_t state);
@@ -35,7 +30,6 @@ static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; }
35 30
36/* Functions for PCI Hotplug drivers to use */ 31/* Functions for PCI Hotplug drivers to use */
37extern unsigned int pci_do_scan_bus(struct pci_bus *bus); 32extern unsigned int pci_do_scan_bus(struct pci_bus *bus);
38extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap);
39 33
40extern void pci_remove_legacy_files(struct pci_bus *bus); 34extern void pci_remove_legacy_files(struct pci_bus *bus);
41 35
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 34b8dae0d9..171ca712e5 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -285,7 +285,7 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom)
285 } 285 }
286} 286}
287 287
288void __devinit pci_read_bridge_bases(struct pci_bus *child) 288void pci_read_bridge_bases(struct pci_bus *child)
289{ 289{
290 struct pci_dev *dev = child->self; 290 struct pci_dev *dev = child->self;
291 u8 io_base_lo, io_limit_lo; 291 u8 io_base_lo, io_limit_lo;
@@ -653,20 +653,20 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass
653 653
654 sprintf(child->name, (is_cardbus ? "PCI CardBus #%02x" : "PCI Bus #%02x"), child->number); 654 sprintf(child->name, (is_cardbus ? "PCI CardBus #%02x" : "PCI Bus #%02x"), child->number);
655 655
656 /* Has only triggered on CardBus, fixup is in yenta_socket */
656 while (bus->parent) { 657 while (bus->parent) {
657 if ((child->subordinate > bus->subordinate) || 658 if ((child->subordinate > bus->subordinate) ||
658 (child->number > bus->subordinate) || 659 (child->number > bus->subordinate) ||
659 (child->number < bus->number) || 660 (child->number < bus->number) ||
660 (child->subordinate < bus->number)) { 661 (child->subordinate < bus->number)) {
661 printk(KERN_WARNING "PCI: Bus #%02x (-#%02x) is " 662 pr_debug("PCI: Bus #%02x (-#%02x) is %s"
662 "hidden behind%s bridge #%02x (-#%02x)%s\n", 663 "hidden behind%s bridge #%02x (-#%02x)\n",
663 child->number, child->subordinate, 664 child->number, child->subordinate,
664 bus->self->transparent ? " transparent" : " ", 665 (bus->number > child->subordinate &&
665 bus->number, bus->subordinate, 666 bus->subordinate < child->number) ?
666 pcibios_assign_all_busses() ? " " : 667 "wholly " : " partially",
667 " (try 'pci=assign-busses')"); 668 bus->self->transparent ? " transparent" : " ",
668 printk(KERN_WARNING "Please report the result to " 669 bus->number, bus->subordinate);
669 "<bk@suse.de> to fix this permanently\n");
670 } 670 }
671 bus = bus->parent; 671 bus = bus->parent;
672 } 672 }
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index c559085c89..50f2dd9e1b 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -947,7 +947,7 @@ static void k8t_sound_hostbridge(struct pci_dev *dev)
947 unsigned char val; 947 unsigned char val;
948 948
949 pci_read_config_byte(dev, 0x50, &val); 949 pci_read_config_byte(dev, 0x50, &val);
950 if (val == 0x88 || val == 0xc8) { 950 if (val == 0xc8) {
951 /* Assume it's probably a MSI-K8T-Neo2Fir */ 951 /* Assume it's probably a MSI-K8T-Neo2Fir */
952 printk(KERN_INFO "PCI: MSI-K8T-Neo2Fir, attempting to turn soundcard ON\n"); 952 printk(KERN_INFO "PCI: MSI-K8T-Neo2Fir, attempting to turn soundcard ON\n");
953 pci_write_config_byte(dev, 0x50, val & (~0x40)); 953 pci_write_config_byte(dev, 0x50, val & (~0x40));
@@ -972,8 +972,8 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_ho
972 * 972 *
973 * The SMBus PCI Device can be activated by setting a bit in the ICH LPC 973 * The SMBus PCI Device can be activated by setting a bit in the ICH LPC
974 * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it 974 * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it
975 * becomes necessary to do this tweak in two steps -- I've chosen the Host 975 * becomes necessary to do this tweak in two steps -- the chosen trigger
976 * bridge as trigger. 976 * is either the Host bridge (preferred) or on-board VGA controller.
977 * 977 *
978 * Note that we used to unhide the SMBus that way on Toshiba laptops 978 * Note that we used to unhide the SMBus that way on Toshiba laptops
979 * (Satellite A40 and Tecra M2) but then found that the thermal management 979 * (Satellite A40 and Tecra M2) but then found that the thermal management
@@ -1070,6 +1070,14 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
1070 case 0x0058: /* Compaq Evo N620c */ 1070 case 0x0058: /* Compaq Evo N620c */
1071 asus_hides_smbus = 1; 1071 asus_hides_smbus = 1;
1072 } 1072 }
1073 else if (dev->device == PCI_DEVICE_ID_INTEL_82810_IG3)
1074 switch(dev->subsystem_device) {
1075 case 0xB16C: /* Compaq Deskpro EP 401963-001 (PCA# 010174) */
1076 /* Motherboard doesn't have Host bridge
1077 * subvendor/subdevice IDs, therefore checking
1078 * its on-board VGA controller */
1079 asus_hides_smbus = 1;
1080 }
1073 } 1081 }
1074} 1082}
1075DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845_HB, asus_hides_smbus_hostbridge ); 1083DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845_HB, asus_hides_smbus_hostbridge );
@@ -1082,6 +1090,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855PM_HB, as
1082DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855GM_HB, asus_hides_smbus_hostbridge ); 1090DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855GM_HB, asus_hides_smbus_hostbridge );
1083DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82915GM_HB, asus_hides_smbus_hostbridge ); 1091DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82915GM_HB, asus_hides_smbus_hostbridge );
1084 1092
1093DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG3, asus_hides_smbus_hostbridge );
1094
1085static void asus_hides_smbus_lpc(struct pci_dev *dev) 1095static void asus_hides_smbus_lpc(struct pci_dev *dev)
1086{ 1096{
1087 u16 val; 1097 u16 val;
@@ -1099,12 +1109,14 @@ static void asus_hides_smbus_lpc(struct pci_dev *dev)
1099 printk(KERN_INFO "PCI: Enabled i801 SMBus device\n"); 1109 printk(KERN_INFO "PCI: Enabled i801 SMBus device\n");
1100 } 1110 }
1101} 1111}
1112DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, asus_hides_smbus_lpc );
1102DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc ); 1113DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc );
1103DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc ); 1114DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc );
1104DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, asus_hides_smbus_lpc ); 1115DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, asus_hides_smbus_lpc );
1105DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc ); 1116DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc );
1106DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc ); 1117DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc );
1107DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, asus_hides_smbus_lpc ); 1118DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, asus_hides_smbus_lpc );
1119DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, asus_hides_smbus_lpc );
1108DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc ); 1120DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc );
1109DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc ); 1121DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc );
1110DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, asus_hides_smbus_lpc ); 1122DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, asus_hides_smbus_lpc );
@@ -1432,7 +1444,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, quirk_netmos);
1432static void __devinit quirk_e100_interrupt(struct pci_dev *dev) 1444static void __devinit quirk_e100_interrupt(struct pci_dev *dev)
1433{ 1445{
1434 u16 command; 1446 u16 command;
1435 u32 bar;
1436 u8 __iomem *csr; 1447 u8 __iomem *csr;
1437 u8 cmd_hi; 1448 u8 cmd_hi;
1438 1449
@@ -1464,12 +1475,12 @@ static void __devinit quirk_e100_interrupt(struct pci_dev *dev)
1464 * re-enable them when it's ready. 1475 * re-enable them when it's ready.
1465 */ 1476 */
1466 pci_read_config_word(dev, PCI_COMMAND, &command); 1477 pci_read_config_word(dev, PCI_COMMAND, &command);
1467 pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar);
1468 1478
1469 if (!(command & PCI_COMMAND_MEMORY) || !bar) 1479 if (!(command & PCI_COMMAND_MEMORY) || !pci_resource_start(dev, 0))
1470 return; 1480 return;
1471 1481
1472 csr = ioremap(bar, 8); 1482 /* Convert from PCI bus to resource space. */
1483 csr = ioremap(pci_resource_start(dev, 0), 8);
1473 if (!csr) { 1484 if (!csr) {
1474 printk(KERN_WARNING "PCI: Can't map %s e100 registers\n", 1485 printk(KERN_WARNING "PCI: Can't map %s e100 registers\n",
1475 pci_name(dev)); 1486 pci_name(dev));
@@ -1485,7 +1496,7 @@ static void __devinit quirk_e100_interrupt(struct pci_dev *dev)
1485 1496
1486 iounmap(csr); 1497 iounmap(csr);
1487} 1498}
1488DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt); 1499DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt);
1489 1500
1490static void __devinit fixup_rev1_53c810(struct pci_dev* dev) 1501static void __devinit fixup_rev1_53c810(struct pci_dev* dev)
1491{ 1502{
@@ -1650,6 +1661,9 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCN
1650DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX, quirk_disable_all_msi); 1661DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX, quirk_disable_all_msi);
1651DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi); 1662DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi);
1652DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); 1663DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi);
1664DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RD580, quirk_disable_all_msi);
1665DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RX790, quirk_disable_all_msi);
1666DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS690, quirk_disable_all_msi);
1653DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); 1667DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi);
1654 1668
1655/* Disable MSI on chipsets that are known to not support it */ 1669/* Disable MSI on chipsets that are known to not support it */
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
index b6a4f02b01..6c0440c20e 100644
--- a/drivers/pnp/card.c
+++ b/drivers/pnp/card.c
@@ -25,13 +25,13 @@ static const struct pnp_card_device_id *match_card(struct pnp_card_driver *drv,
25 int found; 25 int found;
26 struct pnp_dev *dev; 26 struct pnp_dev *dev;
27 27
28 if (i == PNP_MAX_DEVICES 28 if (i == PNP_MAX_DEVICES ||
29 || !*drv_id->devs[i].id) 29 !*drv_id->devs[i].id)
30 return drv_id; 30 return drv_id;
31 found = 0; 31 found = 0;
32 card_for_each_dev(card, dev) { 32 card_for_each_dev(card, dev) {
33 if (compare_pnp_id 33 if (compare_pnp_id(dev->id,
34 (dev->id, drv_id->devs[i].id)) { 34 drv_id->devs[i].id)) {
35 found = 1; 35 found = 1;
36 break; 36 break;
37 } 37 }
@@ -183,7 +183,7 @@ static int pnp_interface_attach_card(struct pnp_card *card)
183 183
184 return 0; 184 return 0;
185 185
186 err_name: 186err_name:
187 device_remove_file(&card->dev, &dev_attr_name); 187 device_remove_file(&card->dev, &dev_attr_name);
188 return rc; 188 return rc;
189} 189}
@@ -321,10 +321,10 @@ struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink,
321 pos = pos->next; 321 pos = pos->next;
322 } 322 }
323 323
324 done: 324done:
325 return NULL; 325 return NULL;
326 326
327 found: 327found:
328 dev->card_link = clink; 328 dev->card_link = clink;
329 dev->dev.driver = &drv->link.driver; 329 dev->dev.driver = &drv->link.driver;
330 if (pnp_bus_type.probe(&dev->dev)) 330 if (pnp_bus_type.probe(&dev->dev))
@@ -334,7 +334,7 @@ struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink,
334 334
335 return dev; 335 return dev;
336 336
337 err_out: 337err_out:
338 dev->dev.driver = NULL; 338 dev->dev.driver = NULL;
339 dev->card_link = NULL; 339 dev->card_link = NULL;
340 return NULL; 340 return NULL;
diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
index 61066fdb9e..d5964feb14 100644
--- a/drivers/pnp/core.c
+++ b/drivers/pnp/core.c
@@ -52,9 +52,6 @@ int pnp_register_protocol(struct pnp_protocol *protocol)
52 int nodenum; 52 int nodenum;
53 struct list_head *pos; 53 struct list_head *pos;
54 54
55 if (!protocol)
56 return -EINVAL;
57
58 INIT_LIST_HEAD(&protocol->devices); 55 INIT_LIST_HEAD(&protocol->devices);
59 INIT_LIST_HEAD(&protocol->cards); 56 INIT_LIST_HEAD(&protocol->cards);
60 nodenum = 0; 57 nodenum = 0;
@@ -94,8 +91,6 @@ static void pnp_free_ids(struct pnp_dev *dev)
94 struct pnp_id *id; 91 struct pnp_id *id;
95 struct pnp_id *next; 92 struct pnp_id *next;
96 93
97 if (!dev)
98 return;
99 id = dev->id; 94 id = dev->id;
100 while (id) { 95 while (id) {
101 next = id->next; 96 next = id->next;
@@ -143,7 +138,7 @@ int __pnp_add_device(struct pnp_dev *dev)
143 */ 138 */
144int pnp_add_device(struct pnp_dev *dev) 139int pnp_add_device(struct pnp_dev *dev)
145{ 140{
146 if (!dev || !dev->protocol || dev->card) 141 if (dev->card)
147 return -EINVAL; 142 return -EINVAL;
148 dev->dev.parent = &dev->protocol->dev; 143 dev->dev.parent = &dev->protocol->dev;
149 sprintf(dev->dev.bus_id, "%02x:%02x", dev->protocol->number, 144 sprintf(dev->dev.bus_id, "%02x:%02x", dev->protocol->number,
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index 30b8f6f325..2fa64a6b25 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -118,7 +118,7 @@ static int pnp_device_probe(struct device *dev)
118 goto fail; 118 goto fail;
119 return error; 119 return error;
120 120
121 fail: 121fail:
122 pnp_device_detach(pnp_dev); 122 pnp_device_detach(pnp_dev);
123 return error; 123 return error;
124} 124}
@@ -232,10 +232,6 @@ int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev)
232{ 232{
233 struct pnp_id *ptr; 233 struct pnp_id *ptr;
234 234
235 if (!id)
236 return -EINVAL;
237 if (!dev)
238 return -EINVAL;
239 id->next = NULL; 235 id->next = NULL;
240 ptr = dev->id; 236 ptr = dev->id;
241 while (ptr && ptr->next) 237 while (ptr && ptr->next)
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c
index fe6684e13e..a0cfb75bbb 100644
--- a/drivers/pnp/interface.c
+++ b/drivers/pnp/interface.c
@@ -459,7 +459,8 @@ pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr,
459 up(&pnp_res_mutex); 459 up(&pnp_res_mutex);
460 goto done; 460 goto done;
461 } 461 }
462 done: 462
463done:
463 if (retval < 0) 464 if (retval < 0)
464 return retval; 465 return retval;
465 return count; 466 return count;
@@ -499,10 +500,10 @@ int pnp_interface_attach_device(struct pnp_dev *dev)
499 500
500 return 0; 501 return 0;
501 502
502 err_res: 503err_res:
503 device_remove_file(&dev->dev, &dev_attr_resources); 504 device_remove_file(&dev->dev, &dev_attr_resources);
504 err_opt: 505err_opt:
505 device_remove_file(&dev->dev, &dev_attr_options); 506 device_remove_file(&dev->dev, &dev_attr_options);
506 err: 507err:
507 return rc; 508 return rc;
508} 509}
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index b4e2aa995b..b035d60a1d 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -47,9 +47,6 @@
47#if 0 47#if 0
48#define ISAPNP_REGION_OK 48#define ISAPNP_REGION_OK
49#endif 49#endif
50#if 0
51#define ISAPNP_DEBUG
52#endif
53 50
54int isapnp_disable; /* Disable ISA PnP */ 51int isapnp_disable; /* Disable ISA PnP */
55static int isapnp_rdp; /* Read Data Port */ 52static int isapnp_rdp; /* Read Data Port */
@@ -93,7 +90,6 @@ MODULE_LICENSE("GPL");
93 90
94static unsigned char isapnp_checksum_value; 91static unsigned char isapnp_checksum_value;
95static DEFINE_MUTEX(isapnp_cfg_mutex); 92static DEFINE_MUTEX(isapnp_cfg_mutex);
96static int isapnp_detected;
97static int isapnp_csn_count; 93static int isapnp_csn_count;
98 94
99/* some prototypes */ 95/* some prototypes */
@@ -335,7 +331,7 @@ static int __init isapnp_isolate(void)
335 } else if (iteration > 1) { 331 } else if (iteration > 1) {
336 break; 332 break;
337 } 333 }
338 __next: 334__next:
339 if (csn == 255) 335 if (csn == 255)
340 break; 336 break;
341 checksum = 0x6a; 337 checksum = 0x6a;
@@ -733,7 +729,7 @@ static int __init isapnp_create_device(struct pnp_card *card,
733 "isapnp: unexpected or unknown tag type 0x%x for logical device %i (device %i), ignored\n", 729 "isapnp: unexpected or unknown tag type 0x%x for logical device %i (device %i), ignored\n",
734 type, dev->number, card->number); 730 type, dev->number, card->number);
735 } 731 }
736 __skip: 732__skip:
737 if (size > 0) 733 if (size > 0)
738 isapnp_skip_bytes(size); 734 isapnp_skip_bytes(size);
739 } 735 }
@@ -788,7 +784,7 @@ static void __init isapnp_parse_resource_map(struct pnp_card *card)
788 "isapnp: unexpected or unknown tag type 0x%x for device %i, ignored\n", 784 "isapnp: unexpected or unknown tag type 0x%x for device %i, ignored\n",
789 type, card->number); 785 type, card->number);
790 } 786 }
791 __skip: 787__skip:
792 if (size > 0) 788 if (size > 0)
793 isapnp_skip_bytes(size); 789 isapnp_skip_bytes(size);
794 } 790 }
@@ -940,9 +936,6 @@ EXPORT_SYMBOL(isapnp_protocol);
940EXPORT_SYMBOL(isapnp_present); 936EXPORT_SYMBOL(isapnp_present);
941EXPORT_SYMBOL(isapnp_cfg_begin); 937EXPORT_SYMBOL(isapnp_cfg_begin);
942EXPORT_SYMBOL(isapnp_cfg_end); 938EXPORT_SYMBOL(isapnp_cfg_end);
943#if 0
944EXPORT_SYMBOL(isapnp_read_byte);
945#endif
946EXPORT_SYMBOL(isapnp_write_byte); 939EXPORT_SYMBOL(isapnp_write_byte);
947 940
948static int isapnp_read_resources(struct pnp_dev *dev, 941static int isapnp_read_resources(struct pnp_dev *dev,
@@ -993,6 +986,7 @@ static int isapnp_get_resources(struct pnp_dev *dev,
993 struct pnp_resource_table *res) 986 struct pnp_resource_table *res)
994{ 987{
995 int ret; 988 int ret;
989
996 pnp_init_resource_table(res); 990 pnp_init_resource_table(res);
997 isapnp_cfg_begin(dev->card->number, dev->number); 991 isapnp_cfg_begin(dev->card->number, dev->number);
998 ret = isapnp_read_resources(dev, res); 992 ret = isapnp_read_resources(dev, res);
@@ -1046,7 +1040,7 @@ static int isapnp_set_resources(struct pnp_dev *dev,
1046 1040
1047static int isapnp_disable_resources(struct pnp_dev *dev) 1041static int isapnp_disable_resources(struct pnp_dev *dev)
1048{ 1042{
1049 if (!dev || !dev->active) 1043 if (!dev->active)
1050 return -EINVAL; 1044 return -EINVAL;
1051 isapnp_cfg_begin(dev->card->number, dev->number); 1045 isapnp_cfg_begin(dev->card->number, dev->number);
1052 isapnp_deactivate(dev->number); 1046 isapnp_deactivate(dev->number);
@@ -1069,7 +1063,6 @@ static int __init isapnp_init(void)
1069 struct pnp_dev *dev; 1063 struct pnp_dev *dev;
1070 1064
1071 if (isapnp_disable) { 1065 if (isapnp_disable) {
1072 isapnp_detected = 0;
1073 printk(KERN_INFO "isapnp: ISA Plug & Play support disabled\n"); 1066 printk(KERN_INFO "isapnp: ISA Plug & Play support disabled\n");
1074 return 0; 1067 return 0;
1075 } 1068 }
@@ -1117,7 +1110,6 @@ static int __init isapnp_init(void)
1117 } 1110 }
1118 isapnp_set_rdp(); 1111 isapnp_set_rdp();
1119 } 1112 }
1120 isapnp_detected = 1;
1121 if (isapnp_rdp < 0x203 || isapnp_rdp > 0x3ff) { 1113 if (isapnp_rdp < 0x203 || isapnp_rdp > 0x3ff) {
1122 cards = isapnp_isolate(); 1114 cards = isapnp_isolate();
1123 if (cards < 0 || (isapnp_rdp < 0x203 || isapnp_rdp > 0x3ff)) { 1115 if (cards < 0 || (isapnp_rdp < 0x203 || isapnp_rdp > 0x3ff)) {
@@ -1125,7 +1117,6 @@ static int __init isapnp_init(void)
1125 release_region(_PIDXR, 1); 1117 release_region(_PIDXR, 1);
1126#endif 1118#endif
1127 release_region(_PNPWRP, 1); 1119 release_region(_PNPWRP, 1);
1128 isapnp_detected = 0;
1129 printk(KERN_INFO 1120 printk(KERN_INFO
1130 "isapnp: No Plug & Play device found\n"); 1121 "isapnp: No Plug & Play device found\n");
1131 return 0; 1122 return 0;
@@ -1148,13 +1139,12 @@ static int __init isapnp_init(void)
1148 } 1139 }
1149 } 1140 }
1150 } 1141 }
1151 if (cards) { 1142 if (cards)
1152 printk(KERN_INFO 1143 printk(KERN_INFO
1153 "isapnp: %i Plug & Play card%s detected total\n", cards, 1144 "isapnp: %i Plug & Play card%s detected total\n", cards,
1154 cards > 1 ? "s" : ""); 1145 cards > 1 ? "s" : "");
1155 } else { 1146 else
1156 printk(KERN_INFO "isapnp: No Plug & Play card found\n"); 1147 printk(KERN_INFO "isapnp: No Plug & Play card found\n");
1157 }
1158 1148
1159 isapnp_proc_init(); 1149 isapnp_proc_init();
1160 return 0; 1150 return 0;
diff --git a/drivers/pnp/isapnp/proc.c b/drivers/pnp/isapnp/proc.c
index 3fbc0f9ffc..560ccb6408 100644
--- a/drivers/pnp/isapnp/proc.c
+++ b/drivers/pnp/isapnp/proc.c
@@ -112,33 +112,6 @@ static int isapnp_proc_attach_device(struct pnp_dev *dev)
112 return 0; 112 return 0;
113} 113}
114 114
115#ifdef MODULE
116static int __exit isapnp_proc_detach_device(struct pnp_dev *dev)
117{
118 struct pnp_card *bus = dev->card;
119 struct proc_dir_entry *de;
120 char name[16];
121
122 if (!(de = bus->procdir))
123 return -EINVAL;
124 sprintf(name, "%02x", dev->number);
125 remove_proc_entry(name, de);
126 return 0;
127}
128
129static int __exit isapnp_proc_detach_bus(struct pnp_card *bus)
130{
131 struct proc_dir_entry *de;
132 char name[16];
133
134 if (!(de = bus->procdir))
135 return -EINVAL;
136 sprintf(name, "%02x", bus->number);
137 remove_proc_entry(name, isapnp_proc_bus_dir);
138 return 0;
139}
140#endif /* MODULE */
141
142int __init isapnp_proc_init(void) 115int __init isapnp_proc_init(void)
143{ 116{
144 struct pnp_dev *dev; 117 struct pnp_dev *dev;
@@ -149,21 +122,3 @@ int __init isapnp_proc_init(void)
149 } 122 }
150 return 0; 123 return 0;
151} 124}
152
153#ifdef MODULE
154int __exit isapnp_proc_done(void)
155{
156 struct pnp_dev *dev;
157 struct pnp_bus *card;
158
159 isapnp_for_each_dev(dev) {
160 isapnp_proc_detach_device(dev);
161 }
162 isapnp_for_each_card(card) {
163 isapnp_proc_detach_bus(card);
164 }
165 if (isapnp_proc_bus_dir)
166 remove_proc_entry("isapnp", proc_bus);
167 return 0;
168}
169#endif /* MODULE */
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c
index 3bda513a6b..0826287eef 100644
--- a/drivers/pnp/manager.c
+++ b/drivers/pnp/manager.c
@@ -21,9 +21,6 @@ static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx)
21 resource_size_t *start, *end; 21 resource_size_t *start, *end;
22 unsigned long *flags; 22 unsigned long *flags;
23 23
24 if (!dev || !rule)
25 return -EINVAL;
26
27 if (idx >= PNP_MAX_PORT) { 24 if (idx >= PNP_MAX_PORT) {
28 pnp_err 25 pnp_err
29 ("More than 4 ports is incompatible with pnp specifications."); 26 ("More than 4 ports is incompatible with pnp specifications.");
@@ -66,9 +63,6 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx)
66 resource_size_t *start, *end; 63 resource_size_t *start, *end;
67 unsigned long *flags; 64 unsigned long *flags;
68 65
69 if (!dev || !rule)
70 return -EINVAL;
71
72 if (idx >= PNP_MAX_MEM) { 66 if (idx >= PNP_MAX_MEM) {
73 pnp_err 67 pnp_err
74 ("More than 8 mems is incompatible with pnp specifications."); 68 ("More than 8 mems is incompatible with pnp specifications.");
@@ -127,9 +121,6 @@ static int pnp_assign_irq(struct pnp_dev *dev, struct pnp_irq *rule, int idx)
127 5, 10, 11, 12, 9, 14, 15, 7, 3, 4, 13, 0, 1, 6, 8, 2 121 5, 10, 11, 12, 9, 14, 15, 7, 3, 4, 13, 0, 1, 6, 8, 2
128 }; 122 };
129 123
130 if (!dev || !rule)
131 return -EINVAL;
132
133 if (idx >= PNP_MAX_IRQ) { 124 if (idx >= PNP_MAX_IRQ) {
134 pnp_err 125 pnp_err
135 ("More than 2 irqs is incompatible with pnp specifications."); 126 ("More than 2 irqs is incompatible with pnp specifications.");
@@ -181,9 +172,6 @@ static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
181 1, 3, 5, 6, 7, 0, 2, 4 172 1, 3, 5, 6, 7, 0, 2, 4
182 }; 173 };
183 174
184 if (!dev || !rule)
185 return -EINVAL;
186
187 if (idx >= PNP_MAX_DMA) { 175 if (idx >= PNP_MAX_DMA) {
188 pnp_err 176 pnp_err
189 ("More than 2 dmas is incompatible with pnp specifications."); 177 ("More than 2 dmas is incompatible with pnp specifications.");
@@ -390,7 +378,7 @@ static int pnp_assign_resources(struct pnp_dev *dev, int depnum)
390 up(&pnp_res_mutex); 378 up(&pnp_res_mutex);
391 return 1; 379 return 1;
392 380
393 fail: 381fail:
394 pnp_clean_resource_table(&dev->res); 382 pnp_clean_resource_table(&dev->res);
395 up(&pnp_res_mutex); 383 up(&pnp_res_mutex);
396 return 0; 384 return 0;
@@ -410,8 +398,6 @@ int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res,
410 int i; 398 int i;
411 struct pnp_resource_table *bak; 399 struct pnp_resource_table *bak;
412 400
413 if (!dev || !res)
414 return -EINVAL;
415 if (!pnp_can_configure(dev)) 401 if (!pnp_can_configure(dev))
416 return -ENODEV; 402 return -ENODEV;
417 bak = pnp_alloc(sizeof(struct pnp_resource_table)); 403 bak = pnp_alloc(sizeof(struct pnp_resource_table));
@@ -444,7 +430,7 @@ int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res,
444 kfree(bak); 430 kfree(bak);
445 return 0; 431 return 0;
446 432
447 fail: 433fail:
448 dev->res = *bak; 434 dev->res = *bak;
449 up(&pnp_res_mutex); 435 up(&pnp_res_mutex);
450 kfree(bak); 436 kfree(bak);
@@ -460,9 +446,6 @@ int pnp_auto_config_dev(struct pnp_dev *dev)
460 struct pnp_option *dep; 446 struct pnp_option *dep;
461 int i = 1; 447 int i = 1;
462 448
463 if (!dev)
464 return -EINVAL;
465
466 if (!pnp_can_configure(dev)) { 449 if (!pnp_can_configure(dev)) {
467 pnp_dbg("Device %s does not support resource configuration.", 450 pnp_dbg("Device %s does not support resource configuration.",
468 dev->dev.bus_id); 451 dev->dev.bus_id);
@@ -541,8 +524,6 @@ int pnp_activate_dev(struct pnp_dev *dev)
541{ 524{
542 int error; 525 int error;
543 526
544 if (!dev)
545 return -EINVAL;
546 if (dev->active) 527 if (dev->active)
547 return 0; /* the device is already active */ 528 return 0; /* the device is already active */
548 529
@@ -568,8 +549,6 @@ int pnp_disable_dev(struct pnp_dev *dev)
568{ 549{
569 int error; 550 int error;
570 551
571 if (!dev)
572 return -EINVAL;
573 if (!dev->active) 552 if (!dev->active)
574 return 0; /* the device is already disabled */ 553 return 0; /* the device is already disabled */
575 554
@@ -596,8 +575,6 @@ int pnp_disable_dev(struct pnp_dev *dev)
596void pnp_resource_change(struct resource *resource, resource_size_t start, 575void pnp_resource_change(struct resource *resource, resource_size_t start,
597 resource_size_t size) 576 resource_size_t size)
598{ 577{
599 if (resource == NULL)
600 return;
601 resource->flags &= ~(IORESOURCE_AUTO | IORESOURCE_UNSET); 578 resource->flags &= ~(IORESOURCE_AUTO | IORESOURCE_UNSET);
602 resource->start = start; 579 resource->start = start;
603 resource->end = start + size - 1; 580 resource->end = start + size - 1;
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 616fc72190..a5a372222d 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -248,9 +248,9 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
248 num++; 248 num++;
249 249
250 return AE_OK; 250 return AE_OK;
251 err1: 251err1:
252 kfree(dev_id); 252 kfree(dev_id);
253 err: 253err:
254 kfree(dev); 254 kfree(dev);
255 return -EINVAL; 255 return -EINVAL;
256} 256}
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index ce5027feb3..0e3b8d0ff0 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -34,19 +34,17 @@
34 */ 34 */
35static int irq_flags(int triggering, int polarity) 35static int irq_flags(int triggering, int polarity)
36{ 36{
37 int flag;
38 if (triggering == ACPI_LEVEL_SENSITIVE) { 37 if (triggering == ACPI_LEVEL_SENSITIVE) {
39 if (polarity == ACPI_ACTIVE_LOW) 38 if (polarity == ACPI_ACTIVE_LOW)
40 flag = IORESOURCE_IRQ_LOWLEVEL; 39 return IORESOURCE_IRQ_LOWLEVEL;
41 else 40 else
42 flag = IORESOURCE_IRQ_HIGHLEVEL; 41 return IORESOURCE_IRQ_HIGHLEVEL;
43 } else { 42 } else {
44 if (polarity == ACPI_ACTIVE_LOW) 43 if (polarity == ACPI_ACTIVE_LOW)
45 flag = IORESOURCE_IRQ_LOWEDGE; 44 return IORESOURCE_IRQ_LOWEDGE;
46 else 45 else
47 flag = IORESOURCE_IRQ_HIGHEDGE; 46 return IORESOURCE_IRQ_HIGHEDGE;
48 } 47 }
49 return flag;
50} 48}
51 49
52static void decode_irq_flags(int flag, int *triggering, int *polarity) 50static void decode_irq_flags(int flag, int *triggering, int *polarity)
@@ -242,8 +240,7 @@ static void pnpacpi_parse_allocated_address_space(struct pnp_resource_table *res
242static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, 240static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
243 void *data) 241 void *data)
244{ 242{
245 struct pnp_resource_table *res_table = 243 struct pnp_resource_table *res_table = data;
246 (struct pnp_resource_table *)data;
247 int i; 244 int i;
248 245
249 switch (res->type) { 246 switch (res->type) {
@@ -566,8 +563,7 @@ static acpi_status pnpacpi_option_resource(struct acpi_resource *res,
566 void *data) 563 void *data)
567{ 564{
568 int priority = 0; 565 int priority = 0;
569 struct acpipnp_parse_option_s *parse_data = 566 struct acpipnp_parse_option_s *parse_data = data;
570 (struct acpipnp_parse_option_s *)data;
571 struct pnp_dev *dev = parse_data->dev; 567 struct pnp_dev *dev = parse_data->dev;
572 struct pnp_option *option = parse_data->option; 568 struct pnp_option *option = parse_data->option;
573 569
@@ -705,7 +701,7 @@ static int pnpacpi_supported_resource(struct acpi_resource *res)
705static acpi_status pnpacpi_count_resources(struct acpi_resource *res, 701static acpi_status pnpacpi_count_resources(struct acpi_resource *res,
706 void *data) 702 void *data)
707{ 703{
708 int *res_cnt = (int *)data; 704 int *res_cnt = data;
709 705
710 if (pnpacpi_supported_resource(res)) 706 if (pnpacpi_supported_resource(res))
711 (*res_cnt)++; 707 (*res_cnt)++;
@@ -714,7 +710,7 @@ static acpi_status pnpacpi_count_resources(struct acpi_resource *res,
714 710
715static acpi_status pnpacpi_type_resources(struct acpi_resource *res, void *data) 711static acpi_status pnpacpi_type_resources(struct acpi_resource *res, void *data)
716{ 712{
717 struct acpi_resource **resource = (struct acpi_resource **)data; 713 struct acpi_resource **resource = data;
718 714
719 if (pnpacpi_supported_resource(res)) { 715 if (pnpacpi_supported_resource(res)) {
720 (*resource)->type = res->type; 716 (*resource)->type = res->type;
@@ -886,8 +882,7 @@ int pnpacpi_encode_resources(struct pnp_resource_table *res_table,
886 int i = 0; 882 int i = 0;
887 /* pnpacpi_build_resource_template allocates extra mem */ 883 /* pnpacpi_build_resource_template allocates extra mem */
888 int res_cnt = (buffer->length - 1) / sizeof(struct acpi_resource) - 1; 884 int res_cnt = (buffer->length - 1) / sizeof(struct acpi_resource) - 1;
889 struct acpi_resource *resource = 885 struct acpi_resource *resource = buffer->pointer;
890 (struct acpi_resource *)buffer->pointer;
891 int port = 0, irq = 0, dma = 0, mem = 0; 886 int port = 0, irq = 0, dma = 0, mem = 0;
892 887
893 pnp_dbg("res cnt %d", res_cnt); 888 pnp_dbg("res cnt %d", res_cnt);
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index 3692a099b4..0691f473e9 100644
--- a/drivers/pnp/pnpbios/core.c
+++ b/drivers/pnp/pnpbios/core.c
@@ -419,7 +419,6 @@ static void __init build_devlist(void)
419static int pnpbios_disabled; 419static int pnpbios_disabled;
420int pnpbios_dont_use_current_config; 420int pnpbios_dont_use_current_config;
421 421
422#ifndef MODULE
423static int __init pnpbios_setup(char *str) 422static int __init pnpbios_setup(char *str)
424{ 423{
425 int invert; 424 int invert;
@@ -443,7 +442,6 @@ static int __init pnpbios_setup(char *str)
443} 442}
444 443
445__setup("pnpbios=", pnpbios_setup); 444__setup("pnpbios=", pnpbios_setup);
446#endif
447 445
448/* PnP BIOS signature: "$PnP" */ 446/* PnP BIOS signature: "$PnP" */
449#define PNP_SIGNATURE (('$' << 0) + ('P' << 8) + ('n' << 16) + ('P' << 24)) 447#define PNP_SIGNATURE (('$' << 0) + ('P' << 8) + ('n' << 16) + ('P' << 24))
@@ -591,6 +589,7 @@ subsys_initcall(pnpbios_init);
591static int __init pnpbios_thread_init(void) 589static int __init pnpbios_thread_init(void)
592{ 590{
593 struct task_struct *task; 591 struct task_struct *task;
592
594#if defined(CONFIG_PPC_MERGE) 593#if defined(CONFIG_PPC_MERGE)
595 if (check_legacy_ioport(PNPBIOS_BASE)) 594 if (check_legacy_ioport(PNPBIOS_BASE))
596 return 0; 595 return 0;
@@ -606,48 +605,7 @@ static int __init pnpbios_thread_init(void)
606 return 0; 605 return 0;
607} 606}
608 607
609#ifndef MODULE
610
611/* init/main.c calls pnpbios_init early */
612
613/* Start the kernel thread later: */ 608/* Start the kernel thread later: */
614module_init(pnpbios_thread_init); 609module_init(pnpbios_thread_init);
615 610
616#else
617
618/*
619 * N.B.: Building pnpbios as a module hasn't been fully implemented
620 */
621
622MODULE_LICENSE("GPL");
623
624static int __init pnpbios_init_all(void)
625{
626 int r;
627
628 r = pnpbios_init();
629 if (r)
630 return r;
631 r = pnpbios_thread_init();
632 if (r)
633 return r;
634 return 0;
635}
636
637static void __exit pnpbios_exit(void)
638{
639#ifdef CONFIG_HOTPLUG
640 unloading = 1;
641 wait_for_completion(&unload_sem);
642#endif
643 pnpbios_proc_exit();
644 /* We ought to free resources here */
645 return;
646}
647
648module_init(pnpbios_init_all);
649module_exit(pnpbios_exit);
650
651#endif
652
653EXPORT_SYMBOL(pnpbios_protocol); 611EXPORT_SYMBOL(pnpbios_protocol);
diff --git a/drivers/pnp/pnpbios/proc.c b/drivers/pnp/pnpbios/proc.c
index 9c8c07701b..9d9841f24a 100644
--- a/drivers/pnp/pnpbios/proc.c
+++ b/drivers/pnp/pnpbios/proc.c
@@ -212,7 +212,7 @@ static int proc_write_node(struct file *file, const char __user * buf,
212 goto out; 212 goto out;
213 } 213 }
214 ret = count; 214 ret = count;
215 out: 215out:
216 kfree(node); 216 kfree(node);
217 return ret; 217 return ret;
218} 218}
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c
index 04ecd7b672..3fabf11b00 100644
--- a/drivers/pnp/pnpbios/rsparser.c
+++ b/drivers/pnp/pnpbios/rsparser.c
@@ -238,7 +238,7 @@ static unsigned char *pnpbios_parse_allocated_resource_data(unsigned char *p,
238 break; 238 break;
239 239
240 default: /* an unkown tag */ 240 default: /* an unkown tag */
241 len_err: 241len_err:
242 printk(KERN_ERR 242 printk(KERN_ERR
243 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", 243 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
244 tag, len); 244 tag, len);
@@ -298,6 +298,7 @@ static void pnpbios_parse_fixed_mem32_option(unsigned char *p, int size,
298 struct pnp_option *option) 298 struct pnp_option *option)
299{ 299{
300 struct pnp_mem *mem; 300 struct pnp_mem *mem;
301
301 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL); 302 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
302 if (!mem) 303 if (!mem)
303 return; 304 return;
@@ -468,7 +469,7 @@ static unsigned char *pnpbios_parse_resource_option_data(unsigned char *p,
468 return p + 2; 469 return p + 2;
469 470
470 default: /* an unkown tag */ 471 default: /* an unkown tag */
471 len_err: 472len_err:
472 printk(KERN_ERR 473 printk(KERN_ERR
473 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", 474 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
474 tag, len); 475 tag, len);
@@ -562,7 +563,7 @@ static unsigned char *pnpbios_parse_compatible_ids(unsigned char *p,
562 break; 563 break;
563 564
564 default: /* an unkown tag */ 565 default: /* an unkown tag */
565 len_err: 566len_err:
566 printk(KERN_ERR 567 printk(KERN_ERR
567 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", 568 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
568 tag, len); 569 tag, len);
@@ -756,7 +757,7 @@ static unsigned char *pnpbios_encode_allocated_resource_data(unsigned char *p,
756 break; 757 break;
757 758
758 default: /* an unkown tag */ 759 default: /* an unkown tag */
759 len_err: 760len_err:
760 printk(KERN_ERR 761 printk(KERN_ERR
761 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", 762 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
762 tag, len); 763 tag, len);
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
index 90755d4cdb..6b0cf0c2a0 100644
--- a/drivers/pnp/quirks.c
+++ b/drivers/pnp/quirks.c
@@ -107,108 +107,6 @@ static void quirk_sb16audio_resources(struct pnp_dev *dev)
107 "pnp: SB audio device quirk - increasing port range\n"); 107 "pnp: SB audio device quirk - increasing port range\n");
108} 108}
109 109
110static int quirk_smc_fir_enabled(struct pnp_dev *dev)
111{
112 unsigned long firbase;
113 u8 bank, high, low, chip;
114
115 if (!pnp_port_valid(dev, 1))
116 return 0;
117
118 firbase = pnp_port_start(dev, 1);
119
120 /* Select register bank 3 */
121 bank = inb(firbase + 7);
122 bank &= 0xf0;
123 bank |= 3;
124 outb(bank, firbase + 7);
125
126 high = inb(firbase + 0);
127 low = inb(firbase + 1);
128 chip = inb(firbase + 2);
129
130 /* This corresponds to the check in smsc_ircc_present() */
131 if (high == 0x10 && low == 0xb8 && (chip == 0xf1 || chip == 0xf2))
132 return 1;
133
134 return 0;
135}
136
137static void quirk_smc_enable(struct pnp_dev *dev)
138{
139 struct resource fir, sir, irq;
140
141 pnp_activate_dev(dev);
142 if (quirk_smc_fir_enabled(dev))
143 return;
144
145 /*
146 * Sometimes the BIOS claims the device is enabled, but it reports
147 * the wrong FIR resources or doesn't properly configure ISA or LPC
148 * bridges on the way to the device.
149 *
150 * HP nc6000 and nc8000/nw8000 laptops have known problems like
151 * this. Fortunately, they do fix things up if we auto-configure
152 * the device using its _PRS and _SRS methods.
153 */
154 dev_err(&dev->dev, "%s not responding at SIR 0x%lx, FIR 0x%lx; "
155 "auto-configuring\n", dev->id->id,
156 (unsigned long)pnp_port_start(dev, 0),
157 (unsigned long)pnp_port_start(dev, 1));
158
159 pnp_disable_dev(dev);
160 pnp_init_resource_table(&dev->res);
161 pnp_auto_config_dev(dev);
162 pnp_activate_dev(dev);
163 if (quirk_smc_fir_enabled(dev)) {
164 dev_err(&dev->dev, "responds at SIR 0x%lx, FIR 0x%lx\n",
165 (unsigned long)pnp_port_start(dev, 0),
166 (unsigned long)pnp_port_start(dev, 1));
167 return;
168 }
169
170 /*
171 * The Toshiba Portege 4000 _CRS reports the FIR region first,
172 * followed by the SIR region. The BIOS will configure the bridge,
173 * but only if we call _SRS with SIR first, then FIR. It also
174 * reports the IRQ as active high, when it is really active low.
175 */
176 dev_err(&dev->dev, "not responding at SIR 0x%lx, FIR 0x%lx; "
177 "swapping SIR/FIR and reconfiguring\n",
178 (unsigned long)pnp_port_start(dev, 0),
179 (unsigned long)pnp_port_start(dev, 1));
180
181 /*
182 * Clear IORESOURCE_AUTO so pnp_activate_dev() doesn't reassign
183 * these resources any more.
184 */
185 fir = dev->res.port_resource[0];
186 sir = dev->res.port_resource[1];
187 fir.flags &= ~IORESOURCE_AUTO;
188 sir.flags &= ~IORESOURCE_AUTO;
189
190 irq = dev->res.irq_resource[0];
191 irq.flags &= ~IORESOURCE_AUTO;
192 irq.flags &= ~IORESOURCE_BITS;
193 irq.flags |= IORESOURCE_IRQ_LOWEDGE;
194
195 pnp_disable_dev(dev);
196 dev->res.port_resource[0] = sir;
197 dev->res.port_resource[1] = fir;
198 dev->res.irq_resource[0] = irq;
199 pnp_activate_dev(dev);
200
201 if (quirk_smc_fir_enabled(dev)) {
202 dev_err(&dev->dev, "responds at SIR 0x%lx, FIR 0x%lx\n",
203 (unsigned long)pnp_port_start(dev, 0),
204 (unsigned long)pnp_port_start(dev, 1));
205 return;
206 }
207
208 dev_err(&dev->dev, "giving up; try \"smsc-ircc2.nopnp\" and "
209 "email bjorn.helgaas@hp.com\n");
210}
211
212/* 110/*
213 * PnP Quirks 111 * PnP Quirks
214 * Cards or devices that need some tweaking due to incomplete resource info 112 * Cards or devices that need some tweaking due to incomplete resource info
@@ -229,7 +127,6 @@ static struct pnp_fixup pnp_fixups[] = {
229 {"CTL0043", quirk_sb16audio_resources}, 127 {"CTL0043", quirk_sb16audio_resources},
230 {"CTL0044", quirk_sb16audio_resources}, 128 {"CTL0044", quirk_sb16audio_resources},
231 {"CTL0045", quirk_sb16audio_resources}, 129 {"CTL0045", quirk_sb16audio_resources},
232 {"SMCf010", quirk_smc_enable},
233 {""} 130 {""}
234}; 131};
235 132
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index ea6ec14a05..ef1286900d 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -47,9 +47,6 @@ struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev)
47{ 47{
48 struct pnp_option *option; 48 struct pnp_option *option;
49 49
50 if (!dev)
51 return NULL;
52
53 option = pnp_build_option(PNP_RES_PRIORITY_PREFERRED); 50 option = pnp_build_option(PNP_RES_PRIORITY_PREFERRED);
54 51
55 /* this should never happen but if it does we'll try to continue */ 52 /* this should never happen but if it does we'll try to continue */
@@ -64,9 +61,6 @@ struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev,
64{ 61{
65 struct pnp_option *option; 62 struct pnp_option *option;
66 63
67 if (!dev)
68 return NULL;
69
70 option = pnp_build_option(priority); 64 option = pnp_build_option(priority);
71 65
72 if (dev->dependent) { 66 if (dev->dependent) {
@@ -83,11 +77,6 @@ int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data)
83{ 77{
84 struct pnp_irq *ptr; 78 struct pnp_irq *ptr;
85 79
86 if (!option)
87 return -EINVAL;
88 if (!data)
89 return -EINVAL;
90
91 ptr = option->irq; 80 ptr = option->irq;
92 while (ptr && ptr->next) 81 while (ptr && ptr->next)
93 ptr = ptr->next; 82 ptr = ptr->next;
@@ -112,11 +101,6 @@ int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data)
112{ 101{
113 struct pnp_dma *ptr; 102 struct pnp_dma *ptr;
114 103
115 if (!option)
116 return -EINVAL;
117 if (!data)
118 return -EINVAL;
119
120 ptr = option->dma; 104 ptr = option->dma;
121 while (ptr && ptr->next) 105 while (ptr && ptr->next)
122 ptr = ptr->next; 106 ptr = ptr->next;
@@ -132,11 +116,6 @@ int pnp_register_port_resource(struct pnp_option *option, struct pnp_port *data)
132{ 116{
133 struct pnp_port *ptr; 117 struct pnp_port *ptr;
134 118
135 if (!option)
136 return -EINVAL;
137 if (!data)
138 return -EINVAL;
139
140 ptr = option->port; 119 ptr = option->port;
141 while (ptr && ptr->next) 120 while (ptr && ptr->next)
142 ptr = ptr->next; 121 ptr = ptr->next;
@@ -152,11 +131,6 @@ int pnp_register_mem_resource(struct pnp_option *option, struct pnp_mem *data)
152{ 131{
153 struct pnp_mem *ptr; 132 struct pnp_mem *ptr;
154 133
155 if (!option)
156 return -EINVAL;
157 if (!data)
158 return -EINVAL;
159
160 ptr = option->mem; 134 ptr = option->mem;
161 while (ptr && ptr->next) 135 while (ptr && ptr->next)
162 ptr = ptr->next; 136 ptr = ptr->next;
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index c7c4574729..de3155b212 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -289,6 +289,7 @@ int power_supply_uevent(struct device *dev, char **envp, int num_envp,
289 if (ret) 289 if (ret)
290 goto out; 290 goto out;
291 } 291 }
292 envp[i] = NULL;
292 293
293out: 294out:
294 free_page((unsigned long)prop_buf); 295 free_page((unsigned long)prop_buf);
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index 46da571493..5ab3492817 100644
--- a/drivers/rtc/rtc-ds1553.c
+++ b/drivers/rtc/rtc-ds1553.c
@@ -61,7 +61,7 @@
61struct rtc_plat_data { 61struct rtc_plat_data {
62 struct rtc_device *rtc; 62 struct rtc_device *rtc;
63 void __iomem *ioaddr; 63 void __iomem *ioaddr;
64 unsigned long baseaddr; 64 resource_size_t baseaddr;
65 unsigned long last_jiffies; 65 unsigned long last_jiffies;
66 int irq; 66 int irq;
67 unsigned int irqen; 67 unsigned int irqen;
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c
index b2e5481ba3..67291b0f82 100644
--- a/drivers/rtc/rtc-ds1742.c
+++ b/drivers/rtc/rtc-ds1742.c
@@ -55,7 +55,7 @@ struct rtc_plat_data {
55 void __iomem *ioaddr_rtc; 55 void __iomem *ioaddr_rtc;
56 size_t size_nvram; 56 size_t size_nvram;
57 size_t size; 57 size_t size;
58 unsigned long baseaddr; 58 resource_size_t baseaddr;
59 unsigned long last_jiffies; 59 unsigned long last_jiffies;
60}; 60};
61 61
diff --git a/drivers/rtc/rtc-rs5c348.c b/drivers/rtc/rtc-rs5c348.c
index f50f3fc353..839462659a 100644
--- a/drivers/rtc/rtc-rs5c348.c
+++ b/drivers/rtc/rtc-rs5c348.c
@@ -226,7 +226,7 @@ static int __devexit rs5c348_remove(struct spi_device *spi)
226 226
227static struct spi_driver rs5c348_driver = { 227static struct spi_driver rs5c348_driver = {
228 .driver = { 228 .driver = {
229 .name = "rs5c348", 229 .name = "rtc-rs5c348",
230 .bus = &spi_bus_type, 230 .bus = &spi_bus_type,
231 .owner = THIS_MODULE, 231 .owner = THIS_MODULE,
232 }, 232 },
diff --git a/drivers/rtc/rtc-v3020.c b/drivers/rtc/rtc-v3020.c
index 3b58d3d5d3..a6b572978d 100644
--- a/drivers/rtc/rtc-v3020.c
+++ b/drivers/rtc/rtc-v3020.c
@@ -26,6 +26,7 @@
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/bcd.h> 27#include <linux/bcd.h>
28#include <linux/rtc-v3020.h> 28#include <linux/rtc-v3020.h>
29#include <linux/delay.h>
29 30
30#include <asm/io.h> 31#include <asm/io.h>
31 32
@@ -47,6 +48,7 @@ static void v3020_set_reg(struct v3020 *chip, unsigned char address,
47 for (i = 0; i < 4; i++) { 48 for (i = 0; i < 4; i++) {
48 writel((tmp & 1) << chip->leftshift, chip->ioaddress); 49 writel((tmp & 1) << chip->leftshift, chip->ioaddress);
49 tmp >>= 1; 50 tmp >>= 1;
51 udelay(1);
50 } 52 }
51 53
52 /* Commands dont have data */ 54 /* Commands dont have data */
@@ -54,6 +56,7 @@ static void v3020_set_reg(struct v3020 *chip, unsigned char address,
54 for (i = 0; i < 8; i++) { 56 for (i = 0; i < 8; i++) {
55 writel((data & 1) << chip->leftshift, chip->ioaddress); 57 writel((data & 1) << chip->leftshift, chip->ioaddress);
56 data >>= 1; 58 data >>= 1;
59 udelay(1);
57 } 60 }
58 } 61 }
59} 62}
@@ -66,12 +69,14 @@ static unsigned char v3020_get_reg(struct v3020 *chip, unsigned char address)
66 for (i = 0; i < 4; i++) { 69 for (i = 0; i < 4; i++) {
67 writel((address & 1) << chip->leftshift, chip->ioaddress); 70 writel((address & 1) << chip->leftshift, chip->ioaddress);
68 address >>= 1; 71 address >>= 1;
72 udelay(1);
69 } 73 }
70 74
71 for (i = 0; i < 8; i++) { 75 for (i = 0; i < 8; i++) {
72 data >>= 1; 76 data >>= 1;
73 if (readl(chip->ioaddress) & (1 << chip->leftshift)) 77 if (readl(chip->ioaddress) & (1 << chip->leftshift))
74 data |= 0x80; 78 data |= 0x80;
79 udelay(1);
75 } 80 }
76 81
77 return data; 82 return data;
@@ -95,7 +100,7 @@ static int v3020_read_time(struct device *dev, struct rtc_time *dt)
95 tmp = v3020_get_reg(chip, V3020_MONTH_DAY); 100 tmp = v3020_get_reg(chip, V3020_MONTH_DAY);
96 dt->tm_mday = BCD2BIN(tmp); 101 dt->tm_mday = BCD2BIN(tmp);
97 tmp = v3020_get_reg(chip, V3020_MONTH); 102 tmp = v3020_get_reg(chip, V3020_MONTH);
98 dt->tm_mon = BCD2BIN(tmp); 103 dt->tm_mon = BCD2BIN(tmp) - 1;
99 tmp = v3020_get_reg(chip, V3020_WEEK_DAY); 104 tmp = v3020_get_reg(chip, V3020_WEEK_DAY);
100 dt->tm_wday = BCD2BIN(tmp); 105 dt->tm_wday = BCD2BIN(tmp);
101 tmp = v3020_get_reg(chip, V3020_YEAR); 106 tmp = v3020_get_reg(chip, V3020_YEAR);
@@ -135,7 +140,7 @@ static int v3020_set_time(struct device *dev, struct rtc_time *dt)
135 v3020_set_reg(chip, V3020_MINUTES, BIN2BCD(dt->tm_min)); 140 v3020_set_reg(chip, V3020_MINUTES, BIN2BCD(dt->tm_min));
136 v3020_set_reg(chip, V3020_HOURS, BIN2BCD(dt->tm_hour)); 141 v3020_set_reg(chip, V3020_HOURS, BIN2BCD(dt->tm_hour));
137 v3020_set_reg(chip, V3020_MONTH_DAY, BIN2BCD(dt->tm_mday)); 142 v3020_set_reg(chip, V3020_MONTH_DAY, BIN2BCD(dt->tm_mday));
138 v3020_set_reg(chip, V3020_MONTH, BIN2BCD(dt->tm_mon)); 143 v3020_set_reg(chip, V3020_MONTH, BIN2BCD(dt->tm_mon + 1));
139 v3020_set_reg(chip, V3020_WEEK_DAY, BIN2BCD(dt->tm_wday)); 144 v3020_set_reg(chip, V3020_WEEK_DAY, BIN2BCD(dt->tm_wday));
140 v3020_set_reg(chip, V3020_YEAR, BIN2BCD(dt->tm_year % 100)); 145 v3020_set_reg(chip, V3020_YEAR, BIN2BCD(dt->tm_year % 100));
141 146
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h
index ec18bae05d..6d4959807a 100644
--- a/drivers/s390/net/qeth.h
+++ b/drivers/s390/net/qeth.h
@@ -1178,9 +1178,9 @@ qeth_ipaddr_to_string(enum qeth_prot_versions proto, const __u8 *addr,
1178 char *buf) 1178 char *buf)
1179{ 1179{
1180 if (proto == QETH_PROT_IPV4) 1180 if (proto == QETH_PROT_IPV4)
1181 return qeth_ipaddr4_to_string(addr, buf); 1181 qeth_ipaddr4_to_string(addr, buf);
1182 else if (proto == QETH_PROT_IPV6) 1182 else if (proto == QETH_PROT_IPV6)
1183 return qeth_ipaddr6_to_string(addr, buf); 1183 qeth_ipaddr6_to_string(addr, buf);
1184} 1184}
1185 1185
1186static inline int 1186static inline int
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 57f69434fb..f3e6fbeb21 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -561,7 +561,7 @@ qeth_set_offline(struct ccwgroup_device *cgdev)
561} 561}
562 562
563static int 563static int
564qeth_wait_for_threads(struct qeth_card *card, unsigned long threads); 564qeth_threads_running(struct qeth_card *card, unsigned long threads);
565 565
566 566
567static void 567static void
@@ -576,8 +576,7 @@ qeth_remove_device(struct ccwgroup_device *cgdev)
576 if (!card) 576 if (!card)
577 return; 577 return;
578 578
579 if (qeth_wait_for_threads(card, 0xffffffff)) 579 wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0);
580 return;
581 580
582 if (cgdev->state == CCWGROUP_ONLINE){ 581 if (cgdev->state == CCWGROUP_ONLINE){
583 card->use_hard_stop = 1; 582 card->use_hard_stop = 1;
@@ -1542,16 +1541,21 @@ qeth_idx_write_cb(struct qeth_channel *channel, struct qeth_cmd_buffer *iob)
1542 card = CARD_FROM_CDEV(channel->ccwdev); 1541 card = CARD_FROM_CDEV(channel->ccwdev);
1543 1542
1544 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) { 1543 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
1545 PRINT_ERR("IDX_ACTIVATE on write channel device %s: negative " 1544 if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
1546 "reply\n", CARD_WDEV_ID(card)); 1545 PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
1546 "adapter exclusively used by another host\n",
1547 CARD_WDEV_ID(card));
1548 else
1549 PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
1550 "negative reply\n", CARD_WDEV_ID(card));
1547 goto out; 1551 goto out;
1548 } 1552 }
1549 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2); 1553 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
1550 if ((temp & ~0x0100) != qeth_peer_func_level(card->info.func_level)) { 1554 if ((temp & ~0x0100) != qeth_peer_func_level(card->info.func_level)) {
1551 PRINT_WARN("IDX_ACTIVATE on write channel device %s: " 1555 PRINT_WARN("IDX_ACTIVATE on write channel device %s: "
1552 "function level mismatch " 1556 "function level mismatch "
1553 "(sent: 0x%x, received: 0x%x)\n", 1557 "(sent: 0x%x, received: 0x%x)\n",
1554 CARD_WDEV_ID(card), card->info.func_level, temp); 1558 CARD_WDEV_ID(card), card->info.func_level, temp);
1555 goto out; 1559 goto out;
1556 } 1560 }
1557 channel->state = CH_STATE_UP; 1561 channel->state = CH_STATE_UP;
@@ -1597,8 +1601,13 @@ qeth_idx_read_cb(struct qeth_channel *channel, struct qeth_cmd_buffer *iob)
1597 goto out; 1601 goto out;
1598 } 1602 }
1599 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) { 1603 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
1600 PRINT_ERR("IDX_ACTIVATE on read channel device %s: negative " 1604 if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
1601 "reply\n", CARD_RDEV_ID(card)); 1605 PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
1606 "adapter exclusively used by another host\n",
1607 CARD_RDEV_ID(card));
1608 else
1609 PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
1610 "negative reply\n", CARD_RDEV_ID(card));
1602 goto out; 1611 goto out;
1603 } 1612 }
1604 1613
@@ -1613,8 +1622,8 @@ qeth_idx_read_cb(struct qeth_channel *channel, struct qeth_cmd_buffer *iob)
1613 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2); 1622 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
1614 if (temp != qeth_peer_func_level(card->info.func_level)) { 1623 if (temp != qeth_peer_func_level(card->info.func_level)) {
1615 PRINT_WARN("IDX_ACTIVATE on read channel device %s: function " 1624 PRINT_WARN("IDX_ACTIVATE on read channel device %s: function "
1616 "level mismatch (sent: 0x%x, received: 0x%x)\n", 1625 "level mismatch (sent: 0x%x, received: 0x%x)\n",
1617 CARD_RDEV_ID(card), card->info.func_level, temp); 1626 CARD_RDEV_ID(card), card->info.func_level, temp);
1618 goto out; 1627 goto out;
1619 } 1628 }
1620 memcpy(&card->token.issuer_rm_r, 1629 memcpy(&card->token.issuer_rm_r,
@@ -2496,7 +2505,7 @@ qeth_rebuild_skb_fake_ll_tr(struct qeth_card *card, struct sk_buff *skb,
2496 struct iphdr *ip_hdr; 2505 struct iphdr *ip_hdr;
2497 2506
2498 QETH_DBF_TEXT(trace,5,"skbfktr"); 2507 QETH_DBF_TEXT(trace,5,"skbfktr");
2499 skb_set_mac_header(skb, -QETH_FAKE_LL_LEN_TR); 2508 skb_set_mac_header(skb, (int)-QETH_FAKE_LL_LEN_TR);
2500 /* this is a fake ethernet header */ 2509 /* this is a fake ethernet header */
2501 fake_hdr = tr_hdr(skb); 2510 fake_hdr = tr_hdr(skb);
2502 2511
@@ -2804,13 +2813,16 @@ qeth_queue_input_buffer(struct qeth_card *card, int index)
2804 if (newcount < count) { 2813 if (newcount < count) {
2805 /* we are in memory shortage so we switch back to 2814 /* we are in memory shortage so we switch back to
2806 traditional skb allocation and drop packages */ 2815 traditional skb allocation and drop packages */
2807 if (atomic_cmpxchg(&card->force_alloc_skb, 0, 1)) 2816 if (!atomic_read(&card->force_alloc_skb) &&
2808 printk(KERN_WARNING 2817 net_ratelimit())
2809 "qeth: switch to alloc skb\n"); 2818 PRINT_WARN("Switch to alloc skb\n");
2819 atomic_set(&card->force_alloc_skb, 3);
2810 count = newcount; 2820 count = newcount;
2811 } else { 2821 } else {
2812 if (atomic_cmpxchg(&card->force_alloc_skb, 1, 0)) 2822 if ((atomic_read(&card->force_alloc_skb) == 1) &&
2813 printk(KERN_WARNING "qeth: switch to sg\n"); 2823 net_ratelimit())
2824 PRINT_WARN("Switch to sg\n");
2825 atomic_add_unless(&card->force_alloc_skb, -1, 0);
2814 } 2826 }
2815 2827
2816 /* 2828 /*
@@ -3354,10 +3366,12 @@ out_freeoutq:
3354 while (i > 0) 3366 while (i > 0)
3355 kfree(card->qdio.out_qs[--i]); 3367 kfree(card->qdio.out_qs[--i]);
3356 kfree(card->qdio.out_qs); 3368 kfree(card->qdio.out_qs);
3369 card->qdio.out_qs = NULL;
3357out_freepool: 3370out_freepool:
3358 qeth_free_buffer_pool(card); 3371 qeth_free_buffer_pool(card);
3359out_freeinq: 3372out_freeinq:
3360 kfree(card->qdio.in_q); 3373 kfree(card->qdio.in_q);
3374 card->qdio.in_q = NULL;
3361out_nomem: 3375out_nomem:
3362 atomic_set(&card->qdio.state, QETH_QDIO_UNINITIALIZED); 3376 atomic_set(&card->qdio.state, QETH_QDIO_UNINITIALIZED);
3363 return -ENOMEM; 3377 return -ENOMEM;
@@ -3373,16 +3387,20 @@ qeth_free_qdio_buffers(struct qeth_card *card)
3373 QETH_QDIO_UNINITIALIZED) 3387 QETH_QDIO_UNINITIALIZED)
3374 return; 3388 return;
3375 kfree(card->qdio.in_q); 3389 kfree(card->qdio.in_q);
3390 card->qdio.in_q = NULL;
3376 /* inbound buffer pool */ 3391 /* inbound buffer pool */
3377 qeth_free_buffer_pool(card); 3392 qeth_free_buffer_pool(card);
3378 /* free outbound qdio_qs */ 3393 /* free outbound qdio_qs */
3379 for (i = 0; i < card->qdio.no_out_queues; ++i){ 3394 if (card->qdio.out_qs) {
3380 for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) 3395 for (i = 0; i < card->qdio.no_out_queues; ++i) {
3381 qeth_clear_output_buffer(card->qdio.out_qs[i], 3396 for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j)
3382 &card->qdio.out_qs[i]->bufs[j]); 3397 qeth_clear_output_buffer(card->qdio.out_qs[i],
3383 kfree(card->qdio.out_qs[i]); 3398 &card->qdio.out_qs[i]->bufs[j]);
3399 kfree(card->qdio.out_qs[i]);
3400 }
3401 kfree(card->qdio.out_qs);
3402 card->qdio.out_qs = NULL;
3384 } 3403 }
3385 kfree(card->qdio.out_qs);
3386} 3404}
3387 3405
3388static void 3406static void
@@ -3393,7 +3411,7 @@ qeth_clear_qdio_buffers(struct qeth_card *card)
3393 QETH_DBF_TEXT(trace, 2, "clearqdbf"); 3411 QETH_DBF_TEXT(trace, 2, "clearqdbf");
3394 /* clear outbound buffers to free skbs */ 3412 /* clear outbound buffers to free skbs */
3395 for (i = 0; i < card->qdio.no_out_queues; ++i) 3413 for (i = 0; i < card->qdio.no_out_queues; ++i)
3396 if (card->qdio.out_qs[i]){ 3414 if (card->qdio.out_qs && card->qdio.out_qs[i]) {
3397 for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) 3415 for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j)
3398 qeth_clear_output_buffer(card->qdio.out_qs[i], 3416 qeth_clear_output_buffer(card->qdio.out_qs[i],
3399 &card->qdio.out_qs[i]->bufs[j]); 3417 &card->qdio.out_qs[i]->bufs[j]);
@@ -4553,6 +4571,53 @@ qeth_get_elements_no(struct qeth_card *card, void *hdr,
4553 return elements_needed; 4571 return elements_needed;
4554} 4572}
4555 4573
4574static void qeth_tx_csum(struct sk_buff *skb)
4575{
4576 int tlen;
4577
4578 if (skb->protocol == htons(ETH_P_IP)) {
4579 tlen = ntohs(ip_hdr(skb)->tot_len) - (ip_hdr(skb)->ihl << 2);
4580 switch (ip_hdr(skb)->protocol) {
4581 case IPPROTO_TCP:
4582 tcp_hdr(skb)->check = 0;
4583 tcp_hdr(skb)->check = csum_tcpudp_magic(
4584 ip_hdr(skb)->saddr, ip_hdr(skb)->daddr,
4585 tlen, ip_hdr(skb)->protocol,
4586 skb_checksum(skb, skb_transport_offset(skb),
4587 tlen, 0));
4588 break;
4589 case IPPROTO_UDP:
4590 udp_hdr(skb)->check = 0;
4591 udp_hdr(skb)->check = csum_tcpudp_magic(
4592 ip_hdr(skb)->saddr, ip_hdr(skb)->daddr,
4593 tlen, ip_hdr(skb)->protocol,
4594 skb_checksum(skb, skb_transport_offset(skb),
4595 tlen, 0));
4596 break;
4597 }
4598 } else if (skb->protocol == htons(ETH_P_IPV6)) {
4599 switch (ipv6_hdr(skb)->nexthdr) {
4600 case IPPROTO_TCP:
4601 tcp_hdr(skb)->check = 0;
4602 tcp_hdr(skb)->check = csum_ipv6_magic(
4603 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
4604 ipv6_hdr(skb)->payload_len,
4605 ipv6_hdr(skb)->nexthdr,
4606 skb_checksum(skb, skb_transport_offset(skb),
4607 ipv6_hdr(skb)->payload_len, 0));
4608 break;
4609 case IPPROTO_UDP:
4610 udp_hdr(skb)->check = 0;
4611 udp_hdr(skb)->check = csum_ipv6_magic(
4612 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
4613 ipv6_hdr(skb)->payload_len,
4614 ipv6_hdr(skb)->nexthdr,
4615 skb_checksum(skb, skb_transport_offset(skb),
4616 ipv6_hdr(skb)->payload_len, 0));
4617 break;
4618 }
4619 }
4620}
4556 4621
4557static int 4622static int
4558qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) 4623qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
@@ -4638,12 +4703,22 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
4638 elements_needed += elems; 4703 elements_needed += elems;
4639 } 4704 }
4640 4705
4706 if ((large_send == QETH_LARGE_SEND_NO) &&
4707 (skb->ip_summed == CHECKSUM_PARTIAL))
4708 qeth_tx_csum(new_skb);
4709
4641 if (card->info.type != QETH_CARD_TYPE_IQD) 4710 if (card->info.type != QETH_CARD_TYPE_IQD)
4642 rc = qeth_do_send_packet(card, queue, new_skb, hdr, 4711 rc = qeth_do_send_packet(card, queue, new_skb, hdr,
4643 elements_needed, ctx); 4712 elements_needed, ctx);
4644 else 4713 else {
4714 if ((skb->protocol == htons(ETH_P_ARP)) &&
4715 (card->dev->flags & IFF_NOARP)) {
4716 __qeth_free_new_skb(skb, new_skb);
4717 return -EPERM;
4718 }
4645 rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr, 4719 rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr,
4646 elements_needed, ctx); 4720 elements_needed, ctx);
4721 }
4647 if (!rc) { 4722 if (!rc) {
4648 card->stats.tx_packets++; 4723 card->stats.tx_packets++;
4649 card->stats.tx_bytes += tx_bytes; 4724 card->stats.tx_bytes += tx_bytes;
@@ -6385,20 +6460,18 @@ qeth_deregister_addr_entry(struct qeth_card *card, struct qeth_ipaddr *addr)
6385static u32 6460static u32
6386qeth_ethtool_get_tx_csum(struct net_device *dev) 6461qeth_ethtool_get_tx_csum(struct net_device *dev)
6387{ 6462{
6388 /* We may need to say that we support tx csum offload if 6463 return (dev->features & NETIF_F_HW_CSUM) != 0;
6389 * we do EDDP or TSO. There are discussions going on to
6390 * enforce rules in the stack and in ethtool that make
6391 * SG and TSO depend on HW_CSUM. At the moment there are
6392 * no such rules....
6393 * If we say yes here, we have to checksum outbound packets
6394 * any time. */
6395 return 0;
6396} 6464}
6397 6465
6398static int 6466static int
6399qeth_ethtool_set_tx_csum(struct net_device *dev, u32 data) 6467qeth_ethtool_set_tx_csum(struct net_device *dev, u32 data)
6400{ 6468{
6401 return -EINVAL; 6469 if (data)
6470 dev->features |= NETIF_F_HW_CSUM;
6471 else
6472 dev->features &= ~NETIF_F_HW_CSUM;
6473
6474 return 0;
6402} 6475}
6403 6476
6404static u32 6477static u32
@@ -7412,7 +7485,8 @@ qeth_start_ipa_tso(struct qeth_card *card)
7412 } 7485 }
7413 if (rc && (card->options.large_send == QETH_LARGE_SEND_TSO)){ 7486 if (rc && (card->options.large_send == QETH_LARGE_SEND_TSO)){
7414 card->options.large_send = QETH_LARGE_SEND_NO; 7487 card->options.large_send = QETH_LARGE_SEND_NO;
7415 card->dev->features &= ~ (NETIF_F_TSO | NETIF_F_SG); 7488 card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG |
7489 NETIF_F_HW_CSUM);
7416 } 7490 }
7417 return rc; 7491 return rc;
7418} 7492}
@@ -7552,22 +7626,26 @@ qeth_set_large_send(struct qeth_card *card, enum qeth_large_send_types type)
7552 card->options.large_send = type; 7626 card->options.large_send = type;
7553 switch (card->options.large_send) { 7627 switch (card->options.large_send) {
7554 case QETH_LARGE_SEND_EDDP: 7628 case QETH_LARGE_SEND_EDDP:
7555 card->dev->features |= NETIF_F_TSO | NETIF_F_SG; 7629 card->dev->features |= NETIF_F_TSO | NETIF_F_SG |
7630 NETIF_F_HW_CSUM;
7556 break; 7631 break;
7557 case QETH_LARGE_SEND_TSO: 7632 case QETH_LARGE_SEND_TSO:
7558 if (qeth_is_supported(card, IPA_OUTBOUND_TSO)){ 7633 if (qeth_is_supported(card, IPA_OUTBOUND_TSO)){
7559 card->dev->features |= NETIF_F_TSO | NETIF_F_SG; 7634 card->dev->features |= NETIF_F_TSO | NETIF_F_SG |
7635 NETIF_F_HW_CSUM;
7560 } else { 7636 } else {
7561 PRINT_WARN("TSO not supported on %s. " 7637 PRINT_WARN("TSO not supported on %s. "
7562 "large_send set to 'no'.\n", 7638 "large_send set to 'no'.\n",
7563 card->dev->name); 7639 card->dev->name);
7564 card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); 7640 card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG |
7641 NETIF_F_HW_CSUM);
7565 card->options.large_send = QETH_LARGE_SEND_NO; 7642 card->options.large_send = QETH_LARGE_SEND_NO;
7566 rc = -EOPNOTSUPP; 7643 rc = -EOPNOTSUPP;
7567 } 7644 }
7568 break; 7645 break;
7569 default: /* includes QETH_LARGE_SEND_NO */ 7646 default: /* includes QETH_LARGE_SEND_NO */
7570 card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); 7647 card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG |
7648 NETIF_F_HW_CSUM);
7571 break; 7649 break;
7572 } 7650 }
7573 if (card->state == CARD_STATE_UP) 7651 if (card->state == CARD_STATE_UP)
diff --git a/drivers/s390/net/qeth_mpc.h b/drivers/s390/net/qeth_mpc.h
index 1d8083c917..6de2da5ed5 100644
--- a/drivers/s390/net/qeth_mpc.h
+++ b/drivers/s390/net/qeth_mpc.h
@@ -565,6 +565,7 @@ extern unsigned char IDX_ACTIVATE_WRITE[];
565#define QETH_IDX_ACT_QDIO_DEV_REALADDR(buffer) (buffer+0x20) 565#define QETH_IDX_ACT_QDIO_DEV_REALADDR(buffer) (buffer+0x20)
566#define QETH_IS_IDX_ACT_POS_REPLY(buffer) (((buffer)[0x08]&3)==2) 566#define QETH_IS_IDX_ACT_POS_REPLY(buffer) (((buffer)[0x08]&3)==2)
567#define QETH_IDX_REPLY_LEVEL(buffer) (buffer+0x12) 567#define QETH_IDX_REPLY_LEVEL(buffer) (buffer+0x12)
568#define QETH_IDX_ACT_CAUSE_CODE(buffer) (buffer)[0x09]
568 569
569#define PDU_ENCAPSULATION(buffer) \ 570#define PDU_ENCAPSULATION(buffer) \
570 (buffer + *(buffer + (*(buffer+0x0b)) + \ 571 (buffer + *(buffer + (*(buffer+0x0b)) + \
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c
index bb0287ad1a..2cc3f3a0e3 100644
--- a/drivers/s390/net/qeth_sys.c
+++ b/drivers/s390/net/qeth_sys.c
@@ -1760,10 +1760,10 @@ qeth_remove_device_attributes(struct device *dev)
1760{ 1760{
1761 struct qeth_card *card = dev->driver_data; 1761 struct qeth_card *card = dev->driver_data;
1762 1762
1763 if (card->info.type == QETH_CARD_TYPE_OSN) 1763 if (card->info.type == QETH_CARD_TYPE_OSN) {
1764 return sysfs_remove_group(&dev->kobj, 1764 sysfs_remove_group(&dev->kobj, &qeth_osn_device_attr_group);
1765 &qeth_osn_device_attr_group); 1765 return;
1766 1766 }
1767 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group); 1767 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group);
1768 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); 1768 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group);
1769 sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); 1769 sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group);
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index ab5ec1feaf..90aa53fc4f 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -1503,7 +1503,7 @@ zfcp_gid_pn_buffers_alloc(struct zfcp_gid_pn_data **gid_pn, mempool_t *pool)
1503 data->ct.pool = pool; 1503 data->ct.pool = pool;
1504 } 1504 }
1505 } else { 1505 } else {
1506 data = kmalloc(sizeof(struct zfcp_gid_pn_data), GFP_ATOMIC); 1506 data = kmem_cache_alloc(zfcp_data.gid_pn_cache, GFP_ATOMIC);
1507 } 1507 }
1508 1508
1509 if (NULL == data) 1509 if (NULL == data)
@@ -1531,7 +1531,7 @@ static void zfcp_gid_pn_buffers_free(struct zfcp_gid_pn_data *gid_pn)
1531 if (gid_pn->ct.pool) 1531 if (gid_pn->ct.pool)
1532 mempool_free(gid_pn, gid_pn->ct.pool); 1532 mempool_free(gid_pn, gid_pn->ct.pool);
1533 else 1533 else
1534 kfree(gid_pn); 1534 kmem_cache_free(zfcp_data.gid_pn_cache, gid_pn);
1535} 1535}
1536 1536
1537/** 1537/**
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c
index 81daa8204b..c6899efdc8 100644
--- a/drivers/s390/scsi/zfcp_qdio.c
+++ b/drivers/s390/scsi/zfcp_qdio.c
@@ -640,13 +640,9 @@ int
640zfcp_qdio_sbals_from_scsicmnd(struct zfcp_fsf_req *fsf_req, 640zfcp_qdio_sbals_from_scsicmnd(struct zfcp_fsf_req *fsf_req,
641 unsigned long sbtype, struct scsi_cmnd *scsi_cmnd) 641 unsigned long sbtype, struct scsi_cmnd *scsi_cmnd)
642{ 642{
643 if (scsi_sg_count(scsi_cmnd)) 643 return zfcp_qdio_sbals_from_sg(fsf_req, sbtype, scsi_sglist(scsi_cmnd),
644 return zfcp_qdio_sbals_from_sg(fsf_req, sbtype, 644 scsi_sg_count(scsi_cmnd),
645 scsi_sglist(scsi_cmnd), 645 ZFCP_MAX_SBALS_PER_REQ);
646 scsi_sg_count(scsi_cmnd),
647 ZFCP_MAX_SBALS_PER_REQ);
648 else
649 return 0;
650} 646}
651 647
652/** 648/**
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 0acf6db0a0..ad7eb4a926 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -764,7 +764,9 @@ zfcp_reset_fc_host_stats(struct Scsi_Host *shost)
764 return; 764 return;
765 765
766 ret = zfcp_fsf_exchange_port_data(NULL, adapter, data); 766 ret = zfcp_fsf_exchange_port_data(NULL, adapter, data);
767 if (ret == 0) { 767 if (ret) {
768 kfree(data);
769 } else {
768 adapter->stats_reset = jiffies/HZ; 770 adapter->stats_reset = jiffies/HZ;
769 old_data = adapter->stats_reset_data; 771 old_data = adapter->stats_reset_data;
770 adapter->stats_reset_data = data; /* finally freed in 772 adapter->stats_reset_data = data; /* finally freed in
diff --git a/drivers/scsi/aic94xx/aic94xx_task.c b/drivers/scsi/aic94xx/aic94xx_task.c
index d5d8caba35..ab13824df8 100644
--- a/drivers/scsi/aic94xx/aic94xx_task.c
+++ b/drivers/scsi/aic94xx/aic94xx_task.c
@@ -451,7 +451,7 @@ static int asd_build_smp_ascb(struct asd_ascb *ascb, struct sas_task *task,
451 struct scb *scb; 451 struct scb *scb;
452 452
453 pci_map_sg(asd_ha->pcidev, &task->smp_task.smp_req, 1, 453 pci_map_sg(asd_ha->pcidev, &task->smp_task.smp_req, 1,
454 PCI_DMA_FROMDEVICE); 454 PCI_DMA_TODEVICE);
455 pci_map_sg(asd_ha->pcidev, &task->smp_task.smp_resp, 1, 455 pci_map_sg(asd_ha->pcidev, &task->smp_task.smp_resp, 1,
456 PCI_DMA_FROMDEVICE); 456 PCI_DMA_FROMDEVICE);
457 457
@@ -486,7 +486,7 @@ static void asd_unbuild_smp_ascb(struct asd_ascb *a)
486 486
487 BUG_ON(!task); 487 BUG_ON(!task);
488 pci_unmap_sg(a->ha->pcidev, &task->smp_task.smp_req, 1, 488 pci_unmap_sg(a->ha->pcidev, &task->smp_task.smp_req, 1,
489 PCI_DMA_FROMDEVICE); 489 PCI_DMA_TODEVICE);
490 pci_unmap_sg(a->ha->pcidev, &task->smp_task.smp_resp, 1, 490 pci_unmap_sg(a->ha->pcidev, &task->smp_task.smp_resp, 1,
491 PCI_DMA_FROMDEVICE); 491 PCI_DMA_FROMDEVICE);
492} 492}
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index 77b06a983f..95cf7b6cd6 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -2314,6 +2314,7 @@ int __devinit scsi_esp_register(struct esp *esp, struct device *dev)
2314 esp->host->transportt = esp_transport_template; 2314 esp->host->transportt = esp_transport_template;
2315 esp->host->max_lun = ESP_MAX_LUN; 2315 esp->host->max_lun = ESP_MAX_LUN;
2316 esp->host->cmd_per_lun = 2; 2316 esp->host->cmd_per_lun = 2;
2317 esp->host->unique_id = instance;
2317 2318
2318 esp_set_clock_params(esp); 2319 esp_set_clock_params(esp);
2319 2320
@@ -2337,7 +2338,7 @@ int __devinit scsi_esp_register(struct esp *esp, struct device *dev)
2337 if (err) 2338 if (err)
2338 return err; 2339 return err;
2339 2340
2340 esp->host->unique_id = instance++; 2341 instance++;
2341 2342
2342 scsi_scan_host(esp->host); 2343 scsi_scan_host(esp->host);
2343 2344
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 5606d1e629..efceed451b 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -737,12 +737,19 @@ check_mgmt:
737 */ 737 */
738 conn->ctask = list_entry(conn->xmitqueue.next, 738 conn->ctask = list_entry(conn->xmitqueue.next,
739 struct iscsi_cmd_task, running); 739 struct iscsi_cmd_task, running);
740 if (conn->ctask->state == ISCSI_TASK_PENDING) { 740 switch (conn->ctask->state) {
741 case ISCSI_TASK_ABORTING:
742 break;
743 case ISCSI_TASK_PENDING:
741 iscsi_prep_scsi_cmd_pdu(conn->ctask); 744 iscsi_prep_scsi_cmd_pdu(conn->ctask);
742 conn->session->tt->init_cmd_task(conn->ctask); 745 conn->session->tt->init_cmd_task(conn->ctask);
746 /* fall through */
747 default:
748 conn->ctask->state = ISCSI_TASK_RUNNING;
749 break;
743 } 750 }
744 conn->ctask->state = ISCSI_TASK_RUNNING;
745 list_move_tail(conn->xmitqueue.next, &conn->run_list); 751 list_move_tail(conn->xmitqueue.next, &conn->run_list);
752
746 rc = iscsi_xmit_ctask(conn); 753 rc = iscsi_xmit_ctask(conn);
747 if (rc) 754 if (rc)
748 goto again; 755 goto again;
@@ -1049,7 +1056,9 @@ static int iscsi_exec_abort_task(struct scsi_cmnd *sc,
1049 ctask->mtask = __iscsi_conn_send_pdu(conn, (struct iscsi_hdr *)hdr, 1056 ctask->mtask = __iscsi_conn_send_pdu(conn, (struct iscsi_hdr *)hdr,
1050 NULL, 0); 1057 NULL, 0);
1051 if (!ctask->mtask) { 1058 if (!ctask->mtask) {
1059 spin_unlock_bh(&session->lock);
1052 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); 1060 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
1061 spin_lock_bh(&session->lock)
1053 debug_scsi("abort sent failure [itt 0x%x]\n", ctask->itt); 1062 debug_scsi("abort sent failure [itt 0x%x]\n", ctask->itt);
1054 return -EPERM; 1063 return -EPERM;
1055 } 1064 }
@@ -1066,6 +1075,7 @@ static int iscsi_exec_abort_task(struct scsi_cmnd *sc,
1066 debug_scsi("abort set timeout [itt 0x%x]\n", ctask->itt); 1075 debug_scsi("abort set timeout [itt 0x%x]\n", ctask->itt);
1067 } 1076 }
1068 spin_unlock_bh(&session->lock); 1077 spin_unlock_bh(&session->lock);
1078 mutex_unlock(&session->eh_mutex);
1069 scsi_queue_work(session->host, &conn->xmitwork); 1079 scsi_queue_work(session->host, &conn->xmitwork);
1070 1080
1071 /* 1081 /*
@@ -1083,6 +1093,7 @@ static int iscsi_exec_abort_task(struct scsi_cmnd *sc,
1083 if (signal_pending(current)) 1093 if (signal_pending(current))
1084 flush_signals(current); 1094 flush_signals(current);
1085 del_timer_sync(&conn->tmabort_timer); 1095 del_timer_sync(&conn->tmabort_timer);
1096 mutex_lock(&session->eh_mutex);
1086 spin_lock_bh(&session->lock); 1097 spin_lock_bh(&session->lock);
1087 return 0; 1098 return 0;
1088} 1099}
@@ -1158,31 +1169,45 @@ static void fail_command(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask,
1158 __iscsi_put_ctask(ctask); 1169 __iscsi_put_ctask(ctask);
1159} 1170}
1160 1171
1172static void iscsi_suspend_tx(struct iscsi_conn *conn)
1173{
1174 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
1175 scsi_flush_work(conn->session->host);
1176}
1177
1178static void iscsi_start_tx(struct iscsi_conn *conn)
1179{
1180 clear_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
1181 scsi_queue_work(conn->session->host, &conn->xmitwork);
1182}
1183
1161int iscsi_eh_abort(struct scsi_cmnd *sc) 1184int iscsi_eh_abort(struct scsi_cmnd *sc)
1162{ 1185{
1186 struct Scsi_Host *host = sc->device->host;
1187 struct iscsi_session *session = iscsi_hostdata(host->hostdata);
1163 struct iscsi_cmd_task *ctask; 1188 struct iscsi_cmd_task *ctask;
1164 struct iscsi_conn *conn; 1189 struct iscsi_conn *conn;
1165 struct iscsi_session *session;
1166 int rc; 1190 int rc;
1167 1191
1192 mutex_lock(&session->eh_mutex);
1193 spin_lock_bh(&session->lock);
1168 /* 1194 /*
1169 * if session was ISCSI_STATE_IN_RECOVERY then we may not have 1195 * if session was ISCSI_STATE_IN_RECOVERY then we may not have
1170 * got the command. 1196 * got the command.
1171 */ 1197 */
1172 if (!sc->SCp.ptr) { 1198 if (!sc->SCp.ptr) {
1173 debug_scsi("sc never reached iscsi layer or it completed.\n"); 1199 debug_scsi("sc never reached iscsi layer or it completed.\n");
1200 spin_unlock_bh(&session->lock);
1201 mutex_unlock(&session->eh_mutex);
1174 return SUCCESS; 1202 return SUCCESS;
1175 } 1203 }
1176 1204
1177 ctask = (struct iscsi_cmd_task *)sc->SCp.ptr; 1205 ctask = (struct iscsi_cmd_task *)sc->SCp.ptr;
1178 conn = ctask->conn; 1206 conn = ctask->conn;
1179 session = conn->session;
1180 1207
1181 conn->eh_abort_cnt++; 1208 conn->eh_abort_cnt++;
1182 debug_scsi("aborting [sc %p itt 0x%x]\n", sc, ctask->itt); 1209 debug_scsi("aborting [sc %p itt 0x%x]\n", sc, ctask->itt);
1183 1210
1184 spin_lock_bh(&session->lock);
1185
1186 /* 1211 /*
1187 * If we are not logged in or we have started a new session 1212 * If we are not logged in or we have started a new session
1188 * then let the host reset code handle this 1213 * then let the host reset code handle this
@@ -1219,6 +1244,7 @@ int iscsi_eh_abort(struct scsi_cmnd *sc)
1219 switch (conn->tmabort_state) { 1244 switch (conn->tmabort_state) {
1220 case TMABORT_SUCCESS: 1245 case TMABORT_SUCCESS:
1221 spin_unlock_bh(&session->lock); 1246 spin_unlock_bh(&session->lock);
1247 iscsi_suspend_tx(conn);
1222 /* 1248 /*
1223 * clean up task if aborted. grab the recv lock as a writer 1249 * clean up task if aborted. grab the recv lock as a writer
1224 */ 1250 */
@@ -1227,11 +1253,7 @@ int iscsi_eh_abort(struct scsi_cmnd *sc)
1227 fail_command(conn, ctask, DID_ABORT << 16); 1253 fail_command(conn, ctask, DID_ABORT << 16);
1228 spin_unlock(&session->lock); 1254 spin_unlock(&session->lock);
1229 write_unlock_bh(conn->recv_lock); 1255 write_unlock_bh(conn->recv_lock);
1230 /* 1256 iscsi_start_tx(conn);
1231 * make sure xmit thread is not still touching the
1232 * ctask/scsi_cmnd
1233 */
1234 scsi_flush_work(session->host);
1235 goto success_unlocked; 1257 goto success_unlocked;
1236 case TMABORT_NOT_FOUND: 1258 case TMABORT_NOT_FOUND:
1237 if (!ctask->sc) { 1259 if (!ctask->sc) {
@@ -1251,12 +1273,14 @@ success:
1251 spin_unlock_bh(&session->lock); 1273 spin_unlock_bh(&session->lock);
1252success_unlocked: 1274success_unlocked:
1253 debug_scsi("abort success [sc %lx itt 0x%x]\n", (long)sc, ctask->itt); 1275 debug_scsi("abort success [sc %lx itt 0x%x]\n", (long)sc, ctask->itt);
1276 mutex_unlock(&session->eh_mutex);
1254 return SUCCESS; 1277 return SUCCESS;
1255 1278
1256failed: 1279failed:
1257 spin_unlock_bh(&session->lock); 1280 spin_unlock_bh(&session->lock);
1258failed_unlocked: 1281failed_unlocked:
1259 debug_scsi("abort failed [sc %lx itt 0x%x]\n", (long)sc, ctask->itt); 1282 debug_scsi("abort failed [sc %lx itt 0x%x]\n", (long)sc, ctask->itt);
1283 mutex_unlock(&session->eh_mutex);
1260 return FAILED; 1284 return FAILED;
1261} 1285}
1262EXPORT_SYMBOL_GPL(iscsi_eh_abort); 1286EXPORT_SYMBOL_GPL(iscsi_eh_abort);
@@ -1403,6 +1427,7 @@ iscsi_session_setup(struct iscsi_transport *iscsit,
1403 session->max_cmdsn = initial_cmdsn + 1; 1427 session->max_cmdsn = initial_cmdsn + 1;
1404 session->max_r2t = 1; 1428 session->max_r2t = 1;
1405 session->tt = iscsit; 1429 session->tt = iscsit;
1430 mutex_init(&session->eh_mutex);
1406 1431
1407 /* initialize SCSI PDU commands pool */ 1432 /* initialize SCSI PDU commands pool */
1408 if (iscsi_pool_init(&session->cmdpool, session->cmds_max, 1433 if (iscsi_pool_init(&session->cmdpool, session->cmds_max,
@@ -1736,9 +1761,22 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
1736{ 1761{
1737 int old_stop_stage; 1762 int old_stop_stage;
1738 1763
1764 mutex_lock(&session->eh_mutex);
1739 spin_lock_bh(&session->lock); 1765 spin_lock_bh(&session->lock);
1740 if (conn->stop_stage == STOP_CONN_TERM) { 1766 if (conn->stop_stage == STOP_CONN_TERM) {
1741 spin_unlock_bh(&session->lock); 1767 spin_unlock_bh(&session->lock);
1768 mutex_unlock(&session->eh_mutex);
1769 return;
1770 }
1771
1772 /*
1773 * The LLD either freed/unset the lock on us, or userspace called
1774 * stop but did not create a proper connection (connection was never
1775 * bound or it was unbound then stop was called).
1776 */
1777 if (!conn->recv_lock) {
1778 spin_unlock_bh(&session->lock);
1779 mutex_unlock(&session->eh_mutex);
1742 return; 1780 return;
1743 } 1781 }
1744 1782
@@ -1755,9 +1793,9 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
1755 old_stop_stage = conn->stop_stage; 1793 old_stop_stage = conn->stop_stage;
1756 conn->stop_stage = flag; 1794 conn->stop_stage = flag;
1757 conn->c_stage = ISCSI_CONN_STOPPED; 1795 conn->c_stage = ISCSI_CONN_STOPPED;
1758 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
1759 spin_unlock_bh(&session->lock); 1796 spin_unlock_bh(&session->lock);
1760 scsi_flush_work(session->host); 1797
1798 iscsi_suspend_tx(conn);
1761 1799
1762 write_lock_bh(conn->recv_lock); 1800 write_lock_bh(conn->recv_lock);
1763 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx); 1801 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
@@ -1786,6 +1824,7 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
1786 fail_all_commands(conn); 1824 fail_all_commands(conn);
1787 flush_control_queues(session, conn); 1825 flush_control_queues(session, conn);
1788 spin_unlock_bh(&session->lock); 1826 spin_unlock_bh(&session->lock);
1827 mutex_unlock(&session->eh_mutex);
1789} 1828}
1790 1829
1791void iscsi_conn_stop(struct iscsi_cls_conn *cls_conn, int flag) 1830void iscsi_conn_stop(struct iscsi_cls_conn *cls_conn, int flag)
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 3907f6718e..da56163c30 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -1753,6 +1753,14 @@ mega_build_sglist(adapter_t *adapter, scb_t *scb, u32 *buf, u32 *len)
1753 1753
1754 *len = 0; 1754 *len = 0;
1755 1755
1756 if (scsi_sg_count(cmd) == 1 && !adapter->has_64bit_addr) {
1757 sg = scsi_sglist(cmd);
1758 scb->dma_h_bulkdata = sg_dma_address(sg);
1759 *buf = (u32)scb->dma_h_bulkdata;
1760 *len = sg_dma_len(sg);
1761 return 0;
1762 }
1763
1756 scsi_for_each_sg(cmd, sg, sgcnt, idx) { 1764 scsi_for_each_sg(cmd, sg, sgcnt, idx) {
1757 if (adapter->has_64bit_addr) { 1765 if (adapter->has_64bit_addr) {
1758 scb->sgl64[idx].address = sg_dma_address(sg); 1766 scb->sgl64[idx].address = sg_dma_address(sg);
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 563d18f4ff..c6680348b6 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -2050,21 +2050,18 @@ qla25xx_fw_dump_failed:
2050void 2050void
2051qla2x00_dump_regs(scsi_qla_host_t *ha) 2051qla2x00_dump_regs(scsi_qla_host_t *ha)
2052{ 2052{
2053 int i;
2053 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; 2054 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
2055 struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24;
2056 uint16_t __iomem *mbx_reg;
2057
2058 mbx_reg = IS_FWI2_CAPABLE(ha) ? &reg24->mailbox0:
2059 MAILBOX_REG(ha, reg, 0);
2054 2060
2055 printk("Mailbox registers:\n"); 2061 printk("Mailbox registers:\n");
2056 printk("scsi(%ld): mbox 0 0x%04x \n", 2062 for (i = 0; i < 6; i++)
2057 ha->host_no, RD_MAILBOX_REG(ha, reg, 0)); 2063 printk("scsi(%ld): mbox %d 0x%04x \n", ha->host_no, i,
2058 printk("scsi(%ld): mbox 1 0x%04x \n", 2064 RD_REG_WORD(mbx_reg++));
2059 ha->host_no, RD_MAILBOX_REG(ha, reg, 1));
2060 printk("scsi(%ld): mbox 2 0x%04x \n",
2061 ha->host_no, RD_MAILBOX_REG(ha, reg, 2));
2062 printk("scsi(%ld): mbox 3 0x%04x \n",
2063 ha->host_no, RD_MAILBOX_REG(ha, reg, 3));
2064 printk("scsi(%ld): mbox 4 0x%04x \n",
2065 ha->host_no, RD_MAILBOX_REG(ha, reg, 4));
2066 printk("scsi(%ld): mbox 5 0x%04x \n",
2067 ha->host_no, RD_MAILBOX_REG(ha, reg, 5));
2068} 2065}
2069 2066
2070 2067
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 27ae3a532a..c1964866a4 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -1502,7 +1502,6 @@ typedef struct {
1502 uint8_t node_name[WWN_SIZE]; 1502 uint8_t node_name[WWN_SIZE];
1503 uint8_t port_name[WWN_SIZE]; 1503 uint8_t port_name[WWN_SIZE];
1504 uint8_t fabric_port_name[WWN_SIZE]; 1504 uint8_t fabric_port_name[WWN_SIZE];
1505 uint16_t fp_speeds;
1506 uint16_t fp_speed; 1505 uint16_t fp_speed;
1507} sw_info_t; 1506} sw_info_t;
1508 1507
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index b06cbb8580..a7e23583f8 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -295,6 +295,8 @@ qla2x00_gid_pt(scsi_qla_host_t *ha, sw_info_t *list)
295 list[i].d_id.b.domain = gid_data->port_id[0]; 295 list[i].d_id.b.domain = gid_data->port_id[0];
296 list[i].d_id.b.area = gid_data->port_id[1]; 296 list[i].d_id.b.area = gid_data->port_id[1];
297 list[i].d_id.b.al_pa = gid_data->port_id[2]; 297 list[i].d_id.b.al_pa = gid_data->port_id[2];
298 memset(list[i].fabric_port_name, 0, WWN_SIZE);
299 list[i].fp_speed = PORT_SPEED_UNKNOWN;
298 300
299 /* Last one exit. */ 301 /* Last one exit. */
300 if (gid_data->control_byte & BIT_7) { 302 if (gid_data->control_byte & BIT_7) {
@@ -1707,8 +1709,6 @@ qla2x00_gfpn_id(scsi_qla_host_t *ha, sw_info_t *list)
1707 1709
1708 for (i = 0; i < MAX_FIBRE_DEVICES; i++) { 1710 for (i = 0; i < MAX_FIBRE_DEVICES; i++) {
1709 /* Issue GFPN_ID */ 1711 /* Issue GFPN_ID */
1710 memset(list[i].fabric_port_name, 0, WWN_SIZE);
1711
1712 /* Prepare common MS IOCB */ 1712 /* Prepare common MS IOCB */
1713 ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GFPN_ID_REQ_SIZE, 1713 ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GFPN_ID_REQ_SIZE,
1714 GFPN_ID_RSP_SIZE); 1714 GFPN_ID_RSP_SIZE);
@@ -1821,8 +1821,6 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
1821 1821
1822 for (i = 0; i < MAX_FIBRE_DEVICES; i++) { 1822 for (i = 0; i < MAX_FIBRE_DEVICES; i++) {
1823 /* Issue GFPN_ID */ 1823 /* Issue GFPN_ID */
1824 list[i].fp_speeds = list[i].fp_speed = 0;
1825
1826 /* Prepare common MS IOCB */ 1824 /* Prepare common MS IOCB */
1827 ms_pkt = qla24xx_prep_ms_fm_iocb(ha, GPSC_REQ_SIZE, 1825 ms_pkt = qla24xx_prep_ms_fm_iocb(ha, GPSC_REQ_SIZE,
1828 GPSC_RSP_SIZE); 1826 GPSC_RSP_SIZE);
@@ -1858,9 +1856,21 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
1858 } 1856 }
1859 rval = QLA_FUNCTION_FAILED; 1857 rval = QLA_FUNCTION_FAILED;
1860 } else { 1858 } else {
1861 /* Save portname */ 1859 /* Save port-speed */
1862 list[i].fp_speeds = ct_rsp->rsp.gpsc.speeds; 1860 switch (be16_to_cpu(ct_rsp->rsp.gpsc.speed)) {
1863 list[i].fp_speed = ct_rsp->rsp.gpsc.speed; 1861 case BIT_15:
1862 list[i].fp_speed = PORT_SPEED_1GB;
1863 break;
1864 case BIT_14:
1865 list[i].fp_speed = PORT_SPEED_2GB;
1866 break;
1867 case BIT_13:
1868 list[i].fp_speed = PORT_SPEED_4GB;
1869 break;
1870 case BIT_11:
1871 list[i].fp_speed = PORT_SPEED_8GB;
1872 break;
1873 }
1864 1874
1865 DEBUG2_3(printk("scsi(%ld): GPSC ext entry - " 1875 DEBUG2_3(printk("scsi(%ld): GPSC ext entry - "
1866 "fpn %02x%02x%02x%02x%02x%02x%02x%02x speeds=%04x " 1876 "fpn %02x%02x%02x%02x%02x%02x%02x%02x speeds=%04x "
@@ -1873,8 +1883,8 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
1873 list[i].fabric_port_name[5], 1883 list[i].fabric_port_name[5],
1874 list[i].fabric_port_name[6], 1884 list[i].fabric_port_name[6],
1875 list[i].fabric_port_name[7], 1885 list[i].fabric_port_name[7],
1876 be16_to_cpu(list[i].fp_speeds), 1886 be16_to_cpu(ct_rsp->rsp.gpsc.speeds),
1877 be16_to_cpu(list[i].fp_speed))); 1887 be16_to_cpu(ct_rsp->rsp.gpsc.speed)));
1878 } 1888 }
1879 1889
1880 /* Last device exit. */ 1890 /* Last device exit. */
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 374abe19b5..1a058ec9bd 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2079,17 +2079,7 @@ qla2x00_configure_local_loop(scsi_qla_host_t *ha)
2079 } 2079 }
2080 2080
2081 /* Base iIDMA settings on HBA port speed. */ 2081 /* Base iIDMA settings on HBA port speed. */
2082 switch (ha->link_data_rate) { 2082 fcport->fp_speed = ha->link_data_rate;
2083 case PORT_SPEED_1GB:
2084 fcport->fp_speed = cpu_to_be16(BIT_15);
2085 break;
2086 case PORT_SPEED_2GB:
2087 fcport->fp_speed = cpu_to_be16(BIT_14);
2088 break;
2089 case PORT_SPEED_4GB:
2090 fcport->fp_speed = cpu_to_be16(BIT_13);
2091 break;
2092 }
2093 2083
2094 qla2x00_update_fcport(ha, fcport); 2084 qla2x00_update_fcport(ha, fcport);
2095 2085
@@ -2130,38 +2120,25 @@ static void
2130qla2x00_iidma_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) 2120qla2x00_iidma_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
2131{ 2121{
2132#define LS_UNKNOWN 2 2122#define LS_UNKNOWN 2
2133 static char *link_speeds[5] = { "1", "2", "?", "4" }; 2123 static char *link_speeds[5] = { "1", "2", "?", "4", "8" };
2134 int rval; 2124 int rval;
2135 uint16_t port_speed, mb[6]; 2125 uint16_t mb[6];
2136 2126
2137 if (!IS_IIDMA_CAPABLE(ha)) 2127 if (!IS_IIDMA_CAPABLE(ha))
2138 return; 2128 return;
2139 2129
2140 switch (be16_to_cpu(fcport->fp_speed)) { 2130 if (fcport->fp_speed == PORT_SPEED_UNKNOWN) {
2141 case BIT_15:
2142 port_speed = PORT_SPEED_1GB;
2143 break;
2144 case BIT_14:
2145 port_speed = PORT_SPEED_2GB;
2146 break;
2147 case BIT_13:
2148 port_speed = PORT_SPEED_4GB;
2149 break;
2150 default:
2151 DEBUG2(printk("scsi(%ld): %02x%02x%02x%02x%02x%02x%02x%02x -- " 2131 DEBUG2(printk("scsi(%ld): %02x%02x%02x%02x%02x%02x%02x%02x -- "
2152 "unsupported FM port operating speed (%04x).\n", 2132 "unsupported FM port operating speed.\n",
2153 ha->host_no, fcport->port_name[0], fcport->port_name[1], 2133 ha->host_no, fcport->port_name[0], fcport->port_name[1],
2154 fcport->port_name[2], fcport->port_name[3], 2134 fcport->port_name[2], fcport->port_name[3],
2155 fcport->port_name[4], fcport->port_name[5], 2135 fcport->port_name[4], fcport->port_name[5],
2156 fcport->port_name[6], fcport->port_name[7], 2136 fcport->port_name[6], fcport->port_name[7]));
2157 be16_to_cpu(fcport->fp_speed)));
2158 port_speed = PORT_SPEED_UNKNOWN;
2159 break;
2160 }
2161 if (port_speed == PORT_SPEED_UNKNOWN)
2162 return; 2137 return;
2138 }
2163 2139
2164 rval = qla2x00_set_idma_speed(ha, fcport->loop_id, port_speed, mb); 2140 rval = qla2x00_set_idma_speed(ha, fcport->loop_id, fcport->fp_speed,
2141 mb);
2165 if (rval != QLA_SUCCESS) { 2142 if (rval != QLA_SUCCESS) {
2166 DEBUG2(printk("scsi(%ld): Unable to adjust iIDMA " 2143 DEBUG2(printk("scsi(%ld): Unable to adjust iIDMA "
2167 "%02x%02x%02x%02x%02x%02x%02x%02x -- %04x %x %04x %04x.\n", 2144 "%02x%02x%02x%02x%02x%02x%02x%02x -- %04x %x %04x %04x.\n",
@@ -2169,12 +2146,12 @@ qla2x00_iidma_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
2169 fcport->port_name[2], fcport->port_name[3], 2146 fcport->port_name[2], fcport->port_name[3],
2170 fcport->port_name[4], fcport->port_name[5], 2147 fcport->port_name[4], fcport->port_name[5],
2171 fcport->port_name[6], fcport->port_name[7], rval, 2148 fcport->port_name[6], fcport->port_name[7], rval,
2172 port_speed, mb[0], mb[1])); 2149 fcport->fp_speed, mb[0], mb[1]));
2173 } else { 2150 } else {
2174 DEBUG2(qla_printk(KERN_INFO, ha, 2151 DEBUG2(qla_printk(KERN_INFO, ha,
2175 "iIDMA adjusted to %s GB/s on " 2152 "iIDMA adjusted to %s GB/s on "
2176 "%02x%02x%02x%02x%02x%02x%02x%02x.\n", 2153 "%02x%02x%02x%02x%02x%02x%02x%02x.\n",
2177 link_speeds[port_speed], fcport->port_name[0], 2154 link_speeds[fcport->fp_speed], fcport->port_name[0],
2178 fcport->port_name[1], fcport->port_name[2], 2155 fcport->port_name[1], fcport->port_name[2],
2179 fcport->port_name[3], fcport->port_name[4], 2156 fcport->port_name[3], fcport->port_name[4],
2180 fcport->port_name[5], fcport->port_name[6], 2157 fcport->port_name[5], fcport->port_name[6],
@@ -3354,7 +3331,8 @@ qla2x00_restart_isp(scsi_qla_host_t *ha)
3354 3331
3355 spin_lock_irqsave(&ha->hardware_lock, flags); 3332 spin_lock_irqsave(&ha->hardware_lock, flags);
3356 3333
3357 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) { 3334 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha) &&
3335 !IS_QLA25XX(ha)) {
3358 /* 3336 /*
3359 * Disable SRAM, Instruction RAM and GP RAM 3337 * Disable SRAM, Instruction RAM and GP RAM
3360 * parity. 3338 * parity.
@@ -3370,7 +3348,8 @@ qla2x00_restart_isp(scsi_qla_host_t *ha)
3370 3348
3371 spin_lock_irqsave(&ha->hardware_lock, flags); 3349 spin_lock_irqsave(&ha->hardware_lock, flags);
3372 3350
3373 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) { 3351 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha) &&
3352 !IS_QLA25XX(ha)) {
3374 /* Enable proper parity */ 3353 /* Enable proper parity */
3375 if (IS_QLA2300(ha)) 3354 if (IS_QLA2300(ha))
3376 /* SRAM parity */ 3355 /* SRAM parity */
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 50539da467..eecae9905e 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -490,6 +490,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
490 set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); 490 set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags);
491 491
492 ha->flags.gpsc_supported = 1; 492 ha->flags.gpsc_supported = 1;
493 ha->flags.management_server_logged_in = 0;
493 break; 494 break;
494 495
495 case MBA_CHG_IN_CONNECTION: /* Change in connection mode */ 496 case MBA_CHG_IN_CONNECTION: /* Change in connection mode */
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 93c0c7e4f0..acca898ce0 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1564,7 +1564,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1564 struct Scsi_Host *host; 1564 struct Scsi_Host *host;
1565 scsi_qla_host_t *ha; 1565 scsi_qla_host_t *ha;
1566 unsigned long flags = 0; 1566 unsigned long flags = 0;
1567 char pci_info[20]; 1567 char pci_info[30];
1568 char fw_str[30]; 1568 char fw_str[30];
1569 struct scsi_host_template *sht; 1569 struct scsi_host_template *sht;
1570 1570
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
index dd1f8ceb79..18095b9b76 100644
--- a/drivers/scsi/qla2xxx/qla_version.h
+++ b/drivers/scsi/qla2xxx/qla_version.h
@@ -7,7 +7,7 @@
7/* 7/*
8 * Driver version 8 * Driver version
9 */ 9 */
10#define QLA2XXX_VERSION "8.02.00-k2" 10#define QLA2XXX_VERSION "8.02.00-k3"
11 11
12#define QLA_DRIVER_MAJOR_VER 8 12#define QLA_DRIVER_MAJOR_VER 8
13#define QLA_DRIVER_MINOR_VER 2 13#define QLA_DRIVER_MINOR_VER 2
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
index 6f56f87506..4df21c92ff 100644
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -787,10 +787,12 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
787 struct scsi_target *starget = sdev->sdev_target; 787 struct scsi_target *starget = sdev->sdev_target;
788 struct Scsi_Host *shost = sdev->host; 788 struct Scsi_Host *shost = sdev->host;
789 int len = sdev->inquiry_len; 789 int len = sdev->inquiry_len;
790 int min_period = spi_min_period(starget);
791 int max_width = spi_max_width(starget);
790 /* first set us up for narrow async */ 792 /* first set us up for narrow async */
791 DV_SET(offset, 0); 793 DV_SET(offset, 0);
792 DV_SET(width, 0); 794 DV_SET(width, 0);
793 795
794 if (spi_dv_device_compare_inquiry(sdev, buffer, buffer, DV_LOOPS) 796 if (spi_dv_device_compare_inquiry(sdev, buffer, buffer, DV_LOOPS)
795 != SPI_COMPARE_SUCCESS) { 797 != SPI_COMPARE_SUCCESS) {
796 starget_printk(KERN_ERR, starget, "Domain Validation Initial Inquiry Failed\n"); 798 starget_printk(KERN_ERR, starget, "Domain Validation Initial Inquiry Failed\n");
@@ -798,9 +800,13 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
798 return; 800 return;
799 } 801 }
800 802
803 if (!scsi_device_wide(sdev)) {
804 spi_max_width(starget) = 0;
805 max_width = 0;
806 }
807
801 /* test width */ 808 /* test width */
802 if (i->f->set_width && spi_max_width(starget) && 809 if (i->f->set_width && max_width) {
803 scsi_device_wide(sdev)) {
804 i->f->set_width(starget, 1); 810 i->f->set_width(starget, 1);
805 811
806 if (spi_dv_device_compare_inquiry(sdev, buffer, 812 if (spi_dv_device_compare_inquiry(sdev, buffer,
@@ -809,6 +815,11 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
809 != SPI_COMPARE_SUCCESS) { 815 != SPI_COMPARE_SUCCESS) {
810 starget_printk(KERN_ERR, starget, "Wide Transfers Fail\n"); 816 starget_printk(KERN_ERR, starget, "Wide Transfers Fail\n");
811 i->f->set_width(starget, 0); 817 i->f->set_width(starget, 0);
818 /* Make sure we don't force wide back on by asking
819 * for a transfer period that requires it */
820 max_width = 0;
821 if (min_period < 10)
822 min_period = 10;
812 } 823 }
813 } 824 }
814 825
@@ -828,7 +839,8 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
828 839
829 /* now set up to the maximum */ 840 /* now set up to the maximum */
830 DV_SET(offset, spi_max_offset(starget)); 841 DV_SET(offset, spi_max_offset(starget));
831 DV_SET(period, spi_min_period(starget)); 842 DV_SET(period, min_period);
843
832 /* try QAS requests; this should be harmless to set if the 844 /* try QAS requests; this should be harmless to set if the
833 * target supports it */ 845 * target supports it */
834 if (scsi_device_qas(sdev)) { 846 if (scsi_device_qas(sdev)) {
@@ -837,14 +849,14 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
837 DV_SET(qas, 0); 849 DV_SET(qas, 0);
838 } 850 }
839 851
840 if (scsi_device_ius(sdev) && spi_min_period(starget) < 9) { 852 if (scsi_device_ius(sdev) && min_period < 9) {
841 /* This u320 (or u640). Set IU transfers */ 853 /* This u320 (or u640). Set IU transfers */
842 DV_SET(iu, 1); 854 DV_SET(iu, 1);
843 /* Then set the optional parameters */ 855 /* Then set the optional parameters */
844 DV_SET(rd_strm, 1); 856 DV_SET(rd_strm, 1);
845 DV_SET(wr_flow, 1); 857 DV_SET(wr_flow, 1);
846 DV_SET(rti, 1); 858 DV_SET(rti, 1);
847 if (spi_min_period(starget) == 8) 859 if (min_period == 8)
848 DV_SET(pcomp_en, 1); 860 DV_SET(pcomp_en, 1);
849 } else { 861 } else {
850 DV_SET(iu, 0); 862 DV_SET(iu, 0);
@@ -862,6 +874,10 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
862 } else { 874 } else {
863 DV_SET(dt, 1); 875 DV_SET(dt, 1);
864 } 876 }
877 /* set width last because it will pull all the other
878 * parameters down to required values */
879 DV_SET(width, max_width);
880
865 /* Do the read only INQUIRY tests */ 881 /* Do the read only INQUIRY tests */
866 spi_dv_retrain(sdev, buffer, buffer + sdev->inquiry_len, 882 spi_dv_retrain(sdev, buffer, buffer + sdev->inquiry_len,
867 spi_dv_device_compare_inquiry); 883 spi_dv_device_compare_inquiry);
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index bd66339f7a..1ea1ed82c3 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -610,7 +610,7 @@ static int pci_netmos_init(struct pci_dev *dev)
610/* enable IO_Space bit */ 610/* enable IO_Space bit */
611#define ITE_887x_POSIO_ENABLE (1 << 31) 611#define ITE_887x_POSIO_ENABLE (1 << 31)
612 612
613static int __devinit pci_ite887x_init(struct pci_dev *dev) 613static int pci_ite887x_init(struct pci_dev *dev)
614{ 614{
615 /* inta_addr are the configuration addresses of the ITE */ 615 /* inta_addr are the configuration addresses of the ITE */
616 static const short inta_addr[] = { 0x2a0, 0x2c0, 0x220, 0x240, 0x1e0, 616 static const short inta_addr[] = { 0x2a0, 0x2c0, 0x220, 0x240, 0x1e0,
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 64ff6a5f6a..81b52b7cca 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -611,7 +611,7 @@ config SERIAL_BFIN
611 611
612config SERIAL_BFIN_CONSOLE 612config SERIAL_BFIN_CONSOLE
613 bool "Console on Blackfin serial port" 613 bool "Console on Blackfin serial port"
614 depends on SERIAL_BFIN 614 depends on SERIAL_BFIN=y
615 select SERIAL_CORE_CONSOLE 615 select SERIAL_CORE_CONSOLE
616 616
617choice 617choice
@@ -832,10 +832,10 @@ config SERIAL_MUX
832 4. Change the kernel command console parameter to: console=ttyB0 832 4. Change the kernel command console parameter to: console=ttyB0
833 833
834config SERIAL_MUX_CONSOLE 834config SERIAL_MUX_CONSOLE
835 bool "Support for console on serial MUX" 835 bool "Support for console on serial MUX"
836 depends on SERIAL_MUX 836 depends on SERIAL_MUX=y
837 select SERIAL_CORE_CONSOLE 837 select SERIAL_CORE_CONSOLE
838 default y 838 default y
839 839
840config PDC_CONSOLE 840config PDC_CONSOLE
841 bool "PDC software console support" 841 bool "PDC software console support"
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.h b/drivers/serial/cpm_uart/cpm_uart_cpm1.h
index a99e45e2b6..2a6477834c 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm1.h
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.h
@@ -37,6 +37,6 @@ static inline void cpm_set_smc_fcr(volatile smc_uart_t * up)
37 up->smc_tfcr = SMC_EB; 37 up->smc_tfcr = SMC_EB;
38} 38}
39 39
40#define DPRAM_BASE ((unsigned char *)&cpmp->cp_dpmem[0]) 40#define DPRAM_BASE ((unsigned char *)cpm_dpram_addr(0))
41 41
42#endif 42#endif
diff --git a/drivers/serial/sb1250-duart.c b/drivers/serial/sb1250-duart.c
index 2012537550..2d6c08b3db 100644
--- a/drivers/serial/sb1250-duart.c
+++ b/drivers/serial/sb1250-duart.c
@@ -58,6 +58,12 @@
58#define SBD_CTRLREGS(line) A_BCM1480_DUART_CTRLREG((line), 0) 58#define SBD_CTRLREGS(line) A_BCM1480_DUART_CTRLREG((line), 0)
59#define SBD_INT(line) (K_BCM1480_INT_UART_0 + (line)) 59#define SBD_INT(line) (K_BCM1480_INT_UART_0 + (line))
60 60
61#define DUART_CHANREG_SPACING BCM1480_DUART_CHANREG_SPACING
62
63#define R_DUART_IMRREG(line) R_BCM1480_DUART_IMRREG(line)
64#define R_DUART_INCHREG(line) R_BCM1480_DUART_INCHREG(line)
65#define R_DUART_ISRREG(line) R_BCM1480_DUART_ISRREG(line)
66
61#elif defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X) 67#elif defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X)
62#include <asm/sibyte/sb1250_regs.h> 68#include <asm/sibyte/sb1250_regs.h>
63#include <asm/sibyte/sb1250_int.h> 69#include <asm/sibyte/sb1250_int.h>
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index a0ea435985..7c8d78fbbb 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -943,6 +943,7 @@ static struct pcmcia_device_id serial_ids[] = {
943 PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4), 943 PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4),
944 PCMCIA_MFC_DEVICE_PROD_ID12(2,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4), 944 PCMCIA_MFC_DEVICE_PROD_ID12(2,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4),
945 PCMCIA_MFC_DEVICE_PROD_ID12(3,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4), 945 PCMCIA_MFC_DEVICE_PROD_ID12(3,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4),
946 PCMCIA_DEVICE_MANF_CARD(0x0279, 0x950b),
946 /* too generic */ 947 /* too generic */
947 /* PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0160, 0x0002), */ 948 /* PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0160, 0x0002), */
948 /* PCMCIA_MFC_DEVICE_MANF_CARD(1, 0x0160, 0x0002), */ 949 /* PCMCIA_MFC_DEVICE_MANF_CARD(1, 0x0160, 0x0002), */
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
index bca57bb949..ff610c2331 100644
--- a/drivers/serial/sunsab.c
+++ b/drivers/serial/sunsab.c
@@ -38,7 +38,7 @@
38#include <asm/prom.h> 38#include <asm/prom.h>
39#include <asm/of_device.h> 39#include <asm/of_device.h>
40 40
41#if defined(CONFIG_SERIAL_SUNZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 41#if defined(CONFIG_SERIAL_SUNSAB_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
42#define SUPPORT_SYSRQ 42#define SUPPORT_SYSRQ
43#endif 43#endif
44 44
@@ -58,6 +58,7 @@ struct uart_sunsab_port {
58 unsigned char interrupt_mask1;/* ISR1 masking */ 58 unsigned char interrupt_mask1;/* ISR1 masking */
59 unsigned char pvr_dtr_bit; /* Which PVR bit is DTR */ 59 unsigned char pvr_dtr_bit; /* Which PVR bit is DTR */
60 unsigned char pvr_dsr_bit; /* Which PVR bit is DSR */ 60 unsigned char pvr_dsr_bit; /* Which PVR bit is DSR */
61 unsigned int gis_shift;
61 int type; /* SAB82532 version */ 62 int type; /* SAB82532 version */
62 63
63 /* Setting configuration bits while the transmitter is active 64 /* Setting configuration bits while the transmitter is active
@@ -305,13 +306,15 @@ static irqreturn_t sunsab_interrupt(int irq, void *dev_id)
305 struct tty_struct *tty; 306 struct tty_struct *tty;
306 union sab82532_irq_status status; 307 union sab82532_irq_status status;
307 unsigned long flags; 308 unsigned long flags;
309 unsigned char gis;
308 310
309 spin_lock_irqsave(&up->port.lock, flags); 311 spin_lock_irqsave(&up->port.lock, flags);
310 312
311 status.stat = 0; 313 status.stat = 0;
312 if (readb(&up->regs->r.gis) & SAB82532_GIS_ISA0) 314 gis = readb(&up->regs->r.gis) >> up->gis_shift;
315 if (gis & 1)
313 status.sreg.isr0 = readb(&up->regs->r.isr0); 316 status.sreg.isr0 = readb(&up->regs->r.isr0);
314 if (readb(&up->regs->r.gis) & SAB82532_GIS_ISA1) 317 if (gis & 2)
315 status.sreg.isr1 = readb(&up->regs->r.isr1); 318 status.sreg.isr1 = readb(&up->regs->r.isr1);
316 319
317 tty = NULL; 320 tty = NULL;
@@ -327,35 +330,6 @@ static irqreturn_t sunsab_interrupt(int irq, void *dev_id)
327 transmit_chars(up, &status); 330 transmit_chars(up, &status);
328 } 331 }
329 332
330 spin_unlock(&up->port.lock);
331
332 if (tty)
333 tty_flip_buffer_push(tty);
334
335 up++;
336
337 spin_lock(&up->port.lock);
338
339 status.stat = 0;
340 if (readb(&up->regs->r.gis) & SAB82532_GIS_ISB0)
341 status.sreg.isr0 = readb(&up->regs->r.isr0);
342 if (readb(&up->regs->r.gis) & SAB82532_GIS_ISB1)
343 status.sreg.isr1 = readb(&up->regs->r.isr1);
344
345 tty = NULL;
346 if (status.stat) {
347 if ((status.sreg.isr0 & (SAB82532_ISR0_TCD | SAB82532_ISR0_TIME |
348 SAB82532_ISR0_RFO | SAB82532_ISR0_RPF)) ||
349 (status.sreg.isr1 & SAB82532_ISR1_BRK))
350
351 tty = receive_chars(up, &status);
352 if ((status.sreg.isr0 & SAB82532_ISR0_CDSC) ||
353 (status.sreg.isr1 & (SAB82532_ISR1_BRK | SAB82532_ISR1_CSC)))
354 check_status(up, &status);
355 if (status.sreg.isr1 & (SAB82532_ISR1_ALLS | SAB82532_ISR1_XPR))
356 transmit_chars(up, &status);
357 }
358
359 spin_unlock_irqrestore(&up->port.lock, flags); 333 spin_unlock_irqrestore(&up->port.lock, flags);
360 334
361 if (tty) 335 if (tty)
@@ -539,6 +513,10 @@ static int sunsab_startup(struct uart_port *port)
539 struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; 513 struct uart_sunsab_port *up = (struct uart_sunsab_port *) port;
540 unsigned long flags; 514 unsigned long flags;
541 unsigned char tmp; 515 unsigned char tmp;
516 int err = request_irq(up->port.irq, sunsab_interrupt,
517 IRQF_SHARED, "sab", up);
518 if (err)
519 return err;
542 520
543 spin_lock_irqsave(&up->port.lock, flags); 521 spin_lock_irqsave(&up->port.lock, flags);
544 522
@@ -641,6 +619,7 @@ static void sunsab_shutdown(struct uart_port *port)
641#endif 619#endif
642 620
643 spin_unlock_irqrestore(&up->port.lock, flags); 621 spin_unlock_irqrestore(&up->port.lock, flags);
622 free_irq(up->port.irq, up);
644} 623}
645 624
646/* 625/*
@@ -1008,9 +987,11 @@ static int __devinit sunsab_init_one(struct uart_sunsab_port *up,
1008 if ((up->port.line & 0x1) == 0) { 987 if ((up->port.line & 0x1) == 0) {
1009 up->pvr_dsr_bit = (1 << 0); 988 up->pvr_dsr_bit = (1 << 0);
1010 up->pvr_dtr_bit = (1 << 1); 989 up->pvr_dtr_bit = (1 << 1);
990 up->gis_shift = 2;
1011 } else { 991 } else {
1012 up->pvr_dsr_bit = (1 << 3); 992 up->pvr_dsr_bit = (1 << 3);
1013 up->pvr_dtr_bit = (1 << 2); 993 up->pvr_dtr_bit = (1 << 2);
994 up->gis_shift = 0;
1014 } 995 }
1015 up->cached_pvr = (1 << 1) | (1 << 2) | (1 << 4); 996 up->cached_pvr = (1 << 1) | (1 << 2) | (1 << 4);
1016 writeb(up->cached_pvr, &up->regs->w.pvr); 997 writeb(up->cached_pvr, &up->regs->w.pvr);
@@ -1023,19 +1004,6 @@ static int __devinit sunsab_init_one(struct uart_sunsab_port *up,
1023 up->tec_timeout = SAB82532_MAX_TEC_TIMEOUT; 1004 up->tec_timeout = SAB82532_MAX_TEC_TIMEOUT;
1024 up->cec_timeout = SAB82532_MAX_CEC_TIMEOUT; 1005 up->cec_timeout = SAB82532_MAX_CEC_TIMEOUT;
1025 1006
1026 if (!(up->port.line & 0x01)) {
1027 int err;
1028
1029 err = request_irq(up->port.irq, sunsab_interrupt,
1030 IRQF_SHARED, "sab", up);
1031 if (err) {
1032 of_iounmap(&op->resource[0],
1033 up->port.membase,
1034 sizeof(union sab82532_async_regs));
1035 return err;
1036 }
1037 }
1038
1039 return 0; 1007 return 0;
1040} 1008}
1041 1009
@@ -1051,52 +1019,60 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id *
1051 0, 1019 0,
1052 (inst * 2) + 0); 1020 (inst * 2) + 0);
1053 if (err) 1021 if (err)
1054 return err; 1022 goto out;
1055 1023
1056 err = sunsab_init_one(&up[1], op, 1024 err = sunsab_init_one(&up[1], op,
1057 sizeof(union sab82532_async_regs), 1025 sizeof(union sab82532_async_regs),
1058 (inst * 2) + 1); 1026 (inst * 2) + 1);
1059 if (err) { 1027 if (err)
1060 of_iounmap(&op->resource[0], 1028 goto out1;
1061 up[0].port.membase,
1062 sizeof(union sab82532_async_regs));
1063 free_irq(up[0].port.irq, &up[0]);
1064 return err;
1065 }
1066 1029
1067 sunserial_console_match(SUNSAB_CONSOLE(), op->node, 1030 sunserial_console_match(SUNSAB_CONSOLE(), op->node,
1068 &sunsab_reg, up[0].port.line); 1031 &sunsab_reg, up[0].port.line);
1069 uart_add_one_port(&sunsab_reg, &up[0].port);
1070 1032
1071 sunserial_console_match(SUNSAB_CONSOLE(), op->node, 1033 sunserial_console_match(SUNSAB_CONSOLE(), op->node,
1072 &sunsab_reg, up[1].port.line); 1034 &sunsab_reg, up[1].port.line);
1073 uart_add_one_port(&sunsab_reg, &up[1].port); 1035
1036 err = uart_add_one_port(&sunsab_reg, &up[0].port);
1037 if (err)
1038 goto out2;
1039
1040 err = uart_add_one_port(&sunsab_reg, &up[1].port);
1041 if (err)
1042 goto out3;
1074 1043
1075 dev_set_drvdata(&op->dev, &up[0]); 1044 dev_set_drvdata(&op->dev, &up[0]);
1076 1045
1077 inst++; 1046 inst++;
1078 1047
1079 return 0; 1048 return 0;
1080}
1081
1082static void __devexit sab_remove_one(struct uart_sunsab_port *up)
1083{
1084 struct of_device *op = to_of_device(up->port.dev);
1085 1049
1086 uart_remove_one_port(&sunsab_reg, &up->port); 1050out3:
1087 if (!(up->port.line & 1)) 1051 uart_remove_one_port(&sunsab_reg, &up[0].port);
1088 free_irq(up->port.irq, up); 1052out2:
1089 of_iounmap(&op->resource[0], 1053 of_iounmap(&op->resource[0],
1090 up->port.membase, 1054 up[1].port.membase,
1091 sizeof(union sab82532_async_regs)); 1055 sizeof(union sab82532_async_regs));
1056out1:
1057 of_iounmap(&op->resource[0],
1058 up[0].port.membase,
1059 sizeof(union sab82532_async_regs));
1060out:
1061 return err;
1092} 1062}
1093 1063
1094static int __devexit sab_remove(struct of_device *op) 1064static int __devexit sab_remove(struct of_device *op)
1095{ 1065{
1096 struct uart_sunsab_port *up = dev_get_drvdata(&op->dev); 1066 struct uart_sunsab_port *up = dev_get_drvdata(&op->dev);
1097 1067
1098 sab_remove_one(&up[0]); 1068 uart_remove_one_port(&sunsab_reg, &up[1].port);
1099 sab_remove_one(&up[1]); 1069 uart_remove_one_port(&sunsab_reg, &up[0].port);
1070 of_iounmap(&op->resource[0],
1071 up[1].port.membase,
1072 sizeof(union sab82532_async_regs));
1073 of_iounmap(&op->resource[0],
1074 up[0].port.membase,
1075 sizeof(union sab82532_async_regs));
1100 1076
1101 dev_set_drvdata(&op->dev, NULL); 1077 dev_set_drvdata(&op->dev, NULL);
1102 1078
@@ -1143,6 +1119,7 @@ static int __init sunsab_init(void)
1143 1119
1144 sunsab_reg.minor = sunserial_current_minor; 1120 sunsab_reg.minor = sunserial_current_minor;
1145 sunsab_reg.nr = num_channels; 1121 sunsab_reg.nr = num_channels;
1122 sunsab_reg.cons = SUNSAB_CONSOLE();
1146 1123
1147 err = uart_register_driver(&sunsab_reg); 1124 err = uart_register_driver(&sunsab_reg);
1148 if (err) { 1125 if (err) {
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 79b13685bd..e074943fef 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -1198,10 +1198,11 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up)
1198 if (up->port.type == PORT_UNKNOWN) 1198 if (up->port.type == PORT_UNKNOWN)
1199 return -ENODEV; 1199 return -ENODEV;
1200 1200
1201 printk("%s: %s port at %lx, irq %u\n", 1201 printk("%s: %s port at %llx, irq %u\n",
1202 to_of_device(up->port.dev)->node->full_name, 1202 to_of_device(up->port.dev)->node->full_name,
1203 (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", 1203 (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse",
1204 up->port.mapbase, up->port.irq); 1204 (unsigned long long) up->port.mapbase,
1205 up->port.irq);
1205 1206
1206#ifdef CONFIG_SERIO 1207#ifdef CONFIG_SERIO
1207 serio = &up->serio; 1208 serio = &up->serio;
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
index 1d262c0c61..283bef0d24 100644
--- a/drivers/serial/sunzilog.c
+++ b/drivers/serial/sunzilog.c
@@ -1431,14 +1431,16 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
1431 return err; 1431 return err;
1432 } 1432 }
1433 } else { 1433 } else {
1434 printk(KERN_INFO "%s: Keyboard at MMIO 0x%lx (irq = %d) " 1434 printk(KERN_INFO "%s: Keyboard at MMIO 0x%llx (irq = %d) "
1435 "is a %s\n", 1435 "is a %s\n",
1436 op->dev.bus_id, up[0].port.mapbase, op->irqs[0], 1436 op->dev.bus_id,
1437 sunzilog_type (&up[0].port)); 1437 (unsigned long long) up[0].port.mapbase,
1438 printk(KERN_INFO "%s: Mouse at MMIO 0x%lx (irq = %d) " 1438 op->irqs[0], sunzilog_type(&up[0].port));
1439 printk(KERN_INFO "%s: Mouse at MMIO 0x%llx (irq = %d) "
1439 "is a %s\n", 1440 "is a %s\n",
1440 op->dev.bus_id, up[1].port.mapbase, op->irqs[0], 1441 op->dev.bus_id,
1441 sunzilog_type (&up[1].port)); 1442 (unsigned long long) up[1].port.mapbase,
1443 op->irqs[0], sunzilog_type(&up[1].port));
1442 } 1444 }
1443 1445
1444 dev_set_drvdata(&op->dev, &up[0]); 1446 dev_set_drvdata(&op->dev, &up[0]);
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index ad144054da..b046974931 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -251,7 +251,7 @@ atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer)
251 xfer->rx_dma = dma_map_single(dev, 251 xfer->rx_dma = dma_map_single(dev,
252 xfer->rx_buf, xfer->len, 252 xfer->rx_buf, xfer->len,
253 DMA_FROM_DEVICE); 253 DMA_FROM_DEVICE);
254 if (dma_mapping_error(xfer->tx_dma)) { 254 if (dma_mapping_error(xfer->rx_dma)) {
255 if (xfer->tx_buf) 255 if (xfer->tx_buf)
256 dma_unmap_single(dev, 256 dma_unmap_single(dev,
257 xfer->tx_dma, xfer->len, 257 xfer->tx_dma, xfer->len,
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 48587c2705..f540ed77a1 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -1303,8 +1303,9 @@ static int bfin5xx_spi_resume(struct platform_device *pdev)
1303#define bfin5xx_spi_resume NULL 1303#define bfin5xx_spi_resume NULL
1304#endif /* CONFIG_PM */ 1304#endif /* CONFIG_PM */
1305 1305
1306MODULE_ALIAS("bfin-spi-master"); /* for platform bus hotplug */
1306static struct platform_driver bfin5xx_spi_driver = { 1307static struct platform_driver bfin5xx_spi_driver = {
1307 .driver = { 1308 .driver = {
1308 .name = "bfin-spi-master", 1309 .name = "bfin-spi-master",
1309 .owner = THIS_MODULE, 1310 .owner = THIS_MODULE,
1310 }, 1311 },
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index aee9ad6f63..bd9177f51d 100644
--- a/drivers/spi/spi_imx.c
+++ b/drivers/spi/spi_imx.c
@@ -1735,7 +1735,7 @@ static int spi_imx_resume(struct platform_device *pdev)
1735 1735
1736static struct platform_driver driver = { 1736static struct platform_driver driver = {
1737 .driver = { 1737 .driver = {
1738 .name = "imx-spi", 1738 .name = "spi_imx",
1739 .bus = &platform_bus_type, 1739 .bus = &platform_bus_type,
1740 .owner = THIS_MODULE, 1740 .owner = THIS_MODULE,
1741 }, 1741 },
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index 2adf856e44..32cda77b31 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -384,11 +384,8 @@ irqreturn_t mpc83xx_spi_irq(s32 irq, void *context_data)
384 384
385 mpc83xx_spi->count -= 1; 385 mpc83xx_spi->count -= 1;
386 if (mpc83xx_spi->count) { 386 if (mpc83xx_spi->count) {
387 if (mpc83xx_spi->tx) { 387 u32 word = mpc83xx_spi->get_tx(mpc83xx_spi);
388 u32 word = mpc83xx_spi->get_tx(mpc83xx_spi); 388 mpc83xx_spi_write_reg(&mpc83xx_spi->base->transmit, word);
389 mpc83xx_spi_write_reg(&mpc83xx_spi->base->transmit,
390 word);
391 }
392 } else { 389 } else {
393 complete(&mpc83xx_spi->done); 390 complete(&mpc83xx_spi->done);
394 } 391 }
@@ -530,6 +527,7 @@ static int __devexit mpc83xx_spi_remove(struct platform_device *dev)
530 return 0; 527 return 0;
531} 528}
532 529
530MODULE_ALIAS("mpc83xx_spi"); /* for platform bus hotplug */
533static struct platform_driver mpc83xx_spi_driver = { 531static struct platform_driver mpc83xx_spi_driver = {
534 .probe = mpc83xx_spi_probe, 532 .probe = mpc83xx_spi_probe,
535 .remove = __devexit_p(mpc83xx_spi_remove), 533 .remove = __devexit_p(mpc83xx_spi_remove),
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 5cf48123e0..e9b683f7d7 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -427,6 +427,7 @@ static int s3c24xx_spi_resume(struct platform_device *pdev)
427#define s3c24xx_spi_resume NULL 427#define s3c24xx_spi_resume NULL
428#endif 428#endif
429 429
430MODULE_ALIAS("s3c2410_spi"); /* for platform bus hotplug */
430static struct platform_driver s3c24xx_spidrv = { 431static struct platform_driver s3c24xx_spidrv = {
431 .probe = s3c24xx_spi_probe, 432 .probe = s3c24xx_spi_probe,
432 .remove = s3c24xx_spi_remove, 433 .remove = s3c24xx_spi_remove,
diff --git a/drivers/spi/spi_s3c24xx_gpio.c b/drivers/spi/spi_s3c24xx_gpio.c
index 611ac22b7c..0fa25e2e80 100644
--- a/drivers/spi/spi_s3c24xx_gpio.c
+++ b/drivers/spi/spi_s3c24xx_gpio.c
@@ -180,7 +180,7 @@ static struct platform_driver s3c2410_spigpio_drv = {
180 .suspend = s3c2410_spigpio_suspend, 180 .suspend = s3c2410_spigpio_suspend,
181 .resume = s3c2410_spigpio_resume, 181 .resume = s3c2410_spigpio_resume,
182 .driver = { 182 .driver = {
183 .name = "s3c24xx-spi-gpio", 183 .name = "spi_s3c24xx_gpio",
184 .owner = THIS_MODULE, 184 .owner = THIS_MODULE,
185 }, 185 },
186}; 186};
diff --git a/drivers/spi/spi_txx9.c b/drivers/spi/spi_txx9.c
index 08e981c406..b7f4bb239e 100644
--- a/drivers/spi/spi_txx9.c
+++ b/drivers/spi/spi_txx9.c
@@ -453,7 +453,7 @@ static int __exit txx9spi_remove(struct platform_device *dev)
453static struct platform_driver txx9spi_driver = { 453static struct platform_driver txx9spi_driver = {
454 .remove = __exit_p(txx9spi_remove), 454 .remove = __exit_p(txx9spi_remove),
455 .driver = { 455 .driver = {
456 .name = "txx9spi", 456 .name = "spi_txx9",
457 .owner = THIS_MODULE, 457 .owner = THIS_MODULE,
458 }, 458 },
459}; 459};
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index f0bf9a68e9..5d04f520c1 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -21,7 +21,7 @@
21 21
22#include <syslib/virtex_devices.h> 22#include <syslib/virtex_devices.h>
23 23
24#define XILINX_SPI_NAME "xspi" 24#define XILINX_SPI_NAME "xilinx_spi"
25 25
26/* Register definitions as per "OPB Serial Peripheral Interface (SPI) (v1.00e) 26/* Register definitions as per "OPB Serial Peripheral Interface (SPI) (v1.00e)
27 * Product Specification", DS464 27 * Product Specification", DS464
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index 6343689268..7580aa5da0 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -21,6 +21,7 @@ config USB_ARCH_HAS_HCD
21 default y if USB_ARCH_HAS_EHCI 21 default y if USB_ARCH_HAS_EHCI
22 default y if PCMCIA && !M32R # sl811_cs 22 default y if PCMCIA && !M32R # sl811_cs
23 default y if ARM # SL-811 23 default y if ARM # SL-811
24 default y if SUPERH # r8a66597-hcd
24 default PCI 25 default PCI
25 26
26# many non-PCI SOC chips embed OHCI 27# many non-PCI SOC chips embed OHCI
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 02c52f8d5d..a73e714288 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -456,7 +456,6 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done,
456 int* actual_length) 456 int* actual_length)
457{ 457{
458 struct timer_list timer; 458 struct timer_list timer;
459 int status = urb->status;
460 459
461 init_timer(&timer); 460 init_timer(&timer);
462 timer.expires = jiffies + msecs_to_jiffies(CMD_TIMEOUT); 461 timer.expires = jiffies + msecs_to_jiffies(CMD_TIMEOUT);
@@ -468,7 +467,7 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done,
468 467
469 if (actual_length) 468 if (actual_length)
470 *actual_length = urb->actual_length; 469 *actual_length = urb->actual_length;
471 return status; 470 return urb->status; /* must read status after completion */
472} 471}
473 472
474static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, 473static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index a1a1c9d467..29807d048b 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -1721,9 +1721,12 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
1721 1721
1722 ret = uea_boot(sc); 1722 ret = uea_boot(sc);
1723 if (ret < 0) 1723 if (ret < 0)
1724 goto error; 1724 goto error_rm_grp;
1725 1725
1726 return 0; 1726 return 0;
1727
1728error_rm_grp:
1729 sysfs_remove_group(&intf->dev.kobj, &attr_grp);
1727error: 1730error:
1728 kfree(sc); 1731 kfree(sc);
1729 return ret; 1732 return ret;
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index fe940e0536..f51e22490e 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -921,6 +921,10 @@ skip_normal_probe:
921 return -EINVAL; 921 return -EINVAL;
922 } 922 }
923 } 923 }
924
925 /* Accept probe requests only for the control interface */
926 if (intf != control_interface)
927 return -ENODEV;
924 928
925 if (usb_interface_claimed(data_interface)) { /* valid in this context */ 929 if (usb_interface_claimed(data_interface)) { /* valid in this context */
926 dev_dbg(&intf->dev,"The data interface isn't available"); 930 dev_dbg(&intf->dev,"The data interface isn't available");
@@ -1109,10 +1113,12 @@ static void acm_disconnect(struct usb_interface *intf)
1109 return; 1113 return;
1110 } 1114 }
1111 if (acm->country_codes){ 1115 if (acm->country_codes){
1112 device_remove_file(&intf->dev, &dev_attr_wCountryCodes); 1116 device_remove_file(&acm->control->dev,
1113 device_remove_file(&intf->dev, &dev_attr_iCountryCodeRelDate); 1117 &dev_attr_wCountryCodes);
1118 device_remove_file(&acm->control->dev,
1119 &dev_attr_iCountryCodeRelDate);
1114 } 1120 }
1115 device_remove_file(&intf->dev, &dev_attr_bmCapabilities); 1121 device_remove_file(&acm->control->dev, &dev_attr_bmCapabilities);
1116 acm->dev = NULL; 1122 acm->dev = NULL;
1117 usb_set_intfdata(acm->control, NULL); 1123 usb_set_intfdata(acm->control, NULL);
1118 usb_set_intfdata(acm->data, NULL); 1124 usb_set_intfdata(acm->data, NULL);
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 654857493a..63b1243a91 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -60,7 +60,7 @@ ssize_t usb_store_new_id(struct usb_dynids *dynids,
60 dynid->id.match_flags = USB_DEVICE_ID_MATCH_DEVICE; 60 dynid->id.match_flags = USB_DEVICE_ID_MATCH_DEVICE;
61 61
62 spin_lock(&dynids->lock); 62 spin_lock(&dynids->lock);
63 list_add_tail(&dynids->list, &dynid->node); 63 list_add_tail(&dynid->node, &dynids->list);
64 spin_unlock(&dynids->lock); 64 spin_unlock(&dynids->lock);
65 65
66 if (get_driver(driver)) { 66 if (get_driver(driver)) {
@@ -1224,6 +1224,8 @@ static int usb_autopm_do_device(struct usb_device *udev, int inc_usage_cnt)
1224 udev->auto_pm = 1; 1224 udev->auto_pm = 1;
1225 udev->pm_usage_cnt += inc_usage_cnt; 1225 udev->pm_usage_cnt += inc_usage_cnt;
1226 WARN_ON(udev->pm_usage_cnt < 0); 1226 WARN_ON(udev->pm_usage_cnt < 0);
1227 if (inc_usage_cnt)
1228 udev->last_busy = jiffies;
1227 if (inc_usage_cnt >= 0 && udev->pm_usage_cnt > 0) { 1229 if (inc_usage_cnt >= 0 && udev->pm_usage_cnt > 0) {
1228 if (udev->state == USB_STATE_SUSPENDED) 1230 if (udev->state == USB_STATE_SUSPENDED)
1229 status = usb_resume_both(udev); 1231 status = usb_resume_both(udev);
@@ -1232,8 +1234,6 @@ static int usb_autopm_do_device(struct usb_device *udev, int inc_usage_cnt)
1232 else if (inc_usage_cnt) 1234 else if (inc_usage_cnt)
1233 udev->last_busy = jiffies; 1235 udev->last_busy = jiffies;
1234 } else if (inc_usage_cnt <= 0 && udev->pm_usage_cnt <= 0) { 1236 } else if (inc_usage_cnt <= 0 && udev->pm_usage_cnt <= 0) {
1235 if (inc_usage_cnt)
1236 udev->last_busy = jiffies;
1237 status = usb_suspend_both(udev, PMSG_SUSPEND); 1237 status = usb_suspend_both(udev, PMSG_SUSPEND);
1238 } 1238 }
1239 usb_pm_unlock(udev); 1239 usb_pm_unlock(udev);
@@ -1342,16 +1342,15 @@ static int usb_autopm_do_interface(struct usb_interface *intf,
1342 else { 1342 else {
1343 udev->auto_pm = 1; 1343 udev->auto_pm = 1;
1344 intf->pm_usage_cnt += inc_usage_cnt; 1344 intf->pm_usage_cnt += inc_usage_cnt;
1345 udev->last_busy = jiffies;
1345 if (inc_usage_cnt >= 0 && intf->pm_usage_cnt > 0) { 1346 if (inc_usage_cnt >= 0 && intf->pm_usage_cnt > 0) {
1346 if (udev->state == USB_STATE_SUSPENDED) 1347 if (udev->state == USB_STATE_SUSPENDED)
1347 status = usb_resume_both(udev); 1348 status = usb_resume_both(udev);
1348 if (status != 0) 1349 if (status != 0)
1349 intf->pm_usage_cnt -= inc_usage_cnt; 1350 intf->pm_usage_cnt -= inc_usage_cnt;
1350 else if (inc_usage_cnt) 1351 else
1351 udev->last_busy = jiffies; 1352 udev->last_busy = jiffies;
1352 } else if (inc_usage_cnt <= 0 && intf->pm_usage_cnt <= 0) { 1353 } else if (inc_usage_cnt <= 0 && intf->pm_usage_cnt <= 0) {
1353 if (inc_usage_cnt)
1354 udev->last_busy = jiffies;
1355 status = usb_suspend_both(udev, PMSG_SUSPEND); 1354 status = usb_suspend_both(udev, PMSG_SUSPEND);
1356 } 1355 }
1357 } 1356 }
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index e341a1da51..f7b337feb3 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1644,9 +1644,10 @@ static int finish_port_resume(struct usb_device *udev)
1644 * and device drivers will know about any resume quirks. 1644 * and device drivers will know about any resume quirks.
1645 */ 1645 */
1646 if (status == 0) { 1646 if (status == 0) {
1647 devstatus = 0;
1647 status = usb_get_status(udev, USB_RECIP_DEVICE, 0, &devstatus); 1648 status = usb_get_status(udev, USB_RECIP_DEVICE, 0, &devstatus);
1648 if (status >= 0) 1649 if (status >= 0)
1649 status = (status == 2 ? 0 : -ENODEV); 1650 status = (status > 0 ? 0 : -ENODEV);
1650 } 1651 }
1651 1652
1652 if (status) { 1653 if (status) {
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index b6bd05e3d4..d8f7b089a8 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -637,12 +637,12 @@ int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char
637 memset(buf,0,size); // Make sure we parse really received data 637 memset(buf,0,size); // Make sure we parse really received data
638 638
639 for (i = 0; i < 3; ++i) { 639 for (i = 0; i < 3; ++i) {
640 /* retry on length 0 or stall; some devices are flakey */ 640 /* retry on length 0 or error; some devices are flakey */
641 result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 641 result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
642 USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, 642 USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
643 (type << 8) + index, 0, buf, size, 643 (type << 8) + index, 0, buf, size,
644 USB_CTRL_GET_TIMEOUT); 644 USB_CTRL_GET_TIMEOUT);
645 if (result == 0 || result == -EPIPE) 645 if (result <= 0 && result != -ETIMEDOUT)
646 continue; 646 continue;
647 if (result > 1 && ((u8 *)buf)[1] != type) { 647 if (result > 1 && ((u8 *)buf)[1] != type) {
648 result = -EPROTO; 648 result = -EPROTO;
@@ -1358,6 +1358,30 @@ static int usb_if_uevent(struct device *dev, char **envp, int num_envp,
1358 usb_dev = interface_to_usbdev(intf); 1358 usb_dev = interface_to_usbdev(intf);
1359 alt = intf->cur_altsetting; 1359 alt = intf->cur_altsetting;
1360 1360
1361#ifdef CONFIG_USB_DEVICEFS
1362 if (add_uevent_var(envp, num_envp, &i,
1363 buffer, buffer_size, &length,
1364 "DEVICE=/proc/bus/usb/%03d/%03d",
1365 usb_dev->bus->busnum, usb_dev->devnum))
1366 return -ENOMEM;
1367#endif
1368
1369 if (add_uevent_var(envp, num_envp, &i,
1370 buffer, buffer_size, &length,
1371 "PRODUCT=%x/%x/%x",
1372 le16_to_cpu(usb_dev->descriptor.idVendor),
1373 le16_to_cpu(usb_dev->descriptor.idProduct),
1374 le16_to_cpu(usb_dev->descriptor.bcdDevice)))
1375 return -ENOMEM;
1376
1377 if (add_uevent_var(envp, num_envp, &i,
1378 buffer, buffer_size, &length,
1379 "TYPE=%d/%d/%d",
1380 usb_dev->descriptor.bDeviceClass,
1381 usb_dev->descriptor.bDeviceSubClass,
1382 usb_dev->descriptor.bDeviceProtocol))
1383 return -ENOMEM;
1384
1361 if (add_uevent_var(envp, num_envp, &i, 1385 if (add_uevent_var(envp, num_envp, &i,
1362 buffer, buffer_size, &length, 1386 buffer, buffer_size, &length,
1363 "INTERFACE=%d/%d/%d", 1387 "INTERFACE=%d/%d/%d",
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index b7917c5a3c..ebf3dc2011 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -28,8 +28,16 @@
28 * devices is broken... 28 * devices is broken...
29 */ 29 */
30static const struct usb_device_id usb_quirk_list[] = { 30static const struct usb_device_id usb_quirk_list[] = {
31 /* CBM - Flash disk */
32 { USB_DEVICE(0x0204, 0x6025), .driver_info = USB_QUIRK_RESET_RESUME },
31 /* HP 5300/5370C scanner */ 33 /* HP 5300/5370C scanner */
32 { USB_DEVICE(0x03f0, 0x0701), .driver_info = USB_QUIRK_STRING_FETCH_255 }, 34 { USB_DEVICE(0x03f0, 0x0701), .driver_info = USB_QUIRK_STRING_FETCH_255 },
35 /* Hewlett-Packard PhotoSmart 720 / PhotoSmart 935 (storage) */
36 { USB_DEVICE(0x03f0, 0x4002), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
37
38 /* SGS Thomson Microelectronics 4in1 card reader */
39 { USB_DEVICE(0x0483, 0x0321), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
40
33 /* Acer Peripherals Inc. (now BenQ Corp.) Prisa 640BU */ 41 /* Acer Peripherals Inc. (now BenQ Corp.) Prisa 640BU */
34 { USB_DEVICE(0x04a5, 0x207e), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, 42 { USB_DEVICE(0x04a5, 0x207e), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
35 /* Benq S2W 3300U */ 43 /* Benq S2W 3300U */
@@ -56,25 +64,54 @@ static const struct usb_device_id usb_quirk_list[] = {
56 { USB_DEVICE(0x04b8, 0x0121), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, 64 { USB_DEVICE(0x04b8, 0x0121), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
57 /* Seiko Epson Corp.*/ 65 /* Seiko Epson Corp.*/
58 { USB_DEVICE(0x04b8, 0x0122), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, 66 { USB_DEVICE(0x04b8, 0x0122), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
67 /* Samsung ML-2010 printer */
68 { USB_DEVICE(0x04e8, 0x326c), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
59 /* Samsung ML-2510 Series printer */ 69 /* Samsung ML-2510 Series printer */
60 { USB_DEVICE(0x04e8, 0x327e), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, 70 { USB_DEVICE(0x04e8, 0x327e), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
61 /* Elsa MicroLink 56k (V.250) */ 71 /* Elsa MicroLink 56k (V.250) */
62 { USB_DEVICE(0x05cc, 0x2267), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, 72 { USB_DEVICE(0x05cc, 0x2267), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
63 /* Ultima Electronics Corp.*/ 73 /* Ultima Electronics Corp.*/
64 { USB_DEVICE(0x05d8, 0x4005), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, 74 { USB_DEVICE(0x05d8, 0x4005), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
75
76 /* Genesys USB-to-IDE */
77 { USB_DEVICE(0x0503, 0x0702), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
78
79 /* USB Graphical LCD - EEH Datalink GmbH */
80 { USB_DEVICE(0x060c, 0x04eb), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
81
82 /* INTEL VALUE SSD */
83 { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
84
85 /* M-Systems Flash Disk Pioneers */
86 { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
87
65 /* Agfa Snapscan1212u */ 88 /* Agfa Snapscan1212u */
66 { USB_DEVICE(0x06bd, 0x2061), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, 89 { USB_DEVICE(0x06bd, 0x2061), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
90 /* Seagate RSS LLC */
91 { USB_DEVICE(0x0bc2, 0x3000), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
67 /* Umax [hex] Astra 3400U */ 92 /* Umax [hex] Astra 3400U */
68 { USB_DEVICE(0x1606, 0x0060), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, 93 { USB_DEVICE(0x1606, 0x0060), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
69 94
70 /* Philips PSC805 audio device */ 95 /* Philips PSC805 audio device */
71 { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME }, 96 { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME },
72 97
98 /* Alcor multi-card reader */
99 { USB_DEVICE(0x058f, 0x6366), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
100
101 /* Canon EOS 5D in PC Connection mode */
102 { USB_DEVICE(0x04a9, 0x3101), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
103
73 /* RIM Blackberry */ 104 /* RIM Blackberry */
74 { USB_DEVICE(0x0fca, 0x0001), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, 105 { USB_DEVICE(0x0fca, 0x0001), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
75 { USB_DEVICE(0x0fca, 0x0004), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, 106 { USB_DEVICE(0x0fca, 0x0004), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
76 { USB_DEVICE(0x0fca, 0x0006), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, 107 { USB_DEVICE(0x0fca, 0x0006), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
77 108
109 /* Apple iPhone */
110 { USB_DEVICE(0x05ac, 0x1290), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
111
112 /* SKYMEDI USB_DRIVE */
113 { USB_DEVICE(0x1516, 0x8628), .driver_info = USB_QUIRK_RESET_RESUME },
114
78 { } /* terminating entry must be last */ 115 { } /* terminating entry must be last */
79}; 116};
80 117
@@ -115,4 +152,10 @@ void usb_detect_quirks(struct usb_device *udev)
115 /* do any special quirk handling here if needed */ 152 /* do any special quirk handling here if needed */
116 if (udev->quirks & USB_QUIRK_NO_AUTOSUSPEND) 153 if (udev->quirks & USB_QUIRK_NO_AUTOSUSPEND)
117 usb_autosuspend_quirk(udev); 154 usb_autosuspend_quirk(udev);
155
156 /* By default, disable autosuspend for all non-hubs */
157#ifdef CONFIG_USB_SUSPEND
158 if (udev->descriptor.bDeviceClass != USB_CLASS_HUB)
159 udev->autosuspend_delay = -1;
160#endif
118} 161}
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index f2fbdc7fe3..d008d1360a 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -34,8 +34,6 @@
34 * bypassing some hardware (and driver) issues. UML could help too. 34 * bypassing some hardware (and driver) issues. UML could help too.
35 */ 35 */
36 36
37#define DEBUG
38
39#include <linux/module.h> 37#include <linux/module.h>
40#include <linux/kernel.h> 38#include <linux/kernel.h>
41#include <linux/delay.h> 39#include <linux/delay.h>
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index be7a1bd282..965ad7bec7 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -599,7 +599,6 @@ enum fsg_buffer_state {
599 599
600struct fsg_buffhd { 600struct fsg_buffhd {
601 void *buf; 601 void *buf;
602 dma_addr_t dma;
603 enum fsg_buffer_state state; 602 enum fsg_buffer_state state;
604 struct fsg_buffhd *next; 603 struct fsg_buffhd *next;
605 604
@@ -1295,6 +1294,7 @@ static int class_setup_req(struct fsg_dev *fsg,
1295 struct usb_request *req = fsg->ep0req; 1294 struct usb_request *req = fsg->ep0req;
1296 int value = -EOPNOTSUPP; 1295 int value = -EOPNOTSUPP;
1297 u16 w_index = le16_to_cpu(ctrl->wIndex); 1296 u16 w_index = le16_to_cpu(ctrl->wIndex);
1297 u16 w_value = le16_to_cpu(ctrl->wValue);
1298 u16 w_length = le16_to_cpu(ctrl->wLength); 1298 u16 w_length = le16_to_cpu(ctrl->wLength);
1299 1299
1300 if (!fsg->config) 1300 if (!fsg->config)
@@ -1308,7 +1308,7 @@ static int class_setup_req(struct fsg_dev *fsg,
1308 if (ctrl->bRequestType != (USB_DIR_OUT | 1308 if (ctrl->bRequestType != (USB_DIR_OUT |
1309 USB_TYPE_CLASS | USB_RECIP_INTERFACE)) 1309 USB_TYPE_CLASS | USB_RECIP_INTERFACE))
1310 break; 1310 break;
1311 if (w_index != 0) { 1311 if (w_index != 0 || w_value != 0) {
1312 value = -EDOM; 1312 value = -EDOM;
1313 break; 1313 break;
1314 } 1314 }
@@ -1324,7 +1324,7 @@ static int class_setup_req(struct fsg_dev *fsg,
1324 if (ctrl->bRequestType != (USB_DIR_IN | 1324 if (ctrl->bRequestType != (USB_DIR_IN |
1325 USB_TYPE_CLASS | USB_RECIP_INTERFACE)) 1325 USB_TYPE_CLASS | USB_RECIP_INTERFACE))
1326 break; 1326 break;
1327 if (w_index != 0) { 1327 if (w_index != 0 || w_value != 0) {
1328 value = -EDOM; 1328 value = -EDOM;
1329 break; 1329 break;
1330 } 1330 }
@@ -1343,7 +1343,7 @@ static int class_setup_req(struct fsg_dev *fsg,
1343 if (ctrl->bRequestType != (USB_DIR_OUT | 1343 if (ctrl->bRequestType != (USB_DIR_OUT |
1344 USB_TYPE_CLASS | USB_RECIP_INTERFACE)) 1344 USB_TYPE_CLASS | USB_RECIP_INTERFACE))
1345 break; 1345 break;
1346 if (w_index != 0) { 1346 if (w_index != 0 || w_value != 0) {
1347 value = -EDOM; 1347 value = -EDOM;
1348 break; 1348 break;
1349 } 1349 }
@@ -2611,7 +2611,6 @@ static int send_status(struct fsg_dev *fsg)
2611 2611
2612 fsg->intr_buffhd = bh; // Point to the right buffhd 2612 fsg->intr_buffhd = bh; // Point to the right buffhd
2613 fsg->intreq->buf = bh->inreq->buf; 2613 fsg->intreq->buf = bh->inreq->buf;
2614 fsg->intreq->dma = bh->inreq->dma;
2615 fsg->intreq->context = bh; 2614 fsg->intreq->context = bh;
2616 start_transfer(fsg, fsg->intr_in, fsg->intreq, 2615 start_transfer(fsg, fsg->intr_in, fsg->intreq,
2617 &fsg->intreq_busy, &bh->state); 2616 &fsg->intreq_busy, &bh->state);
@@ -3200,7 +3199,6 @@ reset:
3200 if ((rc = alloc_request(fsg, fsg->bulk_out, &bh->outreq)) != 0) 3199 if ((rc = alloc_request(fsg, fsg->bulk_out, &bh->outreq)) != 0)
3201 goto reset; 3200 goto reset;
3202 bh->inreq->buf = bh->outreq->buf = bh->buf; 3201 bh->inreq->buf = bh->outreq->buf = bh->buf;
3203 bh->inreq->dma = bh->outreq->dma = bh->dma;
3204 bh->inreq->context = bh->outreq->context = bh; 3202 bh->inreq->context = bh->outreq->context = bh;
3205 bh->inreq->complete = bulk_in_complete; 3203 bh->inreq->complete = bulk_in_complete;
3206 bh->outreq->complete = bulk_out_complete; 3204 bh->outreq->complete = bulk_out_complete;
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c
index 10b2b33b86..d57bcfbc08 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.c
+++ b/drivers/usb/gadget/fsl_usb2_udc.c
@@ -1277,31 +1277,32 @@ static void setup_received_irq(struct fsl_udc *udc,
1277 1277
1278 udc_reset_ep_queue(udc, 0); 1278 udc_reset_ep_queue(udc, 0);
1279 1279
1280 /* We process some stardard setup requests here */
1280 switch (setup->bRequest) { 1281 switch (setup->bRequest) {
1281 /* Request that need Data+Status phase from udc */
1282 case USB_REQ_GET_STATUS: 1282 case USB_REQ_GET_STATUS:
1283 if ((setup->bRequestType & (USB_DIR_IN | USB_TYPE_STANDARD)) 1283 /* Data+Status phase from udc */
1284 if ((setup->bRequestType & (USB_DIR_IN | USB_TYPE_MASK))
1284 != (USB_DIR_IN | USB_TYPE_STANDARD)) 1285 != (USB_DIR_IN | USB_TYPE_STANDARD))
1285 break; 1286 break;
1286 ch9getstatus(udc, setup->bRequestType, wValue, wIndex, wLength); 1287 ch9getstatus(udc, setup->bRequestType, wValue, wIndex, wLength);
1287 break; 1288 return;
1288 1289
1289 /* Requests that need Status phase from udc */
1290 case USB_REQ_SET_ADDRESS: 1290 case USB_REQ_SET_ADDRESS:
1291 /* Status phase from udc */
1291 if (setup->bRequestType != (USB_DIR_OUT | USB_TYPE_STANDARD 1292 if (setup->bRequestType != (USB_DIR_OUT | USB_TYPE_STANDARD
1292 | USB_RECIP_DEVICE)) 1293 | USB_RECIP_DEVICE))
1293 break; 1294 break;
1294 ch9setaddress(udc, wValue, wIndex, wLength); 1295 ch9setaddress(udc, wValue, wIndex, wLength);
1295 break; 1296 return;
1296 1297
1297 /* Handled by udc, no data, status by udc */
1298 case USB_REQ_CLEAR_FEATURE: 1298 case USB_REQ_CLEAR_FEATURE:
1299 case USB_REQ_SET_FEATURE: 1299 case USB_REQ_SET_FEATURE:
1300 { /* status transaction */ 1300 /* Status phase from udc */
1301 {
1301 int rc = -EOPNOTSUPP; 1302 int rc = -EOPNOTSUPP;
1302 1303
1303 if ((setup->bRequestType & USB_RECIP_MASK) 1304 if ((setup->bRequestType & (USB_RECIP_MASK | USB_TYPE_MASK))
1304 == USB_RECIP_ENDPOINT) { 1305 == (USB_RECIP_ENDPOINT | USB_TYPE_STANDARD)) {
1305 int pipe = get_pipe_by_windex(wIndex); 1306 int pipe = get_pipe_by_windex(wIndex);
1306 struct fsl_ep *ep; 1307 struct fsl_ep *ep;
1307 1308
@@ -1315,8 +1316,9 @@ static void setup_received_irq(struct fsl_udc *udc,
1315 ? 1 : 0); 1316 ? 1 : 0);
1316 spin_lock(&udc->lock); 1317 spin_lock(&udc->lock);
1317 1318
1318 } else if ((setup->bRequestType & USB_RECIP_MASK) 1319 } else if ((setup->bRequestType & (USB_RECIP_MASK
1319 == USB_RECIP_DEVICE) { 1320 | USB_TYPE_MASK)) == (USB_RECIP_DEVICE
1321 | USB_TYPE_STANDARD)) {
1320 /* Note: The driver has not include OTG support yet. 1322 /* Note: The driver has not include OTG support yet.
1321 * This will be set when OTG support is added */ 1323 * This will be set when OTG support is added */
1322 if (!udc->gadget.is_otg) 1324 if (!udc->gadget.is_otg)
@@ -1329,39 +1331,42 @@ static void setup_received_irq(struct fsl_udc *udc,
1329 USB_DEVICE_A_ALT_HNP_SUPPORT) 1331 USB_DEVICE_A_ALT_HNP_SUPPORT)
1330 udc->gadget.a_alt_hnp_support = 1; 1332 udc->gadget.a_alt_hnp_support = 1;
1331 rc = 0; 1333 rc = 0;
1332 } 1334 } else
1335 break;
1336
1333 if (rc == 0) { 1337 if (rc == 0) {
1334 if (ep0_prime_status(udc, EP_DIR_IN)) 1338 if (ep0_prime_status(udc, EP_DIR_IN))
1335 ep0stall(udc); 1339 ep0stall(udc);
1336 } 1340 }
1337 break; 1341 return;
1338 } 1342 }
1339 /* Requests handled by gadget */
1340 default:
1341 if (wLength) {
1342 /* Data phase from gadget, status phase from udc */
1343 udc->ep0_dir = (setup->bRequestType & USB_DIR_IN)
1344 ? USB_DIR_IN : USB_DIR_OUT;
1345 spin_unlock(&udc->lock);
1346 if (udc->driver->setup(&udc->gadget,
1347 &udc->local_setup_buff) < 0)
1348 ep0stall(udc);
1349 spin_lock(&udc->lock);
1350 udc->ep0_state = (setup->bRequestType & USB_DIR_IN)
1351 ? DATA_STATE_XMIT : DATA_STATE_RECV;
1352 1343
1353 } else { 1344 default:
1354 /* No data phase, IN status from gadget */
1355 udc->ep0_dir = USB_DIR_IN;
1356 spin_unlock(&udc->lock);
1357 if (udc->driver->setup(&udc->gadget,
1358 &udc->local_setup_buff) < 0)
1359 ep0stall(udc);
1360 spin_lock(&udc->lock);
1361 udc->ep0_state = WAIT_FOR_OUT_STATUS;
1362 }
1363 break; 1345 break;
1364 } 1346 }
1347
1348 /* Requests handled by gadget */
1349 if (wLength) {
1350 /* Data phase from gadget, status phase from udc */
1351 udc->ep0_dir = (setup->bRequestType & USB_DIR_IN)
1352 ? USB_DIR_IN : USB_DIR_OUT;
1353 spin_unlock(&udc->lock);
1354 if (udc->driver->setup(&udc->gadget,
1355 &udc->local_setup_buff) < 0)
1356 ep0stall(udc);
1357 spin_lock(&udc->lock);
1358 udc->ep0_state = (setup->bRequestType & USB_DIR_IN)
1359 ? DATA_STATE_XMIT : DATA_STATE_RECV;
1360 } else {
1361 /* No data phase, IN status from gadget */
1362 udc->ep0_dir = USB_DIR_IN;
1363 spin_unlock(&udc->lock);
1364 if (udc->driver->setup(&udc->gadget,
1365 &udc->local_setup_buff) < 0)
1366 ep0stall(udc);
1367 spin_lock(&udc->lock);
1368 udc->ep0_state = WAIT_FOR_OUT_STATUS;
1369 }
1365} 1370}
1366 1371
1367/* Process request for Data or Status phase of ep0 1372/* Process request for Data or Status phase of ep0
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
index 72b4ebbf13..1407ad1c81 100644
--- a/drivers/usb/gadget/pxa2xx_udc.c
+++ b/drivers/usb/gadget/pxa2xx_udc.c
@@ -967,7 +967,7 @@ static int pxa2xx_udc_pullup(struct usb_gadget *_gadget, int is_active)
967 udc = container_of(_gadget, struct pxa2xx_udc, gadget); 967 udc = container_of(_gadget, struct pxa2xx_udc, gadget);
968 968
969 /* not all boards support pullup control */ 969 /* not all boards support pullup control */
970 if (!udc->mach->udc_command) 970 if (!udc->mach->gpio_pullup && !udc->mach->udc_command)
971 return -EOPNOTSUPP; 971 return -EOPNOTSUPP;
972 972
973 is_active = (is_active != 0); 973 is_active = (is_active != 0);
@@ -2309,7 +2309,7 @@ static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state)
2309{ 2309{
2310 struct pxa2xx_udc *udc = platform_get_drvdata(dev); 2310 struct pxa2xx_udc *udc = platform_get_drvdata(dev);
2311 2311
2312 if (!udc->mach->udc_command) 2312 if (!udc->mach->gpio_pullup && !udc->mach->udc_command)
2313 WARN("USB host won't detect disconnect!\n"); 2313 WARN("USB host won't detect disconnect!\n");
2314 pullup(udc, 0); 2314 pullup(udc, 0);
2315 2315
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index 9cd98e73dc..ce4d2e0963 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -1691,14 +1691,12 @@ static int gs_setup_class(struct usb_gadget *gadget,
1691 1691
1692 switch (ctrl->bRequest) { 1692 switch (ctrl->bRequest) {
1693 case USB_CDC_REQ_SET_LINE_CODING: 1693 case USB_CDC_REQ_SET_LINE_CODING:
1694 ret = min(wLength, 1694 /* FIXME Submit req to read the data; have its completion
1695 (u16)sizeof(struct usb_cdc_line_coding)); 1695 * handler copy that data to port->port_line_coding (iff
1696 if (port) { 1696 * it's valid) and maybe pass it on. Until then, fail.
1697 spin_lock(&port->port_lock); 1697 */
1698 memcpy(&port->port_line_coding, req->buf, ret); 1698 printk(KERN_WARNING "gs_setup: set_line_coding "
1699 spin_unlock(&port->port_lock); 1699 "unuspported\n");
1700 }
1701 ret = 0;
1702 break; 1700 break;
1703 1701
1704 case USB_CDC_REQ_GET_LINE_CODING: 1702 case USB_CDC_REQ_GET_LINE_CODING:
@@ -1713,11 +1711,18 @@ static int gs_setup_class(struct usb_gadget *gadget,
1713 break; 1711 break;
1714 1712
1715 case USB_CDC_REQ_SET_CONTROL_LINE_STATE: 1713 case USB_CDC_REQ_SET_CONTROL_LINE_STATE:
1716 ret = 0; 1714 /* FIXME Submit req to read the data; have its completion
1715 * handler use that to set the state (iff it's valid) and
1716 * maybe pass it on. Until then, fail.
1717 */
1718 printk(KERN_WARNING "gs_setup: set_control_line_state "
1719 "unuspported\n");
1717 break; 1720 break;
1718 1721
1719 default: 1722 default:
1720 printk(KERN_ERR "gs_setup: unknown class request, type=%02x, request=%02x, value=%04x, index=%04x, length=%d\n", 1723 printk(KERN_ERR "gs_setup: unknown class request, "
1724 "type=%02x, request=%02x, value=%04x, "
1725 "index=%04x, length=%d\n",
1721 ctrl->bRequestType, ctrl->bRequest, 1726 ctrl->bRequestType, ctrl->bRequest,
1722 wValue, wIndex, wLength); 1727 wValue, wIndex, wLength);
1723 break; 1728 break;
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 2f529828c7..565d6ef4c4 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -237,7 +237,7 @@ config USB_SL811_CS
237 module will be called "sl811_cs". 237 module will be called "sl811_cs".
238 238
239config USB_R8A66597_HCD 239config USB_R8A66597_HCD
240 tristate "R8A66597 HCD suppoort" 240 tristate "R8A66597 HCD support"
241 depends on USB 241 depends on USB
242 help 242 help
243 The R8A66597 is a USB 2.0 host and peripheral controller. 243 The R8A66597 is a USB 2.0 host and peripheral controller.
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c
index 5d1b12aad7..b1d19268cb 100644
--- a/drivers/usb/host/ehci-au1xxx.c
+++ b/drivers/usb/host/ehci-au1xxx.c
@@ -1,8 +1,6 @@
1/* 1/*
2 * EHCI HCD (Host Controller Driver) for USB. 2 * EHCI HCD (Host Controller Driver) for USB.
3 * 3 *
4 * (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net>
5 *
6 * Bus Glue for AMD Alchemy Au1xxx 4 * Bus Glue for AMD Alchemy Au1xxx
7 * 5 *
8 * Based on "ohci-au1xxx.c" by Matt Porter <mporter@kernel.crashing.org> 6 * Based on "ohci-au1xxx.c" by Matt Porter <mporter@kernel.crashing.org>
@@ -196,6 +194,9 @@ static const struct hc_driver ehci_au1xxx_hc_driver = {
196 194
197 /* 195 /*
198 * basic lifecycle operations 196 * basic lifecycle operations
197 *
198 * FIXME -- ehci_init() doesn't do enough here.
199 * See ehci-ppc-soc for a complete implementation.
199 */ 200 */
200 .reset = ehci_init, 201 .reset = ehci_init,
201 .start = ehci_run, 202 .start = ehci_run,
diff --git a/drivers/usb/host/ehci-ppc-soc.c b/drivers/usb/host/ehci-ppc-soc.c
index c2cedb09ed..4f99b0eb27 100644
--- a/drivers/usb/host/ehci-ppc-soc.c
+++ b/drivers/usb/host/ehci-ppc-soc.c
@@ -6,7 +6,7 @@
6 * Bus Glue for PPC On-Chip EHCI driver 6 * Bus Glue for PPC On-Chip EHCI driver
7 * Tested on AMCC 440EPx 7 * Tested on AMCC 440EPx
8 * 8 *
9 * Based on "ehci-au12xx.c" by David Brownell <dbrownell@users.sourceforge.net> 9 * Based on "ehci-au1xxx.c" by K.Boge <karsten.boge@amd.com>
10 * 10 *
11 * This file is licenced under the GPL. 11 * This file is licenced under the GPL.
12 */ 12 */
@@ -15,6 +15,24 @@
15 15
16extern int usb_disabled(void); 16extern int usb_disabled(void);
17 17
18/* called during probe() after chip reset completes */
19static int ehci_ppc_soc_setup(struct usb_hcd *hcd)
20{
21 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
22 int retval;
23
24 retval = ehci_halt(ehci);
25 if (retval)
26 return retval;
27
28 retval = ehci_init(hcd);
29 if (retval)
30 return retval;
31
32 ehci->sbrn = 0x20;
33 return ehci_reset(ehci);
34}
35
18/** 36/**
19 * usb_ehci_ppc_soc_probe - initialize PPC-SoC-based HCDs 37 * usb_ehci_ppc_soc_probe - initialize PPC-SoC-based HCDs
20 * Context: !in_interrupt() 38 * Context: !in_interrupt()
@@ -120,7 +138,7 @@ static const struct hc_driver ehci_ppc_soc_hc_driver = {
120 /* 138 /*
121 * basic lifecycle operations 139 * basic lifecycle operations
122 */ 140 */
123 .reset = ehci_init, 141 .reset = ehci_ppc_soc_setup,
124 .start = ehci_run, 142 .start = ehci_run,
125 .stop = ehci_stop, 143 .stop = ehci_stop,
126 .shutdown = ehci_shutdown, 144 .shutdown = ehci_shutdown,
diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c
index 6f9e43e9a6..f61c6cdd06 100644
--- a/drivers/usb/host/ohci-dbg.c
+++ b/drivers/usb/host/ohci-dbg.c
@@ -74,7 +74,7 @@ urb_print (struct urb * urb, char * str, int small)
74 74
75#define ohci_dbg_sw(ohci, next, size, format, arg...) \ 75#define ohci_dbg_sw(ohci, next, size, format, arg...) \
76 do { \ 76 do { \
77 if (next) { \ 77 if (next != NULL) { \
78 unsigned s_len; \ 78 unsigned s_len; \
79 s_len = scnprintf (*next, *size, format, ## arg ); \ 79 s_len = scnprintf (*next, *size, format, ## arg ); \
80 *size -= s_len; *next += s_len; \ 80 *size -= s_len; *next += s_len; \
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index d60f198532..40a1de4c25 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -2208,8 +2208,6 @@ static int __init r8a66597_probe(struct platform_device *pdev)
2208clean_up: 2208clean_up:
2209 if (reg) 2209 if (reg)
2210 iounmap(reg); 2210 iounmap(reg);
2211 if (res)
2212 release_mem_region(res->start, 1);
2213 2211
2214 return ret; 2212 return ret;
2215} 2213}
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
index 7f765ec038..b88eb3c62c 100644
--- a/drivers/usb/host/u132-hcd.c
+++ b/drivers/usb/host/u132-hcd.c
@@ -1520,12 +1520,15 @@ static void u132_hcd_endp_work_scheduler(struct work_struct *work)
1520 } 1520 }
1521 } 1521 }
1522} 1522}
1523#ifdef CONFIG_PM
1523 1524
1524static void port_power(struct u132 *u132, int pn, int is_on) 1525static void port_power(struct u132 *u132, int pn, int is_on)
1525{ 1526{
1526 u132->port[pn].power = is_on; 1527 u132->port[pn].power = is_on;
1527} 1528}
1528 1529
1530#endif
1531
1529static void u132_power(struct u132 *u132, int is_on) 1532static void u132_power(struct u132 *u132, int is_on)
1530{ 1533{
1531 struct usb_hcd *hcd = u132_to_hcd(u132) 1534 struct usb_hcd *hcd = u132_to_hcd(u132)
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index 9f37ba44c1..b64ca91d9b 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -3404,6 +3404,7 @@ static void sisusb_disconnect(struct usb_interface *intf)
3404} 3404}
3405 3405
3406static struct usb_device_id sisusb_table [] = { 3406static struct usb_device_id sisusb_table [] = {
3407 { USB_DEVICE(0x0711, 0x0550) },
3407 { USB_DEVICE(0x0711, 0x0900) }, 3408 { USB_DEVICE(0x0711, 0x0900) },
3408 { USB_DEVICE(0x0711, 0x0901) }, 3409 { USB_DEVICE(0x0711, 0x0901) },
3409 { USB_DEVICE(0x0711, 0x0902) }, 3410 { USB_DEVICE(0x0711, 0x0902) },
diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c
index cff6fd190a..77bb893bf2 100644
--- a/drivers/usb/serial/airprime.c
+++ b/drivers/usb/serial/airprime.c
@@ -18,7 +18,6 @@
18 18
19static struct usb_device_id id_table [] = { 19static struct usb_device_id id_table [] = {
20 { USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */ 20 { USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */
21 { USB_DEVICE(0x413c, 0x8115) }, /* Dell Wireless HSDPA 5500 */
22 { }, 21 { },
23}; 22};
24MODULE_DEVICE_TABLE(usb, id_table); 23MODULE_DEVICE_TABLE(usb, id_table);
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
index e67ce25f75..86724e8857 100644
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
@@ -383,6 +383,10 @@ static void belkin_sa_set_termios (struct usb_serial_port *port, struct ktermios
383 } 383 }
384 384
385 baud = tty_get_baud_rate(port->tty); 385 baud = tty_get_baud_rate(port->tty);
386 if (baud == 0) {
387 dbg("%s - tty_get_baud_rate says 0 baud", __FUNCTION__);
388 return;
389 }
386 urb_value = BELKIN_SA_BAUD(baud); 390 urb_value = BELKIN_SA_BAUD(baud);
387 /* Clip to maximum speed */ 391 /* Clip to maximum speed */
388 if (urb_value == 0) 392 if (urb_value == 0)
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c
index c08a38402b..a47a24f882 100644
--- a/drivers/usb/serial/bus.c
+++ b/drivers/usb/serial/bus.c
@@ -138,7 +138,7 @@ static void free_dynids(struct usb_serial_driver *drv)
138static struct driver_attribute drv_attrs[] = { 138static struct driver_attribute drv_attrs[] = {
139 __ATTR_NULL, 139 __ATTR_NULL,
140}; 140};
141static inline void free_dynids(struct usb_driver *drv) 141static inline void free_dynids(struct usb_serial_driver *drv)
142{ 142{
143} 143}
144#endif 144#endif
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 7b1673a440..2d045857b1 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -538,6 +538,8 @@ static struct usb_device_id id_table_combined [] = {
538 { USB_DEVICE(FTDI_VID, FTDI_TERATRONIK_VCP_PID) }, 538 { USB_DEVICE(FTDI_VID, FTDI_TERATRONIK_VCP_PID) },
539 { USB_DEVICE(FTDI_VID, FTDI_TERATRONIK_D2XX_PID) }, 539 { USB_DEVICE(FTDI_VID, FTDI_TERATRONIK_D2XX_PID) },
540 { USB_DEVICE(EVOLUTION_VID, EVOLUTION_ER1_PID) }, 540 { USB_DEVICE(EVOLUTION_VID, EVOLUTION_ER1_PID) },
541 { USB_DEVICE(EVOLUTION_VID, EVO_HYBRID_PID) },
542 { USB_DEVICE(EVOLUTION_VID, EVO_RCM4_PID) },
541 { USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) }, 543 { USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) },
542 { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) }, 544 { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) },
543 { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16C_PID) }, 545 { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16C_PID) },
@@ -566,6 +568,7 @@ static struct usb_device_id id_table_combined [] = {
566 { USB_DEVICE(ELEKTOR_VID, ELEKTOR_FT323R_PID) }, 568 { USB_DEVICE(ELEKTOR_VID, ELEKTOR_FT323R_PID) },
567 { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, 569 { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) },
568 { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, 570 { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) },
571 { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) },
569 { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID), 572 { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID),
570 .driver_info = (kernel_ulong_t)&ftdi_olimex_quirk }, 573 .driver_info = (kernel_ulong_t)&ftdi_olimex_quirk },
571 { }, /* Optional parameter entry */ 574 { }, /* Optional parameter entry */
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
index d9e49716db..b57b90ae9f 100644
--- a/drivers/usb/serial/ftdi_sio.h
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -430,6 +430,9 @@
430 */ 430 */
431#define EVOLUTION_VID 0xDEEE /* Vendor ID */ 431#define EVOLUTION_VID 0xDEEE /* Vendor ID */
432#define EVOLUTION_ER1_PID 0x0300 /* ER1 Control Module */ 432#define EVOLUTION_ER1_PID 0x0300 /* ER1 Control Module */
433#define EVO_8U232AM_PID 0x02FF /* Evolution robotics RCM2 (FT232AM)*/
434#define EVO_HYBRID_PID 0x0302 /* Evolution robotics RCM4 PID (FT232BM)*/
435#define EVO_RCM4_PID 0x0303 /* Evolution robotics RCM4 PID */
433 436
434/* Pyramid Computer GmbH */ 437/* Pyramid Computer GmbH */
435#define FTDI_PYRAMID_PID 0xE6C8 /* Pyramid Appliance Display */ 438#define FTDI_PYRAMID_PID 0xE6C8 /* Pyramid Appliance Display */
@@ -531,6 +534,14 @@
531#define OLIMEX_VID 0x15BA 534#define OLIMEX_VID 0x15BA
532#define OLIMEX_ARM_USB_OCD_PID 0x0003 535#define OLIMEX_ARM_USB_OCD_PID 0x0003
533 536
537
538/*
539 * The Mobility Lab (TML)
540 * Submitted by Pierre Castella
541 */
542#define TML_VID 0x1B91 /* Vendor ID */
543#define TML_USB_SERIAL_PID 0x0064 /* USB - Serial Converter */
544
534/* Commands */ 545/* Commands */
535#define FTDI_SIO_RESET 0 /* Reset the port */ 546#define FTDI_SIO_RESET 0 /* Reset the port */
536#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ 547#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index 04bd3b7a29..f1c90cfe72 100644
--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Garmin GPS driver 2 * Garmin GPS driver
3 * 3 *
4 * Copyright (C) 2006 Hermann Kneissel herkne@users.sourceforge.net 4 * Copyright (C) 2006,2007 Hermann Kneissel herkne@users.sourceforge.net
5 * 5 *
6 * The latest version of the driver can be found at 6 * The latest version of the driver can be found at
7 * http://sourceforge.net/projects/garmin-gps/ 7 * http://sourceforge.net/projects/garmin-gps/
@@ -34,6 +34,7 @@
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/spinlock.h> 35#include <linux/spinlock.h>
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37#include <asm/atomic.h>
37#include <linux/usb.h> 38#include <linux/usb.h>
38#include <linux/usb/serial.h> 39#include <linux/usb/serial.h>
39 40
@@ -52,7 +53,7 @@ static int debug = 0;
52 */ 53 */
53 54
54#define VERSION_MAJOR 0 55#define VERSION_MAJOR 0
55#define VERSION_MINOR 28 56#define VERSION_MINOR 31
56 57
57#define _STR(s) #s 58#define _STR(s) #s
58#define _DRIVER_VERSION(a,b) "v" _STR(a) "." _STR(b) 59#define _DRIVER_VERSION(a,b) "v" _STR(a) "." _STR(b)
@@ -141,6 +142,8 @@ struct garmin_data {
141 __u8 inbuffer [GPS_IN_BUFSIZ]; /* tty -> usb */ 142 __u8 inbuffer [GPS_IN_BUFSIZ]; /* tty -> usb */
142 __u8 outbuffer[GPS_OUT_BUFSIZ]; /* usb -> tty */ 143 __u8 outbuffer[GPS_OUT_BUFSIZ]; /* usb -> tty */
143 __u8 privpkt[4*6]; 144 __u8 privpkt[4*6];
145 atomic_t req_count;
146 atomic_t resp_count;
144 spinlock_t lock; 147 spinlock_t lock;
145 struct list_head pktlist; 148 struct list_head pktlist;
146}; 149};
@@ -171,8 +174,6 @@ struct garmin_data {
171#define CLEAR_HALT_REQUIRED 0x0001 174#define CLEAR_HALT_REQUIRED 0x0001
172 175
173#define FLAGS_QUEUING 0x0100 176#define FLAGS_QUEUING 0x0100
174#define FLAGS_APP_RESP_SEEN 0x0200
175#define FLAGS_APP_REQ_SEEN 0x0400
176#define FLAGS_DROP_DATA 0x0800 177#define FLAGS_DROP_DATA 0x0800
177 178
178#define FLAGS_GSP_SKIP 0x1000 179#define FLAGS_GSP_SKIP 0x1000
@@ -186,7 +187,8 @@ struct garmin_data {
186/* function prototypes */ 187/* function prototypes */
187static void gsp_next_packet(struct garmin_data * garmin_data_p); 188static void gsp_next_packet(struct garmin_data * garmin_data_p);
188static int garmin_write_bulk(struct usb_serial_port *port, 189static int garmin_write_bulk(struct usb_serial_port *port,
189 const unsigned char *buf, int count); 190 const unsigned char *buf, int count,
191 int dismiss_ack);
190 192
191/* some special packets to be send or received */ 193/* some special packets to be send or received */
192static unsigned char const GARMIN_START_SESSION_REQ[] 194static unsigned char const GARMIN_START_SESSION_REQ[]
@@ -233,9 +235,7 @@ static struct usb_driver garmin_driver = {
233 235
234static inline int noResponseFromAppLayer(struct garmin_data * garmin_data_p) 236static inline int noResponseFromAppLayer(struct garmin_data * garmin_data_p)
235{ 237{
236 return ((garmin_data_p->flags 238 return atomic_read(&garmin_data_p->req_count) == atomic_read(&garmin_data_p->resp_count);
237 & (FLAGS_APP_REQ_SEEN|FLAGS_APP_RESP_SEEN))
238 == FLAGS_APP_REQ_SEEN);
239} 239}
240 240
241 241
@@ -463,7 +463,7 @@ static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
463 usbdata[2] = __cpu_to_le32(size); 463 usbdata[2] = __cpu_to_le32(size);
464 464
465 garmin_write_bulk (garmin_data_p->port, garmin_data_p->inbuffer, 465 garmin_write_bulk (garmin_data_p->port, garmin_data_p->inbuffer,
466 GARMIN_PKTHDR_LENGTH+size); 466 GARMIN_PKTHDR_LENGTH+size, 0);
467 467
468 /* if this was an abort-transfer command, flush all 468 /* if this was an abort-transfer command, flush all
469 queued data. */ 469 queued data. */
@@ -818,7 +818,7 @@ static int nat_receive(struct garmin_data * garmin_data_p,
818 if (garmin_data_p->insize >= len) { 818 if (garmin_data_p->insize >= len) {
819 garmin_write_bulk (garmin_data_p->port, 819 garmin_write_bulk (garmin_data_p->port,
820 garmin_data_p->inbuffer, 820 garmin_data_p->inbuffer,
821 len); 821 len, 0);
822 garmin_data_p->insize = 0; 822 garmin_data_p->insize = 0;
823 823
824 /* if this was an abort-transfer command, 824 /* if this was an abort-transfer command,
@@ -893,10 +893,11 @@ static int garmin_clear(struct garmin_data * garmin_data_p)
893 893
894 struct usb_serial_port *port = garmin_data_p->port; 894 struct usb_serial_port *port = garmin_data_p->port;
895 895
896 if (port != NULL && garmin_data_p->flags & FLAGS_APP_RESP_SEEN) { 896 if (port != NULL && atomic_read(&garmin_data_p->resp_count)) {
897 /* send a terminate command */ 897 /* send a terminate command */
898 status = garmin_write_bulk(port, GARMIN_STOP_TRANSFER_REQ, 898 status = garmin_write_bulk(port, GARMIN_STOP_TRANSFER_REQ,
899 sizeof(GARMIN_STOP_TRANSFER_REQ)); 899 sizeof(GARMIN_STOP_TRANSFER_REQ),
900 1);
900 } 901 }
901 902
902 /* flush all queued data */ 903 /* flush all queued data */
@@ -939,7 +940,8 @@ static int garmin_init_session(struct usb_serial_port *port)
939 dbg("%s - starting session ...", __FUNCTION__); 940 dbg("%s - starting session ...", __FUNCTION__);
940 garmin_data_p->state = STATE_ACTIVE; 941 garmin_data_p->state = STATE_ACTIVE;
941 status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ, 942 status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ,
942 sizeof(GARMIN_START_SESSION_REQ)); 943 sizeof(GARMIN_START_SESSION_REQ),
944 0);
943 945
944 if (status >= 0) { 946 if (status >= 0) {
945 947
@@ -950,7 +952,8 @@ static int garmin_init_session(struct usb_serial_port *port)
950 /* not needed, but the win32 driver does it too ... */ 952 /* not needed, but the win32 driver does it too ... */
951 status = garmin_write_bulk(port, 953 status = garmin_write_bulk(port,
952 GARMIN_START_SESSION_REQ2, 954 GARMIN_START_SESSION_REQ2,
953 sizeof(GARMIN_START_SESSION_REQ2)); 955 sizeof(GARMIN_START_SESSION_REQ2),
956 0);
954 if (status >= 0) { 957 if (status >= 0) {
955 status = 0; 958 status = 0;
956 spin_lock_irqsave(&garmin_data_p->lock, flags); 959 spin_lock_irqsave(&garmin_data_p->lock, flags);
@@ -987,6 +990,8 @@ static int garmin_open (struct usb_serial_port *port, struct file *filp)
987 garmin_data_p->mode = initial_mode; 990 garmin_data_p->mode = initial_mode;
988 garmin_data_p->count = 0; 991 garmin_data_p->count = 0;
989 garmin_data_p->flags = 0; 992 garmin_data_p->flags = 0;
993 atomic_set(&garmin_data_p->req_count, 0);
994 atomic_set(&garmin_data_p->resp_count, 0);
990 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 995 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
991 996
992 /* shutdown any bulk reads that might be going on */ 997 /* shutdown any bulk reads that might be going on */
@@ -1035,28 +1040,39 @@ static void garmin_write_bulk_callback (struct urb *urb)
1035{ 1040{
1036 unsigned long flags; 1041 unsigned long flags;
1037 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1042 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
1038 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1039 int status = urb->status; 1043 int status = urb->status;
1040 1044
1041 /* free up the transfer buffer, as usb_free_urb() does not do this */ 1045 if (port) {
1042 kfree (urb->transfer_buffer); 1046 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1043 1047
1044 dbg("%s - port %d", __FUNCTION__, port->number); 1048 dbg("%s - port %d", __FUNCTION__, port->number);
1045 1049
1046 if (status) { 1050 if (GARMIN_LAYERID_APPL == getLayerId(urb->transfer_buffer)
1047 dbg("%s - nonzero write bulk status received: %d", 1051 && (garmin_data_p->mode == MODE_GARMIN_SERIAL)) {
1048 __FUNCTION__, status); 1052 gsp_send_ack(garmin_data_p, ((__u8 *)urb->transfer_buffer)[4]);
1049 spin_lock_irqsave(&garmin_data_p->lock, flags); 1053 }
1050 garmin_data_p->flags |= CLEAR_HALT_REQUIRED; 1054
1051 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 1055 if (status) {
1056 dbg("%s - nonzero write bulk status received: %d",
1057 __FUNCTION__, urb->status);
1058 spin_lock_irqsave(&garmin_data_p->lock, flags);
1059 garmin_data_p->flags |= CLEAR_HALT_REQUIRED;
1060 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
1061 }
1062
1063 usb_serial_port_softint(port);
1052 } 1064 }
1053 1065
1054 usb_serial_port_softint(port); 1066 /* Ignore errors that resulted from garmin_write_bulk with dismiss_ack=1 */
1067
1068 /* free up the transfer buffer, as usb_free_urb() does not do this */
1069 kfree (urb->transfer_buffer);
1055} 1070}
1056 1071
1057 1072
1058static int garmin_write_bulk (struct usb_serial_port *port, 1073static int garmin_write_bulk (struct usb_serial_port *port,
1059 const unsigned char *buf, int count) 1074 const unsigned char *buf, int count,
1075 int dismiss_ack)
1060{ 1076{
1061 unsigned long flags; 1077 unsigned long flags;
1062 struct usb_serial *serial = port->serial; 1078 struct usb_serial *serial = port->serial;
@@ -1093,13 +1109,12 @@ static int garmin_write_bulk (struct usb_serial_port *port,
1093 usb_sndbulkpipe (serial->dev, 1109 usb_sndbulkpipe (serial->dev,
1094 port->bulk_out_endpointAddress), 1110 port->bulk_out_endpointAddress),
1095 buffer, count, 1111 buffer, count,
1096 garmin_write_bulk_callback, port); 1112 garmin_write_bulk_callback,
1113 dismiss_ack ? NULL : port);
1097 urb->transfer_flags |= URB_ZERO_PACKET; 1114 urb->transfer_flags |= URB_ZERO_PACKET;
1098 1115
1099 if (GARMIN_LAYERID_APPL == getLayerId(buffer)) { 1116 if (GARMIN_LAYERID_APPL == getLayerId(buffer)) {
1100 spin_lock_irqsave(&garmin_data_p->lock, flags); 1117 atomic_inc(&garmin_data_p->req_count);
1101 garmin_data_p->flags |= FLAGS_APP_REQ_SEEN;
1102 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
1103 if (garmin_data_p->mode == MODE_GARMIN_SERIAL) { 1118 if (garmin_data_p->mode == MODE_GARMIN_SERIAL) {
1104 pkt_clear(garmin_data_p); 1119 pkt_clear(garmin_data_p);
1105 garmin_data_p->state = STATE_GSP_WAIT_DATA; 1120 garmin_data_p->state = STATE_GSP_WAIT_DATA;
@@ -1114,13 +1129,6 @@ static int garmin_write_bulk (struct usb_serial_port *port,
1114 "failed with status = %d\n", 1129 "failed with status = %d\n",
1115 __FUNCTION__, status); 1130 __FUNCTION__, status);
1116 count = status; 1131 count = status;
1117 } else {
1118
1119 if (GARMIN_LAYERID_APPL == getLayerId(buffer)
1120 && (garmin_data_p->mode == MODE_GARMIN_SERIAL)) {
1121
1122 gsp_send_ack(garmin_data_p, buffer[4]);
1123 }
1124 } 1132 }
1125 1133
1126 /* we are done with this urb, so let the host driver 1134 /* we are done with this urb, so let the host driver
@@ -1135,7 +1143,6 @@ static int garmin_write_bulk (struct usb_serial_port *port,
1135static int garmin_write (struct usb_serial_port *port, 1143static int garmin_write (struct usb_serial_port *port,
1136 const unsigned char *buf, int count) 1144 const unsigned char *buf, int count)
1137{ 1145{
1138 unsigned long flags;
1139 int pktid, pktsiz, len; 1146 int pktid, pktsiz, len;
1140 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1147 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1141 __le32 *privpkt = (__le32 *)garmin_data_p->privpkt; 1148 __le32 *privpkt = (__le32 *)garmin_data_p->privpkt;
@@ -1186,9 +1193,7 @@ static int garmin_write (struct usb_serial_port *port,
1186 break; 1193 break;
1187 1194
1188 case PRIV_PKTID_RESET_REQ: 1195 case PRIV_PKTID_RESET_REQ:
1189 spin_lock_irqsave(&garmin_data_p->lock, flags); 1196 atomic_inc(&garmin_data_p->req_count);
1190 garmin_data_p->flags |= FLAGS_APP_REQ_SEEN;
1191 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
1192 break; 1197 break;
1193 1198
1194 case PRIV_PKTID_SET_DEF_MODE: 1199 case PRIV_PKTID_SET_DEF_MODE:
@@ -1241,8 +1246,6 @@ static int garmin_chars_in_buffer (struct usb_serial_port *port)
1241static void garmin_read_process(struct garmin_data * garmin_data_p, 1246static void garmin_read_process(struct garmin_data * garmin_data_p,
1242 unsigned char *data, unsigned data_length) 1247 unsigned char *data, unsigned data_length)
1243{ 1248{
1244 unsigned long flags;
1245
1246 if (garmin_data_p->flags & FLAGS_DROP_DATA) { 1249 if (garmin_data_p->flags & FLAGS_DROP_DATA) {
1247 /* abort-transfer cmd is actice */ 1250 /* abort-transfer cmd is actice */
1248 dbg("%s - pkt dropped", __FUNCTION__); 1251 dbg("%s - pkt dropped", __FUNCTION__);
@@ -1254,9 +1257,7 @@ static void garmin_read_process(struct garmin_data * garmin_data_p,
1254 the device */ 1257 the device */
1255 if (0 == memcmp(data, GARMIN_APP_LAYER_REPLY, 1258 if (0 == memcmp(data, GARMIN_APP_LAYER_REPLY,
1256 sizeof(GARMIN_APP_LAYER_REPLY))) { 1259 sizeof(GARMIN_APP_LAYER_REPLY))) {
1257 spin_lock_irqsave(&garmin_data_p->lock, flags); 1260 atomic_inc(&garmin_data_p->resp_count);
1258 garmin_data_p->flags |= FLAGS_APP_RESP_SEEN;
1259 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
1260 } 1261 }
1261 1262
1262 /* if throttling is active or postprecessing is required 1263 /* if throttling is active or postprecessing is required
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
index 0455c1552a..6a3a704b58 100644
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -545,6 +545,7 @@ static struct usb_device_id ipaq_id_table [] = {
545 { USB_DEVICE(0x413C, 0x4009) }, /* Dell Axim USB Sync */ 545 { USB_DEVICE(0x413C, 0x4009) }, /* Dell Axim USB Sync */
546 { USB_DEVICE(0x4505, 0x0010) }, /* Smartphone */ 546 { USB_DEVICE(0x4505, 0x0010) }, /* Smartphone */
547 { USB_DEVICE(0x5E04, 0xCE00) }, /* SAGEM Wireless Assistant */ 547 { USB_DEVICE(0x5E04, 0xCE00) }, /* SAGEM Wireless Assistant */
548 { USB_DEVICE(0x0BB4, 0x00CF) }, /* HTC smartphone modems */
548 { } /* Terminating entry */ 549 { } /* Terminating entry */
549}; 550};
550 551
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 84c12b5f12..a18659e070 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -108,8 +108,10 @@ static int option_send_setup(struct usb_serial_port *port);
108#define HUAWEI_VENDOR_ID 0x12D1 108#define HUAWEI_VENDOR_ID 0x12D1
109#define HUAWEI_PRODUCT_E600 0x1001 109#define HUAWEI_PRODUCT_E600 0x1001
110#define HUAWEI_PRODUCT_E220 0x1003 110#define HUAWEI_PRODUCT_E220 0x1003
111#define HUAWEI_PRODUCT_E220BIS 0x1004
111 112
112#define NOVATELWIRELESS_VENDOR_ID 0x1410 113#define NOVATELWIRELESS_VENDOR_ID 0x1410
114#define DELL_VENDOR_ID 0x413C
113 115
114#define ANYDATA_VENDOR_ID 0x16d5 116#define ANYDATA_VENDOR_ID 0x16d5
115#define ANYDATA_PRODUCT_ADU_E100A 0x6501 117#define ANYDATA_PRODUCT_ADU_E100A 0x6501
@@ -119,8 +121,6 @@ static int option_send_setup(struct usb_serial_port *port);
119#define BANDRICH_PRODUCT_C100_1 0x1002 121#define BANDRICH_PRODUCT_C100_1 0x1002
120#define BANDRICH_PRODUCT_C100_2 0x1003 122#define BANDRICH_PRODUCT_C100_2 0x1003
121 123
122#define DELL_VENDOR_ID 0x413C
123
124static struct usb_device_id option_ids[] = { 124static struct usb_device_id option_ids[] = {
125 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, 125 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
126 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, 126 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
@@ -159,6 +159,7 @@ static struct usb_device_id option_ids[] = {
159 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) }, 159 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) },
160 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, 160 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
161 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) }, 161 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) },
162 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS) },
162 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1100) }, /* Novatel Merlin XS620/S640 */ 163 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1100) }, /* Novatel Merlin XS620/S640 */
163 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1110) }, /* Novatel Merlin S620 */ 164 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1110) }, /* Novatel Merlin S620 */
164 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1120) }, /* Novatel Merlin EX720 */ 165 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1120) }, /* Novatel Merlin EX720 */
@@ -171,11 +172,17 @@ static struct usb_device_id option_ids[] = {
171 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2110) }, /* Novatel Merlin ES620 / Merlin ES720 / Ovation U720 */ 172 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2110) }, /* Novatel Merlin ES620 / Merlin ES720 / Ovation U720 */
172 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */ 173 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */
173 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */ 174 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */
175 { USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */
176 { USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
177 { USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
178 { USB_DEVICE(DELL_VENDOR_ID, 0x8117) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO ExpressCard == Novatel Merlin XV620 CDMA/EV-DO */
179 { USB_DEVICE(DELL_VENDOR_ID, 0x8118) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard == Novatel Merlin XU870 HSDPA/3G */
180 { USB_DEVICE(DELL_VENDOR_ID, 0x8128) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite E720 CDMA/EV-DO */
181 { USB_DEVICE(DELL_VENDOR_ID, 0x8137) }, /* Dell Wireless HSDPA 5520 */
174 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, 182 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) },
175 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, 183 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
176 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, 184 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) },
177 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, 185 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) },
178 { USB_DEVICE(DELL_VENDOR_ID, 0x8118) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard */
179 { } /* Terminating entry */ 186 { } /* Terminating entry */
180}; 187};
181MODULE_DEVICE_TABLE(usb, option_ids); 188MODULE_DEVICE_TABLE(usb, option_ids);
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index d7db71eca5..64f3f66a7a 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -817,23 +817,6 @@ static int oti6858_ioctl(struct usb_serial_port *port, struct file *file,
817 __FUNCTION__, port->number, cmd, arg); 817 __FUNCTION__, port->number, cmd, arg);
818 818
819 switch (cmd) { 819 switch (cmd) {
820 case TCGETS:
821 if (copy_to_user(user_arg, port->tty->termios,
822 sizeof(struct ktermios))) {
823 return -EFAULT;
824 }
825 return 0;
826
827 case TCSETS:
828 case TCSETSW: /* FIXME: this is not the same! */
829 case TCSETSF: /* FIXME: this is not the same! */
830 if (copy_from_user(port->tty->termios, user_arg,
831 sizeof(struct ktermios))) {
832 return -EFAULT;
833 }
834 oti6858_set_termios(port, NULL);
835 return 0;
836
837 case TCFLSH: 820 case TCFLSH:
838 /* FIXME */ 821 /* FIXME */
839 return 0; 822 return 0;
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index 86899d55d8..51669b7622 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -74,13 +74,13 @@
74#include <linux/usb/serial.h> 74#include <linux/usb/serial.h>
75 75
76 76
77#ifndef CONFIG_USB_SAFE_PADDED 77#ifndef CONFIG_USB_SERIAL_SAFE_PADDED
78#define CONFIG_USB_SAFE_PADDED 0 78#define CONFIG_USB_SERIAL_SAFE_PADDED 0
79#endif 79#endif
80 80
81static int debug; 81static int debug;
82static int safe = 1; 82static int safe = 1;
83static int padded = CONFIG_USB_SAFE_PADDED; 83static int padded = CONFIG_USB_SERIAL_SAFE_PADDED;
84 84
85#define DRIVER_VERSION "v0.0b" 85#define DRIVER_VERSION "v0.0b"
86#define DRIVER_AUTHOR "sl@lineo.com, tbr@lineo.com" 86#define DRIVER_AUTHOR "sl@lineo.com, tbr@lineo.com"
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index 7d84a7647e..30e08c0bcd 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -104,6 +104,8 @@ static struct usb_device_id id_table [] = {
104 .driver_info = (kernel_ulong_t)&palm_os_4_probe }, 104 .driver_info = (kernel_ulong_t)&palm_os_4_probe },
105 { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_TJ25_ID), 105 { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_TJ25_ID),
106 .driver_info = (kernel_ulong_t)&palm_os_4_probe }, 106 .driver_info = (kernel_ulong_t)&palm_os_4_probe },
107 { USB_DEVICE(ACER_VENDOR_ID, ACER_S10_ID),
108 .driver_info = (kernel_ulong_t)&palm_os_4_probe },
107 { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID), 109 { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID),
108 .driver_info = (kernel_ulong_t)&palm_os_4_probe }, 110 .driver_info = (kernel_ulong_t)&palm_os_4_probe },
109 { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SPH_I500_ID), 111 { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SPH_I500_ID),
diff --git a/drivers/usb/serial/visor.h b/drivers/usb/serial/visor.h
index 4ce6f62a6f..57229cf664 100644
--- a/drivers/usb/serial/visor.h
+++ b/drivers/usb/serial/visor.h
@@ -48,6 +48,9 @@
48#define SONY_CLIE_UX50_ID 0x0144 48#define SONY_CLIE_UX50_ID 0x0144
49#define SONY_CLIE_TJ25_ID 0x0169 49#define SONY_CLIE_TJ25_ID 0x0169
50 50
51#define ACER_VENDOR_ID 0x0502
52#define ACER_S10_ID 0x0001
53
51#define SAMSUNG_VENDOR_ID 0x04E8 54#define SAMSUNG_VENDOR_ID 0x04E8
52#define SAMSUNG_SCH_I330_ID 0x8001 55#define SAMSUNG_SCH_I330_ID 0x8001
53#define SAMSUNG_SPH_I500_ID 0x6601 56#define SAMSUNG_SPH_I500_ID 0x6601
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 47e5607992..1ba19eaa19 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -285,15 +285,10 @@ static int device_reset(struct scsi_cmnd *srb)
285 285
286 US_DEBUGP("%s called\n", __FUNCTION__); 286 US_DEBUGP("%s called\n", __FUNCTION__);
287 287
288 result = usb_autopm_get_interface(us->pusb_intf); 288 /* lock the device pointers and do the reset */
289 if (result == 0) { 289 mutex_lock(&(us->dev_mutex));
290 290 result = us->transport_reset(us);
291 /* lock the device pointers and do the reset */ 291 mutex_unlock(&us->dev_mutex);
292 mutex_lock(&(us->dev_mutex));
293 result = us->transport_reset(us);
294 mutex_unlock(&us->dev_mutex);
295 usb_autopm_put_interface(us->pusb_intf);
296 }
297 292
298 return result < 0 ? FAILED : SUCCESS; 293 return result < 0 ? FAILED : SUCCESS;
299} 294}
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index d8d008d429..c6b78ba815 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -342,12 +342,19 @@ UNUSUAL_DEV( 0x04b0, 0x040d, 0x0100, 0x0100,
342 US_FL_FIX_CAPACITY), 342 US_FL_FIX_CAPACITY),
343 343
344/* Reported by Emil Larsson <emil@swip.net> */ 344/* Reported by Emil Larsson <emil@swip.net> */
345UNUSUAL_DEV( 0x04b0, 0x0411, 0x0100, 0x0100, 345UNUSUAL_DEV( 0x04b0, 0x0411, 0x0100, 0x0101,
346 "NIKON", 346 "NIKON",
347 "NIKON DSC D80", 347 "NIKON DSC D80",
348 US_SC_DEVICE, US_PR_DEVICE, NULL, 348 US_SC_DEVICE, US_PR_DEVICE, NULL,
349 US_FL_FIX_CAPACITY), 349 US_FL_FIX_CAPACITY),
350 350
351/* Reported by Ortwin Glueck <odi@odi.ch> */
352UNUSUAL_DEV( 0x04b0, 0x0413, 0x0110, 0x0110,
353 "NIKON",
354 "NIKON DSC D40",
355 US_SC_DEVICE, US_PR_DEVICE, NULL,
356 US_FL_FIX_CAPACITY),
357
351/* BENQ DC5330 358/* BENQ DC5330
352 * Reported by Manuel Fombuena <mfombuena@ya.com> and 359 * Reported by Manuel Fombuena <mfombuena@ya.com> and
353 * Frank Copeland <fjc@thingy.apana.org.au> */ 360 * Frank Copeland <fjc@thingy.apana.org.au> */
@@ -897,6 +904,22 @@ UNUSUAL_DEV( 0x069b, 0x3004, 0x0001, 0x0001,
897 US_SC_DEVICE, US_PR_DEVICE, NULL, 904 US_SC_DEVICE, US_PR_DEVICE, NULL,
898 US_FL_FIX_CAPACITY ), 905 US_FL_FIX_CAPACITY ),
899 906
907/* Reported by Massimiliano Ghilardi <massimiliano.ghilardi@gmail.com>
908 * This USB MP3/AVI player device fails and disconnects if more than 128
909 * sectors (64kB) are read/written in a single command, and may be present
910 * at least in the following products:
911 * "Magnex Digital Video Panel DVP 1800"
912 * "MP4 AIGO 4GB SLOT SD"
913 * "Teclast TL-C260 MP3"
914 * "i.Meizu PMP MP3/MP4"
915 * "Speed MV8 MP4 Audio Player"
916 */
917UNUSUAL_DEV( 0x071b, 0x3203, 0x0100, 0x0100,
918 "RockChip",
919 "ROCK MP3",
920 US_SC_DEVICE, US_PR_DEVICE, NULL,
921 US_FL_MAX_SECTORS_64),
922
900/* Reported by Olivier Blondeau <zeitoun@gmail.com> */ 923/* Reported by Olivier Blondeau <zeitoun@gmail.com> */
901UNUSUAL_DEV( 0x0727, 0x0306, 0x0100, 0x0100, 924UNUSUAL_DEV( 0x0727, 0x0306, 0x0100, 0x0100,
902 "ATMEL", 925 "ATMEL",
@@ -1393,6 +1416,13 @@ UNUSUAL_DEV( 0x0fce, 0xe030, 0x0000, 0x0000,
1393 US_SC_DEVICE, US_PR_DEVICE, NULL, 1416 US_SC_DEVICE, US_PR_DEVICE, NULL,
1394 US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), 1417 US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ),
1395 1418
1419/* Reported by Ricardo Barberis <ricardo@dattatec.com> */
1420UNUSUAL_DEV( 0x0fce, 0xe092, 0x0000, 0x0000,
1421 "Sony Ericsson",
1422 "P1i",
1423 US_SC_DEVICE, US_PR_DEVICE, NULL,
1424 US_FL_IGNORE_RESIDUE ),
1425
1396/* Reported by Emmanuel Vasilakis <evas@forthnet.gr> */ 1426/* Reported by Emmanuel Vasilakis <evas@forthnet.gr> */
1397UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000, 1427UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000,
1398 "Sony Ericsson", 1428 "Sony Ericsson",
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 28842d208b..5918166706 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -112,13 +112,6 @@ module_param(delay_use, uint, S_IRUGO | S_IWUSR);
112MODULE_PARM_DESC(delay_use, "seconds to delay before using a new device"); 112MODULE_PARM_DESC(delay_use, "seconds to delay before using a new device");
113 113
114 114
115/* These are used to make sure the module doesn't unload before all the
116 * threads have exited.
117 */
118static atomic_t total_threads = ATOMIC_INIT(0);
119static DECLARE_COMPLETION(threads_gone);
120
121
122/* 115/*
123 * The entries in this table correspond, line for line, 116 * The entries in this table correspond, line for line,
124 * with the entries of us_unusual_dev_list[]. 117 * with the entries of us_unusual_dev_list[].
@@ -191,14 +184,16 @@ static int storage_suspend(struct usb_interface *iface, pm_message_t message)
191{ 184{
192 struct us_data *us = usb_get_intfdata(iface); 185 struct us_data *us = usb_get_intfdata(iface);
193 186
194 US_DEBUGP("%s\n", __FUNCTION__);
195
196 /* Wait until no command is running */ 187 /* Wait until no command is running */
197 mutex_lock(&us->dev_mutex); 188 mutex_lock(&us->dev_mutex);
198 189
190 US_DEBUGP("%s\n", __FUNCTION__);
199 if (us->suspend_resume_hook) 191 if (us->suspend_resume_hook)
200 (us->suspend_resume_hook)(us, US_SUSPEND); 192 (us->suspend_resume_hook)(us, US_SUSPEND);
201 193
194 /* When runtime PM is working, we'll set a flag to indicate
195 * whether we should autoresume when a SCSI request arrives. */
196
202 mutex_unlock(&us->dev_mutex); 197 mutex_unlock(&us->dev_mutex);
203 return 0; 198 return 0;
204} 199}
@@ -207,11 +202,13 @@ static int storage_resume(struct usb_interface *iface)
207{ 202{
208 struct us_data *us = usb_get_intfdata(iface); 203 struct us_data *us = usb_get_intfdata(iface);
209 204
210 US_DEBUGP("%s\n", __FUNCTION__); 205 mutex_lock(&us->dev_mutex);
211 206
207 US_DEBUGP("%s\n", __FUNCTION__);
212 if (us->suspend_resume_hook) 208 if (us->suspend_resume_hook)
213 (us->suspend_resume_hook)(us, US_RESUME); 209 (us->suspend_resume_hook)(us, US_RESUME);
214 210
211 mutex_unlock(&us->dev_mutex);
215 return 0; 212 return 0;
216} 213}
217 214
@@ -309,7 +306,6 @@ static int usb_stor_control_thread(void * __us)
309{ 306{
310 struct us_data *us = (struct us_data *)__us; 307 struct us_data *us = (struct us_data *)__us;
311 struct Scsi_Host *host = us_to_host(us); 308 struct Scsi_Host *host = us_to_host(us);
312 int autopm_rc;
313 309
314 for(;;) { 310 for(;;) {
315 US_DEBUGP("*** thread sleeping.\n"); 311 US_DEBUGP("*** thread sleeping.\n");
@@ -318,9 +314,6 @@ static int usb_stor_control_thread(void * __us)
318 314
319 US_DEBUGP("*** thread awakened.\n"); 315 US_DEBUGP("*** thread awakened.\n");
320 316
321 /* Autoresume the device */
322 autopm_rc = usb_autopm_get_interface(us->pusb_intf);
323
324 /* lock the device pointers */ 317 /* lock the device pointers */
325 mutex_lock(&(us->dev_mutex)); 318 mutex_lock(&(us->dev_mutex));
326 319
@@ -379,12 +372,6 @@ static int usb_stor_control_thread(void * __us)
379 us->srb->result = SAM_STAT_GOOD; 372 us->srb->result = SAM_STAT_GOOD;
380 } 373 }
381 374
382 /* Did the autoresume fail? */
383 else if (autopm_rc < 0) {
384 US_DEBUGP("Could not wake device\n");
385 us->srb->result = DID_ERROR << 16;
386 }
387
388 /* we've got a command, let's do it! */ 375 /* we've got a command, let's do it! */
389 else { 376 else {
390 US_DEBUG(usb_stor_show_command(us->srb)); 377 US_DEBUG(usb_stor_show_command(us->srb));
@@ -427,10 +414,6 @@ SkipForAbort:
427 414
428 /* unlock the device pointers */ 415 /* unlock the device pointers */
429 mutex_unlock(&us->dev_mutex); 416 mutex_unlock(&us->dev_mutex);
430
431 /* Start an autosuspend */
432 if (autopm_rc == 0)
433 usb_autopm_put_interface(us->pusb_intf);
434 } /* for (;;) */ 417 } /* for (;;) */
435 418
436 /* Wait until we are told to stop */ 419 /* Wait until we are told to stop */
@@ -879,9 +862,6 @@ static void quiesce_and_remove_host(struct us_data *us)
879 usb_stor_stop_transport(us); 862 usb_stor_stop_transport(us);
880 wake_up(&us->delay_wait); 863 wake_up(&us->delay_wait);
881 864
882 /* It doesn't matter if the SCSI-scanning thread is still running.
883 * The thread will exit when it sees the DISCONNECTING flag. */
884
885 /* queuecommand won't accept any new commands and the control 865 /* queuecommand won't accept any new commands and the control
886 * thread won't execute a previously-queued command. If there 866 * thread won't execute a previously-queued command. If there
887 * is such a command pending, complete it with an error. */ 867 * is such a command pending, complete it with an error. */
@@ -891,12 +871,16 @@ static void quiesce_and_remove_host(struct us_data *us)
891 scsi_lock(host); 871 scsi_lock(host);
892 us->srb->scsi_done(us->srb); 872 us->srb->scsi_done(us->srb);
893 us->srb = NULL; 873 us->srb = NULL;
874 complete(&us->notify); /* in case of an abort */
894 scsi_unlock(host); 875 scsi_unlock(host);
895 } 876 }
896 mutex_unlock(&us->dev_mutex); 877 mutex_unlock(&us->dev_mutex);
897 878
898 /* Now we own no commands so it's safe to remove the SCSI host */ 879 /* Now we own no commands so it's safe to remove the SCSI host */
899 scsi_remove_host(host); 880 scsi_remove_host(host);
881
882 /* Wait for the SCSI-scanning thread to stop */
883 wait_for_completion(&us->scanning_done);
900} 884}
901 885
902/* Second stage of disconnect processing: deallocate all resources */ 886/* Second stage of disconnect processing: deallocate all resources */
@@ -947,9 +931,7 @@ retry:
947 /* Should we unbind if no devices were detected? */ 931 /* Should we unbind if no devices were detected? */
948 } 932 }
949 933
950 scsi_host_put(us_to_host(us)); 934 complete_and_exit(&us->scanning_done, 0);
951 usb_autopm_put_interface(us->pusb_intf);
952 complete_and_exit(&threads_gone, 0);
953} 935}
954 936
955 937
@@ -984,6 +966,7 @@ static int storage_probe(struct usb_interface *intf,
984 init_MUTEX_LOCKED(&(us->sema)); 966 init_MUTEX_LOCKED(&(us->sema));
985 init_completion(&(us->notify)); 967 init_completion(&(us->notify));
986 init_waitqueue_head(&us->delay_wait); 968 init_waitqueue_head(&us->delay_wait);
969 init_completion(&us->scanning_done);
987 970
988 /* Associate the us_data structure with the USB device */ 971 /* Associate the us_data structure with the USB device */
989 result = associate_dev(us, intf); 972 result = associate_dev(us, intf);
@@ -1033,12 +1016,6 @@ static int storage_probe(struct usb_interface *intf,
1033 goto BadDevice; 1016 goto BadDevice;
1034 } 1017 }
1035 1018
1036 /* Take a reference to the host for the scanning thread and
1037 * count it among all the threads we have launched. Then
1038 * start it up. */
1039 scsi_host_get(us_to_host(us));
1040 atomic_inc(&total_threads);
1041 usb_autopm_get_interface(intf); /* dropped in the scanning thread */
1042 wake_up_process(th); 1019 wake_up_process(th);
1043 1020
1044 return 0; 1021 return 0;
@@ -1076,7 +1053,6 @@ static struct usb_driver usb_storage_driver = {
1076 .pre_reset = storage_pre_reset, 1053 .pre_reset = storage_pre_reset,
1077 .post_reset = storage_post_reset, 1054 .post_reset = storage_post_reset,
1078 .id_table = storage_usb_ids, 1055 .id_table = storage_usb_ids,
1079 .supports_autosuspend = 1,
1080}; 1056};
1081 1057
1082static int __init usb_stor_init(void) 1058static int __init usb_stor_init(void)
@@ -1104,16 +1080,6 @@ static void __exit usb_stor_exit(void)
1104 US_DEBUGP("-- calling usb_deregister()\n"); 1080 US_DEBUGP("-- calling usb_deregister()\n");
1105 usb_deregister(&usb_storage_driver) ; 1081 usb_deregister(&usb_storage_driver) ;
1106 1082
1107 /* Don't return until all of our control and scanning threads
1108 * have exited. Since each thread signals threads_gone as its
1109 * last act, we have to call wait_for_completion the right number
1110 * of times.
1111 */
1112 while (atomic_read(&total_threads) > 0) {
1113 wait_for_completion(&threads_gone);
1114 atomic_dec(&total_threads);
1115 }
1116
1117 usb_usual_clear_present(USB_US_TYPE_STOR); 1083 usb_usual_clear_present(USB_US_TYPE_STOR);
1118} 1084}
1119 1085
diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h
index 6445665b15..8d87503e25 100644
--- a/drivers/usb/storage/usb.h
+++ b/drivers/usb/storage/usb.h
@@ -150,6 +150,7 @@ struct us_data {
150 struct semaphore sema; /* to sleep thread on */ 150 struct semaphore sema; /* to sleep thread on */
151 struct completion notify; /* thread begin/end */ 151 struct completion notify; /* thread begin/end */
152 wait_queue_head_t delay_wait; /* wait during scan, reset */ 152 wait_queue_head_t delay_wait; /* wait during scan, reset */
153 struct completion scanning_done; /* wait for scan thread */
153 154
154 /* subdriver information */ 155 /* subdriver information */
155 void *extra; /* Any extra data */ 156 void *extra; /* Any extra data */
diff --git a/drivers/video/aty/ati_ids.h b/drivers/video/aty/ati_ids.h
index 685a754991..dca2eb8f2d 100644
--- a/drivers/video/aty/ati_ids.h
+++ b/drivers/video/aty/ati_ids.h
@@ -192,6 +192,12 @@
192#define PCI_CHIP_RS300_5835 0x5835 192#define PCI_CHIP_RS300_5835 0x5835
193#define PCI_CHIP_RS300_5836 0x5836 193#define PCI_CHIP_RS300_5836 0x5836
194#define PCI_CHIP_RS300_5837 0x5837 194#define PCI_CHIP_RS300_5837 0x5837
195#define PCI_CHIP_RS480_5955 0x5955
196#define PCI_CHIP_RV280_5960 0x5960
197#define PCI_CHIP_RV280_5961 0x5961
198#define PCI_CHIP_RV280_5962 0x5962
199#define PCI_CHIP_RV280_5964 0x5964
200#define PCI_CHIP_RS482_5975 0x5975
195#define PCI_CHIP_RV370_5B60 0x5B60 201#define PCI_CHIP_RV370_5B60 0x5B60
196#define PCI_CHIP_RV370_5B61 0x5B61 202#define PCI_CHIP_RV370_5B61 0x5B61
197#define PCI_CHIP_RV370_5B62 0x5B62 203#define PCI_CHIP_RV370_5B62 0x5B62
@@ -200,14 +206,8 @@
200#define PCI_CHIP_RV370_5B65 0x5B65 206#define PCI_CHIP_RV370_5B65 0x5B65
201#define PCI_CHIP_RV370_5B66 0x5B66 207#define PCI_CHIP_RV370_5B66 0x5B66
202#define PCI_CHIP_RV370_5B67 0x5B67 208#define PCI_CHIP_RV370_5B67 0x5B67
203#define PCI_CHIP_RV280_5960 0x5960
204#define PCI_CHIP_RV280_5961 0x5961
205#define PCI_CHIP_RV280_5962 0x5962
206#define PCI_CHIP_RV280_5964 0x5964
207#define PCI_CHIP_RS485_5975 0x5975
208#define PCI_CHIP_RV280_5C61 0x5C61 209#define PCI_CHIP_RV280_5C61 0x5C61
209#define PCI_CHIP_RV280_5C63 0x5C63 210#define PCI_CHIP_RV280_5C63 0x5C63
210#define PCI_CHIP_R423_5D57 0x5D57 211#define PCI_CHIP_R423_5D57 0x5D57
211#define PCI_CHIP_RS350_7834 0x7834 212#define PCI_CHIP_RS350_7834 0x7834
212#define PCI_CHIP_RS350_7835 0x7835 213#define PCI_CHIP_RS350_7835 0x7835
213#define PCI_CHIP_RS480_5955 0x5955
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 47ca62fe7c..4b747bdaee 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -102,6 +102,7 @@
102static struct pci_device_id radeonfb_pci_table[] = { 102static struct pci_device_id radeonfb_pci_table[] = {
103 /* Radeon Xpress 200m */ 103 /* Radeon Xpress 200m */
104 CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), 104 CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
105 CHIP_DEF(PCI_CHIP_RS482_5975, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
105 /* Mobility M6 */ 106 /* Mobility M6 */
106 CHIP_DEF(PCI_CHIP_RADEON_LY, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), 107 CHIP_DEF(PCI_CHIP_RADEON_LY, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
107 CHIP_DEF(PCI_CHIP_RADEON_LZ, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), 108 CHIP_DEF(PCI_CHIP_RADEON_LZ, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
@@ -153,8 +154,6 @@ static struct pci_device_id radeonfb_pci_table[] = {
153 /* Mobility 9200 (M9+) */ 154 /* Mobility 9200 (M9+) */
154 CHIP_DEF(PCI_CHIP_RV280_5C61, RV280, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), 155 CHIP_DEF(PCI_CHIP_RV280_5C61, RV280, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
155 CHIP_DEF(PCI_CHIP_RV280_5C63, RV280, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), 156 CHIP_DEF(PCI_CHIP_RV280_5C63, RV280, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
156 /*Mobility Xpress 200 */
157 CHIP_DEF(PCI_CHIP_RS485_5975, R300, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
158 /* 9200 */ 157 /* 9200 */
159 CHIP_DEF(PCI_CHIP_RV280_5960, RV280, CHIP_HAS_CRTC2), 158 CHIP_DEF(PCI_CHIP_RV280_5960, RV280, CHIP_HAS_CRTC2),
160 CHIP_DEF(PCI_CHIP_RV280_5961, RV280, CHIP_HAS_CRTC2), 159 CHIP_DEF(PCI_CHIP_RV280_5961, RV280, CHIP_HAS_CRTC2),
@@ -1285,7 +1284,8 @@ static void radeon_write_pll_regs(struct radeonfb_info *rinfo, struct radeon_reg
1285 if (rinfo->family == CHIP_FAMILY_R300 || 1284 if (rinfo->family == CHIP_FAMILY_R300 ||
1286 rinfo->family == CHIP_FAMILY_RS300 || 1285 rinfo->family == CHIP_FAMILY_RS300 ||
1287 rinfo->family == CHIP_FAMILY_R350 || 1286 rinfo->family == CHIP_FAMILY_R350 ||
1288 rinfo->family == CHIP_FAMILY_RV350) { 1287 rinfo->family == CHIP_FAMILY_RV350 ||
1288 rinfo->family == CHIP_FAMILY_RV380 ) {
1289 if (mode->ppll_ref_div & R300_PPLL_REF_DIV_ACC_MASK) { 1289 if (mode->ppll_ref_div & R300_PPLL_REF_DIV_ACC_MASK) {
1290 /* When restoring console mode, use saved PPLL_REF_DIV 1290 /* When restoring console mode, use saved PPLL_REF_DIV
1291 * setting. 1291 * setting.
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c
index 718b9f8373..833b10c840 100644
--- a/drivers/video/bw2.c
+++ b/drivers/video/bw2.c
@@ -233,9 +233,9 @@ static u8 bw2regs_66hz[] __devinitdata = {
233 0x10, 0x20, 0 233 0x10, 0x20, 0
234}; 234};
235 235
236static void __devinit bw2_do_default_mode(struct bw2_par *par, 236static int __devinit bw2_do_default_mode(struct bw2_par *par,
237 struct fb_info *info, 237 struct fb_info *info,
238 int *linebytes) 238 int *linebytes)
239{ 239{
240 u8 status, mon; 240 u8 status, mon;
241 u8 *p; 241 u8 *p;
@@ -266,17 +266,18 @@ static void __devinit bw2_do_default_mode(struct bw2_par *par,
266 break; 266 break;
267 267
268 case BWTWO_SR_ID_NOCONN: 268 case BWTWO_SR_ID_NOCONN:
269 return; 269 return 0;
270 270
271 default: 271 default:
272 prom_printf("bw2: can't handle SR %02x\n", 272 printk(KERN_ERR "bw2: can't handle SR %02x\n",
273 status); 273 status);
274 prom_halt(); 274 return -EINVAL;
275 } 275 }
276 for ( ; *p; p += 2) { 276 for ( ; *p; p += 2) {
277 u8 __iomem *regp = &((u8 __iomem *)par->regs)[p[0]]; 277 u8 __iomem *regp = &((u8 __iomem *)par->regs)[p[0]];
278 sbus_writeb(p[1], regp); 278 sbus_writeb(p[1], regp);
279 } 279 }
280 return 0;
280} 281}
281 282
282static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *match) 283static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *match)
@@ -312,8 +313,11 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *
312 if (!par->regs) 313 if (!par->regs)
313 goto out_release_fb; 314 goto out_release_fb;
314 315
315 if (!of_find_property(dp, "width", NULL)) 316 if (!of_find_property(dp, "width", NULL)) {
316 bw2_do_default_mode(par, info, &linebytes); 317 err = bw2_do_default_mode(par, info, &linebytes);
318 if (err)
319 goto out_unmap_regs;
320 }
317 321
318 par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); 322 par->fbsize = PAGE_ALIGN(linebytes * info->var.yres);
319 323
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c
index 5741b46ade..a5c7fb3315 100644
--- a/drivers/video/cg3.c
+++ b/drivers/video/cg3.c
@@ -315,7 +315,7 @@ static u_char cg3_dacvals[] __devinitdata = {
315 4, 0xff, 5, 0x00, 6, 0x70, 7, 0x00, 0 315 4, 0xff, 5, 0x00, 6, 0x70, 7, 0x00, 0
316}; 316};
317 317
318static void __devinit cg3_do_default_mode(struct cg3_par *par) 318static int __devinit cg3_do_default_mode(struct cg3_par *par)
319{ 319{
320 enum cg3_type type; 320 enum cg3_type type;
321 u8 *p; 321 u8 *p;
@@ -332,10 +332,9 @@ static void __devinit cg3_do_default_mode(struct cg3_par *par)
332 else 332 else
333 type = CG3_AT_66HZ; 333 type = CG3_AT_66HZ;
334 } else { 334 } else {
335 prom_printf("cgthree: can't handle SR %02x\n", 335 printk(KERN_ERR "cgthree: can't handle SR %02x\n",
336 status); 336 status);
337 prom_halt(); 337 return -EINVAL;
338 return;
339 } 338 }
340 } 339 }
341 340
@@ -351,6 +350,7 @@ static void __devinit cg3_do_default_mode(struct cg3_par *par)
351 regp = (u8 __iomem *)&par->regs->cmap.control; 350 regp = (u8 __iomem *)&par->regs->cmap.control;
352 sbus_writeb(p[1], regp); 351 sbus_writeb(p[1], regp);
353 } 352 }
353 return 0;
354} 354}
355 355
356static int __devinit cg3_probe(struct of_device *op, 356static int __devinit cg3_probe(struct of_device *op,
@@ -400,8 +400,11 @@ static int __devinit cg3_probe(struct of_device *op,
400 400
401 cg3_blank(0, info); 401 cg3_blank(0, info);
402 402
403 if (!of_find_property(dp, "width", NULL)) 403 if (!of_find_property(dp, "width", NULL)) {
404 cg3_do_default_mode(par); 404 err = cg3_do_default_mode(par);
405 if (err)
406 goto out_unmap_screen;
407 }
405 408
406 if (fb_alloc_cmap(&info->cmap, 256, 0)) 409 if (fb_alloc_cmap(&info->cmap, 256, 0))
407 goto out_unmap_screen; 410 goto out_unmap_screen;
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 49643969f9..a22ccf9485 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -145,7 +145,7 @@ config FRAMEBUFFER_CONSOLE_ROTATION
145 oriented. 145 oriented.
146 146
147config STI_CONSOLE 147config STI_CONSOLE
148 tristate "STI text console" 148 bool "STI text console"
149 depends on PARISC 149 depends on PARISC
150 default y 150 default y
151 help 151 help
@@ -182,7 +182,7 @@ config FONT_8x8
182 182
183config FONT_8x16 183config FONT_8x16
184 bool "VGA 8x16 font" if FONTS 184 bool "VGA 8x16 font" if FONTS
185 depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y || STI_CONSOLE || USB_SISUSBVGA_CON 185 depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE || STI_CONSOLE || USB_SISUSBVGA_CON
186 default y if !SPARC && !FONTS 186 default y if !SPARC && !FONTS
187 help 187 help
188 This is the "high resolution" font for the VGA frame buffer (the one 188 This is the "high resolution" font for the VGA frame buffer (the one
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c
index 870017d449..e9ab657f0b 100644
--- a/drivers/video/console/sticore.c
+++ b/drivers/video/console/sticore.c
@@ -232,18 +232,14 @@ sti_bmove(struct sti_struct *sti, int src_y, int src_x,
232} 232}
233 233
234 234
235/* FIXME: Do we have another solution for this ? */ 235static void sti_flush(unsigned long start, unsigned long end)
236static void sti_flush(unsigned long from, unsigned long len)
237{ 236{
238 flush_data_cache(); 237 flush_icache_range(start, end);
239 flush_kernel_dcache_range(from, len);
240 flush_icache_range(from, from+len);
241} 238}
242 239
243void __devinit 240void __devinit
244sti_rom_copy(unsigned long base, unsigned long count, void *dest) 241sti_rom_copy(unsigned long base, unsigned long count, void *dest)
245{ 242{
246 unsigned long dest_len = count;
247 unsigned long dest_start = (unsigned long) dest; 243 unsigned long dest_start = (unsigned long) dest;
248 244
249 /* this still needs to be revisited (see arch/parisc/mm/init.c:246) ! */ 245 /* this still needs to be revisited (see arch/parisc/mm/init.c:246) ! */
@@ -260,7 +256,7 @@ sti_rom_copy(unsigned long base, unsigned long count, void *dest)
260 dest++; 256 dest++;
261 } 257 }
262 258
263 sti_flush(dest_start, dest_len); 259 sti_flush(dest_start, (unsigned long)dest);
264} 260}
265 261
266 262
@@ -663,7 +659,6 @@ sti_bmode_font_raw(struct sti_cooked_font *f)
663static void __devinit 659static void __devinit
664sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) 660sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest)
665{ 661{
666 unsigned long dest_len = count;
667 unsigned long dest_start = (unsigned long) dest; 662 unsigned long dest_start = (unsigned long) dest;
668 663
669 while (count) { 664 while (count) {
@@ -672,7 +667,8 @@ sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest)
672 base += 4; 667 base += 4;
673 dest++; 668 dest++;
674 } 669 }
675 sti_flush(dest_start, dest_len); 670
671 sti_flush(dest_start, (unsigned long)dest);
676} 672}
677 673
678static struct sti_rom * __devinit 674static struct sti_rom * __devinit
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c
index 16bc8d75e3..6a47682d86 100644
--- a/drivers/video/intelfb/intelfbhw.c
+++ b/drivers/video/intelfb/intelfbhw.c
@@ -924,10 +924,10 @@ calc_pll_params(int index, int clock, u32 *retm1, u32 *retm2, u32 *retn, u32 *re
924 if (m > pll->max_m) 924 if (m > pll->max_m)
925 m = pll->max_m - 1; 925 m = pll->max_m - 1;
926 for (testm = m - 1; testm <= m; testm++) { 926 for (testm = m - 1; testm <= m; testm++) {
927 f_out = calc_vclock3(index, m, n, p); 927 f_out = calc_vclock3(index, testm, n, p);
928 if (splitm(index, testm, &m1, &m2)) { 928 if (splitm(index, testm, &m1, &m2)) {
929 WRN_MSG("cannot split m = %d\n", m); 929 WRN_MSG("cannot split m = %d\n",
930 n++; 930 testm);
931 continue; 931 continue;
932 } 932 }
933 if (clock > f_out) 933 if (clock > f_out)
@@ -1352,7 +1352,7 @@ intelfbhw_program_mode(struct intelfb_info *dinfo,
1352 1352
1353 /* turn off PLL */ 1353 /* turn off PLL */
1354 tmp = INREG(dpll_reg); 1354 tmp = INREG(dpll_reg);
1355 dpll_reg &= ~DPLL_VCO_ENABLE; 1355 tmp &= ~DPLL_VCO_ENABLE;
1356 OUTREG(dpll_reg, tmp); 1356 OUTREG(dpll_reg, tmp);
1357 1357
1358 /* Set PLL parameters */ 1358 /* Set PLL parameters */
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 8d7ab74170..a593f900ef 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -431,6 +431,7 @@ static int w1_uevent(struct device *dev, char **envp, int num_envp,
431 err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size, 431 err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size,
432 &cur_len, "W1_SLAVE_ID=%024LX", 432 &cur_len, "W1_SLAVE_ID=%024LX",
433 (unsigned long long)sl->reg_num.id); 433 (unsigned long long)sl->reg_num.id);
434 envp[cur_index] = NULL;
434 if (err) 435 if (err)
435 return err; 436 return err;
436 437
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index 08fa320b7e..15e05a15b5 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -92,23 +92,6 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry)
92 return fid; 92 return fid;
93} 93}
94 94
95struct p9_fid *v9fs_fid_lookup_remove(struct dentry *dentry)
96{
97 struct p9_fid *fid;
98 struct v9fs_dentry *dent;
99
100 dent = dentry->d_fsdata;
101 fid = v9fs_fid_lookup(dentry);
102 if (!IS_ERR(fid)) {
103 spin_lock(&dent->lock);
104 list_del(&fid->dlist);
105 spin_unlock(&dent->lock);
106 }
107
108 return fid;
109}
110
111
112/** 95/**
113 * v9fs_fid_clone - lookup the fid for a dentry, clone a private copy and 96 * v9fs_fid_clone - lookup the fid for a dentry, clone a private copy and
114 * release it 97 * release it
diff --git a/fs/9p/fid.h b/fs/9p/fid.h
index 47a0ba7428..26e07df783 100644
--- a/fs/9p/fid.h
+++ b/fs/9p/fid.h
@@ -28,6 +28,5 @@ struct v9fs_dentry {
28}; 28};
29 29
30struct p9_fid *v9fs_fid_lookup(struct dentry *dentry); 30struct p9_fid *v9fs_fid_lookup(struct dentry *dentry);
31struct p9_fid *v9fs_fid_lookup_remove(struct dentry *dentry);
32struct p9_fid *v9fs_fid_clone(struct dentry *dentry); 31struct p9_fid *v9fs_fid_clone(struct dentry *dentry);
33int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid); 32int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid);
diff --git a/fs/Kconfig b/fs/Kconfig
index 84fb8428c0..bb02b39380 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -441,9 +441,6 @@ config OCFS2_FS
441 441
442 Note: Features which OCFS2 does not support yet: 442 Note: Features which OCFS2 does not support yet:
443 - extended attributes 443 - extended attributes
444 - shared writeable mmap
445 - loopback is supported, but data written will not
446 be cluster coherent.
447 - quotas 444 - quotas
448 - cluster aware flock 445 - cluster aware flock
449 - Directory change notification (F_NOTIFY) 446 - Directory change notification (F_NOTIFY)
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c
index a3684dcc76..6f8c96fb29 100644
--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -235,8 +235,8 @@ static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
235 err = do_add_mount(newmnt, nd, MNT_SHRINKABLE, &afs_vfsmounts); 235 err = do_add_mount(newmnt, nd, MNT_SHRINKABLE, &afs_vfsmounts);
236 switch (err) { 236 switch (err) {
237 case 0: 237 case 0:
238 mntput(nd->mnt);
239 dput(nd->dentry); 238 dput(nd->dentry);
239 mntput(nd->mnt);
240 nd->mnt = newmnt; 240 nd->mnt = newmnt;
241 nd->dentry = dget(newmnt->mnt_root); 241 nd->dentry = dget(newmnt->mnt_root);
242 schedule_delayed_work(&afs_mntpt_expiry_timer, 242 schedule_delayed_work(&afs_mntpt_expiry_timer,
diff --git a/fs/aio.c b/fs/aio.c
index dbe699e982..ea2e198203 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1562,6 +1562,7 @@ int fastcall io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
1562 fput(file); 1562 fput(file);
1563 return -EAGAIN; 1563 return -EAGAIN;
1564 } 1564 }
1565 req->ki_filp = file;
1565 if (iocb->aio_flags & IOCB_FLAG_RESFD) { 1566 if (iocb->aio_flags & IOCB_FLAG_RESFD) {
1566 /* 1567 /*
1567 * If the IOCB_FLAG_RESFD flag of aio_flags is set, get an 1568 * If the IOCB_FLAG_RESFD flag of aio_flags is set, get an
@@ -1576,7 +1577,6 @@ int fastcall io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
1576 } 1577 }
1577 } 1578 }
1578 1579
1579 req->ki_filp = file;
1580 ret = put_user(req->ki_key, &user_iocb->aio_key); 1580 ret = put_user(req->ki_key, &user_iocb->aio_key);
1581 if (unlikely(ret)) { 1581 if (unlikely(ret)) {
1582 dprintk("EFAULT: aio_key\n"); 1582 dprintk("EFAULT: aio_key\n");
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index 861141b4f6..fcb3405bb1 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -742,6 +742,7 @@ static int load_flat_file(struct linux_binprm * bprm,
742 * __start to address 4 so that is okay). 742 * __start to address 4 so that is okay).
743 */ 743 */
744 if (rev > OLD_FLAT_VERSION) { 744 if (rev > OLD_FLAT_VERSION) {
745 unsigned long persistent = 0;
745 for (i=0; i < relocs; i++) { 746 for (i=0; i < relocs; i++) {
746 unsigned long addr, relval; 747 unsigned long addr, relval;
747 748
@@ -749,6 +750,8 @@ static int load_flat_file(struct linux_binprm * bprm,
749 relocated (of course, the address has to be 750 relocated (of course, the address has to be
750 relocated first). */ 751 relocated first). */
751 relval = ntohl(reloc[i]); 752 relval = ntohl(reloc[i]);
753 if (flat_set_persistent (relval, &persistent))
754 continue;
752 addr = flat_get_relocate_addr(relval); 755 addr = flat_get_relocate_addr(relval);
753 rp = (unsigned long *) calc_reloc(addr, libinfo, id, 1); 756 rp = (unsigned long *) calc_reloc(addr, libinfo, id, 1);
754 if (rp == (unsigned long *)RELOC_FAILED) { 757 if (rp == (unsigned long *)RELOC_FAILED) {
@@ -757,7 +760,8 @@ static int load_flat_file(struct linux_binprm * bprm,
757 } 760 }
758 761
759 /* Get the pointer's value. */ 762 /* Get the pointer's value. */
760 addr = flat_get_addr_from_rp(rp, relval, flags); 763 addr = flat_get_addr_from_rp(rp, relval, flags,
764 &persistent);
761 if (addr != 0) { 765 if (addr != 0) {
762 /* 766 /*
763 * Do the relocation. PIC relocs in the data section are 767 * Do the relocation. PIC relocs in the data section are
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index a6c9078af1..37310b0e81 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -2311,8 +2311,10 @@ static int do_wireless_ioctl(unsigned int fd, unsigned int cmd, unsigned long ar
2311 struct iwreq __user *iwr_u; 2311 struct iwreq __user *iwr_u;
2312 struct iw_point __user *iwp; 2312 struct iw_point __user *iwp;
2313 struct compat_iw_point __user *iwp_u; 2313 struct compat_iw_point __user *iwp_u;
2314 compat_caddr_t pointer; 2314 compat_caddr_t pointer_u;
2315 void __user *pointer;
2315 __u16 length, flags; 2316 __u16 length, flags;
2317 int ret;
2316 2318
2317 iwr_u = compat_ptr(arg); 2319 iwr_u = compat_ptr(arg);
2318 iwp_u = (struct compat_iw_point __user *) &iwr_u->u.data; 2320 iwp_u = (struct compat_iw_point __user *) &iwr_u->u.data;
@@ -2330,17 +2332,29 @@ static int do_wireless_ioctl(unsigned int fd, unsigned int cmd, unsigned long ar
2330 sizeof(iwr->ifr_ifrn.ifrn_name))) 2332 sizeof(iwr->ifr_ifrn.ifrn_name)))
2331 return -EFAULT; 2333 return -EFAULT;
2332 2334
2333 if (__get_user(pointer, &iwp_u->pointer) || 2335 if (__get_user(pointer_u, &iwp_u->pointer) ||
2334 __get_user(length, &iwp_u->length) || 2336 __get_user(length, &iwp_u->length) ||
2335 __get_user(flags, &iwp_u->flags)) 2337 __get_user(flags, &iwp_u->flags))
2336 return -EFAULT; 2338 return -EFAULT;
2337 2339
2338 if (__put_user(compat_ptr(pointer), &iwp->pointer) || 2340 if (__put_user(compat_ptr(pointer_u), &iwp->pointer) ||
2339 __put_user(length, &iwp->length) || 2341 __put_user(length, &iwp->length) ||
2340 __put_user(flags, &iwp->flags)) 2342 __put_user(flags, &iwp->flags))
2341 return -EFAULT; 2343 return -EFAULT;
2342 2344
2343 return sys_ioctl(fd, cmd, (unsigned long) iwr); 2345 ret = sys_ioctl(fd, cmd, (unsigned long) iwr);
2346
2347 if (__get_user(pointer, &iwp->pointer) ||
2348 __get_user(length, &iwp->length) ||
2349 __get_user(flags, &iwp->flags))
2350 return -EFAULT;
2351
2352 if (__put_user(ptr_to_compat(pointer), &iwp_u->pointer) ||
2353 __put_user(length, &iwp_u->length) ||
2354 __put_user(flags, &iwp_u->flags))
2355 return -EFAULT;
2356
2357 return ret;
2344} 2358}
2345 2359
2346/* Since old style bridge ioctl's endup using SIOCDEVPRIVATE 2360/* Since old style bridge ioctl's endup using SIOCDEVPRIVATE
@@ -3176,6 +3190,8 @@ COMPATIBLE_IOCTL(SIOCSIWRETRY)
3176COMPATIBLE_IOCTL(SIOCGIWRETRY) 3190COMPATIBLE_IOCTL(SIOCGIWRETRY)
3177COMPATIBLE_IOCTL(SIOCSIWPOWER) 3191COMPATIBLE_IOCTL(SIOCSIWPOWER)
3178COMPATIBLE_IOCTL(SIOCGIWPOWER) 3192COMPATIBLE_IOCTL(SIOCGIWPOWER)
3193COMPATIBLE_IOCTL(SIOCSIWAUTH)
3194COMPATIBLE_IOCTL(SIOCGIWAUTH)
3179/* hiddev */ 3195/* hiddev */
3180COMPATIBLE_IOCTL(HIDIOCGVERSION) 3196COMPATIBLE_IOCTL(HIDIOCGVERSION)
3181COMPATIBLE_IOCTL(HIDIOCAPPLICATION) 3197COMPATIBLE_IOCTL(HIDIOCAPPLICATION)
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 5d40ad13ab..131954b3fb 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -357,10 +357,6 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry,
357 ecryptfs_printk(KERN_DEBUG, "Is a special file; returning\n"); 357 ecryptfs_printk(KERN_DEBUG, "Is a special file; returning\n");
358 goto out; 358 goto out;
359 } 359 }
360 if (special_file(lower_inode->i_mode)) {
361 ecryptfs_printk(KERN_DEBUG, "Is a special file; returning\n");
362 goto out;
363 }
364 if (!nd) { 360 if (!nd) {
365 ecryptfs_printk(KERN_DEBUG, "We have a NULL nd, just leave" 361 ecryptfs_printk(KERN_DEBUG, "We have a NULL nd, just leave"
366 "as we *think* we are about to unlink\n"); 362 "as we *think* we are about to unlink\n");
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index e4ab7bc14e..fd3f94d4a6 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -834,7 +834,8 @@ static void ecryptfs_sync_page(struct page *page)
834 ecryptfs_printk(KERN_DEBUG, "find_lock_page failed\n"); 834 ecryptfs_printk(KERN_DEBUG, "find_lock_page failed\n");
835 return; 835 return;
836 } 836 }
837 lower_page->mapping->a_ops->sync_page(lower_page); 837 if (lower_page->mapping->a_ops->sync_page)
838 lower_page->mapping->a_ops->sync_page(lower_page);
838 ecryptfs_printk(KERN_DEBUG, "Unlocking page with index = [0x%.16x]\n", 839 ecryptfs_printk(KERN_DEBUG, "Unlocking page with index = [0x%.16x]\n",
839 lower_page->index); 840 lower_page->index);
840 unlock_page(lower_page); 841 unlock_page(lower_page);
diff --git a/fs/exec.c b/fs/exec.c
index c21a8cc062..073b0b8c6d 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -50,7 +50,6 @@
50#include <linux/tsacct_kern.h> 50#include <linux/tsacct_kern.h>
51#include <linux/cn_proc.h> 51#include <linux/cn_proc.h>
52#include <linux/audit.h> 52#include <linux/audit.h>
53#include <linux/signalfd.h>
54 53
55#include <asm/uaccess.h> 54#include <asm/uaccess.h>
56#include <asm/mmu_context.h> 55#include <asm/mmu_context.h>
@@ -784,7 +783,6 @@ static int de_thread(struct task_struct *tsk)
784 * and we can just re-use it all. 783 * and we can just re-use it all.
785 */ 784 */
786 if (atomic_read(&oldsighand->count) <= 1) { 785 if (atomic_read(&oldsighand->count) <= 1) {
787 signalfd_detach(tsk);
788 exit_itimers(sig); 786 exit_itimers(sig);
789 return 0; 787 return 0;
790 } 788 }
@@ -923,7 +921,6 @@ static int de_thread(struct task_struct *tsk)
923 sig->flags = 0; 921 sig->flags = 0;
924 922
925no_thread_group: 923no_thread_group:
926 signalfd_detach(tsk);
927 exit_itimers(sig); 924 exit_itimers(sig);
928 if (leader) 925 if (leader)
929 release_task(leader); 926 release_task(leader);
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
index 1586807b81..c1fa1908db 100644
--- a/fs/ext3/namei.c
+++ b/fs/ext3/namei.c
@@ -140,7 +140,8 @@ struct dx_frame
140struct dx_map_entry 140struct dx_map_entry
141{ 141{
142 u32 hash; 142 u32 hash;
143 u32 offs; 143 u16 offs;
144 u16 size;
144}; 145};
145 146
146#ifdef CONFIG_EXT3_INDEX 147#ifdef CONFIG_EXT3_INDEX
@@ -379,13 +380,28 @@ dx_probe(struct dentry *dentry, struct inode *dir,
379 380
380 entries = (struct dx_entry *) (((char *)&root->info) + 381 entries = (struct dx_entry *) (((char *)&root->info) +
381 root->info.info_length); 382 root->info.info_length);
382 assert(dx_get_limit(entries) == dx_root_limit(dir, 383
383 root->info.info_length)); 384 if (dx_get_limit(entries) != dx_root_limit(dir,
385 root->info.info_length)) {
386 ext3_warning(dir->i_sb, __FUNCTION__,
387 "dx entry: limit != root limit");
388 brelse(bh);
389 *err = ERR_BAD_DX_DIR;
390 goto fail;
391 }
392
384 dxtrace (printk("Look up %x", hash)); 393 dxtrace (printk("Look up %x", hash));
385 while (1) 394 while (1)
386 { 395 {
387 count = dx_get_count(entries); 396 count = dx_get_count(entries);
388 assert (count && count <= dx_get_limit(entries)); 397 if (!count || count > dx_get_limit(entries)) {
398 ext3_warning(dir->i_sb, __FUNCTION__,
399 "dx entry: no count or count > limit");
400 brelse(bh);
401 *err = ERR_BAD_DX_DIR;
402 goto fail2;
403 }
404
389 p = entries + 1; 405 p = entries + 1;
390 q = entries + count - 1; 406 q = entries + count - 1;
391 while (p <= q) 407 while (p <= q)
@@ -423,8 +439,15 @@ dx_probe(struct dentry *dentry, struct inode *dir,
423 if (!(bh = ext3_bread (NULL,dir, dx_get_block(at), 0, err))) 439 if (!(bh = ext3_bread (NULL,dir, dx_get_block(at), 0, err)))
424 goto fail2; 440 goto fail2;
425 at = entries = ((struct dx_node *) bh->b_data)->entries; 441 at = entries = ((struct dx_node *) bh->b_data)->entries;
426 assert (dx_get_limit(entries) == dx_node_limit (dir)); 442 if (dx_get_limit(entries) != dx_node_limit (dir)) {
443 ext3_warning(dir->i_sb, __FUNCTION__,
444 "dx entry: limit != node limit");
445 brelse(bh);
446 *err = ERR_BAD_DX_DIR;
447 goto fail2;
448 }
427 frame++; 449 frame++;
450 frame->bh = NULL;
428 } 451 }
429fail2: 452fail2:
430 while (frame >= frame_in) { 453 while (frame >= frame_in) {
@@ -432,6 +455,10 @@ fail2:
432 frame--; 455 frame--;
433 } 456 }
434fail: 457fail:
458 if (*err == ERR_BAD_DX_DIR)
459 ext3_warning(dir->i_sb, __FUNCTION__,
460 "Corrupt dir inode %ld, running e2fsck is "
461 "recommended.", dir->i_ino);
435 return NULL; 462 return NULL;
436} 463}
437 464
@@ -671,6 +698,10 @@ errout:
671 * Directory block splitting, compacting 698 * Directory block splitting, compacting
672 */ 699 */
673 700
701/*
702 * Create map of hash values, offsets, and sizes, stored at end of block.
703 * Returns number of entries mapped.
704 */
674static int dx_make_map (struct ext3_dir_entry_2 *de, int size, 705static int dx_make_map (struct ext3_dir_entry_2 *de, int size,
675 struct dx_hash_info *hinfo, struct dx_map_entry *map_tail) 706 struct dx_hash_info *hinfo, struct dx_map_entry *map_tail)
676{ 707{
@@ -684,7 +715,8 @@ static int dx_make_map (struct ext3_dir_entry_2 *de, int size,
684 ext3fs_dirhash(de->name, de->name_len, &h); 715 ext3fs_dirhash(de->name, de->name_len, &h);
685 map_tail--; 716 map_tail--;
686 map_tail->hash = h.hash; 717 map_tail->hash = h.hash;
687 map_tail->offs = (u32) ((char *) de - base); 718 map_tail->offs = (u16) ((char *) de - base);
719 map_tail->size = le16_to_cpu(de->rec_len);
688 count++; 720 count++;
689 cond_resched(); 721 cond_resched();
690 } 722 }
@@ -694,6 +726,7 @@ static int dx_make_map (struct ext3_dir_entry_2 *de, int size,
694 return count; 726 return count;
695} 727}
696 728
729/* Sort map by hash value */
697static void dx_sort_map (struct dx_map_entry *map, unsigned count) 730static void dx_sort_map (struct dx_map_entry *map, unsigned count)
698{ 731{
699 struct dx_map_entry *p, *q, *top = map + count - 1; 732 struct dx_map_entry *p, *q, *top = map + count - 1;
@@ -1091,6 +1124,10 @@ static inline void ext3_set_de_type(struct super_block *sb,
1091} 1124}
1092 1125
1093#ifdef CONFIG_EXT3_INDEX 1126#ifdef CONFIG_EXT3_INDEX
1127/*
1128 * Move count entries from end of map between two memory locations.
1129 * Returns pointer to last entry moved.
1130 */
1094static struct ext3_dir_entry_2 * 1131static struct ext3_dir_entry_2 *
1095dx_move_dirents(char *from, char *to, struct dx_map_entry *map, int count) 1132dx_move_dirents(char *from, char *to, struct dx_map_entry *map, int count)
1096{ 1133{
@@ -1109,6 +1146,10 @@ dx_move_dirents(char *from, char *to, struct dx_map_entry *map, int count)
1109 return (struct ext3_dir_entry_2 *) (to - rec_len); 1146 return (struct ext3_dir_entry_2 *) (to - rec_len);
1110} 1147}
1111 1148
1149/*
1150 * Compact each dir entry in the range to the minimal rec_len.
1151 * Returns pointer to last entry in range.
1152 */
1112static struct ext3_dir_entry_2* dx_pack_dirents(char *base, int size) 1153static struct ext3_dir_entry_2* dx_pack_dirents(char *base, int size)
1113{ 1154{
1114 struct ext3_dir_entry_2 *next, *to, *prev, *de = (struct ext3_dir_entry_2 *) base; 1155 struct ext3_dir_entry_2 *next, *to, *prev, *de = (struct ext3_dir_entry_2 *) base;
@@ -1131,6 +1172,11 @@ static struct ext3_dir_entry_2* dx_pack_dirents(char *base, int size)
1131 return prev; 1172 return prev;
1132} 1173}
1133 1174
1175/*
1176 * Split a full leaf block to make room for a new dir entry.
1177 * Allocate a new block, and move entries so that they are approx. equally full.
1178 * Returns pointer to de in block into which the new entry will be inserted.
1179 */
1134static struct ext3_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, 1180static struct ext3_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
1135 struct buffer_head **bh,struct dx_frame *frame, 1181 struct buffer_head **bh,struct dx_frame *frame,
1136 struct dx_hash_info *hinfo, int *error) 1182 struct dx_hash_info *hinfo, int *error)
@@ -1142,7 +1188,7 @@ static struct ext3_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
1142 u32 hash2; 1188 u32 hash2;
1143 struct dx_map_entry *map; 1189 struct dx_map_entry *map;
1144 char *data1 = (*bh)->b_data, *data2; 1190 char *data1 = (*bh)->b_data, *data2;
1145 unsigned split; 1191 unsigned split, move, size, i;
1146 struct ext3_dir_entry_2 *de = NULL, *de2; 1192 struct ext3_dir_entry_2 *de = NULL, *de2;
1147 int err = 0; 1193 int err = 0;
1148 1194
@@ -1170,8 +1216,19 @@ static struct ext3_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
1170 count = dx_make_map ((struct ext3_dir_entry_2 *) data1, 1216 count = dx_make_map ((struct ext3_dir_entry_2 *) data1,
1171 blocksize, hinfo, map); 1217 blocksize, hinfo, map);
1172 map -= count; 1218 map -= count;
1173 split = count/2; // need to adjust to actual middle
1174 dx_sort_map (map, count); 1219 dx_sort_map (map, count);
1220 /* Split the existing block in the middle, size-wise */
1221 size = 0;
1222 move = 0;
1223 for (i = count-1; i >= 0; i--) {
1224 /* is more than half of this entry in 2nd half of the block? */
1225 if (size + map[i].size/2 > blocksize/2)
1226 break;
1227 size += map[i].size;
1228 move++;
1229 }
1230 /* map index at which we will split */
1231 split = count - move;
1175 hash2 = map[split].hash; 1232 hash2 = map[split].hash;
1176 continued = hash2 == map[split - 1].hash; 1233 continued = hash2 == map[split - 1].hash;
1177 dxtrace(printk("Split block %i at %x, %i/%i\n", 1234 dxtrace(printk("Split block %i at %x, %i/%i\n",
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 22cfdd61c0..9537316a07 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -2578,8 +2578,11 @@ static int ext3_release_dquot(struct dquot *dquot)
2578 2578
2579 handle = ext3_journal_start(dquot_to_inode(dquot), 2579 handle = ext3_journal_start(dquot_to_inode(dquot),
2580 EXT3_QUOTA_DEL_BLOCKS(dquot->dq_sb)); 2580 EXT3_QUOTA_DEL_BLOCKS(dquot->dq_sb));
2581 if (IS_ERR(handle)) 2581 if (IS_ERR(handle)) {
2582 /* Release dquot anyway to avoid endless cycle in dqput() */
2583 dquot_release(dquot);
2582 return PTR_ERR(handle); 2584 return PTR_ERR(handle);
2585 }
2583 ret = dquot_release(dquot); 2586 ret = dquot_release(dquot);
2584 err = ext3_journal_stop(handle); 2587 err = ext3_journal_stop(handle);
2585 if (!ret) 2588 if (!ret)
@@ -2712,6 +2715,12 @@ static ssize_t ext3_quota_write(struct super_block *sb, int type,
2712 struct buffer_head *bh; 2715 struct buffer_head *bh;
2713 handle_t *handle = journal_current_handle(); 2716 handle_t *handle = journal_current_handle();
2714 2717
2718 if (!handle) {
2719 printk(KERN_WARNING "EXT3-fs: Quota write (off=%Lu, len=%Lu)"
2720 " cancelled because transaction is not started.\n",
2721 (unsigned long long)off, (unsigned long long)len);
2722 return -EIO;
2723 }
2715 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); 2724 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
2716 while (towrite > 0) { 2725 while (towrite > 0) {
2717 tocopy = sb->s_blocksize - offset < towrite ? 2726 tocopy = sb->s_blocksize - offset < towrite ?
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index da224974af..5fdb862e71 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -140,7 +140,8 @@ struct dx_frame
140struct dx_map_entry 140struct dx_map_entry
141{ 141{
142 u32 hash; 142 u32 hash;
143 u32 offs; 143 u16 offs;
144 u16 size;
144}; 145};
145 146
146#ifdef CONFIG_EXT4_INDEX 147#ifdef CONFIG_EXT4_INDEX
@@ -379,13 +380,28 @@ dx_probe(struct dentry *dentry, struct inode *dir,
379 380
380 entries = (struct dx_entry *) (((char *)&root->info) + 381 entries = (struct dx_entry *) (((char *)&root->info) +
381 root->info.info_length); 382 root->info.info_length);
382 assert(dx_get_limit(entries) == dx_root_limit(dir, 383
383 root->info.info_length)); 384 if (dx_get_limit(entries) != dx_root_limit(dir,
385 root->info.info_length)) {
386 ext4_warning(dir->i_sb, __FUNCTION__,
387 "dx entry: limit != root limit");
388 brelse(bh);
389 *err = ERR_BAD_DX_DIR;
390 goto fail;
391 }
392
384 dxtrace (printk("Look up %x", hash)); 393 dxtrace (printk("Look up %x", hash));
385 while (1) 394 while (1)
386 { 395 {
387 count = dx_get_count(entries); 396 count = dx_get_count(entries);
388 assert (count && count <= dx_get_limit(entries)); 397 if (!count || count > dx_get_limit(entries)) {
398 ext4_warning(dir->i_sb, __FUNCTION__,
399 "dx entry: no count or count > limit");
400 brelse(bh);
401 *err = ERR_BAD_DX_DIR;
402 goto fail2;
403 }
404
389 p = entries + 1; 405 p = entries + 1;
390 q = entries + count - 1; 406 q = entries + count - 1;
391 while (p <= q) 407 while (p <= q)
@@ -423,8 +439,15 @@ dx_probe(struct dentry *dentry, struct inode *dir,
423 if (!(bh = ext4_bread (NULL,dir, dx_get_block(at), 0, err))) 439 if (!(bh = ext4_bread (NULL,dir, dx_get_block(at), 0, err)))
424 goto fail2; 440 goto fail2;
425 at = entries = ((struct dx_node *) bh->b_data)->entries; 441 at = entries = ((struct dx_node *) bh->b_data)->entries;
426 assert (dx_get_limit(entries) == dx_node_limit (dir)); 442 if (dx_get_limit(entries) != dx_node_limit (dir)) {
443 ext4_warning(dir->i_sb, __FUNCTION__,
444 "dx entry: limit != node limit");
445 brelse(bh);
446 *err = ERR_BAD_DX_DIR;
447 goto fail2;
448 }
427 frame++; 449 frame++;
450 frame->bh = NULL;
428 } 451 }
429fail2: 452fail2:
430 while (frame >= frame_in) { 453 while (frame >= frame_in) {
@@ -432,6 +455,10 @@ fail2:
432 frame--; 455 frame--;
433 } 456 }
434fail: 457fail:
458 if (*err == ERR_BAD_DX_DIR)
459 ext4_warning(dir->i_sb, __FUNCTION__,
460 "Corrupt dir inode %ld, running e2fsck is "
461 "recommended.", dir->i_ino);
435 return NULL; 462 return NULL;
436} 463}
437 464
@@ -671,6 +698,10 @@ errout:
671 * Directory block splitting, compacting 698 * Directory block splitting, compacting
672 */ 699 */
673 700
701/*
702 * Create map of hash values, offsets, and sizes, stored at end of block.
703 * Returns number of entries mapped.
704 */
674static int dx_make_map (struct ext4_dir_entry_2 *de, int size, 705static int dx_make_map (struct ext4_dir_entry_2 *de, int size,
675 struct dx_hash_info *hinfo, struct dx_map_entry *map_tail) 706 struct dx_hash_info *hinfo, struct dx_map_entry *map_tail)
676{ 707{
@@ -684,7 +715,8 @@ static int dx_make_map (struct ext4_dir_entry_2 *de, int size,
684 ext4fs_dirhash(de->name, de->name_len, &h); 715 ext4fs_dirhash(de->name, de->name_len, &h);
685 map_tail--; 716 map_tail--;
686 map_tail->hash = h.hash; 717 map_tail->hash = h.hash;
687 map_tail->offs = (u32) ((char *) de - base); 718 map_tail->offs = (u16) ((char *) de - base);
719 map_tail->size = le16_to_cpu(de->rec_len);
688 count++; 720 count++;
689 cond_resched(); 721 cond_resched();
690 } 722 }
@@ -694,6 +726,7 @@ static int dx_make_map (struct ext4_dir_entry_2 *de, int size,
694 return count; 726 return count;
695} 727}
696 728
729/* Sort map by hash value */
697static void dx_sort_map (struct dx_map_entry *map, unsigned count) 730static void dx_sort_map (struct dx_map_entry *map, unsigned count)
698{ 731{
699 struct dx_map_entry *p, *q, *top = map + count - 1; 732 struct dx_map_entry *p, *q, *top = map + count - 1;
@@ -1089,6 +1122,10 @@ static inline void ext4_set_de_type(struct super_block *sb,
1089} 1122}
1090 1123
1091#ifdef CONFIG_EXT4_INDEX 1124#ifdef CONFIG_EXT4_INDEX
1125/*
1126 * Move count entries from end of map between two memory locations.
1127 * Returns pointer to last entry moved.
1128 */
1092static struct ext4_dir_entry_2 * 1129static struct ext4_dir_entry_2 *
1093dx_move_dirents(char *from, char *to, struct dx_map_entry *map, int count) 1130dx_move_dirents(char *from, char *to, struct dx_map_entry *map, int count)
1094{ 1131{
@@ -1107,6 +1144,10 @@ dx_move_dirents(char *from, char *to, struct dx_map_entry *map, int count)
1107 return (struct ext4_dir_entry_2 *) (to - rec_len); 1144 return (struct ext4_dir_entry_2 *) (to - rec_len);
1108} 1145}
1109 1146
1147/*
1148 * Compact each dir entry in the range to the minimal rec_len.
1149 * Returns pointer to last entry in range.
1150 */
1110static struct ext4_dir_entry_2* dx_pack_dirents(char *base, int size) 1151static struct ext4_dir_entry_2* dx_pack_dirents(char *base, int size)
1111{ 1152{
1112 struct ext4_dir_entry_2 *next, *to, *prev, *de = (struct ext4_dir_entry_2 *) base; 1153 struct ext4_dir_entry_2 *next, *to, *prev, *de = (struct ext4_dir_entry_2 *) base;
@@ -1129,6 +1170,11 @@ static struct ext4_dir_entry_2* dx_pack_dirents(char *base, int size)
1129 return prev; 1170 return prev;
1130} 1171}
1131 1172
1173/*
1174 * Split a full leaf block to make room for a new dir entry.
1175 * Allocate a new block, and move entries so that they are approx. equally full.
1176 * Returns pointer to de in block into which the new entry will be inserted.
1177 */
1132static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, 1178static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
1133 struct buffer_head **bh,struct dx_frame *frame, 1179 struct buffer_head **bh,struct dx_frame *frame,
1134 struct dx_hash_info *hinfo, int *error) 1180 struct dx_hash_info *hinfo, int *error)
@@ -1140,7 +1186,7 @@ static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
1140 u32 hash2; 1186 u32 hash2;
1141 struct dx_map_entry *map; 1187 struct dx_map_entry *map;
1142 char *data1 = (*bh)->b_data, *data2; 1188 char *data1 = (*bh)->b_data, *data2;
1143 unsigned split; 1189 unsigned split, move, size, i;
1144 struct ext4_dir_entry_2 *de = NULL, *de2; 1190 struct ext4_dir_entry_2 *de = NULL, *de2;
1145 int err = 0; 1191 int err = 0;
1146 1192
@@ -1168,8 +1214,19 @@ static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
1168 count = dx_make_map ((struct ext4_dir_entry_2 *) data1, 1214 count = dx_make_map ((struct ext4_dir_entry_2 *) data1,
1169 blocksize, hinfo, map); 1215 blocksize, hinfo, map);
1170 map -= count; 1216 map -= count;
1171 split = count/2; // need to adjust to actual middle
1172 dx_sort_map (map, count); 1217 dx_sort_map (map, count);
1218 /* Split the existing block in the middle, size-wise */
1219 size = 0;
1220 move = 0;
1221 for (i = count-1; i >= 0; i--) {
1222 /* is more than half of this entry in 2nd half of the block? */
1223 if (size + map[i].size/2 > blocksize/2)
1224 break;
1225 size += map[i].size;
1226 move++;
1227 }
1228 /* map index at which we will split */
1229 split = count - move;
1173 hash2 = map[split].hash; 1230 hash2 = map[split].hash;
1174 continued = hash2 == map[split - 1].hash; 1231 continued = hash2 == map[split - 1].hash;
1175 dxtrace(printk("Split block %i at %x, %i/%i\n", 1232 dxtrace(printk("Split block %i at %x, %i/%i\n",
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4550b83ab1..3c1397fa83 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2698,8 +2698,11 @@ static int ext4_release_dquot(struct dquot *dquot)
2698 2698
2699 handle = ext4_journal_start(dquot_to_inode(dquot), 2699 handle = ext4_journal_start(dquot_to_inode(dquot),
2700 EXT4_QUOTA_DEL_BLOCKS(dquot->dq_sb)); 2700 EXT4_QUOTA_DEL_BLOCKS(dquot->dq_sb));
2701 if (IS_ERR(handle)) 2701 if (IS_ERR(handle)) {
2702 /* Release dquot anyway to avoid endless cycle in dqput() */
2703 dquot_release(dquot);
2702 return PTR_ERR(handle); 2704 return PTR_ERR(handle);
2705 }
2703 ret = dquot_release(dquot); 2706 ret = dquot_release(dquot);
2704 err = ext4_journal_stop(handle); 2707 err = ext4_journal_stop(handle);
2705 if (!ret) 2708 if (!ret)
@@ -2832,6 +2835,12 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,
2832 struct buffer_head *bh; 2835 struct buffer_head *bh;
2833 handle_t *handle = journal_current_handle(); 2836 handle_t *handle = journal_current_handle();
2834 2837
2838 if (!handle) {
2839 printk(KERN_WARNING "EXT4-fs: Quota write (off=%Lu, len=%Lu)"
2840 " cancelled because transaction is not started.\n",
2841 (unsigned long long)off, (unsigned long long)len);
2842 return -EIO;
2843 }
2835 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); 2844 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
2836 while (towrite > 0) { 2845 while (towrite > 0) {
2837 tocopy = sb->s_blocksize - offset < towrite ? 2846 tocopy = sb->s_blocksize - offset < towrite ?
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index c848a19152..950c2fbb81 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -82,14 +82,19 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma)
82 int ret; 82 int ret;
83 83
84 /* 84 /*
85 * vma alignment has already been checked by prepare_hugepage_range. 85 * vma address alignment (but not the pgoff alignment) has
86 * If you add any error returns here, do so after setting VM_HUGETLB, 86 * already been checked by prepare_hugepage_range. If you add
87 * so is_vm_hugetlb_page tests below unmap_region go the right way 87 * any error returns here, do so after setting VM_HUGETLB, so
88 * when do_mmap_pgoff unwinds (may be important on powerpc and ia64). 88 * is_vm_hugetlb_page tests below unmap_region go the right
89 * way when do_mmap_pgoff unwinds (may be important on powerpc
90 * and ia64).
89 */ 91 */
90 vma->vm_flags |= VM_HUGETLB | VM_RESERVED; 92 vma->vm_flags |= VM_HUGETLB | VM_RESERVED;
91 vma->vm_ops = &hugetlb_vm_ops; 93 vma->vm_ops = &hugetlb_vm_ops;
92 94
95 if (vma->vm_pgoff & ~(HPAGE_MASK >> PAGE_SHIFT))
96 return -EINVAL;
97
93 vma_len = (loff_t)(vma->vm_end - vma->vm_start); 98 vma_len = (loff_t)(vma->vm_end - vma->vm_start);
94 99
95 mutex_lock(&inode->i_mutex); 100 mutex_lock(&inode->i_mutex);
@@ -132,7 +137,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
132 return -ENOMEM; 137 return -ENOMEM;
133 138
134 if (flags & MAP_FIXED) { 139 if (flags & MAP_FIXED) {
135 if (prepare_hugepage_range(addr, len, pgoff)) 140 if (prepare_hugepage_range(addr, len))
136 return -EINVAL; 141 return -EINVAL;
137 return addr; 142 return addr;
138 } 143 }
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index dd64ddc11d..ed85f9afdb 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -647,7 +647,7 @@ unsigned char *jffs2_gc_fetch_page(struct jffs2_sb_info *c,
647 struct inode *inode = OFNI_EDONI_2SFFJ(f); 647 struct inode *inode = OFNI_EDONI_2SFFJ(f);
648 struct page *pg; 648 struct page *pg;
649 649
650 pg = read_cache_page(inode->i_mapping, offset >> PAGE_CACHE_SHIFT, 650 pg = read_cache_page_async(inode->i_mapping, offset >> PAGE_CACHE_SHIFT,
651 (void *)jffs2_do_readpage_unlock, inode); 651 (void *)jffs2_do_readpage_unlock, inode);
652 if (IS_ERR(pg)) 652 if (IS_ERR(pg))
653 return (void *)pg; 653 return (void *)pg;
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index a21e4bc544..d120ec39bc 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -171,19 +171,14 @@ found:
171 * GRANTED_RES message by cookie, without having to rely on the client's IP 171 * GRANTED_RES message by cookie, without having to rely on the client's IP
172 * address. --okir 172 * address. --okir
173 */ 173 */
174static inline struct nlm_block * 174static struct nlm_block *
175nlmsvc_create_block(struct svc_rqst *rqstp, struct nlm_file *file, 175nlmsvc_create_block(struct svc_rqst *rqstp, struct nlm_host *host,
176 struct nlm_lock *lock, struct nlm_cookie *cookie) 176 struct nlm_file *file, struct nlm_lock *lock,
177 struct nlm_cookie *cookie)
177{ 178{
178 struct nlm_block *block; 179 struct nlm_block *block;
179 struct nlm_host *host;
180 struct nlm_rqst *call = NULL; 180 struct nlm_rqst *call = NULL;
181 181
182 /* Create host handle for callback */
183 host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len);
184 if (host == NULL)
185 return NULL;
186
187 call = nlm_alloc_call(host); 182 call = nlm_alloc_call(host);
188 if (call == NULL) 183 if (call == NULL)
189 return NULL; 184 return NULL;
@@ -366,6 +361,7 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
366 struct nlm_lock *lock, int wait, struct nlm_cookie *cookie) 361 struct nlm_lock *lock, int wait, struct nlm_cookie *cookie)
367{ 362{
368 struct nlm_block *block = NULL; 363 struct nlm_block *block = NULL;
364 struct nlm_host *host;
369 int error; 365 int error;
370 __be32 ret; 366 __be32 ret;
371 367
@@ -377,6 +373,10 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
377 (long long)lock->fl.fl_end, 373 (long long)lock->fl.fl_end,
378 wait); 374 wait);
379 375
376 /* Create host handle for callback */
377 host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len);
378 if (host == NULL)
379 return nlm_lck_denied_nolocks;
380 380
381 /* Lock file against concurrent access */ 381 /* Lock file against concurrent access */
382 mutex_lock(&file->f_mutex); 382 mutex_lock(&file->f_mutex);
@@ -385,7 +385,8 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
385 */ 385 */
386 block = nlmsvc_lookup_block(file, lock); 386 block = nlmsvc_lookup_block(file, lock);
387 if (block == NULL) { 387 if (block == NULL) {
388 block = nlmsvc_create_block(rqstp, file, lock, cookie); 388 block = nlmsvc_create_block(rqstp, nlm_get_host(host), file,
389 lock, cookie);
389 ret = nlm_lck_denied_nolocks; 390 ret = nlm_lck_denied_nolocks;
390 if (block == NULL) 391 if (block == NULL)
391 goto out; 392 goto out;
@@ -449,6 +450,7 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
449out: 450out:
450 mutex_unlock(&file->f_mutex); 451 mutex_unlock(&file->f_mutex);
451 nlmsvc_release_block(block); 452 nlmsvc_release_block(block);
453 nlm_release_host(host);
452 dprintk("lockd: nlmsvc_lock returned %u\n", ret); 454 dprintk("lockd: nlmsvc_lock returned %u\n", ret);
453 return ret; 455 return ret;
454} 456}
@@ -477,10 +479,17 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
477 479
478 if (block == NULL) { 480 if (block == NULL) {
479 struct file_lock *conf = kzalloc(sizeof(*conf), GFP_KERNEL); 481 struct file_lock *conf = kzalloc(sizeof(*conf), GFP_KERNEL);
482 struct nlm_host *host;
480 483
481 if (conf == NULL) 484 if (conf == NULL)
482 return nlm_granted; 485 return nlm_granted;
483 block = nlmsvc_create_block(rqstp, file, lock, cookie); 486 /* Create host handle for callback */
487 host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len);
488 if (host == NULL) {
489 kfree(conf);
490 return nlm_lck_denied_nolocks;
491 }
492 block = nlmsvc_create_block(rqstp, host, file, lock, cookie);
484 if (block == NULL) { 493 if (block == NULL) {
485 kfree(conf); 494 kfree(conf);
486 return nlm_granted; 495 return nlm_granted;
diff --git a/fs/locks.c b/fs/locks.c
index 50857d2d34..c795eaaf6c 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -782,7 +782,7 @@ find_conflict:
782 if (request->fl_flags & FL_ACCESS) 782 if (request->fl_flags & FL_ACCESS)
783 goto out; 783 goto out;
784 locks_copy_lock(new_fl, request); 784 locks_copy_lock(new_fl, request);
785 locks_insert_lock(&inode->i_flock, new_fl); 785 locks_insert_lock(before, new_fl);
786 new_fl = NULL; 786 new_fl = NULL;
787 error = 0; 787 error = 0;
788 788
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index a49f9feff7..a204484072 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -588,16 +588,6 @@ static int nfs_init_server(struct nfs_server *server, const struct nfs_mount_dat
588 server->namelen = data->namlen; 588 server->namelen = data->namlen;
589 /* Create a client RPC handle for the NFSv3 ACL management interface */ 589 /* Create a client RPC handle for the NFSv3 ACL management interface */
590 nfs_init_server_aclclient(server); 590 nfs_init_server_aclclient(server);
591 if (clp->cl_nfsversion == 3) {
592 if (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN)
593 server->namelen = NFS3_MAXNAMLEN;
594 if (!(data->flags & NFS_MOUNT_NORDIRPLUS))
595 server->caps |= NFS_CAP_READDIRPLUS;
596 } else {
597 if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
598 server->namelen = NFS2_MAXNAMLEN;
599 }
600
601 dprintk("<-- nfs_init_server() = 0 [new %p]\n", clp); 591 dprintk("<-- nfs_init_server() = 0 [new %p]\n", clp);
602 return 0; 592 return 0;
603 593
@@ -794,6 +784,16 @@ struct nfs_server *nfs_create_server(const struct nfs_mount_data *data,
794 error = nfs_probe_fsinfo(server, mntfh, &fattr); 784 error = nfs_probe_fsinfo(server, mntfh, &fattr);
795 if (error < 0) 785 if (error < 0)
796 goto error; 786 goto error;
787 if (server->nfs_client->rpc_ops->version == 3) {
788 if (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN)
789 server->namelen = NFS3_MAXNAMLEN;
790 if (!(data->flags & NFS_MOUNT_NORDIRPLUS))
791 server->caps |= NFS_CAP_READDIRPLUS;
792 } else {
793 if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
794 server->namelen = NFS2_MAXNAMLEN;
795 }
796
797 if (!(fattr.valid & NFS_ATTR_FATTR)) { 797 if (!(fattr.valid & NFS_ATTR_FATTR)) {
798 error = server->nfs_client->rpc_ops->getattr(server, mntfh, &fattr); 798 error = server->nfs_client->rpc_ops->getattr(server, mntfh, &fattr);
799 if (error < 0) { 799 if (error < 0) {
@@ -984,6 +984,9 @@ struct nfs_server *nfs4_create_server(const struct nfs4_mount_data *data,
984 if (error < 0) 984 if (error < 0)
985 goto error; 985 goto error;
986 986
987 if (server->namelen == 0 || server->namelen > NFS4_MAXNAMLEN)
988 server->namelen = NFS4_MAXNAMLEN;
989
987 BUG_ON(!server->nfs_client); 990 BUG_ON(!server->nfs_client);
988 BUG_ON(!server->nfs_client->rpc_ops); 991 BUG_ON(!server->nfs_client->rpc_ops);
989 BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops); 992 BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);
@@ -1056,6 +1059,9 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
1056 if (error < 0) 1059 if (error < 0)
1057 goto error; 1060 goto error;
1058 1061
1062 if (server->namelen == 0 || server->namelen > NFS4_MAXNAMLEN)
1063 server->namelen = NFS4_MAXNAMLEN;
1064
1059 dprintk("Referral FSID: %llx:%llx\n", 1065 dprintk("Referral FSID: %llx:%llx\n",
1060 (unsigned long long) server->fsid.major, 1066 (unsigned long long) server->fsid.major,
1061 (unsigned long long) server->fsid.minor); 1067 (unsigned long long) server->fsid.minor);
@@ -1115,6 +1121,9 @@ struct nfs_server *nfs_clone_server(struct nfs_server *source,
1115 if (error < 0) 1121 if (error < 0)
1116 goto out_free_server; 1122 goto out_free_server;
1117 1123
1124 if (server->namelen == 0 || server->namelen > NFS4_MAXNAMLEN)
1125 server->namelen = NFS4_MAXNAMLEN;
1126
1118 dprintk("Cloned FSID: %llx:%llx\n", 1127 dprintk("Cloned FSID: %llx:%llx\n",
1119 (unsigned long long) server->fsid.major, 1128 (unsigned long long) server->fsid.major,
1120 (unsigned long long) server->fsid.minor); 1129 (unsigned long long) server->fsid.minor);
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index ea97408e42..e4a04d16b8 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1162,6 +1162,8 @@ static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc)
1162 } 1162 }
1163 if (!desc->plus || !(entry->fattr->valid & NFS_ATTR_FATTR)) 1163 if (!desc->plus || !(entry->fattr->valid & NFS_ATTR_FATTR))
1164 return NULL; 1164 return NULL;
1165 if (name.len > NFS_SERVER(dir)->namelen)
1166 return NULL;
1165 /* Note: caller is already holding the dir->i_mutex! */ 1167 /* Note: caller is already holding the dir->i_mutex! */
1166 dentry = d_alloc(parent, &name); 1168 dentry = d_alloc(parent, &name);
1167 if (dentry == NULL) 1169 if (dentry == NULL)
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index c87dc713b5..579cf8a7d4 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -316,7 +316,7 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset)
316 if (offset != 0) 316 if (offset != 0)
317 return; 317 return;
318 /* Cancel any unstarted writes on this page */ 318 /* Cancel any unstarted writes on this page */
319 nfs_wb_page_priority(page->mapping->host, page, FLUSH_INVALIDATE); 319 nfs_wb_page_cancel(page->mapping->host, page);
320} 320}
321 321
322static int nfs_release_page(struct page *page, gfp_t gfp) 322static int nfs_release_page(struct page *page, gfp_t gfp)
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c
index d1cbf0a0fb..522e5ad4d8 100644
--- a/fs/nfs/getroot.c
+++ b/fs/nfs/getroot.c
@@ -175,6 +175,9 @@ next_component:
175 path++; 175 path++;
176 name.len = path - (const char *) name.name; 176 name.len = path - (const char *) name.name;
177 177
178 if (name.len > NFS4_MAXNAMLEN)
179 return -ENAMETOOLONG;
180
178eat_dot_dir: 181eat_dot_dir:
179 while (*path == '/') 182 while (*path == '/')
180 path++; 183 path++;
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
index aea76d0e5f..acfc56f9ed 100644
--- a/fs/nfs/namespace.c
+++ b/fs/nfs/namespace.c
@@ -176,7 +176,7 @@ static void nfs_expire_automounts(struct work_struct *work)
176void nfs_release_automount_timer(void) 176void nfs_release_automount_timer(void)
177{ 177{
178 if (list_empty(&nfs_automount_list)) 178 if (list_empty(&nfs_automount_list))
179 cancel_delayed_work_sync(&nfs_automount_task); 179 cancel_delayed_work(&nfs_automount_task);
180} 180}
181 181
182/* 182/*
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 62b3ae2803..4b90e17555 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -646,7 +646,7 @@ static int _nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state
646 rcu_read_lock(); 646 rcu_read_lock();
647 delegation = rcu_dereference(NFS_I(state->inode)->delegation); 647 delegation = rcu_dereference(NFS_I(state->inode)->delegation);
648 if (delegation != NULL && (delegation->flags & NFS_DELEGATION_NEED_RECLAIM) != 0) 648 if (delegation != NULL && (delegation->flags & NFS_DELEGATION_NEED_RECLAIM) != 0)
649 delegation_type = delegation->flags; 649 delegation_type = delegation->type;
650 rcu_read_unlock(); 650 rcu_read_unlock();
651 opendata->o_arg.u.delegation_type = delegation_type; 651 opendata->o_arg.u.delegation_type = delegation_type;
652 status = nfs4_open_recover(opendata, state); 652 status = nfs4_open_recover(opendata, state);
@@ -1434,7 +1434,7 @@ nfs4_atomic_open(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
1434 } 1434 }
1435 res = d_add_unique(dentry, igrab(state->inode)); 1435 res = d_add_unique(dentry, igrab(state->inode));
1436 if (res != NULL) 1436 if (res != NULL)
1437 dentry = res; 1437 path.dentry = res;
1438 nfs4_intent_set_file(nd, &path, state); 1438 nfs4_intent_set_file(nd, &path, state);
1439 return res; 1439 return res;
1440} 1440}
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index b2a851c1b8..b878528b64 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -345,8 +345,8 @@ void __exit unregister_nfs_fs(void)
345 unregister_shrinker(&acl_shrinker); 345 unregister_shrinker(&acl_shrinker);
346#ifdef CONFIG_NFS_V4 346#ifdef CONFIG_NFS_V4
347 unregister_filesystem(&nfs4_fs_type); 347 unregister_filesystem(&nfs4_fs_type);
348 nfs_unregister_sysctl();
349#endif 348#endif
349 nfs_unregister_sysctl();
350 unregister_filesystem(&nfs_fs_type); 350 unregister_filesystem(&nfs_fs_type);
351} 351}
352 352
@@ -911,13 +911,13 @@ static int nfs_parse_mount_options(char *raw,
911 kfree(string); 911 kfree(string);
912 912
913 switch (token) { 913 switch (token) {
914 case Opt_udp: 914 case Opt_xprt_udp:
915 mnt->flags &= ~NFS_MOUNT_TCP; 915 mnt->flags &= ~NFS_MOUNT_TCP;
916 mnt->nfs_server.protocol = IPPROTO_UDP; 916 mnt->nfs_server.protocol = IPPROTO_UDP;
917 mnt->timeo = 7; 917 mnt->timeo = 7;
918 mnt->retrans = 5; 918 mnt->retrans = 5;
919 break; 919 break;
920 case Opt_tcp: 920 case Opt_xprt_tcp:
921 mnt->flags |= NFS_MOUNT_TCP; 921 mnt->flags |= NFS_MOUNT_TCP;
922 mnt->nfs_server.protocol = IPPROTO_TCP; 922 mnt->nfs_server.protocol = IPPROTO_TCP;
923 mnt->timeo = 600; 923 mnt->timeo = 600;
@@ -936,10 +936,10 @@ static int nfs_parse_mount_options(char *raw,
936 kfree(string); 936 kfree(string);
937 937
938 switch (token) { 938 switch (token) {
939 case Opt_udp: 939 case Opt_xprt_udp:
940 mnt->mount_server.protocol = IPPROTO_UDP; 940 mnt->mount_server.protocol = IPPROTO_UDP;
941 break; 941 break;
942 case Opt_tcp: 942 case Opt_xprt_tcp:
943 mnt->mount_server.protocol = IPPROTO_TCP; 943 mnt->mount_server.protocol = IPPROTO_TCP;
944 break; 944 break;
945 default: 945 default:
@@ -1153,20 +1153,20 @@ static int nfs_validate_mount_data(struct nfs_mount_data **options,
1153 c = strchr(dev_name, ':'); 1153 c = strchr(dev_name, ':');
1154 if (c == NULL) 1154 if (c == NULL)
1155 return -EINVAL; 1155 return -EINVAL;
1156 len = c - dev_name - 1; 1156 len = c - dev_name;
1157 if (len > sizeof(data->hostname)) 1157 if (len > sizeof(data->hostname))
1158 return -EINVAL; 1158 return -ENAMETOOLONG;
1159 strncpy(data->hostname, dev_name, len); 1159 strncpy(data->hostname, dev_name, len);
1160 args.nfs_server.hostname = data->hostname; 1160 args.nfs_server.hostname = data->hostname;
1161 1161
1162 c++; 1162 c++;
1163 if (strlen(c) > NFS_MAXPATHLEN) 1163 if (strlen(c) > NFS_MAXPATHLEN)
1164 return -EINVAL; 1164 return -ENAMETOOLONG;
1165 args.nfs_server.export_path = c; 1165 args.nfs_server.export_path = c;
1166 1166
1167 status = nfs_try_mount(&args, mntfh); 1167 status = nfs_try_mount(&args, mntfh);
1168 if (status) 1168 if (status)
1169 return -EINVAL; 1169 return status;
1170 1170
1171 /* 1171 /*
1172 * Translate to nfs_mount_data, which nfs_fill_super 1172 * Translate to nfs_mount_data, which nfs_fill_super
@@ -1303,34 +1303,6 @@ static void nfs_clone_super(struct super_block *sb,
1303 nfs_initialise_sb(sb); 1303 nfs_initialise_sb(sb);
1304} 1304}
1305 1305
1306static int nfs_set_super(struct super_block *s, void *_server)
1307{
1308 struct nfs_server *server = _server;
1309 int ret;
1310
1311 s->s_fs_info = server;
1312 ret = set_anon_super(s, server);
1313 if (ret == 0)
1314 server->s_dev = s->s_dev;
1315 return ret;
1316}
1317
1318static int nfs_compare_super(struct super_block *sb, void *data)
1319{
1320 struct nfs_server *server = data, *old = NFS_SB(sb);
1321
1322 if (memcmp(&old->nfs_client->cl_addr,
1323 &server->nfs_client->cl_addr,
1324 sizeof(old->nfs_client->cl_addr)) != 0)
1325 return 0;
1326 /* Note: NFS_MOUNT_UNSHARED == NFS4_MOUNT_UNSHARED */
1327 if (old->flags & NFS_MOUNT_UNSHARED)
1328 return 0;
1329 if (memcmp(&old->fsid, &server->fsid, sizeof(old->fsid)) != 0)
1330 return 0;
1331 return 1;
1332}
1333
1334#define NFS_MS_MASK (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_SYNCHRONOUS) 1306#define NFS_MS_MASK (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_SYNCHRONOUS)
1335 1307
1336static int nfs_compare_mount_options(const struct super_block *s, const struct nfs_server *b, int flags) 1308static int nfs_compare_mount_options(const struct super_block *s, const struct nfs_server *b, int flags)
@@ -1359,9 +1331,46 @@ static int nfs_compare_mount_options(const struct super_block *s, const struct n
1359 goto Ebusy; 1331 goto Ebusy;
1360 if (clnt_a->cl_auth->au_flavor != clnt_b->cl_auth->au_flavor) 1332 if (clnt_a->cl_auth->au_flavor != clnt_b->cl_auth->au_flavor)
1361 goto Ebusy; 1333 goto Ebusy;
1362 return 0; 1334 return 1;
1363Ebusy: 1335Ebusy:
1364 return -EBUSY; 1336 return 0;
1337}
1338
1339struct nfs_sb_mountdata {
1340 struct nfs_server *server;
1341 int mntflags;
1342};
1343
1344static int nfs_set_super(struct super_block *s, void *data)
1345{
1346 struct nfs_sb_mountdata *sb_mntdata = data;
1347 struct nfs_server *server = sb_mntdata->server;
1348 int ret;
1349
1350 s->s_flags = sb_mntdata->mntflags;
1351 s->s_fs_info = server;
1352 ret = set_anon_super(s, server);
1353 if (ret == 0)
1354 server->s_dev = s->s_dev;
1355 return ret;
1356}
1357
1358static int nfs_compare_super(struct super_block *sb, void *data)
1359{
1360 struct nfs_sb_mountdata *sb_mntdata = data;
1361 struct nfs_server *server = sb_mntdata->server, *old = NFS_SB(sb);
1362 int mntflags = sb_mntdata->mntflags;
1363
1364 if (memcmp(&old->nfs_client->cl_addr,
1365 &server->nfs_client->cl_addr,
1366 sizeof(old->nfs_client->cl_addr)) != 0)
1367 return 0;
1368 /* Note: NFS_MOUNT_UNSHARED == NFS4_MOUNT_UNSHARED */
1369 if (old->flags & NFS_MOUNT_UNSHARED)
1370 return 0;
1371 if (memcmp(&old->fsid, &server->fsid, sizeof(old->fsid)) != 0)
1372 return 0;
1373 return nfs_compare_mount_options(sb, server, mntflags);
1365} 1374}
1366 1375
1367static int nfs_get_sb(struct file_system_type *fs_type, 1376static int nfs_get_sb(struct file_system_type *fs_type,
@@ -1373,6 +1382,9 @@ static int nfs_get_sb(struct file_system_type *fs_type,
1373 struct nfs_mount_data *data = raw_data; 1382 struct nfs_mount_data *data = raw_data;
1374 struct dentry *mntroot; 1383 struct dentry *mntroot;
1375 int (*compare_super)(struct super_block *, void *) = nfs_compare_super; 1384 int (*compare_super)(struct super_block *, void *) = nfs_compare_super;
1385 struct nfs_sb_mountdata sb_mntdata = {
1386 .mntflags = flags,
1387 };
1376 int error; 1388 int error;
1377 1389
1378 /* Validate the mount data */ 1390 /* Validate the mount data */
@@ -1386,28 +1398,25 @@ static int nfs_get_sb(struct file_system_type *fs_type,
1386 error = PTR_ERR(server); 1398 error = PTR_ERR(server);
1387 goto out; 1399 goto out;
1388 } 1400 }
1401 sb_mntdata.server = server;
1389 1402
1390 if (server->flags & NFS_MOUNT_UNSHARED) 1403 if (server->flags & NFS_MOUNT_UNSHARED)
1391 compare_super = NULL; 1404 compare_super = NULL;
1392 1405
1393 /* Get a superblock - note that we may end up sharing one that already exists */ 1406 /* Get a superblock - note that we may end up sharing one that already exists */
1394 s = sget(fs_type, compare_super, nfs_set_super, server); 1407 s = sget(fs_type, compare_super, nfs_set_super, &sb_mntdata);
1395 if (IS_ERR(s)) { 1408 if (IS_ERR(s)) {
1396 error = PTR_ERR(s); 1409 error = PTR_ERR(s);
1397 goto out_err_nosb; 1410 goto out_err_nosb;
1398 } 1411 }
1399 1412
1400 if (s->s_fs_info != server) { 1413 if (s->s_fs_info != server) {
1401 error = nfs_compare_mount_options(s, server, flags);
1402 nfs_free_server(server); 1414 nfs_free_server(server);
1403 server = NULL; 1415 server = NULL;
1404 if (error < 0)
1405 goto error_splat_super;
1406 } 1416 }
1407 1417
1408 if (!s->s_root) { 1418 if (!s->s_root) {
1409 /* initial superblock/root creation */ 1419 /* initial superblock/root creation */
1410 s->s_flags = flags;
1411 nfs_fill_super(s, data); 1420 nfs_fill_super(s, data);
1412 } 1421 }
1413 1422
@@ -1460,6 +1469,9 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags,
1460 struct nfs_server *server; 1469 struct nfs_server *server;
1461 struct dentry *mntroot; 1470 struct dentry *mntroot;
1462 int (*compare_super)(struct super_block *, void *) = nfs_compare_super; 1471 int (*compare_super)(struct super_block *, void *) = nfs_compare_super;
1472 struct nfs_sb_mountdata sb_mntdata = {
1473 .mntflags = flags,
1474 };
1463 int error; 1475 int error;
1464 1476
1465 dprintk("--> nfs_xdev_get_sb()\n"); 1477 dprintk("--> nfs_xdev_get_sb()\n");
@@ -1470,28 +1482,25 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags,
1470 error = PTR_ERR(server); 1482 error = PTR_ERR(server);
1471 goto out_err_noserver; 1483 goto out_err_noserver;
1472 } 1484 }
1485 sb_mntdata.server = server;
1473 1486
1474 if (server->flags & NFS_MOUNT_UNSHARED) 1487 if (server->flags & NFS_MOUNT_UNSHARED)
1475 compare_super = NULL; 1488 compare_super = NULL;
1476 1489
1477 /* Get a superblock - note that we may end up sharing one that already exists */ 1490 /* Get a superblock - note that we may end up sharing one that already exists */
1478 s = sget(&nfs_fs_type, compare_super, nfs_set_super, server); 1491 s = sget(&nfs_fs_type, compare_super, nfs_set_super, &sb_mntdata);
1479 if (IS_ERR(s)) { 1492 if (IS_ERR(s)) {
1480 error = PTR_ERR(s); 1493 error = PTR_ERR(s);
1481 goto out_err_nosb; 1494 goto out_err_nosb;
1482 } 1495 }
1483 1496
1484 if (s->s_fs_info != server) { 1497 if (s->s_fs_info != server) {
1485 error = nfs_compare_mount_options(s, server, flags);
1486 nfs_free_server(server); 1498 nfs_free_server(server);
1487 server = NULL; 1499 server = NULL;
1488 if (error < 0)
1489 goto error_splat_super;
1490 } 1500 }
1491 1501
1492 if (!s->s_root) { 1502 if (!s->s_root) {
1493 /* initial superblock/root creation */ 1503 /* initial superblock/root creation */
1494 s->s_flags = flags;
1495 nfs_clone_super(s, data->sb); 1504 nfs_clone_super(s, data->sb);
1496 } 1505 }
1497 1506
@@ -1668,7 +1677,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
1668 /* while calculating len, pretend ':' is '\0' */ 1677 /* while calculating len, pretend ':' is '\0' */
1669 len = c - dev_name; 1678 len = c - dev_name;
1670 if (len > NFS4_MAXNAMLEN) 1679 if (len > NFS4_MAXNAMLEN)
1671 return -EINVAL; 1680 return -ENAMETOOLONG;
1672 *hostname = kzalloc(len, GFP_KERNEL); 1681 *hostname = kzalloc(len, GFP_KERNEL);
1673 if (*hostname == NULL) 1682 if (*hostname == NULL)
1674 return -ENOMEM; 1683 return -ENOMEM;
@@ -1677,7 +1686,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
1677 c++; /* step over the ':' */ 1686 c++; /* step over the ':' */
1678 len = strlen(c); 1687 len = strlen(c);
1679 if (len > NFS4_MAXPATHLEN) 1688 if (len > NFS4_MAXPATHLEN)
1680 return -EINVAL; 1689 return -ENAMETOOLONG;
1681 *mntpath = kzalloc(len + 1, GFP_KERNEL); 1690 *mntpath = kzalloc(len + 1, GFP_KERNEL);
1682 if (*mntpath == NULL) 1691 if (*mntpath == NULL)
1683 return -ENOMEM; 1692 return -ENOMEM;
@@ -1729,6 +1738,9 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
1729 struct dentry *mntroot; 1738 struct dentry *mntroot;
1730 char *mntpath = NULL, *hostname = NULL, *ip_addr = NULL; 1739 char *mntpath = NULL, *hostname = NULL, *ip_addr = NULL;
1731 int (*compare_super)(struct super_block *, void *) = nfs_compare_super; 1740 int (*compare_super)(struct super_block *, void *) = nfs_compare_super;
1741 struct nfs_sb_mountdata sb_mntdata = {
1742 .mntflags = flags,
1743 };
1732 int error; 1744 int error;
1733 1745
1734 /* Validate the mount data */ 1746 /* Validate the mount data */
@@ -1744,12 +1756,13 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
1744 error = PTR_ERR(server); 1756 error = PTR_ERR(server);
1745 goto out; 1757 goto out;
1746 } 1758 }
1759 sb_mntdata.server = server;
1747 1760
1748 if (server->flags & NFS4_MOUNT_UNSHARED) 1761 if (server->flags & NFS4_MOUNT_UNSHARED)
1749 compare_super = NULL; 1762 compare_super = NULL;
1750 1763
1751 /* Get a superblock - note that we may end up sharing one that already exists */ 1764 /* Get a superblock - note that we may end up sharing one that already exists */
1752 s = sget(fs_type, compare_super, nfs_set_super, server); 1765 s = sget(fs_type, compare_super, nfs_set_super, &sb_mntdata);
1753 if (IS_ERR(s)) { 1766 if (IS_ERR(s)) {
1754 error = PTR_ERR(s); 1767 error = PTR_ERR(s);
1755 goto out_free; 1768 goto out_free;
@@ -1762,7 +1775,6 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
1762 1775
1763 if (!s->s_root) { 1776 if (!s->s_root) {
1764 /* initial superblock/root creation */ 1777 /* initial superblock/root creation */
1765 s->s_flags = flags;
1766 nfs4_fill_super(s); 1778 nfs4_fill_super(s);
1767 } 1779 }
1768 1780
@@ -1816,6 +1828,9 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags,
1816 struct nfs_server *server; 1828 struct nfs_server *server;
1817 struct dentry *mntroot; 1829 struct dentry *mntroot;
1818 int (*compare_super)(struct super_block *, void *) = nfs_compare_super; 1830 int (*compare_super)(struct super_block *, void *) = nfs_compare_super;
1831 struct nfs_sb_mountdata sb_mntdata = {
1832 .mntflags = flags,
1833 };
1819 int error; 1834 int error;
1820 1835
1821 dprintk("--> nfs4_xdev_get_sb()\n"); 1836 dprintk("--> nfs4_xdev_get_sb()\n");
@@ -1826,12 +1841,13 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags,
1826 error = PTR_ERR(server); 1841 error = PTR_ERR(server);
1827 goto out_err_noserver; 1842 goto out_err_noserver;
1828 } 1843 }
1844 sb_mntdata.server = server;
1829 1845
1830 if (server->flags & NFS4_MOUNT_UNSHARED) 1846 if (server->flags & NFS4_MOUNT_UNSHARED)
1831 compare_super = NULL; 1847 compare_super = NULL;
1832 1848
1833 /* Get a superblock - note that we may end up sharing one that already exists */ 1849 /* Get a superblock - note that we may end up sharing one that already exists */
1834 s = sget(&nfs_fs_type, compare_super, nfs_set_super, server); 1850 s = sget(&nfs_fs_type, compare_super, nfs_set_super, &sb_mntdata);
1835 if (IS_ERR(s)) { 1851 if (IS_ERR(s)) {
1836 error = PTR_ERR(s); 1852 error = PTR_ERR(s);
1837 goto out_err_nosb; 1853 goto out_err_nosb;
@@ -1844,7 +1860,6 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags,
1844 1860
1845 if (!s->s_root) { 1861 if (!s->s_root) {
1846 /* initial superblock/root creation */ 1862 /* initial superblock/root creation */
1847 s->s_flags = flags;
1848 nfs4_clone_super(s, data->sb); 1863 nfs4_clone_super(s, data->sb);
1849 } 1864 }
1850 1865
@@ -1887,6 +1902,9 @@ static int nfs4_referral_get_sb(struct file_system_type *fs_type, int flags,
1887 struct dentry *mntroot; 1902 struct dentry *mntroot;
1888 struct nfs_fh mntfh; 1903 struct nfs_fh mntfh;
1889 int (*compare_super)(struct super_block *, void *) = nfs_compare_super; 1904 int (*compare_super)(struct super_block *, void *) = nfs_compare_super;
1905 struct nfs_sb_mountdata sb_mntdata = {
1906 .mntflags = flags,
1907 };
1890 int error; 1908 int error;
1891 1909
1892 dprintk("--> nfs4_referral_get_sb()\n"); 1910 dprintk("--> nfs4_referral_get_sb()\n");
@@ -1897,12 +1915,13 @@ static int nfs4_referral_get_sb(struct file_system_type *fs_type, int flags,
1897 error = PTR_ERR(server); 1915 error = PTR_ERR(server);
1898 goto out_err_noserver; 1916 goto out_err_noserver;
1899 } 1917 }
1918 sb_mntdata.server = server;
1900 1919
1901 if (server->flags & NFS4_MOUNT_UNSHARED) 1920 if (server->flags & NFS4_MOUNT_UNSHARED)
1902 compare_super = NULL; 1921 compare_super = NULL;
1903 1922
1904 /* Get a superblock - note that we may end up sharing one that already exists */ 1923 /* Get a superblock - note that we may end up sharing one that already exists */
1905 s = sget(&nfs_fs_type, compare_super, nfs_set_super, server); 1924 s = sget(&nfs_fs_type, compare_super, nfs_set_super, &sb_mntdata);
1906 if (IS_ERR(s)) { 1925 if (IS_ERR(s)) {
1907 error = PTR_ERR(s); 1926 error = PTR_ERR(s);
1908 goto out_err_nosb; 1927 goto out_err_nosb;
@@ -1915,7 +1934,6 @@ static int nfs4_referral_get_sb(struct file_system_type *fs_type, int flags,
1915 1934
1916 if (!s->s_root) { 1935 if (!s->s_root) {
1917 /* initial superblock/root creation */ 1936 /* initial superblock/root creation */
1918 s->s_flags = flags;
1919 nfs4_fill_super(s); 1937 nfs4_fill_super(s);
1920 } 1938 }
1921 1939
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index ef97e0c0f5..0d7a77cc39 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1396,6 +1396,50 @@ out:
1396 return ret; 1396 return ret;
1397} 1397}
1398 1398
1399int nfs_wb_page_cancel(struct inode *inode, struct page *page)
1400{
1401 struct nfs_page *req;
1402 loff_t range_start = page_offset(page);
1403 loff_t range_end = range_start + (loff_t)(PAGE_CACHE_SIZE - 1);
1404 struct writeback_control wbc = {
1405 .bdi = page->mapping->backing_dev_info,
1406 .sync_mode = WB_SYNC_ALL,
1407 .nr_to_write = LONG_MAX,
1408 .range_start = range_start,
1409 .range_end = range_end,
1410 };
1411 int ret = 0;
1412
1413 BUG_ON(!PageLocked(page));
1414 for (;;) {
1415 req = nfs_page_find_request(page);
1416 if (req == NULL)
1417 goto out;
1418 if (test_bit(PG_NEED_COMMIT, &req->wb_flags)) {
1419 nfs_release_request(req);
1420 break;
1421 }
1422 if (nfs_lock_request_dontget(req)) {
1423 nfs_inode_remove_request(req);
1424 /*
1425 * In case nfs_inode_remove_request has marked the
1426 * page as being dirty
1427 */
1428 cancel_dirty_page(page, PAGE_CACHE_SIZE);
1429 nfs_unlock_request(req);
1430 break;
1431 }
1432 ret = nfs_wait_on_request(req);
1433 if (ret < 0)
1434 goto out;
1435 }
1436 if (!PagePrivate(page))
1437 return 0;
1438 ret = nfs_sync_mapping_wait(page->mapping, &wbc, FLUSH_INVALIDATE);
1439out:
1440 return ret;
1441}
1442
1399int nfs_wb_page_priority(struct inode *inode, struct page *page, int how) 1443int nfs_wb_page_priority(struct inode *inode, struct page *page, int how)
1400{ 1444{
1401 loff_t range_start = page_offset(page); 1445 loff_t range_start = page_offset(page);
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index 0eb464a39a..7011d62acf 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -566,13 +566,23 @@ enum fsid_source fsid_source(struct svc_fh *fhp)
566 case FSID_DEV: 566 case FSID_DEV:
567 case FSID_ENCODE_DEV: 567 case FSID_ENCODE_DEV:
568 case FSID_MAJOR_MINOR: 568 case FSID_MAJOR_MINOR:
569 return FSIDSOURCE_DEV; 569 if (fhp->fh_export->ex_dentry->d_inode->i_sb->s_type->fs_flags
570 & FS_REQUIRES_DEV)
571 return FSIDSOURCE_DEV;
572 break;
570 case FSID_NUM: 573 case FSID_NUM:
571 return FSIDSOURCE_FSID;
572 default:
573 if (fhp->fh_export->ex_flags & NFSEXP_FSID) 574 if (fhp->fh_export->ex_flags & NFSEXP_FSID)
574 return FSIDSOURCE_FSID; 575 return FSIDSOURCE_FSID;
575 else 576 break;
576 return FSIDSOURCE_UUID; 577 default:
578 break;
577 } 579 }
580 /* either a UUID type filehandle, or the filehandle doesn't
581 * match the export.
582 */
583 if (fhp->fh_export->ex_flags & NFSEXP_FSID)
584 return FSIDSOURCE_FSID;
585 if (fhp->fh_export->ex_uuid)
586 return FSIDSOURCE_UUID;
587 return FSIDSOURCE_DEV;
578} 588}
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index a0c2b25381..7867151ebb 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -115,7 +115,8 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
115 115
116 exp2 = rqst_exp_get_by_name(rqstp, mnt, mounts); 116 exp2 = rqst_exp_get_by_name(rqstp, mnt, mounts);
117 if (IS_ERR(exp2)) { 117 if (IS_ERR(exp2)) {
118 err = PTR_ERR(exp2); 118 if (PTR_ERR(exp2) != -ENOENT)
119 err = PTR_ERR(exp2);
119 dput(mounts); 120 dput(mounts);
120 mntput(mnt); 121 mntput(mnt);
121 goto out; 122 goto out;
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index 4f517665c9..778a850b46 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -5602,6 +5602,7 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb,
5602 clusters_to_del; 5602 clusters_to_del;
5603 spin_unlock(&OCFS2_I(inode)->ip_lock); 5603 spin_unlock(&OCFS2_I(inode)->ip_lock);
5604 le32_add_cpu(&fe->i_clusters, -clusters_to_del); 5604 le32_add_cpu(&fe->i_clusters, -clusters_to_del);
5605 inode->i_blocks = ocfs2_inode_sector_count(inode);
5605 5606
5606 status = ocfs2_trim_tree(inode, path, handle, tc, 5607 status = ocfs2_trim_tree(inode, path, handle, tc,
5607 clusters_to_del, &delete_blk); 5608 clusters_to_del, &delete_blk);
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 460d440310..f37f25c931 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -855,6 +855,7 @@ static int ocfs2_alloc_write_ctxt(struct ocfs2_write_ctxt **wcp,
855 struct ocfs2_super *osb, loff_t pos, 855 struct ocfs2_super *osb, loff_t pos,
856 unsigned len, struct buffer_head *di_bh) 856 unsigned len, struct buffer_head *di_bh)
857{ 857{
858 u32 cend;
858 struct ocfs2_write_ctxt *wc; 859 struct ocfs2_write_ctxt *wc;
859 860
860 wc = kzalloc(sizeof(struct ocfs2_write_ctxt), GFP_NOFS); 861 wc = kzalloc(sizeof(struct ocfs2_write_ctxt), GFP_NOFS);
@@ -862,7 +863,8 @@ static int ocfs2_alloc_write_ctxt(struct ocfs2_write_ctxt **wcp,
862 return -ENOMEM; 863 return -ENOMEM;
863 864
864 wc->w_cpos = pos >> osb->s_clustersize_bits; 865 wc->w_cpos = pos >> osb->s_clustersize_bits;
865 wc->w_clen = ocfs2_clusters_for_bytes(osb->sb, len); 866 cend = (pos + len - 1) >> osb->s_clustersize_bits;
867 wc->w_clen = cend - wc->w_cpos + 1;
866 get_bh(di_bh); 868 get_bh(di_bh);
867 wc->w_di_bh = di_bh; 869 wc->w_di_bh = di_bh;
868 870
@@ -928,18 +930,11 @@ static void ocfs2_write_failure(struct inode *inode,
928 loff_t user_pos, unsigned user_len) 930 loff_t user_pos, unsigned user_len)
929{ 931{
930 int i; 932 int i;
931 unsigned from, to; 933 unsigned from = user_pos & (PAGE_CACHE_SIZE - 1),
934 to = user_pos + user_len;
932 struct page *tmppage; 935 struct page *tmppage;
933 936
934 ocfs2_zero_new_buffers(wc->w_target_page, user_pos, user_len); 937 ocfs2_zero_new_buffers(wc->w_target_page, from, to);
935
936 if (wc->w_large_pages) {
937 from = wc->w_target_from;
938 to = wc->w_target_to;
939 } else {
940 from = 0;
941 to = PAGE_CACHE_SIZE;
942 }
943 938
944 for(i = 0; i < wc->w_num_pages; i++) { 939 for(i = 0; i < wc->w_num_pages; i++) {
945 tmppage = wc->w_pages[i]; 940 tmppage = wc->w_pages[i];
@@ -989,9 +984,6 @@ static int ocfs2_prepare_page_for_write(struct inode *inode, u64 *p_blkno,
989 map_from = cluster_start; 984 map_from = cluster_start;
990 map_to = cluster_end; 985 map_to = cluster_end;
991 } 986 }
992
993 wc->w_target_from = map_from;
994 wc->w_target_to = map_to;
995 } else { 987 } else {
996 /* 988 /*
997 * If we haven't allocated the new page yet, we 989 * If we haven't allocated the new page yet, we
@@ -1209,18 +1201,33 @@ static int ocfs2_write_cluster_by_desc(struct address_space *mapping,
1209 loff_t pos, unsigned len) 1201 loff_t pos, unsigned len)
1210{ 1202{
1211 int ret, i; 1203 int ret, i;
1204 loff_t cluster_off;
1205 unsigned int local_len = len;
1212 struct ocfs2_write_cluster_desc *desc; 1206 struct ocfs2_write_cluster_desc *desc;
1207 struct ocfs2_super *osb = OCFS2_SB(mapping->host->i_sb);
1213 1208
1214 for (i = 0; i < wc->w_clen; i++) { 1209 for (i = 0; i < wc->w_clen; i++) {
1215 desc = &wc->w_desc[i]; 1210 desc = &wc->w_desc[i];
1216 1211
1212 /*
1213 * We have to make sure that the total write passed in
1214 * doesn't extend past a single cluster.
1215 */
1216 local_len = len;
1217 cluster_off = pos & (osb->s_clustersize - 1);
1218 if ((cluster_off + local_len) > osb->s_clustersize)
1219 local_len = osb->s_clustersize - cluster_off;
1220
1217 ret = ocfs2_write_cluster(mapping, desc->c_phys, 1221 ret = ocfs2_write_cluster(mapping, desc->c_phys,
1218 desc->c_unwritten, data_ac, meta_ac, 1222 desc->c_unwritten, data_ac, meta_ac,
1219 wc, desc->c_cpos, pos, len); 1223 wc, desc->c_cpos, pos, local_len);
1220 if (ret) { 1224 if (ret) {
1221 mlog_errno(ret); 1225 mlog_errno(ret);
1222 goto out; 1226 goto out;
1223 } 1227 }
1228
1229 len -= local_len;
1230 pos += local_len;
1224 } 1231 }
1225 1232
1226 ret = 0; 1233 ret = 0;
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 4ffa715be0..f3bc3658e7 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -314,7 +314,6 @@ static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb,
314 } 314 }
315 315
316 i_size_write(inode, new_i_size); 316 i_size_write(inode, new_i_size);
317 inode->i_blocks = ocfs2_align_bytes_to_sectors(new_i_size);
318 inode->i_ctime = inode->i_mtime = CURRENT_TIME; 317 inode->i_ctime = inode->i_mtime = CURRENT_TIME;
319 318
320 di = (struct ocfs2_dinode *) fe_bh->b_data; 319 di = (struct ocfs2_dinode *) fe_bh->b_data;
@@ -492,8 +491,8 @@ int ocfs2_do_extend_allocation(struct ocfs2_super *osb,
492 goto leave; 491 goto leave;
493 } 492 }
494 493
495 status = ocfs2_claim_clusters(osb, handle, data_ac, 1, 494 status = __ocfs2_claim_clusters(osb, handle, data_ac, 1,
496 &bit_off, &num_bits); 495 clusters_to_add, &bit_off, &num_bits);
497 if (status < 0) { 496 if (status < 0) {
498 if (status != -ENOSPC) 497 if (status != -ENOSPC)
499 mlog_errno(status); 498 mlog_errno(status);
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
index 545f7892cd..d272847d5a 100644
--- a/fs/ocfs2/localalloc.c
+++ b/fs/ocfs2/localalloc.c
@@ -514,8 +514,10 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
514 ac->ac_bh = osb->local_alloc_bh; 514 ac->ac_bh = osb->local_alloc_bh;
515 status = 0; 515 status = 0;
516bail: 516bail:
517 if (status < 0 && local_alloc_inode) 517 if (status < 0 && local_alloc_inode) {
518 mutex_unlock(&local_alloc_inode->i_mutex);
518 iput(local_alloc_inode); 519 iput(local_alloc_inode);
520 }
519 521
520 mlog_exit(status); 522 mlog_exit(status);
521 return status; 523 return status;
@@ -524,13 +526,12 @@ bail:
524int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, 526int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
525 handle_t *handle, 527 handle_t *handle,
526 struct ocfs2_alloc_context *ac, 528 struct ocfs2_alloc_context *ac,
527 u32 min_bits, 529 u32 bits_wanted,
528 u32 *bit_off, 530 u32 *bit_off,
529 u32 *num_bits) 531 u32 *num_bits)
530{ 532{
531 int status, start; 533 int status, start;
532 struct inode *local_alloc_inode; 534 struct inode *local_alloc_inode;
533 u32 bits_wanted;
534 void *bitmap; 535 void *bitmap;
535 struct ocfs2_dinode *alloc; 536 struct ocfs2_dinode *alloc;
536 struct ocfs2_local_alloc *la; 537 struct ocfs2_local_alloc *la;
@@ -538,7 +539,6 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
538 mlog_entry_void(); 539 mlog_entry_void();
539 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL); 540 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL);
540 541
541 bits_wanted = ac->ac_bits_wanted - ac->ac_bits_given;
542 local_alloc_inode = ac->ac_inode; 542 local_alloc_inode = ac->ac_inode;
543 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; 543 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
544 la = OCFS2_LOCAL_ALLOC(alloc); 544 la = OCFS2_LOCAL_ALLOC(alloc);
diff --git a/fs/ocfs2/localalloc.h b/fs/ocfs2/localalloc.h
index 385a10152f..3f76631e11 100644
--- a/fs/ocfs2/localalloc.h
+++ b/fs/ocfs2/localalloc.h
@@ -48,7 +48,7 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
48int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, 48int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
49 handle_t *handle, 49 handle_t *handle,
50 struct ocfs2_alloc_context *ac, 50 struct ocfs2_alloc_context *ac,
51 u32 min_bits, 51 u32 bits_wanted,
52 u32 *bit_off, 52 u32 *bit_off,
53 u32 *num_bits); 53 u32 *num_bits);
54 54
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
index d9c5c9fcb3..8f09f5235e 100644
--- a/fs/ocfs2/suballoc.c
+++ b/fs/ocfs2/suballoc.c
@@ -1486,21 +1486,21 @@ static inline void ocfs2_block_to_cluster_group(struct inode *inode,
1486 * contig. allocation, set to '1' to indicate we can deal with extents 1486 * contig. allocation, set to '1' to indicate we can deal with extents
1487 * of any size. 1487 * of any size.
1488 */ 1488 */
1489int ocfs2_claim_clusters(struct ocfs2_super *osb, 1489int __ocfs2_claim_clusters(struct ocfs2_super *osb,
1490 handle_t *handle, 1490 handle_t *handle,
1491 struct ocfs2_alloc_context *ac, 1491 struct ocfs2_alloc_context *ac,
1492 u32 min_clusters, 1492 u32 min_clusters,
1493 u32 *cluster_start, 1493 u32 max_clusters,
1494 u32 *num_clusters) 1494 u32 *cluster_start,
1495 u32 *num_clusters)
1495{ 1496{
1496 int status; 1497 int status;
1497 unsigned int bits_wanted = ac->ac_bits_wanted - ac->ac_bits_given; 1498 unsigned int bits_wanted = max_clusters;
1498 u64 bg_blkno = 0; 1499 u64 bg_blkno = 0;
1499 u16 bg_bit_off; 1500 u16 bg_bit_off;
1500 1501
1501 mlog_entry_void(); 1502 mlog_entry_void();
1502 1503
1503 BUG_ON(!ac);
1504 BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted); 1504 BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted);
1505 1505
1506 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL 1506 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL
@@ -1557,6 +1557,19 @@ bail:
1557 return status; 1557 return status;
1558} 1558}
1559 1559
1560int ocfs2_claim_clusters(struct ocfs2_super *osb,
1561 handle_t *handle,
1562 struct ocfs2_alloc_context *ac,
1563 u32 min_clusters,
1564 u32 *cluster_start,
1565 u32 *num_clusters)
1566{
1567 unsigned int bits_wanted = ac->ac_bits_wanted - ac->ac_bits_given;
1568
1569 return __ocfs2_claim_clusters(osb, handle, ac, min_clusters,
1570 bits_wanted, cluster_start, num_clusters);
1571}
1572
1560static inline int ocfs2_block_group_clear_bits(handle_t *handle, 1573static inline int ocfs2_block_group_clear_bits(handle_t *handle,
1561 struct inode *alloc_inode, 1574 struct inode *alloc_inode,
1562 struct ocfs2_group_desc *bg, 1575 struct ocfs2_group_desc *bg,
diff --git a/fs/ocfs2/suballoc.h b/fs/ocfs2/suballoc.h
index f212dc01a8..cafe937030 100644
--- a/fs/ocfs2/suballoc.h
+++ b/fs/ocfs2/suballoc.h
@@ -85,6 +85,17 @@ int ocfs2_claim_clusters(struct ocfs2_super *osb,
85 u32 min_clusters, 85 u32 min_clusters,
86 u32 *cluster_start, 86 u32 *cluster_start,
87 u32 *num_clusters); 87 u32 *num_clusters);
88/*
89 * Use this variant of ocfs2_claim_clusters to specify a maxiumum
90 * number of clusters smaller than the allocation reserved.
91 */
92int __ocfs2_claim_clusters(struct ocfs2_super *osb,
93 handle_t *handle,
94 struct ocfs2_alloc_context *ac,
95 u32 min_clusters,
96 u32 max_clusters,
97 u32 *cluster_start,
98 u32 *num_clusters);
88 99
89int ocfs2_free_suballoc_bits(handle_t *handle, 100int ocfs2_free_suballoc_bits(handle_t *handle,
90 struct inode *alloc_inode, 101 struct inode *alloc_inode,
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index f2fc9a795d..c034b5129c 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -81,8 +81,15 @@ static struct dentry *ocfs2_debugfs_root = NULL;
81MODULE_AUTHOR("Oracle"); 81MODULE_AUTHOR("Oracle");
82MODULE_LICENSE("GPL"); 82MODULE_LICENSE("GPL");
83 83
84struct mount_options
85{
86 unsigned long mount_opt;
87 unsigned int atime_quantum;
88 signed short slot;
89};
90
84static int ocfs2_parse_options(struct super_block *sb, char *options, 91static int ocfs2_parse_options(struct super_block *sb, char *options,
85 unsigned long *mount_opt, s16 *slot, 92 struct mount_options *mopt,
86 int is_remount); 93 int is_remount);
87static void ocfs2_put_super(struct super_block *sb); 94static void ocfs2_put_super(struct super_block *sb);
88static int ocfs2_mount_volume(struct super_block *sb); 95static int ocfs2_mount_volume(struct super_block *sb);
@@ -367,24 +374,23 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data)
367{ 374{
368 int incompat_features; 375 int incompat_features;
369 int ret = 0; 376 int ret = 0;
370 unsigned long parsed_options; 377 struct mount_options parsed_options;
371 s16 slot;
372 struct ocfs2_super *osb = OCFS2_SB(sb); 378 struct ocfs2_super *osb = OCFS2_SB(sb);
373 379
374 if (!ocfs2_parse_options(sb, data, &parsed_options, &slot, 1)) { 380 if (!ocfs2_parse_options(sb, data, &parsed_options, 1)) {
375 ret = -EINVAL; 381 ret = -EINVAL;
376 goto out; 382 goto out;
377 } 383 }
378 384
379 if ((osb->s_mount_opt & OCFS2_MOUNT_HB_LOCAL) != 385 if ((osb->s_mount_opt & OCFS2_MOUNT_HB_LOCAL) !=
380 (parsed_options & OCFS2_MOUNT_HB_LOCAL)) { 386 (parsed_options.mount_opt & OCFS2_MOUNT_HB_LOCAL)) {
381 ret = -EINVAL; 387 ret = -EINVAL;
382 mlog(ML_ERROR, "Cannot change heartbeat mode on remount\n"); 388 mlog(ML_ERROR, "Cannot change heartbeat mode on remount\n");
383 goto out; 389 goto out;
384 } 390 }
385 391
386 if ((osb->s_mount_opt & OCFS2_MOUNT_DATA_WRITEBACK) != 392 if ((osb->s_mount_opt & OCFS2_MOUNT_DATA_WRITEBACK) !=
387 (parsed_options & OCFS2_MOUNT_DATA_WRITEBACK)) { 393 (parsed_options.mount_opt & OCFS2_MOUNT_DATA_WRITEBACK)) {
388 ret = -EINVAL; 394 ret = -EINVAL;
389 mlog(ML_ERROR, "Cannot change data mode on remount\n"); 395 mlog(ML_ERROR, "Cannot change data mode on remount\n");
390 goto out; 396 goto out;
@@ -435,7 +441,9 @@ unlock_osb:
435 441
436 /* Only save off the new mount options in case of a successful 442 /* Only save off the new mount options in case of a successful
437 * remount. */ 443 * remount. */
438 osb->s_mount_opt = parsed_options; 444 osb->s_mount_opt = parsed_options.mount_opt;
445 osb->s_atime_quantum = parsed_options.atime_quantum;
446 osb->preferred_slot = parsed_options.slot;
439 } 447 }
440out: 448out:
441 return ret; 449 return ret;
@@ -547,8 +555,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
547{ 555{
548 struct dentry *root; 556 struct dentry *root;
549 int status, sector_size; 557 int status, sector_size;
550 unsigned long parsed_opt; 558 struct mount_options parsed_options;
551 s16 slot;
552 struct inode *inode = NULL; 559 struct inode *inode = NULL;
553 struct ocfs2_super *osb = NULL; 560 struct ocfs2_super *osb = NULL;
554 struct buffer_head *bh = NULL; 561 struct buffer_head *bh = NULL;
@@ -556,14 +563,14 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
556 563
557 mlog_entry("%p, %p, %i", sb, data, silent); 564 mlog_entry("%p, %p, %i", sb, data, silent);
558 565
559 if (!ocfs2_parse_options(sb, data, &parsed_opt, &slot, 0)) { 566 if (!ocfs2_parse_options(sb, data, &parsed_options, 0)) {
560 status = -EINVAL; 567 status = -EINVAL;
561 goto read_super_error; 568 goto read_super_error;
562 } 569 }
563 570
564 /* for now we only have one cluster/node, make sure we see it 571 /* for now we only have one cluster/node, make sure we see it
565 * in the heartbeat universe */ 572 * in the heartbeat universe */
566 if (parsed_opt & OCFS2_MOUNT_HB_LOCAL) { 573 if (parsed_options.mount_opt & OCFS2_MOUNT_HB_LOCAL) {
567 if (!o2hb_check_local_node_heartbeating()) { 574 if (!o2hb_check_local_node_heartbeating()) {
568 status = -EINVAL; 575 status = -EINVAL;
569 goto read_super_error; 576 goto read_super_error;
@@ -585,8 +592,9 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
585 } 592 }
586 brelse(bh); 593 brelse(bh);
587 bh = NULL; 594 bh = NULL;
588 osb->s_mount_opt = parsed_opt; 595 osb->s_mount_opt = parsed_options.mount_opt;
589 osb->preferred_slot = slot; 596 osb->s_atime_quantum = parsed_options.atime_quantum;
597 osb->preferred_slot = parsed_options.slot;
590 598
591 sb->s_magic = OCFS2_SUPER_MAGIC; 599 sb->s_magic = OCFS2_SUPER_MAGIC;
592 600
@@ -728,8 +736,7 @@ static struct file_system_type ocfs2_fs_type = {
728 736
729static int ocfs2_parse_options(struct super_block *sb, 737static int ocfs2_parse_options(struct super_block *sb,
730 char *options, 738 char *options,
731 unsigned long *mount_opt, 739 struct mount_options *mopt,
732 s16 *slot,
733 int is_remount) 740 int is_remount)
734{ 741{
735 int status; 742 int status;
@@ -738,8 +745,9 @@ static int ocfs2_parse_options(struct super_block *sb,
738 mlog_entry("remount: %d, options: \"%s\"\n", is_remount, 745 mlog_entry("remount: %d, options: \"%s\"\n", is_remount,
739 options ? options : "(none)"); 746 options ? options : "(none)");
740 747
741 *mount_opt = 0; 748 mopt->mount_opt = 0;
742 *slot = OCFS2_INVALID_SLOT; 749 mopt->atime_quantum = OCFS2_DEFAULT_ATIME_QUANTUM;
750 mopt->slot = OCFS2_INVALID_SLOT;
743 751
744 if (!options) { 752 if (!options) {
745 status = 1; 753 status = 1;
@@ -749,7 +757,6 @@ static int ocfs2_parse_options(struct super_block *sb,
749 while ((p = strsep(&options, ",")) != NULL) { 757 while ((p = strsep(&options, ",")) != NULL) {
750 int token, option; 758 int token, option;
751 substring_t args[MAX_OPT_ARGS]; 759 substring_t args[MAX_OPT_ARGS];
752 struct ocfs2_super * osb = OCFS2_SB(sb);
753 760
754 if (!*p) 761 if (!*p)
755 continue; 762 continue;
@@ -757,10 +764,10 @@ static int ocfs2_parse_options(struct super_block *sb,
757 token = match_token(p, tokens, args); 764 token = match_token(p, tokens, args);
758 switch (token) { 765 switch (token) {
759 case Opt_hb_local: 766 case Opt_hb_local:
760 *mount_opt |= OCFS2_MOUNT_HB_LOCAL; 767 mopt->mount_opt |= OCFS2_MOUNT_HB_LOCAL;
761 break; 768 break;
762 case Opt_hb_none: 769 case Opt_hb_none:
763 *mount_opt &= ~OCFS2_MOUNT_HB_LOCAL; 770 mopt->mount_opt &= ~OCFS2_MOUNT_HB_LOCAL;
764 break; 771 break;
765 case Opt_barrier: 772 case Opt_barrier:
766 if (match_int(&args[0], &option)) { 773 if (match_int(&args[0], &option)) {
@@ -768,27 +775,27 @@ static int ocfs2_parse_options(struct super_block *sb,
768 goto bail; 775 goto bail;
769 } 776 }
770 if (option) 777 if (option)
771 *mount_opt |= OCFS2_MOUNT_BARRIER; 778 mopt->mount_opt |= OCFS2_MOUNT_BARRIER;
772 else 779 else
773 *mount_opt &= ~OCFS2_MOUNT_BARRIER; 780 mopt->mount_opt &= ~OCFS2_MOUNT_BARRIER;
774 break; 781 break;
775 case Opt_intr: 782 case Opt_intr:
776 *mount_opt &= ~OCFS2_MOUNT_NOINTR; 783 mopt->mount_opt &= ~OCFS2_MOUNT_NOINTR;
777 break; 784 break;
778 case Opt_nointr: 785 case Opt_nointr:
779 *mount_opt |= OCFS2_MOUNT_NOINTR; 786 mopt->mount_opt |= OCFS2_MOUNT_NOINTR;
780 break; 787 break;
781 case Opt_err_panic: 788 case Opt_err_panic:
782 *mount_opt |= OCFS2_MOUNT_ERRORS_PANIC; 789 mopt->mount_opt |= OCFS2_MOUNT_ERRORS_PANIC;
783 break; 790 break;
784 case Opt_err_ro: 791 case Opt_err_ro:
785 *mount_opt &= ~OCFS2_MOUNT_ERRORS_PANIC; 792 mopt->mount_opt &= ~OCFS2_MOUNT_ERRORS_PANIC;
786 break; 793 break;
787 case Opt_data_ordered: 794 case Opt_data_ordered:
788 *mount_opt &= ~OCFS2_MOUNT_DATA_WRITEBACK; 795 mopt->mount_opt &= ~OCFS2_MOUNT_DATA_WRITEBACK;
789 break; 796 break;
790 case Opt_data_writeback: 797 case Opt_data_writeback:
791 *mount_opt |= OCFS2_MOUNT_DATA_WRITEBACK; 798 mopt->mount_opt |= OCFS2_MOUNT_DATA_WRITEBACK;
792 break; 799 break;
793 case Opt_atime_quantum: 800 case Opt_atime_quantum:
794 if (match_int(&args[0], &option)) { 801 if (match_int(&args[0], &option)) {
@@ -796,9 +803,7 @@ static int ocfs2_parse_options(struct super_block *sb,
796 goto bail; 803 goto bail;
797 } 804 }
798 if (option >= 0) 805 if (option >= 0)
799 osb->s_atime_quantum = option; 806 mopt->atime_quantum = option;
800 else
801 osb->s_atime_quantum = OCFS2_DEFAULT_ATIME_QUANTUM;
802 break; 807 break;
803 case Opt_slot: 808 case Opt_slot:
804 option = 0; 809 option = 0;
@@ -807,7 +812,7 @@ static int ocfs2_parse_options(struct super_block *sb,
807 goto bail; 812 goto bail;
808 } 813 }
809 if (option) 814 if (option)
810 *slot = (s16)option; 815 mopt->slot = (s16)option;
811 break; 816 break;
812 default: 817 default:
813 mlog(ML_ERROR, 818 mlog(ML_ERROR,
diff --git a/fs/ocfs2/vote.c b/fs/ocfs2/vote.c
index 66a13ee63d..c05358538f 100644
--- a/fs/ocfs2/vote.c
+++ b/fs/ocfs2/vote.c
@@ -66,7 +66,7 @@ struct ocfs2_vote_msg
66{ 66{
67 struct ocfs2_msg_hdr v_hdr; 67 struct ocfs2_msg_hdr v_hdr;
68 __be32 v_reserved1; 68 __be32 v_reserved1;
69}; 69} __attribute__ ((packed));
70 70
71/* Responses are given these values to maintain backwards 71/* Responses are given these values to maintain backwards
72 * compatibility with older ocfs2 versions */ 72 * compatibility with older ocfs2 versions */
@@ -78,7 +78,7 @@ struct ocfs2_response_msg
78{ 78{
79 struct ocfs2_msg_hdr r_hdr; 79 struct ocfs2_msg_hdr r_hdr;
80 __be32 r_response; 80 __be32 r_response;
81}; 81} __attribute__ ((packed));
82 82
83struct ocfs2_vote_work { 83struct ocfs2_vote_work {
84 struct list_head w_list; 84 struct list_head w_list;
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 965625a097..ee4814dd98 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -320,7 +320,21 @@ int proc_pid_status(struct task_struct *task, char *buffer)
320 return buffer - orig; 320 return buffer - orig;
321} 321}
322 322
323static clock_t task_utime(struct task_struct *p) 323/*
324 * Use precise platform statistics if available:
325 */
326#ifdef CONFIG_VIRT_CPU_ACCOUNTING
327static cputime_t task_utime(struct task_struct *p)
328{
329 return p->utime;
330}
331
332static cputime_t task_stime(struct task_struct *p)
333{
334 return p->stime;
335}
336#else
337static cputime_t task_utime(struct task_struct *p)
324{ 338{
325 clock_t utime = cputime_to_clock_t(p->utime), 339 clock_t utime = cputime_to_clock_t(p->utime),
326 total = utime + cputime_to_clock_t(p->stime); 340 total = utime + cputime_to_clock_t(p->stime);
@@ -337,10 +351,10 @@ static clock_t task_utime(struct task_struct *p)
337 } 351 }
338 utime = (clock_t)temp; 352 utime = (clock_t)temp;
339 353
340 return utime; 354 return clock_t_to_cputime(utime);
341} 355}
342 356
343static clock_t task_stime(struct task_struct *p) 357static cputime_t task_stime(struct task_struct *p)
344{ 358{
345 clock_t stime; 359 clock_t stime;
346 360
@@ -349,10 +363,12 @@ static clock_t task_stime(struct task_struct *p)
349 * the total, to make sure the total observed by userspace 363 * the total, to make sure the total observed by userspace
350 * grows monotonically - apps rely on that): 364 * grows monotonically - apps rely on that):
351 */ 365 */
352 stime = nsec_to_clock_t(p->se.sum_exec_runtime) - task_utime(p); 366 stime = nsec_to_clock_t(p->se.sum_exec_runtime) -
367 cputime_to_clock_t(task_utime(p));
353 368
354 return stime; 369 return clock_t_to_cputime(stime);
355} 370}
371#endif
356 372
357static int do_task_stat(struct task_struct *task, char *buffer, int whole) 373static int do_task_stat(struct task_struct *task, char *buffer, int whole)
358{ 374{
@@ -368,8 +384,7 @@ static int do_task_stat(struct task_struct *task, char *buffer, int whole)
368 unsigned long long start_time; 384 unsigned long long start_time;
369 unsigned long cmin_flt = 0, cmaj_flt = 0; 385 unsigned long cmin_flt = 0, cmaj_flt = 0;
370 unsigned long min_flt = 0, maj_flt = 0; 386 unsigned long min_flt = 0, maj_flt = 0;
371 cputime_t cutime, cstime; 387 cputime_t cutime, cstime, utime, stime;
372 clock_t utime, stime;
373 unsigned long rsslim = 0; 388 unsigned long rsslim = 0;
374 char tcomm[sizeof(task->comm)]; 389 char tcomm[sizeof(task->comm)];
375 unsigned long flags; 390 unsigned long flags;
@@ -387,8 +402,7 @@ static int do_task_stat(struct task_struct *task, char *buffer, int whole)
387 402
388 sigemptyset(&sigign); 403 sigemptyset(&sigign);
389 sigemptyset(&sigcatch); 404 sigemptyset(&sigcatch);
390 cutime = cstime = cputime_zero; 405 cutime = cstime = utime = stime = cputime_zero;
391 utime = stime = 0;
392 406
393 rcu_read_lock(); 407 rcu_read_lock();
394 if (lock_task_sighand(task, &flags)) { 408 if (lock_task_sighand(task, &flags)) {
@@ -414,15 +428,15 @@ static int do_task_stat(struct task_struct *task, char *buffer, int whole)
414 do { 428 do {
415 min_flt += t->min_flt; 429 min_flt += t->min_flt;
416 maj_flt += t->maj_flt; 430 maj_flt += t->maj_flt;
417 utime += task_utime(t); 431 utime = cputime_add(utime, task_utime(t));
418 stime += task_stime(t); 432 stime = cputime_add(stime, task_stime(t));
419 t = next_thread(t); 433 t = next_thread(t);
420 } while (t != task); 434 } while (t != task);
421 435
422 min_flt += sig->min_flt; 436 min_flt += sig->min_flt;
423 maj_flt += sig->maj_flt; 437 maj_flt += sig->maj_flt;
424 utime += cputime_to_clock_t(sig->utime); 438 utime = cputime_add(utime, sig->utime);
425 stime += cputime_to_clock_t(sig->stime); 439 stime = cputime_add(stime, sig->stime);
426 } 440 }
427 441
428 sid = signal_session(sig); 442 sid = signal_session(sig);
@@ -471,8 +485,8 @@ static int do_task_stat(struct task_struct *task, char *buffer, int whole)
471 cmin_flt, 485 cmin_flt,
472 maj_flt, 486 maj_flt,
473 cmaj_flt, 487 cmaj_flt,
474 utime, 488 cputime_to_clock_t(utime),
475 stime, 489 cputime_to_clock_t(stime),
476 cputime_to_clock_t(cutime), 490 cputime_to_clock_t(cutime),
477 cputime_to_clock_t(cstime), 491 cputime_to_clock_t(cstime),
478 priority, 492 priority,
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index a5b0dfd89a..0e4d37c93e 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -11,6 +11,7 @@
11#include <linux/string.h> 11#include <linux/string.h>
12#include <linux/stat.h> 12#include <linux/stat.h>
13#include <linux/completion.h> 13#include <linux/completion.h>
14#include <linux/poll.h>
14#include <linux/file.h> 15#include <linux/file.h>
15#include <linux/limits.h> 16#include <linux/limits.h>
16#include <linux/init.h> 17#include <linux/init.h>
@@ -232,7 +233,7 @@ static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t
232static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts) 233static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts)
233{ 234{
234 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); 235 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode);
235 unsigned int rv = 0; 236 unsigned int rv = DEFAULT_POLLMASK;
236 unsigned int (*poll)(struct file *, struct poll_table_struct *); 237 unsigned int (*poll)(struct file *, struct poll_table_struct *);
237 238
238 spin_lock(&pde->pde_unload_lock); 239 spin_lock(&pde->pde_unload_lock);
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 5b68dd3f19..a005451930 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1915,8 +1915,11 @@ static int reiserfs_release_dquot(struct dquot *dquot)
1915 ret = 1915 ret =
1916 journal_begin(&th, dquot->dq_sb, 1916 journal_begin(&th, dquot->dq_sb,
1917 REISERFS_QUOTA_DEL_BLOCKS(dquot->dq_sb)); 1917 REISERFS_QUOTA_DEL_BLOCKS(dquot->dq_sb));
1918 if (ret) 1918 if (ret) {
1919 /* Release dquot anyway to avoid endless cycle in dqput() */
1920 dquot_release(dquot);
1919 goto out; 1921 goto out;
1922 }
1920 ret = dquot_release(dquot); 1923 ret = dquot_release(dquot);
1921 err = 1924 err =
1922 journal_end(&th, dquot->dq_sb, 1925 journal_end(&th, dquot->dq_sb,
@@ -2067,6 +2070,12 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type,
2067 size_t towrite = len; 2070 size_t towrite = len;
2068 struct buffer_head tmp_bh, *bh; 2071 struct buffer_head tmp_bh, *bh;
2069 2072
2073 if (!current->journal_info) {
2074 printk(KERN_WARNING "reiserfs: Quota write (off=%Lu, len=%Lu)"
2075 " cancelled because transaction is not started.\n",
2076 (unsigned long long)off, (unsigned long long)len);
2077 return -EIO;
2078 }
2070 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); 2079 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
2071 while (towrite > 0) { 2080 while (towrite > 0) {
2072 tocopy = sb->s_blocksize - offset < towrite ? 2081 tocopy = sb->s_blocksize - offset < towrite ?
@@ -2098,7 +2107,7 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type,
2098 data += tocopy; 2107 data += tocopy;
2099 blk++; 2108 blk++;
2100 } 2109 }
2101 out: 2110out:
2102 if (len == towrite) 2111 if (len == towrite)
2103 return err; 2112 return err;
2104 if (inode->i_size < off + len - towrite) 2113 if (inode->i_size < off + len - towrite)
diff --git a/fs/select.c b/fs/select.c
index a974082b08..46dca31c60 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -26,8 +26,6 @@
26 26
27#include <asm/uaccess.h> 27#include <asm/uaccess.h>
28 28
29#define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
30
31struct poll_table_page { 29struct poll_table_page {
32 struct poll_table_page * next; 30 struct poll_table_page * next;
33 struct poll_table_entry * entry; 31 struct poll_table_entry * entry;
diff --git a/fs/signalfd.c b/fs/signalfd.c
index a8e293d300..aefb0be079 100644
--- a/fs/signalfd.c
+++ b/fs/signalfd.c
@@ -11,8 +11,10 @@
11 * Now using anonymous inode source. 11 * Now using anonymous inode source.
12 * Thanks to Oleg Nesterov for useful code review and suggestions. 12 * Thanks to Oleg Nesterov for useful code review and suggestions.
13 * More comments and suggestions from Arnd Bergmann. 13 * More comments and suggestions from Arnd Bergmann.
14 * Sat May 19, 2007: Davi E. M. Arnaut <davi@haxent.com.br> 14 * Sat May 19, 2007: Davi E. M. Arnaut <davi@haxent.com.br>
15 * Retrieve multiple signals with one read() call 15 * Retrieve multiple signals with one read() call
16 * Sun Jul 15, 2007: Davide Libenzi <davidel@xmailserver.org>
17 * Attach to the sighand only during read() and poll().
16 */ 18 */
17 19
18#include <linux/file.h> 20#include <linux/file.h>
@@ -27,102 +29,12 @@
27#include <linux/signalfd.h> 29#include <linux/signalfd.h>
28 30
29struct signalfd_ctx { 31struct signalfd_ctx {
30 struct list_head lnk;
31 wait_queue_head_t wqh;
32 sigset_t sigmask; 32 sigset_t sigmask;
33 struct task_struct *tsk;
34}; 33};
35 34
36struct signalfd_lockctx {
37 struct task_struct *tsk;
38 unsigned long flags;
39};
40
41/*
42 * Tries to acquire the sighand lock. We do not increment the sighand
43 * use count, and we do not even pin the task struct, so we need to
44 * do it inside an RCU read lock, and we must be prepared for the
45 * ctx->tsk going to NULL (in signalfd_deliver()), and for the sighand
46 * being detached. We return 0 if the sighand has been detached, or
47 * 1 if we were able to pin the sighand lock.
48 */
49static int signalfd_lock(struct signalfd_ctx *ctx, struct signalfd_lockctx *lk)
50{
51 struct sighand_struct *sighand = NULL;
52
53 rcu_read_lock();
54 lk->tsk = rcu_dereference(ctx->tsk);
55 if (likely(lk->tsk != NULL))
56 sighand = lock_task_sighand(lk->tsk, &lk->flags);
57 rcu_read_unlock();
58
59 if (!sighand)
60 return 0;
61
62 if (!ctx->tsk) {
63 unlock_task_sighand(lk->tsk, &lk->flags);
64 return 0;
65 }
66
67 if (lk->tsk->tgid == current->tgid)
68 lk->tsk = current;
69
70 return 1;
71}
72
73static void signalfd_unlock(struct signalfd_lockctx *lk)
74{
75 unlock_task_sighand(lk->tsk, &lk->flags);
76}
77
78/*
79 * This must be called with the sighand lock held.
80 */
81void signalfd_deliver(struct task_struct *tsk, int sig)
82{
83 struct sighand_struct *sighand = tsk->sighand;
84 struct signalfd_ctx *ctx, *tmp;
85
86 BUG_ON(!sig);
87 list_for_each_entry_safe(ctx, tmp, &sighand->signalfd_list, lnk) {
88 /*
89 * We use a negative signal value as a way to broadcast that the
90 * sighand has been orphaned, so that we can notify all the
91 * listeners about this. Remember the ctx->sigmask is inverted,
92 * so if the user is interested in a signal, that corresponding
93 * bit will be zero.
94 */
95 if (sig < 0) {
96 if (ctx->tsk == tsk) {
97 ctx->tsk = NULL;
98 list_del_init(&ctx->lnk);
99 wake_up(&ctx->wqh);
100 }
101 } else {
102 if (!sigismember(&ctx->sigmask, sig))
103 wake_up(&ctx->wqh);
104 }
105 }
106}
107
108static void signalfd_cleanup(struct signalfd_ctx *ctx)
109{
110 struct signalfd_lockctx lk;
111
112 /*
113 * This is tricky. If the sighand is gone, we do not need to remove
114 * context from the list, the list itself won't be there anymore.
115 */
116 if (signalfd_lock(ctx, &lk)) {
117 list_del(&ctx->lnk);
118 signalfd_unlock(&lk);
119 }
120 kfree(ctx);
121}
122
123static int signalfd_release(struct inode *inode, struct file *file) 35static int signalfd_release(struct inode *inode, struct file *file)
124{ 36{
125 signalfd_cleanup(file->private_data); 37 kfree(file->private_data);
126 return 0; 38 return 0;
127} 39}
128 40
@@ -130,23 +42,15 @@ static unsigned int signalfd_poll(struct file *file, poll_table *wait)
130{ 42{
131 struct signalfd_ctx *ctx = file->private_data; 43 struct signalfd_ctx *ctx = file->private_data;
132 unsigned int events = 0; 44 unsigned int events = 0;
133 struct signalfd_lockctx lk;
134 45
135 poll_wait(file, &ctx->wqh, wait); 46 poll_wait(file, &current->sighand->signalfd_wqh, wait);
136 47
137 /* 48 spin_lock_irq(&current->sighand->siglock);
138 * Let the caller get a POLLIN in this case, ala socket recv() when 49 if (next_signal(&current->pending, &ctx->sigmask) ||
139 * the peer disconnects. 50 next_signal(&current->signal->shared_pending,
140 */ 51 &ctx->sigmask))
141 if (signalfd_lock(ctx, &lk)) {
142 if ((lk.tsk == current &&
143 next_signal(&lk.tsk->pending, &ctx->sigmask) > 0) ||
144 next_signal(&lk.tsk->signal->shared_pending,
145 &ctx->sigmask) > 0)
146 events |= POLLIN;
147 signalfd_unlock(&lk);
148 } else
149 events |= POLLIN; 52 events |= POLLIN;
53 spin_unlock_irq(&current->sighand->siglock);
150 54
151 return events; 55 return events;
152} 56}
@@ -219,59 +123,46 @@ static ssize_t signalfd_dequeue(struct signalfd_ctx *ctx, siginfo_t *info,
219 int nonblock) 123 int nonblock)
220{ 124{
221 ssize_t ret; 125 ssize_t ret;
222 struct signalfd_lockctx lk;
223 DECLARE_WAITQUEUE(wait, current); 126 DECLARE_WAITQUEUE(wait, current);
224 127
225 if (!signalfd_lock(ctx, &lk)) 128 spin_lock_irq(&current->sighand->siglock);
226 return 0; 129 ret = dequeue_signal(current, &ctx->sigmask, info);
227
228 ret = dequeue_signal(lk.tsk, &ctx->sigmask, info);
229 switch (ret) { 130 switch (ret) {
230 case 0: 131 case 0:
231 if (!nonblock) 132 if (!nonblock)
232 break; 133 break;
233 ret = -EAGAIN; 134 ret = -EAGAIN;
234 default: 135 default:
235 signalfd_unlock(&lk); 136 spin_unlock_irq(&current->sighand->siglock);
236 return ret; 137 return ret;
237 } 138 }
238 139
239 add_wait_queue(&ctx->wqh, &wait); 140 add_wait_queue(&current->sighand->signalfd_wqh, &wait);
240 for (;;) { 141 for (;;) {
241 set_current_state(TASK_INTERRUPTIBLE); 142 set_current_state(TASK_INTERRUPTIBLE);
242 ret = dequeue_signal(lk.tsk, &ctx->sigmask, info); 143 ret = dequeue_signal(current, &ctx->sigmask, info);
243 signalfd_unlock(&lk);
244 if (ret != 0) 144 if (ret != 0)
245 break; 145 break;
246 if (signal_pending(current)) { 146 if (signal_pending(current)) {
247 ret = -ERESTARTSYS; 147 ret = -ERESTARTSYS;
248 break; 148 break;
249 } 149 }
150 spin_unlock_irq(&current->sighand->siglock);
250 schedule(); 151 schedule();
251 ret = signalfd_lock(ctx, &lk); 152 spin_lock_irq(&current->sighand->siglock);
252 if (unlikely(!ret)) {
253 /*
254 * Let the caller read zero byte, ala socket
255 * recv() when the peer disconnect. This test
256 * must be done before doing a dequeue_signal(),
257 * because if the sighand has been orphaned,
258 * the dequeue_signal() call is going to crash
259 * because ->sighand will be long gone.
260 */
261 break;
262 }
263 } 153 }
154 spin_unlock_irq(&current->sighand->siglock);
264 155
265 remove_wait_queue(&ctx->wqh, &wait); 156 remove_wait_queue(&current->sighand->signalfd_wqh, &wait);
266 __set_current_state(TASK_RUNNING); 157 __set_current_state(TASK_RUNNING);
267 158
268 return ret; 159 return ret;
269} 160}
270 161
271/* 162/*
272 * Returns either the size of a "struct signalfd_siginfo", or zero if the 163 * Returns a multiple of the size of a "struct signalfd_siginfo", or a negative
273 * sighand we are attached to, has been orphaned. The "count" parameter 164 * error code. The "count" parameter must be at least the size of a
274 * must be at least the size of a "struct signalfd_siginfo". 165 * "struct signalfd_siginfo".
275 */ 166 */
276static ssize_t signalfd_read(struct file *file, char __user *buf, size_t count, 167static ssize_t signalfd_read(struct file *file, char __user *buf, size_t count,
277 loff_t *ppos) 168 loff_t *ppos)
@@ -287,7 +178,6 @@ static ssize_t signalfd_read(struct file *file, char __user *buf, size_t count,
287 return -EINVAL; 178 return -EINVAL;
288 179
289 siginfo = (struct signalfd_siginfo __user *) buf; 180 siginfo = (struct signalfd_siginfo __user *) buf;
290
291 do { 181 do {
292 ret = signalfd_dequeue(ctx, &info, nonblock); 182 ret = signalfd_dequeue(ctx, &info, nonblock);
293 if (unlikely(ret <= 0)) 183 if (unlikely(ret <= 0))
@@ -300,7 +190,7 @@ static ssize_t signalfd_read(struct file *file, char __user *buf, size_t count,
300 nonblock = 1; 190 nonblock = 1;
301 } while (--count); 191 } while (--count);
302 192
303 return total ? total : ret; 193 return total ? total: ret;
304} 194}
305 195
306static const struct file_operations signalfd_fops = { 196static const struct file_operations signalfd_fops = {
@@ -309,20 +199,13 @@ static const struct file_operations signalfd_fops = {
309 .read = signalfd_read, 199 .read = signalfd_read,
310}; 200};
311 201
312/*
313 * Create a file descriptor that is associated with our signal
314 * state. We can pass it around to others if we want to, but
315 * it will always be _our_ signal state.
316 */
317asmlinkage long sys_signalfd(int ufd, sigset_t __user *user_mask, size_t sizemask) 202asmlinkage long sys_signalfd(int ufd, sigset_t __user *user_mask, size_t sizemask)
318{ 203{
319 int error; 204 int error;
320 sigset_t sigmask; 205 sigset_t sigmask;
321 struct signalfd_ctx *ctx; 206 struct signalfd_ctx *ctx;
322 struct sighand_struct *sighand;
323 struct file *file; 207 struct file *file;
324 struct inode *inode; 208 struct inode *inode;
325 struct signalfd_lockctx lk;
326 209
327 if (sizemask != sizeof(sigset_t) || 210 if (sizemask != sizeof(sigset_t) ||
328 copy_from_user(&sigmask, user_mask, sizeof(sigmask))) 211 copy_from_user(&sigmask, user_mask, sizeof(sigmask)))
@@ -335,17 +218,7 @@ asmlinkage long sys_signalfd(int ufd, sigset_t __user *user_mask, size_t sizemas
335 if (!ctx) 218 if (!ctx)
336 return -ENOMEM; 219 return -ENOMEM;
337 220
338 init_waitqueue_head(&ctx->wqh);
339 ctx->sigmask = sigmask; 221 ctx->sigmask = sigmask;
340 ctx->tsk = current->group_leader;
341
342 sighand = current->sighand;
343 /*
344 * Add this fd to the list of signal listeners.
345 */
346 spin_lock_irq(&sighand->siglock);
347 list_add_tail(&ctx->lnk, &sighand->signalfd_list);
348 spin_unlock_irq(&sighand->siglock);
349 222
350 /* 223 /*
351 * When we call this, the initialization must be complete, since 224 * When we call this, the initialization must be complete, since
@@ -364,23 +237,18 @@ asmlinkage long sys_signalfd(int ufd, sigset_t __user *user_mask, size_t sizemas
364 fput(file); 237 fput(file);
365 return -EINVAL; 238 return -EINVAL;
366 } 239 }
367 /* 240 spin_lock_irq(&current->sighand->siglock);
368 * We need to be prepared of the fact that the sighand this fd 241 ctx->sigmask = sigmask;
369 * is attached to, has been detched. In that case signalfd_lock() 242 spin_unlock_irq(&current->sighand->siglock);
370 * will return 0, and we'll just skip setting the new mask. 243
371 */ 244 wake_up(&current->sighand->signalfd_wqh);
372 if (signalfd_lock(ctx, &lk)) {
373 ctx->sigmask = sigmask;
374 signalfd_unlock(&lk);
375 }
376 wake_up(&ctx->wqh);
377 fput(file); 245 fput(file);
378 } 246 }
379 247
380 return ufd; 248 return ufd;
381 249
382err_fdalloc: 250err_fdalloc:
383 signalfd_cleanup(ctx); 251 kfree(ctx);
384 return error; 252 return error;
385} 253}
386 254
diff --git a/fs/splice.c b/fs/splice.c
index c010a72ca2..e95a362288 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1224,6 +1224,33 @@ static long do_splice(struct file *in, loff_t __user *off_in,
1224} 1224}
1225 1225
1226/* 1226/*
1227 * Do a copy-from-user while holding the mmap_semaphore for reading, in a
1228 * manner safe from deadlocking with simultaneous mmap() (grabbing mmap_sem
1229 * for writing) and page faulting on the user memory pointed to by src.
1230 * This assumes that we will very rarely hit the partial != 0 path, or this
1231 * will not be a win.
1232 */
1233static int copy_from_user_mmap_sem(void *dst, const void __user *src, size_t n)
1234{
1235 int partial;
1236
1237 pagefault_disable();
1238 partial = __copy_from_user_inatomic(dst, src, n);
1239 pagefault_enable();
1240
1241 /*
1242 * Didn't copy everything, drop the mmap_sem and do a faulting copy
1243 */
1244 if (unlikely(partial)) {
1245 up_read(&current->mm->mmap_sem);
1246 partial = copy_from_user(dst, src, n);
1247 down_read(&current->mm->mmap_sem);
1248 }
1249
1250 return partial;
1251}
1252
1253/*
1227 * Map an iov into an array of pages and offset/length tupples. With the 1254 * Map an iov into an array of pages and offset/length tupples. With the
1228 * partial_page structure, we can map several non-contiguous ranges into 1255 * partial_page structure, we can map several non-contiguous ranges into
1229 * our ones pages[] map instead of splitting that operation into pieces. 1256 * our ones pages[] map instead of splitting that operation into pieces.
@@ -1236,31 +1263,26 @@ static int get_iovec_page_array(const struct iovec __user *iov,
1236{ 1263{
1237 int buffers = 0, error = 0; 1264 int buffers = 0, error = 0;
1238 1265
1239 /*
1240 * It's ok to take the mmap_sem for reading, even
1241 * across a "get_user()".
1242 */
1243 down_read(&current->mm->mmap_sem); 1266 down_read(&current->mm->mmap_sem);
1244 1267
1245 while (nr_vecs) { 1268 while (nr_vecs) {
1246 unsigned long off, npages; 1269 unsigned long off, npages;
1270 struct iovec entry;
1247 void __user *base; 1271 void __user *base;
1248 size_t len; 1272 size_t len;
1249 int i; 1273 int i;
1250 1274
1251 /* 1275 error = -EFAULT;
1252 * Get user address base and length for this iovec. 1276 if (copy_from_user_mmap_sem(&entry, iov, sizeof(entry)))
1253 */
1254 error = get_user(base, &iov->iov_base);
1255 if (unlikely(error))
1256 break;
1257 error = get_user(len, &iov->iov_len);
1258 if (unlikely(error))
1259 break; 1277 break;
1260 1278
1279 base = entry.iov_base;
1280 len = entry.iov_len;
1281
1261 /* 1282 /*
1262 * Sanity check this iovec. 0 read succeeds. 1283 * Sanity check this iovec. 0 read succeeds.
1263 */ 1284 */
1285 error = 0;
1264 if (unlikely(!len)) 1286 if (unlikely(!len))
1265 break; 1287 break;
1266 error = -EFAULT; 1288 error = -EFAULT;
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index 135353f8a2..5afe2a26f5 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -248,12 +248,7 @@ int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr)
248 248
249void sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr) 249void sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr)
250{ 250{
251 if (sysfs_hash_and_remove(kobj->sd, attr->attr.name) < 0) { 251 sysfs_hash_and_remove(kobj->sd, attr->attr.name);
252 printk(KERN_ERR "%s: "
253 "bad dentry or inode or no such file: \"%s\"\n",
254 __FUNCTION__, attr->attr.name);
255 dump_stack();
256 }
257} 252}
258 253
259EXPORT_SYMBOL_GPL(sysfs_create_bin_file); 254EXPORT_SYMBOL_GPL(sysfs_create_bin_file);
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 048e6054c2..83e76b3813 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -762,12 +762,15 @@ static int sysfs_count_nlink(struct sysfs_dirent *sd)
762static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry, 762static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
763 struct nameidata *nd) 763 struct nameidata *nd)
764{ 764{
765 struct dentry *ret = NULL;
765 struct sysfs_dirent * parent_sd = dentry->d_parent->d_fsdata; 766 struct sysfs_dirent * parent_sd = dentry->d_parent->d_fsdata;
766 struct sysfs_dirent * sd; 767 struct sysfs_dirent * sd;
767 struct bin_attribute *bin_attr; 768 struct bin_attribute *bin_attr;
768 struct inode *inode; 769 struct inode *inode;
769 int found = 0; 770 int found = 0;
770 771
772 mutex_lock(&sysfs_mutex);
773
771 for (sd = parent_sd->s_children; sd; sd = sd->s_sibling) { 774 for (sd = parent_sd->s_children; sd; sd = sd->s_sibling) {
772 if (sysfs_type(sd) && 775 if (sysfs_type(sd) &&
773 !strcmp(sd->s_name, dentry->d_name.name)) { 776 !strcmp(sd->s_name, dentry->d_name.name)) {
@@ -778,14 +781,14 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
778 781
779 /* no such entry */ 782 /* no such entry */
780 if (!found) 783 if (!found)
781 return NULL; 784 goto out_unlock;
782 785
783 /* attach dentry and inode */ 786 /* attach dentry and inode */
784 inode = sysfs_get_inode(sd); 787 inode = sysfs_get_inode(sd);
785 if (!inode) 788 if (!inode) {
786 return ERR_PTR(-ENOMEM); 789 ret = ERR_PTR(-ENOMEM);
787 790 goto out_unlock;
788 mutex_lock(&sysfs_mutex); 791 }
789 792
790 if (inode->i_state & I_NEW) { 793 if (inode->i_state & I_NEW) {
791 /* initialize inode according to type */ 794 /* initialize inode according to type */
@@ -815,9 +818,9 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
815 sysfs_instantiate(dentry, inode); 818 sysfs_instantiate(dentry, inode);
816 sysfs_attach_dentry(sd, dentry); 819 sysfs_attach_dentry(sd, dentry);
817 820
821 out_unlock:
818 mutex_unlock(&sysfs_mutex); 822 mutex_unlock(&sysfs_mutex);
819 823 return ret;
820 return NULL;
821} 824}
822 825
823const struct inode_operations sysfs_dir_inode_operations = { 826const struct inode_operations sysfs_dir_inode_operations = {
@@ -942,6 +945,8 @@ int sysfs_rename_dir(struct kobject *kobj, struct sysfs_dirent *new_parent_sd,
942 if (error) 945 if (error)
943 goto out_drop; 946 goto out_drop;
944 947
948 mutex_lock(&sysfs_mutex);
949
945 dup_name = sd->s_name; 950 dup_name = sd->s_name;
946 sd->s_name = new_name; 951 sd->s_name = new_name;
947 952
@@ -949,8 +954,6 @@ int sysfs_rename_dir(struct kobject *kobj, struct sysfs_dirent *new_parent_sd,
949 d_add(new_dentry, NULL); 954 d_add(new_dentry, NULL);
950 d_move(sd->s_dentry, new_dentry); 955 d_move(sd->s_dentry, new_dentry);
951 956
952 mutex_lock(&sysfs_mutex);
953
954 sysfs_unlink_sibling(sd); 957 sysfs_unlink_sibling(sd);
955 sysfs_get(new_parent_sd); 958 sysfs_get(new_parent_sd);
956 sysfs_put(sd->s_parent); 959 sysfs_put(sd->s_parent);
diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c
index 276f7207a5..87e87dcd3f 100644
--- a/fs/udf/balloc.c
+++ b/fs/udf/balloc.c
@@ -540,26 +540,24 @@ static void udf_table_free_blocks(struct super_block *sb,
540 if (epos.offset + adsize > sb->s_blocksize) { 540 if (epos.offset + adsize > sb->s_blocksize) {
541 loffset = epos.offset; 541 loffset = epos.offset;
542 aed->lengthAllocDescs = cpu_to_le32(adsize); 542 aed->lengthAllocDescs = cpu_to_le32(adsize);
543 sptr = UDF_I_DATA(inode) + epos.offset - 543 sptr = UDF_I_DATA(table) + epos.offset - adsize;
544 udf_file_entry_alloc_offset(inode) +
545 UDF_I_LENEATTR(inode) - adsize;
546 dptr = epos.bh->b_data + sizeof(struct allocExtDesc); 544 dptr = epos.bh->b_data + sizeof(struct allocExtDesc);
547 memcpy(dptr, sptr, adsize); 545 memcpy(dptr, sptr, adsize);
548 epos.offset = sizeof(struct allocExtDesc) + adsize; 546 epos.offset = sizeof(struct allocExtDesc) + adsize;
549 } else { 547 } else {
550 loffset = epos.offset + adsize; 548 loffset = epos.offset + adsize;
551 aed->lengthAllocDescs = cpu_to_le32(0); 549 aed->lengthAllocDescs = cpu_to_le32(0);
552 sptr = oepos.bh->b_data + epos.offset;
553 epos.offset = sizeof(struct allocExtDesc);
554
555 if (oepos.bh) { 550 if (oepos.bh) {
551 sptr = oepos.bh->b_data + epos.offset;
556 aed = (struct allocExtDesc *)oepos.bh->b_data; 552 aed = (struct allocExtDesc *)oepos.bh->b_data;
557 aed->lengthAllocDescs = 553 aed->lengthAllocDescs =
558 cpu_to_le32(le32_to_cpu(aed->lengthAllocDescs) + adsize); 554 cpu_to_le32(le32_to_cpu(aed->lengthAllocDescs) + adsize);
559 } else { 555 } else {
556 sptr = UDF_I_DATA(table) + epos.offset;
560 UDF_I_LENALLOC(table) += adsize; 557 UDF_I_LENALLOC(table) += adsize;
561 mark_inode_dirty(table); 558 mark_inode_dirty(table);
562 } 559 }
560 epos.offset = sizeof(struct allocExtDesc);
563 } 561 }
564 if (UDF_SB_UDFREV(sb) >= 0x0200) 562 if (UDF_SB_UDFREV(sb) >= 0x0200)
565 udf_new_tag(epos.bh->b_data, TAG_IDENT_AED, 3, 1, 563 udf_new_tag(epos.bh->b_data, TAG_IDENT_AED, 3, 1,
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 382be7be5a..c68a6e730b 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -89,7 +89,7 @@ static int udf_find_fileset(struct super_block *, kernel_lb_addr *,
89static void udf_load_pvoldesc(struct super_block *, struct buffer_head *); 89static void udf_load_pvoldesc(struct super_block *, struct buffer_head *);
90static void udf_load_fileset(struct super_block *, struct buffer_head *, 90static void udf_load_fileset(struct super_block *, struct buffer_head *,
91 kernel_lb_addr *); 91 kernel_lb_addr *);
92static void udf_load_partdesc(struct super_block *, struct buffer_head *); 92static int udf_load_partdesc(struct super_block *, struct buffer_head *);
93static void udf_open_lvid(struct super_block *); 93static void udf_open_lvid(struct super_block *);
94static void udf_close_lvid(struct super_block *); 94static void udf_close_lvid(struct super_block *);
95static unsigned int udf_count_free(struct super_block *); 95static unsigned int udf_count_free(struct super_block *);
@@ -877,7 +877,7 @@ static void udf_load_fileset(struct super_block *sb, struct buffer_head *bh,
877 root->logicalBlockNum, root->partitionReferenceNum); 877 root->logicalBlockNum, root->partitionReferenceNum);
878} 878}
879 879
880static void udf_load_partdesc(struct super_block *sb, struct buffer_head *bh) 880static int udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)
881{ 881{
882 struct partitionDesc *p; 882 struct partitionDesc *p;
883 int i; 883 int i;
@@ -912,6 +912,11 @@ static void udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)
912 912
913 UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table = 913 UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table =
914 udf_iget(sb, loc); 914 udf_iget(sb, loc);
915 if (!UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table) {
916 udf_debug("cannot load unallocSpaceTable (part %d)\n",
917 i);
918 return 1;
919 }
915 UDF_SB_PARTFLAGS(sb,i) |= UDF_PART_FLAG_UNALLOC_TABLE; 920 UDF_SB_PARTFLAGS(sb,i) |= UDF_PART_FLAG_UNALLOC_TABLE;
916 udf_debug("unallocSpaceTable (part %d) @ %ld\n", 921 udf_debug("unallocSpaceTable (part %d) @ %ld\n",
917 i, UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table->i_ino); 922 i, UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table->i_ino);
@@ -938,6 +943,11 @@ static void udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)
938 943
939 UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table = 944 UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table =
940 udf_iget(sb, loc); 945 udf_iget(sb, loc);
946 if (!UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table) {
947 udf_debug("cannot load freedSpaceTable (part %d)\n",
948 i);
949 return 1;
950 }
941 UDF_SB_PARTFLAGS(sb,i) |= UDF_PART_FLAG_FREED_TABLE; 951 UDF_SB_PARTFLAGS(sb,i) |= UDF_PART_FLAG_FREED_TABLE;
942 udf_debug("freedSpaceTable (part %d) @ %ld\n", 952 udf_debug("freedSpaceTable (part %d) @ %ld\n",
943 i, UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table->i_ino); 953 i, UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table->i_ino);
@@ -966,6 +976,7 @@ static void udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)
966 le16_to_cpu(p->partitionNumber), i, UDF_SB_PARTTYPE(sb,i), 976 le16_to_cpu(p->partitionNumber), i, UDF_SB_PARTTYPE(sb,i),
967 UDF_SB_PARTROOT(sb,i), UDF_SB_PARTLEN(sb,i)); 977 UDF_SB_PARTROOT(sb,i), UDF_SB_PARTLEN(sb,i));
968 } 978 }
979 return 0;
969} 980}
970 981
971static int udf_load_logicalvol(struct super_block *sb, struct buffer_head *bh, 982static int udf_load_logicalvol(struct super_block *sb, struct buffer_head *bh,
@@ -1177,12 +1188,19 @@ static int udf_process_sequence(struct super_block *sb, long block, long lastblo
1177 udf_load_logicalvol(sb, bh, fileset); 1188 udf_load_logicalvol(sb, bh, fileset);
1178 } else if (i == VDS_POS_PARTITION_DESC) { 1189 } else if (i == VDS_POS_PARTITION_DESC) {
1179 struct buffer_head *bh2 = NULL; 1190 struct buffer_head *bh2 = NULL;
1180 udf_load_partdesc(sb, bh); 1191 if (udf_load_partdesc(sb, bh)) {
1192 brelse(bh);
1193 return 1;
1194 }
1181 for (j = vds[i].block + 1; j < vds[VDS_POS_TERMINATING_DESC].block; j++) { 1195 for (j = vds[i].block + 1; j < vds[VDS_POS_TERMINATING_DESC].block; j++) {
1182 bh2 = udf_read_tagged(sb, j, j, &ident); 1196 bh2 = udf_read_tagged(sb, j, j, &ident);
1183 gd = (struct generic_desc *)bh2->b_data; 1197 gd = (struct generic_desc *)bh2->b_data;
1184 if (ident == TAG_IDENT_PD) 1198 if (ident == TAG_IDENT_PD)
1185 udf_load_partdesc(sb, bh2); 1199 if (udf_load_partdesc(sb, bh2)) {
1200 brelse(bh);
1201 brelse(bh2);
1202 return 1;
1203 }
1186 brelse(bh2); 1204 brelse(bh2);
1187 } 1205 }
1188 } 1206 }
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 73402c5eeb..38eb0b7a1f 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -894,7 +894,7 @@ magic_found:
894 goto again; 894 goto again;
895 } 895 }
896 896
897 897 sbi->s_flags = flags;/*after that line some functions use s_flags*/
898 ufs_print_super_stuff(sb, usb1, usb2, usb3); 898 ufs_print_super_stuff(sb, usb1, usb2, usb3);
899 899
900 /* 900 /*
@@ -1025,8 +1025,6 @@ magic_found:
1025 UFS_MOUNT_UFSTYPE_44BSD) 1025 UFS_MOUNT_UFSTYPE_44BSD)
1026 uspi->s_maxsymlinklen = 1026 uspi->s_maxsymlinklen =
1027 fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen); 1027 fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen);
1028
1029 sbi->s_flags = flags;
1030 1028
1031 inode = iget(sb, UFS_ROOTINO); 1029 inode = iget(sb, UFS_ROOTINO);
1032 if (!inode || is_bad_inode(inode)) 1030 if (!inode || is_bad_inode(inode))
diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h
index b4acc7f3c3..e6ea293f30 100644
--- a/fs/xfs/linux-2.6/kmem.h
+++ b/fs/xfs/linux-2.6/kmem.h
@@ -103,7 +103,7 @@ extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast);
103static inline int 103static inline int
104kmem_shake_allow(gfp_t gfp_mask) 104kmem_shake_allow(gfp_t gfp_mask)
105{ 105{
106 return (gfp_mask & __GFP_WAIT); 106 return (gfp_mask & __GFP_WAIT) != 0;
107} 107}
108 108
109#endif /* __XFS_SUPPORT_KMEM_H__ */ 109#endif /* __XFS_SUPPORT_KMEM_H__ */
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index fd4105d662..5f152f60d7 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -181,6 +181,7 @@ xfs_setfilesize(
181 ip->i_d.di_size = isize; 181 ip->i_d.di_size = isize;
182 ip->i_update_core = 1; 182 ip->i_update_core = 1;
183 ip->i_update_size = 1; 183 ip->i_update_size = 1;
184 mark_inode_dirty_sync(vn_to_inode(ioend->io_vnode));
184 } 185 }
185 186
186 xfs_iunlock(ip, XFS_ILOCK_EXCL); 187 xfs_iunlock(ip, XFS_ILOCK_EXCL);
@@ -652,7 +653,7 @@ xfs_probe_cluster(
652 653
653 for (i = 0; i < pagevec_count(&pvec); i++) { 654 for (i = 0; i < pagevec_count(&pvec); i++) {
654 struct page *page = pvec.pages[i]; 655 struct page *page = pvec.pages[i];
655 size_t pg_offset, len = 0; 656 size_t pg_offset, pg_len = 0;
656 657
657 if (tindex == tlast) { 658 if (tindex == tlast) {
658 pg_offset = 659 pg_offset =
@@ -665,16 +666,16 @@ xfs_probe_cluster(
665 pg_offset = PAGE_CACHE_SIZE; 666 pg_offset = PAGE_CACHE_SIZE;
666 667
667 if (page->index == tindex && !TestSetPageLocked(page)) { 668 if (page->index == tindex && !TestSetPageLocked(page)) {
668 len = xfs_probe_page(page, pg_offset, mapped); 669 pg_len = xfs_probe_page(page, pg_offset, mapped);
669 unlock_page(page); 670 unlock_page(page);
670 } 671 }
671 672
672 if (!len) { 673 if (!pg_len) {
673 done = 1; 674 done = 1;
674 break; 675 break;
675 } 676 }
676 677
677 total += len; 678 total += pg_len;
678 tindex++; 679 tindex++;
679 } 680 }
680 681
diff --git a/fs/xfs/linux-2.6/xfs_globals.c b/fs/xfs/linux-2.6/xfs_globals.c
index bb72c3d414..81565dea9a 100644
--- a/fs/xfs/linux-2.6/xfs_globals.c
+++ b/fs/xfs/linux-2.6/xfs_globals.c
@@ -46,7 +46,7 @@ xfs_param_t xfs_params = {
46 .inherit_nosym = { 0, 0, 1 }, 46 .inherit_nosym = { 0, 0, 1 },
47 .rotorstep = { 1, 1, 255 }, 47 .rotorstep = { 1, 1, 255 },
48 .inherit_nodfrg = { 0, 1, 1 }, 48 .inherit_nodfrg = { 0, 1, 1 },
49 .fstrm_timer = { 1, 50, 3600*100}, 49 .fstrm_timer = { 1, 30*100, 3600*100},
50}; 50};
51 51
52/* 52/*
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 4528f9a3f3..491d1f4f20 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -415,8 +415,10 @@ xfs_fs_write_inode(
415 415
416 if (vp) { 416 if (vp) {
417 vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); 417 vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
418 if (sync) 418 if (sync) {
419 filemap_fdatawait(inode->i_mapping);
419 flags |= FLUSH_SYNC; 420 flags |= FLUSH_SYNC;
421 }
420 error = bhv_vop_iflush(vp, flags); 422 error = bhv_vop_iflush(vp, flags);
421 if (error == EAGAIN) 423 if (error == EAGAIN)
422 error = sync? bhv_vop_iflush(vp, flags | FLUSH_LOG) : 0; 424 error = sync? bhv_vop_iflush(vp, flags | FLUSH_LOG) : 0;
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 2d274b23ad..6ff0f4de16 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -120,7 +120,8 @@ xfs_Gqm_init(void)
120 * Initialize the dquot hash tables. 120 * Initialize the dquot hash tables.
121 */ 121 */
122 udqhash = kmem_zalloc_greedy(&hsize, 122 udqhash = kmem_zalloc_greedy(&hsize,
123 XFS_QM_HASHSIZE_LOW, XFS_QM_HASHSIZE_HIGH, 123 XFS_QM_HASHSIZE_LOW * sizeof(xfs_dqhash_t),
124 XFS_QM_HASHSIZE_HIGH * sizeof(xfs_dqhash_t),
124 KM_SLEEP | KM_MAYFAIL | KM_LARGE); 125 KM_SLEEP | KM_MAYFAIL | KM_LARGE);
125 gdqhash = kmem_zalloc(hsize, KM_SLEEP | KM_LARGE); 126 gdqhash = kmem_zalloc(hsize, KM_SLEEP | KM_LARGE);
126 hsize /= sizeof(xfs_dqhash_t); 127 hsize /= sizeof(xfs_dqhash_t);
diff --git a/fs/xfs/support/debug.h b/fs/xfs/support/debug.h
index a27a7c8c05..855da04086 100644
--- a/fs/xfs/support/debug.h
+++ b/fs/xfs/support/debug.h
@@ -34,10 +34,10 @@ extern void cmn_err(int, char *, ...)
34extern void assfail(char *expr, char *f, int l); 34extern void assfail(char *expr, char *f, int l);
35 35
36#define ASSERT_ALWAYS(expr) \ 36#define ASSERT_ALWAYS(expr) \
37 (unlikely((expr) != 0) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) 37 (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__))
38 38
39#ifndef DEBUG 39#ifndef DEBUG
40# define ASSERT(expr) ((void)0) 40#define ASSERT(expr) ((void)0)
41 41
42#ifndef STATIC 42#ifndef STATIC
43# define STATIC static noinline 43# define STATIC static noinline
@@ -49,8 +49,10 @@ extern void assfail(char *expr, char *f, int l);
49 49
50#else /* DEBUG */ 50#else /* DEBUG */
51 51
52# define ASSERT(expr) ASSERT_ALWAYS(expr) 52#include <linux/random.h>
53# include <linux/random.h> 53
54#define ASSERT(expr) \
55 (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__))
54 56
55#ifndef STATIC 57#ifndef STATIC
56# define STATIC noinline 58# define STATIC noinline
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
index aea37df4aa..26d09e2e1a 100644
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -1975,7 +1975,6 @@ xfs_da_do_buf(
1975 error = mappedbno == -2 ? 0 : XFS_ERROR(EFSCORRUPTED); 1975 error = mappedbno == -2 ? 0 : XFS_ERROR(EFSCORRUPTED);
1976 if (unlikely(error == EFSCORRUPTED)) { 1976 if (unlikely(error == EFSCORRUPTED)) {
1977 if (xfs_error_level >= XFS_ERRLEVEL_LOW) { 1977 if (xfs_error_level >= XFS_ERRLEVEL_LOW) {
1978 int i;
1979 cmn_err(CE_ALERT, "xfs_da_do_buf: bno %lld\n", 1978 cmn_err(CE_ALERT, "xfs_da_do_buf: bno %lld\n",
1980 (long long)bno); 1979 (long long)bno);
1981 cmn_err(CE_ALERT, "dir: inode %lld\n", 1980 cmn_err(CE_ALERT, "dir: inode %lld\n",
diff --git a/fs/xfs/xfs_filestream.c b/fs/xfs/xfs_filestream.c
index ce2278611b..36d8f6aa11 100644
--- a/fs/xfs/xfs_filestream.c
+++ b/fs/xfs/xfs_filestream.c
@@ -350,9 +350,10 @@ _xfs_filestream_update_ag(
350/* xfs_fstrm_free_func(): callback for freeing cached stream items. */ 350/* xfs_fstrm_free_func(): callback for freeing cached stream items. */
351void 351void
352xfs_fstrm_free_func( 352xfs_fstrm_free_func(
353 xfs_ino_t ino, 353 unsigned long ino,
354 fstrm_item_t *item) 354 void *data)
355{ 355{
356 fstrm_item_t *item = (fstrm_item_t *)data;
356 xfs_inode_t *ip = item->ip; 357 xfs_inode_t *ip = item->ip;
357 int ref; 358 int ref;
358 359
@@ -438,7 +439,7 @@ xfs_filestream_mount(
438 grp_count = 10; 439 grp_count = 10;
439 440
440 err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count, 441 err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count,
441 (xfs_mru_cache_free_func_t)xfs_fstrm_free_func); 442 xfs_fstrm_free_func);
442 443
443 return err; 444 return err;
444} 445}
@@ -467,8 +468,7 @@ void
467xfs_filestream_flush( 468xfs_filestream_flush(
468 xfs_mount_t *mp) 469 xfs_mount_t *mp)
469{ 470{
470 /* point in time flush, so keep the reaper running */ 471 xfs_mru_cache_flush(mp->m_filestream);
471 xfs_mru_cache_flush(mp->m_filestream, 1);
472} 472}
473 473
474/* 474/*
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 9d4c4fbeb3..9bfb69e1e8 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -2185,13 +2185,13 @@ xlog_state_do_callback(
2185 } 2185 }
2186 cb = iclog->ic_callback; 2186 cb = iclog->ic_callback;
2187 2187
2188 while (cb != 0) { 2188 while (cb) {
2189 iclog->ic_callback_tail = &(iclog->ic_callback); 2189 iclog->ic_callback_tail = &(iclog->ic_callback);
2190 iclog->ic_callback = NULL; 2190 iclog->ic_callback = NULL;
2191 LOG_UNLOCK(log, s); 2191 LOG_UNLOCK(log, s);
2192 2192
2193 /* perform callbacks in the order given */ 2193 /* perform callbacks in the order given */
2194 for (; cb != 0; cb = cb_next) { 2194 for (; cb; cb = cb_next) {
2195 cb_next = cb->cb_next; 2195 cb_next = cb->cb_next;
2196 cb->cb_func(cb->cb_arg, aborted); 2196 cb->cb_func(cb->cb_arg, aborted);
2197 } 2197 }
@@ -2202,7 +2202,7 @@ xlog_state_do_callback(
2202 loopdidcallbacks++; 2202 loopdidcallbacks++;
2203 funcdidcallbacks++; 2203 funcdidcallbacks++;
2204 2204
2205 ASSERT(iclog->ic_callback == 0); 2205 ASSERT(iclog->ic_callback == NULL);
2206 if (!(iclog->ic_state & XLOG_STATE_IOERROR)) 2206 if (!(iclog->ic_state & XLOG_STATE_IOERROR))
2207 iclog->ic_state = XLOG_STATE_DIRTY; 2207 iclog->ic_state = XLOG_STATE_DIRTY;
2208 2208
@@ -3242,10 +3242,10 @@ xlog_ticket_put(xlog_t *log,
3242#else 3242#else
3243 /* When we debug, it is easier if tickets are cycled */ 3243 /* When we debug, it is easier if tickets are cycled */
3244 ticket->t_next = NULL; 3244 ticket->t_next = NULL;
3245 if (log->l_tail != 0) { 3245 if (log->l_tail) {
3246 log->l_tail->t_next = ticket; 3246 log->l_tail->t_next = ticket;
3247 } else { 3247 } else {
3248 ASSERT(log->l_freelist == 0); 3248 ASSERT(log->l_freelist == NULL);
3249 log->l_freelist = ticket; 3249 log->l_freelist = ticket;
3250 } 3250 }
3251 log->l_tail = ticket; 3251 log->l_tail = ticket;
@@ -3463,7 +3463,7 @@ xlog_verify_iclog(xlog_t *log,
3463 s = LOG_LOCK(log); 3463 s = LOG_LOCK(log);
3464 icptr = log->l_iclog; 3464 icptr = log->l_iclog;
3465 for (i=0; i < log->l_iclog_bufs; i++) { 3465 for (i=0; i < log->l_iclog_bufs; i++) {
3466 if (icptr == 0) 3466 if (icptr == NULL)
3467 xlog_panic("xlog_verify_iclog: invalid ptr"); 3467 xlog_panic("xlog_verify_iclog: invalid ptr");
3468 icptr = icptr->ic_next; 3468 icptr = icptr->ic_next;
3469 } 3469 }
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index fddbb091a8..8ae6e8e5f3 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -1366,7 +1366,7 @@ xlog_recover_add_to_cont_trans(
1366 int old_len; 1366 int old_len;
1367 1367
1368 item = trans->r_itemq; 1368 item = trans->r_itemq;
1369 if (item == 0) { 1369 if (item == NULL) {
1370 /* finish copying rest of trans header */ 1370 /* finish copying rest of trans header */
1371 xlog_recover_add_item(&trans->r_itemq); 1371 xlog_recover_add_item(&trans->r_itemq);
1372 ptr = (xfs_caddr_t) &trans->r_theader + 1372 ptr = (xfs_caddr_t) &trans->r_theader +
@@ -1412,7 +1412,7 @@ xlog_recover_add_to_trans(
1412 if (!len) 1412 if (!len)
1413 return 0; 1413 return 0;
1414 item = trans->r_itemq; 1414 item = trans->r_itemq;
1415 if (item == 0) { 1415 if (item == NULL) {
1416 ASSERT(*(uint *)dp == XFS_TRANS_HEADER_MAGIC); 1416 ASSERT(*(uint *)dp == XFS_TRANS_HEADER_MAGIC);
1417 if (len == sizeof(xfs_trans_header_t)) 1417 if (len == sizeof(xfs_trans_header_t))
1418 xlog_recover_add_item(&trans->r_itemq); 1418 xlog_recover_add_item(&trans->r_itemq);
@@ -1467,12 +1467,12 @@ xlog_recover_unlink_tid(
1467 xlog_recover_t *tp; 1467 xlog_recover_t *tp;
1468 int found = 0; 1468 int found = 0;
1469 1469
1470 ASSERT(trans != 0); 1470 ASSERT(trans != NULL);
1471 if (trans == *q) { 1471 if (trans == *q) {
1472 *q = (*q)->r_next; 1472 *q = (*q)->r_next;
1473 } else { 1473 } else {
1474 tp = *q; 1474 tp = *q;
1475 while (tp != 0) { 1475 while (tp) {
1476 if (tp->r_next == trans) { 1476 if (tp->r_next == trans) {
1477 found = 1; 1477 found = 1;
1478 break; 1478 break;
@@ -1495,7 +1495,7 @@ xlog_recover_insert_item_backq(
1495 xlog_recover_item_t **q, 1495 xlog_recover_item_t **q,
1496 xlog_recover_item_t *item) 1496 xlog_recover_item_t *item)
1497{ 1497{
1498 if (*q == 0) { 1498 if (*q == NULL) {
1499 item->ri_prev = item->ri_next = item; 1499 item->ri_prev = item->ri_next = item;
1500 *q = item; 1500 *q = item;
1501 } else { 1501 } else {
@@ -1899,7 +1899,7 @@ xlog_recover_do_reg_buffer(
1899 break; 1899 break;
1900 nbits = xfs_contig_bits(data_map, map_size, bit); 1900 nbits = xfs_contig_bits(data_map, map_size, bit);
1901 ASSERT(nbits > 0); 1901 ASSERT(nbits > 0);
1902 ASSERT(item->ri_buf[i].i_addr != 0); 1902 ASSERT(item->ri_buf[i].i_addr != NULL);
1903 ASSERT(item->ri_buf[i].i_len % XFS_BLI_CHUNK == 0); 1903 ASSERT(item->ri_buf[i].i_len % XFS_BLI_CHUNK == 0);
1904 ASSERT(XFS_BUF_COUNT(bp) >= 1904 ASSERT(XFS_BUF_COUNT(bp) >=
1905 ((uint)bit << XFS_BLI_SHIFT)+(nbits<<XFS_BLI_SHIFT)); 1905 ((uint)bit << XFS_BLI_SHIFT)+(nbits<<XFS_BLI_SHIFT));
diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs/xfs_mru_cache.c
index 7deb9e3cbb..e0b358c1c5 100644
--- a/fs/xfs/xfs_mru_cache.c
+++ b/fs/xfs/xfs_mru_cache.c
@@ -206,8 +206,11 @@ _xfs_mru_cache_list_insert(
206 */ 206 */
207 if (!_xfs_mru_cache_migrate(mru, now)) { 207 if (!_xfs_mru_cache_migrate(mru, now)) {
208 mru->time_zero = now; 208 mru->time_zero = now;
209 if (!mru->next_reap) 209 if (!mru->queued) {
210 mru->next_reap = mru->grp_count * mru->grp_time; 210 mru->queued = 1;
211 queue_delayed_work(xfs_mru_reap_wq, &mru->work,
212 mru->grp_count * mru->grp_time);
213 }
211 } else { 214 } else {
212 grp = (now - mru->time_zero) / mru->grp_time; 215 grp = (now - mru->time_zero) / mru->grp_time;
213 grp = (mru->lru_grp + grp) % mru->grp_count; 216 grp = (mru->lru_grp + grp) % mru->grp_count;
@@ -271,29 +274,26 @@ _xfs_mru_cache_reap(
271 struct work_struct *work) 274 struct work_struct *work)
272{ 275{
273 xfs_mru_cache_t *mru = container_of(work, xfs_mru_cache_t, work.work); 276 xfs_mru_cache_t *mru = container_of(work, xfs_mru_cache_t, work.work);
274 unsigned long now; 277 unsigned long now, next;
275 278
276 ASSERT(mru && mru->lists); 279 ASSERT(mru && mru->lists);
277 if (!mru || !mru->lists) 280 if (!mru || !mru->lists)
278 return; 281 return;
279 282
280 mutex_spinlock(&mru->lock); 283 mutex_spinlock(&mru->lock);
281 now = jiffies; 284 next = _xfs_mru_cache_migrate(mru, jiffies);
282 if (mru->reap_all || 285 _xfs_mru_cache_clear_reap_list(mru);
283 (mru->next_reap && time_after(now, mru->next_reap))) { 286
284 if (mru->reap_all) 287 mru->queued = next;
285 now += mru->grp_count * mru->grp_time * 2; 288 if ((mru->queued > 0)) {
286 mru->next_reap = _xfs_mru_cache_migrate(mru, now); 289 now = jiffies;
287 _xfs_mru_cache_clear_reap_list(mru); 290 if (next <= now)
291 next = 0;
292 else
293 next -= now;
294 queue_delayed_work(xfs_mru_reap_wq, &mru->work, next);
288 } 295 }
289 296
290 /*
291 * the process that triggered the reap_all is responsible
292 * for restating the periodic reap if it is required.
293 */
294 if (!mru->reap_all)
295 queue_delayed_work(xfs_mru_reap_wq, &mru->work, mru->grp_time);
296 mru->reap_all = 0;
297 mutex_spinunlock(&mru->lock, 0); 297 mutex_spinunlock(&mru->lock, 0);
298} 298}
299 299
@@ -352,7 +352,7 @@ xfs_mru_cache_create(
352 352
353 /* An extra list is needed to avoid reaping up to a grp_time early. */ 353 /* An extra list is needed to avoid reaping up to a grp_time early. */
354 mru->grp_count = grp_count + 1; 354 mru->grp_count = grp_count + 1;
355 mru->lists = kmem_alloc(mru->grp_count * sizeof(*mru->lists), KM_SLEEP); 355 mru->lists = kmem_zalloc(mru->grp_count * sizeof(*mru->lists), KM_SLEEP);
356 356
357 if (!mru->lists) { 357 if (!mru->lists) {
358 err = ENOMEM; 358 err = ENOMEM;
@@ -374,11 +374,6 @@ xfs_mru_cache_create(
374 mru->grp_time = grp_time; 374 mru->grp_time = grp_time;
375 mru->free_func = free_func; 375 mru->free_func = free_func;
376 376
377 /* start up the reaper event */
378 mru->next_reap = 0;
379 mru->reap_all = 0;
380 queue_delayed_work(xfs_mru_reap_wq, &mru->work, mru->grp_time);
381
382 *mrup = mru; 377 *mrup = mru;
383 378
384exit: 379exit:
@@ -394,35 +389,25 @@ exit:
394 * Call xfs_mru_cache_flush() to flush out all cached entries, calling their 389 * Call xfs_mru_cache_flush() to flush out all cached entries, calling their
395 * free functions as they're deleted. When this function returns, the caller is 390 * free functions as they're deleted. When this function returns, the caller is
396 * guaranteed that all the free functions for all the elements have finished 391 * guaranteed that all the free functions for all the elements have finished
397 * executing. 392 * executing and the reaper is not running.
398 *
399 * While we are flushing, we stop the periodic reaper event from triggering.
400 * Normally, we want to restart this periodic event, but if we are shutting
401 * down the cache we do not want it restarted. hence the restart parameter
402 * where 0 = do not restart reaper and 1 = restart reaper.
403 */ 393 */
404void 394void
405xfs_mru_cache_flush( 395xfs_mru_cache_flush(
406 xfs_mru_cache_t *mru, 396 xfs_mru_cache_t *mru)
407 int restart)
408{ 397{
409 if (!mru || !mru->lists) 398 if (!mru || !mru->lists)
410 return; 399 return;
411 400
412 cancel_rearming_delayed_workqueue(xfs_mru_reap_wq, &mru->work);
413
414 mutex_spinlock(&mru->lock); 401 mutex_spinlock(&mru->lock);
415 mru->reap_all = 1; 402 if (mru->queued) {
416 mutex_spinunlock(&mru->lock, 0); 403 mutex_spinunlock(&mru->lock, 0);
404 cancel_rearming_delayed_workqueue(xfs_mru_reap_wq, &mru->work);
405 mutex_spinlock(&mru->lock);
406 }
417 407
418 queue_work(xfs_mru_reap_wq, &mru->work.work); 408 _xfs_mru_cache_migrate(mru, jiffies + mru->grp_count * mru->grp_time);
419 flush_workqueue(xfs_mru_reap_wq); 409 _xfs_mru_cache_clear_reap_list(mru);
420 410
421 mutex_spinlock(&mru->lock);
422 WARN_ON_ONCE(mru->reap_all != 0);
423 mru->reap_all = 0;
424 if (restart)
425 queue_delayed_work(xfs_mru_reap_wq, &mru->work, mru->grp_time);
426 mutex_spinunlock(&mru->lock, 0); 411 mutex_spinunlock(&mru->lock, 0);
427} 412}
428 413
@@ -433,8 +418,7 @@ xfs_mru_cache_destroy(
433 if (!mru || !mru->lists) 418 if (!mru || !mru->lists)
434 return; 419 return;
435 420
436 /* we don't want the reaper to restart here */ 421 xfs_mru_cache_flush(mru);
437 xfs_mru_cache_flush(mru, 0);
438 422
439 kmem_free(mru->lists, mru->grp_count * sizeof(*mru->lists)); 423 kmem_free(mru->lists, mru->grp_count * sizeof(*mru->lists));
440 kmem_free(mru, sizeof(*mru)); 424 kmem_free(mru, sizeof(*mru));
diff --git a/fs/xfs/xfs_mru_cache.h b/fs/xfs/xfs_mru_cache.h
index 624fd10ee8..dd58ea1bbe 100644
--- a/fs/xfs/xfs_mru_cache.h
+++ b/fs/xfs/xfs_mru_cache.h
@@ -32,11 +32,9 @@ typedef struct xfs_mru_cache
32 unsigned int grp_time; /* Time period spanned by grps. */ 32 unsigned int grp_time; /* Time period spanned by grps. */
33 unsigned int lru_grp; /* Group containing time zero. */ 33 unsigned int lru_grp; /* Group containing time zero. */
34 unsigned long time_zero; /* Time first element was added. */ 34 unsigned long time_zero; /* Time first element was added. */
35 unsigned long next_reap; /* Time that the reaper should
36 next do something. */
37 unsigned int reap_all; /* if set, reap all lists */
38 xfs_mru_cache_free_func_t free_func; /* Function pointer for freeing. */ 35 xfs_mru_cache_free_func_t free_func; /* Function pointer for freeing. */
39 struct delayed_work work; /* Workqueue data for reaping. */ 36 struct delayed_work work; /* Workqueue data for reaping. */
37 unsigned int queued; /* work has been queued */
40} xfs_mru_cache_t; 38} xfs_mru_cache_t;
41 39
42int xfs_mru_cache_init(void); 40int xfs_mru_cache_init(void);
@@ -44,7 +42,7 @@ void xfs_mru_cache_uninit(void);
44int xfs_mru_cache_create(struct xfs_mru_cache **mrup, unsigned int lifetime_ms, 42int xfs_mru_cache_create(struct xfs_mru_cache **mrup, unsigned int lifetime_ms,
45 unsigned int grp_count, 43 unsigned int grp_count,
46 xfs_mru_cache_free_func_t free_func); 44 xfs_mru_cache_free_func_t free_func);
47void xfs_mru_cache_flush(xfs_mru_cache_t *mru, int restart); 45void xfs_mru_cache_flush(xfs_mru_cache_t *mru);
48void xfs_mru_cache_destroy(struct xfs_mru_cache *mru); 46void xfs_mru_cache_destroy(struct xfs_mru_cache *mru);
49int xfs_mru_cache_insert(struct xfs_mru_cache *mru, unsigned long key, 47int xfs_mru_cache_insert(struct xfs_mru_cache *mru, unsigned long key,
50 void *value); 48 void *value);
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 1a5ad8cd97..6034592299 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -1082,6 +1082,9 @@ xfs_fsync(
1082 if (XFS_FORCED_SHUTDOWN(ip->i_mount)) 1082 if (XFS_FORCED_SHUTDOWN(ip->i_mount))
1083 return XFS_ERROR(EIO); 1083 return XFS_ERROR(EIO);
1084 1084
1085 if (flag & FSYNC_DATA)
1086 filemap_fdatawait(vn_to_inode(XFS_ITOV(ip))->i_mapping);
1087
1085 /* 1088 /*
1086 * We always need to make sure that the required inode state 1089 * We always need to make sure that the required inode state
1087 * is safe on disk. The vnode might be clean but because 1090 * is safe on disk. The vnode might be clean but because
@@ -3769,12 +3772,16 @@ xfs_inode_flush(
3769 sync_lsn = log->l_last_sync_lsn; 3772 sync_lsn = log->l_last_sync_lsn;
3770 GRANT_UNLOCK(log, s); 3773 GRANT_UNLOCK(log, s);
3771 3774
3772 if ((XFS_LSN_CMP(iip->ili_last_lsn, sync_lsn) <= 0)) 3775 if ((XFS_LSN_CMP(iip->ili_last_lsn, sync_lsn) > 0)) {
3773 return 0; 3776 if (flags & FLUSH_SYNC)
3777 log_flags |= XFS_LOG_SYNC;
3778 error = xfs_log_force(mp, iip->ili_last_lsn, log_flags);
3779 if (error)
3780 return error;
3781 }
3774 3782
3775 if (flags & FLUSH_SYNC) 3783 if (ip->i_update_core == 0)
3776 log_flags |= XFS_LOG_SYNC; 3784 return 0;
3777 return xfs_log_force(mp, iip->ili_last_lsn, log_flags);
3778 } 3785 }
3779 } 3786 }
3780 3787
@@ -3788,9 +3795,6 @@ xfs_inode_flush(
3788 if (flags & FLUSH_INODE) { 3795 if (flags & FLUSH_INODE) {
3789 int flush_flags; 3796 int flush_flags;
3790 3797
3791 if (xfs_ipincount(ip))
3792 return EAGAIN;
3793
3794 if (flags & FLUSH_SYNC) { 3798 if (flags & FLUSH_SYNC) {
3795 xfs_ilock(ip, XFS_ILOCK_SHARED); 3799 xfs_ilock(ip, XFS_ILOCK_SHARED);
3796 xfs_iflock(ip); 3800 xfs_iflock(ip);
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 3d0fea235b..86aea44ce6 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -321,8 +321,7 @@ struct acpi_bus_event {
321}; 321};
322 322
323extern struct kset acpi_subsys; 323extern struct kset acpi_subsys;
324extern int acpi_bus_generate_genetlink_event(struct acpi_device *device, 324extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int);
325 u8 type, int data);
326/* 325/*
327 * External Functions 326 * External Functions
328 */ 327 */
@@ -332,8 +331,13 @@ void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context);
332int acpi_bus_get_status(struct acpi_device *device); 331int acpi_bus_get_status(struct acpi_device *device);
333int acpi_bus_get_power(acpi_handle handle, int *state); 332int acpi_bus_get_power(acpi_handle handle, int *state);
334int acpi_bus_set_power(acpi_handle handle, int state); 333int acpi_bus_set_power(acpi_handle handle, int state);
335int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data); 334#ifdef CONFIG_ACPI_PROC_EVENT
335int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data);
336int acpi_bus_receive_event(struct acpi_bus_event *event); 336int acpi_bus_receive_event(struct acpi_bus_event *event);
337#else
338static inline int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data)
339 { return 0; }
340#endif
337int acpi_bus_register_driver(struct acpi_driver *driver); 341int acpi_bus_register_driver(struct acpi_driver *driver);
338void acpi_bus_unregister_driver(struct acpi_driver *driver); 342void acpi_bus_unregister_driver(struct acpi_driver *driver);
339int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, 343int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent,
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index 202acb9ff4..f85f77a538 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -147,10 +147,6 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle)
147/*-------------------------------------------------------------------------- 147/*--------------------------------------------------------------------------
148 Suspend/Resume 148 Suspend/Resume
149 -------------------------------------------------------------------------- */ 149 -------------------------------------------------------------------------- */
150#ifdef CONFIG_ACPI_SLEEP
151extern int acpi_sleep_init(void); 150extern int acpi_sleep_init(void);
152#else
153static inline int acpi_sleep_init(void) { return 0; }
154#endif
155 151
156#endif /*__ACPI_DRIVERS_H__*/ 152#endif /*__ACPI_DRIVERS_H__*/
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index b5cca5daa3..3d7ab9e0c9 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -130,7 +130,7 @@ acpi_walk_namespace(acpi_object_type type,
130 void *context, void **return_value); 130 void *context, void **return_value);
131 131
132acpi_status 132acpi_status
133acpi_get_devices(char *HID, 133acpi_get_devices(const char *HID,
134 acpi_walk_callback user_function, 134 acpi_walk_callback user_function,
135 void *context, void **return_value); 135 void *context, void **return_value);
136 136
diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h
index aeb4498e5e..8848265540 100644
--- a/include/acpi/acstruct.h
+++ b/include/acpi/acstruct.h
@@ -146,7 +146,7 @@ struct acpi_init_walk_info {
146struct acpi_get_devices_info { 146struct acpi_get_devices_info {
147 acpi_walk_callback user_function; 147 acpi_walk_callback user_function;
148 void *context; 148 void *context;
149 char *hid; 149 const char *hid;
150}; 150};
151 151
152union acpi_aml_operands { 152union acpi_aml_operands {
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index ec3ffdadb4..99934a999e 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -320,6 +320,8 @@ int acpi_processor_power_init(struct acpi_processor *pr,
320int acpi_processor_cst_has_changed(struct acpi_processor *pr); 320int acpi_processor_cst_has_changed(struct acpi_processor *pr);
321int acpi_processor_power_exit(struct acpi_processor *pr, 321int acpi_processor_power_exit(struct acpi_processor *pr,
322 struct acpi_device *device); 322 struct acpi_device *device);
323int acpi_processor_suspend(struct acpi_device * device, pm_message_t state);
324int acpi_processor_resume(struct acpi_device * device);
323 325
324/* in processor_thermal.c */ 326/* in processor_thermal.c */
325int acpi_processor_get_limit_info(struct acpi_processor *pr); 327int acpi_processor_get_limit_info(struct acpi_processor *pr);
diff --git a/include/asm-arm/arch-at91/irqs.h b/include/asm-arm/arch-at91/irqs.h
index 1127a3b5e9..70b1216dce 100644
--- a/include/asm-arm/arch-at91/irqs.h
+++ b/include/asm-arm/arch-at91/irqs.h
@@ -42,4 +42,7 @@
42 */ 42 */
43#define NR_IRQS (NR_AIC_IRQS + (5 * 32)) 43#define NR_IRQS (NR_AIC_IRQS + (5 * 32))
44 44
45/* FIQ is AIC source 0. */
46#define FIQ_START AT91_ID_FIQ
47
45#endif 48#endif
diff --git a/include/asm-arm/arch-omap/irda.h b/include/asm-arm/arch-omap/irda.h
index 345a649ec8..96bb12fab4 100644
--- a/include/asm-arm/arch-omap/irda.h
+++ b/include/asm-arm/arch-omap/irda.h
@@ -31,6 +31,7 @@ struct omap_irda_config {
31 unsigned long src_start; 31 unsigned long src_start;
32 int tx_trigger; 32 int tx_trigger;
33 int rx_trigger; 33 int rx_trigger;
34 int mode;
34}; 35};
35 36
36#endif 37#endif
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h
index d1294a46c7..6c1c968b29 100644
--- a/include/asm-arm/cacheflush.h
+++ b/include/asm-arm/cacheflush.h
@@ -426,6 +426,13 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
426 */ 426 */
427#define flush_icache_page(vma,page) do { } while (0) 427#define flush_icache_page(vma,page) do { } while (0)
428 428
429static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt,
430 unsigned offset, size_t size)
431{
432 const void *start = (void __force *)virt + offset;
433 dmac_inv_range(start, start + size);
434}
435
429#define __cacheid_present(val) (val != read_cpuid(CPUID_ID)) 436#define __cacheid_present(val) (val != read_cpuid(CPUID_ID))
430#define __cacheid_type_v7(val) ((val & (7 << 29)) == (4 << 29)) 437#define __cacheid_type_v7(val) ((val & (7 << 29)) == (4 << 29))
431 438
diff --git a/include/asm-arm/plat-s3c/map.h b/include/asm-arm/plat-s3c/map.h
index 95a82b0e84..b84289d32a 100644
--- a/include/asm-arm/plat-s3c/map.h
+++ b/include/asm-arm/plat-s3c/map.h
@@ -30,11 +30,11 @@
30#define S3C_ADDR(x) (S3C_ADDR_BASE + (x)) 30#define S3C_ADDR(x) (S3C_ADDR_BASE + (x))
31#endif 31#endif
32 32
33#define S3C_VA_IRQ S3C_ADDR(0x000000000) /* irq controller(s) */ 33#define S3C_VA_IRQ S3C_ADDR(0x00000000) /* irq controller(s) */
34#define S3C_VA_SYS S3C_ADDR(0x001000000) /* system control */ 34#define S3C_VA_SYS S3C_ADDR(0x00100000) /* system control */
35#define S3C_VA_MEM S3C_ADDR(0x002000000) /* system control */ 35#define S3C_VA_MEM S3C_ADDR(0x00200000) /* system control */
36#define S3C_VA_TIMER S3C_ADDR(0x003000000) /* timer block */ 36#define S3C_VA_TIMER S3C_ADDR(0x00300000) /* timer block */
37#define S3C_VA_WATCHDOG S3C_ADDR(0x004000000) /* watchdog */ 37#define S3C_VA_WATCHDOG S3C_ADDR(0x00400000) /* watchdog */
38#define S3C_VA_UART S3C_ADDR(0x010000000) /* UART */ 38#define S3C_VA_UART S3C_ADDR(0x01000000) /* UART */
39 39
40#endif /* __ASM_PLAT_MAP_H */ 40#endif /* __ASM_PLAT_MAP_H */
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
index e043cafa3c..69b9f8e120 100644
--- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
@@ -1,5 +1,6 @@
1#include <linux/serial.h> 1#include <linux/serial.h>
2#include <asm/dma.h> 2#include <asm/dma.h>
3#include <asm/portmux.h>
3 4
4#define NR_PORTS 1 5#define NR_PORTS 1
5 6
@@ -92,18 +93,24 @@ struct bfin_serial_res bfin_serial_resource[] = {
92 } 93 }
93}; 94};
94 95
96#define DRIVER_NAME "bfin-uart"
95 97
96int nr_ports = NR_PORTS; 98int nr_ports = NR_PORTS;
97static void bfin_serial_hw_init(struct bfin_serial_port *uart) 99static void bfin_serial_hw_init(struct bfin_serial_port *uart)
98{ 100{
99 101
102#ifdef CONFIG_SERIAL_BFIN_UART0
103 peripheral_request(P_UART0_TX, DRIVER_NAME);
104 peripheral_request(P_UART0_RX, DRIVER_NAME);
105#endif
106
100#ifdef CONFIG_SERIAL_BFIN_CTSRTS 107#ifdef CONFIG_SERIAL_BFIN_CTSRTS
101 if (uart->cts_pin >= 0) { 108 if (uart->cts_pin >= 0) {
102 gpio_request(uart->cts_pin, NULL); 109 gpio_request(uart->cts_pin, DRIVER_NAME);
103 gpio_direction_input(uart->cts_pin); 110 gpio_direction_input(uart->cts_pin);
104 } 111 }
105 if (uart->rts_pin >= 0) { 112 if (uart->rts_pin >= 0) {
106 gpio_request(uart->rts_pin, NULL); 113 gpio_request(uart->rts_pin, DRIVER_NAME);
107 gpio_direction_input(uart->rts_pin); 114 gpio_direction_input(uart->rts_pin);
108 } 115 }
109#endif 116#endif
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
index 8f5d9c4d8d..6fb328f518 100644
--- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
@@ -1,5 +1,6 @@
1#include <linux/serial.h> 1#include <linux/serial.h>
2#include <asm/dma.h> 2#include <asm/dma.h>
3#include <asm/portmux.h>
3 4
4#define NR_PORTS 2 5#define NR_PORTS 2
5 6
@@ -122,25 +123,29 @@ struct bfin_serial_res bfin_serial_resource[] = {
122 123
123int nr_ports = ARRAY_SIZE(bfin_serial_resource); 124int nr_ports = ARRAY_SIZE(bfin_serial_resource);
124 125
126#define DRIVER_NAME "bfin-uart"
127
125static void bfin_serial_hw_init(struct bfin_serial_port *uart) 128static void bfin_serial_hw_init(struct bfin_serial_port *uart)
126{ 129{
127 unsigned short val;
128 val = bfin_read16(BFIN_PORT_MUX);
129 val &= ~(PFDE | PFTE);
130 bfin_write16(BFIN_PORT_MUX, val);
131 130
132 val = bfin_read16(PORTF_FER); 131#ifdef CONFIG_SERIAL_BFIN_UART0
133 val |= 0xF; 132 peripheral_request(P_UART0_TX, DRIVER_NAME);
134 bfin_write16(PORTF_FER, val); 133 peripheral_request(P_UART0_RX, DRIVER_NAME);
134#endif
135
136#ifdef CONFIG_SERIAL_BFIN_UART1
137 peripheral_request(P_UART1_TX, DRIVER_NAME);
138 peripheral_request(P_UART1_RX, DRIVER_NAME);
139#endif
135 140
136#ifdef CONFIG_SERIAL_BFIN_CTSRTS 141#ifdef CONFIG_SERIAL_BFIN_CTSRTS
137 if (uart->cts_pin >= 0) { 142 if (uart->cts_pin >= 0) {
138 gpio_request(uart->cts_pin, NULL); 143 gpio_request(uart->cts_pin, DRIVER_NAME);
139 gpio_direction_input(uart->cts_pin); 144 gpio_direction_input(uart->cts_pin);
140 } 145 }
141 146
142 if (uart->rts_pin >= 0) { 147 if (uart->rts_pin >= 0) {
143 gpio_request(uart->rts_pin, NULL); 148 gpio_request(uart->rts_pin, DRIVER_NAME);
144 gpio_direction_output(uart->rts_pin); 149 gpio_direction_output(uart->rts_pin);
145 } 150 }
146#endif 151#endif
diff --git a/include/asm-blackfin/mach-bf537/portmux.h b/include/asm-blackfin/mach-bf537/portmux.h
index 23e13c5abc..ae6c53b284 100644
--- a/include/asm-blackfin/mach-bf537/portmux.h
+++ b/include/asm-blackfin/mach-bf537/portmux.h
@@ -106,4 +106,37 @@
106#define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1)) 106#define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1))
107#define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(2)) 107#define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(2))
108 108
109#endif /* _MACH_PORTMUX_H_ */ 109#define P_MII0 {\
110 P_MII0_ETxD0, \
111 P_MII0_ETxD1, \
112 P_MII0_ETxD2, \
113 P_MII0_ETxD3, \
114 P_MII0_ETxEN, \
115 P_MII0_TxCLK, \
116 P_MII0_PHYINT, \
117 P_MII0_COL, \
118 P_MII0_ERxD0, \
119 P_MII0_ERxD1, \
120 P_MII0_ERxD2, \
121 P_MII0_ERxD3, \
122 P_MII0_ERxDV, \
123 P_MII0_ERxCLK, \
124 P_MII0_ERxER, \
125 P_MII0_CRS, \
126 P_MDC, \
127 P_MDIO, 0}
128
129
130#define P_RMII0 {\
131 P_MII0_ETxD0, \
132 P_MII0_ETxD1, \
133 P_MII0_ETxEN, \
134 P_MII0_ERxD0, \
135 P_MII0_ERxD1, \
136 P_MII0_ERxER, \
137 P_RMII0_REF_CLK, \
138 P_RMII0_MDINT, \
139 P_RMII0_CRS_DV, \
140 P_MDC, \
141 P_MDIO, 0}
142#endif /* _MACH_PORTMUX_H_ */
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
index e043cafa3c..69b9f8e120 100644
--- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
@@ -1,5 +1,6 @@
1#include <linux/serial.h> 1#include <linux/serial.h>
2#include <asm/dma.h> 2#include <asm/dma.h>
3#include <asm/portmux.h>
3 4
4#define NR_PORTS 1 5#define NR_PORTS 1
5 6
@@ -92,18 +93,24 @@ struct bfin_serial_res bfin_serial_resource[] = {
92 } 93 }
93}; 94};
94 95
96#define DRIVER_NAME "bfin-uart"
95 97
96int nr_ports = NR_PORTS; 98int nr_ports = NR_PORTS;
97static void bfin_serial_hw_init(struct bfin_serial_port *uart) 99static void bfin_serial_hw_init(struct bfin_serial_port *uart)
98{ 100{
99 101
102#ifdef CONFIG_SERIAL_BFIN_UART0
103 peripheral_request(P_UART0_TX, DRIVER_NAME);
104 peripheral_request(P_UART0_RX, DRIVER_NAME);
105#endif
106
100#ifdef CONFIG_SERIAL_BFIN_CTSRTS 107#ifdef CONFIG_SERIAL_BFIN_CTSRTS
101 if (uart->cts_pin >= 0) { 108 if (uart->cts_pin >= 0) {
102 gpio_request(uart->cts_pin, NULL); 109 gpio_request(uart->cts_pin, DRIVER_NAME);
103 gpio_direction_input(uart->cts_pin); 110 gpio_direction_input(uart->cts_pin);
104 } 111 }
105 if (uart->rts_pin >= 0) { 112 if (uart->rts_pin >= 0) {
106 gpio_request(uart->rts_pin, NULL); 113 gpio_request(uart->rts_pin, DRIVER_NAME);
107 gpio_direction_input(uart->rts_pin); 114 gpio_direction_input(uart->rts_pin);
108 } 115 }
109#endif 116#endif
diff --git a/include/asm-blackfin/mach-bf561/cdefBF561.h b/include/asm-blackfin/mach-bf561/cdefBF561.h
index 6e87ab269f..73d4d65249 100644
--- a/include/asm-blackfin/mach-bf561/cdefBF561.h
+++ b/include/asm-blackfin/mach-bf561/cdefBF561.h
@@ -83,9 +83,9 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
83 83
84/* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */ 84/* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */
85#define bfin_read_SWRST() bfin_read_SICA_SWRST() 85#define bfin_read_SWRST() bfin_read_SICA_SWRST()
86#define bfin_write_SWRST() bfin_write_SICA_SWRST() 86#define bfin_write_SWRST(val) bfin_write_SICA_SWRST(val)
87#define bfin_read_SYSCR() bfin_read_SICA_SYSCR() 87#define bfin_read_SYSCR() bfin_read_SICA_SYSCR()
88#define bfin_write_SYSCR() bfin_write_SICA_SYSCR() 88#define bfin_write_SYSCR(val) bfin_write_SICA_SYSCR(val)
89 89
90/* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */ 90/* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */
91#define bfin_read_SICA_SWRST() bfin_read16(SICA_SWRST) 91#define bfin_read_SICA_SWRST() bfin_read16(SICA_SWRST)
diff --git a/include/asm-blackfin/portmux.h b/include/asm-blackfin/portmux.h
index 9d3681e421..0d3f650d2d 100644
--- a/include/asm-blackfin/portmux.h
+++ b/include/asm-blackfin/portmux.h
@@ -14,6 +14,12 @@
14#define P_MAYSHARE 0x2000 14#define P_MAYSHARE 0x2000
15#define P_DONTCARE 0x1000 15#define P_DONTCARE 0x1000
16 16
17
18int peripheral_request(unsigned short per, const char *label);
19void peripheral_free(unsigned short per);
20int peripheral_request_list(unsigned short per[], const char *label);
21void peripheral_free_list(unsigned short per[]);
22
17#include <asm/gpio.h> 23#include <asm/gpio.h>
18#include <asm/mach/portmux.h> 24#include <asm/mach/portmux.h>
19 25
@@ -145,6 +151,22 @@
145#define P_SPI2_SSEL3 P_UNDEF 151#define P_SPI2_SSEL3 P_UNDEF
146#endif 152#endif
147 153
154#ifndef P_SPI2_SSEL4
155#define P_SPI2_SSEL4 P_UNDEF
156#endif
157
158#ifndef P_SPI2_SSEL5
159#define P_SPI2_SSEL5 P_UNDEF
160#endif
161
162#ifndef P_SPI2_SSEL6
163#define P_SPI2_SSEL6 P_UNDEF
164#endif
165
166#ifndef P_SPI2_SSEL7
167#define P_SPI2_SSEL7 P_UNDEF
168#endif
169
148#ifndef P_SPI2_SCK 170#ifndef P_SPI2_SCK
149#define P_SPI2_SCK P_UNDEF 171#define P_SPI2_SCK P_UNDEF
150#endif 172#endif
@@ -513,6 +535,22 @@
513#define P_SPI0_SSEL3 P_UNDEF 535#define P_SPI0_SSEL3 P_UNDEF
514#endif 536#endif
515 537
538#ifndef P_SPI0_SSEL4
539#define P_SPI0_SSEL4 P_UNDEF
540#endif
541
542#ifndef P_SPI0_SSEL5
543#define P_SPI0_SSEL5 P_UNDEF
544#endif
545
546#ifndef P_SPI0_SSEL6
547#define P_SPI0_SSEL6 P_UNDEF
548#endif
549
550#ifndef P_SPI0_SSEL7
551#define P_SPI0_SSEL7 P_UNDEF
552#endif
553
516#ifndef P_UART0_TX 554#ifndef P_UART0_TX
517#define P_UART0_TX P_UNDEF 555#define P_UART0_TX P_UNDEF
518#endif 556#endif
@@ -741,6 +779,23 @@
741#define P_SPI1_SSEL3 P_UNDEF 779#define P_SPI1_SSEL3 P_UNDEF
742#endif 780#endif
743 781
782
783#ifndef P_SPI1_SSEL4
784#define P_SPI1_SSEL4 P_UNDEF
785#endif
786
787#ifndef P_SPI1_SSEL5
788#define P_SPI1_SSEL5 P_UNDEF
789#endif
790
791#ifndef P_SPI1_SSEL6
792#define P_SPI1_SSEL6 P_UNDEF
793#endif
794
795#ifndef P_SPI1_SSEL7
796#define P_SPI1_SSEL7 P_UNDEF
797#endif
798
744#ifndef P_SPI1_SCK 799#ifndef P_SPI1_SCK
745#define P_SPI1_SCK P_UNDEF 800#define P_SPI1_SCK P_UNDEF
746#endif 801#endif
diff --git a/include/asm-blackfin/string.h b/include/asm-blackfin/string.h
index 6f1eb7d6d3..e8ada91ab0 100644
--- a/include/asm-blackfin/string.h
+++ b/include/asm-blackfin/string.h
@@ -9,13 +9,16 @@ extern inline char *strcpy(char *dest, const char *src)
9 char *xdest = dest; 9 char *xdest = dest;
10 char temp = 0; 10 char temp = 0;
11 11
12 __asm__ __volatile__ 12 __asm__ __volatile__ (
13 ("1:\t%2 = B [%1++] (Z);\n\t" 13 "1:"
14 "B [%0++] = %2;\n\t" 14 "%2 = B [%1++] (Z);"
15 "CC = %2;\n\t" 15 "B [%0++] = %2;"
16 "if cc jump 1b (bp);\n" 16 "CC = %2;"
17 : "+&a" (dest), "+&a" (src), "=&d" (temp) 17 "if cc jump 1b (bp);"
18 ::"memory", "CC"); 18 : "+&a" (dest), "+&a" (src), "=&d" (temp)
19 :
20 : "memory", "CC");
21
19 return xdest; 22 return xdest;
20} 23}
21 24
@@ -28,37 +31,56 @@ extern inline char *strncpy(char *dest, const char *src, size_t n)
28 if (n == 0) 31 if (n == 0)
29 return xdest; 32 return xdest;
30 33
31 __asm__ __volatile__ 34 __asm__ __volatile__ (
32 ("1:\t%3 = B [%1++] (Z);\n\t" 35 "1:"
33 "B [%0++] = %3;\n\t" 36 "%3 = B [%1++] (Z);"
34 "CC = %3;\n\t" 37 "B [%0++] = %3;"
35 "if ! cc jump 2f;\n\t" 38 "CC = %3;"
36 "%2 += -1;\n\t" 39 "if ! cc jump 2f;"
37 "CC = %2 == 0;\n\t" 40 "%2 += -1;"
38 "if ! cc jump 1b (bp);\n" 41 "CC = %2 == 0;"
39 "2:\n" 42 "if ! cc jump 1b (bp);"
40 : "+&a" (dest), "+&a" (src), "+&da" (n), "=&d" (temp) 43 "jump 4f;"
41 ::"memory", "CC"); 44 "2:"
45 /* if src is shorter than n, we need to null pad bytes now */
46 "%3 = 0;"
47 "3:"
48 "%2 += -1;"
49 "CC = %2 == 0;"
50 "if cc jump 4f;"
51 "B [%0++] = %3;"
52 "jump 3b;"
53 "4:"
54 : "+&a" (dest), "+&a" (src), "+&da" (n), "=&d" (temp)
55 :
56 : "memory", "CC");
57
42 return xdest; 58 return xdest;
43} 59}
44 60
45#define __HAVE_ARCH_STRCMP 61#define __HAVE_ARCH_STRCMP
46extern inline int strcmp(const char *cs, const char *ct) 62extern inline int strcmp(const char *cs, const char *ct)
47{ 63{
48 char __res1, __res2; 64 /* need to use int's here so the char's in the assembly don't get
49 65 * sign extended incorrectly when we don't want them to be
50 __asm__ 66 */
51 ("1:\t%2 = B[%0++] (Z);\n\t" /* get *cs */ 67 int __res1, __res2;
52 "%3 = B[%1++] (Z);\n\t" /* get *ct */ 68
53 "CC = %2 == %3;\n\t" /* compare a byte */ 69 __asm__ __volatile__ (
54 "if ! cc jump 2f;\n\t" /* not equal, break out */ 70 "1:"
55 "CC = %2;\n\t" /* at end of cs? */ 71 "%2 = B[%0++] (Z);" /* get *cs */
56 "if cc jump 1b (bp);\n\t" /* no, keep going */ 72 "%3 = B[%1++] (Z);" /* get *ct */
57 "jump.s 3f;\n" /* strings are equal */ 73 "CC = %2 == %3;" /* compare a byte */
58 "2:\t%2 = %2 - %3;\n" /* *cs - *ct */ 74 "if ! cc jump 2f;" /* not equal, break out */
59 "3:\n" 75 "CC = %2;" /* at end of cs? */
60 : "+&a" (cs), "+&a" (ct), "=&d" (__res1), "=&d" (__res2) 76 "if cc jump 1b (bp);" /* no, keep going */
61 : : "CC"); 77 "jump.s 3f;" /* strings are equal */
78 "2:"
79 "%2 = %2 - %3;" /* *cs - *ct */
80 "3:"
81 : "+&a" (cs), "+&a" (ct), "=&d" (__res1), "=&d" (__res2)
82 :
83 : "memory", "CC");
62 84
63 return __res1; 85 return __res1;
64} 86}
@@ -66,26 +88,35 @@ extern inline int strcmp(const char *cs, const char *ct)
66#define __HAVE_ARCH_STRNCMP 88#define __HAVE_ARCH_STRNCMP
67extern inline int strncmp(const char *cs, const char *ct, size_t count) 89extern inline int strncmp(const char *cs, const char *ct, size_t count)
68{ 90{
69 char __res1, __res2; 91 /* need to use int's here so the char's in the assembly don't get
92 * sign extended incorrectly when we don't want them to be
93 */
94 int __res1, __res2;
70 95
71 if (!count) 96 if (!count)
72 return 0; 97 return 0;
73 __asm__ 98
74 ("1:\t%3 = B[%0++] (Z);\n\t" /* get *cs */ 99 __asm__ __volatile__ (
75 "%4 = B[%1++] (Z);\n\t" /* get *ct */ 100 "1:"
76 "CC = %3 == %4;\n\t" /* compare a byte */ 101 "%3 = B[%0++] (Z);" /* get *cs */
77 "if ! cc jump 3f;\n\t" /* not equal, break out */ 102 "%4 = B[%1++] (Z);" /* get *ct */
78 "CC = %3;\n\t" /* at end of cs? */ 103 "CC = %3 == %4;" /* compare a byte */
79 "if ! cc jump 4f;\n\t" /* yes, all done */ 104 "if ! cc jump 3f;" /* not equal, break out */
80 "%2 += -1;\n\t" /* no, adjust count */ 105 "CC = %3;" /* at end of cs? */
81 "CC = %2 == 0;\n\t" 106 "if ! cc jump 4f;" /* yes, all done */
82 "if ! cc jump 1b;\n" /* more to do, keep going */ 107 "%2 += -1;" /* no, adjust count */
83 "2:\t%3 = 0;\n\t" /* strings are equal */ 108 "CC = %2 == 0;"
84 "jump.s 4f;\n" 109 "if ! cc jump 1b;" /* more to do, keep going */
85 "3:\t%3 = %3 - %4;\n" /* *cs - *ct */ 110 "2:"
86 "4:" 111 "%3 = 0;" /* strings are equal */
87 : "+&a" (cs), "+&a" (ct), "+&da" (count), "=&d" (__res1), "=&d" (__res2) 112 "jump.s 4f;"
88 : : "CC"); 113 "3:"
114 "%3 = %3 - %4;" /* *cs - *ct */
115 "4:"
116 : "+&a" (cs), "+&a" (ct), "+&da" (count), "=&d" (__res1), "=&d" (__res2)
117 :
118 : "memory", "CC");
119
89 return __res1; 120 return __res1;
90} 121}
91 122
diff --git a/include/asm-blackfin/unistd.h b/include/asm-blackfin/unistd.h
index 0df9f2d322..07ffe8b718 100644
--- a/include/asm-blackfin/unistd.h
+++ b/include/asm-blackfin/unistd.h
@@ -3,6 +3,7 @@
3/* 3/*
4 * This file contains the system call numbers. 4 * This file contains the system call numbers.
5 */ 5 */
6#define __NR_restart_syscall 0
6#define __NR_exit 1 7#define __NR_exit 1
7#define __NR_fork 2 8#define __NR_fork 2
8#define __NR_read 3 9#define __NR_read 3
@@ -165,13 +166,13 @@
165#define __NR_sched_get_priority_min 160 166#define __NR_sched_get_priority_min 160
166#define __NR_sched_rr_get_interval 161 167#define __NR_sched_rr_get_interval 161
167#define __NR_nanosleep 162 168#define __NR_nanosleep 162
168 /* 163 __NR_mremap */ 169#define __NR_mremap 163
169#define __NR_setresuid 164 170#define __NR_setresuid 164
170#define __NR_getresuid 165 171#define __NR_getresuid 165
171 /* 166 __NR_vm86 */ 172 /* 166 __NR_vm86 */
172 /* 167 __NR_query_module */ 173 /* 167 __NR_query_module */
173 /* 168 __NR_poll */ 174 /* 168 __NR_poll */
174 /* 169 __NR_nfsservctl */ 175#define __NR_nfsservctl 169
175#define __NR_setresgid 170 176#define __NR_setresgid 170
176#define __NR_getresgid 171 177#define __NR_getresgid 171
177#define __NR_prctl 172 178#define __NR_prctl 172
@@ -227,7 +228,7 @@
227 /* 222 reserved for TUX */ 228 /* 222 reserved for TUX */
228 /* 223 reserved for TUX */ 229 /* 223 reserved for TUX */
229#define __NR_gettid 224 230#define __NR_gettid 224
230 /* 225 __NR_readahead */ 231#define __NR_readahead 225
231#define __NR_setxattr 226 232#define __NR_setxattr 226
232#define __NR_lsetxattr 227 233#define __NR_lsetxattr 227
233#define __NR_fsetxattr 228 234#define __NR_fsetxattr 228
@@ -287,7 +288,7 @@
287#define __NR_mq_timedreceive (__NR_mq_open+3) 288#define __NR_mq_timedreceive (__NR_mq_open+3)
288#define __NR_mq_notify (__NR_mq_open+4) 289#define __NR_mq_notify (__NR_mq_open+4)
289#define __NR_mq_getsetattr (__NR_mq_open+5) 290#define __NR_mq_getsetattr (__NR_mq_open+5)
290 /* 284 __NR_sys_kexec_load */ 291#define __NR_kexec_load 284
291#define __NR_waitid 285 292#define __NR_waitid 285
292#define __NR_add_key 286 293#define __NR_add_key 286
293#define __NR_request_key 287 294#define __NR_request_key 287
@@ -352,9 +353,54 @@
352#define __NR_shmdt 340 353#define __NR_shmdt 340
353#define __NR_shmget 341 354#define __NR_shmget 341
354 355
355#define __NR_syscall 342 356#define __NR_splice 342
357#define __NR_sync_file_range 343
358#define __NR_tee 344
359#define __NR_vmsplice 345
360
361#define __NR_epoll_pwait 346
362#define __NR_utimensat 347
363#define __NR_signalfd 348
364#define __NR_timerfd 349
365#define __NR_eventfd 350
366#define __NR_pread64 351
367#define __NR_pwrite64 352
368#define __NR_fadvise64 353
369#define __NR_set_robust_list 354
370#define __NR_get_robust_list 355
371#define __NR_fallocate 356
372
373#define __NR_syscall 357
356#define NR_syscalls __NR_syscall 374#define NR_syscalls __NR_syscall
357 375
376/* Old optional stuff no one actually uses */
377#define __IGNORE_sysfs
378#define __IGNORE_uselib
379
380/* Implement the newer interfaces */
381#define __IGNORE_mmap
382#define __IGNORE_poll
383#define __IGNORE_select
384#define __IGNORE_utime
385
386/* Not relevant on no-mmu */
387#define __IGNORE_swapon
388#define __IGNORE_swapoff
389#define __IGNORE_msync
390#define __IGNORE_mlock
391#define __IGNORE_munlock
392#define __IGNORE_mlockall
393#define __IGNORE_munlockall
394#define __IGNORE_mincore
395#define __IGNORE_madvise
396#define __IGNORE_remap_file_pages
397#define __IGNORE_mbind
398#define __IGNORE_get_mempolicy
399#define __IGNORE_set_mempolicy
400#define __IGNORE_migrate_pages
401#define __IGNORE_move_pages
402#define __IGNORE_getcpu
403
358#ifdef __KERNEL__ 404#ifdef __KERNEL__
359#define __ARCH_WANT_IPC_PARSE_VERSION 405#define __ARCH_WANT_IPC_PARSE_VERSION
360#define __ARCH_WANT_STAT64 406#define __ARCH_WANT_STAT64
diff --git a/include/asm-generic/termios.h b/include/asm-generic/termios.h
index 3769e6bd63..33dca30a3c 100644
--- a/include/asm-generic/termios.h
+++ b/include/asm-generic/termios.h
@@ -63,6 +63,8 @@ static inline int kernel_termios_to_user_termio(struct termio __user *termio,
63 63
64#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) 64#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
65#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) 65#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
66#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
67#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
66 68
67#endif /* __ARCH_TERMIO_GETPUT */ 69#endif /* __ARCH_TERMIO_GETPUT */
68 70
diff --git a/include/asm-h8300/flat.h b/include/asm-h8300/flat.h
index c20eee767d..2a873508a9 100644
--- a/include/asm-h8300/flat.h
+++ b/include/asm-h8300/flat.h
@@ -9,6 +9,7 @@
9#define flat_argvp_envp_on_stack() 1 9#define flat_argvp_envp_on_stack() 1
10#define flat_old_ram_flag(flags) 1 10#define flat_old_ram_flag(flags) 1
11#define flat_reloc_valid(reloc, size) ((reloc) <= (size)) 11#define flat_reloc_valid(reloc, size) ((reloc) <= (size))
12#define flat_set_persistent(relval, p) 0
12 13
13/* 14/*
14 * on the H8 a couple of the relocations have an instruction in the 15 * on the H8 a couple of the relocations have an instruction in the
@@ -18,7 +19,7 @@
18 */ 19 */
19 20
20#define flat_get_relocate_addr(rel) (rel) 21#define flat_get_relocate_addr(rel) (rel)
21#define flat_get_addr_from_rp(rp, relval, flags) \ 22#define flat_get_addr_from_rp(rp, relval, flags, persistent) \
22 (get_unaligned(rp) & ((flags & FLAT_FLAG_GOTPIC) ? 0xffffffff: 0x00ffffff)) 23 (get_unaligned(rp) & ((flags & FLAT_FLAG_GOTPIC) ? 0xffffffff: 0x00ffffff))
23#define flat_put_addr_at_rp(rp, addr, rel) \ 24#define flat_put_addr_at_rp(rp, addr, rel) \
24 put_unaligned (((*(char *)(rp)) << 24) | ((addr) & 0x00ffffff), rp) 25 put_unaligned (((*(char *)(rp)) << 24) | ((addr) & 0x00ffffff), rp)
diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h
index 7b65b5b000..e8e0bd6411 100644
--- a/include/asm-i386/io.h
+++ b/include/asm-i386/io.h
@@ -112,6 +112,9 @@ extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsign
112 * writew/writel functions and the other mmio helpers. The returned 112 * writew/writel functions and the other mmio helpers. The returned
113 * address is not guaranteed to be usable directly as a virtual 113 * address is not guaranteed to be usable directly as a virtual
114 * address. 114 * address.
115 *
116 * If the area you are trying to map is a PCI BAR you should have a
117 * look at pci_iomap().
115 */ 118 */
116 119
117static inline void __iomem * ioremap(unsigned long offset, unsigned long size) 120static inline void __iomem * ioremap(unsigned long offset, unsigned long size)
diff --git a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h
index 340764076d..dbe734ddf2 100644
--- a/include/asm-i386/io_apic.h
+++ b/include/asm-i386/io_apic.h
@@ -150,7 +150,6 @@ extern int (*ioapic_renumber_irq)(int ioapic, int irq);
150 150
151#else /* !CONFIG_X86_IO_APIC */ 151#else /* !CONFIG_X86_IO_APIC */
152#define io_apic_assign_pci_irqs 0 152#define io_apic_assign_pci_irqs 0
153static inline void disable_ioapic_setup(void) { }
154#endif 153#endif
155 154
156#endif 155#endif
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h
index 609756c616..d69ba937e0 100644
--- a/include/asm-i386/system.h
+++ b/include/asm-i386/system.h
@@ -214,11 +214,6 @@ static inline unsigned long get_limit(unsigned long segment)
214 */ 214 */
215 215
216 216
217/*
218 * Actually only lfence would be needed for mb() because all stores done
219 * by the kernel should be already ordered. But keep a full barrier for now.
220 */
221
222#define mb() alternative("lock; addl $0,0(%%esp)", "mfence", X86_FEATURE_XMM2) 217#define mb() alternative("lock; addl $0,0(%%esp)", "mfence", X86_FEATURE_XMM2)
223#define rmb() alternative("lock; addl $0,0(%%esp)", "lfence", X86_FEATURE_XMM2) 218#define rmb() alternative("lock; addl $0,0(%%esp)", "lfence", X86_FEATURE_XMM2)
224 219
diff --git a/include/asm-ia64/hpsim.h b/include/asm-ia64/hpsim.h
new file mode 100644
index 0000000000..892ab198a9
--- /dev/null
+++ b/include/asm-ia64/hpsim.h
@@ -0,0 +1,16 @@
1#ifndef _ASMIA64_HPSIM_H
2#define _ASMIA64_HPSIM_H
3
4#ifndef CONFIG_HP_SIMSERIAL_CONSOLE
5static inline int simcons_register(void) { return 1; }
6#else
7int simcons_register(void);
8#endif
9
10struct tty_driver;
11extern struct tty_driver *hp_simserial_driver;
12
13void ia64_ssc_connect_irq(long intr, long irq);
14void ia64_ctl_trace(long on);
15
16#endif
diff --git a/include/asm-ia64/sn/arch.h b/include/asm-ia64/sn/arch.h
index 16adc93d7a..7caa1f44cd 100644
--- a/include/asm-ia64/sn/arch.h
+++ b/include/asm-ia64/sn/arch.h
@@ -81,5 +81,6 @@ extern u8 sn_sharing_domain_size;
81extern u8 sn_region_size; 81extern u8 sn_region_size;
82 82
83extern void sn_flush_all_caches(long addr, long bytes); 83extern void sn_flush_all_caches(long addr, long bytes);
84extern bool sn_cpu_disable_allowed(int cpu);
84 85
85#endif /* _ASM_IA64_SN_ARCH_H */ 86#endif /* _ASM_IA64_SN_ARCH_H */
diff --git a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h
index 12b54ddb06..e0487aa974 100644
--- a/include/asm-ia64/sn/intr.h
+++ b/include/asm-ia64/sn/intr.h
@@ -60,6 +60,7 @@ extern u64 sn_intr_alloc(nasid_t, int,
60 int, nasid_t, int); 60 int, nasid_t, int);
61extern void sn_intr_free(nasid_t, int, struct sn_irq_info *); 61extern void sn_intr_free(nasid_t, int, struct sn_irq_info *);
62extern struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *, nasid_t, int); 62extern struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *, nasid_t, int);
63extern void sn_set_err_irq_affinity(unsigned int);
63extern struct list_head **sn_irq_lh; 64extern struct list_head **sn_irq_lh;
64 65
65#define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector) 66#define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector)
diff --git a/include/asm-ia64/sn/sn_feature_sets.h b/include/asm-ia64/sn/sn_feature_sets.h
index bfdc36273e..8e83ac117a 100644
--- a/include/asm-ia64/sn/sn_feature_sets.h
+++ b/include/asm-ia64/sn/sn_feature_sets.h
@@ -31,6 +31,7 @@ extern int sn_prom_feature_available(int id);
31#define PRF_PAL_CACHE_FLUSH_SAFE 0 31#define PRF_PAL_CACHE_FLUSH_SAFE 0
32#define PRF_DEVICE_FLUSH_LIST 1 32#define PRF_DEVICE_FLUSH_LIST 1
33#define PRF_HOTPLUG_SUPPORT 2 33#define PRF_HOTPLUG_SUPPORT 2
34#define PRF_CPU_DISABLE_SUPPORT 3
34 35
35/* --------------------- OS Features -------------------------------*/ 36/* --------------------- OS Features -------------------------------*/
36 37
diff --git a/include/asm-m32r/assembler.h b/include/asm-m32r/assembler.h
index 47041d19d4..26351539b5 100644
--- a/include/asm-m32r/assembler.h
+++ b/include/asm-m32r/assembler.h
@@ -52,27 +52,27 @@
52 .endm 52 .endm
53 53
54#if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104)) 54#if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104))
55#define STI(reg) STI_M reg 55#define ENABLE_INTERRUPTS(reg) ENABLE_INTERRUPTS reg
56 .macro STI_M reg 56 .macro ENABLE_INTERRUPTS reg
57 setpsw #0x40 -> nop 57 setpsw #0x40 -> nop
58 ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1). 58 ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1).
59 .endm 59 .endm
60 60
61#define CLI(reg) CLI_M reg 61#define DISABLE_INTERRUPTS(reg) DISABLE_INTERRUPTS reg
62 .macro CLI_M reg 62 .macro DISABLE_INTERRUPTS reg
63 clrpsw #0x40 -> nop 63 clrpsw #0x40 -> nop
64 ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1). 64 ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1).
65 .endm 65 .endm
66#else /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */ 66#else /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */
67#define STI(reg) STI_M reg 67#define ENABLE_INTERRUPTS(reg) ENABLE_INTERRUPTS reg
68 .macro STI_M reg 68 .macro ENABLE_INTERRUPTS reg
69 mvfc \reg, psw 69 mvfc \reg, psw
70 or3 \reg, \reg, #0x0040 70 or3 \reg, \reg, #0x0040
71 mvtc \reg, psw 71 mvtc \reg, psw
72 .endm 72 .endm
73 73
74#define CLI(reg) CLI_M reg 74#define DISABLE_INTERRUPTS(reg) DISABLE_INTERRUPTS reg
75 .macro CLI_M reg 75 .macro DISABLE_INTERRUPTS reg
76 mvfc \reg, psw 76 mvfc \reg, psw
77 and3 \reg, \reg, #0xffbf 77 and3 \reg, \reg, #0xffbf
78 mvtc \reg, psw 78 mvtc \reg, psw
diff --git a/include/asm-m32r/flat.h b/include/asm-m32r/flat.h
index 1b285f65ca..d851cf0c4a 100644
--- a/include/asm-m32r/flat.h
+++ b/include/asm-m32r/flat.h
@@ -15,9 +15,10 @@
15#define flat_stack_align(sp) (*sp += (*sp & 3 ? (4 - (*sp & 3)): 0)) 15#define flat_stack_align(sp) (*sp += (*sp & 3 ? (4 - (*sp & 3)): 0))
16#define flat_argvp_envp_on_stack() 0 16#define flat_argvp_envp_on_stack() 0
17#define flat_old_ram_flag(flags) (flags) 17#define flat_old_ram_flag(flags) (flags)
18#define flat_set_persistent(relval, p) 0
18#define flat_reloc_valid(reloc, size) \ 19#define flat_reloc_valid(reloc, size) \
19 (((reloc) - textlen_for_m32r_lo16_data) <= (size)) 20 (((reloc) - textlen_for_m32r_lo16_data) <= (size))
20#define flat_get_addr_from_rp(rp, relval, flags) \ 21#define flat_get_addr_from_rp(rp, relval, flags, persistent) \
21 m32r_flat_get_addr_from_rp(rp, relval, (text_len) ) 22 m32r_flat_get_addr_from_rp(rp, relval, (text_len) )
22 23
23#define flat_put_addr_at_rp(rp, addr, relval) \ 24#define flat_put_addr_at_rp(rp, addr, relval) \
diff --git a/include/asm-m32r/m32r.h b/include/asm-m32r/m32r.h
index decfc59907..214b44b407 100644
--- a/include/asm-m32r/m32r.h
+++ b/include/asm-m32r/m32r.h
@@ -22,12 +22,26 @@
22#include <asm/m32700ut/m32700ut_pld.h> 22#include <asm/m32700ut/m32700ut_pld.h>
23#include <asm/m32700ut/m32700ut_lan.h> 23#include <asm/m32700ut/m32700ut_lan.h>
24#include <asm/m32700ut/m32700ut_lcd.h> 24#include <asm/m32700ut/m32700ut_lcd.h>
25/* for ei_handler:linux/arch/m32r/kernel/entry.S */
26#define M32R_INT1ICU_ISTS PLD_ICUISTS
27#define M32R_INT1ICU_IRQ_BASE M32700UT_PLD_IRQ_BASE
28#define M32R_INT0ICU_ISTS M32700UT_LAN_ICUISTS
29#define M32R_INT0ICU_IRQ_BASE M32700UT_LAN_PLD_IRQ_BASE
30#define M32R_INT2ICU_ISTS M32700UT_LCD_ICUISTS
31#define M32R_INT2ICU_IRQ_BASE M32700UT_LCD_PLD_IRQ_BASE
25#endif /* CONFIG_PLAT_M32700UT */ 32#endif /* CONFIG_PLAT_M32700UT */
26 33
27#if defined(CONFIG_PLAT_OPSPUT) 34#if defined(CONFIG_PLAT_OPSPUT)
28#include <asm/opsput/opsput_pld.h> 35#include <asm/opsput/opsput_pld.h>
29#include <asm/opsput/opsput_lan.h> 36#include <asm/opsput/opsput_lan.h>
30#include <asm/opsput/opsput_lcd.h> 37#include <asm/opsput/opsput_lcd.h>
38/* for ei_handler:linux/arch/m32r/kernel/entry.S */
39#define M32R_INT1ICU_ISTS PLD_ICUISTS
40#define M32R_INT1ICU_IRQ_BASE OPSPUT_PLD_IRQ_BASE
41#define M32R_INT0ICU_ISTS OPSPUT_LAN_ICUISTS
42#define M32R_INT0ICU_IRQ_BASE OPSPUT_LAN_PLD_IRQ_BASE
43#define M32R_INT2ICU_ISTS OPSPUT_LCD_ICUISTS
44#define M32R_INT2ICU_IRQ_BASE OPSPUT_LCD_PLD_IRQ_BASE
31#endif /* CONFIG_PLAT_OPSPUT */ 45#endif /* CONFIG_PLAT_OPSPUT */
32 46
33#if defined(CONFIG_PLAT_MAPPI2) 47#if defined(CONFIG_PLAT_MAPPI2)
@@ -40,10 +54,16 @@
40 54
41#if defined(CONFIG_PLAT_USRV) 55#if defined(CONFIG_PLAT_USRV)
42#include <asm/m32700ut/m32700ut_pld.h> 56#include <asm/m32700ut/m32700ut_pld.h>
57/* for ei_handler:linux/arch/m32r/kernel/entry.S */
58#define M32R_INT1ICU_ISTS PLD_ICUISTS
59#define M32R_INT1ICU_IRQ_BASE M32700UT_PLD_IRQ_BASE
43#endif 60#endif
44 61
45#if defined(CONFIG_PLAT_M32104UT) 62#if defined(CONFIG_PLAT_M32104UT)
46#include <asm/m32104ut/m32104ut_pld.h> 63#include <asm/m32104ut/m32104ut_pld.h>
64/* for ei_handler:linux/arch/m32r/kernel/entry.S */
65#define M32R_INT1ICU_ISTS PLD_ICUISTS
66#define M32R_INT1ICU_IRQ_BASE M32104UT_PLD_IRQ_BASE
47#endif /* CONFIG_PLAT_M32104 */ 67#endif /* CONFIG_PLAT_M32104 */
48 68
49/* 69/*
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h
index fdbb60e6a0..a30fe9c641 100644
--- a/include/asm-m68k/unistd.h
+++ b/include/asm-m68k/unistd.h
@@ -313,10 +313,20 @@
313#define __NR_tee 308 313#define __NR_tee 308
314#define __NR_vmsplice 309 314#define __NR_vmsplice 309
315#define __NR_move_pages 310 315#define __NR_move_pages 310
316#define __NR_sched_setaffinity 311
317#define __NR_sched_getaffinity 312
318#define __NR_kexec_load 313
319#define __NR_getcpu 314
320#define __NR_epoll_pwait 315
321#define __NR_utimensat 316
322#define __NR_signalfd 317
323#define __NR_timerfd 318
324#define __NR_eventfd 319
325#define __NR_fallocate 320
316 326
317#ifdef __KERNEL__ 327#ifdef __KERNEL__
318 328
319#define NR_syscalls 311 329#define NR_syscalls 321
320 330
321#define __ARCH_WANT_IPC_PARSE_VERSION 331#define __ARCH_WANT_IPC_PARSE_VERSION
322#define __ARCH_WANT_OLD_READDIR 332#define __ARCH_WANT_OLD_READDIR
diff --git a/include/asm-m68knommu/flat.h b/include/asm-m68knommu/flat.h
index 2d836edc43..814b5174a8 100644
--- a/include/asm-m68knommu/flat.h
+++ b/include/asm-m68knommu/flat.h
@@ -9,8 +9,9 @@
9#define flat_argvp_envp_on_stack() 1 9#define flat_argvp_envp_on_stack() 1
10#define flat_old_ram_flag(flags) (flags) 10#define flat_old_ram_flag(flags) (flags)
11#define flat_reloc_valid(reloc, size) ((reloc) <= (size)) 11#define flat_reloc_valid(reloc, size) ((reloc) <= (size))
12#define flat_get_addr_from_rp(rp, relval, flags) get_unaligned(rp) 12#define flat_get_addr_from_rp(rp, relval, flags, p) get_unaligned(rp)
13#define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) 13#define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp)
14#define flat_get_relocate_addr(rel) (rel) 14#define flat_get_relocate_addr(rel) (rel)
15#define flat_set_persistent(relval, p) 0
15 16
16#endif /* __M68KNOMMU_FLAT_H__ */ 17#endif /* __M68KNOMMU_FLAT_H__ */
diff --git a/include/asm-m68knommu/pgtable.h b/include/asm-m68knommu/pgtable.h
index e1e6a1d233..46251016e8 100644
--- a/include/asm-m68knommu/pgtable.h
+++ b/include/asm-m68knommu/pgtable.h
@@ -65,4 +65,6 @@ extern unsigned int kobjsize(const void *objp);
65#define VMALLOC_START 0 65#define VMALLOC_START 0
66#define VMALLOC_END 0xffffffff 66#define VMALLOC_END 0xffffffff
67 67
68#include <asm-generic/pgtable.h>
69
68#endif /* _M68KNOMMU_PGTABLE_H */ 70#endif /* _M68KNOMMU_PGTABLE_H */
diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h
index 82e03195f3..eb1b566793 100644
--- a/include/asm-m68knommu/unistd.h
+++ b/include/asm-m68knommu/unistd.h
@@ -314,10 +314,20 @@
314#define __NR_tee 308 314#define __NR_tee 308
315#define __NR_vmsplice 309 315#define __NR_vmsplice 309
316#define __NR_move_pages 310 316#define __NR_move_pages 310
317#define __NR_sched_setaffinity 311
318#define __NR_sched_getaffinity 312
319#define __NR_kexec_load 313
320#define __NR_getcpu 314
321#define __NR_epoll_pwait 315
322#define __NR_utimensat 316
323#define __NR_signalfd 317
324#define __NR_timerfd 318
325#define __NR_eventfd 319
326#define __NR_fallocate 320
317 327
318#ifdef __KERNEL__ 328#ifdef __KERNEL__
319 329
320#define NR_syscalls 311 330#define NR_syscalls 321
321 331
322#define __ARCH_WANT_IPC_PARSE_VERSION 332#define __ARCH_WANT_IPC_PARSE_VERSION
323#define __ARCH_WANT_OLD_READDIR 333#define __ARCH_WANT_OLD_READDIR
diff --git a/include/asm-mips/bcache.h b/include/asm-mips/bcache.h
index 3646a3f2ed..0ba9d6ef76 100644
--- a/include/asm-mips/bcache.h
+++ b/include/asm-mips/bcache.h
@@ -21,7 +21,6 @@ struct bcache_ops {
21}; 21};
22 22
23extern void indy_sc_init(void); 23extern void indy_sc_init(void);
24extern void sni_pcimt_sc_init(void);
25 24
26#ifdef CONFIG_BOARD_SCACHE 25#ifdef CONFIG_BOARD_SCACHE
27 26
diff --git a/include/asm-mips/cmpxchg.h b/include/asm-mips/cmpxchg.h
new file mode 100644
index 0000000000..c5b4708e00
--- /dev/null
+++ b/include/asm-mips/cmpxchg.h
@@ -0,0 +1,107 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2003, 06, 07 by Ralf Baechle (ralf@linux-mips.org)
7 */
8#ifndef __ASM_CMPXCHG_H
9#define __ASM_CMPXCHG_H
10
11#include <linux/irqflags.h>
12
13#define __HAVE_ARCH_CMPXCHG 1
14
15#define __cmpxchg_asm(ld, st, m, old, new) \
16({ \
17 __typeof(*(m)) __ret; \
18 \
19 if (cpu_has_llsc && R10000_LLSC_WAR) { \
20 __asm__ __volatile__( \
21 " .set push \n" \
22 " .set noat \n" \
23 " .set mips3 \n" \
24 "1: " ld " %0, %2 # __cmpxchg_asm \n" \
25 " bne %0, %z3, 2f \n" \
26 " .set mips0 \n" \
27 " move $1, %z4 \n" \
28 " .set mips3 \n" \
29 " " st " $1, %1 \n" \
30 " beqzl $1, 1b \n" \
31 "2: \n" \
32 " .set pop \n" \
33 : "=&r" (__ret), "=R" (*m) \
34 : "R" (*m), "Jr" (old), "Jr" (new) \
35 : "memory"); \
36 } else if (cpu_has_llsc) { \
37 __asm__ __volatile__( \
38 " .set push \n" \
39 " .set noat \n" \
40 " .set mips3 \n" \
41 "1: " ld " %0, %2 # __cmpxchg_asm \n" \
42 " bne %0, %z3, 2f \n" \
43 " .set mips0 \n" \
44 " move $1, %z4 \n" \
45 " .set mips3 \n" \
46 " " st " $1, %1 \n" \
47 " beqz $1, 3f \n" \
48 "2: \n" \
49 " .subsection 2 \n" \
50 "3: b 1b \n" \
51 " .previous \n" \
52 " .set pop \n" \
53 : "=&r" (__ret), "=R" (*m) \
54 : "R" (*m), "Jr" (old), "Jr" (new) \
55 : "memory"); \
56 } else { \
57 unsigned long __flags; \
58 \
59 raw_local_irq_save(__flags); \
60 __ret = *m; \
61 if (__ret == old) \
62 *m = new; \
63 raw_local_irq_restore(__flags); \
64 } \
65 \
66 __ret; \
67})
68
69/*
70 * This function doesn't exist, so you'll get a linker error
71 * if something tries to do an invalid cmpxchg().
72 */
73extern void __cmpxchg_called_with_bad_pointer(void);
74
75#define __cmpxchg(ptr,old,new,barrier) \
76({ \
77 __typeof__(ptr) __ptr = (ptr); \
78 __typeof__(*(ptr)) __old = (old); \
79 __typeof__(*(ptr)) __new = (new); \
80 __typeof__(*(ptr)) __res = 0; \
81 \
82 barrier; \
83 \
84 switch (sizeof(*(__ptr))) { \
85 case 4: \
86 __res = __cmpxchg_asm("ll", "sc", __ptr, __old, __new); \
87 break; \
88 case 8: \
89 if (sizeof(long) == 8) { \
90 __res = __cmpxchg_asm("lld", "scd", __ptr, \
91 __old, __new); \
92 break; \
93 } \
94 default: \
95 __cmpxchg_called_with_bad_pointer(); \
96 break; \
97 } \
98 \
99 barrier; \
100 \
101 __res; \
102})
103
104#define cmpxchg(ptr, old, new) __cmpxchg(ptr, old, new, smp_llsc_mb())
105#define cmpxchg_local(ptr, old, new) __cmpxchg(ptr, old, new,)
106
107#endif /* __ASM_CMPXCHG_H */
diff --git a/include/asm-mips/compiler.h b/include/asm-mips/compiler.h
index 169ae26105..aa6b876bbd 100644
--- a/include/asm-mips/compiler.h
+++ b/include/asm-mips/compiler.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2004 Maciej W. Rozycki 2 * Copyright (C) 2004, 2007 Maciej W. Rozycki
3 * 3 *
4 * This file is subject to the terms and conditions of the GNU General Public 4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive 5 * License. See the file "COPYING" in the main directory of this archive
@@ -9,8 +9,10 @@
9#define _ASM_COMPILER_H 9#define _ASM_COMPILER_H
10 10
11#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) 11#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
12#define GCC_IMM_ASM "n"
12#define GCC_REG_ACCUM "$0" 13#define GCC_REG_ACCUM "$0"
13#else 14#else
15#define GCC_IMM_ASM "rn"
14#define GCC_REG_ACCUM "accum" 16#define GCC_REG_ACCUM "accum"
15#endif 17#endif
16 18
diff --git a/include/asm-mips/edac.h b/include/asm-mips/edac.h
index 83719eee2d..4da0c1fe30 100644
--- a/include/asm-mips/edac.h
+++ b/include/asm-mips/edac.h
@@ -9,8 +9,7 @@ static inline void atomic_scrub(void *va, u32 size)
9 unsigned long temp; 9 unsigned long temp;
10 u32 i; 10 u32 i;
11 11
12 for (i = 0; i < size / sizeof(unsigned long); i++, virt_addr++) { 12 for (i = 0; i < size / sizeof(unsigned long); i++) {
13
14 /* 13 /*
15 * Very carefully read and write to memory atomically 14 * Very carefully read and write to memory atomically
16 * so we are interrupt, DMA and SMP safe. 15 * so we are interrupt, DMA and SMP safe.
@@ -19,16 +18,16 @@ static inline void atomic_scrub(void *va, u32 size)
19 */ 18 */
20 19
21 __asm__ __volatile__ ( 20 __asm__ __volatile__ (
22 " .set mips3 \n" 21 " .set mips2 \n"
23 "1: ll %0, %1 # atomic_add \n" 22 "1: ll %0, %1 # atomic_scrub \n"
24 " ll %0, %1 # atomic_add \n" 23 " addu %0, $0 \n"
25 " addu %0, $0 \n" 24 " sc %0, %1 \n"
26 " sc %0, %1 \n" 25 " beqz %0, 1b \n"
27 " beqz %0, 1b \n" 26 " .set mips0 \n"
28 " .set mips0 \n"
29 : "=&r" (temp), "=m" (*virt_addr) 27 : "=&r" (temp), "=m" (*virt_addr)
30 : "m" (*virt_addr)); 28 : "m" (*virt_addr));
31 29
30 virt_addr++;
32 } 31 }
33} 32}
34 33
diff --git a/include/asm-mips/fcntl.h b/include/asm-mips/fcntl.h
index 00a50ec1c1..2a52333a06 100644
--- a/include/asm-mips/fcntl.h
+++ b/include/asm-mips/fcntl.h
@@ -13,6 +13,7 @@
13#define O_SYNC 0x0010 13#define O_SYNC 0x0010
14#define O_NONBLOCK 0x0080 14#define O_NONBLOCK 0x0080
15#define O_CREAT 0x0100 /* not fcntl */ 15#define O_CREAT 0x0100 /* not fcntl */
16#define O_TRUNC 0x0200 /* not fcntl */
16#define O_EXCL 0x0400 /* not fcntl */ 17#define O_EXCL 0x0400 /* not fcntl */
17#define O_NOCTTY 0x0800 /* not fcntl */ 18#define O_NOCTTY 0x0800 /* not fcntl */
18#define FASYNC 0x1000 /* fcntl, for BSD compatibility */ 19#define FASYNC 0x1000 /* fcntl, for BSD compatibility */
diff --git a/include/asm-mips/gt64240.h b/include/asm-mips/gt64240.h
deleted file mode 100644
index 8f9bd341ed..0000000000
--- a/include/asm-mips/gt64240.h
+++ /dev/null
@@ -1,1235 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright - Galileo technology.
7 * Copyright (C) 2004 by Ralf Baechle
8 */
9#ifndef __ASM_MIPS_MV64240_H
10#define __ASM_MIPS_MV64240_H
11
12#include <asm/addrspace.h>
13#include <asm/marvell.h>
14
15/*
16 * CPU Control Registers
17 */
18
19#define CPU_CONFIGURATION 0x000
20#define CPU_MODE 0x120
21#define CPU_READ_RESPONSE_CROSSBAR_LOW 0x170
22#define CPU_READ_RESPONSE_CROSSBAR_HIGH 0x178
23
24/*
25 * Processor Address Space
26 */
27
28/* Sdram's BAR'S */
29#define SCS_0_LOW_DECODE_ADDRESS 0x008
30#define SCS_0_HIGH_DECODE_ADDRESS 0x010
31#define SCS_1_LOW_DECODE_ADDRESS 0x208
32#define SCS_1_HIGH_DECODE_ADDRESS 0x210
33#define SCS_2_LOW_DECODE_ADDRESS 0x018
34#define SCS_2_HIGH_DECODE_ADDRESS 0x020
35#define SCS_3_LOW_DECODE_ADDRESS 0x218
36#define SCS_3_HIGH_DECODE_ADDRESS 0x220
37/* Devices BAR'S */
38#define CS_0_LOW_DECODE_ADDRESS 0x028
39#define CS_0_HIGH_DECODE_ADDRESS 0x030
40#define CS_1_LOW_DECODE_ADDRESS 0x228
41#define CS_1_HIGH_DECODE_ADDRESS 0x230
42#define CS_2_LOW_DECODE_ADDRESS 0x248
43#define CS_2_HIGH_DECODE_ADDRESS 0x250
44#define CS_3_LOW_DECODE_ADDRESS 0x038
45#define CS_3_HIGH_DECODE_ADDRESS 0x040
46#define BOOTCS_LOW_DECODE_ADDRESS 0x238
47#define BOOTCS_HIGH_DECODE_ADDRESS 0x240
48
49#define PCI_0I_O_LOW_DECODE_ADDRESS 0x048
50#define PCI_0I_O_HIGH_DECODE_ADDRESS 0x050
51#define PCI_0MEMORY0_LOW_DECODE_ADDRESS 0x058
52#define PCI_0MEMORY0_HIGH_DECODE_ADDRESS 0x060
53#define PCI_0MEMORY1_LOW_DECODE_ADDRESS 0x080
54#define PCI_0MEMORY1_HIGH_DECODE_ADDRESS 0x088
55#define PCI_0MEMORY2_LOW_DECODE_ADDRESS 0x258
56#define PCI_0MEMORY2_HIGH_DECODE_ADDRESS 0x260
57#define PCI_0MEMORY3_LOW_DECODE_ADDRESS 0x280
58#define PCI_0MEMORY3_HIGH_DECODE_ADDRESS 0x288
59
60#define PCI_1I_O_LOW_DECODE_ADDRESS 0x090
61#define PCI_1I_O_HIGH_DECODE_ADDRESS 0x098
62#define PCI_1MEMORY0_LOW_DECODE_ADDRESS 0x0a0
63#define PCI_1MEMORY0_HIGH_DECODE_ADDRESS 0x0a8
64#define PCI_1MEMORY1_LOW_DECODE_ADDRESS 0x0b0
65#define PCI_1MEMORY1_HIGH_DECODE_ADDRESS 0x0b8
66#define PCI_1MEMORY2_LOW_DECODE_ADDRESS 0x2a0
67#define PCI_1MEMORY2_HIGH_DECODE_ADDRESS 0x2a8
68#define PCI_1MEMORY3_LOW_DECODE_ADDRESS 0x2b0
69#define PCI_1MEMORY3_HIGH_DECODE_ADDRESS 0x2b8
70
71#define INTERNAL_SPACE_DECODE 0x068
72
73#define CPU_0_LOW_DECODE_ADDRESS 0x290
74#define CPU_0_HIGH_DECODE_ADDRESS 0x298
75#define CPU_1_LOW_DECODE_ADDRESS 0x2c0
76#define CPU_1_HIGH_DECODE_ADDRESS 0x2c8
77
78#define PCI_0I_O_ADDRESS_REMAP 0x0f0
79#define PCI_0MEMORY0_ADDRESS_REMAP 0x0f8
80#define PCI_0MEMORY0_HIGH_ADDRESS_REMAP 0x320
81#define PCI_0MEMORY1_ADDRESS_REMAP 0x100
82#define PCI_0MEMORY1_HIGH_ADDRESS_REMAP 0x328
83#define PCI_0MEMORY2_ADDRESS_REMAP 0x2f8
84#define PCI_0MEMORY2_HIGH_ADDRESS_REMAP 0x330
85#define PCI_0MEMORY3_ADDRESS_REMAP 0x300
86#define PCI_0MEMORY3_HIGH_ADDRESS_REMAP 0x338
87
88#define PCI_1I_O_ADDRESS_REMAP 0x108
89#define PCI_1MEMORY0_ADDRESS_REMAP 0x110
90#define PCI_1MEMORY0_HIGH_ADDRESS_REMAP 0x340
91#define PCI_1MEMORY1_ADDRESS_REMAP 0x118
92#define PCI_1MEMORY1_HIGH_ADDRESS_REMAP 0x348
93#define PCI_1MEMORY2_ADDRESS_REMAP 0x310
94#define PCI_1MEMORY2_HIGH_ADDRESS_REMAP 0x350
95#define PCI_1MEMORY3_ADDRESS_REMAP 0x318
96#define PCI_1MEMORY3_HIGH_ADDRESS_REMAP 0x358
97
98/*
99 * CPU Sync Barrier
100 */
101
102#define PCI_0SYNC_BARIER_VIRTUAL_REGISTER 0x0c0
103#define PCI_1SYNC_BARIER_VIRTUAL_REGISTER 0x0c8
104
105
106/*
107 * CPU Access Protect
108 */
109
110#define CPU_LOW_PROTECT_ADDRESS_0 0X180
111#define CPU_HIGH_PROTECT_ADDRESS_0 0X188
112#define CPU_LOW_PROTECT_ADDRESS_1 0X190
113#define CPU_HIGH_PROTECT_ADDRESS_1 0X198
114#define CPU_LOW_PROTECT_ADDRESS_2 0X1a0
115#define CPU_HIGH_PROTECT_ADDRESS_2 0X1a8
116#define CPU_LOW_PROTECT_ADDRESS_3 0X1b0
117#define CPU_HIGH_PROTECT_ADDRESS_3 0X1b8
118#define CPU_LOW_PROTECT_ADDRESS_4 0X1c0
119#define CPU_HIGH_PROTECT_ADDRESS_4 0X1c8
120#define CPU_LOW_PROTECT_ADDRESS_5 0X1d0
121#define CPU_HIGH_PROTECT_ADDRESS_5 0X1d8
122#define CPU_LOW_PROTECT_ADDRESS_6 0X1e0
123#define CPU_HIGH_PROTECT_ADDRESS_6 0X1e8
124#define CPU_LOW_PROTECT_ADDRESS_7 0X1f0
125#define CPU_HIGH_PROTECT_ADDRESS_7 0X1f8
126
127
128/*
129 * Snoop Control
130 */
131
132#define SNOOP_BASE_ADDRESS_0 0x380
133#define SNOOP_TOP_ADDRESS_0 0x388
134#define SNOOP_BASE_ADDRESS_1 0x390
135#define SNOOP_TOP_ADDRESS_1 0x398
136#define SNOOP_BASE_ADDRESS_2 0x3a0
137#define SNOOP_TOP_ADDRESS_2 0x3a8
138#define SNOOP_BASE_ADDRESS_3 0x3b0
139#define SNOOP_TOP_ADDRESS_3 0x3b8
140
141/*
142 * CPU Error Report
143 */
144
145#define CPU_ERROR_ADDRESS_LOW 0x070
146#define CPU_ERROR_ADDRESS_HIGH 0x078
147#define CPU_ERROR_DATA_LOW 0x128
148#define CPU_ERROR_DATA_HIGH 0x130
149#define CPU_ERROR_PARITY 0x138
150#define CPU_ERROR_CAUSE 0x140
151#define CPU_ERROR_MASK 0x148
152
153/*
154 * Pslave Debug
155 */
156
157#define X_0_ADDRESS 0x360
158#define X_0_COMMAND_ID 0x368
159#define X_1_ADDRESS 0x370
160#define X_1_COMMAND_ID 0x378
161#define WRITE_DATA_LOW 0x3c0
162#define WRITE_DATA_HIGH 0x3c8
163#define WRITE_BYTE_ENABLE 0X3e0
164#define READ_DATA_LOW 0x3d0
165#define READ_DATA_HIGH 0x3d8
166#define READ_ID 0x3e8
167
168
169/*
170 * SDRAM and Device Address Space
171 */
172
173
174/*
175 * SDRAM Configuration
176 */
177
178#define SDRAM_CONFIGURATION 0x448
179#define SDRAM_OPERATION_MODE 0x474
180#define SDRAM_ADDRESS_DECODE 0x47C
181#define SDRAM_TIMING_PARAMETERS 0x4b4
182#define SDRAM_UMA_CONTROL 0x4a4
183#define SDRAM_CROSS_BAR_CONTROL_LOW 0x4a8
184#define SDRAM_CROSS_BAR_CONTROL_HIGH 0x4ac
185#define SDRAM_CROSS_BAR_TIMEOUT 0x4b0
186
187
188/*
189 * SDRAM Parameters
190 */
191
192#define SDRAM_BANK0PARAMETERS 0x44C
193#define SDRAM_BANK1PARAMETERS 0x450
194#define SDRAM_BANK2PARAMETERS 0x454
195#define SDRAM_BANK3PARAMETERS 0x458
196
197
198/*
199 * SDRAM Error Report
200 */
201
202#define SDRAM_ERROR_DATA_LOW 0x484
203#define SDRAM_ERROR_DATA_HIGH 0x480
204#define SDRAM_AND_DEVICE_ERROR_ADDRESS 0x490
205#define SDRAM_RECEIVED_ECC 0x488
206#define SDRAM_CALCULATED_ECC 0x48c
207#define SDRAM_ECC_CONTROL 0x494
208#define SDRAM_ECC_ERROR_COUNTER 0x498
209
210
211/*
212 * SDunit Debug (for internal use)
213 */
214
215#define X0_ADDRESS 0x500
216#define X0_COMMAND_AND_ID 0x504
217#define X0_WRITE_DATA_LOW 0x508
218#define X0_WRITE_DATA_HIGH 0x50c
219#define X0_WRITE_BYTE_ENABLE 0x518
220#define X0_READ_DATA_LOW 0x510
221#define X0_READ_DATA_HIGH 0x514
222#define X0_READ_ID 0x51c
223#define X1_ADDRESS 0x520
224#define X1_COMMAND_AND_ID 0x524
225#define X1_WRITE_DATA_LOW 0x528
226#define X1_WRITE_DATA_HIGH 0x52c
227#define X1_WRITE_BYTE_ENABLE 0x538
228#define X1_READ_DATA_LOW 0x530
229#define X1_READ_DATA_HIGH 0x534
230#define X1_READ_ID 0x53c
231#define X0_SNOOP_ADDRESS 0x540
232#define X0_SNOOP_COMMAND 0x544
233#define X1_SNOOP_ADDRESS 0x548
234#define X1_SNOOP_COMMAND 0x54c
235
236
237/*
238 * Device Parameters
239 */
240
241#define DEVICE_BANK0PARAMETERS 0x45c
242#define DEVICE_BANK1PARAMETERS 0x460
243#define DEVICE_BANK2PARAMETERS 0x464
244#define DEVICE_BANK3PARAMETERS 0x468
245#define DEVICE_BOOT_BANK_PARAMETERS 0x46c
246#define DEVICE_CONTROL 0x4c0
247#define DEVICE_CROSS_BAR_CONTROL_LOW 0x4c8
248#define DEVICE_CROSS_BAR_CONTROL_HIGH 0x4cc
249#define DEVICE_CROSS_BAR_TIMEOUT 0x4c4
250
251
252/*
253 * Device Interrupt
254 */
255
256#define DEVICE_INTERRUPT_CAUSE 0x4d0
257#define DEVICE_INTERRUPT_MASK 0x4d4
258#define DEVICE_ERROR_ADDRESS 0x4d8
259
260/*
261 * DMA Record
262 */
263
264#define CHANNEL0_DMA_BYTE_COUNT 0x800
265#define CHANNEL1_DMA_BYTE_COUNT 0x804
266#define CHANNEL2_DMA_BYTE_COUNT 0x808
267#define CHANNEL3_DMA_BYTE_COUNT 0x80C
268#define CHANNEL4_DMA_BYTE_COUNT 0x900
269#define CHANNEL5_DMA_BYTE_COUNT 0x904
270#define CHANNEL6_DMA_BYTE_COUNT 0x908
271#define CHANNEL7_DMA_BYTE_COUNT 0x90C
272#define CHANNEL0_DMA_SOURCE_ADDRESS 0x810
273#define CHANNEL1_DMA_SOURCE_ADDRESS 0x814
274#define CHANNEL2_DMA_SOURCE_ADDRESS 0x818
275#define CHANNEL3_DMA_SOURCE_ADDRESS 0x81C
276#define CHANNEL4_DMA_SOURCE_ADDRESS 0x910
277#define CHANNEL5_DMA_SOURCE_ADDRESS 0x914
278#define CHANNEL6_DMA_SOURCE_ADDRESS 0x918
279#define CHANNEL7_DMA_SOURCE_ADDRESS 0x91C
280#define CHANNEL0_DMA_DESTINATION_ADDRESS 0x820
281#define CHANNEL1_DMA_DESTINATION_ADDRESS 0x824
282#define CHANNEL2_DMA_DESTINATION_ADDRESS 0x828
283#define CHANNEL3_DMA_DESTINATION_ADDRESS 0x82C
284#define CHANNEL4_DMA_DESTINATION_ADDRESS 0x920
285#define CHANNEL5_DMA_DESTINATION_ADDRESS 0x924
286#define CHANNEL6_DMA_DESTINATION_ADDRESS 0x928
287#define CHANNEL7_DMA_DESTINATION_ADDRESS 0x92C
288#define CHANNEL0NEXT_RECORD_POINTER 0x830
289#define CHANNEL1NEXT_RECORD_POINTER 0x834
290#define CHANNEL2NEXT_RECORD_POINTER 0x838
291#define CHANNEL3NEXT_RECORD_POINTER 0x83C
292#define CHANNEL4NEXT_RECORD_POINTER 0x930
293#define CHANNEL5NEXT_RECORD_POINTER 0x934
294#define CHANNEL6NEXT_RECORD_POINTER 0x938
295#define CHANNEL7NEXT_RECORD_POINTER 0x93C
296#define CHANNEL0CURRENT_DESCRIPTOR_POINTER 0x870
297#define CHANNEL1CURRENT_DESCRIPTOR_POINTER 0x874
298#define CHANNEL2CURRENT_DESCRIPTOR_POINTER 0x878
299#define CHANNEL3CURRENT_DESCRIPTOR_POINTER 0x87C
300#define CHANNEL4CURRENT_DESCRIPTOR_POINTER 0x970
301#define CHANNEL5CURRENT_DESCRIPTOR_POINTER 0x974
302#define CHANNEL6CURRENT_DESCRIPTOR_POINTER 0x978
303#define CHANNEL7CURRENT_DESCRIPTOR_POINTER 0x97C
304#define CHANNEL0_DMA_SOURCE_HIGH_PCI_ADDRESS 0x890
305#define CHANNEL1_DMA_SOURCE_HIGH_PCI_ADDRESS 0x894
306#define CHANNEL2_DMA_SOURCE_HIGH_PCI_ADDRESS 0x898
307#define CHANNEL3_DMA_SOURCE_HIGH_PCI_ADDRESS 0x89c
308#define CHANNEL4_DMA_SOURCE_HIGH_PCI_ADDRESS 0x990
309#define CHANNEL5_DMA_SOURCE_HIGH_PCI_ADDRESS 0x994
310#define CHANNEL6_DMA_SOURCE_HIGH_PCI_ADDRESS 0x998
311#define CHANNEL7_DMA_SOURCE_HIGH_PCI_ADDRESS 0x99c
312#define CHANNEL0_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x8a0
313#define CHANNEL1_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x8a4
314#define CHANNEL2_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x8a8
315#define CHANNEL3_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x8ac
316#define CHANNEL4_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x9a0
317#define CHANNEL5_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x9a4
318#define CHANNEL6_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x9a8
319#define CHANNEL7_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x9ac
320#define CHANNEL0_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x8b0
321#define CHANNEL1_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x8b4
322#define CHANNEL2_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x8b8
323#define CHANNEL3_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x8bc
324#define CHANNEL4_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x9b0
325#define CHANNEL5_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x9b4
326#define CHANNEL6_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x9b8
327#define CHANNEL7_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x9bc
328
329/*
330 * DMA Channel Control
331 */
332
333#define CHANNEL0CONTROL 0x840
334#define CHANNEL0CONTROL_HIGH 0x880
335
336#define CHANNEL1CONTROL 0x844
337#define CHANNEL1CONTROL_HIGH 0x884
338
339#define CHANNEL2CONTROL 0x848
340#define CHANNEL2CONTROL_HIGH 0x888
341
342#define CHANNEL3CONTROL 0x84C
343#define CHANNEL3CONTROL_HIGH 0x88C
344
345#define CHANNEL4CONTROL 0x940
346#define CHANNEL4CONTROL_HIGH 0x980
347
348#define CHANNEL5CONTROL 0x944
349#define CHANNEL5CONTROL_HIGH 0x984
350
351#define CHANNEL6CONTROL 0x948
352#define CHANNEL6CONTROL_HIGH 0x988
353
354#define CHANNEL7CONTROL 0x94C
355#define CHANNEL7CONTROL_HIGH 0x98C
356
357
358/*
359 * DMA Arbiter
360 */
361
362#define ARBITER_CONTROL_0_3 0x860
363#define ARBITER_CONTROL_4_7 0x960
364
365
366/*
367 * DMA Interrupt
368 */
369
370#define CHANELS0_3_INTERRUPT_CAUSE 0x8c0
371#define CHANELS0_3_INTERRUPT_MASK 0x8c4
372#define CHANELS0_3_ERROR_ADDRESS 0x8c8
373#define CHANELS0_3_ERROR_SELECT 0x8cc
374#define CHANELS4_7_INTERRUPT_CAUSE 0x9c0
375#define CHANELS4_7_INTERRUPT_MASK 0x9c4
376#define CHANELS4_7_ERROR_ADDRESS 0x9c8
377#define CHANELS4_7_ERROR_SELECT 0x9cc
378
379
380/*
381 * DMA Debug (for internal use)
382 */
383
384#define DMA_X0_ADDRESS 0x8e0
385#define DMA_X0_COMMAND_AND_ID 0x8e4
386#define DMA_X0_WRITE_DATA_LOW 0x8e8
387#define DMA_X0_WRITE_DATA_HIGH 0x8ec
388#define DMA_X0_WRITE_BYTE_ENABLE 0x8f8
389#define DMA_X0_READ_DATA_LOW 0x8f0
390#define DMA_X0_READ_DATA_HIGH 0x8f4
391#define DMA_X0_READ_ID 0x8fc
392#define DMA_X1_ADDRESS 0x9e0
393#define DMA_X1_COMMAND_AND_ID 0x9e4
394#define DMA_X1_WRITE_DATA_LOW 0x9e8
395#define DMA_X1_WRITE_DATA_HIGH 0x9ec
396#define DMA_X1_WRITE_BYTE_ENABLE 0x9f8
397#define DMA_X1_READ_DATA_LOW 0x9f0
398#define DMA_X1_READ_DATA_HIGH 0x9f4
399#define DMA_X1_READ_ID 0x9fc
400
401/*
402 * Timer_Counter
403 */
404
405#define TIMER_COUNTER0 0x850
406#define TIMER_COUNTER1 0x854
407#define TIMER_COUNTER2 0x858
408#define TIMER_COUNTER3 0x85C
409#define TIMER_COUNTER_0_3_CONTROL 0x864
410#define TIMER_COUNTER_0_3_INTERRUPT_CAUSE 0x868
411#define TIMER_COUNTER_0_3_INTERRUPT_MASK 0x86c
412#define TIMER_COUNTER4 0x950
413#define TIMER_COUNTER5 0x954
414#define TIMER_COUNTER6 0x958
415#define TIMER_COUNTER7 0x95C
416#define TIMER_COUNTER_4_7_CONTROL 0x964
417#define TIMER_COUNTER_4_7_INTERRUPT_CAUSE 0x968
418#define TIMER_COUNTER_4_7_INTERRUPT_MASK 0x96c
419
420/*
421 * PCI Slave Address Decoding
422 */
423
424#define PCI_0SCS_0_BANK_SIZE 0xc08
425#define PCI_1SCS_0_BANK_SIZE 0xc88
426#define PCI_0SCS_1_BANK_SIZE 0xd08
427#define PCI_1SCS_1_BANK_SIZE 0xd88
428#define PCI_0SCS_2_BANK_SIZE 0xc0c
429#define PCI_1SCS_2_BANK_SIZE 0xc8c
430#define PCI_0SCS_3_BANK_SIZE 0xd0c
431#define PCI_1SCS_3_BANK_SIZE 0xd8c
432#define PCI_0CS_0_BANK_SIZE 0xc10
433#define PCI_1CS_0_BANK_SIZE 0xc90
434#define PCI_0CS_1_BANK_SIZE 0xd10
435#define PCI_1CS_1_BANK_SIZE 0xd90
436#define PCI_0CS_2_BANK_SIZE 0xd18
437#define PCI_1CS_2_BANK_SIZE 0xd98
438#define PCI_0CS_3_BANK_SIZE 0xc14
439#define PCI_1CS_3_BANK_SIZE 0xc94
440#define PCI_0CS_BOOT_BANK_SIZE 0xd14
441#define PCI_1CS_BOOT_BANK_SIZE 0xd94
442#define PCI_0P2P_MEM0_BAR_SIZE 0xd1c
443#define PCI_1P2P_MEM0_BAR_SIZE 0xd9c
444#define PCI_0P2P_MEM1_BAR_SIZE 0xd20
445#define PCI_1P2P_MEM1_BAR_SIZE 0xda0
446#define PCI_0P2P_I_O_BAR_SIZE 0xd24
447#define PCI_1P2P_I_O_BAR_SIZE 0xda4
448#define PCI_0CPU_BAR_SIZE 0xd28
449#define PCI_1CPU_BAR_SIZE 0xda8
450#define PCI_0DAC_SCS_0_BANK_SIZE 0xe00
451#define PCI_1DAC_SCS_0_BANK_SIZE 0xe80
452#define PCI_0DAC_SCS_1_BANK_SIZE 0xe04
453#define PCI_1DAC_SCS_1_BANK_SIZE 0xe84
454#define PCI_0DAC_SCS_2_BANK_SIZE 0xe08
455#define PCI_1DAC_SCS_2_BANK_SIZE 0xe88
456#define PCI_0DAC_SCS_3_BANK_SIZE 0xe0c
457#define PCI_1DAC_SCS_3_BANK_SIZE 0xe8c
458#define PCI_0DAC_CS_0_BANK_SIZE 0xe10
459#define PCI_1DAC_CS_0_BANK_SIZE 0xe90
460#define PCI_0DAC_CS_1_BANK_SIZE 0xe14
461#define PCI_1DAC_CS_1_BANK_SIZE 0xe94
462#define PCI_0DAC_CS_2_BANK_SIZE 0xe18
463#define PCI_1DAC_CS_2_BANK_SIZE 0xe98
464#define PCI_0DAC_CS_3_BANK_SIZE 0xe1c
465#define PCI_1DAC_CS_3_BANK_SIZE 0xe9c
466#define PCI_0DAC_BOOTCS_BANK_SIZE 0xe20
467#define PCI_1DAC_BOOTCS_BANK_SIZE 0xea0
468#define PCI_0DAC_P2P_MEM0_BAR_SIZE 0xe24
469#define PCI_1DAC_P2P_MEM0_BAR_SIZE 0xea4
470#define PCI_0DAC_P2P_MEM1_BAR_SIZE 0xe28
471#define PCI_1DAC_P2P_MEM1_BAR_SIZE 0xea8
472#define PCI_0DAC_CPU_BAR_SIZE 0xe2c
473#define PCI_1DAC_CPU_BAR_SIZE 0xeac
474#define PCI_0EXPANSION_ROM_BAR_SIZE 0xd2c
475#define PCI_1EXPANSION_ROM_BAR_SIZE 0xdac
476#define PCI_0BASE_ADDRESS_REGISTERS_ENABLE 0xc3c
477#define PCI_1BASE_ADDRESS_REGISTERS_ENABLE 0xcbc
478#define PCI_0SCS_0_BASE_ADDRESS_REMAP 0xc48
479#define PCI_1SCS_0_BASE_ADDRESS_REMAP 0xcc8
480#define PCI_0SCS_1_BASE_ADDRESS_REMAP 0xd48
481#define PCI_1SCS_1_BASE_ADDRESS_REMAP 0xdc8
482#define PCI_0SCS_2_BASE_ADDRESS_REMAP 0xc4c
483#define PCI_1SCS_2_BASE_ADDRESS_REMAP 0xccc
484#define PCI_0SCS_3_BASE_ADDRESS_REMAP 0xd4c
485#define PCI_1SCS_3_BASE_ADDRESS_REMAP 0xdcc
486#define PCI_0CS_0_BASE_ADDRESS_REMAP 0xc50
487#define PCI_1CS_0_BASE_ADDRESS_REMAP 0xcd0
488#define PCI_0CS_1_BASE_ADDRESS_REMAP 0xd50
489#define PCI_1CS_1_BASE_ADDRESS_REMAP 0xdd0
490#define PCI_0CS_2_BASE_ADDRESS_REMAP 0xd58
491#define PCI_1CS_2_BASE_ADDRESS_REMAP 0xdd8
492#define PCI_0CS_3_BASE_ADDRESS_REMAP 0xc54
493#define PCI_1CS_3_BASE_ADDRESS_REMAP 0xcd4
494#define PCI_0CS_BOOTCS_BASE_ADDRESS_REMAP 0xd54
495#define PCI_1CS_BOOTCS_BASE_ADDRESS_REMAP 0xdd4
496#define PCI_0P2P_MEM0_BASE_ADDRESS_REMAP_LOW 0xd5c
497#define PCI_1P2P_MEM0_BASE_ADDRESS_REMAP_LOW 0xddc
498#define PCI_0P2P_MEM0_BASE_ADDRESS_REMAP_HIGH 0xd60
499#define PCI_1P2P_MEM0_BASE_ADDRESS_REMAP_HIGH 0xde0
500#define PCI_0P2P_MEM1_BASE_ADDRESS_REMAP_LOW 0xd64
501#define PCI_1P2P_MEM1_BASE_ADDRESS_REMAP_LOW 0xde4
502#define PCI_0P2P_MEM1_BASE_ADDRESS_REMAP_HIGH 0xd68
503#define PCI_1P2P_MEM1_BASE_ADDRESS_REMAP_HIGH 0xde8
504#define PCI_0P2P_I_O_BASE_ADDRESS_REMAP 0xd6c
505#define PCI_1P2P_I_O_BASE_ADDRESS_REMAP 0xdec
506#define PCI_0CPU_BASE_ADDRESS_REMAP 0xd70
507#define PCI_1CPU_BASE_ADDRESS_REMAP 0xdf0
508#define PCI_0DAC_SCS_0_BASE_ADDRESS_REMAP 0xf00
509#define PCI_1DAC_SCS_0_BASE_ADDRESS_REMAP 0xff0
510#define PCI_0DAC_SCS_1_BASE_ADDRESS_REMAP 0xf04
511#define PCI_1DAC_SCS_1_BASE_ADDRESS_REMAP 0xf84
512#define PCI_0DAC_SCS_2_BASE_ADDRESS_REMAP 0xf08
513#define PCI_1DAC_SCS_2_BASE_ADDRESS_REMAP 0xf88
514#define PCI_0DAC_SCS_3_BASE_ADDRESS_REMAP 0xf0c
515#define PCI_1DAC_SCS_3_BASE_ADDRESS_REMAP 0xf8c
516#define PCI_0DAC_CS_0_BASE_ADDRESS_REMAP 0xf10
517#define PCI_1DAC_CS_0_BASE_ADDRESS_REMAP 0xf90
518#define PCI_0DAC_CS_1_BASE_ADDRESS_REMAP 0xf14
519#define PCI_1DAC_CS_1_BASE_ADDRESS_REMAP 0xf94
520#define PCI_0DAC_CS_2_BASE_ADDRESS_REMAP 0xf18
521#define PCI_1DAC_CS_2_BASE_ADDRESS_REMAP 0xf98
522#define PCI_0DAC_CS_3_BASE_ADDRESS_REMAP 0xf1c
523#define PCI_1DAC_CS_3_BASE_ADDRESS_REMAP 0xf9c
524#define PCI_0DAC_BOOTCS_BASE_ADDRESS_REMAP 0xf20
525#define PCI_1DAC_BOOTCS_BASE_ADDRESS_REMAP 0xfa0
526#define PCI_0DAC_P2P_MEM0_BASE_ADDRESS_REMAP_LOW 0xf24
527#define PCI_1DAC_P2P_MEM0_BASE_ADDRESS_REMAP_LOW 0xfa4
528#define PCI_0DAC_P2P_MEM0_BASE_ADDRESS_REMAP_HIGH 0xf28
529#define PCI_1DAC_P2P_MEM0_BASE_ADDRESS_REMAP_HIGH 0xfa8
530#define PCI_0DAC_P2P_MEM1_BASE_ADDRESS_REMAP_LOW 0xf2c
531#define PCI_1DAC_P2P_MEM1_BASE_ADDRESS_REMAP_LOW 0xfac
532#define PCI_0DAC_P2P_MEM1_BASE_ADDRESS_REMAP_HIGH 0xf30
533#define PCI_1DAC_P2P_MEM1_BASE_ADDRESS_REMAP_HIGH 0xfb0
534#define PCI_0DAC_CPU_BASE_ADDRESS_REMAP 0xf34
535#define PCI_1DAC_CPU_BASE_ADDRESS_REMAP 0xfb4
536#define PCI_0EXPANSION_ROM_BASE_ADDRESS_REMAP 0xf38
537#define PCI_1EXPANSION_ROM_BASE_ADDRESS_REMAP 0xfb8
538#define PCI_0ADDRESS_DECODE_CONTROL 0xd3c
539#define PCI_1ADDRESS_DECODE_CONTROL 0xdbc
540
541/*
542 * PCI Control
543 */
544
545#define PCI_0COMMAND 0xc00
546#define PCI_1COMMAND 0xc80
547#define PCI_0MODE 0xd00
548#define PCI_1MODE 0xd80
549#define PCI_0TIMEOUT_RETRY 0xc04
550#define PCI_1TIMEOUT_RETRY 0xc84
551#define PCI_0READ_BUFFER_DISCARD_TIMER 0xd04
552#define PCI_1READ_BUFFER_DISCARD_TIMER 0xd84
553#define MSI_0TRIGGER_TIMER 0xc38
554#define MSI_1TRIGGER_TIMER 0xcb8
555#define PCI_0ARBITER_CONTROL 0x1d00
556#define PCI_1ARBITER_CONTROL 0x1d80
557/* changing untill here */
558#define PCI_0CROSS_BAR_CONTROL_LOW 0x1d08
559#define PCI_0CROSS_BAR_CONTROL_HIGH 0x1d0c
560#define PCI_0CROSS_BAR_TIMEOUT 0x1d04
561#define PCI_0READ_RESPONSE_CROSS_BAR_CONTROL_LOW 0x1d18
562#define PCI_0READ_RESPONSE_CROSS_BAR_CONTROL_HIGH 0x1d1c
563#define PCI_0SYNC_BARRIER_VIRTUAL_REGISTER 0x1d10
564#define PCI_0P2P_CONFIGURATION 0x1d14
565#define PCI_0ACCESS_CONTROL_BASE_0_LOW 0x1e00
566#define PCI_0ACCESS_CONTROL_BASE_0_HIGH 0x1e04
567#define PCI_0ACCESS_CONTROL_TOP_0 0x1e08
568#define PCI_0ACCESS_CONTROL_BASE_1_LOW 0c1e10
569#define PCI_0ACCESS_CONTROL_BASE_1_HIGH 0x1e14
570#define PCI_0ACCESS_CONTROL_TOP_1 0x1e18
571#define PCI_0ACCESS_CONTROL_BASE_2_LOW 0c1e20
572#define PCI_0ACCESS_CONTROL_BASE_2_HIGH 0x1e24
573#define PCI_0ACCESS_CONTROL_TOP_2 0x1e28
574#define PCI_0ACCESS_CONTROL_BASE_3_LOW 0c1e30
575#define PCI_0ACCESS_CONTROL_BASE_3_HIGH 0x1e34
576#define PCI_0ACCESS_CONTROL_TOP_3 0x1e38
577#define PCI_0ACCESS_CONTROL_BASE_4_LOW 0c1e40
578#define PCI_0ACCESS_CONTROL_BASE_4_HIGH 0x1e44
579#define PCI_0ACCESS_CONTROL_TOP_4 0x1e48
580#define PCI_0ACCESS_CONTROL_BASE_5_LOW 0c1e50
581#define PCI_0ACCESS_CONTROL_BASE_5_HIGH 0x1e54
582#define PCI_0ACCESS_CONTROL_TOP_5 0x1e58
583#define PCI_0ACCESS_CONTROL_BASE_6_LOW 0c1e60
584#define PCI_0ACCESS_CONTROL_BASE_6_HIGH 0x1e64
585#define PCI_0ACCESS_CONTROL_TOP_6 0x1e68
586#define PCI_0ACCESS_CONTROL_BASE_7_LOW 0c1e70
587#define PCI_0ACCESS_CONTROL_BASE_7_HIGH 0x1e74
588#define PCI_0ACCESS_CONTROL_TOP_7 0x1e78
589#define PCI_1CROSS_BAR_CONTROL_LOW 0x1d88
590#define PCI_1CROSS_BAR_CONTROL_HIGH 0x1d8c
591#define PCI_1CROSS_BAR_TIMEOUT 0x1d84
592#define PCI_1READ_RESPONSE_CROSS_BAR_CONTROL_LOW 0x1d98
593#define PCI_1READ_RESPONSE_CROSS_BAR_CONTROL_HIGH 0x1d9c
594#define PCI_1SYNC_BARRIER_VIRTUAL_REGISTER 0x1d90
595#define PCI_1P2P_CONFIGURATION 0x1d94
596#define PCI_1ACCESS_CONTROL_BASE_0_LOW 0x1e80
597#define PCI_1ACCESS_CONTROL_BASE_0_HIGH 0x1e84
598#define PCI_1ACCESS_CONTROL_TOP_0 0x1e88
599#define PCI_1ACCESS_CONTROL_BASE_1_LOW 0c1e90
600#define PCI_1ACCESS_CONTROL_BASE_1_HIGH 0x1e94
601#define PCI_1ACCESS_CONTROL_TOP_1 0x1e98
602#define PCI_1ACCESS_CONTROL_BASE_2_LOW 0c1ea0
603#define PCI_1ACCESS_CONTROL_BASE_2_HIGH 0x1ea4
604#define PCI_1ACCESS_CONTROL_TOP_2 0x1ea8
605#define PCI_1ACCESS_CONTROL_BASE_3_LOW 0c1eb0
606#define PCI_1ACCESS_CONTROL_BASE_3_HIGH 0x1eb4
607#define PCI_1ACCESS_CONTROL_TOP_3 0x1eb8
608#define PCI_1ACCESS_CONTROL_BASE_4_LOW 0c1ec0
609#define PCI_1ACCESS_CONTROL_BASE_4_HIGH 0x1ec4
610#define PCI_1ACCESS_CONTROL_TOP_4 0x1ec8
611#define PCI_1ACCESS_CONTROL_BASE_5_LOW 0c1ed0
612#define PCI_1ACCESS_CONTROL_BASE_5_HIGH 0x1ed4
613#define PCI_1ACCESS_CONTROL_TOP_5 0x1ed8
614#define PCI_1ACCESS_CONTROL_BASE_6_LOW 0c1ee0
615#define PCI_1ACCESS_CONTROL_BASE_6_HIGH 0x1ee4
616#define PCI_1ACCESS_CONTROL_TOP_6 0x1ee8
617#define PCI_1ACCESS_CONTROL_BASE_7_LOW 0c1ef0
618#define PCI_1ACCESS_CONTROL_BASE_7_HIGH 0x1ef4
619#define PCI_1ACCESS_CONTROL_TOP_7 0x1ef8
620
621/*
622 * PCI Snoop Control
623 */
624
625#define PCI_0SNOOP_CONTROL_BASE_0_LOW 0x1f00
626#define PCI_0SNOOP_CONTROL_BASE_0_HIGH 0x1f04
627#define PCI_0SNOOP_CONTROL_TOP_0 0x1f08
628#define PCI_0SNOOP_CONTROL_BASE_1_0_LOW 0x1f10
629#define PCI_0SNOOP_CONTROL_BASE_1_0_HIGH 0x1f14
630#define PCI_0SNOOP_CONTROL_TOP_1 0x1f18
631#define PCI_0SNOOP_CONTROL_BASE_2_0_LOW 0x1f20
632#define PCI_0SNOOP_CONTROL_BASE_2_0_HIGH 0x1f24
633#define PCI_0SNOOP_CONTROL_TOP_2 0x1f28
634#define PCI_0SNOOP_CONTROL_BASE_3_0_LOW 0x1f30
635#define PCI_0SNOOP_CONTROL_BASE_3_0_HIGH 0x1f34
636#define PCI_0SNOOP_CONTROL_TOP_3 0x1f38
637#define PCI_1SNOOP_CONTROL_BASE_0_LOW 0x1f80
638#define PCI_1SNOOP_CONTROL_BASE_0_HIGH 0x1f84
639#define PCI_1SNOOP_CONTROL_TOP_0 0x1f88
640#define PCI_1SNOOP_CONTROL_BASE_1_0_LOW 0x1f90
641#define PCI_1SNOOP_CONTROL_BASE_1_0_HIGH 0x1f94
642#define PCI_1SNOOP_CONTROL_TOP_1 0x1f98
643#define PCI_1SNOOP_CONTROL_BASE_2_0_LOW 0x1fa0
644#define PCI_1SNOOP_CONTROL_BASE_2_0_HIGH 0x1fa4
645#define PCI_1SNOOP_CONTROL_TOP_2 0x1fa8
646#define PCI_1SNOOP_CONTROL_BASE_3_0_LOW 0x1fb0
647#define PCI_1SNOOP_CONTROL_BASE_3_0_HIGH 0x1fb4
648#define PCI_1SNOOP_CONTROL_TOP_3 0x1fb8
649
650/*
651 * PCI Configuration Address
652 */
653
654#define PCI_0CONFIGURATION_ADDRESS 0xcf8
655#define PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER 0xcfc
656#define PCI_1CONFIGURATION_ADDRESS 0xc78
657#define PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER 0xc7c
658#define PCI_0INTERRUPT_ACKNOWLEDGE_VIRTUAL_REGISTER 0xc34
659#define PCI_1INTERRUPT_ACKNOWLEDGE_VIRTUAL_REGISTER 0xcb4
660
661/*
662 * PCI Error Report
663 */
664
665#define PCI_0SERR_MASK 0xc28
666#define PCI_0ERROR_ADDRESS_LOW 0x1d40
667#define PCI_0ERROR_ADDRESS_HIGH 0x1d44
668#define PCI_0ERROR_DATA_LOW 0x1d48
669#define PCI_0ERROR_DATA_HIGH 0x1d4c
670#define PCI_0ERROR_COMMAND 0x1d50
671#define PCI_0ERROR_CAUSE 0x1d58
672#define PCI_0ERROR_MASK 0x1d5c
673
674#define PCI_1SERR_MASK 0xca8
675#define PCI_1ERROR_ADDRESS_LOW 0x1dc0
676#define PCI_1ERROR_ADDRESS_HIGH 0x1dc4
677#define PCI_1ERROR_DATA_LOW 0x1dc8
678#define PCI_1ERROR_DATA_HIGH 0x1dcc
679#define PCI_1ERROR_COMMAND 0x1dd0
680#define PCI_1ERROR_CAUSE 0x1dd8
681#define PCI_1ERROR_MASK 0x1ddc
682
683
684/*
685 * Lslave Debug (for internal use)
686 */
687
688#define L_SLAVE_X0_ADDRESS 0x1d20
689#define L_SLAVE_X0_COMMAND_AND_ID 0x1d24
690#define L_SLAVE_X1_ADDRESS 0x1d28
691#define L_SLAVE_X1_COMMAND_AND_ID 0x1d2c
692#define L_SLAVE_WRITE_DATA_LOW 0x1d30
693#define L_SLAVE_WRITE_DATA_HIGH 0x1d34
694#define L_SLAVE_WRITE_BYTE_ENABLE 0x1d60
695#define L_SLAVE_READ_DATA_LOW 0x1d38
696#define L_SLAVE_READ_DATA_HIGH 0x1d3c
697#define L_SLAVE_READ_ID 0x1d64
698
699#if 0 /* Disabled because PCI_* namespace belongs to PCI subsystem ... */
700
701/*
702 * PCI Configuration Function 0
703 */
704
705#define PCI_DEVICE_AND_VENDOR_ID 0x000
706#define PCI_STATUS_AND_COMMAND 0x004
707#define PCI_CLASS_CODE_AND_REVISION_ID 0x008
708#define PCI_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE 0x00C
709#define PCI_SCS_0_BASE_ADDRESS 0x010
710#define PCI_SCS_1_BASE_ADDRESS 0x014
711#define PCI_SCS_2_BASE_ADDRESS 0x018
712#define PCI_SCS_3_BASE_ADDRESS 0x01C
713#define PCI_INTERNAL_REGISTERS_MEMORY_MAPPED_BASE_ADDRESS 0x020
714#define PCI_INTERNAL_REGISTERS_I_OMAPPED_BASE_ADDRESS 0x024
715#define PCI_SUBSYSTEM_ID_AND_SUBSYSTEM_VENDOR_ID 0x02C
716#define PCI_EXPANSION_ROM_BASE_ADDRESS_REGISTER 0x030
717#define PCI_CAPABILTY_LIST_POINTER 0x034
718#define PCI_INTERRUPT_PIN_AND_LINE 0x03C
719#define PCI_POWER_MANAGEMENT_CAPABILITY 0x040
720#define PCI_POWER_MANAGEMENT_STATUS_AND_CONTROL 0x044
721#define PCI_VPD_ADDRESS 0x048
722#define PCI_VPD_DATA 0X04c
723#define PCI_MSI_MESSAGE_CONTROL 0x050
724#define PCI_MSI_MESSAGE_ADDRESS 0x054
725#define PCI_MSI_MESSAGE_UPPER_ADDRESS 0x058
726#define PCI_MSI_MESSAGE_DATA 0x05c
727#define PCI_COMPACT_PCI_HOT_SWAP_CAPABILITY 0x058
728
729/*
730 * PCI Configuration Function 1
731 */
732
733#define PCI_CS_0_BASE_ADDRESS 0x110
734#define PCI_CS_1_BASE_ADDRESS 0x114
735#define PCI_CS_2_BASE_ADDRESS 0x118
736#define PCI_CS_3_BASE_ADDRESS 0x11c
737#define PCI_BOOTCS_BASE_ADDRESS 0x120
738
739/*
740 * PCI Configuration Function 2
741 */
742
743#define PCI_P2P_MEM0_BASE_ADDRESS 0x210
744#define PCI_P2P_MEM1_BASE_ADDRESS 0x214
745#define PCI_P2P_I_O_BASE_ADDRESS 0x218
746#define PCI_CPU_BASE_ADDRESS 0x21c
747
748/*
749 * PCI Configuration Function 4
750 */
751
752#define PCI_DAC_SCS_0_BASE_ADDRESS_LOW 0x410
753#define PCI_DAC_SCS_0_BASE_ADDRESS_HIGH 0x414
754#define PCI_DAC_SCS_1_BASE_ADDRESS_LOW 0x418
755#define PCI_DAC_SCS_1_BASE_ADDRESS_HIGH 0x41c
756#define PCI_DAC_P2P_MEM0_BASE_ADDRESS_LOW 0x420
757#define PCI_DAC_P2P_MEM0_BASE_ADDRESS_HIGH 0x424
758
759
760/*
761 * PCI Configuration Function 5
762 */
763
764#define PCI_DAC_SCS_2_BASE_ADDRESS_LOW 0x510
765#define PCI_DAC_SCS_2_BASE_ADDRESS_HIGH 0x514
766#define PCI_DAC_SCS_3_BASE_ADDRESS_LOW 0x518
767#define PCI_DAC_SCS_3_BASE_ADDRESS_HIGH 0x51c
768#define PCI_DAC_P2P_MEM1_BASE_ADDRESS_LOW 0x520
769#define PCI_DAC_P2P_MEM1_BASE_ADDRESS_HIGH 0x524
770
771
772/*
773 * PCI Configuration Function 6
774 */
775
776#define PCI_DAC_CS_0_BASE_ADDRESS_LOW 0x610
777#define PCI_DAC_CS_0_BASE_ADDRESS_HIGH 0x614
778#define PCI_DAC_CS_1_BASE_ADDRESS_LOW 0x618
779#define PCI_DAC_CS_1_BASE_ADDRESS_HIGH 0x61c
780#define PCI_DAC_CS_2_BASE_ADDRESS_LOW 0x620
781#define PCI_DAC_CS_2_BASE_ADDRESS_HIGH 0x624
782
783/*
784 * PCI Configuration Function 7
785 */
786
787#define PCI_DAC_CS_3_BASE_ADDRESS_LOW 0x710
788#define PCI_DAC_CS_3_BASE_ADDRESS_HIGH 0x714
789#define PCI_DAC_BOOTCS_BASE_ADDRESS_LOW 0x718
790#define PCI_DAC_BOOTCS_BASE_ADDRESS_HIGH 0x71c
791#define PCI_DAC_CPU_BASE_ADDRESS_LOW 0x720
792#define PCI_DAC_CPU_BASE_ADDRESS_HIGH 0x724
793#endif
794
795/*
796 * Interrupts
797 */
798
799#define LOW_INTERRUPT_CAUSE_REGISTER 0xc18
800#define HIGH_INTERRUPT_CAUSE_REGISTER 0xc68
801#define CPU_INTERRUPT_MASK_REGISTER_LOW 0xc1c
802#define CPU_INTERRUPT_MASK_REGISTER_HIGH 0xc6c
803#define CPU_SELECT_CAUSE_REGISTER 0xc70
804#define PCI_0INTERRUPT_CAUSE_MASK_REGISTER_LOW 0xc24
805#define PCI_0INTERRUPT_CAUSE_MASK_REGISTER_HIGH 0xc64
806#define PCI_0SELECT_CAUSE 0xc74
807#define PCI_1INTERRUPT_CAUSE_MASK_REGISTER_LOW 0xca4
808#define PCI_1INTERRUPT_CAUSE_MASK_REGISTER_HIGH 0xce4
809#define PCI_1SELECT_CAUSE 0xcf4
810#define CPU_INT_0_MASK 0xe60
811#define CPU_INT_1_MASK 0xe64
812#define CPU_INT_2_MASK 0xe68
813#define CPU_INT_3_MASK 0xe6c
814
815/*
816 * I20 Support registers
817 */
818
819#define INBOUND_MESSAGE_REGISTER0_PCI0_SIDE 0x010
820#define INBOUND_MESSAGE_REGISTER1_PCI0_SIDE 0x014
821#define OUTBOUND_MESSAGE_REGISTER0_PCI0_SIDE 0x018
822#define OUTBOUND_MESSAGE_REGISTER1_PCI0_SIDE 0x01C
823#define INBOUND_DOORBELL_REGISTER_PCI0_SIDE 0x020
824#define INBOUND_INTERRUPT_CAUSE_REGISTER_PCI0_SIDE 0x024
825#define INBOUND_INTERRUPT_MASK_REGISTER_PCI0_SIDE 0x028
826#define OUTBOUND_DOORBELL_REGISTER_PCI0_SIDE 0x02C
827#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_PCI0_SIDE 0x030
828#define OUTBOUND_INTERRUPT_MASK_REGISTER_PCI0_SIDE 0x034
829#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI0_SIDE 0x040
830#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI0_SIDE 0x044
831#define QUEUE_CONTROL_REGISTER_PCI0_SIDE 0x050
832#define QUEUE_BASE_ADDRESS_REGISTER_PCI0_SIDE 0x054
833#define INBOUND_FREE_HEAD_POINTER_REGISTER_PCI0_SIDE 0x060
834#define INBOUND_FREE_TAIL_POINTER_REGISTER_PCI0_SIDE 0x064
835#define INBOUND_POST_HEAD_POINTER_REGISTER_PCI0_SIDE 0x068
836#define INBOUND_POST_TAIL_POINTER_REGISTER_PCI0_SIDE 0x06C
837#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_PCI0_SIDE 0x070
838#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_PCI0_SIDE 0x074
839#define OUTBOUND_POST_HEAD_POINTER_REGISTER_PCI0_SIDE 0x0F8
840#define OUTBOUND_POST_TAIL_POINTER_REGISTER_PCI0_SIDE 0x0FC
841
842#define INBOUND_MESSAGE_REGISTER0_PCI1_SIDE 0x090
843#define INBOUND_MESSAGE_REGISTER1_PCI1_SIDE 0x094
844#define OUTBOUND_MESSAGE_REGISTER0_PCI1_SIDE 0x098
845#define OUTBOUND_MESSAGE_REGISTER1_PCI1_SIDE 0x09C
846#define INBOUND_DOORBELL_REGISTER_PCI1_SIDE 0x0A0
847#define INBOUND_INTERRUPT_CAUSE_REGISTER_PCI1_SIDE 0x0A4
848#define INBOUND_INTERRUPT_MASK_REGISTER_PCI1_SIDE 0x0A8
849#define OUTBOUND_DOORBELL_REGISTER_PCI1_SIDE 0x0AC
850#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_PCI1_SIDE 0x0B0
851#define OUTBOUND_INTERRUPT_MASK_REGISTER_PCI1_SIDE 0x0B4
852#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI1_SIDE 0x0C0
853#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI1_SIDE 0x0C4
854#define QUEUE_CONTROL_REGISTER_PCI1_SIDE 0x0D0
855#define QUEUE_BASE_ADDRESS_REGISTER_PCI1_SIDE 0x0D4
856#define INBOUND_FREE_HEAD_POINTER_REGISTER_PCI1_SIDE 0x0E0
857#define INBOUND_FREE_TAIL_POINTER_REGISTER_PCI1_SIDE 0x0E4
858#define INBOUND_POST_HEAD_POINTER_REGISTER_PCI1_SIDE 0x0E8
859#define INBOUND_POST_TAIL_POINTER_REGISTER_PCI1_SIDE 0x0EC
860#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_PCI1_SIDE 0x0F0
861#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_PCI1_SIDE 0x0F4
862#define OUTBOUND_POST_HEAD_POINTER_REGISTER_PCI1_SIDE 0x078
863#define OUTBOUND_POST_TAIL_POINTER_REGISTER_PCI1_SIDE 0x07C
864
865#define INBOUND_MESSAGE_REGISTER0_CPU0_SIDE 0X1C10
866#define INBOUND_MESSAGE_REGISTER1_CPU0_SIDE 0X1C14
867#define OUTBOUND_MESSAGE_REGISTER0_CPU0_SIDE 0X1C18
868#define OUTBOUND_MESSAGE_REGISTER1_CPU0_SIDE 0X1C1C
869#define INBOUND_DOORBELL_REGISTER_CPU0_SIDE 0X1C20
870#define INBOUND_INTERRUPT_CAUSE_REGISTER_CPU0_SIDE 0X1C24
871#define INBOUND_INTERRUPT_MASK_REGISTER_CPU0_SIDE 0X1C28
872#define OUTBOUND_DOORBELL_REGISTER_CPU0_SIDE 0X1C2C
873#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_CPU0_SIDE 0X1C30
874#define OUTBOUND_INTERRUPT_MASK_REGISTER_CPU0_SIDE 0X1C34
875#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU0_SIDE 0X1C40
876#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU0_SIDE 0X1C44
877#define QUEUE_CONTROL_REGISTER_CPU0_SIDE 0X1C50
878#define QUEUE_BASE_ADDRESS_REGISTER_CPU0_SIDE 0X1C54
879#define INBOUND_FREE_HEAD_POINTER_REGISTER_CPU0_SIDE 0X1C60
880#define INBOUND_FREE_TAIL_POINTER_REGISTER_CPU0_SIDE 0X1C64
881#define INBOUND_POST_HEAD_POINTER_REGISTER_CPU0_SIDE 0X1C68
882#define INBOUND_POST_TAIL_POINTER_REGISTER_CPU0_SIDE 0X1C6C
883#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_CPU0_SIDE 0X1C70
884#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_CPU0_SIDE 0X1C74
885#define OUTBOUND_POST_HEAD_POINTER_REGISTER_CPU0_SIDE 0X1CF8
886#define OUTBOUND_POST_TAIL_POINTER_REGISTER_CPU0_SIDE 0X1CFC
887
888#define INBOUND_MESSAGE_REGISTER0_CPU1_SIDE 0X1C90
889#define INBOUND_MESSAGE_REGISTER1_CPU1_SIDE 0X1C94
890#define OUTBOUND_MESSAGE_REGISTER0_CPU1_SIDE 0X1C98
891#define OUTBOUND_MESSAGE_REGISTER1_CPU1_SIDE 0X1C9C
892#define INBOUND_DOORBELL_REGISTER_CPU1_SIDE 0X1CA0
893#define INBOUND_INTERRUPT_CAUSE_REGISTER_CPU1_SIDE 0X1CA4
894#define INBOUND_INTERRUPT_MASK_REGISTER_CPU1_SIDE 0X1CA8
895#define OUTBOUND_DOORBELL_REGISTER_CPU1_SIDE 0X1CAC
896#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_CPU1_SIDE 0X1CB0
897#define OUTBOUND_INTERRUPT_MASK_REGISTER_CPU1_SIDE 0X1CB4
898#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU1_SIDE 0X1CC0
899#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU1_SIDE 0X1CC4
900#define QUEUE_CONTROL_REGISTER_CPU1_SIDE 0X1CD0
901#define QUEUE_BASE_ADDRESS_REGISTER_CPU1_SIDE 0X1CD4
902#define INBOUND_FREE_HEAD_POINTER_REGISTER_CPU1_SIDE 0X1CE0
903#define INBOUND_FREE_TAIL_POINTER_REGISTER_CPU1_SIDE 0X1CE4
904#define INBOUND_POST_HEAD_POINTER_REGISTER_CPU1_SIDE 0X1CE8
905#define INBOUND_POST_TAIL_POINTER_REGISTER_CPU1_SIDE 0X1CEC
906#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_CPU1_SIDE 0X1CF0
907#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_CPU1_SIDE 0X1CF4
908#define OUTBOUND_POST_HEAD_POINTER_REGISTER_CPU1_SIDE 0X1C78
909#define OUTBOUND_POST_TAIL_POINTER_REGISTER_CPU1_SIDE 0X1C7C
910
911/*
912 * Communication Unit Registers
913 */
914
915#define ETHERNET_0_ADDRESS_CONTROL_LOW
916#define ETHERNET_0_ADDRESS_CONTROL_HIGH 0xf204
917#define ETHERNET_0_RECEIVE_BUFFER_PCI_HIGH_ADDRESS 0xf208
918#define ETHERNET_0_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS 0xf20c
919#define ETHERNET_0_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf210
920#define ETHERNET_0_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf214
921#define ETHERNET_0_HASH_TABLE_PCI_HIGH_ADDRESS 0xf218
922#define ETHERNET_1_ADDRESS_CONTROL_LOW 0xf220
923#define ETHERNET_1_ADDRESS_CONTROL_HIGH 0xf224
924#define ETHERNET_1_RECEIVE_BUFFER_PCI_HIGH_ADDRESS 0xf228
925#define ETHERNET_1_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS 0xf22c
926#define ETHERNET_1_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf230
927#define ETHERNET_1_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf234
928#define ETHERNET_1_HASH_TABLE_PCI_HIGH_ADDRESS 0xf238
929#define ETHERNET_2_ADDRESS_CONTROL_LOW 0xf240
930#define ETHERNET_2_ADDRESS_CONTROL_HIGH 0xf244
931#define ETHERNET_2_RECEIVE_BUFFER_PCI_HIGH_ADDRESS 0xf248
932#define ETHERNET_2_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS 0xf24c
933#define ETHERNET_2_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf250
934#define ETHERNET_2_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf254
935#define ETHERNET_2_HASH_TABLE_PCI_HIGH_ADDRESS 0xf258
936#define MPSC_0_ADDRESS_CONTROL_LOW 0xf280
937#define MPSC_0_ADDRESS_CONTROL_HIGH 0xf284
938#define MPSC_0_RECEIVE_BUFFER_PCI_HIGH_ADDRESS 0xf288
939#define MPSC_0_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS 0xf28c
940#define MPSC_0_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf290
941#define MPSC_0_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf294
942#define MPSC_1_ADDRESS_CONTROL_LOW 0xf2a0
943#define MPSC_1_ADDRESS_CONTROL_HIGH 0xf2a4
944#define MPSC_1_RECEIVE_BUFFER_PCI_HIGH_ADDRESS 0xf2a8
945#define MPSC_1_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS 0xf2ac
946#define MPSC_1_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf2b0
947#define MPSC_1_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf2b4
948#define MPSC_2_ADDRESS_CONTROL_LOW 0xf2c0
949#define MPSC_2_ADDRESS_CONTROL_HIGH 0xf2c4
950#define MPSC_2_RECEIVE_BUFFER_PCI_HIGH_ADDRESS 0xf2c8
951#define MPSC_2_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS 0xf2cc
952#define MPSC_2_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf2d0
953#define MPSC_2_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf2d4
954#define SERIAL_INIT_PCI_HIGH_ADDRESS 0xf320
955#define SERIAL_INIT_LAST_DATA 0xf324
956#define SERIAL_INIT_STATUS_AND_CONTROL 0xf328
957#define COMM_UNIT_ARBITER_CONTROL 0xf300
958#define COMM_UNIT_CROSS_BAR_TIMEOUT 0xf304
959#define COMM_UNIT_INTERRUPT_CAUSE 0xf310
960#define COMM_UNIT_INTERRUPT_MASK 0xf314
961#define COMM_UNIT_ERROR_ADDRESS 0xf314
962
963/*
964 * Cunit Debug (for internal use)
965 */
966
967#define CUNIT_ADDRESS 0xf340
968#define CUNIT_COMMAND_AND_ID 0xf344
969#define CUNIT_WRITE_DATA_LOW 0xf348
970#define CUNIT_WRITE_DATA_HIGH 0xf34c
971#define CUNIT_WRITE_BYTE_ENABLE 0xf358
972#define CUNIT_READ_DATA_LOW 0xf350
973#define CUNIT_READ_DATA_HIGH 0xf354
974#define CUNIT_READ_ID 0xf35c
975
976/*
977 * Fast Ethernet Unit Registers
978 */
979
980/* Ethernet */
981
982#define ETHERNET_PHY_ADDRESS_REGISTER 0x2000
983#define ETHERNET_SMI_REGISTER 0x2010
984
985/* Ethernet 0 */
986
987#define ETHERNET0_PORT_CONFIGURATION_REGISTER 0x2400
988#define ETHERNET0_PORT_CONFIGURATION_EXTEND_REGISTER 0x2408
989#define ETHERNET0_PORT_COMMAND_REGISTER 0x2410
990#define ETHERNET0_PORT_STATUS_REGISTER 0x2418
991#define ETHERNET0_SERIAL_PARAMETRS_REGISTER 0x2420
992#define ETHERNET0_HASH_TABLE_POINTER_REGISTER 0x2428
993#define ETHERNET0_FLOW_CONTROL_SOURCE_ADDRESS_LOW 0x2430
994#define ETHERNET0_FLOW_CONTROL_SOURCE_ADDRESS_HIGH 0x2438
995#define ETHERNET0_SDMA_CONFIGURATION_REGISTER 0x2440
996#define ETHERNET0_SDMA_COMMAND_REGISTER 0x2448
997#define ETHERNET0_INTERRUPT_CAUSE_REGISTER 0x2450
998#define ETHERNET0_INTERRUPT_MASK_REGISTER 0x2458
999#define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER0 0x2480
1000#define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER1 0x2484
1001#define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER2 0x2488
1002#define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER3 0x248c
1003#define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER0 0x24a0
1004#define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER1 0x24a4
1005#define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER2 0x24a8
1006#define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER3 0x24ac
1007#define ETHERNET0_CURRENT_TX_DESCRIPTOR_POINTER0 0x24e0
1008#define ETHERNET0_CURRENT_TX_DESCRIPTOR_POINTER1 0x24e4
1009#define ETHERNET0_MIB_COUNTER_BASE 0x2500
1010
1011/* Ethernet 1 */
1012
1013#define ETHERNET1_PORT_CONFIGURATION_REGISTER 0x2800
1014#define ETHERNET1_PORT_CONFIGURATION_EXTEND_REGISTER 0x2808
1015#define ETHERNET1_PORT_COMMAND_REGISTER 0x2810
1016#define ETHERNET1_PORT_STATUS_REGISTER 0x2818
1017#define ETHERNET1_SERIAL_PARAMETRS_REGISTER 0x2820
1018#define ETHERNET1_HASH_TABLE_POINTER_REGISTER 0x2828
1019#define ETHERNET1_FLOW_CONTROL_SOURCE_ADDRESS_LOW 0x2830
1020#define ETHERNET1_FLOW_CONTROL_SOURCE_ADDRESS_HIGH 0x2838
1021#define ETHERNET1_SDMA_CONFIGURATION_REGISTER 0x2840
1022#define ETHERNET1_SDMA_COMMAND_REGISTER 0x2848
1023#define ETHERNET1_INTERRUPT_CAUSE_REGISTER 0x2850
1024#define ETHERNET1_INTERRUPT_MASK_REGISTER 0x2858
1025#define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER0 0x2880
1026#define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER1 0x2884
1027#define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER2 0x2888
1028#define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER3 0x288c
1029#define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER0 0x28a0
1030#define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER1 0x28a4
1031#define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER2 0x28a8
1032#define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER3 0x28ac
1033#define ETHERNET1_CURRENT_TX_DESCRIPTOR_POINTER0 0x28e0
1034#define ETHERNET1_CURRENT_TX_DESCRIPTOR_POINTER1 0x28e4
1035#define ETHERNET1_MIB_COUNTER_BASE 0x2900
1036
1037/* Ethernet 2 */
1038
1039#define ETHERNET2_PORT_CONFIGURATION_REGISTER 0x2c00
1040#define ETHERNET2_PORT_CONFIGURATION_EXTEND_REGISTER 0x2c08
1041#define ETHERNET2_PORT_COMMAND_REGISTER 0x2c10
1042#define ETHERNET2_PORT_STATUS_REGISTER 0x2c18
1043#define ETHERNET2_SERIAL_PARAMETRS_REGISTER 0x2c20
1044#define ETHERNET2_HASH_TABLE_POINTER_REGISTER 0x2c28
1045#define ETHERNET2_FLOW_CONTROL_SOURCE_ADDRESS_LOW 0x2c30
1046#define ETHERNET2_FLOW_CONTROL_SOURCE_ADDRESS_HIGH 0x2c38
1047#define ETHERNET2_SDMA_CONFIGURATION_REGISTER 0x2c40
1048#define ETHERNET2_SDMA_COMMAND_REGISTER 0x2c48
1049#define ETHERNET2_INTERRUPT_CAUSE_REGISTER 0x2c50
1050#define ETHERNET2_INTERRUPT_MASK_REGISTER 0x2c58
1051#define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER0 0x2c80
1052#define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER1 0x2c84
1053#define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER2 0x2c88
1054#define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER3 0x2c8c
1055#define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER0 0x2ca0
1056#define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER1 0x2ca4
1057#define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER2 0x2ca8
1058#define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER3 0x2cac
1059#define ETHERNET2_CURRENT_TX_DESCRIPTOR_POINTER0 0x2ce0
1060#define ETHERNET2_CURRENT_TX_DESCRIPTOR_POINTER1 0x2ce4
1061#define ETHERNET2_MIB_COUNTER_BASE 0x2d00
1062
1063/*
1064 * SDMA Registers
1065 */
1066
1067#define SDMA_GROUP_CONFIGURATION_REGISTER 0xb1f0
1068#define CHANNEL0_CONFIGURATION_REGISTER 0x4000
1069#define CHANNEL0_COMMAND_REGISTER 0x4008
1070#define CHANNEL0_RX_CMD_STATUS 0x4800
1071#define CHANNEL0_RX_PACKET_AND_BUFFER_SIZES 0x4804
1072#define CHANNEL0_RX_BUFFER_POINTER 0x4808
1073#define CHANNEL0_RX_NEXT_POINTER 0x480c
1074#define CHANNEL0_CURRENT_RX_DESCRIPTOR_POINTER 0x4810
1075#define CHANNEL0_TX_CMD_STATUS 0x4C00
1076#define CHANNEL0_TX_PACKET_SIZE 0x4C04
1077#define CHANNEL0_TX_BUFFER_POINTER 0x4C08
1078#define CHANNEL0_TX_NEXT_POINTER 0x4C0c
1079#define CHANNEL0_CURRENT_TX_DESCRIPTOR_POINTER 0x4c10
1080#define CHANNEL0_FIRST_TX_DESCRIPTOR_POINTER 0x4c14
1081#define CHANNEL1_CONFIGURATION_REGISTER 0x6000
1082#define CHANNEL1_COMMAND_REGISTER 0x6008
1083#define CHANNEL1_RX_CMD_STATUS 0x6800
1084#define CHANNEL1_RX_PACKET_AND_BUFFER_SIZES 0x6804
1085#define CHANNEL1_RX_BUFFER_POINTER 0x6808
1086#define CHANNEL1_RX_NEXT_POINTER 0x680c
1087#define CHANNEL1_CURRENT_RX_DESCRIPTOR_POINTER 0x6810
1088#define CHANNEL1_TX_CMD_STATUS 0x6C00
1089#define CHANNEL1_TX_PACKET_SIZE 0x6C04
1090#define CHANNEL1_TX_BUFFER_POINTER 0x6C08
1091#define CHANNEL1_TX_NEXT_POINTER 0x6C0c
1092#define CHANNEL1_CURRENT_RX_DESCRIPTOR_POINTER 0x6810
1093#define CHANNEL1_CURRENT_TX_DESCRIPTOR_POINTER 0x6c10
1094#define CHANNEL1_FIRST_TX_DESCRIPTOR_POINTER 0x6c14
1095
1096/* SDMA Interrupt */
1097
1098#define SDMA_CAUSE 0xb820
1099#define SDMA_MASK 0xb8a0
1100
1101
1102/*
1103 * Baude Rate Generators Registers
1104 */
1105
1106/* BRG 0 */
1107
1108#define BRG0_CONFIGURATION_REGISTER 0xb200
1109#define BRG0_BAUDE_TUNING_REGISTER 0xb204
1110
1111/* BRG 1 */
1112
1113#define BRG1_CONFIGURATION_REGISTER 0xb208
1114#define BRG1_BAUDE_TUNING_REGISTER 0xb20c
1115
1116/* BRG 2 */
1117
1118#define BRG2_CONFIGURATION_REGISTER 0xb210
1119#define BRG2_BAUDE_TUNING_REGISTER 0xb214
1120
1121/* BRG Interrupts */
1122
1123#define BRG_CAUSE_REGISTER 0xb834
1124#define BRG_MASK_REGISTER 0xb8b4
1125
1126/* MISC */
1127
1128#define MAIN_ROUTING_REGISTER 0xb400
1129#define RECEIVE_CLOCK_ROUTING_REGISTER 0xb404
1130#define TRANSMIT_CLOCK_ROUTING_REGISTER 0xb408
1131#define COMM_UNIT_ARBITER_CONFIGURATION_REGISTER 0xb40c
1132#define WATCHDOG_CONFIGURATION_REGISTER 0xb410
1133#define WATCHDOG_VALUE_REGISTER 0xb414
1134
1135
1136/*
1137 * Flex TDM Registers
1138 */
1139
1140/* FTDM Port */
1141
1142#define FLEXTDM_TRANSMIT_READ_POINTER 0xa800
1143#define FLEXTDM_RECEIVE_READ_POINTER 0xa804
1144#define FLEXTDM_CONFIGURATION_REGISTER 0xa808
1145#define FLEXTDM_AUX_CHANNELA_TX_REGISTER 0xa80c
1146#define FLEXTDM_AUX_CHANNELA_RX_REGISTER 0xa810
1147#define FLEXTDM_AUX_CHANNELB_TX_REGISTER 0xa814
1148#define FLEXTDM_AUX_CHANNELB_RX_REGISTER 0xa818
1149
1150/* FTDM Interrupts */
1151
1152#define FTDM_CAUSE_REGISTER 0xb830
1153#define FTDM_MASK_REGISTER 0xb8b0
1154
1155
1156/*
1157 * GPP Interface Registers
1158 */
1159
1160#define GPP_IO_CONTROL 0xf100
1161#define GPP_LEVEL_CONTROL 0xf110
1162#define GPP_VALUE 0xf104
1163#define GPP_INTERRUPT_CAUSE 0xf108
1164#define GPP_INTERRUPT_MASK 0xf10c
1165
1166#define MPP_CONTROL0 0xf000
1167#define MPP_CONTROL1 0xf004
1168#define MPP_CONTROL2 0xf008
1169#define MPP_CONTROL3 0xf00c
1170#define DEBUG_PORT_MULTIPLEX 0xf014
1171#define SERIAL_PORT_MULTIPLEX 0xf010
1172
1173/*
1174 * I2C Registers
1175 */
1176
1177#define I2C_SLAVE_ADDRESS 0xc000
1178#define I2C_EXTENDED_SLAVE_ADDRESS 0xc040
1179#define I2C_DATA 0xc004
1180#define I2C_CONTROL 0xc008
1181#define I2C_STATUS_BAUDE_RATE 0xc00C
1182#define I2C_SOFT_RESET 0xc01c
1183
1184/*
1185 * MPSC Registers
1186 */
1187
1188/*
1189 * MPSC0
1190 */
1191
1192#define MPSC0_MAIN_CONFIGURATION_LOW 0x8000
1193#define MPSC0_MAIN_CONFIGURATION_HIGH 0x8004
1194#define MPSC0_PROTOCOL_CONFIGURATION 0x8008
1195#define CHANNEL0_REGISTER1 0x800c
1196#define CHANNEL0_REGISTER2 0x8010
1197#define CHANNEL0_REGISTER3 0x8014
1198#define CHANNEL0_REGISTER4 0x8018
1199#define CHANNEL0_REGISTER5 0x801c
1200#define CHANNEL0_REGISTER6 0x8020
1201#define CHANNEL0_REGISTER7 0x8024
1202#define CHANNEL0_REGISTER8 0x8028
1203#define CHANNEL0_REGISTER9 0x802c
1204#define CHANNEL0_REGISTER10 0x8030
1205#define CHANNEL0_REGISTER11 0x8034
1206
1207/*
1208 * MPSC1
1209 */
1210
1211#define MPSC1_MAIN_CONFIGURATION_LOW 0x9000
1212#define MPSC1_MAIN_CONFIGURATION_HIGH 0x9004
1213#define MPSC1_PROTOCOL_CONFIGURATION 0x9008
1214#define CHANNEL1_REGISTER1 0x900c
1215#define CHANNEL1_REGISTER2 0x9010
1216#define CHANNEL1_REGISTER3 0x9014
1217#define CHANNEL1_REGISTER4 0x9018
1218#define CHANNEL1_REGISTER5 0x901c
1219#define CHANNEL1_REGISTER6 0x9020
1220#define CHANNEL1_REGISTER7 0x9024
1221#define CHANNEL1_REGISTER8 0x9028
1222#define CHANNEL1_REGISTER9 0x902c
1223#define CHANNEL1_REGISTER10 0x9030
1224#define CHANNEL1_REGISTER11 0x9034
1225
1226/*
1227 * MPSCs Interupts
1228 */
1229
1230#define MPSC0_CAUSE 0xb804
1231#define MPSC0_MASK 0xb884
1232#define MPSC1_CAUSE 0xb80c
1233#define MPSC1_MASK 0xb88c
1234
1235#endif /* __ASM_MIPS_MV64240_H */
diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h
index 918a4894b5..6a5fa32f61 100644
--- a/include/asm-mips/hazards.h
+++ b/include/asm-mips/hazards.h
@@ -172,6 +172,7 @@ ASMMACRO(tlb_probe_hazard,
172 nop; nop; nop 172 nop; nop; nop
173 ) 173 )
174ASMMACRO(irq_enable_hazard, 174ASMMACRO(irq_enable_hazard,
175 _ssnop; _ssnop; _ssnop;
175 ) 176 )
176ASMMACRO(irq_disable_hazard, 177ASMMACRO(irq_disable_hazard,
177 nop; nop; nop 178 nop; nop; nop
diff --git a/include/asm-mips/ioctls.h b/include/asm-mips/ioctls.h
index 92f6c36aac..5097cbf183 100644
--- a/include/asm-mips/ioctls.h
+++ b/include/asm-mips/ioctls.h
@@ -77,6 +77,10 @@
77#define TIOCSBRK 0x5427 /* BSD compatibility */ 77#define TIOCSBRK 0x5427 /* BSD compatibility */
78#define TIOCCBRK 0x5428 /* BSD compatibility */ 78#define TIOCCBRK 0x5428 /* BSD compatibility */
79#define TIOCGSID 0x7416 /* Return the session ID of FD */ 79#define TIOCGSID 0x7416 /* Return the session ID of FD */
80#define TCGETS2 _IOR('T',0x2A, struct termios2)
81#define TCSETS2 _IOW('T',0x2B, struct termios2)
82#define TCSETSW2 _IOW('T',0x2C, struct termios2)
83#define TCSETSF2 _IOW('T',0x2D, struct termios2)
80#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 84#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
81#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ 85#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
82 86
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h
index 97102ebc54..2cb52cf8bd 100644
--- a/include/asm-mips/irq.h
+++ b/include/asm-mips/irq.h
@@ -24,7 +24,30 @@ static inline int irq_canonicalize(int irq)
24#define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */ 24#define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */
25#endif 25#endif
26 26
27#ifdef CONFIG_MIPS_MT_SMTC
28
29struct irqaction;
30
31extern unsigned long irq_hwmask[];
32extern int setup_irq_smtc(unsigned int irq, struct irqaction * new,
33 unsigned long hwmask);
34
35static inline void smtc_im_ack_irq(unsigned int irq)
36{
37 if (irq_hwmask[irq] & ST0_IM)
38 set_c0_status(irq_hwmask[irq] & ST0_IM);
39}
40
41#else
42
43static inline void smtc_im_ack_irq(unsigned int irq)
44{
45}
46
47#endif /* CONFIG_MIPS_MT_SMTC */
48
27#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP 49#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP
50
28/* 51/*
29 * Clear interrupt mask handling "backstop" if irq_hwmask 52 * Clear interrupt mask handling "backstop" if irq_hwmask
30 * entry so indicates. This implies that the ack() or end() 53 * entry so indicates. This implies that the ack() or end()
@@ -38,6 +61,7 @@ do { \
38 ~(irq_hwmask[irq] & 0x0000ff00)); \ 61 ~(irq_hwmask[irq] & 0x0000ff00)); \
39} while (0) 62} while (0)
40#else 63#else
64
41#define __DO_IRQ_SMTC_HOOK(irq) do { } while (0) 65#define __DO_IRQ_SMTC_HOOK(irq) do { } while (0)
42#endif 66#endif
43 67
@@ -60,14 +84,6 @@ do { \
60extern void arch_init_irq(void); 84extern void arch_init_irq(void);
61extern void spurious_interrupt(void); 85extern void spurious_interrupt(void);
62 86
63#ifdef CONFIG_MIPS_MT_SMTC
64struct irqaction;
65
66extern unsigned long irq_hwmask[];
67extern int setup_irq_smtc(unsigned int irq, struct irqaction * new,
68 unsigned long hwmask);
69#endif /* CONFIG_MIPS_MT_SMTC */
70
71extern int allocate_irqno(void); 87extern int allocate_irqno(void);
72extern void alloc_legacy_irqno(void); 88extern void alloc_legacy_irqno(void);
73extern void free_irqno(unsigned int irq); 89extern void free_irqno(unsigned int irq);
diff --git a/include/asm-mips/jmr3927/jmr3927.h b/include/asm-mips/jmr3927/jmr3927.h
index 958e29706e..b2dc35f561 100644
--- a/include/asm-mips/jmr3927/jmr3927.h
+++ b/include/asm-mips/jmr3927/jmr3927.h
@@ -13,6 +13,7 @@
13#include <asm/jmr3927/tx3927.h> 13#include <asm/jmr3927/tx3927.h>
14#include <asm/addrspace.h> 14#include <asm/addrspace.h>
15#include <asm/system.h> 15#include <asm/system.h>
16#include <asm/txx9irq.h>
16 17
17/* CS */ 18/* CS */
18#define JMR3927_ROMCE0 0x1fc00000 /* 4M */ 19#define JMR3927_ROMCE0 0x1fc00000 /* 4M */
@@ -115,7 +116,7 @@
115#define JMR3927_NR_IRQ_IRC 16 /* On-Chip IRC */ 116#define JMR3927_NR_IRQ_IRC 16 /* On-Chip IRC */
116#define JMR3927_NR_IRQ_IOC 8 /* PCI/MODEM/INT[6:7] */ 117#define JMR3927_NR_IRQ_IOC 8 /* PCI/MODEM/INT[6:7] */
117 118
118#define JMR3927_IRQ_IRC 16 119#define JMR3927_IRQ_IRC TXX9_IRQ_BASE
119#define JMR3927_IRQ_IOC (JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC) 120#define JMR3927_IRQ_IOC (JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC)
120#define JMR3927_IRQ_END (JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC) 121#define JMR3927_IRQ_END (JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC)
121 122
diff --git a/include/asm-mips/jmr3927/tx3927.h b/include/asm-mips/jmr3927/tx3927.h
index 0b9073bfb7..4be2f25f70 100644
--- a/include/asm-mips/jmr3927/tx3927.h
+++ b/include/asm-mips/jmr3927/tx3927.h
@@ -50,21 +50,6 @@ struct tx3927_dma_reg {
50 volatile unsigned long unused0; 50 volatile unsigned long unused0;
51}; 51};
52 52
53struct tx3927_irc_reg {
54 volatile unsigned long cer;
55 volatile unsigned long cr[2];
56 volatile unsigned long unused0;
57 volatile unsigned long ilr[8];
58 volatile unsigned long unused1[4];
59 volatile unsigned long imr;
60 volatile unsigned long unused2[7];
61 volatile unsigned long scr;
62 volatile unsigned long unused3[7];
63 volatile unsigned long ssr;
64 volatile unsigned long unused4[7];
65 volatile unsigned long csr;
66};
67
68#include <asm/byteorder.h> 53#include <asm/byteorder.h>
69 54
70#ifdef __BIG_ENDIAN 55#ifdef __BIG_ENDIAN
@@ -225,26 +210,6 @@ struct tx3927_ccfg_reg {
225/* 210/*
226 * IRC 211 * IRC
227 */ 212 */
228#define TX3927_IR_MAX_LEVEL 7
229
230/* IRCER : Int. Control Enable */
231#define TX3927_IRCER_ICE 0x00000001
232
233/* IRCR : Int. Control */
234#define TX3927_IRCR_LOW 0x00000000
235#define TX3927_IRCR_HIGH 0x00000001
236#define TX3927_IRCR_DOWN 0x00000002
237#define TX3927_IRCR_UP 0x00000003
238
239/* IRSCR : Int. Status Control */
240#define TX3927_IRSCR_EIClrE 0x00000100
241#define TX3927_IRSCR_EIClr_MASK 0x0000000f
242
243/* IRCSR : Int. Current Status */
244#define TX3927_IRCSR_IF 0x00010000
245#define TX3927_IRCSR_ILV_MASK 0x00000700
246#define TX3927_IRCSR_IVL_MASK 0x0000001f
247
248#define TX3927_IR_INT0 0 213#define TX3927_IR_INT0 0
249#define TX3927_IR_INT1 1 214#define TX3927_IR_INT1 1
250#define TX3927_IR_INT2 2 215#define TX3927_IR_INT2 2
@@ -347,7 +312,6 @@ struct tx3927_ccfg_reg {
347#define tx3927_sdramcptr ((struct tx3927_sdramc_reg *)TX3927_SDRAMC_REG) 312#define tx3927_sdramcptr ((struct tx3927_sdramc_reg *)TX3927_SDRAMC_REG)
348#define tx3927_romcptr ((struct tx3927_romc_reg *)TX3927_ROMC_REG) 313#define tx3927_romcptr ((struct tx3927_romc_reg *)TX3927_ROMC_REG)
349#define tx3927_dmaptr ((struct tx3927_dma_reg *)TX3927_DMA_REG) 314#define tx3927_dmaptr ((struct tx3927_dma_reg *)TX3927_DMA_REG)
350#define tx3927_ircptr ((struct tx3927_irc_reg *)TX3927_IRC_REG)
351#define tx3927_pcicptr ((struct tx3927_pcic_reg *)TX3927_PCIC_REG) 315#define tx3927_pcicptr ((struct tx3927_pcic_reg *)TX3927_PCIC_REG)
352#define tx3927_ccfgptr ((struct tx3927_ccfg_reg *)TX3927_CCFG_REG) 316#define tx3927_ccfgptr ((struct tx3927_ccfg_reg *)TX3927_CCFG_REG)
353#define tx3927_tmrptr(ch) ((struct txx927_tmr_reg *)TX3927_TMR_REG(ch)) 317#define tx3927_tmrptr(ch) ((struct txx927_tmr_reg *)TX3927_TMR_REG(ch))
diff --git a/include/asm-mips/local.h b/include/asm-mips/local.h
index ed882c88e0..f9a5ce5c9a 100644
--- a/include/asm-mips/local.h
+++ b/include/asm-mips/local.h
@@ -4,6 +4,7 @@
4#include <linux/percpu.h> 4#include <linux/percpu.h>
5#include <linux/bitops.h> 5#include <linux/bitops.h>
6#include <asm/atomic.h> 6#include <asm/atomic.h>
7#include <asm/cmpxchg.h>
7#include <asm/war.h> 8#include <asm/war.h>
8 9
9typedef struct 10typedef struct
@@ -114,68 +115,6 @@ static __inline__ long local_sub_return(long i, local_t * l)
114 return result; 115 return result;
115} 116}
116 117
117/*
118 * local_sub_if_positive - conditionally subtract integer from atomic variable
119 * @i: integer value to subtract
120 * @l: pointer of type local_t
121 *
122 * Atomically test @l and subtract @i if @l is greater or equal than @i.
123 * The function returns the old value of @l minus @i.
124 */
125static __inline__ long local_sub_if_positive(long i, local_t * l)
126{
127 unsigned long result;
128
129 if (cpu_has_llsc && R10000_LLSC_WAR) {
130 unsigned long temp;
131
132 __asm__ __volatile__(
133 " .set mips3 \n"
134 "1:" __LL "%1, %2 # local_sub_if_positive\n"
135 " dsubu %0, %1, %3 \n"
136 " bltz %0, 1f \n"
137 __SC "%0, %2 \n"
138 " .set noreorder \n"
139 " beqzl %0, 1b \n"
140 " dsubu %0, %1, %3 \n"
141 " .set reorder \n"
142 "1: \n"
143 " .set mips0 \n"
144 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter)
145 : "Ir" (i), "m" (l->a.counter)
146 : "memory");
147 } else if (cpu_has_llsc) {
148 unsigned long temp;
149
150 __asm__ __volatile__(
151 " .set mips3 \n"
152 "1:" __LL "%1, %2 # local_sub_if_positive\n"
153 " dsubu %0, %1, %3 \n"
154 " bltz %0, 1f \n"
155 __SC "%0, %2 \n"
156 " .set noreorder \n"
157 " beqz %0, 1b \n"
158 " dsubu %0, %1, %3 \n"
159 " .set reorder \n"
160 "1: \n"
161 " .set mips0 \n"
162 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter)
163 : "Ir" (i), "m" (l->a.counter)
164 : "memory");
165 } else {
166 unsigned long flags;
167
168 local_irq_save(flags);
169 result = l->a.counter;
170 result -= i;
171 if (result >= 0)
172 l->a.counter = result;
173 local_irq_restore(flags);
174 }
175
176 return result;
177}
178
179#define local_cmpxchg(l, o, n) \ 118#define local_cmpxchg(l, o, n) \
180 ((long)cmpxchg_local(&((l)->a.counter), (o), (n))) 119 ((long)cmpxchg_local(&((l)->a.counter), (o), (n)))
181#define local_xchg(l, n) (xchg_local(&((l)->a.counter),(n))) 120#define local_xchg(l, n) (xchg_local(&((l)->a.counter),(n)))
@@ -234,12 +173,6 @@ static __inline__ long local_sub_if_positive(long i, local_t * l)
234#define local_dec_and_test(l) (local_sub_return(1, (l)) == 0) 173#define local_dec_and_test(l) (local_sub_return(1, (l)) == 0)
235 174
236/* 175/*
237 * local_dec_if_positive - decrement by 1 if old value positive
238 * @l: pointer of type local_t
239 */
240#define local_dec_if_positive(l) local_sub_if_positive(1, l)
241
242/*
243 * local_add_negative - add and test if negative 176 * local_add_negative - add and test if negative
244 * @l: pointer of type local_t 177 * @l: pointer of type local_t
245 * @i: integer value to add 178 * @i: integer value to add
diff --git a/include/asm-mips/mach-generic/ide.h b/include/asm-mips/mach-generic/ide.h
index 6eba2e576a..a77128362a 100644
--- a/include/asm-mips/mach-generic/ide.h
+++ b/include/asm-mips/mach-generic/ide.h
@@ -33,13 +33,24 @@ static __inline__ int ide_probe_legacy(void)
33{ 33{
34#ifdef CONFIG_PCI 34#ifdef CONFIG_PCI
35 struct pci_dev *dev; 35 struct pci_dev *dev;
36 if ((dev = pci_get_class(PCI_CLASS_BRIDGE_EISA << 8, NULL)) != NULL || 36 /*
37 (dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL)) != NULL) { 37 * This can be called on the ide_setup() path, super-early in
38 pci_dev_put(dev); 38 * boot. But the down_read() will enable local interrupts,
39 39 * which can cause some machines to crash. So here we detect
40 return 1; 40 * and flag that situation and bail out early.
41 } 41 */
42 if (no_pci_devices())
43 return 0;
44 dev = pci_get_class(PCI_CLASS_BRIDGE_EISA << 8, NULL);
45 if (dev)
46 goto found;
47 dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL);
48 if (dev)
49 goto found;
42 return 0; 50 return 0;
51found:
52 pci_dev_put(dev);
53 return 1;
43#elif defined(CONFIG_EISA) || defined(CONFIG_ISA) 54#elif defined(CONFIG_EISA) || defined(CONFIG_ISA)
44 return 1; 55 return 1;
45#else 56#else
@@ -49,48 +60,42 @@ static __inline__ int ide_probe_legacy(void)
49 60
50static __inline__ int ide_default_irq(unsigned long base) 61static __inline__ int ide_default_irq(unsigned long base)
51{ 62{
52 if (ide_probe_legacy()) 63 switch (base) {
53 switch (base) { 64 case 0x1f0: return 14;
54 case 0x1f0: 65 case 0x170: return 15;
55 return 14; 66 case 0x1e8: return 11;
56 case 0x170: 67 case 0x168: return 10;
57 return 15; 68 case 0x1e0: return 8;
58 case 0x1e8: 69 case 0x160: return 12;
59 return 11;
60 case 0x168:
61 return 10;
62 case 0x1e0:
63 return 8;
64 case 0x160:
65 return 12;
66 default: 70 default:
67 return 0; 71 return 0;
68 } 72 }
69 else
70 return 0;
71} 73}
72 74
73static __inline__ unsigned long ide_default_io_base(int index) 75static __inline__ unsigned long ide_default_io_base(int index)
74{ 76{
75 if (ide_probe_legacy()) 77 if (!ide_probe_legacy())
78 return 0;
79 /*
80 * If PCI is present then it is not safe to poke around
81 * the other legacy IDE ports. Only 0x1f0 and 0x170 are
82 * defined compatibility mode ports for PCI. A user can
83 * override this using ide= but we must default safe.
84 */
85 if (no_pci_devices()) {
76 switch (index) { 86 switch (index) {
77 case 0: 87 case 2: return 0x1e8;
78 return 0x1f0; 88 case 3: return 0x168;
79 case 1: 89 case 4: return 0x1e0;
80 return 0x170; 90 case 5: return 0x160;
81 case 2:
82 return 0x1e8;
83 case 3:
84 return 0x168;
85 case 4:
86 return 0x1e0;
87 case 5:
88 return 0x160;
89 default:
90 return 0;
91 } 91 }
92 else 92 }
93 switch (index) {
94 case 0: return 0x1f0;
95 case 1: return 0x170;
96 default:
93 return 0; 97 return 0;
98 }
94} 99}
95 100
96#define IDE_ARCH_OBSOLETE_INIT 101#define IDE_ARCH_OBSOLETE_INIT
diff --git a/include/asm-mips/mach-ocelot/mach-gt64120.h b/include/asm-mips/mach-ocelot/mach-gt64120.h
deleted file mode 100644
index a62ecb53c7..0000000000
--- a/include/asm-mips/mach-ocelot/mach-gt64120.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * Copyright 2001 MontaVista Software Inc.
3 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10#ifndef _ASM_GT64120_MOMENCO_OCELOT_GT64120_DEP_H
11#define _ASM_GT64120_MOMENCO_OCELOT_GT64120_DEP_H
12
13/*
14 * PCI address allocation
15 */
16#define GT_PCI_MEM_BASE (0x22000000UL)
17#define GT_PCI_MEM_SIZE GT_DEF_PCI0_MEM0_SIZE
18#define GT_PCI_IO_BASE (0x20000000UL)
19#define GT_PCI_IO_SIZE GT_DEF_PCI0_IO_SIZE
20
21extern unsigned long gt64120_base;
22
23#define GT64120_BASE (gt64120_base)
24
25/*
26 * GT timer irq
27 */
28#define GT_TIMER 6
29
30#endif /* _ASM_GT64120_MOMENCO_OCELOT_GT64120_DEP_H */
diff --git a/include/asm-mips/marvell.h b/include/asm-mips/marvell.h
deleted file mode 100644
index b6144bafc5..0000000000
--- a/include/asm-mips/marvell.h
+++ /dev/null
@@ -1,59 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2004 by Ralf Baechle
7 */
8#ifndef __ASM_MIPS_MARVELL_H
9#define __ASM_MIPS_MARVELL_H
10
11#include <linux/pci.h>
12
13#include <asm/byteorder.h>
14
15extern unsigned long marvell_base;
16
17/*
18 * Because of an error/peculiarity in the Galileo chip, we need to swap the
19 * bytes when running bigendian.
20 */
21#define __MV_READ(ofs) \
22 (*(volatile u32 *)(marvell_base+(ofs)))
23#define __MV_WRITE(ofs, data) \
24 do { *(volatile u32 *)(marvell_base+(ofs)) = (data); } while (0)
25
26#define MV_READ(ofs) le32_to_cpu(__MV_READ(ofs))
27#define MV_WRITE(ofs, data) __MV_WRITE(ofs, cpu_to_le32(data))
28
29#define MV_READ_16(ofs) \
30 le16_to_cpu(*(volatile u16 *)(marvell_base+(ofs)))
31#define MV_WRITE_16(ofs, data) \
32 *(volatile u16 *)(marvell_base+(ofs)) = cpu_to_le16(data)
33
34#define MV_READ_8(ofs) \
35 *(volatile u8 *)(marvell_base+(ofs))
36#define MV_WRITE_8(ofs, data) \
37 *(volatile u8 *)(marvell_base+(ofs)) = data
38
39#define MV_SET_REG_BITS(ofs, bits) \
40 (*((volatile u32 *)(marvell_base + (ofs)))) |= ((u32)cpu_to_le32(bits))
41#define MV_RESET_REG_BITS(ofs, bits) \
42 (*((volatile u32 *)(marvell_base + (ofs)))) &= ~((u32)cpu_to_le32(bits))
43
44extern struct pci_ops mv_pci_ops;
45
46struct mv_pci_controller {
47 struct pci_controller pcic;
48
49 /*
50 * GT-64240/MV-64340 specific, per host bus information
51 */
52 unsigned long config_addr;
53 unsigned long config_vreg;
54};
55
56extern void ll_mv64340_irq(void);
57extern void mv64340_irq_init(unsigned int base);
58
59#endif /* __ASM_MIPS_MARVELL_H */
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index b92dd8c760..e3301e54d5 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -142,7 +142,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
142/* 142/*
143 * __pa()/__va() should be used only during mem init. 143 * __pa()/__va() should be used only during mem init.
144 */ 144 */
145#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) 145#ifdef CONFIG_64BIT
146#define __pa(x) \ 146#define __pa(x) \
147({ \ 147({ \
148 unsigned long __x = (unsigned long)(x); \ 148 unsigned long __x = (unsigned long)(x); \
diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h
index 2fbd47eba3..59c865deb0 100644
--- a/include/asm-mips/pgtable-32.h
+++ b/include/asm-mips/pgtable-32.h
@@ -43,11 +43,7 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
43 */ 43 */
44 44
45/* PGDIR_SHIFT determines what a third-level page table entry can map */ 45/* PGDIR_SHIFT determines what a third-level page table entry can map */
46#ifdef CONFIG_64BIT_PHYS_ADDR 46#define PGDIR_SHIFT (2 * PAGE_SHIFT + PTE_ORDER - PTE_T_LOG2)
47#define PGDIR_SHIFT 21
48#else
49#define PGDIR_SHIFT 22
50#endif
51#define PGDIR_SIZE (1UL << PGDIR_SHIFT) 47#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
52#define PGDIR_MASK (~(PGDIR_SIZE-1)) 48#define PGDIR_MASK (~(PGDIR_SIZE-1))
53 49
@@ -55,17 +51,11 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
55 * Entries per page directory level: we use two-level, so 51 * Entries per page directory level: we use two-level, so
56 * we don't really have any PUD/PMD directory physically. 52 * we don't really have any PUD/PMD directory physically.
57 */ 53 */
58#ifdef CONFIG_64BIT_PHYS_ADDR 54#define __PGD_ORDER (32 - 3 * PAGE_SHIFT + PGD_T_LOG2 + PTE_T_LOG2)
59#define PGD_ORDER 1 55#define PGD_ORDER (__PGD_ORDER >= 0 ? __PGD_ORDER : 0)
60#define PUD_ORDER aieeee_attempt_to_allocate_pud 56#define PUD_ORDER aieeee_attempt_to_allocate_pud
61#define PMD_ORDER 1 57#define PMD_ORDER 1
62#define PTE_ORDER 0 58#define PTE_ORDER 0
63#else
64#define PGD_ORDER 0
65#define PUD_ORDER aieeee_attempt_to_allocate_pud
66#define PMD_ORDER 1
67#define PTE_ORDER 0
68#endif
69 59
70#define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t)) 60#define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t))
71#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) 61#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t))
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 2e2d70d13f..d2ee281567 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -168,11 +168,15 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt
168#define set_pud(pudptr, pudval) do { *(pudptr) = (pudval); } while(0) 168#define set_pud(pudptr, pudval) do { *(pudptr) = (pudval); } while(0)
169#endif 169#endif
170 170
171#define PGD_T_LOG2 ffz(~sizeof(pgd_t)) 171#define PGD_T_LOG2 (__builtin_ffs(sizeof(pgd_t)) - 1)
172#define PMD_T_LOG2 ffz(~sizeof(pmd_t)) 172#define PMD_T_LOG2 (__builtin_ffs(sizeof(pmd_t)) - 1)
173#define PTE_T_LOG2 ffz(~sizeof(pte_t)) 173#define PTE_T_LOG2 (__builtin_ffs(sizeof(pte_t)) - 1)
174 174
175extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; 175/*
176 * We used to declare this array with size but gcc 3.3 and older are not able
177 * to find that this expression is a constant, so the size is dropped.
178 */
179extern pgd_t swapper_pg_dir[];
176 180
177/* 181/*
178 * The following only work if pte_present() is true. 182 * The following only work if pte_present() is true.
diff --git a/include/asm-mips/sibyte/bcm1480_regs.h b/include/asm-mips/sibyte/bcm1480_regs.h
index 2738c1366f..c34d36b6b8 100644
--- a/include/asm-mips/sibyte/bcm1480_regs.h
+++ b/include/asm-mips/sibyte/bcm1480_regs.h
@@ -227,10 +227,15 @@
227 (A_BCM1480_DUART(chan) + \ 227 (A_BCM1480_DUART(chan) + \
228 BCM1480_DUART_CHANREG_SPACING * 3 + (reg)) 228 BCM1480_DUART_CHANREG_SPACING * 3 + (reg))
229 229
230#define DUART_IMRISR_SPACING 0x20
231#define DUART_INCHNG_SPACING 0x10
232
230#define R_BCM1480_DUART_IMRREG(chan) \ 233#define R_BCM1480_DUART_IMRREG(chan) \
231 (R_DUART_IMR_A + ((chan) & 1) * DUART_IMRISR_SPACING) 234 (R_DUART_IMR_A + ((chan) & 1) * DUART_IMRISR_SPACING)
232#define R_BCM1480_DUART_ISRREG(chan) \ 235#define R_BCM1480_DUART_ISRREG(chan) \
233 (R_DUART_ISR_A + ((chan) & 1) * DUART_IMRISR_SPACING) 236 (R_DUART_ISR_A + ((chan) & 1) * DUART_IMRISR_SPACING)
237#define R_BCM1480_DUART_INCHREG(chan) \
238 (R_DUART_IN_CHNG_A + ((chan) & 1) * DUART_INCHNG_SPACING)
234 239
235#define A_BCM1480_DUART_IMRREG(chan) \ 240#define A_BCM1480_DUART_IMRREG(chan) \
236 (A_BCM1480_DUART_CTRLREG((chan), R_BCM1480_DUART_IMRREG(chan))) 241 (A_BCM1480_DUART_CTRLREG((chan), R_BCM1480_DUART_IMRREG(chan)))
diff --git a/include/asm-mips/smtc.h b/include/asm-mips/smtc.h
index 44dfa4adec..ff3e8936b4 100644
--- a/include/asm-mips/smtc.h
+++ b/include/asm-mips/smtc.h
@@ -55,4 +55,14 @@ extern void smtc_boot_secondary(int cpu, struct task_struct *t);
55 55
56#define PARKED_INDEX ((unsigned int)0x80000000) 56#define PARKED_INDEX ((unsigned int)0x80000000)
57 57
58/*
59 * Define low-level interrupt mask for IPIs, if necessary.
60 * By default, use SW interrupt 1, which requires no external
61 * hardware support, but which works only for single-core
62 * MIPS MT systems.
63 */
64#ifndef MIPS_CPU_IPI_IRQ
65#define MIPS_CPU_IPI_IRQ 1
66#endif
67
58#endif /* _ASM_SMTC_MT_H */ 68#endif /* _ASM_SMTC_MT_H */
diff --git a/include/asm-mips/stacktrace.h b/include/asm-mips/stacktrace.h
index 07f873351a..0bf82818aa 100644
--- a/include/asm-mips/stacktrace.h
+++ b/include/asm-mips/stacktrace.h
@@ -9,7 +9,11 @@ extern unsigned long unwind_stack(struct task_struct *task, unsigned long *sp,
9 unsigned long pc, unsigned long *ra); 9 unsigned long pc, unsigned long *ra);
10#else 10#else
11#define raw_show_trace 1 11#define raw_show_trace 1
12#define unwind_stack(task, sp, pc, ra) 0 12static inline unsigned long unwind_stack(struct task_struct *task,
13 unsigned long *sp, unsigned long pc, unsigned long *ra)
14{
15 return 0;
16}
13#endif 17#endif
14 18
15static __always_inline void prepare_frametrace(struct pt_regs *regs) 19static __always_inline void prepare_frametrace(struct pt_regs *regs)
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h
index 357251f425..480b574e24 100644
--- a/include/asm-mips/system.h
+++ b/include/asm-mips/system.h
@@ -17,6 +17,7 @@
17 17
18#include <asm/addrspace.h> 18#include <asm/addrspace.h>
19#include <asm/barrier.h> 19#include <asm/barrier.h>
20#include <asm/cmpxchg.h>
20#include <asm/cpu-features.h> 21#include <asm/cpu-features.h>
21#include <asm/dsp.h> 22#include <asm/dsp.h>
22#include <asm/war.h> 23#include <asm/war.h>
@@ -194,266 +195,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
194 195
195#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) 196#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
196 197
197#define __HAVE_ARCH_CMPXCHG 1
198
199static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old,
200 unsigned long new)
201{
202 __u32 retval;
203
204 if (cpu_has_llsc && R10000_LLSC_WAR) {
205 __asm__ __volatile__(
206 " .set push \n"
207 " .set noat \n"
208 " .set mips3 \n"
209 "1: ll %0, %2 # __cmpxchg_u32 \n"
210 " bne %0, %z3, 2f \n"
211 " .set mips0 \n"
212 " move $1, %z4 \n"
213 " .set mips3 \n"
214 " sc $1, %1 \n"
215 " beqzl $1, 1b \n"
216 "2: \n"
217 " .set pop \n"
218 : "=&r" (retval), "=R" (*m)
219 : "R" (*m), "Jr" (old), "Jr" (new)
220 : "memory");
221 } else if (cpu_has_llsc) {
222 __asm__ __volatile__(
223 " .set push \n"
224 " .set noat \n"
225 " .set mips3 \n"
226 "1: ll %0, %2 # __cmpxchg_u32 \n"
227 " bne %0, %z3, 2f \n"
228 " .set mips0 \n"
229 " move $1, %z4 \n"
230 " .set mips3 \n"
231 " sc $1, %1 \n"
232 " beqz $1, 3f \n"
233 "2: \n"
234 " .subsection 2 \n"
235 "3: b 1b \n"
236 " .previous \n"
237 " .set pop \n"
238 : "=&r" (retval), "=R" (*m)
239 : "R" (*m), "Jr" (old), "Jr" (new)
240 : "memory");
241 } else {
242 unsigned long flags;
243
244 raw_local_irq_save(flags);
245 retval = *m;
246 if (retval == old)
247 *m = new;
248 raw_local_irq_restore(flags); /* implies memory barrier */
249 }
250
251 smp_llsc_mb();
252
253 return retval;
254}
255
256static inline unsigned long __cmpxchg_u32_local(volatile int * m,
257 unsigned long old, unsigned long new)
258{
259 __u32 retval;
260
261 if (cpu_has_llsc && R10000_LLSC_WAR) {
262 __asm__ __volatile__(
263 " .set push \n"
264 " .set noat \n"
265 " .set mips3 \n"
266 "1: ll %0, %2 # __cmpxchg_u32 \n"
267 " bne %0, %z3, 2f \n"
268 " .set mips0 \n"
269 " move $1, %z4 \n"
270 " .set mips3 \n"
271 " sc $1, %1 \n"
272 " beqzl $1, 1b \n"
273 "2: \n"
274 " .set pop \n"
275 : "=&r" (retval), "=R" (*m)
276 : "R" (*m), "Jr" (old), "Jr" (new)
277 : "memory");
278 } else if (cpu_has_llsc) {
279 __asm__ __volatile__(
280 " .set push \n"
281 " .set noat \n"
282 " .set mips3 \n"
283 "1: ll %0, %2 # __cmpxchg_u32 \n"
284 " bne %0, %z3, 2f \n"
285 " .set mips0 \n"
286 " move $1, %z4 \n"
287 " .set mips3 \n"
288 " sc $1, %1 \n"
289 " beqz $1, 1b \n"
290 "2: \n"
291 " .set pop \n"
292 : "=&r" (retval), "=R" (*m)
293 : "R" (*m), "Jr" (old), "Jr" (new)
294 : "memory");
295 } else {
296 unsigned long flags;
297
298 local_irq_save(flags);
299 retval = *m;
300 if (retval == old)
301 *m = new;
302 local_irq_restore(flags); /* implies memory barrier */
303 }
304
305 return retval;
306}
307
308#ifdef CONFIG_64BIT
309static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old,
310 unsigned long new)
311{
312 __u64 retval;
313
314 if (cpu_has_llsc && R10000_LLSC_WAR) {
315 __asm__ __volatile__(
316 " .set push \n"
317 " .set noat \n"
318 " .set mips3 \n"
319 "1: lld %0, %2 # __cmpxchg_u64 \n"
320 " bne %0, %z3, 2f \n"
321 " move $1, %z4 \n"
322 " scd $1, %1 \n"
323 " beqzl $1, 1b \n"
324 "2: \n"
325 " .set pop \n"
326 : "=&r" (retval), "=R" (*m)
327 : "R" (*m), "Jr" (old), "Jr" (new)
328 : "memory");
329 } else if (cpu_has_llsc) {
330 __asm__ __volatile__(
331 " .set push \n"
332 " .set noat \n"
333 " .set mips3 \n"
334 "1: lld %0, %2 # __cmpxchg_u64 \n"
335 " bne %0, %z3, 2f \n"
336 " move $1, %z4 \n"
337 " scd $1, %1 \n"
338 " beqz $1, 3f \n"
339 "2: \n"
340 " .subsection 2 \n"
341 "3: b 1b \n"
342 " .previous \n"
343 " .set pop \n"
344 : "=&r" (retval), "=R" (*m)
345 : "R" (*m), "Jr" (old), "Jr" (new)
346 : "memory");
347 } else {
348 unsigned long flags;
349
350 raw_local_irq_save(flags);
351 retval = *m;
352 if (retval == old)
353 *m = new;
354 raw_local_irq_restore(flags); /* implies memory barrier */
355 }
356
357 smp_llsc_mb();
358
359 return retval;
360}
361
362static inline unsigned long __cmpxchg_u64_local(volatile int * m,
363 unsigned long old, unsigned long new)
364{
365 __u64 retval;
366
367 if (cpu_has_llsc && R10000_LLSC_WAR) {
368 __asm__ __volatile__(
369 " .set push \n"
370 " .set noat \n"
371 " .set mips3 \n"
372 "1: lld %0, %2 # __cmpxchg_u64 \n"
373 " bne %0, %z3, 2f \n"
374 " move $1, %z4 \n"
375 " scd $1, %1 \n"
376 " beqzl $1, 1b \n"
377 "2: \n"
378 " .set pop \n"
379 : "=&r" (retval), "=R" (*m)
380 : "R" (*m), "Jr" (old), "Jr" (new)
381 : "memory");
382 } else if (cpu_has_llsc) {
383 __asm__ __volatile__(
384 " .set push \n"
385 " .set noat \n"
386 " .set mips3 \n"
387 "1: lld %0, %2 # __cmpxchg_u64 \n"
388 " bne %0, %z3, 2f \n"
389 " move $1, %z4 \n"
390 " scd $1, %1 \n"
391 " beqz $1, 1b \n"
392 "2: \n"
393 " .set pop \n"
394 : "=&r" (retval), "=R" (*m)
395 : "R" (*m), "Jr" (old), "Jr" (new)
396 : "memory");
397 } else {
398 unsigned long flags;
399
400 local_irq_save(flags);
401 retval = *m;
402 if (retval == old)
403 *m = new;
404 local_irq_restore(flags); /* implies memory barrier */
405 }
406
407 return retval;
408}
409
410#else
411extern unsigned long __cmpxchg_u64_unsupported_on_32bit_kernels(
412 volatile int * m, unsigned long old, unsigned long new);
413#define __cmpxchg_u64 __cmpxchg_u64_unsupported_on_32bit_kernels
414extern unsigned long __cmpxchg_u64_local_unsupported_on_32bit_kernels(
415 volatile int * m, unsigned long old, unsigned long new);
416#define __cmpxchg_u64_local __cmpxchg_u64_local_unsupported_on_32bit_kernels
417#endif
418
419/* This function doesn't exist, so you'll get a linker error
420 if something tries to do an invalid cmpxchg(). */
421extern void __cmpxchg_called_with_bad_pointer(void);
422
423static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old,
424 unsigned long new, int size)
425{
426 switch (size) {
427 case 4:
428 return __cmpxchg_u32(ptr, old, new);
429 case 8:
430 return __cmpxchg_u64(ptr, old, new);
431 }
432 __cmpxchg_called_with_bad_pointer();
433 return old;
434}
435
436static inline unsigned long __cmpxchg_local(volatile void * ptr,
437 unsigned long old, unsigned long new, int size)
438{
439 switch (size) {
440 case 4:
441 return __cmpxchg_u32_local(ptr, old, new);
442 case 8:
443 return __cmpxchg_u64_local(ptr, old, new);
444 }
445 __cmpxchg_called_with_bad_pointer();
446 return old;
447}
448
449#define cmpxchg(ptr,old,new) \
450 ((__typeof__(*(ptr)))__cmpxchg((ptr), \
451 (unsigned long)(old), (unsigned long)(new),sizeof(*(ptr))))
452
453#define cmpxchg_local(ptr,old,new) \
454 ((__typeof__(*(ptr)))__cmpxchg_local((ptr), \
455 (unsigned long)(old), (unsigned long)(new),sizeof(*(ptr))))
456
457extern void set_handler (unsigned long offset, void *addr, unsigned long len); 198extern void set_handler (unsigned long offset, void *addr, unsigned long len);
458extern void set_uncached_handler (unsigned long offset, void *addr, unsigned long len); 199extern void set_uncached_handler (unsigned long offset, void *addr, unsigned long len);
459 200
diff --git a/include/asm-mips/termbits.h b/include/asm-mips/termbits.h
index 5bfdc3b645..c83c68444e 100644
--- a/include/asm-mips/termbits.h
+++ b/include/asm-mips/termbits.h
@@ -164,6 +164,7 @@ struct ktermios {
164#define HUPCL 0002000 /* Hang up on last close. */ 164#define HUPCL 0002000 /* Hang up on last close. */
165#define CLOCAL 0004000 /* Ignore modem status lines. */ 165#define CLOCAL 0004000 /* Ignore modem status lines. */
166#define CBAUDEX 0010000 166#define CBAUDEX 0010000
167#define BOTHER 0010000
167#define B57600 0010001 168#define B57600 0010001
168#define B115200 0010002 169#define B115200 0010002
169#define B230400 0010003 170#define B230400 0010003
@@ -179,9 +180,11 @@ struct ktermios {
179#define B3000000 0010015 180#define B3000000 0010015
180#define B3500000 0010016 181#define B3500000 0010016
181#define B4000000 0010017 182#define B4000000 0010017
182#define CIBAUD 002003600000 /* input baud rate (not used) */ 183#define CIBAUD 002003600000 /* input baud rate */
183#define CMSPAR 010000000000 /* mark or space (stick) parity */ 184#define CMSPAR 010000000000 /* mark or space (stick) parity */
184#define CRTSCTS 020000000000 /* flow control */ 185#define CRTSCTS 020000000000 /* flow control */
186
187#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
185 188
186/* c_lflag bits */ 189/* c_lflag bits */
187#define ISIG 0000001 /* Enable signals. */ 190#define ISIG 0000001 /* Enable signals. */
diff --git a/include/asm-mips/termios.h b/include/asm-mips/termios.h
index 2ce07f4be3..a275661fa7 100644
--- a/include/asm-mips/termios.h
+++ b/include/asm-mips/termios.h
@@ -122,8 +122,10 @@ struct termio {
122 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ 122 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
123}) 123})
124 124
125#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) 125#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
126#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) 126#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
127#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
128#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
127 129
128#endif /* defined(__KERNEL__) */ 130#endif /* defined(__KERNEL__) */
129 131
diff --git a/include/asm-mips/tx4927/toshiba_rbtx4927.h b/include/asm-mips/tx4927/toshiba_rbtx4927.h
index 5dc40a8677..a60649569c 100644
--- a/include/asm-mips/tx4927/toshiba_rbtx4927.h
+++ b/include/asm-mips/tx4927/toshiba_rbtx4927.h
@@ -50,7 +50,7 @@
50 50
51 51
52#define RBTX4927_RTL_8019_BASE (0x1c020280-TBTX4927_ISA_IO_OFFSET) 52#define RBTX4927_RTL_8019_BASE (0x1c020280-TBTX4927_ISA_IO_OFFSET)
53#define RBTX4927_RTL_8019_IRQ (29) 53#define RBTX4927_RTL_8019_IRQ (TX4927_IRQ_PIC_BEG + 5)
54 54
55int toshiba_rbtx4927_irq_nested(int sw_irq); 55int toshiba_rbtx4927_irq_nested(int sw_irq);
56 56
diff --git a/include/asm-mips/tx4927/tx4927.h b/include/asm-mips/tx4927/tx4927.h
index de85bd2245..4bd4368e18 100644
--- a/include/asm-mips/tx4927/tx4927.h
+++ b/include/asm-mips/tx4927/tx4927.h
@@ -28,6 +28,7 @@
28#define __ASM_TX4927_TX4927_H 28#define __ASM_TX4927_TX4927_H
29 29
30#include <asm/tx4927/tx4927_mips.h> 30#include <asm/tx4927/tx4927_mips.h>
31#include <asm/txx9irq.h>
31 32
32/* 33/*
33 This register naming came from the integrated CPU/controller name TX4927 34 This register naming came from the integrated CPU/controller name TX4927
@@ -421,32 +422,6 @@
421#define TX4927_PIO_LIMIT 0xf50f 422#define TX4927_PIO_LIMIT 0xf50f
422 423
423 424
424/* TX4927 Interrupt Controller (32-bit registers) */
425#define TX4927_IRC_BASE 0xf510
426#define TX4927_IRC_IRFLAG0 0xf510
427#define TX4927_IRC_IRFLAG1 0xf514
428#define TX4927_IRC_IRPOL 0xf518
429#define TX4927_IRC_IRRCNT 0xf51c
430#define TX4927_IRC_IRMASKINT 0xf520
431#define TX4927_IRC_IRMASKEXT 0xf524
432#define TX4927_IRC_IRDEN 0xf600
433#define TX4927_IRC_IRDM0 0xf604
434#define TX4927_IRC_IRDM1 0xf608
435#define TX4927_IRC_IRLVL0 0xf610
436#define TX4927_IRC_IRLVL1 0xf614
437#define TX4927_IRC_IRLVL2 0xf618
438#define TX4927_IRC_IRLVL3 0xf61c
439#define TX4927_IRC_IRLVL4 0xf620
440#define TX4927_IRC_IRLVL5 0xf624
441#define TX4927_IRC_IRLVL6 0xf628
442#define TX4927_IRC_IRLVL7 0xf62c
443#define TX4927_IRC_IRMSK 0xf640
444#define TX4927_IRC_IREDC 0xf660
445#define TX4927_IRC_IRPND 0xf680
446#define TX4927_IRC_IRCS 0xf6a0
447#define TX4927_IRC_LIMIT 0xf6ff
448
449
450/* TX4927 AC-link controller (32-bit registers) */ 425/* TX4927 AC-link controller (32-bit registers) */
451#define TX4927_ACLC_BASE 0xf700 426#define TX4927_ACLC_BASE 0xf700
452#define TX4927_ACLC_ACCTLEN 0xf700 427#define TX4927_ACLC_ACCTLEN 0xf700
@@ -493,25 +468,11 @@
493#define TX4927_WR( reg, val ) TX4927_WR32( reg, val ) 468#define TX4927_WR( reg, val ) TX4927_WR32( reg, val )
494 469
495 470
471#define TX4927_IRQ_CP0_BEG MIPS_CPU_IRQ_BASE
472#define TX4927_IRQ_CP0_END (MIPS_CPU_IRQ_BASE + 8 - 1)
496 473
497 474#define TX4927_IRQ_PIC_BEG TXX9_IRQ_BASE
498 475#define TX4927_IRQ_PIC_END (TXX9_IRQ_BASE + TXx9_MAX_IR - 1)
499#define MI8259_IRQ_ISA_RAW_BEG 0 /* optional backplane i8259 */
500#define MI8259_IRQ_ISA_RAW_END 15
501#define TX4927_IRQ_CP0_RAW_BEG 0 /* tx4927 cpu built-in cp0 */
502#define TX4927_IRQ_CP0_RAW_END 7
503#define TX4927_IRQ_PIC_RAW_BEG 0 /* tx4927 cpu build-in pic */
504#define TX4927_IRQ_PIC_RAW_END 31
505
506
507#define MI8259_IRQ_ISA_BEG MI8259_IRQ_ISA_RAW_BEG /* 0 */
508#define MI8259_IRQ_ISA_END MI8259_IRQ_ISA_RAW_END /* 15 */
509
510#define TX4927_IRQ_CP0_BEG ((MI8259_IRQ_ISA_END+1)+TX4927_IRQ_CP0_RAW_BEG) /* 16 */
511#define TX4927_IRQ_CP0_END ((MI8259_IRQ_ISA_END+1)+TX4927_IRQ_CP0_RAW_END) /* 23 */
512
513#define TX4927_IRQ_PIC_BEG ((TX4927_IRQ_CP0_END+1)+TX4927_IRQ_PIC_RAW_BEG) /* 24 */
514#define TX4927_IRQ_PIC_END ((TX4927_IRQ_CP0_END+1)+TX4927_IRQ_PIC_RAW_END) /* 55 */
515 476
516 477
517#define TX4927_IRQ_USER0 (TX4927_IRQ_CP0_BEG+0) 478#define TX4927_IRQ_USER0 (TX4927_IRQ_CP0_BEG+0)
diff --git a/include/asm-mips/tx4927/tx4927_pci.h b/include/asm-mips/tx4927/tx4927_pci.h
index 66c064690f..f98b2bb719 100644
--- a/include/asm-mips/tx4927/tx4927_pci.h
+++ b/include/asm-mips/tx4927/tx4927_pci.h
@@ -48,7 +48,7 @@
48#define TX4927_PCI_CLK_ACK 0x04 48#define TX4927_PCI_CLK_ACK 0x04
49#define TX4927_PCI_CLK_ACE 0x02 49#define TX4927_PCI_CLK_ACE 0x02
50#define TX4927_PCI_CLK_ENDIAN 0x01 50#define TX4927_PCI_CLK_ENDIAN 0x01
51#define TX4927_NR_IRQ_LOCAL (8+16) 51#define TX4927_NR_IRQ_LOCAL TX4927_IRQ_PIC_BEG
52#define TX4927_NR_IRQ_IRC 32 /* On-Chip IRC */ 52#define TX4927_NR_IRQ_IRC 32 /* On-Chip IRC */
53 53
54#define TX4927_IR_PCIC 16 54#define TX4927_IR_PCIC 16
@@ -99,21 +99,6 @@ struct tx4927_ccfg_reg {
99 volatile unsigned long long ramp; 99 volatile unsigned long long ramp;
100}; 100};
101 101
102struct tx4927_irc_reg {
103 volatile unsigned long cer;
104 volatile unsigned long cr[2];
105 volatile unsigned long unused0;
106 volatile unsigned long ilr[8];
107 volatile unsigned long unused1[4];
108 volatile unsigned long imr;
109 volatile unsigned long unused2[7];
110 volatile unsigned long scr;
111 volatile unsigned long unused3[7];
112 volatile unsigned long ssr;
113 volatile unsigned long unused4[7];
114 volatile unsigned long csr;
115};
116
117struct tx4927_pcic_reg { 102struct tx4927_pcic_reg {
118 volatile unsigned long pciid; 103 volatile unsigned long pciid;
119 volatile unsigned long pcistatus; 104 volatile unsigned long pcistatus;
@@ -182,11 +167,6 @@ struct tx4927_pcic_reg {
182 167
183#endif /* _LANGUAGE_ASSEMBLY */ 168#endif /* _LANGUAGE_ASSEMBLY */
184 169
185/* IRCSR : Int. Current Status */
186#define TX4927_IRCSR_IF 0x00010000
187#define TX4927_IRCSR_ILV_MASK 0x00000700
188#define TX4927_IRCSR_IVL_MASK 0x0000001f
189
190/* 170/*
191 * PCIC 171 * PCIC
192 */ 172 */
@@ -278,7 +258,6 @@ struct tx4927_pcic_reg {
278#define tx4927_pcicptr ((struct tx4927_pcic_reg *)TX4927_PCIC_REG) 258#define tx4927_pcicptr ((struct tx4927_pcic_reg *)TX4927_PCIC_REG)
279#define tx4927_ccfgptr ((struct tx4927_ccfg_reg *)TX4927_CCFG_REG) 259#define tx4927_ccfgptr ((struct tx4927_ccfg_reg *)TX4927_CCFG_REG)
280#define tx4927_ebuscptr ((struct tx4927_ebusc_reg *)TX4927_EBUSC_REG) 260#define tx4927_ebuscptr ((struct tx4927_ebusc_reg *)TX4927_EBUSC_REG)
281#define tx4927_ircptr ((struct tx4927_irc_reg *)TX4927_IRC_REG)
282 261
283#endif /* _LANGUAGE_ASSEMBLY */ 262#endif /* _LANGUAGE_ASSEMBLY */
284 263
diff --git a/include/asm-mips/tx4938/rbtx4938.h b/include/asm-mips/tx4938/rbtx4938.h
index 74e7d8061e..b14acb575b 100644
--- a/include/asm-mips/tx4938/rbtx4938.h
+++ b/include/asm-mips/tx4938/rbtx4938.h
@@ -14,6 +14,7 @@
14 14
15#include <asm/addrspace.h> 15#include <asm/addrspace.h>
16#include <asm/tx4938/tx4938.h> 16#include <asm/tx4938/tx4938.h>
17#include <asm/txx9irq.h>
17 18
18/* CS */ 19/* CS */
19#define RBTX4938_CE0 0x1c000000 /* 64M */ 20#define RBTX4938_CE0 0x1c000000 /* 64M */
@@ -123,21 +124,11 @@
123#define RBTX4938_NR_IRQ_IRC 32 /* On-Chip IRC */ 124#define RBTX4938_NR_IRQ_IRC 32 /* On-Chip IRC */
124#define RBTX4938_NR_IRQ_IOC 8 125#define RBTX4938_NR_IRQ_IOC 8
125 126
126#define MI8259_IRQ_ISA_RAW_BEG 0 /* optional backplane i8259 */ 127#define TX4938_IRQ_CP0_BEG MIPS_CPU_IRQ_BASE
127#define MI8259_IRQ_ISA_RAW_END 15 128#define TX4938_IRQ_CP0_END (MIPS_CPU_IRQ_BASE + 8 - 1)
128#define TX4938_IRQ_CP0_RAW_BEG 0 /* tx4938 cpu built-in cp0 */
129#define TX4938_IRQ_CP0_RAW_END 7
130#define TX4938_IRQ_PIC_RAW_BEG 0 /* tx4938 cpu build-in pic */
131#define TX4938_IRQ_PIC_RAW_END 31
132 129
133#define MI8259_IRQ_ISA_BEG MI8259_IRQ_ISA_RAW_BEG /* 0 */ 130#define TX4938_IRQ_PIC_BEG TXX9_IRQ_BASE
134#define MI8259_IRQ_ISA_END MI8259_IRQ_ISA_RAW_END /* 15 */ 131#define TX4938_IRQ_PIC_END (TXX9_IRQ_BASE + TXx9_MAX_IR - 1)
135
136#define TX4938_IRQ_CP0_BEG ((MI8259_IRQ_ISA_END+1)+TX4938_IRQ_CP0_RAW_BEG) /* 16 */
137#define TX4938_IRQ_CP0_END ((MI8259_IRQ_ISA_END+1)+TX4938_IRQ_CP0_RAW_END) /* 23 */
138
139#define TX4938_IRQ_PIC_BEG ((TX4938_IRQ_CP0_END+1)+TX4938_IRQ_PIC_RAW_BEG) /* 24 */
140#define TX4938_IRQ_PIC_END ((TX4938_IRQ_CP0_END+1)+TX4938_IRQ_PIC_RAW_END) /* 55 */
141#define TX4938_IRQ_NEST_EXT_ON_PIC (TX4938_IRQ_PIC_BEG+2) 132#define TX4938_IRQ_NEST_EXT_ON_PIC (TX4938_IRQ_PIC_BEG+2)
142#define TX4938_IRQ_NEST_PIC_ON_CP0 (TX4938_IRQ_CP0_BEG+2) 133#define TX4938_IRQ_NEST_PIC_ON_CP0 (TX4938_IRQ_CP0_BEG+2)
143#define TX4938_IRQ_USER0 (TX4938_IRQ_CP0_BEG+0) 134#define TX4938_IRQ_USER0 (TX4938_IRQ_CP0_BEG+0)
@@ -192,10 +183,4 @@
192#define RBTX4938_RTL_8019_BASE (RBTX4938_ETHER_ADDR - mips_io_port_base) 183#define RBTX4938_RTL_8019_BASE (RBTX4938_ETHER_ADDR - mips_io_port_base)
193#define RBTX4938_RTL_8019_IRQ (RBTX4938_IRQ_ETHER) 184#define RBTX4938_RTL_8019_IRQ (RBTX4938_IRQ_ETHER)
194 185
195/* IRCR : Int. Control */
196#define TX4938_IRCR_LOW 0x00000000
197#define TX4938_IRCR_HIGH 0x00000001
198#define TX4938_IRCR_DOWN 0x00000002
199#define TX4938_IRCR_UP 0x00000003
200
201#endif /* __ASM_TX_BOARDS_RBTX4938_H */ 186#endif /* __ASM_TX_BOARDS_RBTX4938_H */
diff --git a/include/asm-mips/tx4938/tx4938.h b/include/asm-mips/tx4938/tx4938.h
index e25b1a0975..afdb19813c 100644
--- a/include/asm-mips/tx4938/tx4938.h
+++ b/include/asm-mips/tx4938/tx4938.h
@@ -272,20 +272,6 @@ struct tx4938_pio_reg {
272 volatile unsigned long maskcpu; 272 volatile unsigned long maskcpu;
273 volatile unsigned long maskext; 273 volatile unsigned long maskext;
274}; 274};
275struct tx4938_irc_reg {
276 volatile unsigned long cer;
277 volatile unsigned long cr[2];
278 volatile unsigned long unused0;
279 volatile unsigned long ilr[8];
280 volatile unsigned long unused1[4];
281 volatile unsigned long imr;
282 volatile unsigned long unused2[7];
283 volatile unsigned long scr;
284 volatile unsigned long unused3[7];
285 volatile unsigned long ssr;
286 volatile unsigned long unused4[7];
287 volatile unsigned long csr;
288};
289 275
290struct tx4938_ndfmc_reg { 276struct tx4938_ndfmc_reg {
291 endian_def_l2(unused0, dtr); 277 endian_def_l2(unused0, dtr);
@@ -646,39 +632,12 @@ struct tx4938_ccfg_reg {
646#define TX4938_DMA_CSR_DESERR 0x00000002 632#define TX4938_DMA_CSR_DESERR 0x00000002
647#define TX4938_DMA_CSR_SORERR 0x00000001 633#define TX4938_DMA_CSR_SORERR 0x00000001
648 634
649/* TX4938 Interrupt Controller (32-bit registers) */
650#define TX4938_IRC_BASE 0xf510
651#define TX4938_IRC_IRFLAG0 0xf510
652#define TX4938_IRC_IRFLAG1 0xf514
653#define TX4938_IRC_IRPOL 0xf518
654#define TX4938_IRC_IRRCNT 0xf51c
655#define TX4938_IRC_IRMASKINT 0xf520
656#define TX4938_IRC_IRMASKEXT 0xf524
657#define TX4938_IRC_IRDEN 0xf600
658#define TX4938_IRC_IRDM0 0xf604
659#define TX4938_IRC_IRDM1 0xf608
660#define TX4938_IRC_IRLVL0 0xf610
661#define TX4938_IRC_IRLVL1 0xf614
662#define TX4938_IRC_IRLVL2 0xf618
663#define TX4938_IRC_IRLVL3 0xf61c
664#define TX4938_IRC_IRLVL4 0xf620
665#define TX4938_IRC_IRLVL5 0xf624
666#define TX4938_IRC_IRLVL6 0xf628
667#define TX4938_IRC_IRLVL7 0xf62c
668#define TX4938_IRC_IRMSK 0xf640
669#define TX4938_IRC_IREDC 0xf660
670#define TX4938_IRC_IRPND 0xf680
671#define TX4938_IRC_IRCS 0xf6a0
672#define TX4938_IRC_LIMIT 0xf6ff
673
674
675#ifndef __ASSEMBLY__ 635#ifndef __ASSEMBLY__
676 636
677#define tx4938_sdramcptr ((struct tx4938_sdramc_reg *)TX4938_SDRAMC_REG) 637#define tx4938_sdramcptr ((struct tx4938_sdramc_reg *)TX4938_SDRAMC_REG)
678#define tx4938_ebuscptr ((struct tx4938_ebusc_reg *)TX4938_EBUSC_REG) 638#define tx4938_ebuscptr ((struct tx4938_ebusc_reg *)TX4938_EBUSC_REG)
679#define tx4938_dmaptr(ch) ((struct tx4938_dma_reg *)TX4938_DMA_REG(ch)) 639#define tx4938_dmaptr(ch) ((struct tx4938_dma_reg *)TX4938_DMA_REG(ch))
680#define tx4938_ndfmcptr ((struct tx4938_ndfmc_reg *)TX4938_NDFMC_REG) 640#define tx4938_ndfmcptr ((struct tx4938_ndfmc_reg *)TX4938_NDFMC_REG)
681#define tx4938_ircptr ((struct tx4938_irc_reg *)TX4938_IRC_REG)
682#define tx4938_pcicptr ((struct tx4938_pcic_reg *)TX4938_PCIC_REG) 641#define tx4938_pcicptr ((struct tx4938_pcic_reg *)TX4938_PCIC_REG)
683#define tx4938_pcic1ptr ((struct tx4938_pcic_reg *)TX4938_PCIC1_REG) 642#define tx4938_pcic1ptr ((struct tx4938_pcic_reg *)TX4938_PCIC1_REG)
684#define tx4938_ccfgptr ((struct tx4938_ccfg_reg *)TX4938_CCFG_REG) 643#define tx4938_ccfgptr ((struct tx4938_ccfg_reg *)TX4938_CCFG_REG)
diff --git a/include/asm-mips/txx9irq.h b/include/asm-mips/txx9irq.h
new file mode 100644
index 0000000000..1c439e51b8
--- /dev/null
+++ b/include/asm-mips/txx9irq.h
@@ -0,0 +1,30 @@
1/*
2 * include/asm-mips/txx9irq.h
3 * TX39/TX49 interrupt controller definitions.
4 *
5 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file "COPYING" in the main directory of this archive
7 * for more details.
8 */
9#ifndef __ASM_TXX9IRQ_H
10#define __ASM_TXX9IRQ_H
11
12#include <irq.h>
13
14#ifdef CONFIG_IRQ_CPU
15#define TXX9_IRQ_BASE (MIPS_CPU_IRQ_BASE + 8)
16#else
17#define TXX9_IRQ_BASE 0
18#endif
19
20#ifdef CONFIG_CPU_TX39XX
21#define TXx9_MAX_IR 16
22#else
23#define TXx9_MAX_IR 32
24#endif
25
26void txx9_irq_init(unsigned long baseaddr);
27int txx9_irq(void);
28int txx9_irq_set_pri(int irc_irq, int new_pri);
29
30#endif /* __ASM_TXX9IRQ_H */
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h
index c0fed91da3..4cc9bcec05 100644
--- a/include/asm-parisc/io.h
+++ b/include/asm-parisc/io.h
@@ -15,6 +15,16 @@ extern unsigned long parisc_vmerge_max_size;
15#define virt_to_bus virt_to_phys 15#define virt_to_bus virt_to_phys
16#define bus_to_virt phys_to_virt 16#define bus_to_virt phys_to_virt
17 17
18static inline unsigned long isa_bus_to_virt(unsigned long addr) {
19 BUG();
20 return 0;
21}
22
23static inline unsigned long isa_virt_to_bus(void *addr) {
24 BUG();
25 return 0;
26}
27
18/* 28/*
19 * Memory mapped I/O 29 * Memory mapped I/O
20 * 30 *
diff --git a/include/asm-parisc/vga.h b/include/asm-parisc/vga.h
new file mode 100644
index 0000000000..154a84c843
--- /dev/null
+++ b/include/asm-parisc/vga.h
@@ -0,0 +1,6 @@
1#ifndef __ASM_PARISC_VGA_H__
2#define __ASM_PARISC_VGA_H__
3
4/* nothing */
5
6#endif __ASM_PARISC_VGA_H__
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index 8836c0f1f2..5bde3980bf 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -130,6 +130,7 @@ struct spu {
130 u64 flags; 130 u64 flags;
131 u64 dar; 131 u64 dar;
132 u64 dsisr; 132 u64 dsisr;
133 u64 class_0_pending;
133 size_t ls_size; 134 size_t ls_size;
134 unsigned int slb_replace; 135 unsigned int slb_replace;
135 struct mm_struct *mm; 136 struct mm_struct *mm;
@@ -138,7 +139,6 @@ struct spu {
138 unsigned long long timestamp; 139 unsigned long long timestamp;
139 pid_t pid; 140 pid_t pid;
140 pid_t tgid; 141 pid_t tgid;
141 int class_0_pending;
142 spinlock_t register_lock; 142 spinlock_t register_lock;
143 143
144 void (* wbox_callback)(struct spu *spu); 144 void (* wbox_callback)(struct spu *spu);
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h
index d7f5ddfbaa..c104c15c66 100644
--- a/include/asm-powerpc/time.h
+++ b/include/asm-powerpc/time.h
@@ -149,6 +149,11 @@ static inline u64 get_tb(void)
149} 149}
150#endif /* !CONFIG_PPC64 */ 150#endif /* !CONFIG_PPC64 */
151 151
152static inline u64 get_tb_or_rtc(void)
153{
154 return __USE_RTC() ? get_rtc() : get_tb();
155}
156
152static inline void set_tb(unsigned int upper, unsigned int lower) 157static inline void set_tb(unsigned int upper, unsigned int lower)
153{ 158{
154 mtspr(SPRN_TBWL, 0); 159 mtspr(SPRN_TBWL, 0);
diff --git a/include/asm-sh/flat.h b/include/asm-sh/flat.h
index 0d5cc04ab0..dc4f5950da 100644
--- a/include/asm-sh/flat.h
+++ b/include/asm-sh/flat.h
@@ -16,8 +16,9 @@
16#define flat_argvp_envp_on_stack() 0 16#define flat_argvp_envp_on_stack() 0
17#define flat_old_ram_flag(flags) (flags) 17#define flat_old_ram_flag(flags) (flags)
18#define flat_reloc_valid(reloc, size) ((reloc) <= (size)) 18#define flat_reloc_valid(reloc, size) ((reloc) <= (size))
19#define flat_get_addr_from_rp(rp, relval, flags) get_unaligned(rp) 19#define flat_get_addr_from_rp(rp, relval, flags, p) get_unaligned(rp)
20#define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) 20#define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp)
21#define flat_get_relocate_addr(rel) (rel) 21#define flat_get_relocate_addr(rel) (rel)
22#define flat_set_persistent(relval, p) 0
22 23
23#endif /* __ASM_SH_FLAT_H */ 24#endif /* __ASM_SH_FLAT_H */
diff --git a/include/asm-sparc/tlbflush.h b/include/asm-sparc/tlbflush.h
index 4a3b66618e..a619da5cfa 100644
--- a/include/asm-sparc/tlbflush.h
+++ b/include/asm-sparc/tlbflush.h
@@ -57,6 +57,10 @@ BTFIXUPDEF_CALL(void, flush_tlb_page, struct vm_area_struct *, unsigned long)
57/* 57/*
58 * This is a kludge, until I know better. --zaitcev XXX 58 * This is a kludge, until I know better. --zaitcev XXX
59 */ 59 */
60#define flush_tlb_kernel_range(start, end) flush_tlb_all() 60static inline void flush_tlb_kernel_range(unsigned long start,
61 unsigned long end)
62{
63 flush_tlb_all();
64}
61 65
62#endif /* _SPARC_TLBFLUSH_H */ 66#endif /* _SPARC_TLBFLUSH_H */
diff --git a/include/asm-sparc64/device.h b/include/asm-sparc64/device.h
index d5a4559b95..5111e8717b 100644
--- a/include/asm-sparc64/device.h
+++ b/include/asm-sparc64/device.h
@@ -16,8 +16,6 @@ struct dev_archdata {
16 16
17 struct device_node *prom_node; 17 struct device_node *prom_node;
18 struct of_device *op; 18 struct of_device *op;
19
20 unsigned int msi_num;
21}; 19};
22 20
23#endif /* _ASM_SPARC64_DEVICE_H */ 21#endif /* _ASM_SPARC64_DEVICE_H */
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h
index e6c436ef93..c00ad15277 100644
--- a/include/asm-sparc64/irq.h
+++ b/include/asm-sparc64/irq.h
@@ -16,21 +16,21 @@
16#include <asm/ptrace.h> 16#include <asm/ptrace.h>
17 17
18/* IMAP/ICLR register defines */ 18/* IMAP/ICLR register defines */
19#define IMAP_VALID 0x80000000 /* IRQ Enabled */ 19#define IMAP_VALID 0x80000000UL /* IRQ Enabled */
20#define IMAP_TID_UPA 0x7c000000 /* UPA TargetID */ 20#define IMAP_TID_UPA 0x7c000000UL /* UPA TargetID */
21#define IMAP_TID_JBUS 0x7c000000 /* JBUS TargetID */ 21#define IMAP_TID_JBUS 0x7c000000UL /* JBUS TargetID */
22#define IMAP_TID_SHIFT 26 22#define IMAP_TID_SHIFT 26
23#define IMAP_AID_SAFARI 0x7c000000 /* Safari AgentID */ 23#define IMAP_AID_SAFARI 0x7c000000UL /* Safari AgentID */
24#define IMAP_AID_SHIFT 26 24#define IMAP_AID_SHIFT 26
25#define IMAP_NID_SAFARI 0x03e00000 /* Safari NodeID */ 25#define IMAP_NID_SAFARI 0x03e00000UL /* Safari NodeID */
26#define IMAP_NID_SHIFT 21 26#define IMAP_NID_SHIFT 21
27#define IMAP_IGN 0x000007c0 /* IRQ Group Number */ 27#define IMAP_IGN 0x000007c0UL /* IRQ Group Number */
28#define IMAP_INO 0x0000003f /* IRQ Number */ 28#define IMAP_INO 0x0000003fUL /* IRQ Number */
29#define IMAP_INR 0x000007ff /* Full interrupt number*/ 29#define IMAP_INR 0x000007ffUL /* Full interrupt number*/
30 30
31#define ICLR_IDLE 0x00000000 /* Idle state */ 31#define ICLR_IDLE 0x00000000UL /* Idle state */
32#define ICLR_TRANSMIT 0x00000001 /* Transmit state */ 32#define ICLR_TRANSMIT 0x00000001UL /* Transmit state */
33#define ICLR_PENDING 0x00000003 /* Pending state */ 33#define ICLR_PENDING 0x00000003UL /* Pending state */
34 34
35/* The largest number of unique interrupt sources we support. 35/* The largest number of unique interrupt sources we support.
36 * If this needs to ever be larger than 255, you need to change 36 * If this needs to ever be larger than 255, you need to change
@@ -53,6 +53,9 @@ extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p,
53extern void sun4v_destroy_msi(unsigned int virt_irq); 53extern void sun4v_destroy_msi(unsigned int virt_irq);
54extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); 54extern unsigned int sbus_build_irq(void *sbus, unsigned int ino);
55 55
56extern void sparc64_set_msi(unsigned int virt_irq, u32 msi);
57extern u32 sparc64_get_msi(unsigned int virt_irq);
58
56extern void fixup_irqs(void); 59extern void fixup_irqs(void);
57 60
58static __inline__ void set_softint(unsigned long bits) 61static __inline__ void set_softint(unsigned long bits)
diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h
index 86dc5c018a..55c5bb27e4 100644
--- a/include/asm-sparc64/oplib.h
+++ b/include/asm-sparc64/oplib.h
@@ -297,11 +297,7 @@ extern void prom_sun4v_guest_soft_state(void);
297extern int prom_ihandle2path(int handle, char *buffer, int bufsize); 297extern int prom_ihandle2path(int handle, char *buffer, int bufsize);
298 298
299/* Client interface level routines. */ 299/* Client interface level routines. */
300extern void prom_set_trap_table(unsigned long tba);
301extern void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa);
302
303extern long p1275_cmd(const char *, long, ...); 300extern long p1275_cmd(const char *, long, ...);
304
305 301
306#if 0 302#if 0
307#define P1275_SIZE(x) ((((long)((x) / 32)) << 32) | (x)) 303#define P1275_SIZE(x) ((((long)((x) / 32)) << 32) | (x))
diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S
index e3f010bd12..cb0248616d 100644
--- a/include/asm-um/common.lds.S
+++ b/include/asm-um/common.lds.S
@@ -16,82 +16,112 @@
16 16
17 . = ALIGN(4096); 17 . = ALIGN(4096);
18 .note : { *(.note.*) } 18 .note : { *(.note.*) }
19 __start___ex_table = .; 19 __ex_table : {
20 __ex_table : { *(__ex_table) } 20 __start___ex_table = .;
21 __stop___ex_table = .; 21 *(__ex_table)
22 __stop___ex_table = .;
23 }
22 24
23 BUG_TABLE 25 BUG_TABLE
24 26
25 __uml_setup_start = .; 27 .uml.setup.init : {
26 .uml.setup.init : { *(.uml.setup.init) } 28 __uml_setup_start = .;
27 __uml_setup_end = .; 29 *(.uml.setup.init)
30 __uml_setup_end = .;
31 }
28 32
29 __uml_help_start = .; 33 .uml.help.init : {
30 .uml.help.init : { *(.uml.help.init) } 34 __uml_help_start = .;
31 __uml_help_end = .; 35 *(.uml.help.init)
36 __uml_help_end = .;
37 }
32 38
33 __uml_postsetup_start = .; 39 .uml.postsetup.init : {
34 .uml.postsetup.init : { *(.uml.postsetup.init) } 40 __uml_postsetup_start = .;
35 __uml_postsetup_end = .; 41 *(.uml.postsetup.init)
42 __uml_postsetup_end = .;
43 }
36 44
37 __setup_start = .; 45 .init.setup : {
38 .init.setup : { *(.init.setup) } 46 __setup_start = .;
39 __setup_end = .; 47 *(.init.setup)
48 __setup_end = .;
49 }
40 50
41 . = ALIGN(32); 51 . = ALIGN(32);
42 __per_cpu_start = . ; 52 .data.percpu : {
43 .data.percpu : { *(.data.percpu) } 53 __per_cpu_start = . ;
44 __per_cpu_end = . ; 54 *(.data.percpu)
55 __per_cpu_end = . ;
56 }
45 57
46 __initcall_start = .;
47 .initcall.init : { 58 .initcall.init : {
59 __initcall_start = .;
48 INITCALLS 60 INITCALLS
61 __initcall_end = .;
49 } 62 }
50 __initcall_end = .;
51 63
52 __con_initcall_start = .; 64 .con_initcall.init : {
53 .con_initcall.init : { *(.con_initcall.init) } 65 __con_initcall_start = .;
54 __con_initcall_end = .; 66 *(.con_initcall.init)
67 __con_initcall_end = .;
68 }
55 69
56 __uml_initcall_start = .; 70 .uml.initcall.init : {
57 .uml.initcall.init : { *(.uml.initcall.init) } 71 __uml_initcall_start = .;
58 __uml_initcall_end = .; 72 *(.uml.initcall.init)
73 __uml_initcall_end = .;
74 }
59 __init_end = .; 75 __init_end = .;
60 76
61 SECURITY_INIT 77 SECURITY_INIT
62 78
63 __exitcall_begin = .; 79 .exitcall : {
64 .exitcall : { *(.exitcall.exit) } 80 __exitcall_begin = .;
65 __exitcall_end = .; 81 *(.exitcall.exit)
82 __exitcall_end = .;
83 }
66 84
67 __uml_exitcall_begin = .; 85 .uml.exitcall : {
68 .uml.exitcall : { *(.uml.exitcall.exit) } 86 __uml_exitcall_begin = .;
69 __uml_exitcall_end = .; 87 *(.uml.exitcall.exit)
88 __uml_exitcall_end = .;
89 }
70 90
71 . = ALIGN(4); 91 . = ALIGN(4);
72 __alt_instructions = .; 92 .altinstructions : {
73 .altinstructions : { *(.altinstructions) } 93 __alt_instructions = .;
74 __alt_instructions_end = .; 94 *(.altinstructions)
95 __alt_instructions_end = .;
96 }
75 .altinstr_replacement : { *(.altinstr_replacement) } 97 .altinstr_replacement : { *(.altinstr_replacement) }
76 /* .exit.text is discard at runtime, not link time, to deal with references 98 /* .exit.text is discard at runtime, not link time, to deal with references
77 from .altinstructions and .eh_frame */ 99 from .altinstructions and .eh_frame */
78 .exit.text : { *(.exit.text) } 100 .exit.text : { *(.exit.text) }
79 .exit.data : { *(.exit.data) } 101 .exit.data : { *(.exit.data) }
80 102
81 __preinit_array_start = .; 103 .preinit_array : {
82 .preinit_array : { *(.preinit_array) } 104 __preinit_array_start = .;
83 __preinit_array_end = .; 105 *(.preinit_array)
84 __init_array_start = .; 106 __preinit_array_end = .;
85 .init_array : { *(.init_array) } 107 }
86 __init_array_end = .; 108 .init_array : {
87 __fini_array_start = .; 109 __init_array_start = .;
88 .fini_array : { *(.fini_array) } 110 *(.init_array)
89 __fini_array_end = .; 111 __init_array_end = .;
112 }
113 .fini_array : {
114 __fini_array_start = .;
115 *(.fini_array)
116 __fini_array_end = .;
117 }
90 118
91 . = ALIGN(4096); 119 . = ALIGN(4096);
92 __initramfs_start = .; 120 .init.ramfs : {
93 .init.ramfs : { *(.init.ramfs) } 121 __initramfs_start = .;
94 __initramfs_end = .; 122 *(.init.ramfs)
123 __initramfs_end = .;
124 }
95 125
96 /* Sections to be discarded */ 126 /* Sections to be discarded */
97 /DISCARD/ : { 127 /DISCARD/ : {
diff --git a/include/asm-um/elf-x86_64.h b/include/asm-um/elf-x86_64.h
index 8a8246d039..857471c49d 100644
--- a/include/asm-um/elf-x86_64.h
+++ b/include/asm-um/elf-x86_64.h
@@ -6,7 +6,9 @@
6#ifndef __UM_ELF_X86_64_H 6#ifndef __UM_ELF_X86_64_H
7#define __UM_ELF_X86_64_H 7#define __UM_ELF_X86_64_H
8 8
9#include <linux/sched.h>
9#include <asm/user.h> 10#include <asm/user.h>
11#include "skas.h"
10 12
11/* x86-64 relocation types, taken from asm-x86_64/elf.h */ 13/* x86-64 relocation types, taken from asm-x86_64/elf.h */
12#define R_X86_64_NONE 0 /* No reloc */ 14#define R_X86_64_NONE 0 /* No reloc */
@@ -64,6 +66,44 @@ typedef struct { } elf_fpregset_t;
64 PT_REGS_R15(regs) = 0; \ 66 PT_REGS_R15(regs) = 0; \
65} while (0) 67} while (0)
66 68
69#define ELF_CORE_COPY_REGS(pr_reg, regs) \
70 (pr_reg)[0] = (regs)->regs.skas.regs[0]; \
71 (pr_reg)[1] = (regs)->regs.skas.regs[1]; \
72 (pr_reg)[2] = (regs)->regs.skas.regs[2]; \
73 (pr_reg)[3] = (regs)->regs.skas.regs[3]; \
74 (pr_reg)[4] = (regs)->regs.skas.regs[4]; \
75 (pr_reg)[5] = (regs)->regs.skas.regs[5]; \
76 (pr_reg)[6] = (regs)->regs.skas.regs[6]; \
77 (pr_reg)[7] = (regs)->regs.skas.regs[7]; \
78 (pr_reg)[8] = (regs)->regs.skas.regs[8]; \
79 (pr_reg)[9] = (regs)->regs.skas.regs[9]; \
80 (pr_reg)[10] = (regs)->regs.skas.regs[10]; \
81 (pr_reg)[11] = (regs)->regs.skas.regs[11]; \
82 (pr_reg)[12] = (regs)->regs.skas.regs[12]; \
83 (pr_reg)[13] = (regs)->regs.skas.regs[13]; \
84 (pr_reg)[14] = (regs)->regs.skas.regs[14]; \
85 (pr_reg)[15] = (regs)->regs.skas.regs[15]; \
86 (pr_reg)[16] = (regs)->regs.skas.regs[16]; \
87 (pr_reg)[17] = (regs)->regs.skas.regs[17]; \
88 (pr_reg)[18] = (regs)->regs.skas.regs[18]; \
89 (pr_reg)[19] = (regs)->regs.skas.regs[19]; \
90 (pr_reg)[20] = (regs)->regs.skas.regs[20]; \
91 (pr_reg)[21] = current->thread.arch.fs; \
92 (pr_reg)[22] = 0; \
93 (pr_reg)[23] = 0; \
94 (pr_reg)[24] = 0; \
95 (pr_reg)[25] = 0; \
96 (pr_reg)[26] = 0;
97
98static inline int elf_core_copy_fpregs(struct task_struct *t,
99 elf_fpregset_t *fpu)
100{
101 int cpu = current_thread->cpu;
102 return save_fp_registers(userspace_pid[cpu], (unsigned long *) fpu);
103}
104
105#define ELF_CORE_COPY_FPREGS(t, fpu) elf_core_copy_fpregs(t, fpu)
106
67#ifdef TIF_IA32 /* XXX */ 107#ifdef TIF_IA32 /* XXX */
68#error XXX, indeed 108#error XXX, indeed
69 clear_thread_flag(TIF_IA32); 109 clear_thread_flag(TIF_IA32);
diff --git a/include/asm-v850/flat.h b/include/asm-v850/flat.h
index 3888f59d68..17f0ea5666 100644
--- a/include/asm-v850/flat.h
+++ b/include/asm-v850/flat.h
@@ -25,6 +25,7 @@
25#define flat_stack_align(sp) /* nothing needed */ 25#define flat_stack_align(sp) /* nothing needed */
26#define flat_argvp_envp_on_stack() 0 26#define flat_argvp_envp_on_stack() 0
27#define flat_old_ram_flag(flags) (flags) 27#define flat_old_ram_flag(flags) (flags)
28#define flat_set_persistent(relval, p) 0
28 29
29/* We store the type of relocation in the top 4 bits of the `relval.' */ 30/* We store the type of relocation in the top 4 bits of the `relval.' */
30 31
@@ -46,7 +47,8 @@ flat_get_relocate_addr (unsigned long relval)
46 For the v850, RP should always be half-word aligned. */ 47 For the v850, RP should always be half-word aligned. */
47static inline unsigned long flat_get_addr_from_rp (unsigned long *rp, 48static inline unsigned long flat_get_addr_from_rp (unsigned long *rp,
48 unsigned long relval, 49 unsigned long relval,
49 unsigned long flags) 50 unsigned long flags,
51 unsigned long *persistent)
50{ 52{
51 short *srp = (short *)rp; 53 short *srp = (short *)rp;
52 54
diff --git a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h
index 969d225a93..d9f2e54324 100644
--- a/include/asm-x86_64/io_apic.h
+++ b/include/asm-x86_64/io_apic.h
@@ -109,6 +109,12 @@ extern int mpc_default_type;
109/* 1 if "noapic" boot option passed */ 109/* 1 if "noapic" boot option passed */
110extern int skip_ioapic_setup; 110extern int skip_ioapic_setup;
111 111
112static inline void disable_ioapic_setup(void)
113{
114 skip_ioapic_setup = 1;
115}
116
117
112/* 118/*
113 * If we use the IO-APIC for IRQ routing, disable automatic 119 * If we use the IO-APIC for IRQ routing, disable automatic
114 * assignment of PCI IRQ's. 120 * assignment of PCI IRQ's.
diff --git a/include/asm-x86_64/pgalloc.h b/include/asm-x86_64/pgalloc.h
index b467be6d36..8bb5646878 100644
--- a/include/asm-x86_64/pgalloc.h
+++ b/include/asm-x86_64/pgalloc.h
@@ -4,10 +4,6 @@
4#include <asm/pda.h> 4#include <asm/pda.h>
5#include <linux/threads.h> 5#include <linux/threads.h>
6#include <linux/mm.h> 6#include <linux/mm.h>
7#include <linux/quicklist.h>
8
9#define QUICK_PGD 0 /* We preserve special mappings over free */
10#define QUICK_PT 1 /* Other page table pages that are zero on free */
11 7
12#define pmd_populate_kernel(mm, pmd, pte) \ 8#define pmd_populate_kernel(mm, pmd, pte) \
13 set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte))) 9 set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte)))
@@ -24,23 +20,23 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *p
24static inline void pmd_free(pmd_t *pmd) 20static inline void pmd_free(pmd_t *pmd)
25{ 21{
26 BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); 22 BUG_ON((unsigned long)pmd & (PAGE_SIZE-1));
27 quicklist_free(QUICK_PT, NULL, pmd); 23 free_page((unsigned long)pmd);
28} 24}
29 25
30static inline pmd_t *pmd_alloc_one (struct mm_struct *mm, unsigned long addr) 26static inline pmd_t *pmd_alloc_one (struct mm_struct *mm, unsigned long addr)
31{ 27{
32 return (pmd_t *)quicklist_alloc(QUICK_PT, GFP_KERNEL|__GFP_REPEAT, NULL); 28 return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
33} 29}
34 30
35static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) 31static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
36{ 32{
37 return (pud_t *)quicklist_alloc(QUICK_PT, GFP_KERNEL|__GFP_REPEAT, NULL); 33 return (pud_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
38} 34}
39 35
40static inline void pud_free (pud_t *pud) 36static inline void pud_free (pud_t *pud)
41{ 37{
42 BUG_ON((unsigned long)pud & (PAGE_SIZE-1)); 38 BUG_ON((unsigned long)pud & (PAGE_SIZE-1));
43 quicklist_free(QUICK_PT, NULL, pud); 39 free_page((unsigned long)pud);
44} 40}
45 41
46static inline void pgd_list_add(pgd_t *pgd) 42static inline void pgd_list_add(pgd_t *pgd)
@@ -61,57 +57,41 @@ static inline void pgd_list_del(pgd_t *pgd)
61 spin_unlock(&pgd_lock); 57 spin_unlock(&pgd_lock);
62} 58}
63 59
64static inline void pgd_ctor(void *x) 60static inline pgd_t *pgd_alloc(struct mm_struct *mm)
65{ 61{
66 unsigned boundary; 62 unsigned boundary;
67 pgd_t *pgd = x; 63 pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
68 struct page *page = virt_to_page(pgd); 64 if (!pgd)
69 65 return NULL;
66 pgd_list_add(pgd);
70 /* 67 /*
71 * Copy kernel pointers in from init. 68 * Copy kernel pointers in from init.
69 * Could keep a freelist or slab cache of those because the kernel
70 * part never changes.
72 */ 71 */
73 boundary = pgd_index(__PAGE_OFFSET); 72 boundary = pgd_index(__PAGE_OFFSET);
73 memset(pgd, 0, boundary * sizeof(pgd_t));
74 memcpy(pgd + boundary, 74 memcpy(pgd + boundary,
75 init_level4_pgt + boundary, 75 init_level4_pgt + boundary,
76 (PTRS_PER_PGD - boundary) * sizeof(pgd_t)); 76 (PTRS_PER_PGD - boundary) * sizeof(pgd_t));
77
78 spin_lock(&pgd_lock);
79 list_add(&page->lru, &pgd_list);
80 spin_unlock(&pgd_lock);
81}
82
83static inline void pgd_dtor(void *x)
84{
85 pgd_t *pgd = x;
86 struct page *page = virt_to_page(pgd);
87
88 spin_lock(&pgd_lock);
89 list_del(&page->lru);
90 spin_unlock(&pgd_lock);
91}
92
93static inline pgd_t *pgd_alloc(struct mm_struct *mm)
94{
95 pgd_t *pgd = (pgd_t *)quicklist_alloc(QUICK_PGD,
96 GFP_KERNEL|__GFP_REPEAT, pgd_ctor);
97 return pgd; 77 return pgd;
98} 78}
99 79
100static inline void pgd_free(pgd_t *pgd) 80static inline void pgd_free(pgd_t *pgd)
101{ 81{
102 BUG_ON((unsigned long)pgd & (PAGE_SIZE-1)); 82 BUG_ON((unsigned long)pgd & (PAGE_SIZE-1));
103 quicklist_free(QUICK_PGD, pgd_dtor, pgd); 83 pgd_list_del(pgd);
84 free_page((unsigned long)pgd);
104} 85}
105 86
106static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) 87static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
107{ 88{
108 return (pte_t *)quicklist_alloc(QUICK_PT, GFP_KERNEL|__GFP_REPEAT, NULL); 89 return (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
109} 90}
110 91
111static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) 92static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
112{ 93{
113 void *p = (void *)quicklist_alloc(QUICK_PT, GFP_KERNEL|__GFP_REPEAT, NULL); 94 void *p = (void *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
114
115 if (!p) 95 if (!p)
116 return NULL; 96 return NULL;
117 return virt_to_page(p); 97 return virt_to_page(p);
@@ -123,22 +103,17 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long add
123static inline void pte_free_kernel(pte_t *pte) 103static inline void pte_free_kernel(pte_t *pte)
124{ 104{
125 BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); 105 BUG_ON((unsigned long)pte & (PAGE_SIZE-1));
126 quicklist_free(QUICK_PT, NULL, pte); 106 free_page((unsigned long)pte);
127} 107}
128 108
129static inline void pte_free(struct page *pte) 109static inline void pte_free(struct page *pte)
130{ 110{
131 quicklist_free_page(QUICK_PT, NULL, pte); 111 __free_page(pte);
132} 112}
133 113
134#define __pte_free_tlb(tlb,pte) quicklist_free_page(QUICK_PT, NULL,(pte)) 114#define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte))
135 115
136#define __pmd_free_tlb(tlb,x) quicklist_free(QUICK_PT, NULL, (x)) 116#define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x))
137#define __pud_free_tlb(tlb,x) quicklist_free(QUICK_PT, NULL, (x)) 117#define __pud_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x))
138 118
139static inline void check_pgt_cache(void)
140{
141 quicklist_trim(QUICK_PGD, pgd_dtor, 25, 16);
142 quicklist_trim(QUICK_PT, NULL, 25, 16);
143}
144#endif /* _X86_64_PGALLOC_H */ 119#endif /* _X86_64_PGALLOC_H */
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h
index c9d8764c89..57dd6b3107 100644
--- a/include/asm-x86_64/pgtable.h
+++ b/include/asm-x86_64/pgtable.h
@@ -411,6 +411,7 @@ pte_t *lookup_address(unsigned long addr);
411#define HAVE_ARCH_UNMAPPED_AREA 411#define HAVE_ARCH_UNMAPPED_AREA
412 412
413#define pgtable_cache_init() do { } while (0) 413#define pgtable_cache_init() do { } while (0)
414#define check_pgt_cache() do { } while (0)
414 415
415#define PAGE_AGP PAGE_KERNEL_NOCACHE 416#define PAGE_AGP PAGE_KERNEL_NOCACHE
416#define HAVE_PAGE_AGP 1 417#define HAVE_PAGE_AGP 1
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h
index 19525175b9..31f579b828 100644
--- a/include/asm-x86_64/processor.h
+++ b/include/asm-x86_64/processor.h
@@ -371,7 +371,7 @@ static inline void sync_core(void)
371#define ARCH_HAS_PREFETCH 371#define ARCH_HAS_PREFETCH
372static inline void prefetch(void *x) 372static inline void prefetch(void *x)
373{ 373{
374 asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); 374 asm volatile("prefetcht0 (%0)" :: "r" (x));
375} 375}
376 376
377#define ARCH_HAS_PREFETCHW 1 377#define ARCH_HAS_PREFETCHW 1
diff --git a/include/asm-xtensa/bugs.h b/include/asm-xtensa/bugs.h
index c422853201..69b29d1982 100644
--- a/include/asm-xtensa/bugs.h
+++ b/include/asm-xtensa/bugs.h
@@ -13,10 +13,6 @@
13#ifndef _XTENSA_BUGS_H 13#ifndef _XTENSA_BUGS_H
14#define _XTENSA_BUGS_H 14#define _XTENSA_BUGS_H
15 15
16#include <asm/processor.h> 16static void check_bugs(void) { }
17
18static void __init check_bugs(void)
19{
20}
21 17
22#endif /* _XTENSA_BUGS_H */ 18#endif /* _XTENSA_BUGS_H */
diff --git a/include/asm-xtensa/cache.h b/include/asm-xtensa/cache.h
index 1c4a78f29a..3bba2a540c 100644
--- a/include/asm-xtensa/cache.h
+++ b/include/asm-xtensa/cache.h
@@ -19,6 +19,15 @@
19 19
20#define DCACHE_WAY_SIZE (XCHAL_DCACHE_SIZE/XCHAL_DCACHE_WAYS) 20#define DCACHE_WAY_SIZE (XCHAL_DCACHE_SIZE/XCHAL_DCACHE_WAYS)
21#define ICACHE_WAY_SIZE (XCHAL_ICACHE_SIZE/XCHAL_ICACHE_WAYS) 21#define ICACHE_WAY_SIZE (XCHAL_ICACHE_SIZE/XCHAL_ICACHE_WAYS)
22#define DCACHE_WAY_SHIFT (XCHAL_DCACHE_SETWIDTH + XCHAL_DCACHE_LINEWIDTH)
23#define ICACHE_WAY_SHIFT (XCHAL_ICACHE_SETWIDTH + XCHAL_ICACHE_LINEWIDTH)
24
25/* Maximum cache size per way. */
26#if DCACHE_WAY_SIZE >= ICACHE_WAY_SIZE
27# define CACHE_WAY_SIZE DCACHE_WAY_SIZE
28#else
29# define CACHE_WAY_SIZE ICACHE_WAY_SIZE
30#endif
22 31
23 32
24#endif /* _XTENSA_CACHE_H */ 33#endif /* _XTENSA_CACHE_H */
diff --git a/include/asm-xtensa/cacheflush.h b/include/asm-xtensa/cacheflush.h
index 22ef901b78..b773c57e75 100644
--- a/include/asm-xtensa/cacheflush.h
+++ b/include/asm-xtensa/cacheflush.h
@@ -5,7 +5,7 @@
5 * License. See the file "COPYING" in the main directory of this archive 5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details. 6 * for more details.
7 * 7 *
8 * (C) 2001 - 2006 Tensilica Inc. 8 * (C) 2001 - 2007 Tensilica Inc.
9 */ 9 */
10 10
11#ifndef _XTENSA_CACHEFLUSH_H 11#ifndef _XTENSA_CACHEFLUSH_H
@@ -18,10 +18,7 @@
18#include <asm/page.h> 18#include <asm/page.h>
19 19
20/* 20/*
21 * flush and invalidate data cache, invalidate instruction cache: 21 * Lo-level routines for cache flushing.
22 *
23 * __flush_invalidate_cache_all()
24 * __flush_invalidate_cache_range(from,sze)
25 * 22 *
26 * invalidate data or instruction cache: 23 * invalidate data or instruction cache:
27 * 24 *
@@ -40,26 +37,39 @@
40 * __flush_invalidate_dcache_all() 37 * __flush_invalidate_dcache_all()
41 * __flush_invalidate_dcache_page(adr) 38 * __flush_invalidate_dcache_page(adr)
42 * __flush_invalidate_dcache_range(from,size) 39 * __flush_invalidate_dcache_range(from,size)
40 *
41 * specials for cache aliasing:
42 *
43 * __flush_invalidate_dcache_page_alias(vaddr,paddr)
44 * __invalidate_icache_page_alias(vaddr,paddr)
43 */ 45 */
44 46
45extern void __flush_invalidate_cache_all(void); 47extern void __invalidate_dcache_all(void);
46extern void __flush_invalidate_cache_range(unsigned long, unsigned long);
47extern void __flush_invalidate_dcache_all(void);
48extern void __invalidate_icache_all(void); 48extern void __invalidate_icache_all(void);
49
50extern void __invalidate_dcache_page(unsigned long); 49extern void __invalidate_dcache_page(unsigned long);
51extern void __invalidate_icache_page(unsigned long); 50extern void __invalidate_icache_page(unsigned long);
52extern void __invalidate_icache_range(unsigned long, unsigned long); 51extern void __invalidate_icache_range(unsigned long, unsigned long);
53extern void __invalidate_dcache_range(unsigned long, unsigned long); 52extern void __invalidate_dcache_range(unsigned long, unsigned long);
54 53
54
55#if XCHAL_DCACHE_IS_WRITEBACK 55#if XCHAL_DCACHE_IS_WRITEBACK
56extern void __flush_invalidate_dcache_all(void);
56extern void __flush_dcache_page(unsigned long); 57extern void __flush_dcache_page(unsigned long);
58extern void __flush_dcache_range(unsigned long, unsigned long);
57extern void __flush_invalidate_dcache_page(unsigned long); 59extern void __flush_invalidate_dcache_page(unsigned long);
58extern void __flush_invalidate_dcache_range(unsigned long, unsigned long); 60extern void __flush_invalidate_dcache_range(unsigned long, unsigned long);
59#else 61#else
60# define __flush_dcache_page(p) do { } while(0) 62# define __flush_dcache_range(p,s) do { } while(0)
61# define __flush_invalidate_dcache_page(p) do { } while(0) 63# define __flush_dcache_page(p) do { } while(0)
62# define __flush_invalidate_dcache_range(p,s) do { } while(0) 64# define __flush_invalidate_dcache_page(p) __invalidate_dcache_page(p)
65# define __flush_invalidate_dcache_range(p,s) __invalidate_dcache_range(p,s)
66#endif
67
68#if (DCACHE_WAY_SIZE > PAGE_SIZE)
69extern void __flush_invalidate_dcache_page_alias(unsigned long, unsigned long);
70#endif
71#if (ICACHE_WAY_SIZE > PAGE_SIZE)
72extern void __invalidate_icache_page_alias(unsigned long, unsigned long);
63#endif 73#endif
64 74
65/* 75/*
@@ -71,17 +81,21 @@ extern void __flush_invalidate_dcache_range(unsigned long, unsigned long);
71 * (see also Documentation/cachetlb.txt) 81 * (see also Documentation/cachetlb.txt)
72 */ 82 */
73 83
74#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK 84#if (DCACHE_WAY_SIZE > PAGE_SIZE)
75 85
76#define flush_cache_all() __flush_invalidate_cache_all(); 86#define flush_cache_all() \
77#define flush_cache_mm(mm) __flush_invalidate_cache_all(); 87 do { \
78#define flush_cache_dup_mm(mm) __flush_invalidate_cache_all(); 88 __flush_invalidate_dcache_all(); \
89 __invalidate_icache_all(); \
90 } while (0)
79 91
80#define flush_cache_vmap(start,end) __flush_invalidate_cache_all(); 92#define flush_cache_mm(mm) flush_cache_all()
81#define flush_cache_vunmap(start,end) __flush_invalidate_cache_all(); 93#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
82 94
83extern void flush_dcache_page(struct page*); 95#define flush_cache_vmap(start,end) flush_cache_all()
96#define flush_cache_vunmap(start,end) flush_cache_all()
84 97
98extern void flush_dcache_page(struct page*);
85extern void flush_cache_range(struct vm_area_struct*, ulong, ulong); 99extern void flush_cache_range(struct vm_area_struct*, ulong, ulong);
86extern void flush_cache_page(struct vm_area_struct*, unsigned long, unsigned long); 100extern void flush_cache_page(struct vm_area_struct*, unsigned long, unsigned long);
87 101
@@ -101,24 +115,39 @@ extern void flush_cache_page(struct vm_area_struct*, unsigned long, unsigned lon
101 115
102#endif 116#endif
103 117
118/* Ensure consistency between data and instruction cache. */
104#define flush_icache_range(start,end) \ 119#define flush_icache_range(start,end) \
105 __invalidate_icache_range(start,(end)-(start)) 120 do { \
121 __flush_dcache_range(start, (end) - (start)); \
122 __invalidate_icache_range(start,(end) - (start)); \
123 } while (0)
106 124
107/* This is not required, see Documentation/cachetlb.txt */ 125/* This is not required, see Documentation/cachetlb.txt */
108 126#define flush_icache_page(vma,page) do { } while (0)
109#define flush_icache_page(vma,page) do { } while(0)
110 127
111#define flush_dcache_mmap_lock(mapping) do { } while (0) 128#define flush_dcache_mmap_lock(mapping) do { } while (0)
112#define flush_dcache_mmap_unlock(mapping) do { } while (0) 129#define flush_dcache_mmap_unlock(mapping) do { } while (0)
113 130
131#if (DCACHE_WAY_SIZE > PAGE_SIZE)
114 132
115#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ 133extern void copy_to_user_page(struct vm_area_struct*, struct page*,
116 memcpy(dst, src, len) 134 unsigned long, void*, const void*, unsigned long);
135extern void copy_from_user_page(struct vm_area_struct*, struct page*,
136 unsigned long, void*, const void*, unsigned long);
137
138#else
139
140#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
141 do { \
142 memcpy(dst, src, len); \
143 __flush_dcache_range((unsigned long) dst, len); \
144 __invalidate_icache_range((unsigned long) dst, len); \
145 } while (0)
117 146
118#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ 147#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
119 memcpy(dst, src, len) 148 memcpy(dst, src, len)
120 149
121#endif /* __KERNEL__ */ 150#endif
122 151
152#endif /* __KERNEL__ */
123#endif /* _XTENSA_CACHEFLUSH_H */ 153#endif /* _XTENSA_CACHEFLUSH_H */
124
diff --git a/include/asm-xtensa/elf.h b/include/asm-xtensa/elf.h
index 1569b53cec..7083d46766 100644
--- a/include/asm-xtensa/elf.h
+++ b/include/asm-xtensa/elf.h
@@ -20,6 +20,56 @@
20#define EM_XTENSA 94 20#define EM_XTENSA 94
21#define EM_XTENSA_OLD 0xABC7 21#define EM_XTENSA_OLD 0xABC7
22 22
23/* Xtensa relocations defined by the ABIs */
24
25#define R_XTENSA_NONE 0
26#define R_XTENSA_32 1
27#define R_XTENSA_RTLD 2
28#define R_XTENSA_GLOB_DAT 3
29#define R_XTENSA_JMP_SLOT 4
30#define R_XTENSA_RELATIVE 5
31#define R_XTENSA_PLT 6
32#define R_XTENSA_OP0 8
33#define R_XTENSA_OP1 9
34#define R_XTENSA_OP2 10
35#define R_XTENSA_ASM_EXPAND 11
36#define R_XTENSA_ASM_SIMPLIFY 12
37#define R_XTENSA_GNU_VTINHERIT 15
38#define R_XTENSA_GNU_VTENTRY 16
39#define R_XTENSA_DIFF8 17
40#define R_XTENSA_DIFF16 18
41#define R_XTENSA_DIFF32 19
42#define R_XTENSA_SLOT0_OP 20
43#define R_XTENSA_SLOT1_OP 21
44#define R_XTENSA_SLOT2_OP 22
45#define R_XTENSA_SLOT3_OP 23
46#define R_XTENSA_SLOT4_OP 24
47#define R_XTENSA_SLOT5_OP 25
48#define R_XTENSA_SLOT6_OP 26
49#define R_XTENSA_SLOT7_OP 27
50#define R_XTENSA_SLOT8_OP 28
51#define R_XTENSA_SLOT9_OP 29
52#define R_XTENSA_SLOT10_OP 30
53#define R_XTENSA_SLOT11_OP 31
54#define R_XTENSA_SLOT12_OP 32
55#define R_XTENSA_SLOT13_OP 33
56#define R_XTENSA_SLOT14_OP 34
57#define R_XTENSA_SLOT0_ALT 35
58#define R_XTENSA_SLOT1_ALT 36
59#define R_XTENSA_SLOT2_ALT 37
60#define R_XTENSA_SLOT3_ALT 38
61#define R_XTENSA_SLOT4_ALT 39
62#define R_XTENSA_SLOT5_ALT 40
63#define R_XTENSA_SLOT6_ALT 41
64#define R_XTENSA_SLOT7_ALT 42
65#define R_XTENSA_SLOT8_ALT 43
66#define R_XTENSA_SLOT9_ALT 44
67#define R_XTENSA_SLOT10_ALT 45
68#define R_XTENSA_SLOT11_ALT 46
69#define R_XTENSA_SLOT12_ALT 47
70#define R_XTENSA_SLOT13_ALT 48
71#define R_XTENSA_SLOT14_ALT 49
72
23/* ELF register definitions. This is needed for core dump support. */ 73/* ELF register definitions. This is needed for core dump support. */
24 74
25/* 75/*
diff --git a/include/asm-xtensa/io.h b/include/asm-xtensa/io.h
index 0faa614d96..47c3616ea9 100644
--- a/include/asm-xtensa/io.h
+++ b/include/asm-xtensa/io.h
@@ -14,6 +14,7 @@
14#ifdef __KERNEL__ 14#ifdef __KERNEL__
15#include <asm/byteorder.h> 15#include <asm/byteorder.h>
16#include <asm/page.h> 16#include <asm/page.h>
17#include <linux/kernel.h>
17 18
18#include <linux/types.h> 19#include <linux/types.h>
19 20
diff --git a/include/asm-xtensa/ioctls.h b/include/asm-xtensa/ioctls.h
index 39e6f23921..0ffa942954 100644
--- a/include/asm-xtensa/ioctls.h
+++ b/include/asm-xtensa/ioctls.h
@@ -91,6 +91,10 @@
91#define TIOCSBRK _IO('T', 39) /* BSD compatibility */ 91#define TIOCSBRK _IO('T', 39) /* BSD compatibility */
92#define TIOCCBRK _IO('T', 40) /* BSD compatibility */ 92#define TIOCCBRK _IO('T', 40) /* BSD compatibility */
93#define TIOCGSID _IOR('T', 41, pid_t) /* Return the session ID of FD*/ 93#define TIOCGSID _IOR('T', 41, pid_t) /* Return the session ID of FD*/
94#define TCGETS2 _IOR('T', 42, struct termios2)
95#define TCSETS2 _IOW('T', 43, struct termios2)
96#define TCSETSW2 _IOW('T', 44, struct termios2)
97#define TCSETSF2 _IOW('T', 45, struct termios2)
94#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 98#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
95#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ 99#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
96 100
diff --git a/include/asm-xtensa/page.h b/include/asm-xtensa/page.h
index 1213cde754..55ce2c9749 100644
--- a/include/asm-xtensa/page.h
+++ b/include/asm-xtensa/page.h
@@ -1,11 +1,11 @@
1/* 1/*
2 * linux/include/asm-xtensa/page.h 2 * include/asm-xtensa/page.h
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version2 as 5 * it under the terms of the GNU General Public License version2 as
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 * 7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc. 8 * Copyright (C) 2001 - 2007 Tensilica Inc.
9 */ 9 */
10 10
11#ifndef _XTENSA_PAGE_H 11#ifndef _XTENSA_PAGE_H
@@ -14,6 +14,12 @@
14#ifdef __KERNEL__ 14#ifdef __KERNEL__
15 15
16#include <asm/processor.h> 16#include <asm/processor.h>
17#include <asm/types.h>
18#include <asm/cache.h>
19
20/*
21 * Fixed TLB translations in the processor.
22 */
17 23
18#define XCHAL_KSEG_CACHED_VADDR 0xd0000000 24#define XCHAL_KSEG_CACHED_VADDR 0xd0000000
19#define XCHAL_KSEG_BYPASS_VADDR 0xd8000000 25#define XCHAL_KSEG_BYPASS_VADDR 0xd8000000
@@ -26,13 +32,60 @@
26 */ 32 */
27 33
28#define PAGE_SHIFT 12 34#define PAGE_SHIFT 12
29#define PAGE_SIZE (1 << PAGE_SHIFT) 35#define PAGE_SIZE (__XTENSA_UL_CONST(1) << PAGE_SHIFT)
30#define PAGE_MASK (~(PAGE_SIZE-1)) 36#define PAGE_MASK (~(PAGE_SIZE-1))
31#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE - 1) & PAGE_MASK) 37#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE - 1) & PAGE_MASK)
32 38
33#define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR 39#define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR
34#define MAX_MEM_PFN XCHAL_KSEG_SIZE 40#define MAX_MEM_PFN XCHAL_KSEG_SIZE
35#define PGTABLE_START 0x80000000 41#define PGTABLE_START 0x80000000
42
43/*
44 * Cache aliasing:
45 *
46 * If the cache size for one way is greater than the page size, we have to
47 * deal with cache aliasing. The cache index is wider than the page size:
48 *
49 * | |cache| cache index
50 * | pfn |off| virtual address
51 * |xxxx:X|zzz|
52 * | : | |
53 * | \ / | |
54 * |trans.| |
55 * | / \ | |
56 * |yyyy:Y|zzz| physical address
57 *
58 * When the page number is translated to the physical page address, the lowest
59 * bit(s) (X) that are part of the cache index are also translated (Y).
60 * If this translation changes bit(s) (X), the cache index is also afected,
61 * thus resulting in a different cache line than before.
62 * The kernel does not provide a mechanism to ensure that the page color
63 * (represented by this bit) remains the same when allocated or when pages
64 * are remapped. When user pages are mapped into kernel space, the color of
65 * the page might also change.
66 *
67 * We use the address space VMALLOC_END ... VMALLOC_END + DCACHE_WAY_SIZE * 2
68 * to temporarily map a patch so we can match the color.
69 */
70
71#if DCACHE_WAY_SIZE > PAGE_SIZE
72# define DCACHE_ALIAS_ORDER (DCACHE_WAY_SHIFT - PAGE_SHIFT)
73# define DCACHE_ALIAS_MASK (PAGE_MASK & (DCACHE_WAY_SIZE - 1))
74# define DCACHE_ALIAS(a) (((a) & DCACHE_ALIAS_MASK) >> PAGE_SHIFT)
75# define DCACHE_ALIAS_EQ(a,b) ((((a) ^ (b)) & DCACHE_ALIAS_MASK) == 0)
76#else
77# define DCACHE_ALIAS_ORDER 0
78#endif
79
80#if ICACHE_WAY_SIZE > PAGE_SIZE
81# define ICACHE_ALIAS_ORDER (ICACHE_WAY_SHIFT - PAGE_SHIFT)
82# define ICACHE_ALIAS_MASK (PAGE_MASK & (ICACHE_WAY_SIZE - 1))
83# define ICACHE_ALIAS(a) (((a) & ICACHE_ALIAS_MASK) >> PAGE_SHIFT)
84# define ICACHE_ALIAS_EQ(a,b) ((((a) ^ (b)) & ICACHE_ALIAS_MASK) == 0)
85#else
86# define ICACHE_ALIAS_ORDER 0
87#endif
88
36 89
37#ifdef __ASSEMBLY__ 90#ifdef __ASSEMBLY__
38 91
@@ -58,34 +111,23 @@ typedef struct { unsigned long pgprot; } pgprot_t;
58 111
59/* 112/*
60 * Pure 2^n version of get_order 113 * Pure 2^n version of get_order
114 * Use 'nsau' instructions if supported by the processor or the generic version.
61 */ 115 */
62 116
63static inline int get_order(unsigned long size) 117#if XCHAL_HAVE_NSA
118
119static inline __attribute_const__ int get_order(unsigned long size)
64{ 120{
65 int order; 121 int lz;
66#ifndef XCHAL_HAVE_NSU 122 asm ("nsau %0, %1" : "=r" (lz) : "r" ((size - 1) >> PAGE_SHIFT));
67 unsigned long x1, x2, x4, x8, x16; 123 return 32 - lz;
68
69 size = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
70 x1 = size & 0xAAAAAAAA;
71 x2 = size & 0xCCCCCCCC;
72 x4 = size & 0xF0F0F0F0;
73 x8 = size & 0xFF00FF00;
74 x16 = size & 0xFFFF0000;
75 order = x2 ? 2 : 0;
76 order += (x16 != 0) * 16;
77 order += (x8 != 0) * 8;
78 order += (x4 != 0) * 4;
79 order += (x1 != 0);
80
81 return order;
82#else
83 size = (size - 1) >> PAGE_SHIFT;
84 asm ("nsau %0, %1" : "=r" (order) : "r" (size));
85 return 32 - order;
86#endif
87} 124}
88 125
126#else
127
128# include <asm-generic/page.h>
129
130#endif
89 131
90struct page; 132struct page;
91extern void clear_page(void *page); 133extern void clear_page(void *page);
@@ -96,11 +138,11 @@ extern void copy_page(void *to, void *from);
96 * some extra work 138 * some extra work
97 */ 139 */
98 140
99#if (DCACHE_WAY_SIZE > PAGE_SIZE) 141#if DCACHE_WAY_SIZE > PAGE_SIZE
100void clear_user_page(void *addr, unsigned long vaddr, struct page* page); 142extern void clear_user_page(void*, unsigned long, struct page*);
101void copy_user_page(void *to,void* from,unsigned long vaddr,struct page* page); 143extern void copy_user_page(void*, void*, unsigned long, struct page*);
102#else 144#else
103# define clear_user_page(page,vaddr,pg) clear_page(page) 145# define clear_user_page(page, vaddr, pg) clear_page(page)
104# define copy_user_page(to, from, vaddr, pg) copy_page(to, from) 146# define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
105#endif 147#endif
106 148
diff --git a/include/asm-xtensa/pgalloc.h b/include/asm-xtensa/pgalloc.h
index d56ddf2055..3e5b565251 100644
--- a/include/asm-xtensa/pgalloc.h
+++ b/include/asm-xtensa/pgalloc.h
@@ -1,11 +1,11 @@
1/* 1/*
2 * linux/include/asm-xtensa/pgalloc.h 2 * include/asm-xtensa/pgalloc.h
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as 5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 * 7 *
8 * Copyright (C) 2001-2005 Tensilica Inc. 8 * Copyright (C) 2001-2007 Tensilica Inc.
9 */ 9 */
10 10
11#ifndef _XTENSA_PGALLOC_H 11#ifndef _XTENSA_PGALLOC_H
@@ -13,103 +13,54 @@
13 13
14#ifdef __KERNEL__ 14#ifdef __KERNEL__
15 15
16#include <linux/threads.h>
17#include <linux/highmem.h> 16#include <linux/highmem.h>
18#include <asm/processor.h>
19#include <asm/cacheflush.h>
20
21
22/* Cache aliasing:
23 *
24 * If the cache size for one way is greater than the page size, we have to
25 * deal with cache aliasing. The cache index is wider than the page size:
26 *
27 * |cache |
28 * |pgnum |page| virtual address
29 * |xxxxxX|zzzz|
30 * | | |
31 * \ / | |
32 * trans.| |
33 * / \ | |
34 * |yyyyyY|zzzz| physical address
35 *
36 * When the page number is translated to the physical page address, the lowest
37 * bit(s) (X) that are also part of the cache index are also translated (Y).
38 * If this translation changes this bit (X), the cache index is also afected,
39 * thus resulting in a different cache line than before.
40 * The kernel does not provide a mechanism to ensure that the page color
41 * (represented by this bit) remains the same when allocated or when pages
42 * are remapped. When user pages are mapped into kernel space, the color of
43 * the page might also change.
44 *
45 * We use the address space VMALLOC_END ... VMALLOC_END + DCACHE_WAY_SIZE * 2
46 * to temporarily map a patch so we can match the color.
47 */
48
49#if (DCACHE_WAY_SIZE > PAGE_SIZE)
50# define PAGE_COLOR_MASK (PAGE_MASK & (DCACHE_WAY_SIZE-1))
51# define PAGE_COLOR(a) \
52 (((unsigned long)(a)&PAGE_COLOR_MASK) >> PAGE_SHIFT)
53# define PAGE_COLOR_EQ(a,b) \
54 ((((unsigned long)(a) ^ (unsigned long)(b)) & PAGE_COLOR_MASK) == 0)
55# define PAGE_COLOR_MAP0(v) \
56 (VMALLOC_END + ((unsigned long)(v) & PAGE_COLOR_MASK))
57# define PAGE_COLOR_MAP1(v) \
58 (VMALLOC_END + ((unsigned long)(v) & PAGE_COLOR_MASK) + DCACHE_WAY_SIZE)
59#endif
60 17
61/* 18/*
62 * Allocating and freeing a pmd is trivial: the 1-entry pmd is 19 * Allocating and freeing a pmd is trivial: the 1-entry pmd is
63 * inside the pgd, so has no extra memory associated with it. 20 * inside the pgd, so has no extra memory associated with it.
64 */ 21 */
65 22
66#define pgd_free(pgd) free_page((unsigned long)(pgd)) 23#define pmd_populate_kernel(mm, pmdp, ptep) \
67 24 (pmd_val(*(pmdp)) = ((unsigned long)ptep))
68#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK 25#define pmd_populate(mm, pmdp, page) \
26 (pmd_val(*(pmdp)) = ((unsigned long)page_to_virt(page)))
69 27
70static inline void 28static inline pgd_t*
71pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *pte) 29pgd_alloc(struct mm_struct *mm)
72{ 30{
73 pmd_val(*(pmdp)) = (unsigned long)(pte); 31 return (pgd_t*) __get_free_pages(GFP_KERNEL | __GFP_ZERO, PGD_ORDER);
74 __asm__ __volatile__ ("memw; dhwb %0, 0; dsync" :: "a" (pmdp));
75} 32}
76 33
77static inline void 34static inline void pgd_free(pgd_t *pgd)
78pmd_populate(struct mm_struct *mm, pmd_t *pmdp, struct page *page)
79{ 35{
80 pmd_val(*(pmdp)) = (unsigned long)page_to_virt(page); 36 free_page((unsigned long)pgd);
81 __asm__ __volatile__ ("memw; dhwb %0, 0; dsync" :: "a" (pmdp));
82} 37}
83 38
39/* Use a slab cache for the pte pages (see also sparc64 implementation) */
84 40
41extern struct kmem_cache *pgtable_cache;
85 42
86#else 43static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
87 44 unsigned long address)
88# define pmd_populate_kernel(mm, pmdp, pte) \
89 (pmd_val(*(pmdp)) = (unsigned long)(pte))
90# define pmd_populate(mm, pmdp, page) \
91 (pmd_val(*(pmdp)) = (unsigned long)page_to_virt(page))
92
93#endif
94
95static inline pgd_t*
96pgd_alloc(struct mm_struct *mm)
97{ 45{
98 pgd_t *pgd; 46 return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT);
99 47}
100 pgd = (pgd_t *)__get_free_pages(GFP_KERNEL|__GFP_ZERO, PGD_ORDER);
101
102 if (likely(pgd != NULL))
103 __flush_dcache_page((unsigned long)pgd);
104 48
105 return pgd; 49static inline struct page *pte_alloc_one(struct mm_struct *mm,
50 unsigned long addr)
51{
52 return virt_to_page(pte_alloc_one_kernel(mm, addr));
106} 53}
107 54
108extern pte_t* pte_alloc_one_kernel(struct mm_struct* mm, unsigned long addr); 55static inline void pte_free_kernel(pte_t *pte)
109extern struct page* pte_alloc_one(struct mm_struct* mm, unsigned long addr); 56{
57 kmem_cache_free(pgtable_cache, pte);
58}
110 59
111#define pte_free_kernel(pte) free_page((unsigned long)pte) 60static inline void pte_free(struct page *page)
112#define pte_free(pte) __free_page(pte) 61{
62 kmem_cache_free(pgtable_cache, page_address(page));
63}
113 64
114#endif /* __KERNEL__ */ 65#endif /* __KERNEL__ */
115#endif /* _XTENSA_PGALLOC_H */ 66#endif /* _XTENSA_PGALLOC_H */
diff --git a/include/asm-xtensa/pgtable.h b/include/asm-xtensa/pgtable.h
index 06850f3b26..c0fcc1c966 100644
--- a/include/asm-xtensa/pgtable.h
+++ b/include/asm-xtensa/pgtable.h
@@ -1,11 +1,11 @@
1/* 1/*
2 * linux/include/asm-xtensa/pgtable.h 2 * include/asm-xtensa/pgtable.h
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version2 as 5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 * 7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc. 8 * Copyright (C) 2001 - 2007 Tensilica Inc.
9 */ 9 */
10 10
11#ifndef _XTENSA_PGTABLE_H 11#ifndef _XTENSA_PGTABLE_H
@@ -23,7 +23,7 @@
23 23
24/* 24/*
25 * The Xtensa architecture port of Linux has a two-level page table system, 25 * The Xtensa architecture port of Linux has a two-level page table system,
26 * i.e. the logical three-level Linux page table layout are folded. 26 * i.e. the logical three-level Linux page table layout is folded.
27 * Each task has the following memory page tables: 27 * Each task has the following memory page tables:
28 * 28 *
29 * PGD table (page directory), ie. 3rd-level page table: 29 * PGD table (page directory), ie. 3rd-level page table:
@@ -43,6 +43,7 @@
43 * 43 *
44 * The individual pages are 4 kB big with special pages for the empty_zero_page. 44 * The individual pages are 4 kB big with special pages for the empty_zero_page.
45 */ 45 */
46
46#define PGDIR_SHIFT 22 47#define PGDIR_SHIFT 22
47#define PGDIR_SIZE (1UL << PGDIR_SHIFT) 48#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
48#define PGDIR_MASK (~(PGDIR_SIZE-1)) 49#define PGDIR_MASK (~(PGDIR_SIZE-1))
@@ -53,24 +54,26 @@
53 */ 54 */
54#define PTRS_PER_PTE 1024 55#define PTRS_PER_PTE 1024
55#define PTRS_PER_PTE_SHIFT 10 56#define PTRS_PER_PTE_SHIFT 10
56#define PTRS_PER_PMD 1
57#define PTRS_PER_PGD 1024 57#define PTRS_PER_PGD 1024
58#define PGD_ORDER 0 58#define PGD_ORDER 0
59#define PMD_ORDER 0
60#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) 59#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
61#define FIRST_USER_ADDRESS 0 60#define FIRST_USER_ADDRESS 0
62#define FIRST_USER_PGD_NR (FIRST_USER_ADDRESS >> PGDIR_SHIFT) 61#define FIRST_USER_PGD_NR (FIRST_USER_ADDRESS >> PGDIR_SHIFT)
63 62
64/* virtual memory area. We keep a distance to other memory regions to be 63/*
64 * Virtual memory area. We keep a distance to other memory regions to be
65 * on the safe side. We also use this area for cache aliasing. 65 * on the safe side. We also use this area for cache aliasing.
66 */ 66 */
67 67
68// FIXME: virtual memory area must be configuration-dependent
69
70#define VMALLOC_START 0xC0000000 68#define VMALLOC_START 0xC0000000
71#define VMALLOC_END 0xC7FF0000 69#define VMALLOC_END 0xC6FEFFFF
70#define TLBTEMP_BASE_1 0xC6FF0000
71#define TLBTEMP_BASE_2 0xC6FF8000
72#define MODULE_START 0xC7000000
73#define MODULE_END 0xC7FFFFFF
72 74
73/* Xtensa Linux config PTE layout (when present): 75/*
76 * Xtensa Linux config PTE layout (when present):
74 * 31-12: PPN 77 * 31-12: PPN
75 * 11-6: Software 78 * 11-6: Software
76 * 5-4: RING 79 * 5-4: RING
@@ -86,47 +89,55 @@
86 * See further below for PTE layout for swapped-out pages. 89 * See further below for PTE layout for swapped-out pages.
87 */ 90 */
88 91
89#define _PAGE_VALID (1<<0) /* hardware: page is accessible */ 92#define _PAGE_HW_EXEC (1<<0) /* hardware: page is executable */
90#define _PAGE_WRENABLE (1<<1) /* hardware: page is writable */ 93#define _PAGE_HW_WRITE (1<<1) /* hardware: page is writable */
94
95#define _PAGE_FILE (1<<1) /* non-linear mapping, if !present */
96#define _PAGE_PROTNONE (3<<0) /* special case for VM_PROT_NONE */
91 97
92/* None of these cache modes include MP coherency: */ 98/* None of these cache modes include MP coherency: */
93#define _PAGE_NO_CACHE (0<<2) /* bypass, non-speculative */ 99#define _PAGE_CA_BYPASS (0<<2) /* bypass, non-speculative */
94#if XCHAL_DCACHE_IS_WRITEBACK 100#define _PAGE_CA_WB (1<<2) /* write-back */
95# define _PAGE_WRITEBACK (1<<2) /* write back */ 101#define _PAGE_CA_WT (2<<2) /* write-through */
96# define _PAGE_WRITETHRU (2<<2) /* write through */ 102#define _PAGE_CA_MASK (3<<2)
97#else 103#define _PAGE_INVALID (3<<2)
98# define _PAGE_WRITEBACK (1<<2) /* assume write through */
99# define _PAGE_WRITETHRU (1<<2)
100#endif
101#define _PAGE_NOALLOC (3<<2) /* don't allocate cache,if not cached */
102#define _CACHE_MASK (3<<2)
103 104
104#define _PAGE_USER (1<<4) /* user access (ring=1) */ 105#define _PAGE_USER (1<<4) /* user access (ring=1) */
105#define _PAGE_KERNEL (0<<4) /* kernel access (ring=0) */
106 106
107/* Software */ 107/* Software */
108#define _PAGE_RW (1<<6) /* software: page writable */ 108#define _PAGE_WRITABLE_BIT 6
109#define _PAGE_WRITABLE (1<<6) /* software: page writable */
109#define _PAGE_DIRTY (1<<7) /* software: page dirty */ 110#define _PAGE_DIRTY (1<<7) /* software: page dirty */
110#define _PAGE_ACCESSED (1<<8) /* software: page accessed (read) */ 111#define _PAGE_ACCESSED (1<<8) /* software: page accessed (read) */
111#define _PAGE_FILE (1<<9) /* nonlinear file mapping*/
112 112
113#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _CACHE_MASK | _PAGE_DIRTY) 113/* On older HW revisions, we always have to set bit 0 */
114#define _PAGE_PRESENT ( _PAGE_VALID | _PAGE_WRITEBACK | _PAGE_ACCESSED) 114#if XCHAL_HW_VERSION_MAJOR < 2000
115# define _PAGE_VALID (1<<0)
116#else
117# define _PAGE_VALID 0
118#endif
115 119
116#ifdef CONFIG_MMU 120#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
121#define _PAGE_PRESENT (_PAGE_VALID | _PAGE_CA_WB | _PAGE_ACCESSED)
117 122
118# define PAGE_NONE __pgprot(_PAGE_PRESENT) 123#ifdef CONFIG_MMU
119# define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_RW)
120# define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER)
121# define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER)
122# define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_KERNEL | _PAGE_WRENABLE)
123# define PAGE_INVALID __pgprot(_PAGE_USER)
124 124
125# if (DCACHE_WAY_SIZE > PAGE_SIZE) 125#define PAGE_NONE __pgprot(_PAGE_INVALID | _PAGE_USER | _PAGE_PROTNONE)
126# define PAGE_DIRECTORY __pgprot(_PAGE_VALID | _PAGE_ACCESSED | _PAGE_KERNEL) 126#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER)
127# else 127#define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_HW_EXEC)
128# define PAGE_DIRECTORY __pgprot(_PAGE_PRESENT | _PAGE_KERNEL) 128#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER)
129# endif 129#define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_HW_EXEC)
130#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_WRITABLE)
131#define PAGE_SHARED_EXEC \
132 __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_WRITABLE | _PAGE_HW_EXEC)
133#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_HW_WRITE)
134#define PAGE_KERNEL_EXEC __pgprot(_PAGE_PRESENT|_PAGE_HW_WRITE|_PAGE_HW_EXEC)
135
136#if (DCACHE_WAY_SIZE > PAGE_SIZE)
137# define _PAGE_DIRECTORY (_PAGE_VALID | _PAGE_ACCESSED)
138#else
139# define _PAGE_DIRECTORY (_PAGE_VALID | _PAGE_ACCESSED | _PAGE_CA_WB)
140#endif
130 141
131#else /* no mmu */ 142#else /* no mmu */
132 143
@@ -145,23 +156,23 @@
145 * What follows is the closest we can get by reasonable means.. 156 * What follows is the closest we can get by reasonable means..
146 * See linux/mm/mmap.c for protection_map[] array that uses these definitions. 157 * See linux/mm/mmap.c for protection_map[] array that uses these definitions.
147 */ 158 */
148#define __P000 PAGE_NONE /* private --- */ 159#define __P000 PAGE_NONE /* private --- */
149#define __P001 PAGE_READONLY /* private --r */ 160#define __P001 PAGE_READONLY /* private --r */
150#define __P010 PAGE_COPY /* private -w- */ 161#define __P010 PAGE_COPY /* private -w- */
151#define __P011 PAGE_COPY /* private -wr */ 162#define __P011 PAGE_COPY /* private -wr */
152#define __P100 PAGE_READONLY /* private x-- */ 163#define __P100 PAGE_READONLY_EXEC /* private x-- */
153#define __P101 PAGE_READONLY /* private x-r */ 164#define __P101 PAGE_READONLY_EXEC /* private x-r */
154#define __P110 PAGE_COPY /* private xw- */ 165#define __P110 PAGE_COPY_EXEC /* private xw- */
155#define __P111 PAGE_COPY /* private xwr */ 166#define __P111 PAGE_COPY_EXEC /* private xwr */
156 167
157#define __S000 PAGE_NONE /* shared --- */ 168#define __S000 PAGE_NONE /* shared --- */
158#define __S001 PAGE_READONLY /* shared --r */ 169#define __S001 PAGE_READONLY /* shared --r */
159#define __S010 PAGE_SHARED /* shared -w- */ 170#define __S010 PAGE_SHARED /* shared -w- */
160#define __S011 PAGE_SHARED /* shared -wr */ 171#define __S011 PAGE_SHARED /* shared -wr */
161#define __S100 PAGE_READONLY /* shared x-- */ 172#define __S100 PAGE_READONLY_EXEC /* shared x-- */
162#define __S101 PAGE_READONLY /* shared x-r */ 173#define __S101 PAGE_READONLY_EXEC /* shared x-r */
163#define __S110 PAGE_SHARED /* shared xw- */ 174#define __S110 PAGE_SHARED_EXEC /* shared xw- */
164#define __S111 PAGE_SHARED /* shared xwr */ 175#define __S111 PAGE_SHARED_EXEC /* shared xwr */
165 176
166#ifndef __ASSEMBLY__ 177#ifndef __ASSEMBLY__
167 178
@@ -183,35 +194,42 @@ extern pgd_t swapper_pg_dir[PAGE_SIZE/sizeof(pgd_t)];
183#define pmd_page(pmd) virt_to_page(pmd_val(pmd)) 194#define pmd_page(pmd) virt_to_page(pmd_val(pmd))
184 195
185/* 196/*
186 * The following only work if pte_present() is true. 197 * pte status.
187 */ 198 */
188#define pte_none(pte) (!(pte_val(pte) ^ _PAGE_USER)) 199#define pte_none(pte) (pte_val(pte) == _PAGE_INVALID)
189#define pte_present(pte) (pte_val(pte) & _PAGE_VALID) 200#define pte_present(pte) \
201 (((pte_val(pte) & _PAGE_CA_MASK) != _PAGE_INVALID) \
202 || ((pte_val(pte) & _PAGE_PROTNONE) == _PAGE_PROTNONE))
190#define pte_clear(mm,addr,ptep) \ 203#define pte_clear(mm,addr,ptep) \
191 do { update_pte(ptep, __pte(_PAGE_USER)); } while(0) 204 do { update_pte(ptep, __pte(_PAGE_INVALID)); } while(0)
192 205
193#define pmd_none(pmd) (!pmd_val(pmd)) 206#define pmd_none(pmd) (!pmd_val(pmd))
194#define pmd_present(pmd) (pmd_val(pmd) & PAGE_MASK) 207#define pmd_present(pmd) (pmd_val(pmd) & PAGE_MASK)
195#define pmd_clear(pmdp) do { set_pmd(pmdp, __pmd(0)); } while (0)
196#define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK) 208#define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK)
209#define pmd_clear(pmdp) do { set_pmd(pmdp, __pmd(0)); } while (0)
197 210
198/* Note: We use the _PAGE_USER bit to indicate write-protect kernel memory */ 211static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITABLE; }
199
200static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; }
201static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } 212static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
202static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } 213static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
203static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } 214static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
204static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~(_PAGE_RW | _PAGE_WRENABLE); return pte; } 215static inline pte_t pte_wrprotect(pte_t pte)
205static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; } 216 { pte_val(pte) &= ~(_PAGE_WRITABLE | _PAGE_HW_WRITE); return pte; }
206static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } 217static inline pte_t pte_mkclean(pte_t pte)
207static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; } 218 { pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HW_WRITE); return pte; }
208static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; } 219static inline pte_t pte_mkold(pte_t pte)
209static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_RW; return pte; } 220 { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
221static inline pte_t pte_mkdirty(pte_t pte)
222 { pte_val(pte) |= _PAGE_DIRTY; return pte; }
223static inline pte_t pte_mkyoung(pte_t pte)
224 { pte_val(pte) |= _PAGE_ACCESSED; return pte; }
225static inline pte_t pte_mkwrite(pte_t pte)
226 { pte_val(pte) |= _PAGE_WRITABLE; return pte; }
210 227
211/* 228/*
212 * Conversion functions: convert a page and protection to a page entry, 229 * Conversion functions: convert a page and protection to a page entry,
213 * and a page entry and page directory to the page they refer to. 230 * and a page entry and page directory to the page they refer to.
214 */ 231 */
232
215#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) 233#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT)
216#define pte_same(a,b) (pte_val(a) == pte_val(b)) 234#define pte_same(a,b) (pte_val(a) == pte_val(b))
217#define pte_page(x) pfn_to_page(pte_pfn(x)) 235#define pte_page(x) pfn_to_page(pte_pfn(x))
@@ -232,8 +250,9 @@ static inline void update_pte(pte_t *ptep, pte_t pteval)
232{ 250{
233 *ptep = pteval; 251 *ptep = pteval;
234#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK 252#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
235 __asm__ __volatile__ ("memw; dhwb %0, 0; dsync" :: "a" (ptep)); 253 __asm__ __volatile__ ("dhwb %0, 0" :: "a" (ptep));
236#endif 254#endif
255
237} 256}
238 257
239struct mm_struct; 258struct mm_struct;
@@ -249,9 +268,6 @@ static inline void
249set_pmd(pmd_t *pmdp, pmd_t pmdval) 268set_pmd(pmd_t *pmdp, pmd_t pmdval)
250{ 269{
251 *pmdp = pmdval; 270 *pmdp = pmdval;
252#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
253 __asm__ __volatile__ ("memw; dhwb %0, 0; dsync" :: "a" (pmdp));
254#endif
255} 271}
256 272
257struct vm_area_struct; 273struct vm_area_struct;
@@ -306,52 +322,34 @@ ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
306 322
307/* 323/*
308 * Encode and decode a swap entry. 324 * Encode and decode a swap entry.
309 * Each PTE in a process VM's page table is either:
310 * "present" -- valid and not swapped out, protection bits are meaningful;
311 * "not present" -- which further subdivides in these two cases:
312 * "none" -- no mapping at all; identified by pte_none(), set by pte_clear(
313 * "swapped out" -- the page is swapped out, and the SWP macros below
314 * are used to store swap file info in the PTE itself.
315 * 325 *
316 * In the Xtensa processor MMU, any PTE entries in user space (or anywhere 326 * Format of swap pte:
317 * in virtual memory that can map differently across address spaces) 327 * bit 0 MBZ
318 * must have a correct ring value that represents the RASID field that 328 * bit 1 page-file (must be zero)
319 * is changed when switching address spaces. Eg. such PTE entries cannot 329 * bits 2 - 3 page hw access mode (must be 11: _PAGE_INVALID)
320 * be set to ring zero, because that can cause a (global) kernel ASID 330 * bits 4 - 5 ring protection (must be 01: _PAGE_USER)
321 * entry to be created in the TLBs (even with invalid cache attribute), 331 * bits 6 - 10 swap type (5 bits -> 32 types)
322 * potentially causing a multihit exception when going back to another 332 * bits 11 - 31 swap offset / PAGE_SIZE (21 bits -> 8GB)
323 * address space that mapped the same virtual address at another ring. 333
324 * 334 * Format of file pte:
325 * SO: we avoid using ring bits (_PAGE_RING_MASK) in "not present" PTEs. 335 * bit 0 MBZ
326 * We also avoid using the _PAGE_VALID bit which must be zero for non-present 336 * bit 1 page-file (must be one: _PAGE_FILE)
327 * pages. 337 * bits 2 - 3 page hw access mode (must be 11: _PAGE_INVALID)
328 * 338 * bits 4 - 5 ring protection (must be 01: _PAGE_USER)
329 * We end up with the following available bits: 1..3 and 7..31. 339 * bits 6 - 31 file offset / PAGE_SIZE
330 * We don't bother with 1..3 for now (we can use them later if needed),
331 * and chose to allocate 6 bits for SWP_TYPE and the remaining 19 bits
332 * for SWP_OFFSET. At least 5 bits are needed for SWP_TYPE, because it
333 * is currently implemented as an index into swap_info[MAX_SWAPFILES]
334 * and MAX_SWAPFILES is currently defined as 32 in <linux/swap.h>.
335 * However, for some reason all other architectures in the 2.4 kernel
336 * reserve either 6, 7, or 8 bits so I'll not detract from that for now. :)
337 * SWP_OFFSET is an offset into the swap file in page-size units, so
338 * with 4 kB pages, 19 bits supports a maximum swap file size of 2 GB.
339 *
340 * FIXME: 2 GB isn't very big. Other bits can be used to allow
341 * larger swap sizes. In the meantime, it appears relatively easy to get
342 * around the 2 GB limitation by simply using multiple swap files.
343 */ 340 */
344 341
345#define __swp_type(entry) (((entry).val >> 7) & 0x3f) 342#define __swp_type(entry) (((entry).val >> 6) & 0x1f)
346#define __swp_offset(entry) ((entry).val >> 13) 343#define __swp_offset(entry) ((entry).val >> 11)
347#define __swp_entry(type,offs) ((swp_entry_t) {((type) << 7) | ((offs) << 13)}) 344#define __swp_entry(type,offs) \
345 ((swp_entry_t) {((type) << 6) | ((offs) << 11) | _PAGE_INVALID})
348#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) 346#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
349#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) 347#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
350 348
351#define PTE_FILE_MAX_BITS 29 349#define PTE_FILE_MAX_BITS 28
352#define pte_to_pgoff(pte) (pte_val(pte) >> 3) 350#define pte_to_pgoff(pte) (pte_val(pte) >> 4)
353#define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE }) 351#define pgoff_to_pte(off) \
354 352 ((pte_t) { ((off) << 4) | _PAGE_INVALID | _PAGE_FILE })
355 353
356#endif /* !defined (__ASSEMBLY__) */ 354#endif /* !defined (__ASSEMBLY__) */
357 355
@@ -394,13 +392,12 @@ extern void update_mmu_cache(struct vm_area_struct * vma,
394 * remap a physical page `pfn' of size `size' with page protection `prot' 392 * remap a physical page `pfn' of size `size' with page protection `prot'
395 * into virtual address `from' 393 * into virtual address `from'
396 */ 394 */
395
397#define io_remap_pfn_range(vma,from,pfn,size,prot) \ 396#define io_remap_pfn_range(vma,from,pfn,size,prot) \
398 remap_pfn_range(vma, from, pfn, size, prot) 397 remap_pfn_range(vma, from, pfn, size, prot)
399 398
400 399
401/* No page table caches to init */ 400extern void pgtable_cache_init(void);
402
403#define pgtable_cache_init() do { } while (0)
404 401
405typedef pte_t *pte_addr_t; 402typedef pte_t *pte_addr_t;
406 403
diff --git a/include/asm-xtensa/processor.h b/include/asm-xtensa/processor.h
index 4feb9f7f35..35145bcd96 100644
--- a/include/asm-xtensa/processor.h
+++ b/include/asm-xtensa/processor.h
@@ -33,7 +33,7 @@
33 * the 1 GB requirement applies to the stack as well. 33 * the 1 GB requirement applies to the stack as well.
34 */ 34 */
35 35
36#define TASK_SIZE 0x40000000 36#define TASK_SIZE __XTENSA_UL_CONST(0x40000000)
37 37
38/* 38/*
39 * General exception cause assigned to debug exceptions. Debug exceptions go 39 * General exception cause assigned to debug exceptions. Debug exceptions go
diff --git a/include/asm-xtensa/syscall.h b/include/asm-xtensa/syscall.h
index 6cb0d42f11..05cebf8f62 100644
--- a/include/asm-xtensa/syscall.h
+++ b/include/asm-xtensa/syscall.h
@@ -1,3 +1,13 @@
1/*
2 * include/asm-xtensa/syscall.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2007 Tensilica Inc.
9 */
10
1struct pt_regs; 11struct pt_regs;
2struct sigaction; 12struct sigaction;
3asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*); 13asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*);
@@ -17,4 +27,16 @@ asmlinkage long sys_rt_sigaction(int,
17 const struct sigaction __user *, 27 const struct sigaction __user *,
18 struct sigaction __user *, 28 struct sigaction __user *,
19 size_t); 29 size_t);
20asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg); 30asmlinkage long xtensa_shmat(int, char __user *, int);
31asmlinkage long xtensa_fadvise64_64(int, int,
32 unsigned long long, unsigned long long);
33
34/* Should probably move to linux/syscalls.h */
35struct pollfd;
36asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp,
37 fd_set __user *exp, struct timespec __user *tsp, void __user *sig);
38asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds,
39 struct timespec __user *tsp, const sigset_t __user *sigmask,
40 size_t sigsetsize);
41
42
diff --git a/include/asm-xtensa/termbits.h b/include/asm-xtensa/termbits.h
index 9972c25ec8..85aa6a3c0b 100644
--- a/include/asm-xtensa/termbits.h
+++ b/include/asm-xtensa/termbits.h
@@ -157,6 +157,7 @@ struct ktermios {
157#define HUPCL 0002000 157#define HUPCL 0002000
158#define CLOCAL 0004000 158#define CLOCAL 0004000
159#define CBAUDEX 0010000 159#define CBAUDEX 0010000
160#define BOTHER 0010000
160#define B57600 0010001 161#define B57600 0010001
161#define B115200 0010002 162#define B115200 0010002
162#define B230400 0010003 163#define B230400 0010003
@@ -172,10 +173,12 @@ struct ktermios {
172#define B3000000 0010015 173#define B3000000 0010015
173#define B3500000 0010016 174#define B3500000 0010016
174#define B4000000 0010017 175#define B4000000 0010017
175#define CIBAUD 002003600000 /* input baud rate (not used) */ 176#define CIBAUD 002003600000 /* input baud rate */
176#define CMSPAR 010000000000 /* mark or space (stick) parity */ 177#define CMSPAR 010000000000 /* mark or space (stick) parity */
177#define CRTSCTS 020000000000 /* flow control */ 178#define CRTSCTS 020000000000 /* flow control */
178 179
180#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
181
179/* c_lflag bits */ 182/* c_lflag bits */
180 183
181#define ISIG 0000001 184#define ISIG 0000001
diff --git a/include/asm-xtensa/termios.h b/include/asm-xtensa/termios.h
index f14b42c8da..4673f42f88 100644
--- a/include/asm-xtensa/termios.h
+++ b/include/asm-xtensa/termios.h
@@ -95,8 +95,10 @@ struct termio {
95 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ 95 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
96}) 96})
97 97
98#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) 98#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
99#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) 99#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
100#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
101#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
100 102
101#endif /* __KERNEL__ */ 103#endif /* __KERNEL__ */
102 104
diff --git a/include/asm-xtensa/timex.h b/include/asm-xtensa/timex.h
index 28c7985a40..a5fca59fba 100644
--- a/include/asm-xtensa/timex.h
+++ b/include/asm-xtensa/timex.h
@@ -41,10 +41,10 @@
41extern unsigned long ccount_per_jiffy; 41extern unsigned long ccount_per_jiffy;
42extern unsigned long ccount_nsec; 42extern unsigned long ccount_nsec;
43#define CCOUNT_PER_JIFFY ccount_per_jiffy 43#define CCOUNT_PER_JIFFY ccount_per_jiffy
44#define CCOUNT_NSEC ccount_nsec 44#define NSEC_PER_CCOUNT ccount_nsec
45#else 45#else
46#define CCOUNT_PER_JIFFY (CONFIG_XTENSA_CPU_CLOCK*(1000000UL/HZ)) 46#define CCOUNT_PER_JIFFY (CONFIG_XTENSA_CPU_CLOCK*(1000000UL/HZ))
47#define CCOUNT_NSEC (1000000000UL / CONFIG_XTENSA_CPU_CLOCK) 47#define NSEC_PER_CCOUNT (1000UL / CONFIG_XTENSA_CPU_CLOCK)
48#endif 48#endif
49 49
50 50
diff --git a/include/asm-xtensa/tlb.h b/include/asm-xtensa/tlb.h
index 4562b2dcfb..4830232017 100644
--- a/include/asm-xtensa/tlb.h
+++ b/include/asm-xtensa/tlb.h
@@ -11,14 +11,36 @@
11#ifndef _XTENSA_TLB_H 11#ifndef _XTENSA_TLB_H
12#define _XTENSA_TLB_H 12#define _XTENSA_TLB_H
13 13
14#define tlb_start_vma(tlb,vma) do { } while (0) 14#include <asm/cache.h>
15#define tlb_end_vma(tlb,vma) do { } while (0) 15#include <asm/page.h>
16#define __tlb_remove_tlb_entry(tlb,pte,addr) do { } while (0) 16
17#if (DCACHE_WAY_SIZE <= PAGE_SIZE)
18
19/* Note, read http://lkml.org/lkml/2004/1/15/6 */
20
21# define tlb_start_vma(tlb,vma) do { } while (0)
22# define tlb_end_vma(tlb,vma) do { } while (0)
23
24#else
17 25
26# define tlb_start_vma(tlb, vma) \
27 do { \
28 if (!tlb->fullmm) \
29 flush_cache_range(vma, vma->vm_start, vma->vm_end); \
30 } while(0)
31
32# define tlb_end_vma(tlb, vma) \
33 do { \
34 if (!tlb->fullmm) \
35 flush_tlb_range(vma, vma->vm_start, vma->vm_end); \
36 } while(0)
37
38#endif
39
40#define __tlb_remove_tlb_entry(tlb,pte,addr) do { } while (0)
18#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) 41#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
19 42
20#include <asm-generic/tlb.h> 43#include <asm-generic/tlb.h>
21#include <asm/page.h>
22 44
23#define __pte_free_tlb(tlb,pte) pte_free(pte) 45#define __pte_free_tlb(tlb,pte) pte_free(pte)
24 46
diff --git a/include/asm-xtensa/types.h b/include/asm-xtensa/types.h
index 9d99a8e9e3..f1e84526f9 100644
--- a/include/asm-xtensa/types.h
+++ b/include/asm-xtensa/types.h
@@ -11,6 +11,15 @@
11#ifndef _XTENSA_TYPES_H 11#ifndef _XTENSA_TYPES_H
12#define _XTENSA_TYPES_H 12#define _XTENSA_TYPES_H
13 13
14
15#ifdef __ASSEMBLY__
16# define __XTENSA_UL(x) (x)
17# define __XTENSA_UL_CONST(x) x
18#else
19# define __XTENSA_UL(x) ((unsigned long)(x))
20# define __XTENSA_UL_CONST(x) x##UL
21#endif
22
14#ifndef __ASSEMBLY__ 23#ifndef __ASSEMBLY__
15 24
16typedef unsigned short umode_t; 25typedef unsigned short umode_t;
diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h
index 9bd3402443..92968aabe3 100644
--- a/include/asm-xtensa/unistd.h
+++ b/include/asm-xtensa/unistd.h
@@ -151,7 +151,7 @@ __SYSCALL( 61, sys_fcntl64, 3)
151#define __NR_available62 62 151#define __NR_available62 62
152__SYSCALL( 62, sys_ni_syscall, 0) 152__SYSCALL( 62, sys_ni_syscall, 0)
153#define __NR_fadvise64_64 63 153#define __NR_fadvise64_64 63
154__SYSCALL( 63, sys_fadvise64_64, 6) 154__SYSCALL( 63, xtensa_fadvise64_64, 6)
155#define __NR_utime 64 /* glibc 2.3.3 ?? */ 155#define __NR_utime 64 /* glibc 2.3.3 ?? */
156__SYSCALL( 64, sys_utime, 2) 156__SYSCALL( 64, sys_utime, 2)
157#define __NR_utimes 65 157#define __NR_utimes 65
@@ -339,8 +339,8 @@ __SYSCALL(148, sys_setpgid, 2)
339__SYSCALL(149, sys_getpgid, 1) 339__SYSCALL(149, sys_getpgid, 1)
340#define __NR_getppid 150 340#define __NR_getppid 150
341__SYSCALL(150, sys_getppid, 0) 341__SYSCALL(150, sys_getppid, 0)
342#define __NR_available151 151 342#define __NR_getpgrp 151
343__SYSCALL(151, sys_ni_syscall, 0) 343__SYSCALL(151, sys_getpgrp, 0)
344 344
345#define __NR_reserved152 152 /* set_thread_area */ 345#define __NR_reserved152 152 /* set_thread_area */
346__SYSCALL(152, sys_ni_syscall, 0) 346__SYSCALL(152, sys_ni_syscall, 0)
@@ -577,7 +577,112 @@ __SYSCALL(258, sys_keyctl, 5)
577#define __NR_available259 259 577#define __NR_available259 259
578__SYSCALL(259, sys_ni_syscall, 0) 578__SYSCALL(259, sys_ni_syscall, 0)
579 579
580#define __NR_syscall_count 261 580
581#define __NR_readahead 260
582__SYSCALL(260, sys_readahead, 5)
583#define __NR_remap_file_pages 261
584__SYSCALL(261, sys_remap_file_pages, 5)
585#define __NR_migrate_pages 262
586__SYSCALL(262, sys_migrate_pages, 0)
587#define __NR_mbind 263
588__SYSCALL(263, sys_mbind, 6)
589#define __NR_get_mempolicy 264
590__SYSCALL(264, sys_get_mempolicy, 5)
591#define __NR_set_mempolicy 265
592__SYSCALL(265, sys_set_mempolicy, 3)
593#define __NR_unshare 266
594__SYSCALL(266, sys_unshare, 1)
595#define __NR_move_pages 267
596__SYSCALL(267, sys_move_pages, 0)
597#define __NR_splice 268
598__SYSCALL(268, sys_splice, 0)
599#define __NR_tee 269
600__SYSCALL(269, sys_tee, 0)
601#define __NR_vmsplice 270
602__SYSCALL(270, sys_vmsplice, 0)
603#define __NR_available271 271
604__SYSCALL(271, sys_ni_syscall, 0)
605
606#define __NR_pselect6 272
607__SYSCALL(272, sys_pselect6, 0)
608#define __NR_ppoll 273
609__SYSCALL(273, sys_ppoll, 0)
610#define __NR_epoll_pwait 274
611__SYSCALL(274, sys_epoll_pwait, 0)
612#define __NR_available275 275
613__SYSCALL(275, sys_ni_syscall, 0)
614
615#define __NR_inotify_init 276
616__SYSCALL(276, sys_inotify_init, 0)
617#define __NR_inotify_add_watch 277
618__SYSCALL(277, sys_inotify_add_watch, 3)
619#define __NR_inotify_rm_watch 278
620__SYSCALL(278, sys_inotify_rm_watch, 2)
621#define __NR_available279 279
622__SYSCALL(279, sys_ni_syscall, 0)
623
624#define __NR_getcpu 280
625__SYSCALL(280, sys_getcpu, 0)
626#define __NR_kexec_load 281
627__SYSCALL(281, sys_ni_syscall, 0)
628
629#define __NR_ioprio_set 282
630__SYSCALL(282, sys_ioprio_set, 2)
631#define __NR_ioprio_get 283
632__SYSCALL(283, sys_ioprio_get, 3)
633
634#define __NR_set_robust_list 284
635__SYSCALL(284, sys_set_robust_list, 3)
636#define __NR_get_robust_list 285
637__SYSCALL(285, sys_get_robust_list, 3)
638#define __NR_reserved286 286 /* sync_file_rangeX */
639__SYSCALL(286, sys_ni_syscall, 3)
640#define __NR_available287 287
641__SYSCALL(287, sys_faccessat, 0)
642
643/* Relative File Operations */
644
645#define __NR_openat 288
646__SYSCALL(288, sys_openat, 4)
647#define __NR_mkdirat 289
648__SYSCALL(289, sys_mkdirat, 3)
649#define __NR_mknodat 290
650__SYSCALL(290, sys_mknodat, 4)
651#define __NR_unlinkat 291
652__SYSCALL(291, sys_unlinkat, 3)
653#define __NR_renameat 292
654__SYSCALL(292, sys_renameat, 4)
655#define __NR_linkat 293
656__SYSCALL(293, sys_linkat, 5)
657#define __NR_symlinkat 294
658__SYSCALL(294, sys_symlinkat, 3)
659#define __NR_readlinkat 295
660__SYSCALL(295, sys_readlinkat, 4)
661#define __NR_utimensat 296
662__SYSCALL(296, sys_utimensat, 0)
663#define __NR_fchownat 297
664__SYSCALL(297, sys_fchownat, 5)
665#define __NR_futimesat 298
666__SYSCALL(298, sys_futimesat, 4)
667#define __NR_fstatat64 299
668__SYSCALL(299, sys_fstatat64, 0)
669#define __NR_fchmodat 300
670__SYSCALL(300, sys_fchmodat, 4)
671#define __NR_faccessat 301
672__SYSCALL(301, sys_faccessat, 4)
673#define __NR_available302 302
674__SYSCALL(302, sys_ni_syscall, 0)
675#define __NR_available303 303
676__SYSCALL(303, sys_ni_syscall, 0)
677
678#define __NR_signalfd 304
679__SYSCALL(304, sys_signalfd, 3)
680#define __NR_timerfd 305
681__SYSCALL(305, sys_timerfd, 4)
682#define __NR_eventfd 306
683__SYSCALL(306, sys_eventfd, 1)
684
685#define __NR_syscall_count 307
581 686
582/* 687/*
583 * sysxtensa syscall handler 688 * sysxtensa syscall handler
@@ -612,8 +717,19 @@ __SYSCALL(259, sys_ni_syscall, 0)
612#define __ARCH_WANT_SYS_LLSEEK 717#define __ARCH_WANT_SYS_LLSEEK
613#define __ARCH_WANT_SYS_RT_SIGACTION 718#define __ARCH_WANT_SYS_RT_SIGACTION
614#define __ARCH_WANT_SYS_RT_SIGSUSPEND 719#define __ARCH_WANT_SYS_RT_SIGSUSPEND
720#define __ARCH_WANT_SYS_GETPGRP
615 721
616#endif /* __KERNEL__ */ 722/*
723 * Ignore legacy system calls in the checksyscalls.sh script
724 */
617 725
618#endif /* _XTENSA_UNISTD_H */ 726#define __IGNORE_fork /* use clone */
727#define __IGNORE_time
728#define __IGNORE_alarm /* use setitimer */
729#define __IGNORE_pause
730#define __IGNORE_mmap /* use mmap2 */
731#define __IGNORE_vfork /* use clone */
732#define __IGNORE_fadvise64 /* use fadvise64_64 */
619 733
734#endif /* __KERNEL__ */
735#endif /* _XTENSA_UNISTD_H */
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index ad7f71a81b..818cc3a50e 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -7,6 +7,7 @@ header-y += raid/
7header-y += spi/ 7header-y += spi/
8header-y += sunrpc/ 8header-y += sunrpc/
9header-y += tc_act/ 9header-y += tc_act/
10header-y += tc_ematch/
10header-y += netfilter/ 11header-y += netfilter/
11header-y += netfilter_arp/ 12header-y += netfilter_arp/
12header-y += netfilter_bridge/ 13header-y += netfilter_bridge/
diff --git a/include/linux/aer.h b/include/linux/aer.h
index 509656286e..bcf236d825 100644
--- a/include/linux/aer.h
+++ b/include/linux/aer.h
@@ -15,11 +15,26 @@ extern int pci_disable_pcie_error_reporting(struct pci_dev *dev);
15extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); 15extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev);
16extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev); 16extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev);
17#else 17#else
18#define pci_enable_pcie_error_reporting(dev) (-EINVAL) 18static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev)
19#define pci_find_aer_capability(dev) (0) 19{
20#define pci_disable_pcie_error_reporting(dev) (-EINVAL) 20 return -EINVAL;
21#define pci_cleanup_aer_uncorrect_error_status(dev) (-EINVAL) 21}
22#define pci_cleanup_aer_correct_error_status(dev) (-EINVAL) 22static inline int pci_find_aer_capability(struct pci_dev *dev)
23{
24 return 0;
25}
26static inline int pci_disable_pcie_error_reporting(struct pci_dev *dev)
27{
28 return -EINVAL;
29}
30static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev)
31{
32 return -EINVAL;
33}
34static inline int pci_cleanup_aer_correct_error_status(struct pci_dev *dev)
35{
36 return -EINVAL;
37}
23#endif 38#endif
24 39
25#endif //_AER_H_ 40#endif //_AER_H_
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 23a22df039..c043c1ccf1 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -73,6 +73,19 @@ enum {
73 ATA_PIO5 = ATA_PIO4 | (1 << 5), 73 ATA_PIO5 = ATA_PIO4 | (1 << 5),
74 ATA_PIO6 = ATA_PIO5 | (1 << 6), 74 ATA_PIO6 = ATA_PIO5 | (1 << 6),
75 75
76 ATA_SWDMA0 = (1 << 0),
77 ATA_SWDMA1 = ATA_SWDMA0 | (1 << 1),
78 ATA_SWDMA2 = ATA_SWDMA1 | (1 << 2),
79
80 ATA_SWDMA2_ONLY = (1 << 2),
81
82 ATA_MWDMA0 = (1 << 0),
83 ATA_MWDMA1 = ATA_MWDMA0 | (1 << 1),
84 ATA_MWDMA2 = ATA_MWDMA1 | (1 << 2),
85
86 ATA_MWDMA12_ONLY = (1 << 1) | (1 << 2),
87 ATA_MWDMA2_ONLY = (1 << 2),
88
76 ATA_UDMA0 = (1 << 0), 89 ATA_UDMA0 = (1 << 0),
77 ATA_UDMA1 = ATA_UDMA0 | (1 << 1), 90 ATA_UDMA1 = ATA_UDMA0 | (1 << 1),
78 ATA_UDMA2 = ATA_UDMA1 | (1 << 2), 91 ATA_UDMA2 = ATA_UDMA1 | (1 << 2),
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 4bbd8601b8..d6579df8da 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -63,8 +63,8 @@
63#define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */ 63#define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */
64#define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */ 64#define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */
65#define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */ 65#define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */
66#define AUDIT_TTY_GET 1014 /* Get TTY auditing status */ 66#define AUDIT_TTY_GET 1016 /* Get TTY auditing status */
67#define AUDIT_TTY_SET 1015 /* Set TTY auditing status */ 67#define AUDIT_TTY_SET 1017 /* Set TTY auditing status */
68 68
69#define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ 69#define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */
70#define AUDIT_USER_AVC 1107 /* We filter this differently */ 70#define AUDIT_USER_AVC 1107 /* We filter this differently */
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 1d5ded0836..0ad72c4cf3 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -126,16 +126,16 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex)
126static inline int cpu_is_offline(int cpu) { return 0; } 126static inline int cpu_is_offline(int cpu) { return 0; }
127#endif /* CONFIG_HOTPLUG_CPU */ 127#endif /* CONFIG_HOTPLUG_CPU */
128 128
129#ifdef CONFIG_SUSPEND_SMP 129#ifdef CONFIG_PM_SLEEP_SMP
130extern int suspend_cpu_hotplug; 130extern int suspend_cpu_hotplug;
131 131
132extern int disable_nonboot_cpus(void); 132extern int disable_nonboot_cpus(void);
133extern void enable_nonboot_cpus(void); 133extern void enable_nonboot_cpus(void);
134#else 134#else /* !CONFIG_PM_SLEEP_SMP */
135#define suspend_cpu_hotplug 0 135#define suspend_cpu_hotplug 0
136 136
137static inline int disable_nonboot_cpus(void) { return 0; } 137static inline int disable_nonboot_cpus(void) { return 0; }
138static inline void enable_nonboot_cpus(void) {} 138static inline void enable_nonboot_cpus(void) {}
139#endif 139#endif /* !CONFIG_PM_SLEEP_SMP */
140 140
141#endif /* _LINUX_CPU_H_ */ 141#endif /* _LINUX_CPU_H_ */
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 963051a967..3ec6e7ff5f 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -32,15 +32,7 @@
32 * CPUFREQ NOTIFIER INTERFACE * 32 * CPUFREQ NOTIFIER INTERFACE *
33 *********************************************************************/ 33 *********************************************************************/
34 34
35#ifdef CONFIG_CPU_FREQ
36int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); 35int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);
37#else
38static inline int cpufreq_register_notifier(struct notifier_block *nb,
39 unsigned int list)
40{
41 return 0;
42}
43#endif
44int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); 36int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list);
45 37
46#define CPUFREQ_TRANSITION_NOTIFIER (0) 38#define CPUFREQ_TRANSITION_NOTIFIER (0)
@@ -268,22 +260,17 @@ struct freq_attr {
268int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); 260int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu);
269int cpufreq_update_policy(unsigned int cpu); 261int cpufreq_update_policy(unsigned int cpu);
270 262
263/* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */
264unsigned int cpufreq_get(unsigned int cpu);
271 265
272/* 266/* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */
273 * query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it
274 */
275#ifdef CONFIG_CPU_FREQ 267#ifdef CONFIG_CPU_FREQ
276unsigned int cpufreq_quick_get(unsigned int cpu); 268unsigned int cpufreq_quick_get(unsigned int cpu);
277unsigned int cpufreq_get(unsigned int cpu);
278#else 269#else
279static inline unsigned int cpufreq_quick_get(unsigned int cpu) 270static inline unsigned int cpufreq_quick_get(unsigned int cpu)
280{ 271{
281 return 0; 272 return 0;
282} 273}
283static inline unsigned int cpufreq_get(unsigned int cpu)
284{
285 return 0;
286}
287#endif 274#endif
288 275
289 276
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index e6a71c82d2..3a19b032c0 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -66,11 +66,8 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
66 * If the arch doesn't supply something else, assume that hugepage 66 * If the arch doesn't supply something else, assume that hugepage
67 * size aligned regions are ok without further preparation. 67 * size aligned regions are ok without further preparation.
68 */ 68 */
69static inline int prepare_hugepage_range(unsigned long addr, unsigned long len, 69static inline int prepare_hugepage_range(unsigned long addr, unsigned long len)
70 pgoff_t pgoff)
71{ 70{
72 if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT))
73 return -EINVAL;
74 if (len & ~HPAGE_MASK) 71 if (len & ~HPAGE_MASK)
75 return -EINVAL; 72 return -EINVAL;
76 if (addr & ~HPAGE_MASK) 73 if (addr & ~HPAGE_MASK)
@@ -78,8 +75,7 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len,
78 return 0; 75 return 0;
79} 76}
80#else 77#else
81int prepare_hugepage_range(unsigned long addr, unsigned long len, 78int prepare_hugepage_range(unsigned long addr, unsigned long len);
82 pgoff_t pgoff);
83#endif 79#endif
84 80
85#ifndef ARCH_HAS_SETCLEAR_HUGE_PTE 81#ifndef ARCH_HAS_SETCLEAR_HUGE_PTE
@@ -117,7 +113,7 @@ static inline unsigned long hugetlb_total_pages(void)
117#define hugetlb_report_meminfo(buf) 0 113#define hugetlb_report_meminfo(buf) 0
118#define hugetlb_report_node_meminfo(n, buf) 0 114#define hugetlb_report_node_meminfo(n, buf) 0
119#define follow_huge_pmd(mm, addr, pmd, write) NULL 115#define follow_huge_pmd(mm, addr, pmd, write) NULL
120#define prepare_hugepage_range(addr,len,pgoff) (-EINVAL) 116#define prepare_hugepage_range(addr,len) (-EINVAL)
121#define pmd_huge(x) 0 117#define pmd_huge(x) 0
122#define is_hugepage_only_range(mm, addr, len) 0 118#define is_hugepage_only_range(mm, addr, len) 0
123#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) 119#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })
diff --git a/include/linux/ide.h b/include/linux/ide.h
index c792b4fd15..b9f66c10ca 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1378,6 +1378,19 @@ static inline int ide_dev_has_iordy(struct hd_driveid *id)
1378 return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0; 1378 return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0;
1379} 1379}
1380 1380
1381static inline int ide_dev_is_sata(struct hd_driveid *id)
1382{
1383 /*
1384 * See if word 93 is 0 AND drive is at least ATA-5 compatible
1385 * verifying that word 80 by casting it to a signed type --
1386 * this trick allows us to filter out the reserved values of
1387 * 0x0000 and 0xffff along with the earlier ATA revisions...
1388 */
1389 if (id->hw_config == 0 && (short)id->major_rev_num >= 0x0020)
1390 return 1;
1391 return 0;
1392}
1393
1381u8 ide_dump_status(ide_drive_t *, const char *, u8); 1394u8 ide_dump_status(ide_drive_t *, const char *, u8);
1382 1395
1383typedef struct ide_pio_timings_s { 1396typedef struct ide_pio_timings_s {
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h
index 516203b6fd..a7d6a2234b 100644
--- a/include/linux/if_pppol2tp.h
+++ b/include/linux/if_pppol2tp.h
@@ -32,8 +32,8 @@ struct pppol2tp_addr
32 32
33 struct sockaddr_in addr; /* IP address and port to send to */ 33 struct sockaddr_in addr; /* IP address and port to send to */
34 34
35 __be16 s_tunnel, s_session; /* For matching incoming packets */ 35 __u16 s_tunnel, s_session; /* For matching incoming packets */
36 __be16 d_tunnel, d_session; /* For sending outgoing packets */ 36 __u16 d_tunnel, d_session; /* For sending outgoing packets */
37}; 37};
38 38
39/* Socket options: 39/* Socket options:
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index cab741c2d6..f8abfa349e 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -86,7 +86,7 @@ extern struct nsproxy init_nsproxy;
86 .count = ATOMIC_INIT(1), \ 86 .count = ATOMIC_INIT(1), \
87 .action = { { { .sa_handler = NULL, } }, }, \ 87 .action = { { { .sa_handler = NULL, } }, }, \
88 .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \ 88 .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \
89 .signalfd_list = LIST_HEAD_INIT(sighand.signalfd_list), \ 89 .signalfd_wqh = __WAIT_QUEUE_HEAD_INITIALIZER(sighand.signalfd_wqh), \
90} 90}
91 91
92extern struct group_info init_groups; 92extern struct group_info init_groups;
diff --git a/include/linux/input.h b/include/linux/input.h
index e02c6a66b2..36e00aa6f0 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -363,6 +363,12 @@ struct input_absinfo {
363 363
364#define KEY_UNKNOWN 240 364#define KEY_UNKNOWN 240
365 365
366#define KEY_VIDEO_NEXT 241 /* drive next video source */
367#define KEY_VIDEO_PREV 242 /* drive previous video source */
368#define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */
369#define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */
370#define KEY_DISPLAY_OFF 245 /* display device to off state */
371
366#define BTN_MISC 0x100 372#define BTN_MISC 0x100
367#define BTN_0 0x100 373#define BTN_0 0x100
368#define BTN_1 0x101 374#define BTN_1 0x101
@@ -552,6 +558,8 @@ struct input_absinfo {
552#define KEY_BRL_DOT6 0x1f6 558#define KEY_BRL_DOT6 0x1f6
553#define KEY_BRL_DOT7 0x1f7 559#define KEY_BRL_DOT7 0x1f7
554#define KEY_BRL_DOT8 0x1f8 560#define KEY_BRL_DOT8 0x1f8
561#define KEY_BRL_DOT9 0x1f9
562#define KEY_BRL_DOT10 0x1fa
555 563
556/* We avoid low common keys in module aliases so they don't get huge. */ 564/* We avoid low common keys in module aliases so they don't get huge. */
557#define KEY_MIN_INTERESTING KEY_MUTE 565#define KEY_MIN_INTERESTING KEY_MUTE
diff --git a/include/linux/isa.h b/include/linux/isa.h
index 1b855335cb..b0270e3814 100644
--- a/include/linux/isa.h
+++ b/include/linux/isa.h
@@ -22,7 +22,18 @@ struct isa_driver {
22 22
23#define to_isa_driver(x) container_of((x), struct isa_driver, driver) 23#define to_isa_driver(x) container_of((x), struct isa_driver, driver)
24 24
25#ifdef CONFIG_ISA
25int isa_register_driver(struct isa_driver *, unsigned int); 26int isa_register_driver(struct isa_driver *, unsigned int);
26void isa_unregister_driver(struct isa_driver *); 27void isa_unregister_driver(struct isa_driver *);
28#else
29static inline int isa_register_driver(struct isa_driver *d, unsigned int i)
30{
31 return 0;
32}
33
34static inline void isa_unregister_driver(struct isa_driver *d)
35{
36}
37#endif
27 38
28#endif /* __LINUX_ISA_H */ 39#endif /* __LINUX_ISA_H */
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index f592df74b3..47160fe378 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -34,6 +34,7 @@ extern const char linux_proc_banner[];
34 34
35#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) 35#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
36#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) 36#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
37#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
37 38
38#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) 39#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
39 40
diff --git a/include/linux/keyboard.h b/include/linux/keyboard.h
index de76843bbe..7ddbc30aa8 100644
--- a/include/linux/keyboard.h
+++ b/include/linux/keyboard.h
@@ -437,8 +437,10 @@ extern unsigned short plain_map[NR_KEYS];
437#define K_BRL_DOT6 K(KT_BRL, 6) 437#define K_BRL_DOT6 K(KT_BRL, 6)
438#define K_BRL_DOT7 K(KT_BRL, 7) 438#define K_BRL_DOT7 K(KT_BRL, 7)
439#define K_BRL_DOT8 K(KT_BRL, 8) 439#define K_BRL_DOT8 K(KT_BRL, 8)
440#define K_BRL_DOT9 K(KT_BRL, 9)
441#define K_BRL_DOT10 K(KT_BRL, 10)
440 442
441#define NR_BRL 9 443#define NR_BRL 11
442 444
443#define MAX_DIACR 256 445#define MAX_DIACR 256
444#endif 446#endif
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 421175092e..dc1178f618 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -13,6 +13,7 @@
13#define __LINUX_LEDS_H_INCLUDED 13#define __LINUX_LEDS_H_INCLUDED
14 14
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/spinlock.h>
16 17
17struct device; 18struct device;
18/* 19/*
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 41978a5573..a67bb9075e 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -303,6 +303,7 @@ enum {
303 ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ 303 ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */
304 ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ 304 ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */
305 ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ 305 ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */
306 ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */
306}; 307};
307 308
308enum hsm_task_states { 309enum hsm_task_states {
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 5bdd656e88..a020eb2d4e 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -159,7 +159,7 @@ extern void mpol_fix_fork_child_flag(struct task_struct *p);
159 159
160extern struct mempolicy default_policy; 160extern struct mempolicy default_policy;
161extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, 161extern struct zonelist *huge_zonelist(struct vm_area_struct *vma,
162 unsigned long addr, gfp_t gfp_flags); 162 unsigned long addr, gfp_t gfp_flags, struct mempolicy **mpol);
163extern unsigned slab_node(struct mempolicy *policy); 163extern unsigned slab_node(struct mempolicy *policy);
164 164
165extern enum zone_type policy_zone; 165extern enum zone_type policy_zone;
@@ -256,7 +256,7 @@ static inline void mpol_fix_fork_child_flag(struct task_struct *p)
256#define set_cpuset_being_rebound(x) do {} while (0) 256#define set_cpuset_being_rebound(x) do {} while (0)
257 257
258static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, 258static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma,
259 unsigned long addr, gfp_t gfp_flags) 259 unsigned long addr, gfp_t gfp_flags, struct mempolicy **mpol)
260{ 260{
261 return NODE_DATA(0)->node_zonelists + gfp_zone(gfp_flags); 261 return NODE_DATA(0)->node_zonelists + gfp_zone(gfp_flags);
262} 262}
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 0eed0b7ab2..1dd075eda5 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -88,9 +88,8 @@ struct nf_sockopt_ops
88 int (*compat_get)(struct sock *sk, int optval, 88 int (*compat_get)(struct sock *sk, int optval,
89 void __user *user, int *len); 89 void __user *user, int *len);
90 90
91 /* Number of users inside set() or get(). */ 91 /* Use the module struct to lock set/get code in place */
92 unsigned int use; 92 struct module *owner;
93 struct task_struct *cleanup_task;
94}; 93};
95 94
96/* Each queued (to userspace) skbuff has one of these. */ 95/* Each queued (to userspace) skbuff has one of these. */
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 157dcb055b..7250eeadd7 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -431,6 +431,7 @@ extern int nfs_sync_mapping_range(struct address_space *, loff_t, loff_t, int);
431extern int nfs_wb_all(struct inode *inode); 431extern int nfs_wb_all(struct inode *inode);
432extern int nfs_wb_page(struct inode *inode, struct page* page); 432extern int nfs_wb_page(struct inode *inode, struct page* page);
433extern int nfs_wb_page_priority(struct inode *inode, struct page* page, int how); 433extern int nfs_wb_page_priority(struct inode *inode, struct page* page, int how);
434extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
434#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) 435#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
435extern int nfs_commit_inode(struct inode *, int); 436extern int nfs_commit_inode(struct inode *, int);
436extern struct nfs_write_data *nfs_commit_alloc(void); 437extern struct nfs_write_data *nfs_commit_alloc(void);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index e7d8d4e19a..038a0dc727 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -557,6 +557,7 @@ int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
557int pcix_get_max_mmrbc(struct pci_dev *dev); 557int pcix_get_max_mmrbc(struct pci_dev *dev);
558int pcix_get_mmrbc(struct pci_dev *dev); 558int pcix_get_mmrbc(struct pci_dev *dev);
559int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); 559int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc);
560int pcie_get_readrq(struct pci_dev *dev);
560int pcie_set_readrq(struct pci_dev *dev, int rq); 561int pcie_set_readrq(struct pci_dev *dev, int rq);
561void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); 562void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
562int __must_check pci_assign_resource(struct pci_dev *dev, int i); 563int __must_check pci_assign_resource(struct pci_dev *dev, int i);
@@ -578,6 +579,9 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
578pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); 579pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
579int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); 580int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);
580 581
582/* Functions for PCI Hotplug drivers to use */
583int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap);
584
581/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ 585/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
582void pci_bus_assign_resources(struct pci_bus *bus); 586void pci_bus_assign_resources(struct pci_bus *bus);
583void pci_bus_size_bridges(struct pci_bus *bus); 587void pci_bus_size_bridges(struct pci_bus *bus);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 8938d59013..55f307ffbf 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -360,6 +360,9 @@
360#define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 360#define PCI_DEVICE_ID_ATI_RS400_166 0x5a32
361#define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 361#define PCI_DEVICE_ID_ATI_RS400_200 0x5a33
362#define PCI_DEVICE_ID_ATI_RS480 0x5950 362#define PCI_DEVICE_ID_ATI_RS480 0x5950
363#define PCI_DEVICE_ID_ATI_RD580 0x5952
364#define PCI_DEVICE_ID_ATI_RX790 0x5957
365#define PCI_DEVICE_ID_ATI_RS690 0x7910
363/* ATI IXP Chipset */ 366/* ATI IXP Chipset */
364#define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 367#define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349
365#define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 368#define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353
@@ -371,10 +374,9 @@
371#define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379 374#define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379
372#define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a 375#define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a
373#define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 376#define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380
374#define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 377#define PCI_DEVICE_ID_ATI_SBX00_SMBUS 0x4385
375#define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c 378#define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c
376#define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 379#define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390
377#define PCI_DEVICE_ID_ATI_IXP700_SMBUS 0x4395
378#define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c 380#define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c
379 381
380#define PCI_VENDOR_ID_VLSI 0x1004 382#define PCI_VENDOR_ID_VLSI 0x1004
@@ -1287,6 +1289,7 @@
1287#define PCI_DEVICE_ID_VIA_VT3324 0x0324 1289#define PCI_DEVICE_ID_VIA_VT3324 0x0324
1288#define PCI_DEVICE_ID_VIA_VT3336 0x0336 1290#define PCI_DEVICE_ID_VIA_VT3336 0x0336
1289#define PCI_DEVICE_ID_VIA_VT3351 0x0351 1291#define PCI_DEVICE_ID_VIA_VT3351 0x0351
1292#define PCI_DEVICE_ID_VIA_VT3364 0x0364
1290#define PCI_DEVICE_ID_VIA_8371_0 0x0391 1293#define PCI_DEVICE_ID_VIA_8371_0 0x0391
1291#define PCI_DEVICE_ID_VIA_8501_0 0x0501 1294#define PCI_DEVICE_ID_VIA_8501_0 0x0501
1292#define PCI_DEVICE_ID_VIA_82C561 0x0561 1295#define PCI_DEVICE_ID_VIA_82C561 0x0561
@@ -1340,6 +1343,7 @@
1340#define PCI_DEVICE_ID_VIA_8231_4 0x8235 1343#define PCI_DEVICE_ID_VIA_8231_4 0x8235
1341#define PCI_DEVICE_ID_VIA_8365_1 0x8305 1344#define PCI_DEVICE_ID_VIA_8365_1 0x8305
1342#define PCI_DEVICE_ID_VIA_CX700 0x8324 1345#define PCI_DEVICE_ID_VIA_CX700 0x8324
1346#define PCI_DEVICE_ID_VIA_VX800 0x8353
1343#define PCI_DEVICE_ID_VIA_8371_1 0x8391 1347#define PCI_DEVICE_ID_VIA_8371_1 0x8391
1344#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 1348#define PCI_DEVICE_ID_VIA_82C598_1 0x8598
1345#define PCI_DEVICE_ID_VIA_838X_1 0xB188 1349#define PCI_DEVICE_ID_VIA_838X_1 0xB188
@@ -2289,6 +2293,8 @@
2289#define PCI_DEVICE_ID_INTEL_MCH_PC 0x3599 2293#define PCI_DEVICE_ID_INTEL_MCH_PC 0x3599
2290#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a 2294#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a
2291#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e 2295#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e
2296#define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031
2297#define PCI_DEVICE_ID_INTEL_TOLAPAI_1 0x5032
2292#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 2298#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000
2293#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010 2299#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010
2294#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020 2300#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020
diff --git a/include/linux/pmu.h b/include/linux/pmu.h
index 5ad913ff02..b7824c2153 100644
--- a/include/linux/pmu.h
+++ b/include/linux/pmu.h
@@ -226,7 +226,7 @@ extern unsigned int pmu_power_flags;
226extern void pmu_backlight_init(void); 226extern void pmu_backlight_init(void);
227 227
228/* some code needs to know if the PMU was suspended for hibernation */ 228/* some code needs to know if the PMU was suspended for hibernation */
229#if defined(CONFIG_PM) && defined(CONFIG_PPC32) 229#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
230extern int pmu_sys_suspended; 230extern int pmu_sys_suspended;
231#else 231#else
232/* if power management is not configured it can't be suspended */ 232/* if power management is not configured it can't be suspended */
diff --git a/include/linux/poll.h b/include/linux/poll.h
index 2769079862..16d813b364 100644
--- a/include/linux/poll.h
+++ b/include/linux/poll.h
@@ -21,6 +21,8 @@
21#define WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC) 21#define WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC)
22#define N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry)) 22#define N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry))
23 23
24#define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
25
24struct poll_table_struct; 26struct poll_table_struct;
25 27
26/* 28/*
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index c91476ce31..dff3192374 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -351,6 +351,8 @@ enum
351#define RTAX_INITCWND RTAX_INITCWND 351#define RTAX_INITCWND RTAX_INITCWND
352 RTAX_FEATURES, 352 RTAX_FEATURES,
353#define RTAX_FEATURES RTAX_FEATURES 353#define RTAX_FEATURES RTAX_FEATURES
354 RTAX_RTO_MIN,
355#define RTAX_RTO_MIN RTAX_RTO_MIN
354 __RTAX_MAX 356 __RTAX_MAX
355}; 357};
356 358
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 682ef87da6..313c6b6e77 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -113,7 +113,7 @@ extern unsigned long avenrun[]; /* Load averages */
113 113
114#define FSHIFT 11 /* nr of bits of precision */ 114#define FSHIFT 11 /* nr of bits of precision */
115#define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ 115#define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */
116#define LOAD_FREQ (5*HZ) /* 5 sec intervals */ 116#define LOAD_FREQ (5*HZ+1) /* 5 sec intervals */
117#define EXP_1 1884 /* 1/exp(5sec/1min) as fixed-point */ 117#define EXP_1 1884 /* 1/exp(5sec/1min) as fixed-point */
118#define EXP_5 2014 /* 1/exp(5sec/5min) */ 118#define EXP_5 2014 /* 1/exp(5sec/5min) */
119#define EXP_15 2037 /* 1/exp(5sec/15min) */ 119#define EXP_15 2037 /* 1/exp(5sec/15min) */
@@ -438,7 +438,7 @@ struct sighand_struct {
438 atomic_t count; 438 atomic_t count;
439 struct k_sigaction action[_NSIG]; 439 struct k_sigaction action[_NSIG];
440 spinlock_t siglock; 440 spinlock_t siglock;
441 struct list_head signalfd_list; 441 wait_queue_head_t signalfd_wqh;
442}; 442};
443 443
444struct pacct_struct { 444struct pacct_struct {
@@ -593,7 +593,7 @@ struct user_struct {
593#endif 593#endif
594 594
595 /* Hash table maintenance information */ 595 /* Hash table maintenance information */
596 struct list_head uidhash_list; 596 struct hlist_node uidhash_node;
597 uid_t uid; 597 uid_t uid;
598}; 598};
599 599
@@ -681,7 +681,7 @@ enum cpu_idle_type {
681#define SCHED_LOAD_SHIFT 10 681#define SCHED_LOAD_SHIFT 10
682#define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) 682#define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT)
683 683
684#define SCHED_LOAD_SCALE_FUZZ (SCHED_LOAD_SCALE >> 1) 684#define SCHED_LOAD_SCALE_FUZZ SCHED_LOAD_SCALE
685 685
686#ifdef CONFIG_SMP 686#ifdef CONFIG_SMP
687#define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ 687#define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */
@@ -904,6 +904,7 @@ struct sched_entity {
904 904
905 u64 exec_start; 905 u64 exec_start;
906 u64 sum_exec_runtime; 906 u64 sum_exec_runtime;
907 u64 prev_sum_exec_runtime;
907 u64 wait_start_fair; 908 u64 wait_start_fair;
908 u64 sleep_start_fair; 909 u64 sleep_start_fair;
909 910
@@ -1388,7 +1389,8 @@ extern void sched_exec(void);
1388#define sched_exec() {} 1389#define sched_exec() {}
1389#endif 1390#endif
1390 1391
1391extern void sched_clock_unstable_event(void); 1392extern void sched_clock_idle_sleep_event(void);
1393extern void sched_clock_idle_wakeup_event(u64 delta_ns);
1392 1394
1393#ifdef CONFIG_HOTPLUG_CPU 1395#ifdef CONFIG_HOTPLUG_CPU
1394extern void idle_task_exit(void); 1396extern void idle_task_exit(void);
@@ -1398,11 +1400,13 @@ static inline void idle_task_exit(void) {}
1398 1400
1399extern void sched_idle_next(void); 1401extern void sched_idle_next(void);
1400 1402
1401extern unsigned int sysctl_sched_granularity; 1403extern unsigned int sysctl_sched_latency;
1404extern unsigned int sysctl_sched_min_granularity;
1402extern unsigned int sysctl_sched_wakeup_granularity; 1405extern unsigned int sysctl_sched_wakeup_granularity;
1403extern unsigned int sysctl_sched_batch_wakeup_granularity; 1406extern unsigned int sysctl_sched_batch_wakeup_granularity;
1404extern unsigned int sysctl_sched_stat_granularity; 1407extern unsigned int sysctl_sched_stat_granularity;
1405extern unsigned int sysctl_sched_runtime_limit; 1408extern unsigned int sysctl_sched_runtime_limit;
1409extern unsigned int sysctl_sched_compat_yield;
1406extern unsigned int sysctl_sched_child_runs_first; 1410extern unsigned int sysctl_sched_child_runs_first;
1407extern unsigned int sysctl_sched_features; 1411extern unsigned int sysctl_sched_features;
1408 1412
@@ -1469,6 +1473,7 @@ static inline struct user_struct *get_uid(struct user_struct *u)
1469} 1473}
1470extern void free_uid(struct user_struct *); 1474extern void free_uid(struct user_struct *);
1471extern void switch_uid(struct user_struct *); 1475extern void switch_uid(struct user_struct *);
1476extern void release_uids(struct user_namespace *ns);
1472 1477
1473#include <asm/current.h> 1478#include <asm/current.h>
1474 1479
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h
index 5104294956..4c9ff0910a 100644
--- a/include/linux/signalfd.h
+++ b/include/linux/signalfd.h
@@ -45,49 +45,17 @@ struct signalfd_siginfo {
45#ifdef CONFIG_SIGNALFD 45#ifdef CONFIG_SIGNALFD
46 46
47/* 47/*
48 * Deliver the signal to listening signalfd. This must be called 48 * Deliver the signal to listening signalfd.
49 * with the sighand lock held. Same are the following that end up
50 * calling signalfd_deliver().
51 */
52void signalfd_deliver(struct task_struct *tsk, int sig);
53
54/*
55 * No need to fall inside signalfd_deliver() if no signal listeners
56 * are available.
57 */ 49 */
58static inline void signalfd_notify(struct task_struct *tsk, int sig) 50static inline void signalfd_notify(struct task_struct *tsk, int sig)
59{ 51{
60 if (unlikely(!list_empty(&tsk->sighand->signalfd_list))) 52 if (unlikely(waitqueue_active(&tsk->sighand->signalfd_wqh)))
61 signalfd_deliver(tsk, sig); 53 wake_up(&tsk->sighand->signalfd_wqh);
62}
63
64/*
65 * The signal -1 is used to notify the signalfd that the sighand
66 * is on its way to be detached.
67 */
68static inline void signalfd_detach_locked(struct task_struct *tsk)
69{
70 if (unlikely(!list_empty(&tsk->sighand->signalfd_list)))
71 signalfd_deliver(tsk, -1);
72}
73
74static inline void signalfd_detach(struct task_struct *tsk)
75{
76 struct sighand_struct *sighand = tsk->sighand;
77
78 if (unlikely(!list_empty(&sighand->signalfd_list))) {
79 spin_lock_irq(&sighand->siglock);
80 signalfd_deliver(tsk, -1);
81 spin_unlock_irq(&sighand->siglock);
82 }
83} 54}
84 55
85#else /* CONFIG_SIGNALFD */ 56#else /* CONFIG_SIGNALFD */
86 57
87#define signalfd_deliver(t, s) do { } while (0) 58static inline void signalfd_notify(struct task_struct *tsk, int sig) { }
88#define signalfd_notify(t, s) do { } while (0)
89#define signalfd_detach_locked(t) do { } while (0)
90#define signalfd_detach(t) do { } while (0)
91 59
92#endif /* CONFIG_SIGNALFD */ 60#endif /* CONFIG_SIGNALFD */
93 61
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 93c27f7112..a656cecd37 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1352,6 +1352,22 @@ static inline int skb_clone_writable(struct sk_buff *skb, int len)
1352 skb_headroom(skb) + len <= skb->hdr_len; 1352 skb_headroom(skb) + len <= skb->hdr_len;
1353} 1353}
1354 1354
1355static inline int __skb_cow(struct sk_buff *skb, unsigned int headroom,
1356 int cloned)
1357{
1358 int delta = 0;
1359
1360 if (headroom < NET_SKB_PAD)
1361 headroom = NET_SKB_PAD;
1362 if (headroom > skb_headroom(skb))
1363 delta = headroom - skb_headroom(skb);
1364
1365 if (delta || cloned)
1366 return pskb_expand_head(skb, ALIGN(delta, NET_SKB_PAD), 0,
1367 GFP_ATOMIC);
1368 return 0;
1369}
1370
1355/** 1371/**
1356 * skb_cow - copy header of skb when it is required 1372 * skb_cow - copy header of skb when it is required
1357 * @skb: buffer to cow 1373 * @skb: buffer to cow
@@ -1366,16 +1382,22 @@ static inline int skb_clone_writable(struct sk_buff *skb, int len)
1366 */ 1382 */
1367static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) 1383static inline int skb_cow(struct sk_buff *skb, unsigned int headroom)
1368{ 1384{
1369 int delta = (headroom > NET_SKB_PAD ? headroom : NET_SKB_PAD) - 1385 return __skb_cow(skb, headroom, skb_cloned(skb));
1370 skb_headroom(skb); 1386}
1371
1372 if (delta < 0)
1373 delta = 0;
1374 1387
1375 if (delta || skb_cloned(skb)) 1388/**
1376 return pskb_expand_head(skb, (delta + (NET_SKB_PAD-1)) & 1389 * skb_cow_head - skb_cow but only making the head writable
1377 ~(NET_SKB_PAD-1), 0, GFP_ATOMIC); 1390 * @skb: buffer to cow
1378 return 0; 1391 * @headroom: needed headroom
1392 *
1393 * This function is identical to skb_cow except that we replace the
1394 * skb_cloned check by skb_header_cloned. It should be used when
1395 * you only need to push on some header and do not need to modify
1396 * the data.
1397 */
1398static inline int skb_cow_head(struct sk_buff *skb, unsigned int headroom)
1399{
1400 return __skb_cow(skb, headroom, skb_header_cloned(skb));
1379} 1401}
1380 1402
1381/** 1403/**
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 124270df87..74962077f6 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -78,7 +78,7 @@ extern struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1];
78 * Sorry that the following has to be that ugly but some versions of GCC 78 * Sorry that the following has to be that ugly but some versions of GCC
79 * have trouble with constant propagation and loops. 79 * have trouble with constant propagation and loops.
80 */ 80 */
81static inline int kmalloc_index(size_t size) 81static __always_inline int kmalloc_index(size_t size)
82{ 82{
83 if (!size) 83 if (!size)
84 return 0; 84 return 0;
@@ -133,7 +133,7 @@ static inline int kmalloc_index(size_t size)
133 * This ought to end up with a global pointer to the right cache 133 * This ought to end up with a global pointer to the right cache
134 * in kmalloc_caches. 134 * in kmalloc_caches.
135 */ 135 */
136static inline struct kmem_cache *kmalloc_slab(size_t size) 136static __always_inline struct kmem_cache *kmalloc_slab(size_t size)
137{ 137{
138 int index = kmalloc_index(size); 138 int index = kmalloc_index(size);
139 139
@@ -166,7 +166,7 @@ static inline struct kmem_cache *kmalloc_slab(size_t size)
166void *kmem_cache_alloc(struct kmem_cache *, gfp_t); 166void *kmem_cache_alloc(struct kmem_cache *, gfp_t);
167void *__kmalloc(size_t size, gfp_t flags); 167void *__kmalloc(size_t size, gfp_t flags);
168 168
169static inline void *kmalloc(size_t size, gfp_t flags) 169static __always_inline void *kmalloc(size_t size, gfp_t flags)
170{ 170{
171 if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { 171 if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) {
172 struct kmem_cache *s = kmalloc_slab(size); 172 struct kmem_cache *s = kmalloc_slab(size);
@@ -183,7 +183,7 @@ static inline void *kmalloc(size_t size, gfp_t flags)
183void *__kmalloc_node(size_t size, gfp_t flags, int node); 183void *__kmalloc_node(size_t size, gfp_t flags, int node);
184void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); 184void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node);
185 185
186static inline void *kmalloc_node(size_t size, gfp_t flags, int node) 186static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
187{ 187{
188 if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { 188 if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) {
189 struct kmem_cache *s = kmalloc_slab(size); 189 struct kmem_cache *s = kmalloc_slab(size);
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 1101b0ce87..b5f41d4c2e 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -11,7 +11,7 @@
11 11
12struct user_namespace { 12struct user_namespace {
13 struct kref kref; 13 struct kref kref;
14 struct list_head uidhash_table[UIDHASH_SZ]; 14 struct hlist_head uidhash_table[UIDHASH_SZ];
15 struct user_struct *root_user; 15 struct user_struct *root_user;
16}; 16};
17 17
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 4ef4d22e5e..b4af6bcb7b 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -127,7 +127,7 @@ int sync_page_range(struct inode *inode, struct address_space *mapping,
127 loff_t pos, loff_t count); 127 loff_t pos, loff_t count);
128int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, 128int sync_page_range_nolock(struct inode *inode, struct address_space *mapping,
129 loff_t pos, loff_t count); 129 loff_t pos, loff_t count);
130void set_page_dirty_balance(struct page *page); 130void set_page_dirty_balance(struct page *page, int page_mkwrite);
131void writeback_set_ratelimit(void); 131void writeback_set_ratelimit(void);
132 132
133/* pdflush.c */ 133/* pdflush.c */
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index d62847f846..17f8f3a2f0 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -337,6 +337,9 @@ void *priv;
337 struct class_device class_dev; /* sysfs */ 337 struct class_device class_dev; /* sysfs */
338}; 338};
339 339
340/* Class-dev to video-device */
341#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
342
340/* Version 2 functions */ 343/* Version 2 functions */
341extern int video_register_device(struct video_device *vfd, int type, int nr); 344extern int video_register_device(struct video_device *vfd, int type, int nr);
342void video_unregister_device(struct video_device *); 345void video_unregister_device(struct video_device *);
@@ -354,11 +357,9 @@ extern int video_usercopy(struct inode *inode, struct file *file,
354 int (*func)(struct inode *inode, struct file *file, 357 int (*func)(struct inode *inode, struct file *file,
355 unsigned int cmd, void *arg)); 358 unsigned int cmd, void *arg));
356 359
357
358#ifdef CONFIG_VIDEO_V4L1_COMPAT 360#ifdef CONFIG_VIDEO_V4L1_COMPAT
359#include <linux/mm.h> 361#include <linux/mm.h>
360 362
361#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
362static inline int __must_check 363static inline int __must_check
363video_device_create_file(struct video_device *vfd, 364video_device_create_file(struct video_device *vfd,
364 struct class_device_attribute *attr) 365 struct class_device_attribute *attr)
diff --git a/include/net/rose.h b/include/net/rose.h
index a4047d3cf5..e5bb084d87 100644
--- a/include/net/rose.h
+++ b/include/net/rose.h
@@ -188,7 +188,7 @@ extern void rose_kick(struct sock *);
188extern void rose_enquiry_response(struct sock *); 188extern void rose_enquiry_response(struct sock *);
189 189
190/* rose_route.c */ 190/* rose_route.c */
191extern struct rose_neigh rose_loopback_neigh; 191extern struct rose_neigh *rose_loopback_neigh;
192extern const struct file_operations rose_neigh_fops; 192extern const struct file_operations rose_neigh_fops;
193extern const struct file_operations rose_nodes_fops; 193extern const struct file_operations rose_nodes_fops;
194extern const struct file_operations rose_routes_fops; 194extern const struct file_operations rose_routes_fops;
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index d529045c16..c9cc00c857 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -123,6 +123,7 @@
123 * sctp/protocol.c 123 * sctp/protocol.c
124 */ 124 */
125extern struct sock *sctp_get_ctl_sock(void); 125extern struct sock *sctp_get_ctl_sock(void);
126extern void sctp_local_addr_free(struct rcu_head *head);
126extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, 127extern int sctp_copy_local_addr_list(struct sctp_bind_addr *,
127 sctp_scope_t, gfp_t gfp, 128 sctp_scope_t, gfp_t gfp,
128 int flags); 129 int flags);
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 73cb9943c8..e8e3a64eb3 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -114,7 +114,6 @@ sctp_state_fn_t sctp_sf_do_4_C;
114sctp_state_fn_t sctp_sf_eat_data_6_2; 114sctp_state_fn_t sctp_sf_eat_data_6_2;
115sctp_state_fn_t sctp_sf_eat_data_fast_4_4; 115sctp_state_fn_t sctp_sf_eat_data_fast_4_4;
116sctp_state_fn_t sctp_sf_eat_sack_6_2; 116sctp_state_fn_t sctp_sf_eat_sack_6_2;
117sctp_state_fn_t sctp_sf_tabort_8_4_8;
118sctp_state_fn_t sctp_sf_operr_notify; 117sctp_state_fn_t sctp_sf_operr_notify;
119sctp_state_fn_t sctp_sf_t1_init_timer_expire; 118sctp_state_fn_t sctp_sf_t1_init_timer_expire;
120sctp_state_fn_t sctp_sf_t1_cookie_timer_expire; 119sctp_state_fn_t sctp_sf_t1_cookie_timer_expire;
@@ -214,7 +213,7 @@ struct sctp_chunk *sctp_make_shutdown_ack(const struct sctp_association *asoc,
214 const struct sctp_chunk *); 213 const struct sctp_chunk *);
215struct sctp_chunk *sctp_make_shutdown_complete(const struct sctp_association *, 214struct sctp_chunk *sctp_make_shutdown_complete(const struct sctp_association *,
216 const struct sctp_chunk *); 215 const struct sctp_chunk *);
217void sctp_init_cause(struct sctp_chunk *, __be16 cause, const void *, size_t); 216void sctp_init_cause(struct sctp_chunk *, __be16 cause, size_t);
218struct sctp_chunk *sctp_make_abort(const struct sctp_association *, 217struct sctp_chunk *sctp_make_abort(const struct sctp_association *,
219 const struct sctp_chunk *, 218 const struct sctp_chunk *,
220 const size_t hint); 219 const size_t hint);
@@ -247,6 +246,9 @@ struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *,
247 int, __be16); 246 int, __be16);
248struct sctp_chunk *sctp_make_asconf_set_prim(struct sctp_association *asoc, 247struct sctp_chunk *sctp_make_asconf_set_prim(struct sctp_association *asoc,
249 union sctp_addr *addr); 248 union sctp_addr *addr);
249int sctp_verify_asconf(const struct sctp_association *asoc,
250 struct sctp_paramhdr *param_hdr, void *chunk_end,
251 struct sctp_paramhdr **errp);
250struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, 252struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc,
251 struct sctp_chunk *asconf); 253 struct sctp_chunk *asconf);
252int sctp_process_asconf_ack(struct sctp_association *asoc, 254int sctp_process_asconf_ack(struct sctp_association *asoc,
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index ee4559b113..baff49dfcd 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -207,6 +207,9 @@ extern struct sctp_globals {
207 * It is a list of sctp_sockaddr_entry. 207 * It is a list of sctp_sockaddr_entry.
208 */ 208 */
209 struct list_head local_addr_list; 209 struct list_head local_addr_list;
210
211 /* Lock that protects the local_addr_list writers */
212 spinlock_t addr_list_lock;
210 213
211 /* Flag to indicate if addip is enabled. */ 214 /* Flag to indicate if addip is enabled. */
212 int addip_enable; 215 int addip_enable;
@@ -242,6 +245,7 @@ extern struct sctp_globals {
242#define sctp_port_alloc_lock (sctp_globals.port_alloc_lock) 245#define sctp_port_alloc_lock (sctp_globals.port_alloc_lock)
243#define sctp_port_hashtable (sctp_globals.port_hashtable) 246#define sctp_port_hashtable (sctp_globals.port_hashtable)
244#define sctp_local_addr_list (sctp_globals.local_addr_list) 247#define sctp_local_addr_list (sctp_globals.local_addr_list)
248#define sctp_local_addr_lock (sctp_globals.addr_list_lock)
245#define sctp_addip_enable (sctp_globals.addip_enable) 249#define sctp_addip_enable (sctp_globals.addip_enable)
246#define sctp_prsctp_enable (sctp_globals.prsctp_enable) 250#define sctp_prsctp_enable (sctp_globals.prsctp_enable)
247 251
@@ -417,6 +421,7 @@ struct sctp_signed_cookie {
417 * internally. 421 * internally.
418 */ 422 */
419union sctp_addr_param { 423union sctp_addr_param {
424 struct sctp_paramhdr p;
420 struct sctp_ipv4addr_param v4; 425 struct sctp_ipv4addr_param v4;
421 struct sctp_ipv6addr_param v6; 426 struct sctp_ipv6addr_param v6;
422}; 427};
@@ -726,6 +731,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len,
726 struct iovec *data); 731 struct iovec *data);
727void sctp_chunk_free(struct sctp_chunk *); 732void sctp_chunk_free(struct sctp_chunk *);
728void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); 733void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data);
734void *sctp_addto_param(struct sctp_chunk *, int len, const void *data);
729struct sctp_chunk *sctp_chunkify(struct sk_buff *, 735struct sctp_chunk *sctp_chunkify(struct sk_buff *,
730 const struct sctp_association *, 736 const struct sctp_association *,
731 struct sock *); 737 struct sock *);
@@ -736,8 +742,10 @@ const union sctp_addr *sctp_source(const struct sctp_chunk *chunk);
736/* This is a structure for holding either an IPv6 or an IPv4 address. */ 742/* This is a structure for holding either an IPv6 or an IPv4 address. */
737struct sctp_sockaddr_entry { 743struct sctp_sockaddr_entry {
738 struct list_head list; 744 struct list_head list;
745 struct rcu_head rcu;
739 union sctp_addr a; 746 union sctp_addr a;
740 __u8 use_as_src; 747 __u8 use_as_src;
748 __u8 valid;
741}; 749};
742 750
743typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); 751typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *);
@@ -1148,7 +1156,9 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
1148 int flags); 1156 int flags);
1149int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, 1157int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
1150 __u8 use_as_src, gfp_t gfp); 1158 __u8 use_as_src, gfp_t gfp);
1151int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); 1159int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
1160 void fastcall (*rcu_call)(struct rcu_head *,
1161 void (*func)(struct rcu_head *)));
1152int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, 1162int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *,
1153 struct sctp_sock *); 1163 struct sctp_sock *);
1154union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, 1164union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp,
@@ -1219,9 +1229,6 @@ struct sctp_ep_common {
1219 * bind_addr.address_list is our set of local IP addresses. 1229 * bind_addr.address_list is our set of local IP addresses.
1220 */ 1230 */
1221 struct sctp_bind_addr bind_addr; 1231 struct sctp_bind_addr bind_addr;
1222
1223 /* Protection during address list comparisons. */
1224 rwlock_t addr_lock;
1225}; 1232};
1226 1233
1227 1234
diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h
index 39ea3f442b..cd33270e86 100644
--- a/include/net/sctp/ulpqueue.h
+++ b/include/net/sctp/ulpqueue.h
@@ -83,6 +83,7 @@ int sctp_clear_pd(struct sock *sk, struct sctp_association *asoc);
83/* Skip over an SSN. */ 83/* Skip over an SSN. */
84void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn); 84void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn);
85 85
86void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *, __u32);
86#endif /* __sctp_ulpqueue_h__ */ 87#endif /* __sctp_ulpqueue_h__ */
87 88
88 89
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 185c7ecce4..54053de0bd 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1059,14 +1059,12 @@ struct tcp_md5sig_key {
1059}; 1059};
1060 1060
1061struct tcp4_md5sig_key { 1061struct tcp4_md5sig_key {
1062 u8 *key; 1062 struct tcp_md5sig_key base;
1063 u16 keylen;
1064 __be32 addr; 1063 __be32 addr;
1065}; 1064};
1066 1065
1067struct tcp6_md5sig_key { 1066struct tcp6_md5sig_key {
1068 u8 *key; 1067 struct tcp_md5sig_key base;
1069 u16 keylen;
1070#if 0 1068#if 0
1071 u32 scope_id; /* XXX */ 1069 u32 scope_id; /* XXX */
1072#endif 1070#endif
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 007d442412..b4b3113261 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -205,6 +205,13 @@ struct iscsi_queue {
205}; 205};
206 206
207struct iscsi_session { 207struct iscsi_session {
208 /*
209 * Syncs up the scsi eh thread with the iscsi eh thread when sending
210 * task management functions. This must be taken before the session
211 * and recv lock.
212 */
213 struct mutex eh_mutex;
214
208 /* iSCSI session-wide sequencing */ 215 /* iSCSI session-wide sequencing */
209 uint32_t cmdsn; 216 uint32_t cmdsn;
210 uint32_t exp_cmdsn; 217 uint32_t exp_cmdsn;
diff --git a/init/Kconfig b/init/Kconfig
index 96b54595f1..d54d0cadcc 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -488,6 +488,7 @@ config SIGNALFD
488config TIMERFD 488config TIMERFD
489 bool "Enable timerfd() system call" if EMBEDDED 489 bool "Enable timerfd() system call" if EMBEDDED
490 select ANON_INODES 490 select ANON_INODES
491 depends on BROKEN
491 default y 492 default y
492 help 493 help
493 Enable the timerfd() system call that allows to receive timer 494 Enable the timerfd() system call that allows to receive timer
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index a6b4c0c08e..fd4fc12d26 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -57,8 +57,10 @@ static void __init handle_initrd(void)
57 57
58 pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); 58 pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
59 if (pid > 0) 59 if (pid > 0)
60 while (pid != sys_wait4(-1, NULL, 0, NULL)) 60 while (pid != sys_wait4(-1, NULL, 0, NULL)) {
61 try_to_freeze();
61 yield(); 62 yield();
63 }
62 64
63 /* move initrd to rootfs' /old */ 65 /* move initrd to rootfs' /old */
64 sys_fchdir(old_fd); 66 sys_fchdir(old_fd);
diff --git a/init/main.c b/init/main.c
index d3bcb3b116..9def935ab1 100644
--- a/init/main.c
+++ b/init/main.c
@@ -146,9 +146,14 @@ static unsigned int __initdata max_cpus = NR_CPUS;
146 * greater than 0, limits the maximum number of CPUs activated in 146 * greater than 0, limits the maximum number of CPUs activated in
147 * SMP mode to <NUM>. 147 * SMP mode to <NUM>.
148 */ 148 */
149#ifndef CONFIG_X86_IO_APIC
150static inline void disable_ioapic_setup(void) {};
151#endif
152
149static int __init nosmp(char *str) 153static int __init nosmp(char *str)
150{ 154{
151 max_cpus = 0; 155 max_cpus = 0;
156 disable_ioapic_setup();
152 return 0; 157 return 0;
153} 158}
154 159
@@ -157,10 +162,13 @@ early_param("nosmp", nosmp);
157static int __init maxcpus(char *str) 162static int __init maxcpus(char *str)
158{ 163{
159 get_option(&str, &max_cpus); 164 get_option(&str, &max_cpus);
160 return 1; 165 if (max_cpus == 0)
166 disable_ioapic_setup();
167
168 return 0;
161} 169}
162 170
163__setup("maxcpus=", maxcpus); 171early_param("maxcpus", maxcpus);
164#else 172#else
165#define max_cpus NR_CPUS 173#define max_cpus NR_CPUS
166#endif 174#endif
@@ -389,10 +397,6 @@ static void __init smp_init(void)
389{ 397{
390 unsigned int cpu; 398 unsigned int cpu;
391 399
392#ifndef CONFIG_HOTPLUG_CPU
393 cpu_possible_map = cpu_present_map;
394#endif
395
396 /* FIXME: This should be done in userspace --RR */ 400 /* FIXME: This should be done in userspace --RR */
397 for_each_present_cpu(cpu) { 401 for_each_present_cpu(cpu) {
398 if (num_online_cpus() >= max_cpus) 402 if (num_online_cpus() >= max_cpus)
@@ -537,10 +541,6 @@ asmlinkage void __init start_kernel(void)
537 setup_arch(&command_line); 541 setup_arch(&command_line);
538 setup_command_line(command_line); 542 setup_command_line(command_line);
539 unwind_setup(); 543 unwind_setup();
540#ifndef CONFIG_HOTPLUG_CPU
541 if (max_cpus < 2)
542 cpu_possible_map = cpu_online_map;
543#endif
544 setup_per_cpu_areas(); 544 setup_per_cpu_areas();
545 smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ 545 smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */
546 546
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 181ae70860..38033db8d8 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -273,7 +273,7 @@ int __cpuinit cpu_up(unsigned int cpu)
273 return err; 273 return err;
274} 274}
275 275
276#ifdef CONFIG_SUSPEND_SMP 276#ifdef CONFIG_PM_SLEEP_SMP
277static cpumask_t frozen_cpus; 277static cpumask_t frozen_cpus;
278 278
279int disable_nonboot_cpus(void) 279int disable_nonboot_cpus(void)
@@ -334,4 +334,4 @@ void enable_nonboot_cpus(void)
334out: 334out:
335 mutex_unlock(&cpu_add_remove_lock); 335 mutex_unlock(&cpu_add_remove_lock);
336} 336}
337#endif 337#endif /* CONFIG_PM_SLEEP_SMP */
diff --git a/kernel/exit.c b/kernel/exit.c
index 9578c1ae19..993369ee94 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -24,7 +24,6 @@
24#include <linux/pid_namespace.h> 24#include <linux/pid_namespace.h>
25#include <linux/ptrace.h> 25#include <linux/ptrace.h>
26#include <linux/profile.h> 26#include <linux/profile.h>
27#include <linux/signalfd.h>
28#include <linux/mount.h> 27#include <linux/mount.h>
29#include <linux/proc_fs.h> 28#include <linux/proc_fs.h>
30#include <linux/kthread.h> 29#include <linux/kthread.h>
@@ -86,14 +85,6 @@ static void __exit_signal(struct task_struct *tsk)
86 sighand = rcu_dereference(tsk->sighand); 85 sighand = rcu_dereference(tsk->sighand);
87 spin_lock(&sighand->siglock); 86 spin_lock(&sighand->siglock);
88 87
89 /*
90 * Notify that this sighand has been detached. This must
91 * be called with the tsk->sighand lock held. Also, this
92 * access tsk->sighand internally, so it must be called
93 * before tsk->sighand is reset.
94 */
95 signalfd_detach_locked(tsk);
96
97 posix_cpu_timers_exit(tsk); 88 posix_cpu_timers_exit(tsk);
98 if (atomic_dec_and_test(&sig->count)) 89 if (atomic_dec_and_test(&sig->count))
99 posix_cpu_timers_exit_group(tsk); 90 posix_cpu_timers_exit_group(tsk);
@@ -975,6 +966,7 @@ fastcall NORET_TYPE void do_exit(long code)
975 if (unlikely(tsk->audit_context)) 966 if (unlikely(tsk->audit_context))
976 audit_free(tsk); 967 audit_free(tsk);
977 968
969 tsk->exit_code = code;
978 taskstats_exit(tsk, group_dead); 970 taskstats_exit(tsk, group_dead);
979 971
980 exit_mm(tsk); 972 exit_mm(tsk);
@@ -996,7 +988,6 @@ fastcall NORET_TYPE void do_exit(long code)
996 if (tsk->binfmt) 988 if (tsk->binfmt)
997 module_put(tsk->binfmt->module); 989 module_put(tsk->binfmt->module);
998 990
999 tsk->exit_code = code;
1000 proc_exit_connector(tsk); 991 proc_exit_connector(tsk);
1001 exit_task_namespaces(tsk); 992 exit_task_namespaces(tsk);
1002 exit_notify(tsk); 993 exit_notify(tsk);
diff --git a/kernel/fork.c b/kernel/fork.c
index 7332e236d3..33f12f4868 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1438,7 +1438,7 @@ static void sighand_ctor(void *data, struct kmem_cache *cachep,
1438 struct sighand_struct *sighand = data; 1438 struct sighand_struct *sighand = data;
1439 1439
1440 spin_lock_init(&sighand->siglock); 1440 spin_lock_init(&sighand->siglock);
1441 INIT_LIST_HEAD(&sighand->signalfd_list); 1441 init_waitqueue_head(&sighand->signalfd_wqh);
1442} 1442}
1443 1443
1444void __init proc_caches_init(void) 1444void __init proc_caches_init(void)
diff --git a/kernel/futex.c b/kernel/futex.c
index e8935b195e..fcc94e7b40 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1943,9 +1943,10 @@ static inline int fetch_robust_entry(struct robust_list __user **entry,
1943void exit_robust_list(struct task_struct *curr) 1943void exit_robust_list(struct task_struct *curr)
1944{ 1944{
1945 struct robust_list_head __user *head = curr->robust_list; 1945 struct robust_list_head __user *head = curr->robust_list;
1946 struct robust_list __user *entry, *pending; 1946 struct robust_list __user *entry, *next_entry, *pending;
1947 unsigned int limit = ROBUST_LIST_LIMIT, pi, pip; 1947 unsigned int limit = ROBUST_LIST_LIMIT, pi, next_pi, pip;
1948 unsigned long futex_offset; 1948 unsigned long futex_offset;
1949 int rc;
1949 1950
1950 /* 1951 /*
1951 * Fetch the list head (which was registered earlier, via 1952 * Fetch the list head (which was registered earlier, via
@@ -1965,12 +1966,14 @@ void exit_robust_list(struct task_struct *curr)
1965 if (fetch_robust_entry(&pending, &head->list_op_pending, &pip)) 1966 if (fetch_robust_entry(&pending, &head->list_op_pending, &pip))
1966 return; 1967 return;
1967 1968
1968 if (pending) 1969 next_entry = NULL; /* avoid warning with gcc */
1969 handle_futex_death((void __user *)pending + futex_offset,
1970 curr, pip);
1971
1972 while (entry != &head->list) { 1970 while (entry != &head->list) {
1973 /* 1971 /*
1972 * Fetch the next entry in the list before calling
1973 * handle_futex_death:
1974 */
1975 rc = fetch_robust_entry(&next_entry, &entry->next, &next_pi);
1976 /*
1974 * A pending lock might already be on the list, so 1977 * A pending lock might already be on the list, so
1975 * don't process it twice: 1978 * don't process it twice:
1976 */ 1979 */
@@ -1978,11 +1981,10 @@ void exit_robust_list(struct task_struct *curr)
1978 if (handle_futex_death((void __user *)entry + futex_offset, 1981 if (handle_futex_death((void __user *)entry + futex_offset,
1979 curr, pi)) 1982 curr, pi))
1980 return; 1983 return;
1981 /* 1984 if (rc)
1982 * Fetch the next entry in the list:
1983 */
1984 if (fetch_robust_entry(&entry, &entry->next, &pi))
1985 return; 1985 return;
1986 entry = next_entry;
1987 pi = next_pi;
1986 /* 1988 /*
1987 * Avoid excessively long or circular lists: 1989 * Avoid excessively long or circular lists:
1988 */ 1990 */
@@ -1991,6 +1993,10 @@ void exit_robust_list(struct task_struct *curr)
1991 1993
1992 cond_resched(); 1994 cond_resched();
1993 } 1995 }
1996
1997 if (pending)
1998 handle_futex_death((void __user *)pending + futex_offset,
1999 curr, pip);
1994} 2000}
1995 2001
1996long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, 2002long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c
index f7921360ef..2c2e2954b7 100644
--- a/kernel/futex_compat.c
+++ b/kernel/futex_compat.c
@@ -38,10 +38,11 @@ fetch_robust_entry(compat_uptr_t *uentry, struct robust_list __user **entry,
38void compat_exit_robust_list(struct task_struct *curr) 38void compat_exit_robust_list(struct task_struct *curr)
39{ 39{
40 struct compat_robust_list_head __user *head = curr->compat_robust_list; 40 struct compat_robust_list_head __user *head = curr->compat_robust_list;
41 struct robust_list __user *entry, *pending; 41 struct robust_list __user *entry, *next_entry, *pending;
42 unsigned int limit = ROBUST_LIST_LIMIT, pi, pip; 42 unsigned int limit = ROBUST_LIST_LIMIT, pi, next_pi, pip;
43 compat_uptr_t uentry, upending; 43 compat_uptr_t uentry, next_uentry, upending;
44 compat_long_t futex_offset; 44 compat_long_t futex_offset;
45 int rc;
45 46
46 /* 47 /*
47 * Fetch the list head (which was registered earlier, via 48 * Fetch the list head (which was registered earlier, via
@@ -61,10 +62,15 @@ void compat_exit_robust_list(struct task_struct *curr)
61 if (fetch_robust_entry(&upending, &pending, 62 if (fetch_robust_entry(&upending, &pending,
62 &head->list_op_pending, &pip)) 63 &head->list_op_pending, &pip))
63 return; 64 return;
64 if (upending)
65 handle_futex_death((void __user *)pending + futex_offset, curr, pip);
66 65
67 while (compat_ptr(uentry) != &head->list) { 66 next_entry = NULL; /* avoid warning with gcc */
67 while (entry != (struct robust_list __user *) &head->list) {
68 /*
69 * Fetch the next entry in the list before calling
70 * handle_futex_death:
71 */
72 rc = fetch_robust_entry(&next_uentry, &next_entry,
73 (compat_uptr_t __user *)&entry->next, &next_pi);
68 /* 74 /*
69 * A pending lock might already be on the list, so 75 * A pending lock might already be on the list, so
70 * dont process it twice: 76 * dont process it twice:
@@ -74,12 +80,11 @@ void compat_exit_robust_list(struct task_struct *curr)
74 curr, pi)) 80 curr, pi))
75 return; 81 return;
76 82
77 /* 83 if (rc)
78 * Fetch the next entry in the list:
79 */
80 if (fetch_robust_entry(&uentry, &entry,
81 (compat_uptr_t __user *)&entry->next, &pi))
82 return; 84 return;
85 uentry = next_uentry;
86 entry = next_entry;
87 pi = next_pi;
83 /* 88 /*
84 * Avoid excessively long or circular lists: 89 * Avoid excessively long or circular lists:
85 */ 90 */
@@ -88,6 +93,9 @@ void compat_exit_robust_list(struct task_struct *curr)
88 93
89 cond_resched(); 94 cond_resched();
90 } 95 }
96 if (pending)
97 handle_futex_death((void __user *)pending + futex_offset,
98 curr, pip);
91} 99}
92 100
93asmlinkage long 101asmlinkage long
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 853aefbd18..7230d914ea 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -547,14 +547,11 @@ int request_irq(unsigned int irq, irq_handler_t handler,
547 * We do this before actually registering it, to make sure that 547 * We do this before actually registering it, to make sure that
548 * a 'real' IRQ doesn't run in parallel with our fake 548 * a 'real' IRQ doesn't run in parallel with our fake
549 */ 549 */
550 if (irqflags & IRQF_DISABLED) { 550 unsigned long flags;
551 unsigned long flags;
552 551
553 local_irq_save(flags); 552 local_irq_save(flags);
554 handler(irq, dev_id); 553 handler(irq, dev_id);
555 local_irq_restore(flags); 554 local_irq_restore(flags);
556 } else
557 handler(irq, dev_id);
558 } 555 }
559#endif 556#endif
560 557
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 9809cc1f33..c6a4f8aebe 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -505,7 +505,7 @@ int call_usermodehelper_pipe(char *path, char **argv, char **envp,
505 if (ret < 0) 505 if (ret < 0)
506 goto out; 506 goto out;
507 507
508 return call_usermodehelper_exec(sub_info, 1); 508 return call_usermodehelper_exec(sub_info, UMH_WAIT_EXEC);
509 509
510 out: 510 out:
511 call_usermodehelper_freeinfo(sub_info); 511 call_usermodehelper_freeinfo(sub_info);
diff --git a/kernel/module.c b/kernel/module.c
index 33c04ad511..db0ead0363 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -784,8 +784,7 @@ EXPORT_SYMBOL_GPL(symbol_put_addr);
784static ssize_t show_refcnt(struct module_attribute *mattr, 784static ssize_t show_refcnt(struct module_attribute *mattr,
785 struct module *mod, char *buffer) 785 struct module *mod, char *buffer)
786{ 786{
787 /* sysfs holds a reference */ 787 return sprintf(buffer, "%u\n", module_refcount(mod));
788 return sprintf(buffer, "%u\n", module_refcount(mod)-1);
789} 788}
790 789
791static struct module_attribute refcnt = { 790static struct module_attribute refcnt = {
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 412859f8d9..14b0e10dc9 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -72,15 +72,10 @@ config PM_TRACE
72 CAUTION: this option will cause your machine's real-time clock to be 72 CAUTION: this option will cause your machine's real-time clock to be
73 set to an invalid time after a resume. 73 set to an invalid time after a resume.
74 74
75config SUSPEND_SMP_POSSIBLE 75config PM_SLEEP_SMP
76 bool
77 depends on (X86 && !X86_VOYAGER) || (PPC64 && (PPC_PSERIES || PPC_PMAC))
78 depends on SMP
79 default y
80
81config SUSPEND_SMP
82 bool 76 bool
83 depends on SUSPEND_SMP_POSSIBLE && PM_SLEEP 77 depends on SUSPEND_SMP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
78 depends on PM_SLEEP
84 select HOTPLUG_CPU 79 select HOTPLUG_CPU
85 default y 80 default y
86 81
@@ -89,20 +84,46 @@ config PM_SLEEP
89 depends on SUSPEND || HIBERNATION 84 depends on SUSPEND || HIBERNATION
90 default y 85 default y
91 86
87config SUSPEND_UP_POSSIBLE
88 bool
89 depends on (X86 && !X86_VOYAGER) || PPC || ARM || BLACKFIN || MIPS \
90 || SUPERH || FRV
91 depends on !SMP
92 default y
93
94config SUSPEND_SMP_POSSIBLE
95 bool
96 depends on (X86 && !X86_VOYAGER) \
97 || (PPC && (PPC_PSERIES || PPC_PMAC)) || ARM
98 depends on SMP
99 default y
100
92config SUSPEND 101config SUSPEND
93 bool "Suspend to RAM and standby" 102 bool "Suspend to RAM and standby"
94 depends on PM 103 depends on PM
95 depends on !SMP || SUSPEND_SMP_POSSIBLE 104 depends on SUSPEND_UP_POSSIBLE || SUSPEND_SMP_POSSIBLE
96 default y 105 default y
97 ---help--- 106 ---help---
98 Allow the system to enter sleep states in which main memory is 107 Allow the system to enter sleep states in which main memory is
99 powered and thus its contents are preserved, such as the 108 powered and thus its contents are preserved, such as the
100 suspend-to-RAM state (i.e. the ACPI S3 state). 109 suspend-to-RAM state (i.e. the ACPI S3 state).
101 110
111config HIBERNATION_UP_POSSIBLE
112 bool
113 depends on X86 || PPC64_SWSUSP || PPC32
114 depends on !SMP
115 default y
116
117config HIBERNATION_SMP_POSSIBLE
118 bool
119 depends on (X86 && !X86_VOYAGER) || PPC64_SWSUSP
120 depends on SMP
121 default y
122
102config HIBERNATION 123config HIBERNATION
103 bool "Hibernation (aka 'suspend to disk')" 124 bool "Hibernation (aka 'suspend to disk')"
104 depends on PM && SWAP 125 depends on PM && SWAP
105 depends on ((X86 || PPC64_SWSUSP || FRV || PPC32) && !SMP) || SUSPEND_SMP_POSSIBLE 126 depends on HIBERNATION_UP_POSSIBLE || HIBERNATION_SMP_POSSIBLE
106 ---help--- 127 ---help---
107 Enable the suspend to disk (STD) functionality, which is usually 128 Enable the suspend to disk (STD) functionality, which is usually
108 called "hibernation" in user interfaces. STD checkpoints the 129 called "hibernation" in user interfaces. STD checkpoints the
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 82a558b655..3eca7a55f2 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -233,6 +233,7 @@ int ptrace_detach(struct task_struct *child, unsigned int data)
233 233
234 /* Architecture-specific hardware disable .. */ 234 /* Architecture-specific hardware disable .. */
235 ptrace_disable(child); 235 ptrace_disable(child);
236 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
236 237
237 write_lock_irq(&tasklist_lock); 238 write_lock_irq(&tasklist_lock);
238 /* protect against de_thread()->release_task() */ 239 /* protect against de_thread()->release_task() */
diff --git a/kernel/sched.c b/kernel/sched.c
index 45e17b83b7..6107a0cd63 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -262,7 +262,8 @@ struct rq {
262 s64 clock_max_delta; 262 s64 clock_max_delta;
263 263
264 unsigned int clock_warps, clock_overflows; 264 unsigned int clock_warps, clock_overflows;
265 unsigned int clock_unstable_events; 265 u64 idle_clock;
266 unsigned int clock_deep_idle_events;
266 u64 tick_timestamp; 267 u64 tick_timestamp;
267 268
268 atomic_t nr_iowait; 269 atomic_t nr_iowait;
@@ -556,18 +557,40 @@ static inline struct rq *this_rq_lock(void)
556} 557}
557 558
558/* 559/*
559 * CPU frequency is/was unstable - start new by setting prev_clock_raw: 560 * We are going deep-idle (irqs are disabled):
560 */ 561 */
561void sched_clock_unstable_event(void) 562void sched_clock_idle_sleep_event(void)
562{ 563{
563 unsigned long flags; 564 struct rq *rq = cpu_rq(smp_processor_id());
564 struct rq *rq;
565 565
566 rq = task_rq_lock(current, &flags); 566 spin_lock(&rq->lock);
567 rq->prev_clock_raw = sched_clock(); 567 __update_rq_clock(rq);
568 rq->clock_unstable_events++; 568 spin_unlock(&rq->lock);
569 task_rq_unlock(rq, &flags); 569 rq->clock_deep_idle_events++;
570}
571EXPORT_SYMBOL_GPL(sched_clock_idle_sleep_event);
572
573/*
574 * We just idled delta nanoseconds (called with irqs disabled):
575 */
576void sched_clock_idle_wakeup_event(u64 delta_ns)
577{
578 struct rq *rq = cpu_rq(smp_processor_id());
579 u64 now = sched_clock();
580
581 rq->idle_clock += delta_ns;
582 /*
583 * Override the previous timestamp and ignore all
584 * sched_clock() deltas that occured while we idled,
585 * and use the PM-provided delta_ns to advance the
586 * rq clock:
587 */
588 spin_lock(&rq->lock);
589 rq->prev_clock_raw = now;
590 rq->clock += delta_ns;
591 spin_unlock(&rq->lock);
570} 592}
593EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event);
571 594
572/* 595/*
573 * resched_task - mark a task 'to be rescheduled now'. 596 * resched_task - mark a task 'to be rescheduled now'.
@@ -645,7 +668,7 @@ static u64 div64_likely32(u64 divident, unsigned long divisor)
645/* 668/*
646 * Shift right and round: 669 * Shift right and round:
647 */ 670 */
648#define RSR(x, y) (((x) + (1UL << ((y) - 1))) >> (y)) 671#define SRR(x, y) (((x) + (1UL << ((y) - 1))) >> (y))
649 672
650static unsigned long 673static unsigned long
651calc_delta_mine(unsigned long delta_exec, unsigned long weight, 674calc_delta_mine(unsigned long delta_exec, unsigned long weight,
@@ -661,10 +684,10 @@ calc_delta_mine(unsigned long delta_exec, unsigned long weight,
661 * Check whether we'd overflow the 64-bit multiplication: 684 * Check whether we'd overflow the 64-bit multiplication:
662 */ 685 */
663 if (unlikely(tmp > WMULT_CONST)) 686 if (unlikely(tmp > WMULT_CONST))
664 tmp = RSR(RSR(tmp, WMULT_SHIFT/2) * lw->inv_weight, 687 tmp = SRR(SRR(tmp, WMULT_SHIFT/2) * lw->inv_weight,
665 WMULT_SHIFT/2); 688 WMULT_SHIFT/2);
666 else 689 else
667 tmp = RSR(tmp * lw->inv_weight, WMULT_SHIFT); 690 tmp = SRR(tmp * lw->inv_weight, WMULT_SHIFT);
668 691
669 return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX); 692 return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX);
670} 693}
@@ -835,7 +858,6 @@ static void dec_nr_running(struct task_struct *p, struct rq *rq)
835 858
836static void set_load_weight(struct task_struct *p) 859static void set_load_weight(struct task_struct *p)
837{ 860{
838 task_rq(p)->cfs.wait_runtime -= p->se.wait_runtime;
839 p->se.wait_runtime = 0; 861 p->se.wait_runtime = 0;
840 862
841 if (task_has_rt_policy(p)) { 863 if (task_has_rt_policy(p)) {
@@ -1564,6 +1586,7 @@ static void __sched_fork(struct task_struct *p)
1564 p->se.wait_start_fair = 0; 1586 p->se.wait_start_fair = 0;
1565 p->se.exec_start = 0; 1587 p->se.exec_start = 0;
1566 p->se.sum_exec_runtime = 0; 1588 p->se.sum_exec_runtime = 0;
1589 p->se.prev_sum_exec_runtime = 0;
1567 p->se.delta_exec = 0; 1590 p->se.delta_exec = 0;
1568 p->se.delta_fair_run = 0; 1591 p->se.delta_fair_run = 0;
1569 p->se.delta_fair_sleep = 0; 1592 p->se.delta_fair_sleep = 0;
@@ -1659,6 +1682,11 @@ void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
1659 1682
1660 p->prio = effective_prio(p); 1683 p->prio = effective_prio(p);
1661 1684
1685 if (rt_prio(p->prio))
1686 p->sched_class = &rt_sched_class;
1687 else
1688 p->sched_class = &fair_sched_class;
1689
1662 if (!p->sched_class->task_new || !sysctl_sched_child_runs_first || 1690 if (!p->sched_class->task_new || !sysctl_sched_child_runs_first ||
1663 (clone_flags & CLONE_VM) || task_cpu(p) != this_cpu || 1691 (clone_flags & CLONE_VM) || task_cpu(p) != this_cpu ||
1664 !current->se.on_rq) { 1692 !current->se.on_rq) {
@@ -2157,12 +2185,6 @@ int can_migrate_task(struct task_struct *p, struct rq *rq, int this_cpu,
2157 if (task_running(rq, p)) 2185 if (task_running(rq, p))
2158 return 0; 2186 return 0;
2159 2187
2160 /*
2161 * Aggressive migration if too many balance attempts have failed:
2162 */
2163 if (sd->nr_balance_failed > sd->cache_nice_tries)
2164 return 1;
2165
2166 return 1; 2188 return 1;
2167} 2189}
2168 2190
@@ -2494,7 +2516,7 @@ group_next:
2494 * a think about bumping its value to force at least one task to be 2516 * a think about bumping its value to force at least one task to be
2495 * moved 2517 * moved
2496 */ 2518 */
2497 if (*imbalance + SCHED_LOAD_SCALE_FUZZ < busiest_load_per_task/2) { 2519 if (*imbalance < busiest_load_per_task) {
2498 unsigned long tmp, pwr_now, pwr_move; 2520 unsigned long tmp, pwr_now, pwr_move;
2499 unsigned int imbn; 2521 unsigned int imbn;
2500 2522
@@ -2546,10 +2568,8 @@ small_imbalance:
2546 pwr_move /= SCHED_LOAD_SCALE; 2568 pwr_move /= SCHED_LOAD_SCALE;
2547 2569
2548 /* Move if we gain throughput */ 2570 /* Move if we gain throughput */
2549 if (pwr_move <= pwr_now) 2571 if (pwr_move > pwr_now)
2550 goto out_balanced; 2572 *imbalance = busiest_load_per_task;
2551
2552 *imbalance = busiest_load_per_task;
2553 } 2573 }
2554 2574
2555 return busiest; 2575 return busiest;
@@ -3020,6 +3040,7 @@ static inline void rebalance_domains(int cpu, enum cpu_idle_type idle)
3020 struct sched_domain *sd; 3040 struct sched_domain *sd;
3021 /* Earliest time when we have to do rebalance again */ 3041 /* Earliest time when we have to do rebalance again */
3022 unsigned long next_balance = jiffies + 60*HZ; 3042 unsigned long next_balance = jiffies + 60*HZ;
3043 int update_next_balance = 0;
3023 3044
3024 for_each_domain(cpu, sd) { 3045 for_each_domain(cpu, sd) {
3025 if (!(sd->flags & SD_LOAD_BALANCE)) 3046 if (!(sd->flags & SD_LOAD_BALANCE))
@@ -3056,8 +3077,10 @@ static inline void rebalance_domains(int cpu, enum cpu_idle_type idle)
3056 if (sd->flags & SD_SERIALIZE) 3077 if (sd->flags & SD_SERIALIZE)
3057 spin_unlock(&balancing); 3078 spin_unlock(&balancing);
3058out: 3079out:
3059 if (time_after(next_balance, sd->last_balance + interval)) 3080 if (time_after(next_balance, sd->last_balance + interval)) {
3060 next_balance = sd->last_balance + interval; 3081 next_balance = sd->last_balance + interval;
3082 update_next_balance = 1;
3083 }
3061 3084
3062 /* 3085 /*
3063 * Stop the load balance at this level. There is another 3086 * Stop the load balance at this level. There is another
@@ -3067,7 +3090,14 @@ out:
3067 if (!balance) 3090 if (!balance)
3068 break; 3091 break;
3069 } 3092 }
3070 rq->next_balance = next_balance; 3093
3094 /*
3095 * next_balance will be updated only when there is a need.
3096 * When the cpu is attached to null domain for ex, it will not be
3097 * updated.
3098 */
3099 if (likely(update_next_balance))
3100 rq->next_balance = next_balance;
3071} 3101}
3072 3102
3073/* 3103/*
@@ -4525,10 +4555,7 @@ asmlinkage long sys_sched_yield(void)
4525 struct rq *rq = this_rq_lock(); 4555 struct rq *rq = this_rq_lock();
4526 4556
4527 schedstat_inc(rq, yld_cnt); 4557 schedstat_inc(rq, yld_cnt);
4528 if (unlikely(rq->nr_running == 1)) 4558 current->sched_class->yield_task(rq, current);
4529 schedstat_inc(rq, yld_act_empty);
4530 else
4531 current->sched_class->yield_task(rq, current);
4532 4559
4533 /* 4560 /*
4534 * Since we are going to call schedule() anyway, there's 4561 * Since we are going to call schedule() anyway, there's
@@ -4884,14 +4911,18 @@ cpumask_t nohz_cpu_mask = CPU_MASK_NONE;
4884static inline void sched_init_granularity(void) 4911static inline void sched_init_granularity(void)
4885{ 4912{
4886 unsigned int factor = 1 + ilog2(num_online_cpus()); 4913 unsigned int factor = 1 + ilog2(num_online_cpus());
4887 const unsigned long gran_limit = 100000000; 4914 const unsigned long limit = 100000000;
4915
4916 sysctl_sched_min_granularity *= factor;
4917 if (sysctl_sched_min_granularity > limit)
4918 sysctl_sched_min_granularity = limit;
4888 4919
4889 sysctl_sched_granularity *= factor; 4920 sysctl_sched_latency *= factor;
4890 if (sysctl_sched_granularity > gran_limit) 4921 if (sysctl_sched_latency > limit)
4891 sysctl_sched_granularity = gran_limit; 4922 sysctl_sched_latency = limit;
4892 4923
4893 sysctl_sched_runtime_limit = sysctl_sched_granularity * 4; 4924 sysctl_sched_runtime_limit = sysctl_sched_latency;
4894 sysctl_sched_wakeup_granularity = sysctl_sched_granularity / 2; 4925 sysctl_sched_wakeup_granularity = sysctl_sched_min_granularity / 2;
4895} 4926}
4896 4927
4897#ifdef CONFIG_SMP 4928#ifdef CONFIG_SMP
@@ -5234,15 +5265,16 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
5234static struct ctl_table sd_ctl_dir[] = { 5265static struct ctl_table sd_ctl_dir[] = {
5235 { 5266 {
5236 .procname = "sched_domain", 5267 .procname = "sched_domain",
5237 .mode = 0755, 5268 .mode = 0555,
5238 }, 5269 },
5239 {0,}, 5270 {0,},
5240}; 5271};
5241 5272
5242static struct ctl_table sd_ctl_root[] = { 5273static struct ctl_table sd_ctl_root[] = {
5243 { 5274 {
5275 .ctl_name = CTL_KERN,
5244 .procname = "kernel", 5276 .procname = "kernel",
5245 .mode = 0755, 5277 .mode = 0555,
5246 .child = sd_ctl_dir, 5278 .child = sd_ctl_dir,
5247 }, 5279 },
5248 {0,}, 5280 {0,},
@@ -5318,7 +5350,7 @@ static ctl_table *sd_alloc_ctl_cpu_table(int cpu)
5318 for_each_domain(cpu, sd) { 5350 for_each_domain(cpu, sd) {
5319 snprintf(buf, 32, "domain%d", i); 5351 snprintf(buf, 32, "domain%d", i);
5320 entry->procname = kstrdup(buf, GFP_KERNEL); 5352 entry->procname = kstrdup(buf, GFP_KERNEL);
5321 entry->mode = 0755; 5353 entry->mode = 0555;
5322 entry->child = sd_alloc_ctl_domain_table(sd); 5354 entry->child = sd_alloc_ctl_domain_table(sd);
5323 entry++; 5355 entry++;
5324 i++; 5356 i++;
@@ -5338,7 +5370,7 @@ static void init_sched_domain_sysctl(void)
5338 for (i = 0; i < cpu_num; i++, entry++) { 5370 for (i = 0; i < cpu_num; i++, entry++) {
5339 snprintf(buf, 32, "cpu%d", i); 5371 snprintf(buf, 32, "cpu%d", i);
5340 entry->procname = kstrdup(buf, GFP_KERNEL); 5372 entry->procname = kstrdup(buf, GFP_KERNEL);
5341 entry->mode = 0755; 5373 entry->mode = 0555;
5342 entry->child = sd_alloc_ctl_cpu_table(i); 5374 entry->child = sd_alloc_ctl_cpu_table(i);
5343 } 5375 }
5344 sd_sysctl_header = register_sysctl_table(sd_ctl_root); 5376 sd_sysctl_header = register_sysctl_table(sd_ctl_root);
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 87e524762b..c3ee38bd34 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -154,10 +154,11 @@ static void print_cpu(struct seq_file *m, int cpu)
154 P(next_balance); 154 P(next_balance);
155 P(curr->pid); 155 P(curr->pid);
156 P(clock); 156 P(clock);
157 P(idle_clock);
157 P(prev_clock_raw); 158 P(prev_clock_raw);
158 P(clock_warps); 159 P(clock_warps);
159 P(clock_overflows); 160 P(clock_overflows);
160 P(clock_unstable_events); 161 P(clock_deep_idle_events);
161 P(clock_max_delta); 162 P(clock_max_delta);
162 P(cpu_load[0]); 163 P(cpu_load[0]);
163 P(cpu_load[1]); 164 P(cpu_load[1]);
@@ -282,4 +283,5 @@ void proc_sched_set_task(struct task_struct *p)
282 p->se.wait_runtime_overruns = p->se.wait_runtime_underruns = 0; 283 p->se.wait_runtime_overruns = p->se.wait_runtime_underruns = 0;
283#endif 284#endif
284 p->se.sum_exec_runtime = 0; 285 p->se.sum_exec_runtime = 0;
286 p->se.prev_sum_exec_runtime = 0;
285} 287}
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index fedbb51bba..67c67a8714 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -15,34 +15,50 @@
15 * 15 *
16 * Scaled math optimizations by Thomas Gleixner 16 * Scaled math optimizations by Thomas Gleixner
17 * Copyright (C) 2007, Thomas Gleixner <tglx@linutronix.de> 17 * Copyright (C) 2007, Thomas Gleixner <tglx@linutronix.de>
18 *
19 * Adaptive scheduling granularity, math enhancements by Peter Zijlstra
20 * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
18 */ 21 */
19 22
20/* 23/*
21 * Preemption granularity: 24 * Targeted preemption latency for CPU-bound tasks:
22 * (default: 2 msec, units: nanoseconds) 25 * (default: 20ms, units: nanoseconds)
23 * 26 *
24 * NOTE: this granularity value is not the same as the concept of 27 * NOTE: this latency value is not the same as the concept of
25 * 'timeslice length' - timeslices in CFS will typically be somewhat 28 * 'timeslice length' - timeslices in CFS are of variable length.
26 * larger than this value. (to see the precise effective timeslice 29 * (to see the precise effective timeslice length of your workload,
27 * length of your workload, run vmstat and monitor the context-switches 30 * run vmstat and monitor the context-switches field)
28 * field)
29 * 31 *
30 * On SMP systems the value of this is multiplied by the log2 of the 32 * On SMP systems the value of this is multiplied by the log2 of the
31 * number of CPUs. (i.e. factor 2x on 2-way systems, 3x on 4-way 33 * number of CPUs. (i.e. factor 2x on 2-way systems, 3x on 4-way
32 * systems, 4x on 8-way systems, 5x on 16-way systems, etc.) 34 * systems, 4x on 8-way systems, 5x on 16-way systems, etc.)
35 * Targeted preemption latency for CPU-bound tasks:
36 */
37unsigned int sysctl_sched_latency __read_mostly = 20000000ULL;
38
39/*
40 * Minimal preemption granularity for CPU-bound tasks:
41 * (default: 2 msec, units: nanoseconds)
33 */ 42 */
34unsigned int sysctl_sched_granularity __read_mostly = 2000000000ULL/HZ; 43unsigned int sysctl_sched_min_granularity __read_mostly = 2000000ULL;
44
45/*
46 * sys_sched_yield() compat mode
47 *
48 * This option switches the agressive yield implementation of the
49 * old scheduler back on.
50 */
51unsigned int __read_mostly sysctl_sched_compat_yield;
35 52
36/* 53/*
37 * SCHED_BATCH wake-up granularity. 54 * SCHED_BATCH wake-up granularity.
38 * (default: 10 msec, units: nanoseconds) 55 * (default: 25 msec, units: nanoseconds)
39 * 56 *
40 * This option delays the preemption effects of decoupled workloads 57 * This option delays the preemption effects of decoupled workloads
41 * and reduces their over-scheduling. Synchronous workloads will still 58 * and reduces their over-scheduling. Synchronous workloads will still
42 * have immediate wakeup/sleep latencies. 59 * have immediate wakeup/sleep latencies.
43 */ 60 */
44unsigned int sysctl_sched_batch_wakeup_granularity __read_mostly = 61unsigned int sysctl_sched_batch_wakeup_granularity __read_mostly = 25000000UL;
45 10000000000ULL/HZ;
46 62
47/* 63/*
48 * SCHED_OTHER wake-up granularity. 64 * SCHED_OTHER wake-up granularity.
@@ -52,12 +68,12 @@ unsigned int sysctl_sched_batch_wakeup_granularity __read_mostly =
52 * and reduces their over-scheduling. Synchronous workloads will still 68 * and reduces their over-scheduling. Synchronous workloads will still
53 * have immediate wakeup/sleep latencies. 69 * have immediate wakeup/sleep latencies.
54 */ 70 */
55unsigned int sysctl_sched_wakeup_granularity __read_mostly = 1000000000ULL/HZ; 71unsigned int sysctl_sched_wakeup_granularity __read_mostly = 1000000UL;
56 72
57unsigned int sysctl_sched_stat_granularity __read_mostly; 73unsigned int sysctl_sched_stat_granularity __read_mostly;
58 74
59/* 75/*
60 * Initialized in sched_init_granularity(): 76 * Initialized in sched_init_granularity() [to 5 times the base granularity]:
61 */ 77 */
62unsigned int sysctl_sched_runtime_limit __read_mostly; 78unsigned int sysctl_sched_runtime_limit __read_mostly;
63 79
@@ -186,6 +202,8 @@ __enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
186 update_load_add(&cfs_rq->load, se->load.weight); 202 update_load_add(&cfs_rq->load, se->load.weight);
187 cfs_rq->nr_running++; 203 cfs_rq->nr_running++;
188 se->on_rq = 1; 204 se->on_rq = 1;
205
206 schedstat_add(cfs_rq, wait_runtime, se->wait_runtime);
189} 207}
190 208
191static inline void 209static inline void
@@ -197,6 +215,8 @@ __dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
197 update_load_sub(&cfs_rq->load, se->load.weight); 215 update_load_sub(&cfs_rq->load, se->load.weight);
198 cfs_rq->nr_running--; 216 cfs_rq->nr_running--;
199 se->on_rq = 0; 217 se->on_rq = 0;
218
219 schedstat_add(cfs_rq, wait_runtime, -se->wait_runtime);
200} 220}
201 221
202static inline struct rb_node *first_fair(struct cfs_rq *cfs_rq) 222static inline struct rb_node *first_fair(struct cfs_rq *cfs_rq)
@@ -214,6 +234,49 @@ static struct sched_entity *__pick_next_entity(struct cfs_rq *cfs_rq)
214 */ 234 */
215 235
216/* 236/*
237 * Calculate the preemption granularity needed to schedule every
238 * runnable task once per sysctl_sched_latency amount of time.
239 * (down to a sensible low limit on granularity)
240 *
241 * For example, if there are 2 tasks running and latency is 10 msecs,
242 * we switch tasks every 5 msecs. If we have 3 tasks running, we have
243 * to switch tasks every 3.33 msecs to get a 10 msecs observed latency
244 * for each task. We do finer and finer scheduling up to until we
245 * reach the minimum granularity value.
246 *
247 * To achieve this we use the following dynamic-granularity rule:
248 *
249 * gran = lat/nr - lat/nr/nr
250 *
251 * This comes out of the following equations:
252 *
253 * kA1 + gran = kB1
254 * kB2 + gran = kA2
255 * kA2 = kA1
256 * kB2 = kB1 - d + d/nr
257 * lat = d * nr
258 *
259 * Where 'k' is key, 'A' is task A (waiting), 'B' is task B (running),
260 * '1' is start of time, '2' is end of time, 'd' is delay between
261 * 1 and 2 (during which task B was running), 'nr' is number of tasks
262 * running, 'lat' is the the period of each task. ('lat' is the
263 * sched_latency that we aim for.)
264 */
265static long
266sched_granularity(struct cfs_rq *cfs_rq)
267{
268 unsigned int gran = sysctl_sched_latency;
269 unsigned int nr = cfs_rq->nr_running;
270
271 if (nr > 1) {
272 gran = gran/nr - gran/nr/nr;
273 gran = max(gran, sysctl_sched_min_granularity);
274 }
275
276 return gran;
277}
278
279/*
217 * We rescale the rescheduling granularity of tasks according to their 280 * We rescale the rescheduling granularity of tasks according to their
218 * nice level, but only linearly, not exponentially: 281 * nice level, but only linearly, not exponentially:
219 */ 282 */
@@ -240,7 +303,7 @@ niced_granularity(struct sched_entity *curr, unsigned long granularity)
240 /* 303 /*
241 * It will always fit into 'long': 304 * It will always fit into 'long':
242 */ 305 */
243 return (long) (tmp >> WMULT_SHIFT); 306 return (long) (tmp >> (WMULT_SHIFT-NICE_0_SHIFT));
244} 307}
245 308
246static inline void 309static inline void
@@ -303,10 +366,10 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr)
303 delta_fair = calc_delta_fair(delta_exec, lw); 366 delta_fair = calc_delta_fair(delta_exec, lw);
304 delta_mine = calc_delta_mine(delta_exec, curr->load.weight, lw); 367 delta_mine = calc_delta_mine(delta_exec, curr->load.weight, lw);
305 368
306 if (cfs_rq->sleeper_bonus > sysctl_sched_granularity) { 369 if (cfs_rq->sleeper_bonus > sysctl_sched_min_granularity) {
307 delta = min(cfs_rq->sleeper_bonus, (u64)delta_exec); 370 delta = min((u64)delta_mine, cfs_rq->sleeper_bonus);
308 delta = calc_delta_mine(delta, curr->load.weight, lw); 371 delta = min(delta, (unsigned long)(
309 delta = min((u64)delta, cfs_rq->sleeper_bonus); 372 (long)sysctl_sched_runtime_limit - curr->wait_runtime));
310 cfs_rq->sleeper_bonus -= delta; 373 cfs_rq->sleeper_bonus -= delta;
311 delta_mine -= delta; 374 delta_mine -= delta;
312 } 375 }
@@ -438,6 +501,9 @@ update_stats_wait_end(struct cfs_rq *cfs_rq, struct sched_entity *se)
438{ 501{
439 unsigned long delta_fair; 502 unsigned long delta_fair;
440 503
504 if (unlikely(!se->wait_start_fair))
505 return;
506
441 delta_fair = (unsigned long)min((u64)(2*sysctl_sched_runtime_limit), 507 delta_fair = (unsigned long)min((u64)(2*sysctl_sched_runtime_limit),
442 (u64)(cfs_rq->fair_clock - se->wait_start_fair)); 508 (u64)(cfs_rq->fair_clock - se->wait_start_fair));
443 509
@@ -494,6 +560,13 @@ static void __enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se)
494 unsigned long load = cfs_rq->load.weight, delta_fair; 560 unsigned long load = cfs_rq->load.weight, delta_fair;
495 long prev_runtime; 561 long prev_runtime;
496 562
563 /*
564 * Do not boost sleepers if there's too much bonus 'in flight'
565 * already:
566 */
567 if (unlikely(cfs_rq->sleeper_bonus > sysctl_sched_runtime_limit))
568 return;
569
497 if (sysctl_sched_features & SCHED_FEAT_SLEEPER_LOAD_AVG) 570 if (sysctl_sched_features & SCHED_FEAT_SLEEPER_LOAD_AVG)
498 load = rq_of(cfs_rq)->cpu_load[2]; 571 load = rq_of(cfs_rq)->cpu_load[2];
499 572
@@ -519,10 +592,6 @@ static void __enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se)
519 * Track the amount of bonus we've given to sleepers: 592 * Track the amount of bonus we've given to sleepers:
520 */ 593 */
521 cfs_rq->sleeper_bonus += delta_fair; 594 cfs_rq->sleeper_bonus += delta_fair;
522 if (unlikely(cfs_rq->sleeper_bonus > sysctl_sched_runtime_limit))
523 cfs_rq->sleeper_bonus = sysctl_sched_runtime_limit;
524
525 schedstat_add(cfs_rq, wait_runtime, se->wait_runtime);
526} 595}
527 596
528static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se) 597static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se)
@@ -570,6 +639,16 @@ static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se)
570 639
571 se->block_start = 0; 640 se->block_start = 0;
572 se->sum_sleep_runtime += delta; 641 se->sum_sleep_runtime += delta;
642
643 /*
644 * Blocking time is in units of nanosecs, so shift by 20 to
645 * get a milliseconds-range estimation of the amount of
646 * time that the task spent sleeping:
647 */
648 if (unlikely(prof_on == SLEEP_PROFILING)) {
649 profile_hits(SLEEP_PROFILING, (void *)get_wchan(tsk),
650 delta >> 20);
651 }
573 } 652 }
574#endif 653#endif
575} 654}
@@ -604,7 +683,6 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep)
604 if (tsk->state & TASK_UNINTERRUPTIBLE) 683 if (tsk->state & TASK_UNINTERRUPTIBLE)
605 se->block_start = rq_of(cfs_rq)->clock; 684 se->block_start = rq_of(cfs_rq)->clock;
606 } 685 }
607 cfs_rq->wait_runtime -= se->wait_runtime;
608#endif 686#endif
609 } 687 }
610 __dequeue_entity(cfs_rq, se); 688 __dequeue_entity(cfs_rq, se);
@@ -618,11 +696,31 @@ __check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct sched_entity *se,
618 struct sched_entity *curr, unsigned long granularity) 696 struct sched_entity *curr, unsigned long granularity)
619{ 697{
620 s64 __delta = curr->fair_key - se->fair_key; 698 s64 __delta = curr->fair_key - se->fair_key;
699 unsigned long ideal_runtime, delta_exec;
700
701 /*
702 * ideal_runtime is compared against sum_exec_runtime, which is
703 * walltime, hence do not scale.
704 */
705 ideal_runtime = max(sysctl_sched_latency / cfs_rq->nr_running,
706 (unsigned long)sysctl_sched_min_granularity);
707
708 /*
709 * If we executed more than what the latency constraint suggests,
710 * reduce the rescheduling granularity. This way the total latency
711 * of how much a task is not scheduled converges to
712 * sysctl_sched_latency:
713 */
714 delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime;
715 if (delta_exec > ideal_runtime)
716 granularity = 0;
621 717
622 /* 718 /*
623 * Take scheduling granularity into account - do not 719 * Take scheduling granularity into account - do not
624 * preempt the current task unless the best task has 720 * preempt the current task unless the best task has
625 * a larger than sched_granularity fairness advantage: 721 * a larger than sched_granularity fairness advantage:
722 *
723 * scale granularity as key space is in fair_clock.
626 */ 724 */
627 if (__delta > niced_granularity(curr, granularity)) 725 if (__delta > niced_granularity(curr, granularity))
628 resched_task(rq_of(cfs_rq)->curr); 726 resched_task(rq_of(cfs_rq)->curr);
@@ -641,6 +739,7 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
641 update_stats_wait_end(cfs_rq, se); 739 update_stats_wait_end(cfs_rq, se);
642 update_stats_curr_start(cfs_rq, se); 740 update_stats_curr_start(cfs_rq, se);
643 set_cfs_rq_curr(cfs_rq, se); 741 set_cfs_rq_curr(cfs_rq, se);
742 se->prev_sum_exec_runtime = se->sum_exec_runtime;
644} 743}
645 744
646static struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq) 745static struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq)
@@ -686,7 +785,8 @@ static void entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
686 if (next == curr) 785 if (next == curr)
687 return; 786 return;
688 787
689 __check_preempt_curr_fair(cfs_rq, next, curr, sysctl_sched_granularity); 788 __check_preempt_curr_fair(cfs_rq, next, curr,
789 sched_granularity(cfs_rq));
690} 790}
691 791
692/************************************************** 792/**************************************************
@@ -815,19 +915,62 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int sleep)
815} 915}
816 916
817/* 917/*
818 * sched_yield() support is very simple - we dequeue and enqueue 918 * sched_yield() support is very simple - we dequeue and enqueue.
919 *
920 * If compat_yield is turned on then we requeue to the end of the tree.
819 */ 921 */
820static void yield_task_fair(struct rq *rq, struct task_struct *p) 922static void yield_task_fair(struct rq *rq, struct task_struct *p)
821{ 923{
822 struct cfs_rq *cfs_rq = task_cfs_rq(p); 924 struct cfs_rq *cfs_rq = task_cfs_rq(p);
925 struct rb_node **link = &cfs_rq->tasks_timeline.rb_node;
926 struct sched_entity *rightmost, *se = &p->se;
927 struct rb_node *parent;
823 928
824 __update_rq_clock(rq);
825 /* 929 /*
826 * Dequeue and enqueue the task to update its 930 * Are we the only task in the tree?
827 * position within the tree: 931 */
932 if (unlikely(cfs_rq->nr_running == 1))
933 return;
934
935 if (likely(!sysctl_sched_compat_yield)) {
936 __update_rq_clock(rq);
937 /*
938 * Dequeue and enqueue the task to update its
939 * position within the tree:
940 */
941 dequeue_entity(cfs_rq, &p->se, 0);
942 enqueue_entity(cfs_rq, &p->se, 0);
943
944 return;
945 }
946 /*
947 * Find the rightmost entry in the rbtree:
948 */
949 do {
950 parent = *link;
951 link = &parent->rb_right;
952 } while (*link);
953
954 rightmost = rb_entry(parent, struct sched_entity, run_node);
955 /*
956 * Already in the rightmost position?
957 */
958 if (unlikely(rightmost == se))
959 return;
960
961 /*
962 * Minimally necessary key value to be last in the tree:
828 */ 963 */
829 dequeue_entity(cfs_rq, &p->se, 0); 964 se->fair_key = rightmost->fair_key + 1;
830 enqueue_entity(cfs_rq, &p->se, 0); 965
966 if (cfs_rq->rb_leftmost == &se->run_node)
967 cfs_rq->rb_leftmost = rb_next(&se->run_node);
968 /*
969 * Relink the task to the rightmost position:
970 */
971 rb_erase(&se->run_node, &cfs_rq->tasks_timeline);
972 rb_link_node(&se->run_node, parent, link);
973 rb_insert_color(&se->run_node, &cfs_rq->tasks_timeline);
831} 974}
832 975
833/* 976/*
@@ -1020,31 +1163,32 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr)
1020static void task_new_fair(struct rq *rq, struct task_struct *p) 1163static void task_new_fair(struct rq *rq, struct task_struct *p)
1021{ 1164{
1022 struct cfs_rq *cfs_rq = task_cfs_rq(p); 1165 struct cfs_rq *cfs_rq = task_cfs_rq(p);
1023 struct sched_entity *se = &p->se; 1166 struct sched_entity *se = &p->se, *curr = cfs_rq_curr(cfs_rq);
1024 1167
1025 sched_info_queued(p); 1168 sched_info_queued(p);
1026 1169
1170 update_curr(cfs_rq);
1027 update_stats_enqueue(cfs_rq, se); 1171 update_stats_enqueue(cfs_rq, se);
1028 /* 1172 /*
1029 * Child runs first: we let it run before the parent 1173 * Child runs first: we let it run before the parent
1030 * until it reschedules once. We set up the key so that 1174 * until it reschedules once. We set up the key so that
1031 * it will preempt the parent: 1175 * it will preempt the parent:
1032 */ 1176 */
1033 p->se.fair_key = current->se.fair_key - 1177 se->fair_key = curr->fair_key -
1034 niced_granularity(&rq->curr->se, sysctl_sched_granularity) - 1; 1178 niced_granularity(curr, sched_granularity(cfs_rq)) - 1;
1035 /* 1179 /*
1036 * The first wait is dominated by the child-runs-first logic, 1180 * The first wait is dominated by the child-runs-first logic,
1037 * so do not credit it with that waiting time yet: 1181 * so do not credit it with that waiting time yet:
1038 */ 1182 */
1039 if (sysctl_sched_features & SCHED_FEAT_SKIP_INITIAL) 1183 if (sysctl_sched_features & SCHED_FEAT_SKIP_INITIAL)
1040 p->se.wait_start_fair = 0; 1184 se->wait_start_fair = 0;
1041 1185
1042 /* 1186 /*
1043 * The statistical average of wait_runtime is about 1187 * The statistical average of wait_runtime is about
1044 * -granularity/2, so initialize the task with that: 1188 * -granularity/2, so initialize the task with that:
1045 */ 1189 */
1046 if (sysctl_sched_features & SCHED_FEAT_START_DEBIT) 1190 if (sysctl_sched_features & SCHED_FEAT_START_DEBIT)
1047 p->se.wait_runtime = -(sysctl_sched_granularity / 2); 1191 se->wait_runtime = -(sched_granularity(cfs_rq) / 2);
1048 1192
1049 __enqueue_entity(cfs_rq, se); 1193 __enqueue_entity(cfs_rq, se);
1050} 1194}
@@ -1057,7 +1201,7 @@ static void task_new_fair(struct rq *rq, struct task_struct *p)
1057 */ 1201 */
1058static void set_curr_task_fair(struct rq *rq) 1202static void set_curr_task_fair(struct rq *rq)
1059{ 1203{
1060 struct sched_entity *se = &rq->curr.se; 1204 struct sched_entity *se = &rq->curr->se;
1061 1205
1062 for_each_sched_entity(se) 1206 for_each_sched_entity(se)
1063 set_next_entity(cfs_rq_of(se), se); 1207 set_next_entity(cfs_rq_of(se), se);
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index dcdcad632f..4b87476a02 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -207,10 +207,15 @@ static void task_tick_rt(struct rq *rq, struct task_struct *p)
207 return; 207 return;
208 208
209 p->time_slice = static_prio_timeslice(p->static_prio); 209 p->time_slice = static_prio_timeslice(p->static_prio);
210 set_tsk_need_resched(p);
211 210
212 /* put it at the end of the queue: */ 211 /*
213 requeue_task_rt(rq, p); 212 * Requeue to the end of queue if we are not the only element
213 * on the queue:
214 */
215 if (p->run_list.prev != p->run_list.next) {
216 requeue_task_rt(rq, p);
217 set_tsk_need_resched(p);
218 }
214} 219}
215 220
216static struct sched_class rt_sched_class __read_mostly = { 221static struct sched_class rt_sched_class __read_mostly = {
diff --git a/kernel/signal.c b/kernel/signal.c
index ad63109e41..7929523810 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -378,8 +378,7 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
378 /* We only dequeue private signals from ourselves, we don't let 378 /* We only dequeue private signals from ourselves, we don't let
379 * signalfd steal them 379 * signalfd steal them
380 */ 380 */
381 if (likely(tsk == current)) 381 signr = __dequeue_signal(&tsk->pending, mask, info);
382 signr = __dequeue_signal(&tsk->pending, mask, info);
383 if (!signr) { 382 if (!signr) {
384 signr = __dequeue_signal(&tsk->signal->shared_pending, 383 signr = __dequeue_signal(&tsk->signal->shared_pending,
385 mask, info); 384 mask, info);
@@ -407,8 +406,7 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
407 } 406 }
408 } 407 }
409 } 408 }
410 if (likely(tsk == current)) 409 recalc_sigpending();
411 recalc_sigpending();
412 if (signr && unlikely(sig_kernel_stop(signr))) { 410 if (signr && unlikely(sig_kernel_stop(signr))) {
413 /* 411 /*
414 * Set a marker that we have dequeued a stop signal. Our 412 * Set a marker that we have dequeued a stop signal. Our
@@ -425,7 +423,7 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
425 if (!(tsk->signal->flags & SIGNAL_GROUP_EXIT)) 423 if (!(tsk->signal->flags & SIGNAL_GROUP_EXIT))
426 tsk->signal->flags |= SIGNAL_STOP_DEQUEUED; 424 tsk->signal->flags |= SIGNAL_STOP_DEQUEUED;
427 } 425 }
428 if (signr && likely(tsk == current) && 426 if (signr &&
429 ((info->si_code & __SI_MASK) == __SI_TIMER) && 427 ((info->si_code & __SI_MASK) == __SI_TIMER) &&
430 info->si_sys_private){ 428 info->si_sys_private){
431 /* 429 /*
@@ -533,18 +531,18 @@ static int check_kill_permission(int sig, struct siginfo *info,
533 if (!valid_signal(sig)) 531 if (!valid_signal(sig))
534 return error; 532 return error;
535 533
536 error = audit_signal_info(sig, t); /* Let audit system see the signal */ 534 if (info == SEND_SIG_NOINFO || (!is_si_special(info) && SI_FROMUSER(info))) {
537 if (error) 535 error = audit_signal_info(sig, t); /* Let audit system see the signal */
538 return error; 536 if (error)
539 537 return error;
540 error = -EPERM; 538 error = -EPERM;
541 if ((info == SEND_SIG_NOINFO || (!is_si_special(info) && SI_FROMUSER(info))) 539 if (((sig != SIGCONT) ||
542 && ((sig != SIGCONT) || 540 (process_session(current) != process_session(t)))
543 (process_session(current) != process_session(t))) 541 && (current->euid ^ t->suid) && (current->euid ^ t->uid)
544 && (current->euid ^ t->suid) && (current->euid ^ t->uid) 542 && (current->uid ^ t->suid) && (current->uid ^ t->uid)
545 && (current->uid ^ t->suid) && (current->uid ^ t->uid) 543 && !capable(CAP_KILL))
546 && !capable(CAP_KILL))
547 return error; 544 return error;
545 }
548 546
549 return security_task_kill(t, info, sig, 0); 547 return security_task_kill(t, info, sig, 0);
550} 548}
@@ -1300,20 +1298,19 @@ struct sigqueue *sigqueue_alloc(void)
1300void sigqueue_free(struct sigqueue *q) 1298void sigqueue_free(struct sigqueue *q)
1301{ 1299{
1302 unsigned long flags; 1300 unsigned long flags;
1301 spinlock_t *lock = &current->sighand->siglock;
1302
1303 BUG_ON(!(q->flags & SIGQUEUE_PREALLOC)); 1303 BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
1304 /* 1304 /*
1305 * If the signal is still pending remove it from the 1305 * If the signal is still pending remove it from the
1306 * pending queue. 1306 * pending queue. We must hold ->siglock while testing
1307 * q->list to serialize with collect_signal().
1307 */ 1308 */
1308 if (unlikely(!list_empty(&q->list))) { 1309 spin_lock_irqsave(lock, flags);
1309 spinlock_t *lock = &current->sighand->siglock; 1310 if (!list_empty(&q->list))
1310 read_lock(&tasklist_lock); 1311 list_del_init(&q->list);
1311 spin_lock_irqsave(lock, flags); 1312 spin_unlock_irqrestore(lock, flags);
1312 if (!list_empty(&q->list)) 1313
1313 list_del_init(&q->list);
1314 spin_unlock_irqrestore(lock, flags);
1315 read_unlock(&tasklist_lock);
1316 }
1317 q->flags &= ~SIGQUEUE_PREALLOC; 1314 q->flags &= ~SIGQUEUE_PREALLOC;
1318 __sigqueue_free(q); 1315 __sigqueue_free(q);
1319} 1316}
diff --git a/kernel/sys.c b/kernel/sys.c
index 449b81b98b..8ae2e636eb 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -32,6 +32,7 @@
32#include <linux/getcpu.h> 32#include <linux/getcpu.h>
33#include <linux/task_io_accounting_ops.h> 33#include <linux/task_io_accounting_ops.h>
34#include <linux/seccomp.h> 34#include <linux/seccomp.h>
35#include <linux/cpu.h>
35 36
36#include <linux/compat.h> 37#include <linux/compat.h>
37#include <linux/syscalls.h> 38#include <linux/syscalls.h>
@@ -878,6 +879,7 @@ void kernel_power_off(void)
878 kernel_shutdown_prepare(SYSTEM_POWER_OFF); 879 kernel_shutdown_prepare(SYSTEM_POWER_OFF);
879 if (pm_power_off_prepare) 880 if (pm_power_off_prepare)
880 pm_power_off_prepare(); 881 pm_power_off_prepare();
882 disable_nonboot_cpus();
881 sysdev_shutdown(); 883 sysdev_shutdown();
882 printk(KERN_EMERG "Power down.\n"); 884 printk(KERN_EMERG "Power down.\n");
883 machine_power_off(); 885 machine_power_off();
@@ -1442,7 +1444,6 @@ asmlinkage long sys_times(struct tms __user * tbuf)
1442 * Auch. Had to add the 'did_exec' flag to conform completely to POSIX. 1444 * Auch. Had to add the 'did_exec' flag to conform completely to POSIX.
1443 * LBT 04.03.94 1445 * LBT 04.03.94
1444 */ 1446 */
1445
1446asmlinkage long sys_setpgid(pid_t pid, pid_t pgid) 1447asmlinkage long sys_setpgid(pid_t pid, pid_t pgid)
1447{ 1448{
1448 struct task_struct *p; 1449 struct task_struct *p;
@@ -1470,7 +1471,7 @@ asmlinkage long sys_setpgid(pid_t pid, pid_t pgid)
1470 if (!thread_group_leader(p)) 1471 if (!thread_group_leader(p))
1471 goto out; 1472 goto out;
1472 1473
1473 if (p->real_parent == group_leader) { 1474 if (p->real_parent->tgid == group_leader->tgid) {
1474 err = -EPERM; 1475 err = -EPERM;
1475 if (task_session(p) != task_session(group_leader)) 1476 if (task_session(p) != task_session(group_leader))
1476 goto out; 1477 goto out;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 9029690f4f..53a456ebf6 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -222,8 +222,19 @@ static ctl_table kern_table[] = {
222#ifdef CONFIG_SCHED_DEBUG 222#ifdef CONFIG_SCHED_DEBUG
223 { 223 {
224 .ctl_name = CTL_UNNUMBERED, 224 .ctl_name = CTL_UNNUMBERED,
225 .procname = "sched_granularity_ns", 225 .procname = "sched_min_granularity_ns",
226 .data = &sysctl_sched_granularity, 226 .data = &sysctl_sched_min_granularity,
227 .maxlen = sizeof(unsigned int),
228 .mode = 0644,
229 .proc_handler = &proc_dointvec_minmax,
230 .strategy = &sysctl_intvec,
231 .extra1 = &min_sched_granularity_ns,
232 .extra2 = &max_sched_granularity_ns,
233 },
234 {
235 .ctl_name = CTL_UNNUMBERED,
236 .procname = "sched_latency_ns",
237 .data = &sysctl_sched_latency,
227 .maxlen = sizeof(unsigned int), 238 .maxlen = sizeof(unsigned int),
228 .mode = 0644, 239 .mode = 0644,
229 .proc_handler = &proc_dointvec_minmax, 240 .proc_handler = &proc_dointvec_minmax,
@@ -283,6 +294,23 @@ static ctl_table kern_table[] = {
283 .mode = 0644, 294 .mode = 0644,
284 .proc_handler = &proc_dointvec, 295 .proc_handler = &proc_dointvec,
285 }, 296 },
297 {
298 .ctl_name = CTL_UNNUMBERED,
299 .procname = "sched_features",
300 .data = &sysctl_sched_features,
301 .maxlen = sizeof(unsigned int),
302 .mode = 0644,
303 .proc_handler = &proc_dointvec,
304 },
305#endif
306 {
307 .ctl_name = CTL_UNNUMBERED,
308 .procname = "sched_compat_yield",
309 .data = &sysctl_sched_compat_yield,
310 .maxlen = sizeof(unsigned int),
311 .mode = 0644,
312 .proc_handler = &proc_dointvec,
313 },
286#ifdef CONFIG_PROVE_LOCKING 314#ifdef CONFIG_PROVE_LOCKING
287 { 315 {
288 .ctl_name = CTL_UNNUMBERED, 316 .ctl_name = CTL_UNNUMBERED,
@@ -304,15 +332,6 @@ static ctl_table kern_table[] = {
304 }, 332 },
305#endif 333#endif
306 { 334 {
307 .ctl_name = CTL_UNNUMBERED,
308 .procname = "sched_features",
309 .data = &sysctl_sched_features,
310 .maxlen = sizeof(unsigned int),
311 .mode = 0644,
312 .proc_handler = &proc_dointvec,
313 },
314#endif
315 {
316 .ctl_name = KERN_PANIC, 335 .ctl_name = KERN_PANIC,
317 .procname = "panic", 336 .procname = "panic",
318 .data = &panic_timeout, 337 .data = &panic_timeout,
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index cd91237dbf..de6a2d6b3e 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -226,7 +226,7 @@ static void sync_cmos_clock(unsigned long dummy)
226 226
227static void notify_cmos_timer(void) 227static void notify_cmos_timer(void)
228{ 228{
229 if (no_sync_cmos_clock) 229 if (!no_sync_cmos_clock)
230 mod_timer(&sync_cmos_timer, jiffies + 1); 230 mod_timer(&sync_cmos_timer, jiffies + 1);
231} 231}
232 232
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index db8e0f3d40..0962e05776 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -383,11 +383,7 @@ static int tick_broadcast_set_event(ktime_t expires, int force)
383int tick_resume_broadcast_oneshot(struct clock_event_device *bc) 383int tick_resume_broadcast_oneshot(struct clock_event_device *bc)
384{ 384{
385 clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); 385 clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
386 386 return 0;
387 if(!cpus_empty(tick_broadcast_oneshot_mask))
388 tick_broadcast_set_event(ktime_get(), 1);
389
390 return cpu_isset(smp_processor_id(), tick_broadcast_oneshot_mask);
391} 387}
392 388
393/* 389/*
@@ -549,20 +545,17 @@ void tick_broadcast_switch_to_oneshot(void)
549 */ 545 */
550void tick_shutdown_broadcast_oneshot(unsigned int *cpup) 546void tick_shutdown_broadcast_oneshot(unsigned int *cpup)
551{ 547{
552 struct clock_event_device *bc;
553 unsigned long flags; 548 unsigned long flags;
554 unsigned int cpu = *cpup; 549 unsigned int cpu = *cpup;
555 550
556 spin_lock_irqsave(&tick_broadcast_lock, flags); 551 spin_lock_irqsave(&tick_broadcast_lock, flags);
557 552
558 bc = tick_broadcast_device.evtdev; 553 /*
554 * Clear the broadcast mask flag for the dead cpu, but do not
555 * stop the broadcast device!
556 */
559 cpu_clear(cpu, tick_broadcast_oneshot_mask); 557 cpu_clear(cpu, tick_broadcast_oneshot_mask);
560 558
561 if (tick_broadcast_device.mode == TICKDEV_MODE_ONESHOT) {
562 if (bc && cpus_empty(tick_broadcast_oneshot_mask))
563 clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN);
564 }
565
566 spin_unlock_irqrestore(&tick_broadcast_lock, flags); 559 spin_unlock_irqrestore(&tick_broadcast_lock, flags);
567} 560}
568 561
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index b416995b97..8c3fef1db0 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -160,6 +160,18 @@ void tick_nohz_stop_sched_tick(void)
160 cpu = smp_processor_id(); 160 cpu = smp_processor_id();
161 ts = &per_cpu(tick_cpu_sched, cpu); 161 ts = &per_cpu(tick_cpu_sched, cpu);
162 162
163 /*
164 * If this cpu is offline and it is the one which updates
165 * jiffies, then give up the assignment and let it be taken by
166 * the cpu which runs the tick timer next. If we don't drop
167 * this here the jiffies might be stale and do_timer() never
168 * invoked.
169 */
170 if (unlikely(!cpu_online(cpu))) {
171 if (cpu == tick_do_timer_cpu)
172 tick_do_timer_cpu = -1;
173 }
174
163 if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) 175 if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE))
164 goto end; 176 goto end;
165 177
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index acc417b5a9..4ad79f6bde 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -217,6 +217,7 @@ static void change_clocksource(void)
217} 217}
218#else 218#else
219static inline void change_clocksource(void) { } 219static inline void change_clocksource(void) { }
220static inline s64 __get_nsec_offset(void) { return 0; }
220#endif 221#endif
221 222
222/** 223/**
@@ -280,6 +281,8 @@ void __init timekeeping_init(void)
280static int timekeeping_suspended; 281static int timekeeping_suspended;
281/* time in seconds when suspend began */ 282/* time in seconds when suspend began */
282static unsigned long timekeeping_suspend_time; 283static unsigned long timekeeping_suspend_time;
284/* xtime offset when we went into suspend */
285static s64 timekeeping_suspend_nsecs;
283 286
284/** 287/**
285 * timekeeping_resume - Resumes the generic timekeeping subsystem. 288 * timekeeping_resume - Resumes the generic timekeeping subsystem.
@@ -305,6 +308,8 @@ static int timekeeping_resume(struct sys_device *dev)
305 wall_to_monotonic.tv_sec -= sleep_length; 308 wall_to_monotonic.tv_sec -= sleep_length;
306 total_sleep_time += sleep_length; 309 total_sleep_time += sleep_length;
307 } 310 }
311 /* Make sure that we have the correct xtime reference */
312 timespec_add_ns(&xtime, timekeeping_suspend_nsecs);
308 /* re-base the last cycle value */ 313 /* re-base the last cycle value */
309 clock->cycle_last = clocksource_read(clock); 314 clock->cycle_last = clocksource_read(clock);
310 clock->error = 0; 315 clock->error = 0;
@@ -325,9 +330,12 @@ static int timekeeping_suspend(struct sys_device *dev, pm_message_t state)
325{ 330{
326 unsigned long flags; 331 unsigned long flags;
327 332
333 timekeeping_suspend_time = read_persistent_clock();
334
328 write_seqlock_irqsave(&xtime_lock, flags); 335 write_seqlock_irqsave(&xtime_lock, flags);
336 /* Get the current xtime offset */
337 timekeeping_suspend_nsecs = __get_nsec_offset();
329 timekeeping_suspended = 1; 338 timekeeping_suspended = 1;
330 timekeeping_suspend_time = read_persistent_clock();
331 write_sequnlock_irqrestore(&xtime_lock, flags); 339 write_sequnlock_irqrestore(&xtime_lock, flags);
332 340
333 clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL); 341 clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL);
diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c
index 3c38fb5eae..c36bb7ed03 100644
--- a/kernel/time/timer_stats.c
+++ b/kernel/time/timer_stats.c
@@ -327,8 +327,9 @@ static int tstats_show(struct seq_file *m, void *v)
327 ms = 1; 327 ms = 1;
328 328
329 if (events && period.tv_sec) 329 if (events && period.tv_sec)
330 seq_printf(m, "%ld total events, %ld.%ld events/sec\n", events, 330 seq_printf(m, "%ld total events, %ld.%03ld events/sec\n",
331 events / period.tv_sec, events * 1000 / ms); 331 events, events * 1000 / ms,
332 (events * 1000000 / ms) % 1000);
332 else 333 else
333 seq_printf(m, "%ld total events\n", events); 334 seq_printf(m, "%ld total events\n", events);
334 335
diff --git a/kernel/user.c b/kernel/user.c
index e7d11cef69..9ca2848fc3 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -55,25 +55,22 @@ struct user_struct root_user = {
55/* 55/*
56 * These routines must be called with the uidhash spinlock held! 56 * These routines must be called with the uidhash spinlock held!
57 */ 57 */
58static inline void uid_hash_insert(struct user_struct *up, struct list_head *hashent) 58static inline void uid_hash_insert(struct user_struct *up, struct hlist_head *hashent)
59{ 59{
60 list_add(&up->uidhash_list, hashent); 60 hlist_add_head(&up->uidhash_node, hashent);
61} 61}
62 62
63static inline void uid_hash_remove(struct user_struct *up) 63static inline void uid_hash_remove(struct user_struct *up)
64{ 64{
65 list_del(&up->uidhash_list); 65 hlist_del_init(&up->uidhash_node);
66} 66}
67 67
68static inline struct user_struct *uid_hash_find(uid_t uid, struct list_head *hashent) 68static inline struct user_struct *uid_hash_find(uid_t uid, struct hlist_head *hashent)
69{ 69{
70 struct list_head *up; 70 struct user_struct *user;
71 71 struct hlist_node *h;
72 list_for_each(up, hashent) {
73 struct user_struct *user;
74
75 user = list_entry(up, struct user_struct, uidhash_list);
76 72
73 hlist_for_each_entry(user, h, hashent, uidhash_node) {
77 if(user->uid == uid) { 74 if(user->uid == uid) {
78 atomic_inc(&user->__count); 75 atomic_inc(&user->__count);
79 return user; 76 return user;
@@ -122,7 +119,7 @@ void free_uid(struct user_struct *up)
122 119
123struct user_struct * alloc_uid(struct user_namespace *ns, uid_t uid) 120struct user_struct * alloc_uid(struct user_namespace *ns, uid_t uid)
124{ 121{
125 struct list_head *hashent = uidhashentry(ns, uid); 122 struct hlist_head *hashent = uidhashentry(ns, uid);
126 struct user_struct *up; 123 struct user_struct *up;
127 124
128 spin_lock_irq(&uidhash_lock); 125 spin_lock_irq(&uidhash_lock);
@@ -202,6 +199,30 @@ void switch_uid(struct user_struct *new_user)
202 suid_keys(current); 199 suid_keys(current);
203} 200}
204 201
202void release_uids(struct user_namespace *ns)
203{
204 int i;
205 unsigned long flags;
206 struct hlist_head *head;
207 struct hlist_node *nd;
208
209 spin_lock_irqsave(&uidhash_lock, flags);
210 /*
211 * collapse the chains so that the user_struct-s will
212 * be still alive, but not in hashes. subsequent free_uid()
213 * will free them.
214 */
215 for (i = 0; i < UIDHASH_SZ; i++) {
216 head = ns->uidhash_table + i;
217 while (!hlist_empty(head)) {
218 nd = head->first;
219 hlist_del_init(nd);
220 }
221 }
222 spin_unlock_irqrestore(&uidhash_lock, flags);
223
224 free_uid(ns->root_user);
225}
205 226
206static int __init uid_cache_init(void) 227static int __init uid_cache_init(void)
207{ 228{
@@ -211,7 +232,7 @@ static int __init uid_cache_init(void)
211 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); 232 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
212 233
213 for(n = 0; n < UIDHASH_SZ; ++n) 234 for(n = 0; n < UIDHASH_SZ; ++n)
214 INIT_LIST_HEAD(init_user_ns.uidhash_table + n); 235 INIT_HLIST_HEAD(init_user_ns.uidhash_table + n);
215 236
216 /* Insert the root user immediately (init already runs as root) */ 237 /* Insert the root user immediately (init already runs as root) */
217 spin_lock_irq(&uidhash_lock); 238 spin_lock_irq(&uidhash_lock);
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index d055d98785..7af90fc4f0 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -39,7 +39,7 @@ static struct user_namespace *clone_user_ns(struct user_namespace *old_ns)
39 kref_init(&ns->kref); 39 kref_init(&ns->kref);
40 40
41 for (n = 0; n < UIDHASH_SZ; ++n) 41 for (n = 0; n < UIDHASH_SZ; ++n)
42 INIT_LIST_HEAD(ns->uidhash_table + n); 42 INIT_HLIST_HEAD(ns->uidhash_table + n);
43 43
44 /* Insert new root user. */ 44 /* Insert new root user. */
45 ns->root_user = alloc_uid(ns, 0); 45 ns->root_user = alloc_uid(ns, 0);
@@ -81,6 +81,7 @@ void free_user_ns(struct kref *kref)
81 struct user_namespace *ns; 81 struct user_namespace *ns;
82 82
83 ns = container_of(kref, struct user_namespace, kref); 83 ns = container_of(kref, struct user_namespace, kref);
84 release_uids(ns);
84 kfree(ns); 85 kfree(ns);
85} 86}
86 87
diff --git a/kernel/utsname.c b/kernel/utsname.c
index 9d8180a0f0..816d7b24fa 100644
--- a/kernel/utsname.c
+++ b/kernel/utsname.c
@@ -28,7 +28,9 @@ static struct uts_namespace *clone_uts_ns(struct uts_namespace *old_ns)
28 if (!ns) 28 if (!ns)
29 return ERR_PTR(-ENOMEM); 29 return ERR_PTR(-ENOMEM);
30 30
31 down_read(&uts_sem);
31 memcpy(&ns->name, &old_ns->name, sizeof(ns->name)); 32 memcpy(&ns->name, &old_ns->name, sizeof(ns->name));
33 up_read(&uts_sem);
32 kref_init(&ns->kref); 34 kref_init(&ns->kref);
33 return ns; 35 return ns;
34} 36}
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 58e5c152a6..e080d1d744 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -635,7 +635,7 @@ int keventd_up(void)
635int current_is_keventd(void) 635int current_is_keventd(void)
636{ 636{
637 struct cpu_workqueue_struct *cwq; 637 struct cpu_workqueue_struct *cwq;
638 int cpu = smp_processor_id(); /* preempt-safe: keventd is per-cpu */ 638 int cpu = raw_smp_processor_id(); /* preempt-safe: keventd is per-cpu */
639 int ret = 0; 639 int ret = 0;
640 640
641 BUG_ON(!keventd_wq); 641 BUG_ON(!keventd_wq);
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 50a94eee4d..cdc9b099e6 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -284,7 +284,7 @@ config LOCKDEP
284 select KALLSYMS_ALL 284 select KALLSYMS_ALL
285 285
286config LOCK_STAT 286config LOCK_STAT
287 bool "Lock usage statisitics" 287 bool "Lock usage statistics"
288 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT 288 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
289 select LOCKDEP 289 select LOCKDEP
290 select DEBUG_SPINLOCK 290 select DEBUG_SPINLOCK
@@ -294,6 +294,8 @@ config LOCK_STAT
294 help 294 help
295 This feature enables tracking lock contention points 295 This feature enables tracking lock contention points
296 296
297 For more details, see Documentation/lockstat.txt
298
297config DEBUG_LOCKDEP 299config DEBUG_LOCKDEP
298 bool "Lock dependency engine debugging" 300 bool "Lock dependency engine debugging"
299 depends on DEBUG_KERNEL && LOCKDEP 301 depends on DEBUG_KERNEL && LOCKDEP
diff --git a/lib/Makefile b/lib/Makefile
index 6b0ba8cf4e..4f3f3e2565 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -2,7 +2,7 @@
2# Makefile for some libs needed in the kernel. 2# Makefile for some libs needed in the kernel.
3# 3#
4 4
5lib-y := ctype.o string.o vsprintf.o kasprintf.o cmdline.o \ 5lib-y := ctype.o string.o vsprintf.o cmdline.o \
6 rbtree.o radix-tree.o dump_stack.o \ 6 rbtree.o radix-tree.o dump_stack.o \
7 idr.o int_sqrt.o bitmap.o extable.o prio_tree.o \ 7 idr.o int_sqrt.o bitmap.o extable.o prio_tree.o \
8 sha1.o irq_regs.o reciprocal_div.o argv_split.o 8 sha1.o irq_regs.o reciprocal_div.o argv_split.o
@@ -13,7 +13,7 @@ lib-$(CONFIG_SMP) += cpumask.o
13lib-y += kobject.o kref.o kobject_uevent.o klist.o 13lib-y += kobject.o kref.o kobject_uevent.o klist.o
14 14
15obj-y += div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \ 15obj-y += div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
16 bust_spinlocks.o hexdump.o 16 bust_spinlocks.o hexdump.o kasprintf.o
17 17
18ifeq ($(CONFIG_DEBUG_KOBJECT),y) 18ifeq ($(CONFIG_DEBUG_KOBJECT),y)
19CFLAGS_kobject.o += -DDEBUG 19CFLAGS_kobject.o += -DDEBUG
diff --git a/lib/iomap.c b/lib/iomap.c
index a57d262a5e..864f2ec196 100644
--- a/lib/iomap.c
+++ b/lib/iomap.c
@@ -240,7 +240,20 @@ void ioport_unmap(void __iomem *addr)
240EXPORT_SYMBOL(ioport_map); 240EXPORT_SYMBOL(ioport_map);
241EXPORT_SYMBOL(ioport_unmap); 241EXPORT_SYMBOL(ioport_unmap);
242 242
243/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ 243/**
244 * pci_iomap - create a virtual mapping cookie for a PCI BAR
245 * @dev: PCI device that owns the BAR
246 * @bar: BAR number
247 * @maxlen: length of the memory to map
248 *
249 * Using this function you will get a __iomem address to your device BAR.
250 * You can access it using ioread*() and iowrite*(). These functions hide
251 * the details if this is a MMIO or PIO address space and will just do what
252 * you expect from them in the correct way.
253 *
254 * @maxlen specifies the maximum length to map. If you want to get access to
255 * the complete BAR without checking for its length first, pass %0 here.
256 * */
244void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) 257void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
245{ 258{
246 unsigned long start = pci_resource_start(dev, bar); 259 unsigned long start = pci_resource_start(dev, bar);
diff --git a/mm/Kconfig b/mm/Kconfig
index e24d348083..a7609cbcb0 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -137,6 +137,7 @@ config SPLIT_PTLOCK_CPUS
137 int 137 int
138 default "4096" if ARM && !CPU_CACHE_VIPT 138 default "4096" if ARM && !CPU_CACHE_VIPT
139 default "4096" if PARISC && !PA20 139 default "4096" if PARISC && !PA20
140 default "4096" if XEN
140 default "4" 141 default "4"
141 142
142# 143#
diff --git a/mm/filemap.c b/mm/filemap.c
index 90b657b50f..15c8413ee9 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1388,6 +1388,7 @@ retry_find:
1388 size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; 1388 size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
1389 if (unlikely(vmf->pgoff >= size)) { 1389 if (unlikely(vmf->pgoff >= size)) {
1390 unlock_page(page); 1390 unlock_page(page);
1391 page_cache_release(page);
1391 goto outside_data_content; 1392 goto outside_data_content;
1392 } 1393 }
1393 1394
diff --git a/mm/fremap.c b/mm/fremap.c
index c395b1abf0..95bcb5641c 100644
--- a/mm/fremap.c
+++ b/mm/fremap.c
@@ -160,7 +160,7 @@ asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size,
160 if (vma->vm_private_data && !(vma->vm_flags & VM_NONLINEAR)) 160 if (vma->vm_private_data && !(vma->vm_flags & VM_NONLINEAR))
161 goto out; 161 goto out;
162 162
163 if (!vma->vm_flags & VM_CAN_NONLINEAR) 163 if (!(vma->vm_flags & VM_CAN_NONLINEAR))
164 goto out; 164 goto out;
165 165
166 if (end <= start || start < vma->vm_start || end > vma->vm_end) 166 if (end <= start || start < vma->vm_start || end > vma->vm_end)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index de4cf458d6..eab8c428cc 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -42,7 +42,7 @@ static void clear_huge_page(struct page *page, unsigned long addr)
42 might_sleep(); 42 might_sleep();
43 for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); i++) { 43 for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); i++) {
44 cond_resched(); 44 cond_resched();
45 clear_user_highpage(page + i, addr); 45 clear_user_highpage(page + i, addr + i * PAGE_SIZE);
46 } 46 }
47} 47}
48 48
@@ -71,8 +71,9 @@ static struct page *dequeue_huge_page(struct vm_area_struct *vma,
71{ 71{
72 int nid; 72 int nid;
73 struct page *page = NULL; 73 struct page *page = NULL;
74 struct mempolicy *mpol;
74 struct zonelist *zonelist = huge_zonelist(vma, address, 75 struct zonelist *zonelist = huge_zonelist(vma, address,
75 htlb_alloc_mask); 76 htlb_alloc_mask, &mpol);
76 struct zone **z; 77 struct zone **z;
77 78
78 for (z = zonelist->zones; *z; z++) { 79 for (z = zonelist->zones; *z; z++) {
@@ -87,6 +88,7 @@ static struct page *dequeue_huge_page(struct vm_area_struct *vma,
87 break; 88 break;
88 } 89 }
89 } 90 }
91 mpol_free(mpol); /* unref if mpol !NULL */
90 return page; 92 return page;
91} 93}
92 94
diff --git a/mm/memory.c b/mm/memory.c
index ca8cac11bd..f82b359b27 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1639,6 +1639,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
1639 struct page *old_page, *new_page; 1639 struct page *old_page, *new_page;
1640 pte_t entry; 1640 pte_t entry;
1641 int reuse = 0, ret = 0; 1641 int reuse = 0, ret = 0;
1642 int page_mkwrite = 0;
1642 struct page *dirty_page = NULL; 1643 struct page *dirty_page = NULL;
1643 1644
1644 old_page = vm_normal_page(vma, address, orig_pte); 1645 old_page = vm_normal_page(vma, address, orig_pte);
@@ -1687,6 +1688,8 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
1687 page_cache_release(old_page); 1688 page_cache_release(old_page);
1688 if (!pte_same(*page_table, orig_pte)) 1689 if (!pte_same(*page_table, orig_pte))
1689 goto unlock; 1690 goto unlock;
1691
1692 page_mkwrite = 1;
1690 } 1693 }
1691 dirty_page = old_page; 1694 dirty_page = old_page;
1692 get_page(dirty_page); 1695 get_page(dirty_page);
@@ -1774,7 +1777,7 @@ unlock:
1774 * do_no_page is protected similarly. 1777 * do_no_page is protected similarly.
1775 */ 1778 */
1776 wait_on_page_locked(dirty_page); 1779 wait_on_page_locked(dirty_page);
1777 set_page_dirty_balance(dirty_page); 1780 set_page_dirty_balance(dirty_page, page_mkwrite);
1778 put_page(dirty_page); 1781 put_page(dirty_page);
1779 } 1782 }
1780 return ret; 1783 return ret;
@@ -2307,13 +2310,14 @@ oom:
2307 * do not need to flush old virtual caches or the TLB. 2310 * do not need to flush old virtual caches or the TLB.
2308 * 2311 *
2309 * We enter with non-exclusive mmap_sem (to exclude vma changes, 2312 * We enter with non-exclusive mmap_sem (to exclude vma changes,
2310 * but allow concurrent faults), and pte mapped but not yet locked. 2313 * but allow concurrent faults), and pte neither mapped nor locked.
2311 * We return with mmap_sem still held, but pte unmapped and unlocked. 2314 * We return with mmap_sem still held, but pte unmapped and unlocked.
2312 */ 2315 */
2313static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma, 2316static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2314 unsigned long address, pte_t *page_table, pmd_t *pmd, 2317 unsigned long address, pmd_t *pmd,
2315 pgoff_t pgoff, unsigned int flags, pte_t orig_pte) 2318 pgoff_t pgoff, unsigned int flags, pte_t orig_pte)
2316{ 2319{
2320 pte_t *page_table;
2317 spinlock_t *ptl; 2321 spinlock_t *ptl;
2318 struct page *page; 2322 struct page *page;
2319 pte_t entry; 2323 pte_t entry;
@@ -2321,13 +2325,13 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2321 struct page *dirty_page = NULL; 2325 struct page *dirty_page = NULL;
2322 struct vm_fault vmf; 2326 struct vm_fault vmf;
2323 int ret; 2327 int ret;
2328 int page_mkwrite = 0;
2324 2329
2325 vmf.virtual_address = (void __user *)(address & PAGE_MASK); 2330 vmf.virtual_address = (void __user *)(address & PAGE_MASK);
2326 vmf.pgoff = pgoff; 2331 vmf.pgoff = pgoff;
2327 vmf.flags = flags; 2332 vmf.flags = flags;
2328 vmf.page = NULL; 2333 vmf.page = NULL;
2329 2334
2330 pte_unmap(page_table);
2331 BUG_ON(vma->vm_flags & VM_PFNMAP); 2335 BUG_ON(vma->vm_flags & VM_PFNMAP);
2332 2336
2333 if (likely(vma->vm_ops->fault)) { 2337 if (likely(vma->vm_ops->fault)) {
@@ -2398,6 +2402,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2398 anon = 1; /* no anon but release vmf.page */ 2402 anon = 1; /* no anon but release vmf.page */
2399 goto out; 2403 goto out;
2400 } 2404 }
2405 page_mkwrite = 1;
2401 } 2406 }
2402 } 2407 }
2403 2408
@@ -2453,7 +2458,7 @@ out_unlocked:
2453 if (anon) 2458 if (anon)
2454 page_cache_release(vmf.page); 2459 page_cache_release(vmf.page);
2455 else if (dirty_page) { 2460 else if (dirty_page) {
2456 set_page_dirty_balance(dirty_page); 2461 set_page_dirty_balance(dirty_page, page_mkwrite);
2457 put_page(dirty_page); 2462 put_page(dirty_page);
2458 } 2463 }
2459 2464
@@ -2468,8 +2473,8 @@ static int do_linear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2468 - vma->vm_start) >> PAGE_CACHE_SHIFT) + vma->vm_pgoff; 2473 - vma->vm_start) >> PAGE_CACHE_SHIFT) + vma->vm_pgoff;
2469 unsigned int flags = (write_access ? FAULT_FLAG_WRITE : 0); 2474 unsigned int flags = (write_access ? FAULT_FLAG_WRITE : 0);
2470 2475
2471 return __do_fault(mm, vma, address, page_table, pmd, pgoff, 2476 pte_unmap(page_table);
2472 flags, orig_pte); 2477 return __do_fault(mm, vma, address, pmd, pgoff, flags, orig_pte);
2473} 2478}
2474 2479
2475 2480
@@ -2552,9 +2557,7 @@ static int do_nonlinear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2552 } 2557 }
2553 2558
2554 pgoff = pte_to_pgoff(orig_pte); 2559 pgoff = pte_to_pgoff(orig_pte);
2555 2560 return __do_fault(mm, vma, address, pmd, pgoff, flags, orig_pte);
2556 return __do_fault(mm, vma, address, page_table, pmd, pgoff,
2557 flags, orig_pte);
2558} 2561}
2559 2562
2560/* 2563/*
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 172abffeb2..3d6ac9505d 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -955,6 +955,11 @@ asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode,
955 goto out; 955 goto out;
956 } 956 }
957 957
958 if (!nodes_subset(new, node_online_map)) {
959 err = -EINVAL;
960 goto out;
961 }
962
958 err = security_task_movememory(task); 963 err = security_task_movememory(task);
959 if (err) 964 if (err)
960 goto out; 965 goto out;
@@ -1072,21 +1077,37 @@ asmlinkage long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len,
1072 1077
1073#endif 1078#endif
1074 1079
1075/* Return effective policy for a VMA */ 1080/*
1081 * get_vma_policy(@task, @vma, @addr)
1082 * @task - task for fallback if vma policy == default
1083 * @vma - virtual memory area whose policy is sought
1084 * @addr - address in @vma for shared policy lookup
1085 *
1086 * Returns effective policy for a VMA at specified address.
1087 * Falls back to @task or system default policy, as necessary.
1088 * Returned policy has extra reference count if shared, vma,
1089 * or some other task's policy [show_numa_maps() can pass
1090 * @task != current]. It is the caller's responsibility to
1091 * free the reference in these cases.
1092 */
1076static struct mempolicy * get_vma_policy(struct task_struct *task, 1093static struct mempolicy * get_vma_policy(struct task_struct *task,
1077 struct vm_area_struct *vma, unsigned long addr) 1094 struct vm_area_struct *vma, unsigned long addr)
1078{ 1095{
1079 struct mempolicy *pol = task->mempolicy; 1096 struct mempolicy *pol = task->mempolicy;
1097 int shared_pol = 0;
1080 1098
1081 if (vma) { 1099 if (vma) {
1082 if (vma->vm_ops && vma->vm_ops->get_policy) 1100 if (vma->vm_ops && vma->vm_ops->get_policy) {
1083 pol = vma->vm_ops->get_policy(vma, addr); 1101 pol = vma->vm_ops->get_policy(vma, addr);
1084 else if (vma->vm_policy && 1102 shared_pol = 1; /* if pol non-NULL, add ref below */
1103 } else if (vma->vm_policy &&
1085 vma->vm_policy->policy != MPOL_DEFAULT) 1104 vma->vm_policy->policy != MPOL_DEFAULT)
1086 pol = vma->vm_policy; 1105 pol = vma->vm_policy;
1087 } 1106 }
1088 if (!pol) 1107 if (!pol)
1089 pol = &default_policy; 1108 pol = &default_policy;
1109 else if (!shared_pol && pol != current->mempolicy)
1110 mpol_get(pol); /* vma or other task's policy */
1090 return pol; 1111 return pol;
1091} 1112}
1092 1113
@@ -1202,19 +1223,45 @@ static inline unsigned interleave_nid(struct mempolicy *pol,
1202} 1223}
1203 1224
1204#ifdef CONFIG_HUGETLBFS 1225#ifdef CONFIG_HUGETLBFS
1205/* Return a zonelist suitable for a huge page allocation. */ 1226/*
1227 * huge_zonelist(@vma, @addr, @gfp_flags, @mpol)
1228 * @vma = virtual memory area whose policy is sought
1229 * @addr = address in @vma for shared policy lookup and interleave policy
1230 * @gfp_flags = for requested zone
1231 * @mpol = pointer to mempolicy pointer for reference counted 'BIND policy
1232 *
1233 * Returns a zonelist suitable for a huge page allocation.
1234 * If the effective policy is 'BIND, returns pointer to policy's zonelist.
1235 * If it is also a policy for which get_vma_policy() returns an extra
1236 * reference, we must hold that reference until after allocation.
1237 * In that case, return policy via @mpol so hugetlb allocation can drop
1238 * the reference. For non-'BIND referenced policies, we can/do drop the
1239 * reference here, so the caller doesn't need to know about the special case
1240 * for default and current task policy.
1241 */
1206struct zonelist *huge_zonelist(struct vm_area_struct *vma, unsigned long addr, 1242struct zonelist *huge_zonelist(struct vm_area_struct *vma, unsigned long addr,
1207 gfp_t gfp_flags) 1243 gfp_t gfp_flags, struct mempolicy **mpol)
1208{ 1244{
1209 struct mempolicy *pol = get_vma_policy(current, vma, addr); 1245 struct mempolicy *pol = get_vma_policy(current, vma, addr);
1246 struct zonelist *zl;
1210 1247
1248 *mpol = NULL; /* probably no unref needed */
1211 if (pol->policy == MPOL_INTERLEAVE) { 1249 if (pol->policy == MPOL_INTERLEAVE) {
1212 unsigned nid; 1250 unsigned nid;
1213 1251
1214 nid = interleave_nid(pol, vma, addr, HPAGE_SHIFT); 1252 nid = interleave_nid(pol, vma, addr, HPAGE_SHIFT);
1253 __mpol_free(pol); /* finished with pol */
1215 return NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_flags); 1254 return NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_flags);
1216 } 1255 }
1217 return zonelist_policy(GFP_HIGHUSER, pol); 1256
1257 zl = zonelist_policy(GFP_HIGHUSER, pol);
1258 if (unlikely(pol != &default_policy && pol != current->mempolicy)) {
1259 if (pol->policy != MPOL_BIND)
1260 __mpol_free(pol); /* finished with pol */
1261 else
1262 *mpol = pol; /* unref needed after allocation */
1263 }
1264 return zl;
1218} 1265}
1219#endif 1266#endif
1220 1267
@@ -1259,6 +1306,7 @@ struct page *
1259alloc_page_vma(gfp_t gfp, struct vm_area_struct *vma, unsigned long addr) 1306alloc_page_vma(gfp_t gfp, struct vm_area_struct *vma, unsigned long addr)
1260{ 1307{
1261 struct mempolicy *pol = get_vma_policy(current, vma, addr); 1308 struct mempolicy *pol = get_vma_policy(current, vma, addr);
1309 struct zonelist *zl;
1262 1310
1263 cpuset_update_task_memory_state(); 1311 cpuset_update_task_memory_state();
1264 1312
@@ -1268,7 +1316,19 @@ alloc_page_vma(gfp_t gfp, struct vm_area_struct *vma, unsigned long addr)
1268 nid = interleave_nid(pol, vma, addr, PAGE_SHIFT); 1316 nid = interleave_nid(pol, vma, addr, PAGE_SHIFT);
1269 return alloc_page_interleave(gfp, 0, nid); 1317 return alloc_page_interleave(gfp, 0, nid);
1270 } 1318 }
1271 return __alloc_pages(gfp, 0, zonelist_policy(gfp, pol)); 1319 zl = zonelist_policy(gfp, pol);
1320 if (pol != &default_policy && pol != current->mempolicy) {
1321 /*
1322 * slow path: ref counted policy -- shared or vma
1323 */
1324 struct page *page = __alloc_pages(gfp, 0, zl);
1325 __mpol_free(pol);
1326 return page;
1327 }
1328 /*
1329 * fast path: default or task policy
1330 */
1331 return __alloc_pages(gfp, 0, zl);
1272} 1332}
1273 1333
1274/** 1334/**
@@ -1867,6 +1927,7 @@ int show_numa_map(struct seq_file *m, void *v)
1867 struct numa_maps *md; 1927 struct numa_maps *md;
1868 struct file *file = vma->vm_file; 1928 struct file *file = vma->vm_file;
1869 struct mm_struct *mm = vma->vm_mm; 1929 struct mm_struct *mm = vma->vm_mm;
1930 struct mempolicy *pol;
1870 int n; 1931 int n;
1871 char buffer[50]; 1932 char buffer[50];
1872 1933
@@ -1877,8 +1938,13 @@ int show_numa_map(struct seq_file *m, void *v)
1877 if (!md) 1938 if (!md)
1878 return 0; 1939 return 0;
1879 1940
1880 mpol_to_str(buffer, sizeof(buffer), 1941 pol = get_vma_policy(priv->task, vma, vma->vm_start);
1881 get_vma_policy(priv->task, vma, vma->vm_start)); 1942 mpol_to_str(buffer, sizeof(buffer), pol);
1943 /*
1944 * unref shared or other task's mempolicy
1945 */
1946 if (pol != &default_policy && pol != current->mempolicy)
1947 __mpol_free(pol);
1882 1948
1883 seq_printf(m, "%08lx %s", vma->vm_start, buffer); 1949 seq_printf(m, "%08lx %s", vma->vm_start, buffer);
1884 1950
diff --git a/mm/migrate.c b/mm/migrate.c
index 37c73b9020..e2fdbce187 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -611,6 +611,7 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
611 int rc = 0; 611 int rc = 0;
612 int *result = NULL; 612 int *result = NULL;
613 struct page *newpage = get_new_page(page, private, &result); 613 struct page *newpage = get_new_page(page, private, &result);
614 int rcu_locked = 0;
614 615
615 if (!newpage) 616 if (!newpage)
616 return -ENOMEM; 617 return -ENOMEM;
@@ -636,8 +637,13 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
636 * we cannot notice that anon_vma is freed while we migrates a page. 637 * we cannot notice that anon_vma is freed while we migrates a page.
637 * This rcu_read_lock() delays freeing anon_vma pointer until the end 638 * This rcu_read_lock() delays freeing anon_vma pointer until the end
638 * of migration. File cache pages are no problem because of page_lock() 639 * of migration. File cache pages are no problem because of page_lock()
640 * File Caches may use write_page() or lock_page() in migration, then,
641 * just care Anon page here.
639 */ 642 */
640 rcu_read_lock(); 643 if (PageAnon(page)) {
644 rcu_read_lock();
645 rcu_locked = 1;
646 }
641 /* 647 /*
642 * This is a corner case handling. 648 * This is a corner case handling.
643 * When a new swap-cache is read into, it is linked to LRU 649 * When a new swap-cache is read into, it is linked to LRU
@@ -656,7 +662,8 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
656 if (rc) 662 if (rc)
657 remove_migration_ptes(page, page); 663 remove_migration_ptes(page, page);
658rcu_unlock: 664rcu_unlock:
659 rcu_read_unlock(); 665 if (rcu_locked)
666 rcu_read_unlock();
660 667
661unlock: 668unlock:
662 669
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 63512a9ed5..4472036337 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -274,9 +274,9 @@ static void balance_dirty_pages(struct address_space *mapping)
274 pdflush_operation(background_writeout, 0); 274 pdflush_operation(background_writeout, 0);
275} 275}
276 276
277void set_page_dirty_balance(struct page *page) 277void set_page_dirty_balance(struct page *page, int page_mkwrite)
278{ 278{
279 if (set_page_dirty(page)) { 279 if (set_page_dirty(page) || page_mkwrite) {
280 struct address_space *mapping = page_mapping(page); 280 struct address_space *mapping = page_mapping(page);
281 281
282 if (mapping) 282 if (mapping)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6427653023..1a8c59571c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2345,6 +2345,8 @@ static int __cpuinit process_zones(int cpu)
2345 return 0; 2345 return 0;
2346bad: 2346bad:
2347 for_each_zone(dzone) { 2347 for_each_zone(dzone) {
2348 if (!populated_zone(dzone))
2349 continue;
2348 if (dzone == zone) 2350 if (dzone == zone)
2349 break; 2351 break;
2350 kfree(zone_pcp(dzone, cpu)); 2352 kfree(zone_pcp(dzone, cpu));
diff --git a/mm/slub.c b/mm/slub.c
index 04151da399..addb20a6d6 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -986,7 +986,9 @@ out:
986 986
987__setup("slub_debug", setup_slub_debug); 987__setup("slub_debug", setup_slub_debug);
988 988
989static void kmem_cache_open_debug_check(struct kmem_cache *s) 989static unsigned long kmem_cache_flags(unsigned long objsize,
990 unsigned long flags, const char *name,
991 void (*ctor)(void *, struct kmem_cache *, unsigned long))
990{ 992{
991 /* 993 /*
992 * The page->offset field is only 16 bit wide. This is an offset 994 * The page->offset field is only 16 bit wide. This is an offset
@@ -1000,19 +1002,21 @@ static void kmem_cache_open_debug_check(struct kmem_cache *s)
1000 * Debugging or ctor may create a need to move the free 1002 * Debugging or ctor may create a need to move the free
1001 * pointer. Fail if this happens. 1003 * pointer. Fail if this happens.
1002 */ 1004 */
1003 if (s->objsize >= 65535 * sizeof(void *)) { 1005 if (objsize >= 65535 * sizeof(void *)) {
1004 BUG_ON(s->flags & (SLAB_RED_ZONE | SLAB_POISON | 1006 BUG_ON(flags & (SLAB_RED_ZONE | SLAB_POISON |
1005 SLAB_STORE_USER | SLAB_DESTROY_BY_RCU)); 1007 SLAB_STORE_USER | SLAB_DESTROY_BY_RCU));
1006 BUG_ON(s->ctor); 1008 BUG_ON(ctor);
1007 } 1009 } else {
1008 else
1009 /* 1010 /*
1010 * Enable debugging if selected on the kernel commandline. 1011 * Enable debugging if selected on the kernel commandline.
1011 */ 1012 */
1012 if (slub_debug && (!slub_debug_slabs || 1013 if (slub_debug && (!slub_debug_slabs ||
1013 strncmp(slub_debug_slabs, s->name, 1014 strncmp(slub_debug_slabs, name,
1014 strlen(slub_debug_slabs)) == 0)) 1015 strlen(slub_debug_slabs)) == 0))
1015 s->flags |= slub_debug; 1016 flags |= slub_debug;
1017 }
1018
1019 return flags;
1016} 1020}
1017#else 1021#else
1018static inline void setup_object_debug(struct kmem_cache *s, 1022static inline void setup_object_debug(struct kmem_cache *s,
@@ -1029,7 +1033,12 @@ static inline int slab_pad_check(struct kmem_cache *s, struct page *page)
1029static inline int check_object(struct kmem_cache *s, struct page *page, 1033static inline int check_object(struct kmem_cache *s, struct page *page,
1030 void *object, int active) { return 1; } 1034 void *object, int active) { return 1; }
1031static inline void add_full(struct kmem_cache_node *n, struct page *page) {} 1035static inline void add_full(struct kmem_cache_node *n, struct page *page) {}
1032static inline void kmem_cache_open_debug_check(struct kmem_cache *s) {} 1036static inline unsigned long kmem_cache_flags(unsigned long objsize,
1037 unsigned long flags, const char *name,
1038 void (*ctor)(void *, struct kmem_cache *, unsigned long))
1039{
1040 return flags;
1041}
1033#define slub_debug 0 1042#define slub_debug 0
1034#endif 1043#endif
1035/* 1044/*
@@ -2088,9 +2097,8 @@ static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags,
2088 s->name = name; 2097 s->name = name;
2089 s->ctor = ctor; 2098 s->ctor = ctor;
2090 s->objsize = size; 2099 s->objsize = size;
2091 s->flags = flags;
2092 s->align = align; 2100 s->align = align;
2093 kmem_cache_open_debug_check(s); 2101 s->flags = kmem_cache_flags(size, flags, name, ctor);
2094 2102
2095 if (!calculate_sizes(s)) 2103 if (!calculate_sizes(s))
2096 goto error; 2104 goto error;
@@ -2660,7 +2668,7 @@ static int slab_unmergeable(struct kmem_cache *s)
2660} 2668}
2661 2669
2662static struct kmem_cache *find_mergeable(size_t size, 2670static struct kmem_cache *find_mergeable(size_t size,
2663 size_t align, unsigned long flags, 2671 size_t align, unsigned long flags, const char *name,
2664 void (*ctor)(void *, struct kmem_cache *, unsigned long)) 2672 void (*ctor)(void *, struct kmem_cache *, unsigned long))
2665{ 2673{
2666 struct kmem_cache *s; 2674 struct kmem_cache *s;
@@ -2674,6 +2682,7 @@ static struct kmem_cache *find_mergeable(size_t size,
2674 size = ALIGN(size, sizeof(void *)); 2682 size = ALIGN(size, sizeof(void *));
2675 align = calculate_alignment(flags, align, size); 2683 align = calculate_alignment(flags, align, size);
2676 size = ALIGN(size, align); 2684 size = ALIGN(size, align);
2685 flags = kmem_cache_flags(size, flags, name, NULL);
2677 2686
2678 list_for_each_entry(s, &slab_caches, list) { 2687 list_for_each_entry(s, &slab_caches, list) {
2679 if (slab_unmergeable(s)) 2688 if (slab_unmergeable(s))
@@ -2682,8 +2691,7 @@ static struct kmem_cache *find_mergeable(size_t size,
2682 if (size > s->size) 2691 if (size > s->size)
2683 continue; 2692 continue;
2684 2693
2685 if (((flags | slub_debug) & SLUB_MERGE_SAME) != 2694 if ((flags & SLUB_MERGE_SAME) != (s->flags & SLUB_MERGE_SAME))
2686 (s->flags & SLUB_MERGE_SAME))
2687 continue; 2695 continue;
2688 /* 2696 /*
2689 * Check if alignment is compatible. 2697 * Check if alignment is compatible.
@@ -2707,7 +2715,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
2707 struct kmem_cache *s; 2715 struct kmem_cache *s;
2708 2716
2709 down_write(&slub_lock); 2717 down_write(&slub_lock);
2710 s = find_mergeable(size, align, flags, ctor); 2718 s = find_mergeable(size, align, flags, name, ctor);
2711 if (s) { 2719 if (s) {
2712 s->refcount++; 2720 s->refcount++;
2713 /* 2721 /*
@@ -3813,7 +3821,9 @@ static int __init slab_sysfs_init(void)
3813 3821
3814 list_for_each_entry(s, &slab_caches, list) { 3822 list_for_each_entry(s, &slab_caches, list) {
3815 err = sysfs_slab_add(s); 3823 err = sysfs_slab_add(s);
3816 BUG_ON(err); 3824 if (err)
3825 printk(KERN_ERR "SLUB: Unable to add boot slab %s"
3826 " to sysfs\n", s->name);
3817 } 3827 }
3818 3828
3819 while (alias_list) { 3829 while (alias_list) {
@@ -3821,7 +3831,9 @@ static int __init slab_sysfs_init(void)
3821 3831
3822 alias_list = alias_list->next; 3832 alias_list = alias_list->next;
3823 err = sysfs_slab_alias(al->s, al->name); 3833 err = sysfs_slab_alias(al->s, al->name);
3824 BUG_ON(err); 3834 if (err)
3835 printk(KERN_ERR "SLUB: Unable to add boot slab alias"
3836 " %s to sysfs\n", s->name);
3825 kfree(al); 3837 kfree(al);
3826 } 3838 }
3827 3839
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 1583c5ef96..2a546919d6 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -562,8 +562,6 @@ static int register_vlan_device(struct net_device *real_dev,
562 if (err < 0) 562 if (err < 0)
563 goto out_free_newdev; 563 goto out_free_newdev;
564 564
565 /* Account for reference in struct vlan_dev_info */
566 dev_hold(real_dev);
567#ifdef VLAN_DEBUG 565#ifdef VLAN_DEBUG
568 printk(VLAN_DBG "Allocated new device successfully, returning.\n"); 566 printk(VLAN_DBG "Allocated new device successfully, returning.\n");
569#endif 567#endif
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 4bab322c9f..328759c32d 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -116,12 +116,22 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
116 struct packet_type* ptype, struct net_device *orig_dev) 116 struct packet_type* ptype, struct net_device *orig_dev)
117{ 117{
118 unsigned char *rawp = NULL; 118 unsigned char *rawp = NULL;
119 struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data); 119 struct vlan_hdr *vhdr;
120 unsigned short vid; 120 unsigned short vid;
121 struct net_device_stats *stats; 121 struct net_device_stats *stats;
122 unsigned short vlan_TCI; 122 unsigned short vlan_TCI;
123 __be16 proto; 123 __be16 proto;
124 124
125 if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL)
126 return -1;
127
128 if (unlikely(!pskb_may_pull(skb, VLAN_HLEN))) {
129 kfree_skb(skb);
130 return -1;
131 }
132
133 vhdr = (struct vlan_hdr *)(skb->data);
134
125 /* vlan_TCI = ntohs(get_unaligned(&vhdr->h_vlan_TCI)); */ 135 /* vlan_TCI = ntohs(get_unaligned(&vhdr->h_vlan_TCI)); */
126 vlan_TCI = ntohs(vhdr->h_vlan_TCI); 136 vlan_TCI = ntohs(vhdr->h_vlan_TCI);
127 137
diff --git a/net/9p/conv.c b/net/9p/conv.c
index f2a041cb50..d979d958ea 100644
--- a/net/9p/conv.c
+++ b/net/9p/conv.c
@@ -796,6 +796,7 @@ struct p9_fcall *p9_create_twrite_u(u32 fid, u64 offset, u32 count,
796 if (err) { 796 if (err) {
797 kfree(fc); 797 kfree(fc);
798 fc = ERR_PTR(err); 798 fc = ERR_PTR(err);
799 goto error;
799 } 800 }
800 801
801 if (buf_check_overflow(bufp)) { 802 if (buf_check_overflow(bufp)) {
diff --git a/net/9p/mux.c b/net/9p/mux.c
index acb038810f..5d70558c4c 100644
--- a/net/9p/mux.c
+++ b/net/9p/mux.c
@@ -288,9 +288,10 @@ struct p9_conn *p9_conn_create(struct p9_transport *trans, int msize,
288 m->extended = extended; 288 m->extended = extended;
289 m->trans = trans; 289 m->trans = trans;
290 m->tagpool = p9_idpool_create(); 290 m->tagpool = p9_idpool_create();
291 if (!m->tagpool) { 291 if (IS_ERR(m->tagpool)) {
292 mtmp = ERR_PTR(-ENOMEM);
292 kfree(m); 293 kfree(m);
293 return ERR_PTR(PTR_ERR(m->tagpool)); 294 return mtmp;
294 } 295 }
295 296
296 m->err = 0; 297 m->err = 0;
@@ -308,8 +309,10 @@ struct p9_conn *p9_conn_create(struct p9_transport *trans, int msize,
308 memset(&m->poll_waddr, 0, sizeof(m->poll_waddr)); 309 memset(&m->poll_waddr, 0, sizeof(m->poll_waddr));
309 m->poll_task = NULL; 310 m->poll_task = NULL;
310 n = p9_mux_poll_start(m); 311 n = p9_mux_poll_start(m);
311 if (n) 312 if (n) {
313 kfree(m);
312 return ERR_PTR(n); 314 return ERR_PTR(n);
315 }
313 316
314 n = trans->poll(trans, &m->pt); 317 n = trans->poll(trans, &m->pt);
315 if (n & POLLIN) { 318 if (n & POLLIN) {
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 63caa41494..18e3afc964 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -183,6 +183,7 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
183{ 183{
184 struct sk_buff *skb; 184 struct sk_buff *skb;
185 __le16 param; 185 __le16 param;
186 __u8 flt_type;
186 187
187 BT_DBG("%s %ld", hdev->name, opt); 188 BT_DBG("%s %ld", hdev->name, opt);
188 189
@@ -233,11 +234,8 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
233 /* Optional initialization */ 234 /* Optional initialization */
234 235
235 /* Clear Event Filters */ 236 /* Clear Event Filters */
236 { 237 flt_type = HCI_FLT_CLEAR_ALL;
237 struct hci_cp_set_event_flt cp; 238 hci_send_cmd(hdev, OGF_HOST_CTL, OCF_SET_EVENT_FLT, 1, &flt_type);
238 cp.flt_type = HCI_FLT_CLEAR_ALL;
239 hci_send_cmd(hdev, OGF_HOST_CTL, OCF_SET_EVENT_FLT, sizeof(cp), &cp);
240 }
241 239
242 /* Page timeout ~20 secs */ 240 /* Page timeout ~20 secs */
243 param = cpu_to_le16(0x8000); 241 param = cpu_to_le16(0x8000);
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 1dae3dfc66..5ccea5fbd2 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -37,6 +37,7 @@
37#include <linux/skbuff.h> 37#include <linux/skbuff.h>
38#include <linux/workqueue.h> 38#include <linux/workqueue.h>
39#include <linux/interrupt.h> 39#include <linux/interrupt.h>
40#include <linux/compat.h>
40#include <linux/socket.h> 41#include <linux/socket.h>
41#include <linux/ioctl.h> 42#include <linux/ioctl.h>
42#include <net/sock.h> 43#include <net/sock.h>
@@ -70,15 +71,15 @@ static struct hci_sec_filter hci_sec_filter = {
70 { 71 {
71 { 0x0 }, 72 { 0x0 },
72 /* OGF_LINK_CTL */ 73 /* OGF_LINK_CTL */
73 { 0xbe000006, 0x00000001, 0x000000, 0x00 }, 74 { 0xbe000006, 0x00000001, 0x00000000, 0x00 },
74 /* OGF_LINK_POLICY */ 75 /* OGF_LINK_POLICY */
75 { 0x00005200, 0x00000000, 0x000000, 0x00 }, 76 { 0x00005200, 0x00000000, 0x00000000, 0x00 },
76 /* OGF_HOST_CTL */ 77 /* OGF_HOST_CTL */
77 { 0xaab00200, 0x2b402aaa, 0x020154, 0x00 }, 78 { 0xaab00200, 0x2b402aaa, 0x05220154, 0x00 },
78 /* OGF_INFO_PARAM */ 79 /* OGF_INFO_PARAM */
79 { 0x000002be, 0x00000000, 0x000000, 0x00 }, 80 { 0x000002be, 0x00000000, 0x00000000, 0x00 },
80 /* OGF_STATUS_PARAM */ 81 /* OGF_STATUS_PARAM */
81 { 0x000000ea, 0x00000000, 0x000000, 0x00 } 82 { 0x000000ea, 0x00000000, 0x00000000, 0x00 }
82 } 83 }
83}; 84};
84 85
@@ -342,9 +343,24 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_
342 343
343 if (mask & HCI_CMSG_TSTAMP) { 344 if (mask & HCI_CMSG_TSTAMP) {
344 struct timeval tv; 345 struct timeval tv;
346 void *data;
347 int len;
345 348
346 skb_get_timestamp(skb, &tv); 349 skb_get_timestamp(skb, &tv);
347 put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, sizeof(tv), &tv); 350
351 data = &tv;
352 len = sizeof(tv);
353#ifdef CONFIG_COMPAT
354 if (msg->msg_flags & MSG_CMSG_COMPAT) {
355 struct compat_timeval ctv;
356 ctv.tv_sec = tv.tv_sec;
357 ctv.tv_usec = tv.tv_usec;
358 data = &ctv;
359 len = sizeof(ctv);
360 }
361#endif
362
363 put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, len, data);
348 } 364 }
349} 365}
350 366
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 0eded176ce..99292e8e1d 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -41,11 +41,11 @@ int br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
41 skb_pull(skb, ETH_HLEN); 41 skb_pull(skb, ETH_HLEN);
42 42
43 if (dest[0] & 1) 43 if (dest[0] & 1)
44 br_flood_deliver(br, skb, 0); 44 br_flood_deliver(br, skb);
45 else if ((dst = __br_fdb_get(br, dest)) != NULL) 45 else if ((dst = __br_fdb_get(br, dest)) != NULL)
46 br_deliver(dst->dst, skb); 46 br_deliver(dst->dst, skb);
47 else 47 else
48 br_flood_deliver(br, skb, 0); 48 br_flood_deliver(br, skb);
49 49
50 return 0; 50 return 0;
51} 51}
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 69b70977f0..eb57502bb2 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -384,6 +384,11 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
384 if (hold_time(br) == 0) 384 if (hold_time(br) == 0)
385 return; 385 return;
386 386
387 /* ignore packets unless we are using this port */
388 if (!(source->state == BR_STATE_LEARNING ||
389 source->state == BR_STATE_FORWARDING))
390 return;
391
387 fdb = fdb_find(head, addr); 392 fdb = fdb_find(head, addr);
388 if (likely(fdb)) { 393 if (likely(fdb)) {
389 /* attempt to update an entry for a local interface */ 394 /* attempt to update an entry for a local interface */
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
index ada7f49544..bdd7c35c3c 100644
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -100,24 +100,13 @@ void br_forward(const struct net_bridge_port *to, struct sk_buff *skb)
100} 100}
101 101
102/* called under bridge lock */ 102/* called under bridge lock */
103static void br_flood(struct net_bridge *br, struct sk_buff *skb, int clone, 103static void br_flood(struct net_bridge *br, struct sk_buff *skb,
104 void (*__packet_hook)(const struct net_bridge_port *p, 104 void (*__packet_hook)(const struct net_bridge_port *p,
105 struct sk_buff *skb)) 105 struct sk_buff *skb))
106{ 106{
107 struct net_bridge_port *p; 107 struct net_bridge_port *p;
108 struct net_bridge_port *prev; 108 struct net_bridge_port *prev;
109 109
110 if (clone) {
111 struct sk_buff *skb2;
112
113 if ((skb2 = skb_clone(skb, GFP_ATOMIC)) == NULL) {
114 br->statistics.tx_dropped++;
115 return;
116 }
117
118 skb = skb2;
119 }
120
121 prev = NULL; 110 prev = NULL;
122 111
123 list_for_each_entry_rcu(p, &br->port_list, list) { 112 list_for_each_entry_rcu(p, &br->port_list, list) {
@@ -148,13 +137,13 @@ static void br_flood(struct net_bridge *br, struct sk_buff *skb, int clone,
148 137
149 138
150/* called with rcu_read_lock */ 139/* called with rcu_read_lock */
151void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb, int clone) 140void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb)
152{ 141{
153 br_flood(br, skb, clone, __br_deliver); 142 br_flood(br, skb, __br_deliver);
154} 143}
155 144
156/* called under bridge lock */ 145/* called under bridge lock */
157void br_flood_forward(struct net_bridge *br, struct sk_buff *skb, int clone) 146void br_flood_forward(struct net_bridge *br, struct sk_buff *skb)
158{ 147{
159 br_flood(br, skb, clone, __br_forward); 148 br_flood(br, skb, __br_forward);
160} 149}
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 749f0e8f54..9272f12f66 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -33,17 +33,17 @@
33 */ 33 */
34static int port_cost(struct net_device *dev) 34static int port_cost(struct net_device *dev)
35{ 35{
36 if (dev->ethtool_ops->get_settings) { 36 if (dev->ethtool_ops && dev->ethtool_ops->get_settings) {
37 struct ethtool_cmd ecmd = { ETHTOOL_GSET }; 37 struct ethtool_cmd ecmd = { .cmd = ETHTOOL_GSET, };
38 int err = dev->ethtool_ops->get_settings(dev, &ecmd); 38
39 if (!err) { 39 if (!dev->ethtool_ops->get_settings(dev, &ecmd)) {
40 switch(ecmd.speed) { 40 switch(ecmd.speed) {
41 case SPEED_100:
42 return 19;
43 case SPEED_1000:
44 return 4;
45 case SPEED_10000: 41 case SPEED_10000:
46 return 2; 42 return 2;
43 case SPEED_1000:
44 return 4;
45 case SPEED_100:
46 return 19;
47 case SPEED_10: 47 case SPEED_10:
48 return 100; 48 return 100;
49 } 49 }
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 5c18595b76..3a8a015c92 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -43,7 +43,7 @@ int br_handle_frame_finish(struct sk_buff *skb)
43 struct net_bridge_port *p = rcu_dereference(skb->dev->br_port); 43 struct net_bridge_port *p = rcu_dereference(skb->dev->br_port);
44 struct net_bridge *br; 44 struct net_bridge *br;
45 struct net_bridge_fdb_entry *dst; 45 struct net_bridge_fdb_entry *dst;
46 int passedup = 0; 46 struct sk_buff *skb2;
47 47
48 if (!p || p->state == BR_STATE_DISABLED) 48 if (!p || p->state == BR_STATE_DISABLED)
49 goto drop; 49 goto drop;
@@ -55,39 +55,35 @@ int br_handle_frame_finish(struct sk_buff *skb)
55 if (p->state == BR_STATE_LEARNING) 55 if (p->state == BR_STATE_LEARNING)
56 goto drop; 56 goto drop;
57 57
58 if (br->dev->flags & IFF_PROMISC) { 58 /* The packet skb2 goes to the local host (NULL to skip). */
59 struct sk_buff *skb2; 59 skb2 = NULL;
60 60
61 skb2 = skb_clone(skb, GFP_ATOMIC); 61 if (br->dev->flags & IFF_PROMISC)
62 if (skb2 != NULL) { 62 skb2 = skb;
63 passedup = 1; 63
64 br_pass_frame_up(br, skb2); 64 dst = NULL;
65 }
66 }
67 65
68 if (is_multicast_ether_addr(dest)) { 66 if (is_multicast_ether_addr(dest)) {
69 br->statistics.multicast++; 67 br->statistics.multicast++;
70 br_flood_forward(br, skb, !passedup); 68 skb2 = skb;
71 if (!passedup) 69 } else if ((dst = __br_fdb_get(br, dest)) && dst->is_local) {
72 br_pass_frame_up(br, skb); 70 skb2 = skb;
73 goto out; 71 /* Do not forward the packet since it's local. */
72 skb = NULL;
74 } 73 }
75 74
76 dst = __br_fdb_get(br, dest); 75 if (skb2 == skb)
77 if (dst != NULL && dst->is_local) { 76 skb2 = skb_clone(skb, GFP_ATOMIC);
78 if (!passedup)
79 br_pass_frame_up(br, skb);
80 else
81 kfree_skb(skb);
82 goto out;
83 }
84 77
85 if (dst != NULL) { 78 if (skb2)
86 br_forward(dst->dst, skb); 79 br_pass_frame_up(br, skb2);
87 goto out;
88 }
89 80
90 br_flood_forward(br, skb, 0); 81 if (skb) {
82 if (dst)
83 br_forward(dst->dst, skb);
84 else
85 br_flood_forward(br, skb);
86 }
91 87
92out: 88out:
93 return 0; 89 return 0;
@@ -101,9 +97,8 @@ static int br_handle_local_finish(struct sk_buff *skb)
101{ 97{
102 struct net_bridge_port *p = rcu_dereference(skb->dev->br_port); 98 struct net_bridge_port *p = rcu_dereference(skb->dev->br_port);
103 99
104 if (p && p->state != BR_STATE_DISABLED) 100 if (p)
105 br_fdb_update(p->br, p, eth_hdr(skb)->h_source); 101 br_fdb_update(p->br, p, eth_hdr(skb)->h_source);
106
107 return 0; /* process further */ 102 return 0; /* process further */
108} 103}
109 104
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index fa779874b9..fc13130035 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -183,7 +183,7 @@ int nf_bridge_copy_header(struct sk_buff *skb)
183 int err; 183 int err;
184 int header_size = ETH_HLEN + nf_bridge_encap_header_len(skb); 184 int header_size = ETH_HLEN + nf_bridge_encap_header_len(skb);
185 185
186 err = skb_cow(skb, header_size); 186 err = skb_cow_head(skb, header_size);
187 if (err) 187 if (err)
188 return err; 188 return err;
189 189
@@ -509,8 +509,14 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb,
509 int (*okfn)(struct sk_buff *)) 509 int (*okfn)(struct sk_buff *))
510{ 510{
511 struct iphdr *iph; 511 struct iphdr *iph;
512 __u32 len;
513 struct sk_buff *skb = *pskb; 512 struct sk_buff *skb = *pskb;
513 __u32 len = nf_bridge_encap_header_len(skb);
514
515 if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL)
516 return NF_STOLEN;
517
518 if (unlikely(!pskb_may_pull(skb, len)))
519 goto out;
514 520
515 if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) || 521 if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) ||
516 IS_PPPOE_IPV6(skb)) { 522 IS_PPPOE_IPV6(skb)) {
@@ -518,8 +524,6 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb,
518 if (!brnf_call_ip6tables) 524 if (!brnf_call_ip6tables)
519 return NF_ACCEPT; 525 return NF_ACCEPT;
520#endif 526#endif
521 if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL)
522 goto out;
523 nf_bridge_pull_encap_header_rcsum(skb); 527 nf_bridge_pull_encap_header_rcsum(skb);
524 return br_nf_pre_routing_ipv6(hook, skb, in, out, okfn); 528 return br_nf_pre_routing_ipv6(hook, skb, in, out, okfn);
525 } 529 }
@@ -532,8 +536,6 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb,
532 !IS_PPPOE_IP(skb)) 536 !IS_PPPOE_IP(skb))
533 return NF_ACCEPT; 537 return NF_ACCEPT;
534 538
535 if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL)
536 goto out;
537 nf_bridge_pull_encap_header_rcsum(skb); 539 nf_bridge_pull_encap_header_rcsum(skb);
538 540
539 if (!pskb_may_pull(skb, sizeof(struct iphdr))) 541 if (!pskb_may_pull(skb, sizeof(struct iphdr)))
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 21bf3a9a03..e6dc6f5299 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -170,12 +170,8 @@ extern int br_dev_queue_push_xmit(struct sk_buff *skb);
170extern void br_forward(const struct net_bridge_port *to, 170extern void br_forward(const struct net_bridge_port *to,
171 struct sk_buff *skb); 171 struct sk_buff *skb);
172extern int br_forward_finish(struct sk_buff *skb); 172extern int br_forward_finish(struct sk_buff *skb);
173extern void br_flood_deliver(struct net_bridge *br, 173extern void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb);
174 struct sk_buff *skb, 174extern void br_flood_forward(struct net_bridge *br, struct sk_buff *skb);
175 int clone);
176extern void br_flood_forward(struct net_bridge *br,
177 struct sk_buff *skb,
178 int clone);
179 175
180/* br_if.c */ 176/* br_if.c */
181extern void br_port_carrier_check(struct net_bridge_port *p); 177extern void br_port_carrier_check(struct net_bridge_port *p);
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 4169a2a89a..6018d0e519 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1513,6 +1513,7 @@ static struct nf_sockopt_ops ebt_sockopts =
1513 .get_optmin = EBT_BASE_CTL, 1513 .get_optmin = EBT_BASE_CTL,
1514 .get_optmax = EBT_SO_GET_MAX + 1, 1514 .get_optmax = EBT_SO_GET_MAX + 1,
1515 .get = do_ebt_get_ctl, 1515 .get = do_ebt_get_ctl,
1516 .owner = THIS_MODULE,
1516}; 1517};
1517 1518
1518static int __init ebtables_init(void) 1519static int __init ebtables_init(void)
diff --git a/net/core/datagram.c b/net/core/datagram.c
index cb056f4761..029b93e246 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -450,6 +450,9 @@ int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,
450 __wsum csum; 450 __wsum csum;
451 int chunk = skb->len - hlen; 451 int chunk = skb->len - hlen;
452 452
453 if (!chunk)
454 return 0;
455
453 /* Skip filled elements. 456 /* Skip filled elements.
454 * Pretty silly, look at memcpy_toiovec, though 8) 457 * Pretty silly, look at memcpy_toiovec, though 8)
455 */ 458 */
diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c
index 99aece1aec..20330c5726 100644
--- a/net/core/dev_mcast.c
+++ b/net/core/dev_mcast.c
@@ -116,11 +116,13 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)
116 */ 116 */
117int dev_mc_sync(struct net_device *to, struct net_device *from) 117int dev_mc_sync(struct net_device *to, struct net_device *from)
118{ 118{
119 struct dev_addr_list *da; 119 struct dev_addr_list *da, *next;
120 int err = 0; 120 int err = 0;
121 121
122 netif_tx_lock_bh(to); 122 netif_tx_lock_bh(to);
123 for (da = from->mc_list; da != NULL; da = da->next) { 123 da = from->mc_list;
124 while (da != NULL) {
125 next = da->next;
124 if (!da->da_synced) { 126 if (!da->da_synced) {
125 err = __dev_addr_add(&to->mc_list, &to->mc_count, 127 err = __dev_addr_add(&to->mc_list, &to->mc_count,
126 da->da_addr, da->da_addrlen, 0); 128 da->da_addr, da->da_addrlen, 0);
@@ -134,6 +136,7 @@ int dev_mc_sync(struct net_device *to, struct net_device *from)
134 __dev_addr_delete(&from->mc_list, &from->mc_count, 136 __dev_addr_delete(&from->mc_list, &from->mc_count,
135 da->da_addr, da->da_addrlen, 0); 137 da->da_addr, da->da_addrlen, 0);
136 } 138 }
139 da = next;
137 } 140 }
138 if (!err) 141 if (!err)
139 __dev_set_rx_mode(to); 142 __dev_set_rx_mode(to);
@@ -156,12 +159,14 @@ EXPORT_SYMBOL(dev_mc_sync);
156 */ 159 */
157void dev_mc_unsync(struct net_device *to, struct net_device *from) 160void dev_mc_unsync(struct net_device *to, struct net_device *from)
158{ 161{
159 struct dev_addr_list *da; 162 struct dev_addr_list *da, *next;
160 163
161 netif_tx_lock_bh(from); 164 netif_tx_lock_bh(from);
162 netif_tx_lock_bh(to); 165 netif_tx_lock_bh(to);
163 166
164 for (da = from->mc_list; da != NULL; da = da->next) { 167 da = from->mc_list;
168 while (da != NULL) {
169 next = da->next;
165 if (!da->da_synced) 170 if (!da->da_synced)
166 continue; 171 continue;
167 __dev_addr_delete(&to->mc_list, &to->mc_count, 172 __dev_addr_delete(&to->mc_list, &to->mc_count,
@@ -169,6 +174,7 @@ void dev_mc_unsync(struct net_device *to, struct net_device *from)
169 da->da_synced = 0; 174 da->da_synced = 0;
170 __dev_addr_delete(&from->mc_list, &from->mc_count, 175 __dev_addr_delete(&from->mc_list, &from->mc_count,
171 da->da_addr, da->da_addrlen, 0); 176 da->da_addr, da->da_addrlen, 0);
177 da = next;
172 } 178 }
173 __dev_set_rx_mode(to); 179 __dev_set_rx_mode(to);
174 180
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index ca2a153313..f7de8f24d8 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -33,6 +33,7 @@
33#include <linux/rtnetlink.h> 33#include <linux/rtnetlink.h>
34#include <linux/random.h> 34#include <linux/random.h>
35#include <linux/string.h> 35#include <linux/string.h>
36#include <linux/log2.h>
36 37
37#define NEIGH_DEBUG 1 38#define NEIGH_DEBUG 1
38 39
@@ -311,7 +312,7 @@ static void neigh_hash_grow(struct neigh_table *tbl, unsigned long new_entries)
311 312
312 NEIGH_CACHE_STAT_INC(tbl, hash_grows); 313 NEIGH_CACHE_STAT_INC(tbl, hash_grows);
313 314
314 BUG_ON(new_entries & (new_entries - 1)); 315 BUG_ON(!is_power_of_2(new_entries));
315 new_hash = neigh_hash_alloc(new_entries); 316 new_hash = neigh_hash_alloc(new_entries);
316 if (!new_hash) 317 if (!new_hash)
317 return; 318 return;
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 7bae576ac1..803d0c8826 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -111,6 +111,9 @@
111 * 111 *
112 * 802.1Q/Q-in-Q support by Francesco Fondelli (FF) <francesco.fondelli@gmail.com> 112 * 802.1Q/Q-in-Q support by Francesco Fondelli (FF) <francesco.fondelli@gmail.com>
113 * 113 *
114 * Fixed src_mac command to set source mac of packet to value specified in
115 * command by Adit Ranadive <adit.262@gmail.com>
116 *
114 */ 117 */
115#include <linux/sys.h> 118#include <linux/sys.h>
116#include <linux/types.h> 119#include <linux/types.h>
@@ -380,7 +383,6 @@ struct pktgen_thread {
380 /* Field for thread to receive "posted" events terminate, stop ifs etc. */ 383 /* Field for thread to receive "posted" events terminate, stop ifs etc. */
381 384
382 u32 control; 385 u32 control;
383 int pid;
384 int cpu; 386 int cpu;
385 387
386 wait_queue_head_t queue; 388 wait_queue_head_t queue;
@@ -1452,8 +1454,11 @@ static ssize_t pktgen_if_write(struct file *file,
1452 } 1454 }
1453 if (!strcmp(name, "src_mac")) { 1455 if (!strcmp(name, "src_mac")) {
1454 char *v = valstr; 1456 char *v = valstr;
1457 unsigned char old_smac[ETH_ALEN];
1455 unsigned char *m = pkt_dev->src_mac; 1458 unsigned char *m = pkt_dev->src_mac;
1456 1459
1460 memcpy(old_smac, pkt_dev->src_mac, ETH_ALEN);
1461
1457 len = strn_len(&user_buffer[i], sizeof(valstr) - 1); 1462 len = strn_len(&user_buffer[i], sizeof(valstr) - 1);
1458 if (len < 0) { 1463 if (len < 0) {
1459 return len; 1464 return len;
@@ -1482,6 +1487,10 @@ static ssize_t pktgen_if_write(struct file *file,
1482 } 1487 }
1483 } 1488 }
1484 1489
1490 /* Set up Src MAC */
1491 if (compare_ether_addr(old_smac, pkt_dev->src_mac))
1492 memcpy(&(pkt_dev->hh[6]), pkt_dev->src_mac, ETH_ALEN);
1493
1485 sprintf(pg_result, "OK: srcmac"); 1494 sprintf(pg_result, "OK: srcmac");
1486 return count; 1495 return count;
1487 } 1496 }
@@ -3331,8 +3340,9 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev)
3331 } 3340 }
3332 3341
3333 if ((netif_queue_stopped(odev) || 3342 if ((netif_queue_stopped(odev) ||
3334 netif_subqueue_stopped(odev, pkt_dev->skb->queue_mapping)) || 3343 (pkt_dev->skb &&
3335 need_resched()) { 3344 netif_subqueue_stopped(odev, pkt_dev->skb->queue_mapping))) ||
3345 need_resched()) {
3336 idle_start = getCurUs(); 3346 idle_start = getCurUs();
3337 3347
3338 if (!netif_running(odev)) { 3348 if (!netif_running(odev)) {
@@ -3462,8 +3472,6 @@ static int pktgen_thread_worker(void *arg)
3462 3472
3463 init_waitqueue_head(&t->queue); 3473 init_waitqueue_head(&t->queue);
3464 3474
3465 t->pid = current->pid;
3466
3467 pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, current->pid); 3475 pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, current->pid);
3468 3476
3469 max_before_softirq = t->max_before_softirq; 3477 max_before_softirq = t->max_before_softirq;
diff --git a/net/core/sock.c b/net/core/sock.c
index cfed7d42c4..190de61cd6 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -362,6 +362,61 @@ struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie)
362} 362}
363EXPORT_SYMBOL(sk_dst_check); 363EXPORT_SYMBOL(sk_dst_check);
364 364
365static int sock_bindtodevice(struct sock *sk, char __user *optval, int optlen)
366{
367 int ret = -ENOPROTOOPT;
368#ifdef CONFIG_NETDEVICES
369 char devname[IFNAMSIZ];
370 int index;
371
372 /* Sorry... */
373 ret = -EPERM;
374 if (!capable(CAP_NET_RAW))
375 goto out;
376
377 ret = -EINVAL;
378 if (optlen < 0)
379 goto out;
380
381 /* Bind this socket to a particular device like "eth0",
382 * as specified in the passed interface name. If the
383 * name is "" or the option length is zero the socket
384 * is not bound.
385 */
386 if (optlen > IFNAMSIZ - 1)
387 optlen = IFNAMSIZ - 1;
388 memset(devname, 0, sizeof(devname));
389
390 ret = -EFAULT;
391 if (copy_from_user(devname, optval, optlen))
392 goto out;
393
394 if (devname[0] == '\0') {
395 index = 0;
396 } else {
397 struct net_device *dev = dev_get_by_name(devname);
398
399 ret = -ENODEV;
400 if (!dev)
401 goto out;
402
403 index = dev->ifindex;
404 dev_put(dev);
405 }
406
407 lock_sock(sk);
408 sk->sk_bound_dev_if = index;
409 sk_dst_reset(sk);
410 release_sock(sk);
411
412 ret = 0;
413
414out:
415#endif
416
417 return ret;
418}
419
365/* 420/*
366 * This is meant for all protocols to use and covers goings on 421 * This is meant for all protocols to use and covers goings on
367 * at the socket level. Everything here is generic. 422 * at the socket level. Everything here is generic.
@@ -390,6 +445,9 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
390 } 445 }
391#endif 446#endif
392 447
448 if (optname == SO_BINDTODEVICE)
449 return sock_bindtodevice(sk, optval, optlen);
450
393 if (optlen < sizeof(int)) 451 if (optlen < sizeof(int))
394 return -EINVAL; 452 return -EINVAL;
395 453
@@ -578,54 +636,6 @@ set_rcvbuf:
578 ret = sock_set_timeout(&sk->sk_sndtimeo, optval, optlen); 636 ret = sock_set_timeout(&sk->sk_sndtimeo, optval, optlen);
579 break; 637 break;
580 638
581#ifdef CONFIG_NETDEVICES
582 case SO_BINDTODEVICE:
583 {
584 char devname[IFNAMSIZ];
585
586 /* Sorry... */
587 if (!capable(CAP_NET_RAW)) {
588 ret = -EPERM;
589 break;
590 }
591
592 /* Bind this socket to a particular device like "eth0",
593 * as specified in the passed interface name. If the
594 * name is "" or the option length is zero the socket
595 * is not bound.
596 */
597
598 if (!valbool) {
599 sk->sk_bound_dev_if = 0;
600 } else {
601 if (optlen > IFNAMSIZ - 1)
602 optlen = IFNAMSIZ - 1;
603 memset(devname, 0, sizeof(devname));
604 if (copy_from_user(devname, optval, optlen)) {
605 ret = -EFAULT;
606 break;
607 }
608
609 /* Remove any cached route for this socket. */
610 sk_dst_reset(sk);
611
612 if (devname[0] == '\0') {
613 sk->sk_bound_dev_if = 0;
614 } else {
615 struct net_device *dev = dev_get_by_name(devname);
616 if (!dev) {
617 ret = -ENODEV;
618 break;
619 }
620 sk->sk_bound_dev_if = dev->ifindex;
621 dev_put(dev);
622 }
623 }
624 break;
625 }
626#endif
627
628
629 case SO_ATTACH_FILTER: 639 case SO_ATTACH_FILTER:
630 ret = -EINVAL; 640 ret = -EINVAL;
631 if (optlen == sizeof(struct sock_fprog)) { 641 if (optlen == sizeof(struct sock_fprog)) {
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index fa6604fcf0..8def68209e 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -814,7 +814,7 @@ static int dn_nl_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
814 for (ifa = dn_db->ifa_list, dn_idx = 0; ifa; 814 for (ifa = dn_db->ifa_list, dn_idx = 0; ifa;
815 ifa = ifa->ifa_next, dn_idx++) { 815 ifa = ifa->ifa_next, dn_idx++) {
816 if (dn_idx < skip_naddr) 816 if (dn_idx < skip_naddr)
817 goto cont; 817 continue;
818 818
819 if (dn_nl_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).pid, 819 if (dn_nl_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).pid,
820 cb->nlh->nlmsg_seq, RTM_NEWADDR, 820 cb->nlh->nlmsg_seq, RTM_NEWADDR,
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index f2de2e48b0..6284c99b45 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -366,6 +366,12 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
366 frag = WLAN_GET_SEQ_FRAG(sc); 366 frag = WLAN_GET_SEQ_FRAG(sc);
367 hdrlen = ieee80211_get_hdrlen(fc); 367 hdrlen = ieee80211_get_hdrlen(fc);
368 368
369 if (skb->len < hdrlen) {
370 printk(KERN_INFO "%s: invalid SKB length %d\n",
371 dev->name, skb->len);
372 goto rx_dropped;
373 }
374
369 /* Put this code here so that we avoid duplicating it in all 375 /* Put this code here so that we avoid duplicating it in all
370 * Rx paths. - Jean II */ 376 * Rx paths. - Jean II */
371#ifdef CONFIG_WIRELESS_EXT 377#ifdef CONFIG_WIRELESS_EXT
diff --git a/net/ieee80211/softmac/ieee80211softmac_assoc.c b/net/ieee80211/softmac/ieee80211softmac_assoc.c
index afb6c6698b..e475f2e1be 100644
--- a/net/ieee80211/softmac/ieee80211softmac_assoc.c
+++ b/net/ieee80211/softmac/ieee80211softmac_assoc.c
@@ -273,8 +273,6 @@ ieee80211softmac_assoc_work(struct work_struct *work)
273 ieee80211softmac_notify(mac->dev, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, ieee80211softmac_assoc_notify_scan, NULL); 273 ieee80211softmac_notify(mac->dev, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, ieee80211softmac_assoc_notify_scan, NULL);
274 if (ieee80211softmac_start_scan(mac)) { 274 if (ieee80211softmac_start_scan(mac)) {
275 dprintk(KERN_INFO PFX "Associate: failed to initiate scan. Is device up?\n"); 275 dprintk(KERN_INFO PFX "Associate: failed to initiate scan. Is device up?\n");
276 mac->associnfo.associating = 0;
277 mac->associnfo.associated = 0;
278 } 276 }
279 goto out; 277 goto out;
280 } else { 278 } else {
diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c b/net/ieee80211/softmac/ieee80211softmac_wx.c
index d054e9224b..5742dc803b 100644
--- a/net/ieee80211/softmac/ieee80211softmac_wx.c
+++ b/net/ieee80211/softmac/ieee80211softmac_wx.c
@@ -70,44 +70,30 @@ ieee80211softmac_wx_set_essid(struct net_device *net_dev,
70 char *extra) 70 char *extra)
71{ 71{
72 struct ieee80211softmac_device *sm = ieee80211_priv(net_dev); 72 struct ieee80211softmac_device *sm = ieee80211_priv(net_dev);
73 struct ieee80211softmac_network *n;
74 struct ieee80211softmac_auth_queue_item *authptr; 73 struct ieee80211softmac_auth_queue_item *authptr;
75 int length = 0; 74 int length = 0;
76 75
77check_assoc_again: 76check_assoc_again:
78 mutex_lock(&sm->associnfo.mutex); 77 mutex_lock(&sm->associnfo.mutex);
79 /* Check if we're already associating to this or another network
80 * If it's another network, cancel and start over with our new network
81 * If it's our network, ignore the change, we're already doing it!
82 */
83 if((sm->associnfo.associating || sm->associnfo.associated) && 78 if((sm->associnfo.associating || sm->associnfo.associated) &&
84 (data->essid.flags && data->essid.length)) { 79 (data->essid.flags && data->essid.length)) {
85 /* Get the associating network */ 80 dprintk(KERN_INFO PFX "Canceling existing associate request!\n");
86 n = ieee80211softmac_get_network_by_bssid(sm, sm->associnfo.bssid); 81 /* Cancel assoc work */
87 if(n && n->essid.len == data->essid.length && 82 cancel_delayed_work(&sm->associnfo.work);
88 !memcmp(n->essid.data, extra, n->essid.len)) { 83 /* We don't have to do this, but it's a little cleaner */
89 dprintk(KERN_INFO PFX "Already associating or associated to "MAC_FMT"\n", 84 list_for_each_entry(authptr, &sm->auth_queue, list)
90 MAC_ARG(sm->associnfo.bssid)); 85 cancel_delayed_work(&authptr->work);
91 goto out; 86 sm->associnfo.bssvalid = 0;
92 } else { 87 sm->associnfo.bssfixed = 0;
93 dprintk(KERN_INFO PFX "Canceling existing associate request!\n"); 88 sm->associnfo.associating = 0;
94 /* Cancel assoc work */ 89 sm->associnfo.associated = 0;
95 cancel_delayed_work(&sm->associnfo.work); 90 /* We must unlock to avoid deadlocks with the assoc workqueue
96 /* We don't have to do this, but it's a little cleaner */ 91 * on the associnfo.mutex */
97 list_for_each_entry(authptr, &sm->auth_queue, list) 92 mutex_unlock(&sm->associnfo.mutex);
98 cancel_delayed_work(&authptr->work); 93 flush_scheduled_work();
99 sm->associnfo.bssvalid = 0; 94 /* Avoid race! Check assoc status again. Maybe someone started an
100 sm->associnfo.bssfixed = 0; 95 * association while we flushed. */
101 sm->associnfo.associating = 0; 96 goto check_assoc_again;
102 sm->associnfo.associated = 0;
103 /* We must unlock to avoid deadlocks with the assoc workqueue
104 * on the associnfo.mutex */
105 mutex_unlock(&sm->associnfo.mutex);
106 flush_scheduled_work();
107 /* Avoid race! Check assoc status again. Maybe someone started an
108 * association while we flushed. */
109 goto check_assoc_again;
110 }
111 } 97 }
112 98
113 sm->associnfo.static_essid = 0; 99 sm->associnfo.static_essid = 0;
@@ -128,7 +114,7 @@ check_assoc_again:
128 sm->associnfo.associating = 1; 114 sm->associnfo.associating = 1;
129 /* queue lower level code to do work (if necessary) */ 115 /* queue lower level code to do work (if necessary) */
130 schedule_delayed_work(&sm->associnfo.work, 0); 116 schedule_delayed_work(&sm->associnfo.work, 0);
131out: 117
132 mutex_unlock(&sm->associnfo.mutex); 118 mutex_unlock(&sm->associnfo.mutex);
133 119
134 return 0; 120 return 0;
@@ -153,13 +139,13 @@ ieee80211softmac_wx_get_essid(struct net_device *net_dev,
153 data->essid.length = sm->associnfo.req_essid.len; 139 data->essid.length = sm->associnfo.req_essid.len;
154 data->essid.flags = 1; /* active */ 140 data->essid.flags = 1; /* active */
155 memcpy(extra, sm->associnfo.req_essid.data, sm->associnfo.req_essid.len); 141 memcpy(extra, sm->associnfo.req_essid.data, sm->associnfo.req_essid.len);
156 } 142 dprintk(KERN_INFO PFX "Getting essid from req_essid\n");
157 143 } else if (sm->associnfo.associated || sm->associnfo.associating) {
158 /* If we're associating/associated, return that */ 144 /* If we're associating/associated, return that */
159 if (sm->associnfo.associated || sm->associnfo.associating) {
160 data->essid.length = sm->associnfo.associate_essid.len; 145 data->essid.length = sm->associnfo.associate_essid.len;
161 data->essid.flags = 1; /* active */ 146 data->essid.flags = 1; /* active */
162 memcpy(extra, sm->associnfo.associate_essid.data, sm->associnfo.associate_essid.len); 147 memcpy(extra, sm->associnfo.associate_essid.data, sm->associnfo.associate_essid.len);
148 dprintk(KERN_INFO PFX "Getting essid from associate_essid\n");
163 } 149 }
164 mutex_unlock(&sm->associnfo.mutex); 150 mutex_unlock(&sm->associnfo.mutex);
165 151
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c
index 7a23e59c37..39f6211f14 100644
--- a/net/ipv4/ah4.c
+++ b/net/ipv4/ah4.c
@@ -46,7 +46,7 @@ static int ip_clear_mutable_options(struct iphdr *iph, __be32 *daddr)
46 memcpy(daddr, optptr+optlen-4, 4); 46 memcpy(daddr, optptr+optlen-4, 4);
47 /* Fall through */ 47 /* Fall through */
48 default: 48 default:
49 memset(optptr+2, 0, optlen-2); 49 memset(optptr, 0, optlen);
50 } 50 }
51 l -= optlen; 51 l -= optlen;
52 optptr += optlen; 52 optptr += optlen;
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 5b77bdaa57..5dbe5803b7 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1193,7 +1193,7 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
1193 for (ifa = in_dev->ifa_list, ip_idx = 0; ifa; 1193 for (ifa = in_dev->ifa_list, ip_idx = 0; ifa;
1194 ifa = ifa->ifa_next, ip_idx++) { 1194 ifa = ifa->ifa_next, ip_idx++) {
1195 if (ip_idx < s_ip_idx) 1195 if (ip_idx < s_ip_idx)
1196 goto cont; 1196 continue;
1197 if (inet_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).pid, 1197 if (inet_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).pid,
1198 cb->nlh->nlmsg_seq, 1198 cb->nlh->nlmsg_seq,
1199 RTM_NEWADDR, NLM_F_MULTI) <= 0) 1199 RTM_NEWADDR, NLM_F_MULTI) <= 0)
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index dbeacd8b0f..def007ec1d 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -836,12 +836,16 @@ static int inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
836 return inet_diag_get_exact(skb, nlh); 836 return inet_diag_get_exact(skb, nlh);
837} 837}
838 838
839static DEFINE_MUTEX(inet_diag_mutex);
840
839static void inet_diag_rcv(struct sock *sk, int len) 841static void inet_diag_rcv(struct sock *sk, int len)
840{ 842{
841 unsigned int qlen = 0; 843 unsigned int qlen = 0;
842 844
843 do { 845 do {
846 mutex_lock(&inet_diag_mutex);
844 netlink_run_queue(sk, &qlen, &inet_diag_rcv_msg); 847 netlink_run_queue(sk, &qlen, &inet_diag_rcv_msg);
848 mutex_unlock(&inet_diag_mutex);
845 } while (qlen); 849 } while (qlen);
846} 850}
847 851
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 4d544573f4..6b420aedcd 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -625,6 +625,10 @@ static int do_ip_setsockopt(struct sock *sk, int level,
625 { 625 {
626 struct ip_mreqn mreq; 626 struct ip_mreqn mreq;
627 627
628 err = -EPROTO;
629 if (inet_sk(sk)->is_icsk)
630 break;
631
628 if (optlen < sizeof(struct ip_mreq)) 632 if (optlen < sizeof(struct ip_mreq))
629 goto e_inval; 633 goto e_inval;
630 err = -EFAULT; 634 err = -EFAULT;
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index 902fd578aa..f656d41d8d 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -2339,6 +2339,7 @@ static struct nf_sockopt_ops ip_vs_sockopts = {
2339 .get_optmin = IP_VS_BASE_CTL, 2339 .get_optmin = IP_VS_BASE_CTL,
2340 .get_optmax = IP_VS_SO_GET_MAX+1, 2340 .get_optmax = IP_VS_SO_GET_MAX+1,
2341 .get = do_ip_vs_get_ctl, 2341 .get = do_ip_vs_get_ctl,
2342 .owner = THIS_MODULE,
2342}; 2343};
2343 2344
2344 2345
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index d1149aba93..29114a9ccd 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -1161,6 +1161,7 @@ static struct nf_sockopt_ops arpt_sockopts = {
1161 .get_optmin = ARPT_BASE_CTL, 1161 .get_optmin = ARPT_BASE_CTL,
1162 .get_optmax = ARPT_SO_GET_MAX+1, 1162 .get_optmax = ARPT_SO_GET_MAX+1,
1163 .get = do_arpt_get_ctl, 1163 .get = do_arpt_get_ctl,
1164 .owner = THIS_MODULE,
1164}; 1165};
1165 1166
1166static int __init arp_tables_init(void) 1167static int __init arp_tables_init(void)
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index e1b402c6b8..6486894f45 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -2296,6 +2296,7 @@ static struct nf_sockopt_ops ipt_sockopts = {
2296#ifdef CONFIG_COMPAT 2296#ifdef CONFIG_COMPAT
2297 .compat_get = compat_do_ipt_get_ctl, 2297 .compat_get = compat_do_ipt_get_ctl,
2298#endif 2298#endif
2299 .owner = THIS_MODULE,
2299}; 2300};
2300 2301
2301static struct xt_match icmp_matchstruct __read_mostly = { 2302static struct xt_match icmp_matchstruct __read_mostly = {
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
index d9b5177989..f813e02aab 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
@@ -87,14 +87,10 @@ static int ipv4_get_l4proto(const struct sk_buff *skb, unsigned int nhoff,
87 if (iph == NULL) 87 if (iph == NULL)
88 return -NF_DROP; 88 return -NF_DROP;
89 89
90 /* Never happen */ 90 /* Conntrack defragments packets, we might still see fragments
91 if (iph->frag_off & htons(IP_OFFSET)) { 91 * inside ICMP packets though. */
92 if (net_ratelimit()) { 92 if (iph->frag_off & htons(IP_OFFSET))
93 printk(KERN_ERR "ipv4_get_l4proto: Frag of proto %u\n",
94 iph->protocol);
95 }
96 return -NF_DROP; 93 return -NF_DROP;
97 }
98 94
99 *dataoff = nhoff + (iph->ihl << 2); 95 *dataoff = nhoff + (iph->ihl << 2);
100 *protonum = iph->protocol; 96 *protonum = iph->protocol;
@@ -403,6 +399,7 @@ static struct nf_sockopt_ops so_getorigdst = {
403 .get_optmin = SO_ORIGINAL_DST, 399 .get_optmin = SO_ORIGINAL_DST,
404 .get_optmax = SO_ORIGINAL_DST+1, 400 .get_optmax = SO_ORIGINAL_DST+1,
405 .get = &getorigdst, 401 .get = &getorigdst,
402 .owner = THIS_MODULE,
406}; 403};
407 404
408struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = { 405struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = {
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index f030435e0e..f893e90061 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -555,6 +555,16 @@ static void tcp_event_data_recv(struct sock *sk, struct sk_buff *skb)
555 tcp_grow_window(sk, skb); 555 tcp_grow_window(sk, skb);
556} 556}
557 557
558static u32 tcp_rto_min(struct sock *sk)
559{
560 struct dst_entry *dst = __sk_dst_get(sk);
561 u32 rto_min = TCP_RTO_MIN;
562
563 if (dst && dst_metric_locked(dst, RTAX_RTO_MIN))
564 rto_min = dst->metrics[RTAX_RTO_MIN-1];
565 return rto_min;
566}
567
558/* Called to compute a smoothed rtt estimate. The data fed to this 568/* Called to compute a smoothed rtt estimate. The data fed to this
559 * routine either comes from timestamps, or from segments that were 569 * routine either comes from timestamps, or from segments that were
560 * known _not_ to have been retransmitted [see Karn/Partridge 570 * known _not_ to have been retransmitted [see Karn/Partridge
@@ -616,13 +626,13 @@ static void tcp_rtt_estimator(struct sock *sk, const __u32 mrtt)
616 if (tp->mdev_max < tp->rttvar) 626 if (tp->mdev_max < tp->rttvar)
617 tp->rttvar -= (tp->rttvar-tp->mdev_max)>>2; 627 tp->rttvar -= (tp->rttvar-tp->mdev_max)>>2;
618 tp->rtt_seq = tp->snd_nxt; 628 tp->rtt_seq = tp->snd_nxt;
619 tp->mdev_max = TCP_RTO_MIN; 629 tp->mdev_max = tcp_rto_min(sk);
620 } 630 }
621 } else { 631 } else {
622 /* no previous measure. */ 632 /* no previous measure. */
623 tp->srtt = m<<3; /* take the measured time to be rtt */ 633 tp->srtt = m<<3; /* take the measured time to be rtt */
624 tp->mdev = m<<1; /* make sure rto = 3*rtt */ 634 tp->mdev = m<<1; /* make sure rto = 3*rtt */
625 tp->mdev_max = tp->rttvar = max(tp->mdev, TCP_RTO_MIN); 635 tp->mdev_max = tp->rttvar = max(tp->mdev, tcp_rto_min(sk));
626 tp->rtt_seq = tp->snd_nxt; 636 tp->rtt_seq = tp->snd_nxt;
627 } 637 }
628} 638}
@@ -755,7 +765,15 @@ void tcp_update_metrics(struct sock *sk)
755 } 765 }
756} 766}
757 767
758/* Numbers are taken from RFC2414. */ 768/* Numbers are taken from RFC3390.
769 *
770 * John Heffner states:
771 *
772 * The RFC specifies a window of no more than 4380 bytes
773 * unless 2*MSS > 4380. Reading the pseudocode in the RFC
774 * is a bit misleading because they use a clamp at 4380 bytes
775 * rather than use a multiplier in the relevant range.
776 */
759__u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst) 777__u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst)
760{ 778{
761 __u32 cwnd = (dst ? dst_metric(dst, RTAX_INITCWND) : 0); 779 __u32 cwnd = (dst ? dst_metric(dst, RTAX_INITCWND) : 0);
@@ -2402,6 +2420,9 @@ static int tcp_tso_acked(struct sock *sk, struct sk_buff *skb,
2402 __u32 dval = min(tp->fackets_out, packets_acked); 2420 __u32 dval = min(tp->fackets_out, packets_acked);
2403 tp->fackets_out -= dval; 2421 tp->fackets_out -= dval;
2404 } 2422 }
2423 /* hint's skb might be NULL but we don't need to care */
2424 tp->fastpath_cnt_hint -= min_t(u32, packets_acked,
2425 tp->fastpath_cnt_hint);
2405 tp->packets_out -= packets_acked; 2426 tp->packets_out -= packets_acked;
2406 2427
2407 BUG_ON(tcp_skb_pcount(skb) == 0); 2428 BUG_ON(tcp_skb_pcount(skb) == 0);
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 9c94627c8c..e089a978e1 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -833,8 +833,7 @@ static struct tcp_md5sig_key *
833 return NULL; 833 return NULL;
834 for (i = 0; i < tp->md5sig_info->entries4; i++) { 834 for (i = 0; i < tp->md5sig_info->entries4; i++) {
835 if (tp->md5sig_info->keys4[i].addr == addr) 835 if (tp->md5sig_info->keys4[i].addr == addr)
836 return (struct tcp_md5sig_key *) 836 return &tp->md5sig_info->keys4[i].base;
837 &tp->md5sig_info->keys4[i];
838 } 837 }
839 return NULL; 838 return NULL;
840} 839}
@@ -865,9 +864,9 @@ int tcp_v4_md5_do_add(struct sock *sk, __be32 addr,
865 key = (struct tcp4_md5sig_key *)tcp_v4_md5_do_lookup(sk, addr); 864 key = (struct tcp4_md5sig_key *)tcp_v4_md5_do_lookup(sk, addr);
866 if (key) { 865 if (key) {
867 /* Pre-existing entry - just update that one. */ 866 /* Pre-existing entry - just update that one. */
868 kfree(key->key); 867 kfree(key->base.key);
869 key->key = newkey; 868 key->base.key = newkey;
870 key->keylen = newkeylen; 869 key->base.keylen = newkeylen;
871 } else { 870 } else {
872 struct tcp_md5sig_info *md5sig; 871 struct tcp_md5sig_info *md5sig;
873 872
@@ -906,9 +905,9 @@ int tcp_v4_md5_do_add(struct sock *sk, __be32 addr,
906 md5sig->alloced4++; 905 md5sig->alloced4++;
907 } 906 }
908 md5sig->entries4++; 907 md5sig->entries4++;
909 md5sig->keys4[md5sig->entries4 - 1].addr = addr; 908 md5sig->keys4[md5sig->entries4 - 1].addr = addr;
910 md5sig->keys4[md5sig->entries4 - 1].key = newkey; 909 md5sig->keys4[md5sig->entries4 - 1].base.key = newkey;
911 md5sig->keys4[md5sig->entries4 - 1].keylen = newkeylen; 910 md5sig->keys4[md5sig->entries4 - 1].base.keylen = newkeylen;
912 } 911 }
913 return 0; 912 return 0;
914} 913}
@@ -930,7 +929,7 @@ int tcp_v4_md5_do_del(struct sock *sk, __be32 addr)
930 for (i = 0; i < tp->md5sig_info->entries4; i++) { 929 for (i = 0; i < tp->md5sig_info->entries4; i++) {
931 if (tp->md5sig_info->keys4[i].addr == addr) { 930 if (tp->md5sig_info->keys4[i].addr == addr) {
932 /* Free the key */ 931 /* Free the key */
933 kfree(tp->md5sig_info->keys4[i].key); 932 kfree(tp->md5sig_info->keys4[i].base.key);
934 tp->md5sig_info->entries4--; 933 tp->md5sig_info->entries4--;
935 934
936 if (tp->md5sig_info->entries4 == 0) { 935 if (tp->md5sig_info->entries4 == 0) {
@@ -964,7 +963,7 @@ static void tcp_v4_clear_md5_list(struct sock *sk)
964 if (tp->md5sig_info->entries4) { 963 if (tp->md5sig_info->entries4) {
965 int i; 964 int i;
966 for (i = 0; i < tp->md5sig_info->entries4; i++) 965 for (i = 0; i < tp->md5sig_info->entries4; i++)
967 kfree(tp->md5sig_info->keys4[i].key); 966 kfree(tp->md5sig_info->keys4[i].base.key);
968 tp->md5sig_info->entries4 = 0; 967 tp->md5sig_info->entries4 = 0;
969 tcp_free_md5sig_pool(); 968 tcp_free_md5sig_pool();
970 } 969 }
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 28355350fb..69d4bd10f9 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -505,6 +505,8 @@ send:
505out: 505out:
506 up->len = 0; 506 up->len = 0;
507 up->pending = 0; 507 up->pending = 0;
508 if (!err)
509 UDP_INC_STATS_USER(UDP_MIB_OUTDATAGRAMS, up->pcflag);
508 return err; 510 return err;
509} 511}
510 512
@@ -693,10 +695,8 @@ out:
693 ip_rt_put(rt); 695 ip_rt_put(rt);
694 if (free) 696 if (free)
695 kfree(ipc.opt); 697 kfree(ipc.opt);
696 if (!err) { 698 if (!err)
697 UDP_INC_STATS_USER(UDP_MIB_OUTDATAGRAMS, is_udplite);
698 return len; 699 return len;
699 }
700 /* 700 /*
701 * ENOBUFS = no kernel mem, SOCK_NOSPACE = no sndbuf space. Reporting 701 * ENOBUFS = no kernel mem, SOCK_NOSPACE = no sndbuf space. Reporting
702 * ENOBUFS might not be good (it's not tunable per se), but otherwise 702 * ENOBUFS might not be good (it's not tunable per se), but otherwise
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 91ef3be5ab..45b4c82148 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1021,7 +1021,7 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev,
1021 hiscore.rule++; 1021 hiscore.rule++;
1022 } 1022 }
1023 if (ipv6_saddr_preferred(score.addr_type) || 1023 if (ipv6_saddr_preferred(score.addr_type) ||
1024 (((ifa_result->flags & 1024 (((ifa->flags &
1025 (IFA_F_DEPRECATED|IFA_F_OPTIMISTIC)) == 0))) { 1025 (IFA_F_DEPRECATED|IFA_F_OPTIMISTIC)) == 0))) {
1026 score.attrs |= IPV6_SADDR_SCORE_PREFERRED; 1026 score.attrs |= IPV6_SADDR_SCORE_PREFERRED;
1027 if (!(hiscore.attrs & IPV6_SADDR_SCORE_PREFERRED)) { 1027 if (!(hiscore.attrs & IPV6_SADDR_SCORE_PREFERRED)) {
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 5dead399fe..26de3c0ea3 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1427,8 +1427,9 @@ void ip6_flush_pending_frames(struct sock *sk)
1427 struct sk_buff *skb; 1427 struct sk_buff *skb;
1428 1428
1429 while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL) { 1429 while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL) {
1430 IP6_INC_STATS(ip6_dst_idev(skb->dst), 1430 if (skb->dst)
1431 IPSTATS_MIB_OUTDISCARDS); 1431 IP6_INC_STATS(ip6_dst_idev(skb->dst),
1432 IPSTATS_MIB_OUTDISCARDS);
1432 kfree_skb(skb); 1433 kfree_skb(skb);
1433 } 1434 }
1434 1435
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 761a910f4f..6b038aa72e 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -554,6 +554,10 @@ done:
554 { 554 {
555 struct ipv6_mreq mreq; 555 struct ipv6_mreq mreq;
556 556
557 retv = -EPROTO;
558 if (inet_sk(sk)->is_icsk)
559 break;
560
557 retv = -EFAULT; 561 retv = -EFAULT;
558 if (copy_from_user(&mreq, optval, sizeof(struct ipv6_mreq))) 562 if (copy_from_user(&mreq, optval, sizeof(struct ipv6_mreq)))
559 break; 563 break;
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 0358e6066a..5b59665917 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -736,7 +736,7 @@ static void ndisc_recv_ns(struct sk_buff *skb)
736 * so fail our DAD process 736 * so fail our DAD process
737 */ 737 */
738 addrconf_dad_failure(ifp); 738 addrconf_dad_failure(ifp);
739 goto out; 739 return;
740 } else { 740 } else {
741 /* 741 /*
742 * This is not a dad solicitation. 742 * This is not a dad solicitation.
@@ -1268,9 +1268,10 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
1268 1268
1269 if (ipv6_addr_equal(dest, target)) { 1269 if (ipv6_addr_equal(dest, target)) {
1270 on_link = 1; 1270 on_link = 1;
1271 } else if (!(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) { 1271 } else if (ipv6_addr_type(target) !=
1272 (IPV6_ADDR_UNICAST|IPV6_ADDR_LINKLOCAL)) {
1272 ND_PRINTK2(KERN_WARNING 1273 ND_PRINTK2(KERN_WARNING
1273 "ICMPv6 Redirect: target address is not link-local.\n"); 1274 "ICMPv6 Redirect: target address is not link-local unicast.\n");
1274 return; 1275 return;
1275 } 1276 }
1276 1277
@@ -1344,9 +1345,9 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
1344 } 1345 }
1345 1346
1346 if (!ipv6_addr_equal(&ipv6_hdr(skb)->daddr, target) && 1347 if (!ipv6_addr_equal(&ipv6_hdr(skb)->daddr, target) &&
1347 !(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) { 1348 ipv6_addr_type(target) != (IPV6_ADDR_UNICAST|IPV6_ADDR_LINKLOCAL)) {
1348 ND_PRINTK2(KERN_WARNING 1349 ND_PRINTK2(KERN_WARNING
1349 "ICMPv6 Redirect: target address is not link-local.\n"); 1350 "ICMPv6 Redirect: target address is not link-local unicast.\n");
1350 return; 1351 return;
1351 } 1352 }
1352 1353
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index aeda617246..cd9df02bb8 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -1462,6 +1462,7 @@ static struct nf_sockopt_ops ip6t_sockopts = {
1462 .get_optmin = IP6T_BASE_CTL, 1462 .get_optmin = IP6T_BASE_CTL,
1463 .get_optmax = IP6T_SO_GET_MAX+1, 1463 .get_optmax = IP6T_SO_GET_MAX+1,
1464 .get = do_ip6t_get_ctl, 1464 .get = do_ip6t_get_ctl,
1465 .owner = THIS_MODULE,
1465}; 1466};
1466 1467
1467static struct xt_match icmp6_matchstruct __read_mostly = { 1468static struct xt_match icmp6_matchstruct __read_mostly = {
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index e27383d855..77167afa34 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -882,11 +882,10 @@ back_from_confirm:
882 ip6_flush_pending_frames(sk); 882 ip6_flush_pending_frames(sk);
883 else if (!(msg->msg_flags & MSG_MORE)) 883 else if (!(msg->msg_flags & MSG_MORE))
884 err = rawv6_push_pending_frames(sk, &fl, rp); 884 err = rawv6_push_pending_frames(sk, &fl, rp);
885 release_sock(sk);
885 } 886 }
886done: 887done:
887 dst_release(dst); 888 dst_release(dst);
888 if (!inet->hdrincl)
889 release_sock(sk);
890out: 889out:
891 fl6_sock_release(flowlabel); 890 fl6_sock_release(flowlabel);
892 return err<0?err:len; 891 return err<0?err:len;
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 0f7defb482..3e06799b37 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -539,7 +539,7 @@ static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk,
539 539
540 for (i = 0; i < tp->md5sig_info->entries6; i++) { 540 for (i = 0; i < tp->md5sig_info->entries6; i++) {
541 if (ipv6_addr_cmp(&tp->md5sig_info->keys6[i].addr, addr) == 0) 541 if (ipv6_addr_cmp(&tp->md5sig_info->keys6[i].addr, addr) == 0)
542 return (struct tcp_md5sig_key *)&tp->md5sig_info->keys6[i]; 542 return &tp->md5sig_info->keys6[i].base;
543 } 543 }
544 return NULL; 544 return NULL;
545} 545}
@@ -567,9 +567,9 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer,
567 key = (struct tcp6_md5sig_key*) tcp_v6_md5_do_lookup(sk, peer); 567 key = (struct tcp6_md5sig_key*) tcp_v6_md5_do_lookup(sk, peer);
568 if (key) { 568 if (key) {
569 /* modify existing entry - just update that one */ 569 /* modify existing entry - just update that one */
570 kfree(key->key); 570 kfree(key->base.key);
571 key->key = newkey; 571 key->base.key = newkey;
572 key->keylen = newkeylen; 572 key->base.keylen = newkeylen;
573 } else { 573 } else {
574 /* reallocate new list if current one is full. */ 574 /* reallocate new list if current one is full. */
575 if (!tp->md5sig_info) { 575 if (!tp->md5sig_info) {
@@ -603,8 +603,8 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer,
603 603
604 ipv6_addr_copy(&tp->md5sig_info->keys6[tp->md5sig_info->entries6].addr, 604 ipv6_addr_copy(&tp->md5sig_info->keys6[tp->md5sig_info->entries6].addr,
605 peer); 605 peer);
606 tp->md5sig_info->keys6[tp->md5sig_info->entries6].key = newkey; 606 tp->md5sig_info->keys6[tp->md5sig_info->entries6].base.key = newkey;
607 tp->md5sig_info->keys6[tp->md5sig_info->entries6].keylen = newkeylen; 607 tp->md5sig_info->keys6[tp->md5sig_info->entries6].base.keylen = newkeylen;
608 608
609 tp->md5sig_info->entries6++; 609 tp->md5sig_info->entries6++;
610 } 610 }
@@ -626,7 +626,7 @@ static int tcp_v6_md5_do_del(struct sock *sk, struct in6_addr *peer)
626 for (i = 0; i < tp->md5sig_info->entries6; i++) { 626 for (i = 0; i < tp->md5sig_info->entries6; i++) {
627 if (ipv6_addr_cmp(&tp->md5sig_info->keys6[i].addr, peer) == 0) { 627 if (ipv6_addr_cmp(&tp->md5sig_info->keys6[i].addr, peer) == 0) {
628 /* Free the key */ 628 /* Free the key */
629 kfree(tp->md5sig_info->keys6[i].key); 629 kfree(tp->md5sig_info->keys6[i].base.key);
630 tp->md5sig_info->entries6--; 630 tp->md5sig_info->entries6--;
631 631
632 if (tp->md5sig_info->entries6 == 0) { 632 if (tp->md5sig_info->entries6 == 0) {
@@ -657,7 +657,7 @@ static void tcp_v6_clear_md5_list (struct sock *sk)
657 657
658 if (tp->md5sig_info->entries6) { 658 if (tp->md5sig_info->entries6) {
659 for (i = 0; i < tp->md5sig_info->entries6; i++) 659 for (i = 0; i < tp->md5sig_info->entries6; i++)
660 kfree(tp->md5sig_info->keys6[i].key); 660 kfree(tp->md5sig_info->keys6[i].base.key);
661 tp->md5sig_info->entries6 = 0; 661 tp->md5sig_info->entries6 = 0;
662 tcp_free_md5sig_pool(); 662 tcp_free_md5sig_pool();
663 } 663 }
@@ -668,7 +668,7 @@ static void tcp_v6_clear_md5_list (struct sock *sk)
668 668
669 if (tp->md5sig_info->entries4) { 669 if (tp->md5sig_info->entries4) {
670 for (i = 0; i < tp->md5sig_info->entries4; i++) 670 for (i = 0; i < tp->md5sig_info->entries4; i++)
671 kfree(tp->md5sig_info->keys4[i].key); 671 kfree(tp->md5sig_info->keys4[i].base.key);
672 tp->md5sig_info->entries4 = 0; 672 tp->md5sig_info->entries4 = 0;
673 tcp_free_md5sig_pool(); 673 tcp_free_md5sig_pool();
674 } 674 }
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 4210951edb..c347f3e30e 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -555,6 +555,8 @@ static int udp_v6_push_pending_frames(struct sock *sk)
555out: 555out:
556 up->len = 0; 556 up->len = 0;
557 up->pending = 0; 557 up->pending = 0;
558 if (!err)
559 UDP6_INC_STATS_USER(UDP_MIB_OUTDATAGRAMS, up->pcflag);
558 return err; 560 return err;
559} 561}
560 562
@@ -823,10 +825,8 @@ do_append_data:
823 release_sock(sk); 825 release_sock(sk);
824out: 826out:
825 fl6_sock_release(flowlabel); 827 fl6_sock_release(flowlabel);
826 if (!err) { 828 if (!err)
827 UDP6_INC_STATS_USER(UDP_MIB_OUTDATAGRAMS, is_udplite);
828 return len; 829 return len;
829 }
830 /* 830 /*
831 * ENOBUFS = no kernel mem, SOCK_NOSPACE = no sndbuf space. Reporting 831 * ENOBUFS = no kernel mem, SOCK_NOSPACE = no sndbuf space. Reporting
832 * ENOBUFS might not be good (it's not tunable per se), but otherwise 832 * ENOBUFS might not be good (it's not tunable per se), but otherwise
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 7286c389a4..ff2172ffd8 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -5259,7 +5259,7 @@ static void __exit ieee80211_exit(void)
5259} 5259}
5260 5260
5261 5261
5262module_init(ieee80211_init); 5262subsys_initcall(ieee80211_init);
5263module_exit(ieee80211_exit); 5263module_exit(ieee80211_exit);
5264 5264
5265MODULE_DESCRIPTION("IEEE 802.11 subsystem"); 5265MODULE_DESCRIPTION("IEEE 802.11 subsystem");
diff --git a/net/mac80211/rc80211_simple.c b/net/mac80211/rc80211_simple.c
index f6780d63b3..17b9f46bbf 100644
--- a/net/mac80211/rc80211_simple.c
+++ b/net/mac80211/rc80211_simple.c
@@ -431,7 +431,7 @@ static void __exit rate_control_simple_exit(void)
431} 431}
432 432
433 433
434module_init(rate_control_simple_init); 434subsys_initcall(rate_control_simple_init);
435module_exit(rate_control_simple_exit); 435module_exit(rate_control_simple_exit);
436 436
437MODULE_DESCRIPTION("Simple rate control algorithm for ieee80211"); 437MODULE_DESCRIPTION("Simple rate control algorithm for ieee80211");
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 89ce815296..7ab82b376e 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -424,7 +424,7 @@ static int wme_qdiscop_init(struct Qdisc *qd, struct rtattr *opt)
424 skb_queue_head_init(&q->requeued[i]); 424 skb_queue_head_init(&q->requeued[i]);
425 q->queues[i] = qdisc_create_dflt(qd->dev, &pfifo_qdisc_ops, 425 q->queues[i] = qdisc_create_dflt(qd->dev, &pfifo_qdisc_ops,
426 qd->handle); 426 qd->handle);
427 if (q->queues[i] == 0) { 427 if (!q->queues[i]) {
428 q->queues[i] = &noop_qdisc; 428 q->queues[i] = &noop_qdisc;
429 printk(KERN_ERR "%s child qdisc %i creation failed", dev->name, i); 429 printk(KERN_ERR "%s child qdisc %i creation failed", dev->name, i);
430 } 430 }
diff --git a/net/netfilter/nf_sockopt.c b/net/netfilter/nf_sockopt.c
index 8b8ece7503..e32761ce26 100644
--- a/net/netfilter/nf_sockopt.c
+++ b/net/netfilter/nf_sockopt.c
@@ -55,18 +55,7 @@ EXPORT_SYMBOL(nf_register_sockopt);
55 55
56void nf_unregister_sockopt(struct nf_sockopt_ops *reg) 56void nf_unregister_sockopt(struct nf_sockopt_ops *reg)
57{ 57{
58 /* No point being interruptible: we're probably in cleanup_module() */
59 restart:
60 mutex_lock(&nf_sockopt_mutex); 58 mutex_lock(&nf_sockopt_mutex);
61 if (reg->use != 0) {
62 /* To be woken by nf_sockopt call... */
63 /* FIXME: Stuart Young's name appears gratuitously. */
64 set_current_state(TASK_UNINTERRUPTIBLE);
65 reg->cleanup_task = current;
66 mutex_unlock(&nf_sockopt_mutex);
67 schedule();
68 goto restart;
69 }
70 list_del(&reg->list); 59 list_del(&reg->list);
71 mutex_unlock(&nf_sockopt_mutex); 60 mutex_unlock(&nf_sockopt_mutex);
72} 61}
@@ -86,10 +75,11 @@ static int nf_sockopt(struct sock *sk, int pf, int val,
86 list_for_each(i, &nf_sockopts) { 75 list_for_each(i, &nf_sockopts) {
87 ops = (struct nf_sockopt_ops *)i; 76 ops = (struct nf_sockopt_ops *)i;
88 if (ops->pf == pf) { 77 if (ops->pf == pf) {
78 if (!try_module_get(ops->owner))
79 goto out_nosup;
89 if (get) { 80 if (get) {
90 if (val >= ops->get_optmin 81 if (val >= ops->get_optmin
91 && val < ops->get_optmax) { 82 && val < ops->get_optmax) {
92 ops->use++;
93 mutex_unlock(&nf_sockopt_mutex); 83 mutex_unlock(&nf_sockopt_mutex);
94 ret = ops->get(sk, val, opt, len); 84 ret = ops->get(sk, val, opt, len);
95 goto out; 85 goto out;
@@ -97,23 +87,20 @@ static int nf_sockopt(struct sock *sk, int pf, int val,
97 } else { 87 } else {
98 if (val >= ops->set_optmin 88 if (val >= ops->set_optmin
99 && val < ops->set_optmax) { 89 && val < ops->set_optmax) {
100 ops->use++;
101 mutex_unlock(&nf_sockopt_mutex); 90 mutex_unlock(&nf_sockopt_mutex);
102 ret = ops->set(sk, val, opt, *len); 91 ret = ops->set(sk, val, opt, *len);
103 goto out; 92 goto out;
104 } 93 }
105 } 94 }
95 module_put(ops->owner);
106 } 96 }
107 } 97 }
98 out_nosup:
108 mutex_unlock(&nf_sockopt_mutex); 99 mutex_unlock(&nf_sockopt_mutex);
109 return -ENOPROTOOPT; 100 return -ENOPROTOOPT;
110 101
111 out: 102 out:
112 mutex_lock(&nf_sockopt_mutex); 103 module_put(ops->owner);
113 ops->use--;
114 if (ops->cleanup_task)
115 wake_up_process(ops->cleanup_task);
116 mutex_unlock(&nf_sockopt_mutex);
117 return ret; 104 return ret;
118} 105}
119 106
@@ -144,10 +131,12 @@ static int compat_nf_sockopt(struct sock *sk, int pf, int val,
144 list_for_each(i, &nf_sockopts) { 131 list_for_each(i, &nf_sockopts) {
145 ops = (struct nf_sockopt_ops *)i; 132 ops = (struct nf_sockopt_ops *)i;
146 if (ops->pf == pf) { 133 if (ops->pf == pf) {
134 if (!try_module_get(ops->owner))
135 goto out_nosup;
136
147 if (get) { 137 if (get) {
148 if (val >= ops->get_optmin 138 if (val >= ops->get_optmin
149 && val < ops->get_optmax) { 139 && val < ops->get_optmax) {
150 ops->use++;
151 mutex_unlock(&nf_sockopt_mutex); 140 mutex_unlock(&nf_sockopt_mutex);
152 if (ops->compat_get) 141 if (ops->compat_get)
153 ret = ops->compat_get(sk, 142 ret = ops->compat_get(sk,
@@ -160,7 +149,6 @@ static int compat_nf_sockopt(struct sock *sk, int pf, int val,
160 } else { 149 } else {
161 if (val >= ops->set_optmin 150 if (val >= ops->set_optmin
162 && val < ops->set_optmax) { 151 && val < ops->set_optmax) {
163 ops->use++;
164 mutex_unlock(&nf_sockopt_mutex); 152 mutex_unlock(&nf_sockopt_mutex);
165 if (ops->compat_set) 153 if (ops->compat_set)
166 ret = ops->compat_set(sk, 154 ret = ops->compat_set(sk,
@@ -171,17 +159,15 @@ static int compat_nf_sockopt(struct sock *sk, int pf, int val,
171 goto out; 159 goto out;
172 } 160 }
173 } 161 }
162 module_put(ops->owner);
174 } 163 }
175 } 164 }
165 out_nosup:
176 mutex_unlock(&nf_sockopt_mutex); 166 mutex_unlock(&nf_sockopt_mutex);
177 return -ENOPROTOOPT; 167 return -ENOPROTOOPT;
178 168
179 out: 169 out:
180 mutex_lock(&nf_sockopt_mutex); 170 module_put(ops->owner);
181 ops->use--;
182 if (ops->cleanup_task)
183 wake_up_process(ops->cleanup_task);
184 mutex_unlock(&nf_sockopt_mutex);
185 return ret; 171 return ret;
186} 172}
187 173
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index e185a5b559..2351533a85 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -58,7 +58,6 @@ struct nfulnl_instance {
58 58
59 unsigned int qlen; /* number of nlmsgs in skb */ 59 unsigned int qlen; /* number of nlmsgs in skb */
60 struct sk_buff *skb; /* pre-allocatd skb */ 60 struct sk_buff *skb; /* pre-allocatd skb */
61 struct nlmsghdr *lastnlh; /* netlink header of last msg in skb */
62 struct timer_list timer; 61 struct timer_list timer;
63 int peer_pid; /* PID of the peer process */ 62 int peer_pid; /* PID of the peer process */
64 63
@@ -345,10 +344,12 @@ static struct sk_buff *nfulnl_alloc_skb(unsigned int inst_size,
345static int 344static int
346__nfulnl_send(struct nfulnl_instance *inst) 345__nfulnl_send(struct nfulnl_instance *inst)
347{ 346{
348 int status; 347 int status = -1;
349 348
350 if (inst->qlen > 1) 349 if (inst->qlen > 1)
351 inst->lastnlh->nlmsg_type = NLMSG_DONE; 350 NLMSG_PUT(inst->skb, 0, 0,
351 NLMSG_DONE,
352 sizeof(struct nfgenmsg));
352 353
353 status = nfnetlink_unicast(inst->skb, inst->peer_pid, MSG_DONTWAIT); 354 status = nfnetlink_unicast(inst->skb, inst->peer_pid, MSG_DONTWAIT);
354 if (status < 0) { 355 if (status < 0) {
@@ -358,8 +359,8 @@ __nfulnl_send(struct nfulnl_instance *inst)
358 359
359 inst->qlen = 0; 360 inst->qlen = 0;
360 inst->skb = NULL; 361 inst->skb = NULL;
361 inst->lastnlh = NULL;
362 362
363nlmsg_failure:
363 return status; 364 return status;
364} 365}
365 366
@@ -538,7 +539,6 @@ __build_packet_message(struct nfulnl_instance *inst,
538 } 539 }
539 540
540 nlh->nlmsg_len = inst->skb->tail - old_tail; 541 nlh->nlmsg_len = inst->skb->tail - old_tail;
541 inst->lastnlh = nlh;
542 return 0; 542 return 0;
543 543
544nlmsg_failure: 544nlmsg_failure:
@@ -644,7 +644,8 @@ nfulnl_log_packet(unsigned int pf,
644 } 644 }
645 645
646 if (inst->qlen >= qthreshold || 646 if (inst->qlen >= qthreshold ||
647 (inst->skb && size > skb_tailroom(inst->skb))) { 647 (inst->skb && size >
648 skb_tailroom(inst->skb) - sizeof(struct nfgenmsg))) {
648 /* either the queue len is too high or we don't have 649 /* either the queue len is too high or we don't have
649 * enough room in the skb left. flush to userspace. */ 650 * enough room in the skb left. flush to userspace. */
650 UDEBUG("flushing old skb\n"); 651 UDEBUG("flushing old skb\n");
diff --git a/net/netfilter/xt_tcpudp.c b/net/netfilter/xt_tcpudp.c
index ab7d845224..223f9bded6 100644
--- a/net/netfilter/xt_tcpudp.c
+++ b/net/netfilter/xt_tcpudp.c
@@ -188,7 +188,7 @@ udp_checkentry(const char *tablename,
188 void *matchinfo, 188 void *matchinfo,
189 unsigned int hook_mask) 189 unsigned int hook_mask)
190{ 190{
191 const struct xt_tcp *udpinfo = matchinfo; 191 const struct xt_udp *udpinfo = matchinfo;
192 192
193 /* Must specify no unknown invflags */ 193 /* Must specify no unknown invflags */
194 return !(udpinfo->invflags & ~XT_UDP_INV_MASK); 194 return !(udpinfo->invflags & ~XT_UDP_INV_MASK);
diff --git a/net/rose/rose_loopback.c b/net/rose/rose_loopback.c
index cd01642f04..114df6eec8 100644
--- a/net/rose/rose_loopback.c
+++ b/net/rose/rose_loopback.c
@@ -79,7 +79,7 @@ static void rose_loopback_timer(unsigned long param)
79 79
80 skb_reset_transport_header(skb); 80 skb_reset_transport_header(skb);
81 81
82 sk = rose_find_socket(lci_o, &rose_loopback_neigh); 82 sk = rose_find_socket(lci_o, rose_loopback_neigh);
83 if (sk) { 83 if (sk) {
84 if (rose_process_rx_frame(sk, skb) == 0) 84 if (rose_process_rx_frame(sk, skb) == 0)
85 kfree_skb(skb); 85 kfree_skb(skb);
@@ -88,7 +88,7 @@ static void rose_loopback_timer(unsigned long param)
88 88
89 if (frametype == ROSE_CALL_REQUEST) { 89 if (frametype == ROSE_CALL_REQUEST) {
90 if ((dev = rose_dev_get(dest)) != NULL) { 90 if ((dev = rose_dev_get(dest)) != NULL) {
91 if (rose_rx_call_request(skb, dev, &rose_loopback_neigh, lci_o) == 0) 91 if (rose_rx_call_request(skb, dev, rose_loopback_neigh, lci_o) == 0)
92 kfree_skb(skb); 92 kfree_skb(skb);
93 } else { 93 } else {
94 kfree_skb(skb); 94 kfree_skb(skb);
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index bbcbad1da0..96f61a71b2 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -45,7 +45,7 @@ static DEFINE_SPINLOCK(rose_neigh_list_lock);
45static struct rose_route *rose_route_list; 45static struct rose_route *rose_route_list;
46static DEFINE_SPINLOCK(rose_route_list_lock); 46static DEFINE_SPINLOCK(rose_route_list_lock);
47 47
48struct rose_neigh rose_loopback_neigh; 48struct rose_neigh *rose_loopback_neigh;
49 49
50/* 50/*
51 * Add a new route to a node, and in the process add the node and the 51 * Add a new route to a node, and in the process add the node and the
@@ -362,7 +362,12 @@ out:
362 */ 362 */
363void rose_add_loopback_neigh(void) 363void rose_add_loopback_neigh(void)
364{ 364{
365 struct rose_neigh *sn = &rose_loopback_neigh; 365 struct rose_neigh *sn;
366
367 rose_loopback_neigh = kmalloc(sizeof(struct rose_neigh), GFP_KERNEL);
368 if (!rose_loopback_neigh)
369 return;
370 sn = rose_loopback_neigh;
366 371
367 sn->callsign = null_ax25_address; 372 sn->callsign = null_ax25_address;
368 sn->digipeat = NULL; 373 sn->digipeat = NULL;
@@ -417,13 +422,13 @@ int rose_add_loopback_node(rose_address *address)
417 rose_node->mask = 10; 422 rose_node->mask = 10;
418 rose_node->count = 1; 423 rose_node->count = 1;
419 rose_node->loopback = 1; 424 rose_node->loopback = 1;
420 rose_node->neighbour[0] = &rose_loopback_neigh; 425 rose_node->neighbour[0] = rose_loopback_neigh;
421 426
422 /* Insert at the head of list. Address is always mask=10 */ 427 /* Insert at the head of list. Address is always mask=10 */
423 rose_node->next = rose_node_list; 428 rose_node->next = rose_node_list;
424 rose_node_list = rose_node; 429 rose_node_list = rose_node;
425 430
426 rose_loopback_neigh.count++; 431 rose_loopback_neigh->count++;
427 432
428out: 433out:
429 spin_unlock_bh(&rose_node_list_lock); 434 spin_unlock_bh(&rose_node_list_lock);
@@ -454,7 +459,7 @@ void rose_del_loopback_node(rose_address *address)
454 459
455 rose_remove_node(rose_node); 460 rose_remove_node(rose_node);
456 461
457 rose_loopback_neigh.count--; 462 rose_loopback_neigh->count--;
458 463
459out: 464out:
460 spin_unlock_bh(&rose_node_list_lock); 465 spin_unlock_bh(&rose_node_list_lock);
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index feef366cad..72cdb0fade 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -68,7 +68,7 @@ static int tcf_dump_walker(struct sk_buff *skb, struct netlink_callback *cb,
68 int err = 0, index = -1,i = 0, s_i = 0, n_i = 0; 68 int err = 0, index = -1,i = 0, s_i = 0, n_i = 0;
69 struct rtattr *r ; 69 struct rtattr *r ;
70 70
71 read_lock(hinfo->lock); 71 read_lock_bh(hinfo->lock);
72 72
73 s_i = cb->args[0]; 73 s_i = cb->args[0];
74 74
@@ -96,7 +96,7 @@ static int tcf_dump_walker(struct sk_buff *skb, struct netlink_callback *cb,
96 } 96 }
97 } 97 }
98done: 98done:
99 read_unlock(hinfo->lock); 99 read_unlock_bh(hinfo->lock);
100 if (n_i) 100 if (n_i)
101 cb->args[0] += n_i; 101 cb->args[0] += n_i;
102 return n_i; 102 return n_i;
@@ -156,13 +156,13 @@ struct tcf_common *tcf_hash_lookup(u32 index, struct tcf_hashinfo *hinfo)
156{ 156{
157 struct tcf_common *p; 157 struct tcf_common *p;
158 158
159 read_lock(hinfo->lock); 159 read_lock_bh(hinfo->lock);
160 for (p = hinfo->htab[tcf_hash(index, hinfo->hmask)]; p; 160 for (p = hinfo->htab[tcf_hash(index, hinfo->hmask)]; p;
161 p = p->tcfc_next) { 161 p = p->tcfc_next) {
162 if (p->tcfc_index == index) 162 if (p->tcfc_index == index)
163 break; 163 break;
164 } 164 }
165 read_unlock(hinfo->lock); 165 read_unlock_bh(hinfo->lock);
166 166
167 return p; 167 return p;
168} 168}
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 6085be5784..17f6f27e28 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -56,7 +56,7 @@ static int tcf_act_police_walker(struct sk_buff *skb, struct netlink_callback *c
56 int err = 0, index = -1, i = 0, s_i = 0, n_i = 0; 56 int err = 0, index = -1, i = 0, s_i = 0, n_i = 0;
57 struct rtattr *r; 57 struct rtattr *r;
58 58
59 read_lock(&police_lock); 59 read_lock_bh(&police_lock);
60 60
61 s_i = cb->args[0]; 61 s_i = cb->args[0];
62 62
@@ -85,7 +85,7 @@ static int tcf_act_police_walker(struct sk_buff *skb, struct netlink_callback *c
85 } 85 }
86 } 86 }
87done: 87done:
88 read_unlock(&police_lock); 88 read_unlock_bh(&police_lock);
89 if (n_i) 89 if (n_i)
90 cb->args[0] += n_i; 90 cb->args[0] += n_i;
91 return n_i; 91 return n_i;
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 8dbe36912e..d4d5d2f271 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -502,7 +502,7 @@ static int u32_set_parms(struct tcf_proto *tp, unsigned long base,
502 502
503#ifdef CONFIG_NET_CLS_IND 503#ifdef CONFIG_NET_CLS_IND
504 if (tb[TCA_U32_INDEV-1]) { 504 if (tb[TCA_U32_INDEV-1]) {
505 int err = tcf_change_indev(tp, n->indev, tb[TCA_U32_INDEV-1]); 505 err = tcf_change_indev(tp, n->indev, tb[TCA_U32_INDEV-1]);
506 if (err < 0) 506 if (err < 0)
507 goto errout; 507 goto errout;
508 } 508 }
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index e38c2839b2..cbef3bbfc2 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -380,7 +380,7 @@ cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
380{ 380{
381 struct cbq_sched_data *q = qdisc_priv(sch); 381 struct cbq_sched_data *q = qdisc_priv(sch);
382 int len = skb->len; 382 int len = skb->len;
383 int ret; 383 int uninitialized_var(ret);
384 struct cbq_class *cl = cbq_classify(skb, sch, &ret); 384 struct cbq_class *cl = cbq_classify(skb, sch, &ret);
385 385
386#ifdef CONFIG_NET_CLS_ACT 386#ifdef CONFIG_NET_CLS_ACT
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 4a49db6577..abd82fc3ec 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -44,7 +44,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
44 if (TC_H_MAJ(skb->priority) != sch->handle) { 44 if (TC_H_MAJ(skb->priority) != sch->handle) {
45 err = tc_classify(skb, q->filter_list, &res); 45 err = tc_classify(skb, q->filter_list, &res);
46#ifdef CONFIG_NET_CLS_ACT 46#ifdef CONFIG_NET_CLS_ACT
47 switch (tc_classify(skb, q->filter_list, &res)) { 47 switch (err) {
48 case TC_ACT_STOLEN: 48 case TC_ACT_STOLEN:
49 case TC_ACT_QUEUED: 49 case TC_ACT_QUEUED:
50 *qerr = NET_XMIT_SUCCESS; 50 *qerr = NET_XMIT_SUCCESS;
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index 9579573098..b542c875e1 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -19,6 +19,7 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/ipv6.h> 20#include <linux/ipv6.h>
21#include <linux/skbuff.h> 21#include <linux/skbuff.h>
22#include <linux/jhash.h>
22#include <net/ip.h> 23#include <net/ip.h>
23#include <net/netlink.h> 24#include <net/netlink.h>
24#include <net/pkt_sched.h> 25#include <net/pkt_sched.h>
@@ -95,7 +96,7 @@ struct sfq_sched_data
95 96
96/* Variables */ 97/* Variables */
97 struct timer_list perturb_timer; 98 struct timer_list perturb_timer;
98 int perturbation; 99 u32 perturbation;
99 sfq_index tail; /* Index of current slot in round */ 100 sfq_index tail; /* Index of current slot in round */
100 sfq_index max_depth; /* Maximal depth */ 101 sfq_index max_depth; /* Maximal depth */
101 102
@@ -109,12 +110,7 @@ struct sfq_sched_data
109 110
110static __inline__ unsigned sfq_fold_hash(struct sfq_sched_data *q, u32 h, u32 h1) 111static __inline__ unsigned sfq_fold_hash(struct sfq_sched_data *q, u32 h, u32 h1)
111{ 112{
112 int pert = q->perturbation; 113 return jhash_2words(h, h1, q->perturbation) & (SFQ_HASH_DIVISOR - 1);
113
114 /* Have we any rotation primitives? If not, WHY? */
115 h ^= (h1<<pert) ^ (h1>>(0x1F - pert));
116 h ^= h>>10;
117 return h & 0x3FF;
118} 114}
119 115
120static unsigned sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb) 116static unsigned sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb)
@@ -256,6 +252,13 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc* sch)
256 q->ht[hash] = x = q->dep[SFQ_DEPTH].next; 252 q->ht[hash] = x = q->dep[SFQ_DEPTH].next;
257 q->hash[x] = hash; 253 q->hash[x] = hash;
258 } 254 }
255 /* If selected queue has length q->limit, this means that
256 * all another queues are empty and that we do simple tail drop,
257 * i.e. drop _this_ packet.
258 */
259 if (q->qs[x].qlen >= q->limit)
260 return qdisc_drop(skb, sch);
261
259 sch->qstats.backlog += skb->len; 262 sch->qstats.backlog += skb->len;
260 __skb_queue_tail(&q->qs[x], skb); 263 __skb_queue_tail(&q->qs[x], skb);
261 sfq_inc(q, x); 264 sfq_inc(q, x);
@@ -270,7 +273,7 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc* sch)
270 q->tail = x; 273 q->tail = x;
271 } 274 }
272 } 275 }
273 if (++sch->q.qlen < q->limit-1) { 276 if (++sch->q.qlen <= q->limit) {
274 sch->bstats.bytes += skb->len; 277 sch->bstats.bytes += skb->len;
275 sch->bstats.packets++; 278 sch->bstats.packets++;
276 return 0; 279 return 0;
@@ -294,6 +297,19 @@ sfq_requeue(struct sk_buff *skb, struct Qdisc* sch)
294 } 297 }
295 sch->qstats.backlog += skb->len; 298 sch->qstats.backlog += skb->len;
296 __skb_queue_head(&q->qs[x], skb); 299 __skb_queue_head(&q->qs[x], skb);
300 /* If selected queue has length q->limit+1, this means that
301 * all another queues are empty and we do simple tail drop.
302 * This packet is still requeued at head of queue, tail packet
303 * is dropped.
304 */
305 if (q->qs[x].qlen > q->limit) {
306 skb = q->qs[x].prev;
307 __skb_unlink(skb, &q->qs[x]);
308 sch->qstats.drops++;
309 sch->qstats.backlog -= skb->len;
310 kfree_skb(skb);
311 return NET_XMIT_CN;
312 }
297 sfq_inc(q, x); 313 sfq_inc(q, x);
298 if (q->qs[x].qlen == 1) { /* The flow is new */ 314 if (q->qs[x].qlen == 1) { /* The flow is new */
299 if (q->tail == SFQ_DEPTH) { /* It is the first flow */ 315 if (q->tail == SFQ_DEPTH) { /* It is the first flow */
@@ -306,7 +322,7 @@ sfq_requeue(struct sk_buff *skb, struct Qdisc* sch)
306 q->tail = x; 322 q->tail = x;
307 } 323 }
308 } 324 }
309 if (++sch->q.qlen < q->limit - 1) { 325 if (++sch->q.qlen <= q->limit) {
310 sch->qstats.requeues++; 326 sch->qstats.requeues++;
311 return 0; 327 return 0;
312 } 328 }
@@ -370,12 +386,10 @@ static void sfq_perturbation(unsigned long arg)
370 struct Qdisc *sch = (struct Qdisc*)arg; 386 struct Qdisc *sch = (struct Qdisc*)arg;
371 struct sfq_sched_data *q = qdisc_priv(sch); 387 struct sfq_sched_data *q = qdisc_priv(sch);
372 388
373 q->perturbation = net_random()&0x1F; 389 get_random_bytes(&q->perturbation, 4);
374 390
375 if (q->perturb_period) { 391 if (q->perturb_period)
376 q->perturb_timer.expires = jiffies + q->perturb_period; 392 mod_timer(&q->perturb_timer, jiffies + q->perturb_period);
377 add_timer(&q->perturb_timer);
378 }
379} 393}
380 394
381static int sfq_change(struct Qdisc *sch, struct rtattr *opt) 395static int sfq_change(struct Qdisc *sch, struct rtattr *opt)
@@ -391,17 +405,17 @@ static int sfq_change(struct Qdisc *sch, struct rtattr *opt)
391 q->quantum = ctl->quantum ? : psched_mtu(sch->dev); 405 q->quantum = ctl->quantum ? : psched_mtu(sch->dev);
392 q->perturb_period = ctl->perturb_period*HZ; 406 q->perturb_period = ctl->perturb_period*HZ;
393 if (ctl->limit) 407 if (ctl->limit)
394 q->limit = min_t(u32, ctl->limit, SFQ_DEPTH); 408 q->limit = min_t(u32, ctl->limit, SFQ_DEPTH - 1);
395 409
396 qlen = sch->q.qlen; 410 qlen = sch->q.qlen;
397 while (sch->q.qlen >= q->limit-1) 411 while (sch->q.qlen > q->limit)
398 sfq_drop(sch); 412 sfq_drop(sch);
399 qdisc_tree_decrease_qlen(sch, qlen - sch->q.qlen); 413 qdisc_tree_decrease_qlen(sch, qlen - sch->q.qlen);
400 414
401 del_timer(&q->perturb_timer); 415 del_timer(&q->perturb_timer);
402 if (q->perturb_period) { 416 if (q->perturb_period) {
403 q->perturb_timer.expires = jiffies + q->perturb_period; 417 mod_timer(&q->perturb_timer, jiffies + q->perturb_period);
404 add_timer(&q->perturb_timer); 418 get_random_bytes(&q->perturbation, 4);
405 } 419 }
406 sch_tree_unlock(sch); 420 sch_tree_unlock(sch);
407 return 0; 421 return 0;
@@ -423,12 +437,13 @@ static int sfq_init(struct Qdisc *sch, struct rtattr *opt)
423 q->dep[i+SFQ_DEPTH].next = i+SFQ_DEPTH; 437 q->dep[i+SFQ_DEPTH].next = i+SFQ_DEPTH;
424 q->dep[i+SFQ_DEPTH].prev = i+SFQ_DEPTH; 438 q->dep[i+SFQ_DEPTH].prev = i+SFQ_DEPTH;
425 } 439 }
426 q->limit = SFQ_DEPTH; 440 q->limit = SFQ_DEPTH - 1;
427 q->max_depth = 0; 441 q->max_depth = 0;
428 q->tail = SFQ_DEPTH; 442 q->tail = SFQ_DEPTH;
429 if (opt == NULL) { 443 if (opt == NULL) {
430 q->quantum = psched_mtu(sch->dev); 444 q->quantum = psched_mtu(sch->dev);
431 q->perturb_period = 0; 445 q->perturb_period = 0;
446 get_random_bytes(&q->perturbation, 4);
432 } else { 447 } else {
433 int err = sfq_change(sch, opt); 448 int err = sfq_change(sch, opt);
434 if (err) 449 if (err)
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 498edb0cd4..9bad8ba0fe 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -99,7 +99,6 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
99 99
100 /* Initialize the bind addr area. */ 100 /* Initialize the bind addr area. */
101 sctp_bind_addr_init(&asoc->base.bind_addr, ep->base.bind_addr.port); 101 sctp_bind_addr_init(&asoc->base.bind_addr, ep->base.bind_addr.port);
102 rwlock_init(&asoc->base.addr_lock);
103 102
104 asoc->state = SCTP_STATE_CLOSED; 103 asoc->state = SCTP_STATE_CLOSED;
105 104
@@ -727,7 +726,12 @@ void sctp_assoc_control_transport(struct sctp_association *asoc,
727 break; 726 break;
728 727
729 case SCTP_TRANSPORT_DOWN: 728 case SCTP_TRANSPORT_DOWN:
730 transport->state = SCTP_INACTIVE; 729 /* if the transort was never confirmed, do not transition it
730 * to inactive state.
731 */
732 if (transport->state != SCTP_UNCONFIRMED)
733 transport->state = SCTP_INACTIVE;
734
731 spc_state = SCTP_ADDR_UNREACHABLE; 735 spc_state = SCTP_ADDR_UNREACHABLE;
732 break; 736 break;
733 737
@@ -932,8 +936,6 @@ struct sctp_transport *sctp_assoc_is_match(struct sctp_association *asoc,
932{ 936{
933 struct sctp_transport *transport; 937 struct sctp_transport *transport;
934 938
935 sctp_read_lock(&asoc->base.addr_lock);
936
937 if ((htons(asoc->base.bind_addr.port) == laddr->v4.sin_port) && 939 if ((htons(asoc->base.bind_addr.port) == laddr->v4.sin_port) &&
938 (htons(asoc->peer.port) == paddr->v4.sin_port)) { 940 (htons(asoc->peer.port) == paddr->v4.sin_port)) {
939 transport = sctp_assoc_lookup_paddr(asoc, paddr); 941 transport = sctp_assoc_lookup_paddr(asoc, paddr);
@@ -947,7 +949,6 @@ struct sctp_transport *sctp_assoc_is_match(struct sctp_association *asoc,
947 transport = NULL; 949 transport = NULL;
948 950
949out: 951out:
950 sctp_read_unlock(&asoc->base.addr_lock);
951 return transport; 952 return transport;
952} 953}
953 954
@@ -1371,19 +1372,13 @@ int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *asoc,
1371int sctp_assoc_lookup_laddr(struct sctp_association *asoc, 1372int sctp_assoc_lookup_laddr(struct sctp_association *asoc,
1372 const union sctp_addr *laddr) 1373 const union sctp_addr *laddr)
1373{ 1374{
1374 int found; 1375 int found = 0;
1375 1376
1376 sctp_read_lock(&asoc->base.addr_lock);
1377 if ((asoc->base.bind_addr.port == ntohs(laddr->v4.sin_port)) && 1377 if ((asoc->base.bind_addr.port == ntohs(laddr->v4.sin_port)) &&
1378 sctp_bind_addr_match(&asoc->base.bind_addr, laddr, 1378 sctp_bind_addr_match(&asoc->base.bind_addr, laddr,
1379 sctp_sk(asoc->base.sk))) { 1379 sctp_sk(asoc->base.sk)))
1380 found = 1; 1380 found = 1;
1381 goto out;
1382 }
1383 1381
1384 found = 0;
1385out:
1386 sctp_read_unlock(&asoc->base.addr_lock);
1387 return found; 1382 return found;
1388} 1383}
1389 1384
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c
index fdb287a9e2..dfffa94fb9 100644
--- a/net/sctp/bind_addr.c
+++ b/net/sctp/bind_addr.c
@@ -163,9 +163,15 @@ int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new,
163 addr->a.v4.sin_port = htons(bp->port); 163 addr->a.v4.sin_port = htons(bp->port);
164 164
165 addr->use_as_src = use_as_src; 165 addr->use_as_src = use_as_src;
166 addr->valid = 1;
166 167
167 INIT_LIST_HEAD(&addr->list); 168 INIT_LIST_HEAD(&addr->list);
168 list_add_tail(&addr->list, &bp->address_list); 169 INIT_RCU_HEAD(&addr->rcu);
170
171 /* We always hold a socket lock when calling this function,
172 * and that acts as a writer synchronizing lock.
173 */
174 list_add_tail_rcu(&addr->list, &bp->address_list);
169 SCTP_DBG_OBJCNT_INC(addr); 175 SCTP_DBG_OBJCNT_INC(addr);
170 176
171 return 0; 177 return 0;
@@ -174,23 +180,35 @@ int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new,
174/* Delete an address from the bind address list in the SCTP_bind_addr 180/* Delete an address from the bind address list in the SCTP_bind_addr
175 * structure. 181 * structure.
176 */ 182 */
177int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr) 183int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr,
184 void fastcall (*rcu_call)(struct rcu_head *head,
185 void (*func)(struct rcu_head *head)))
178{ 186{
179 struct list_head *pos, *temp; 187 struct sctp_sockaddr_entry *addr, *temp;
180 struct sctp_sockaddr_entry *addr;
181 188
182 list_for_each_safe(pos, temp, &bp->address_list) { 189 /* We hold the socket lock when calling this function,
183 addr = list_entry(pos, struct sctp_sockaddr_entry, list); 190 * and that acts as a writer synchronizing lock.
191 */
192 list_for_each_entry_safe(addr, temp, &bp->address_list, list) {
184 if (sctp_cmp_addr_exact(&addr->a, del_addr)) { 193 if (sctp_cmp_addr_exact(&addr->a, del_addr)) {
185 /* Found the exact match. */ 194 /* Found the exact match. */
186 list_del(pos); 195 addr->valid = 0;
187 kfree(addr); 196 list_del_rcu(&addr->list);
188 SCTP_DBG_OBJCNT_DEC(addr); 197 break;
189
190 return 0;
191 } 198 }
192 } 199 }
193 200
201 /* Call the rcu callback provided in the args. This function is
202 * called by both BH packet processing and user side socket option
203 * processing, but it works on different lists in those 2 contexts.
204 * Each context provides it's own callback, whether call_rcu_bh()
205 * or call_rcu(), to make sure that we wait for an appropriate time.
206 */
207 if (addr && !addr->valid) {
208 rcu_call(&addr->rcu, sctp_local_addr_free);
209 SCTP_DBG_OBJCNT_DEC(addr);
210 }
211
194 return -EINVAL; 212 return -EINVAL;
195} 213}
196 214
@@ -300,15 +318,20 @@ int sctp_bind_addr_match(struct sctp_bind_addr *bp,
300 struct sctp_sock *opt) 318 struct sctp_sock *opt)
301{ 319{
302 struct sctp_sockaddr_entry *laddr; 320 struct sctp_sockaddr_entry *laddr;
303 struct list_head *pos; 321 int match = 0;
304 322
305 list_for_each(pos, &bp->address_list) { 323 rcu_read_lock();
306 laddr = list_entry(pos, struct sctp_sockaddr_entry, list); 324 list_for_each_entry_rcu(laddr, &bp->address_list, list) {
307 if (opt->pf->cmp_addr(&laddr->a, addr, opt)) 325 if (!laddr->valid)
308 return 1; 326 continue;
327 if (opt->pf->cmp_addr(&laddr->a, addr, opt)) {
328 match = 1;
329 break;
330 }
309 } 331 }
332 rcu_read_unlock();
310 333
311 return 0; 334 return match;
312} 335}
313 336
314/* Find the first address in the bind address list that is not present in 337/* Find the first address in the bind address list that is not present in
@@ -323,18 +346,19 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp,
323 union sctp_addr *addr; 346 union sctp_addr *addr;
324 void *addr_buf; 347 void *addr_buf;
325 struct sctp_af *af; 348 struct sctp_af *af;
326 struct list_head *pos;
327 int i; 349 int i;
328 350
329 list_for_each(pos, &bp->address_list) { 351 /* This is only called sctp_send_asconf_del_ip() and we hold
330 laddr = list_entry(pos, struct sctp_sockaddr_entry, list); 352 * the socket lock in that code patch, so that address list
331 353 * can't change.
354 */
355 list_for_each_entry(laddr, &bp->address_list, list) {
332 addr_buf = (union sctp_addr *)addrs; 356 addr_buf = (union sctp_addr *)addrs;
333 for (i = 0; i < addrcnt; i++) { 357 for (i = 0; i < addrcnt; i++) {
334 addr = (union sctp_addr *)addr_buf; 358 addr = (union sctp_addr *)addr_buf;
335 af = sctp_get_af_specific(addr->v4.sin_family); 359 af = sctp_get_af_specific(addr->v4.sin_family);
336 if (!af) 360 if (!af)
337 return NULL; 361 break;
338 362
339 if (opt->pf->cmp_addr(&laddr->a, addr, opt)) 363 if (opt->pf->cmp_addr(&laddr->a, addr, opt))
340 break; 364 break;
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 1404a9e2e7..8f485a0d14 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -92,7 +92,6 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
92 92
93 /* Initialize the bind addr area */ 93 /* Initialize the bind addr area */
94 sctp_bind_addr_init(&ep->base.bind_addr, 0); 94 sctp_bind_addr_init(&ep->base.bind_addr, 0);
95 rwlock_init(&ep->base.addr_lock);
96 95
97 /* Remember who we are attached to. */ 96 /* Remember who we are attached to. */
98 ep->base.sk = sk; 97 ep->base.sk = sk;
@@ -225,21 +224,14 @@ void sctp_endpoint_put(struct sctp_endpoint *ep)
225struct sctp_endpoint *sctp_endpoint_is_match(struct sctp_endpoint *ep, 224struct sctp_endpoint *sctp_endpoint_is_match(struct sctp_endpoint *ep,
226 const union sctp_addr *laddr) 225 const union sctp_addr *laddr)
227{ 226{
228 struct sctp_endpoint *retval; 227 struct sctp_endpoint *retval = NULL;
229 228
230 sctp_read_lock(&ep->base.addr_lock);
231 if (htons(ep->base.bind_addr.port) == laddr->v4.sin_port) { 229 if (htons(ep->base.bind_addr.port) == laddr->v4.sin_port) {
232 if (sctp_bind_addr_match(&ep->base.bind_addr, laddr, 230 if (sctp_bind_addr_match(&ep->base.bind_addr, laddr,
233 sctp_sk(ep->base.sk))) { 231 sctp_sk(ep->base.sk)))
234 retval = ep; 232 retval = ep;
235 goto out;
236 }
237 } 233 }
238 234
239 retval = NULL;
240
241out:
242 sctp_read_unlock(&ep->base.addr_lock);
243 return retval; 235 return retval;
244} 236}
245 237
@@ -261,9 +253,7 @@ static struct sctp_association *__sctp_endpoint_lookup_assoc(
261 list_for_each(pos, &ep->asocs) { 253 list_for_each(pos, &ep->asocs) {
262 asoc = list_entry(pos, struct sctp_association, asocs); 254 asoc = list_entry(pos, struct sctp_association, asocs);
263 if (rport == asoc->peer.port) { 255 if (rport == asoc->peer.port) {
264 sctp_read_lock(&asoc->base.addr_lock);
265 *transport = sctp_assoc_lookup_paddr(asoc, paddr); 256 *transport = sctp_assoc_lookup_paddr(asoc, paddr);
266 sctp_read_unlock(&asoc->base.addr_lock);
267 257
268 if (*transport) 258 if (*transport)
269 return asoc; 259 return asoc;
@@ -295,20 +285,17 @@ struct sctp_association *sctp_endpoint_lookup_assoc(
295int sctp_endpoint_is_peeled_off(struct sctp_endpoint *ep, 285int sctp_endpoint_is_peeled_off(struct sctp_endpoint *ep,
296 const union sctp_addr *paddr) 286 const union sctp_addr *paddr)
297{ 287{
298 struct list_head *pos;
299 struct sctp_sockaddr_entry *addr; 288 struct sctp_sockaddr_entry *addr;
300 struct sctp_bind_addr *bp; 289 struct sctp_bind_addr *bp;
301 290
302 sctp_read_lock(&ep->base.addr_lock);
303 bp = &ep->base.bind_addr; 291 bp = &ep->base.bind_addr;
304 list_for_each(pos, &bp->address_list) { 292 /* This function is called with the socket lock held,
305 addr = list_entry(pos, struct sctp_sockaddr_entry, list); 293 * so the address_list can not change.
306 if (sctp_has_association(&addr->a, paddr)) { 294 */
307 sctp_read_unlock(&ep->base.addr_lock); 295 list_for_each_entry(addr, &bp->address_list, list) {
296 if (sctp_has_association(&addr->a, paddr))
308 return 1; 297 return 1;
309 }
310 } 298 }
311 sctp_read_unlock(&ep->base.addr_lock);
312 299
313 return 0; 300 return 0;
314} 301}
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 47e56017f4..f9a0c9276e 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -622,6 +622,14 @@ static int sctp_rcv_ootb(struct sk_buff *skb)
622 if (SCTP_CID_SHUTDOWN_COMPLETE == ch->type) 622 if (SCTP_CID_SHUTDOWN_COMPLETE == ch->type)
623 goto discard; 623 goto discard;
624 624
625 /* RFC 4460, 2.11.2
626 * This will discard packets with INIT chunk bundled as
627 * subsequent chunks in the packet. When INIT is first,
628 * the normal INIT processing will discard the chunk.
629 */
630 if (SCTP_CID_INIT == ch->type && (void *)ch != skb->data)
631 goto discard;
632
625 /* RFC 8.4, 7) If the packet contains a "Stale cookie" ERROR 633 /* RFC 8.4, 7) If the packet contains a "Stale cookie" ERROR
626 * or a COOKIE ACK the SCTP Packet should be silently 634 * or a COOKIE ACK the SCTP Packet should be silently
627 * discarded. 635 * discarded.
diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c
index 88aa224075..e4ea7fdf36 100644
--- a/net/sctp/inqueue.c
+++ b/net/sctp/inqueue.c
@@ -130,6 +130,14 @@ struct sctp_chunk *sctp_inq_pop(struct sctp_inq *queue)
130 /* Force chunk->skb->data to chunk->chunk_end. */ 130 /* Force chunk->skb->data to chunk->chunk_end. */
131 skb_pull(chunk->skb, 131 skb_pull(chunk->skb,
132 chunk->chunk_end - chunk->skb->data); 132 chunk->chunk_end - chunk->skb->data);
133
134 /* Verify that we have at least chunk headers
135 * worth of buffer left.
136 */
137 if (skb_headlen(chunk->skb) < sizeof(sctp_chunkhdr_t)) {
138 sctp_chunk_free(chunk);
139 chunk = queue->in_progress = NULL;
140 }
133 } 141 }
134 } 142 }
135 143
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index f8aa23dda1..670fd2740b 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -77,13 +77,18 @@
77 77
78#include <asm/uaccess.h> 78#include <asm/uaccess.h>
79 79
80/* Event handler for inet6 address addition/deletion events. */ 80/* Event handler for inet6 address addition/deletion events.
81 * The sctp_local_addr_list needs to be protocted by a spin lock since
82 * multiple notifiers (say IPv4 and IPv6) may be running at the same
83 * time and thus corrupt the list.
84 * The reader side is protected with RCU.
85 */
81static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev, 86static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev,
82 void *ptr) 87 void *ptr)
83{ 88{
84 struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr; 89 struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr;
85 struct sctp_sockaddr_entry *addr; 90 struct sctp_sockaddr_entry *addr = NULL;
86 struct list_head *pos, *temp; 91 struct sctp_sockaddr_entry *temp;
87 92
88 switch (ev) { 93 switch (ev) {
89 case NETDEV_UP: 94 case NETDEV_UP:
@@ -94,19 +99,26 @@ static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev,
94 memcpy(&addr->a.v6.sin6_addr, &ifa->addr, 99 memcpy(&addr->a.v6.sin6_addr, &ifa->addr,
95 sizeof(struct in6_addr)); 100 sizeof(struct in6_addr));
96 addr->a.v6.sin6_scope_id = ifa->idev->dev->ifindex; 101 addr->a.v6.sin6_scope_id = ifa->idev->dev->ifindex;
97 list_add_tail(&addr->list, &sctp_local_addr_list); 102 addr->valid = 1;
103 spin_lock_bh(&sctp_local_addr_lock);
104 list_add_tail_rcu(&addr->list, &sctp_local_addr_list);
105 spin_unlock_bh(&sctp_local_addr_lock);
98 } 106 }
99 break; 107 break;
100 case NETDEV_DOWN: 108 case NETDEV_DOWN:
101 list_for_each_safe(pos, temp, &sctp_local_addr_list) { 109 spin_lock_bh(&sctp_local_addr_lock);
102 addr = list_entry(pos, struct sctp_sockaddr_entry, list); 110 list_for_each_entry_safe(addr, temp,
103 if (ipv6_addr_equal(&addr->a.v6.sin6_addr, &ifa->addr)) { 111 &sctp_local_addr_list, list) {
104 list_del(pos); 112 if (ipv6_addr_equal(&addr->a.v6.sin6_addr,
105 kfree(addr); 113 &ifa->addr)) {
114 addr->valid = 0;
115 list_del_rcu(&addr->list);
106 break; 116 break;
107 } 117 }
108 } 118 }
109 119 spin_unlock_bh(&sctp_local_addr_lock);
120 if (addr && !addr->valid)
121 call_rcu(&addr->rcu, sctp_local_addr_free);
110 break; 122 break;
111 } 123 }
112 124
@@ -290,9 +302,7 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc,
290 union sctp_addr *saddr) 302 union sctp_addr *saddr)
291{ 303{
292 struct sctp_bind_addr *bp; 304 struct sctp_bind_addr *bp;
293 rwlock_t *addr_lock;
294 struct sctp_sockaddr_entry *laddr; 305 struct sctp_sockaddr_entry *laddr;
295 struct list_head *pos;
296 sctp_scope_t scope; 306 sctp_scope_t scope;
297 union sctp_addr *baddr = NULL; 307 union sctp_addr *baddr = NULL;
298 __u8 matchlen = 0; 308 __u8 matchlen = 0;
@@ -312,14 +322,14 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc,
312 scope = sctp_scope(daddr); 322 scope = sctp_scope(daddr);
313 323
314 bp = &asoc->base.bind_addr; 324 bp = &asoc->base.bind_addr;
315 addr_lock = &asoc->base.addr_lock;
316 325
317 /* Go through the bind address list and find the best source address 326 /* Go through the bind address list and find the best source address
318 * that matches the scope of the destination address. 327 * that matches the scope of the destination address.
319 */ 328 */
320 sctp_read_lock(addr_lock); 329 rcu_read_lock();
321 list_for_each(pos, &bp->address_list) { 330 list_for_each_entry_rcu(laddr, &bp->address_list, list) {
322 laddr = list_entry(pos, struct sctp_sockaddr_entry, list); 331 if (!laddr->valid)
332 continue;
323 if ((laddr->use_as_src) && 333 if ((laddr->use_as_src) &&
324 (laddr->a.sa.sa_family == AF_INET6) && 334 (laddr->a.sa.sa_family == AF_INET6) &&
325 (scope <= sctp_scope(&laddr->a))) { 335 (scope <= sctp_scope(&laddr->a))) {
@@ -341,7 +351,7 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc,
341 __FUNCTION__, asoc, NIP6(daddr->v6.sin6_addr)); 351 __FUNCTION__, asoc, NIP6(daddr->v6.sin6_addr));
342 } 352 }
343 353
344 sctp_read_unlock(addr_lock); 354 rcu_read_unlock();
345} 355}
346 356
347/* Make a copy of all potential local addresses. */ 357/* Make a copy of all potential local addresses. */
@@ -367,7 +377,9 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist,
367 addr->a.v6.sin6_port = 0; 377 addr->a.v6.sin6_port = 0;
368 addr->a.v6.sin6_addr = ifp->addr; 378 addr->a.v6.sin6_addr = ifp->addr;
369 addr->a.v6.sin6_scope_id = dev->ifindex; 379 addr->a.v6.sin6_scope_id = dev->ifindex;
380 addr->valid = 1;
370 INIT_LIST_HEAD(&addr->list); 381 INIT_LIST_HEAD(&addr->list);
382 INIT_RCU_HEAD(&addr->rcu);
371 list_add_tail(&addr->list, addrlist); 383 list_add_tail(&addr->list, addrlist);
372 } 384 }
373 } 385 }
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 992f361084..28f4fe77ce 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -421,6 +421,13 @@ void sctp_retransmit_mark(struct sctp_outq *q,
421 */ 421 */
422 if ((fast_retransmit && (chunk->fast_retransmit > 0)) || 422 if ((fast_retransmit && (chunk->fast_retransmit > 0)) ||
423 (!fast_retransmit && !chunk->tsn_gap_acked)) { 423 (!fast_retransmit && !chunk->tsn_gap_acked)) {
424 /* If this chunk was sent less then 1 rto ago, do not
425 * retransmit this chunk, but give the peer time
426 * to acknowlege it.
427 */
428 if ((jiffies - chunk->sent_at) < transport->rto)
429 continue;
430
424 /* RFC 2960 6.2.1 Processing a Received SACK 431 /* RFC 2960 6.2.1 Processing a Received SACK
425 * 432 *
426 * C) Any time a DATA chunk is marked for 433 * C) Any time a DATA chunk is marked for
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index e98579b788..3d036cdfae 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -153,6 +153,9 @@ static void sctp_v4_copy_addrlist(struct list_head *addrlist,
153 addr->a.v4.sin_family = AF_INET; 153 addr->a.v4.sin_family = AF_INET;
154 addr->a.v4.sin_port = 0; 154 addr->a.v4.sin_port = 0;
155 addr->a.v4.sin_addr.s_addr = ifa->ifa_local; 155 addr->a.v4.sin_addr.s_addr = ifa->ifa_local;
156 addr->valid = 1;
157 INIT_LIST_HEAD(&addr->list);
158 INIT_RCU_HEAD(&addr->rcu);
156 list_add_tail(&addr->list, addrlist); 159 list_add_tail(&addr->list, addrlist);
157 } 160 }
158 } 161 }
@@ -192,16 +195,24 @@ static void sctp_free_local_addr_list(void)
192 } 195 }
193} 196}
194 197
198void sctp_local_addr_free(struct rcu_head *head)
199{
200 struct sctp_sockaddr_entry *e = container_of(head,
201 struct sctp_sockaddr_entry, rcu);
202 kfree(e);
203}
204
195/* Copy the local addresses which are valid for 'scope' into 'bp'. */ 205/* Copy the local addresses which are valid for 'scope' into 'bp'. */
196int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope, 206int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope,
197 gfp_t gfp, int copy_flags) 207 gfp_t gfp, int copy_flags)
198{ 208{
199 struct sctp_sockaddr_entry *addr; 209 struct sctp_sockaddr_entry *addr;
200 int error = 0; 210 int error = 0;
201 struct list_head *pos, *temp;
202 211
203 list_for_each_safe(pos, temp, &sctp_local_addr_list) { 212 rcu_read_lock();
204 addr = list_entry(pos, struct sctp_sockaddr_entry, list); 213 list_for_each_entry_rcu(addr, &sctp_local_addr_list, list) {
214 if (!addr->valid)
215 continue;
205 if (sctp_in_scope(&addr->a, scope)) { 216 if (sctp_in_scope(&addr->a, scope)) {
206 /* Now that the address is in scope, check to see if 217 /* Now that the address is in scope, check to see if
207 * the address type is really supported by the local 218 * the address type is really supported by the local
@@ -213,7 +224,7 @@ int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope,
213 (copy_flags & SCTP_ADDR6_ALLOWED) && 224 (copy_flags & SCTP_ADDR6_ALLOWED) &&
214 (copy_flags & SCTP_ADDR6_PEERSUPP)))) { 225 (copy_flags & SCTP_ADDR6_PEERSUPP)))) {
215 error = sctp_add_bind_addr(bp, &addr->a, 1, 226 error = sctp_add_bind_addr(bp, &addr->a, 1,
216 GFP_ATOMIC); 227 GFP_ATOMIC);
217 if (error) 228 if (error)
218 goto end_copy; 229 goto end_copy;
219 } 230 }
@@ -221,6 +232,7 @@ int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope,
221 } 232 }
222 233
223end_copy: 234end_copy:
235 rcu_read_unlock();
224 return error; 236 return error;
225} 237}
226 238
@@ -416,9 +428,7 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
416 struct rtable *rt; 428 struct rtable *rt;
417 struct flowi fl; 429 struct flowi fl;
418 struct sctp_bind_addr *bp; 430 struct sctp_bind_addr *bp;
419 rwlock_t *addr_lock;
420 struct sctp_sockaddr_entry *laddr; 431 struct sctp_sockaddr_entry *laddr;
421 struct list_head *pos;
422 struct dst_entry *dst = NULL; 432 struct dst_entry *dst = NULL;
423 union sctp_addr dst_saddr; 433 union sctp_addr dst_saddr;
424 434
@@ -447,23 +457,20 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
447 goto out; 457 goto out;
448 458
449 bp = &asoc->base.bind_addr; 459 bp = &asoc->base.bind_addr;
450 addr_lock = &asoc->base.addr_lock;
451 460
452 if (dst) { 461 if (dst) {
453 /* Walk through the bind address list and look for a bind 462 /* Walk through the bind address list and look for a bind
454 * address that matches the source address of the returned dst. 463 * address that matches the source address of the returned dst.
455 */ 464 */
456 sctp_read_lock(addr_lock); 465 rcu_read_lock();
457 list_for_each(pos, &bp->address_list) { 466 list_for_each_entry_rcu(laddr, &bp->address_list, list) {
458 laddr = list_entry(pos, struct sctp_sockaddr_entry, 467 if (!laddr->valid || !laddr->use_as_src)
459 list);
460 if (!laddr->use_as_src)
461 continue; 468 continue;
462 sctp_v4_dst_saddr(&dst_saddr, dst, htons(bp->port)); 469 sctp_v4_dst_saddr(&dst_saddr, dst, htons(bp->port));
463 if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a)) 470 if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a))
464 goto out_unlock; 471 goto out_unlock;
465 } 472 }
466 sctp_read_unlock(addr_lock); 473 rcu_read_unlock();
467 474
468 /* None of the bound addresses match the source address of the 475 /* None of the bound addresses match the source address of the
469 * dst. So release it. 476 * dst. So release it.
@@ -475,10 +482,10 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
475 /* Walk through the bind address list and try to get a dst that 482 /* Walk through the bind address list and try to get a dst that
476 * matches a bind address as the source address. 483 * matches a bind address as the source address.
477 */ 484 */
478 sctp_read_lock(addr_lock); 485 rcu_read_lock();
479 list_for_each(pos, &bp->address_list) { 486 list_for_each_entry_rcu(laddr, &bp->address_list, list) {
480 laddr = list_entry(pos, struct sctp_sockaddr_entry, list); 487 if (!laddr->valid)
481 488 continue;
482 if ((laddr->use_as_src) && 489 if ((laddr->use_as_src) &&
483 (AF_INET == laddr->a.sa.sa_family)) { 490 (AF_INET == laddr->a.sa.sa_family)) {
484 fl.fl4_src = laddr->a.v4.sin_addr.s_addr; 491 fl.fl4_src = laddr->a.v4.sin_addr.s_addr;
@@ -490,7 +497,7 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
490 } 497 }
491 498
492out_unlock: 499out_unlock:
493 sctp_read_unlock(addr_lock); 500 rcu_read_unlock();
494out: 501out:
495 if (dst) 502 if (dst)
496 SCTP_DEBUG_PRINTK("rt_dst:%u.%u.%u.%u, rt_src:%u.%u.%u.%u\n", 503 SCTP_DEBUG_PRINTK("rt_dst:%u.%u.%u.%u, rt_src:%u.%u.%u.%u\n",
@@ -600,13 +607,18 @@ static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr)
600 seq_printf(seq, "%d.%d.%d.%d ", NIPQUAD(addr->v4.sin_addr)); 607 seq_printf(seq, "%d.%d.%d.%d ", NIPQUAD(addr->v4.sin_addr));
601} 608}
602 609
603/* Event handler for inet address addition/deletion events. */ 610/* Event handler for inet address addition/deletion events.
611 * The sctp_local_addr_list needs to be protocted by a spin lock since
612 * multiple notifiers (say IPv4 and IPv6) may be running at the same
613 * time and thus corrupt the list.
614 * The reader side is protected with RCU.
615 */
604static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, 616static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
605 void *ptr) 617 void *ptr)
606{ 618{
607 struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; 619 struct in_ifaddr *ifa = (struct in_ifaddr *)ptr;
608 struct sctp_sockaddr_entry *addr; 620 struct sctp_sockaddr_entry *addr = NULL;
609 struct list_head *pos, *temp; 621 struct sctp_sockaddr_entry *temp;
610 622
611 switch (ev) { 623 switch (ev) {
612 case NETDEV_UP: 624 case NETDEV_UP:
@@ -615,19 +627,25 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
615 addr->a.v4.sin_family = AF_INET; 627 addr->a.v4.sin_family = AF_INET;
616 addr->a.v4.sin_port = 0; 628 addr->a.v4.sin_port = 0;
617 addr->a.v4.sin_addr.s_addr = ifa->ifa_local; 629 addr->a.v4.sin_addr.s_addr = ifa->ifa_local;
618 list_add_tail(&addr->list, &sctp_local_addr_list); 630 addr->valid = 1;
631 spin_lock_bh(&sctp_local_addr_lock);
632 list_add_tail_rcu(&addr->list, &sctp_local_addr_list);
633 spin_unlock_bh(&sctp_local_addr_lock);
619 } 634 }
620 break; 635 break;
621 case NETDEV_DOWN: 636 case NETDEV_DOWN:
622 list_for_each_safe(pos, temp, &sctp_local_addr_list) { 637 spin_lock_bh(&sctp_local_addr_lock);
623 addr = list_entry(pos, struct sctp_sockaddr_entry, list); 638 list_for_each_entry_safe(addr, temp,
639 &sctp_local_addr_list, list) {
624 if (addr->a.v4.sin_addr.s_addr == ifa->ifa_local) { 640 if (addr->a.v4.sin_addr.s_addr == ifa->ifa_local) {
625 list_del(pos); 641 addr->valid = 0;
626 kfree(addr); 642 list_del_rcu(&addr->list);
627 break; 643 break;
628 } 644 }
629 } 645 }
630 646 spin_unlock_bh(&sctp_local_addr_lock);
647 if (addr && !addr->valid)
648 call_rcu(&addr->rcu, sctp_local_addr_free);
631 break; 649 break;
632 } 650 }
633 651
@@ -1160,6 +1178,7 @@ SCTP_STATIC __init int sctp_init(void)
1160 1178
1161 /* Initialize the local address list. */ 1179 /* Initialize the local address list. */
1162 INIT_LIST_HEAD(&sctp_local_addr_list); 1180 INIT_LIST_HEAD(&sctp_local_addr_list);
1181 spin_lock_init(&sctp_local_addr_lock);
1163 sctp_get_local_addr_list(); 1182 sctp_get_local_addr_list();
1164 1183
1165 /* Register notifier for inet address additions/deletions. */ 1184 /* Register notifier for inet address additions/deletions. */
@@ -1227,6 +1246,9 @@ SCTP_STATIC __exit void sctp_exit(void)
1227 sctp_v6_del_protocol(); 1246 sctp_v6_del_protocol();
1228 inet_del_protocol(&sctp_protocol, IPPROTO_SCTP); 1247 inet_del_protocol(&sctp_protocol, IPPROTO_SCTP);
1229 1248
1249 /* Unregister notifier for inet address additions/deletions. */
1250 unregister_inetaddr_notifier(&sctp_inetaddr_notifier);
1251
1230 /* Free the local address list. */ 1252 /* Free the local address list. */
1231 sctp_free_local_addr_list(); 1253 sctp_free_local_addr_list();
1232 1254
@@ -1240,9 +1262,6 @@ SCTP_STATIC __exit void sctp_exit(void)
1240 inet_unregister_protosw(&sctp_stream_protosw); 1262 inet_unregister_protosw(&sctp_stream_protosw);
1241 inet_unregister_protosw(&sctp_seqpacket_protosw); 1263 inet_unregister_protosw(&sctp_seqpacket_protosw);
1242 1264
1243 /* Unregister notifier for inet address additions/deletions. */
1244 unregister_inetaddr_notifier(&sctp_inetaddr_notifier);
1245
1246 sctp_sysctl_unregister(); 1265 sctp_sysctl_unregister();
1247 list_del(&sctp_ipv4_specific.list); 1266 list_del(&sctp_ipv4_specific.list);
1248 1267
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 51c4d7fef1..23ae37ec87 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -110,7 +110,7 @@ static const struct sctp_paramhdr prsctp_param = {
110 * abort chunk. 110 * abort chunk.
111 */ 111 */
112void sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code, 112void sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code,
113 const void *payload, size_t paylen) 113 size_t paylen)
114{ 114{
115 sctp_errhdr_t err; 115 sctp_errhdr_t err;
116 __u16 len; 116 __u16 len;
@@ -120,7 +120,6 @@ void sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code,
120 len = sizeof(sctp_errhdr_t) + paylen; 120 len = sizeof(sctp_errhdr_t) + paylen;
121 err.length = htons(len); 121 err.length = htons(len);
122 chunk->subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), &err); 122 chunk->subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), &err);
123 sctp_addto_chunk(chunk, paylen, payload);
124} 123}
125 124
126/* 3.3.2 Initiation (INIT) (1) 125/* 3.3.2 Initiation (INIT) (1)
@@ -780,8 +779,8 @@ struct sctp_chunk *sctp_make_abort_no_data(
780 779
781 /* Put the tsn back into network byte order. */ 780 /* Put the tsn back into network byte order. */
782 payload = htonl(tsn); 781 payload = htonl(tsn);
783 sctp_init_cause(retval, SCTP_ERROR_NO_DATA, (const void *)&payload, 782 sctp_init_cause(retval, SCTP_ERROR_NO_DATA, sizeof(payload));
784 sizeof(payload)); 783 sctp_addto_chunk(retval, sizeof(payload), (const void *)&payload);
785 784
786 /* RFC 2960 6.4 Multi-homed SCTP Endpoints 785 /* RFC 2960 6.4 Multi-homed SCTP Endpoints
787 * 786 *
@@ -823,7 +822,8 @@ struct sctp_chunk *sctp_make_abort_user(const struct sctp_association *asoc,
823 goto err_copy; 822 goto err_copy;
824 } 823 }
825 824
826 sctp_init_cause(retval, SCTP_ERROR_USER_ABORT, payload, paylen); 825 sctp_init_cause(retval, SCTP_ERROR_USER_ABORT, paylen);
826 sctp_addto_chunk(retval, paylen, payload);
827 827
828 if (paylen) 828 if (paylen)
829 kfree(payload); 829 kfree(payload);
@@ -850,15 +850,17 @@ struct sctp_chunk *sctp_make_abort_violation(
850 struct sctp_paramhdr phdr; 850 struct sctp_paramhdr phdr;
851 851
852 retval = sctp_make_abort(asoc, chunk, sizeof(sctp_errhdr_t) + paylen 852 retval = sctp_make_abort(asoc, chunk, sizeof(sctp_errhdr_t) + paylen
853 + sizeof(sctp_chunkhdr_t)); 853 + sizeof(sctp_paramhdr_t));
854 if (!retval) 854 if (!retval)
855 goto end; 855 goto end;
856 856
857 sctp_init_cause(retval, SCTP_ERROR_PROTO_VIOLATION, payload, paylen); 857 sctp_init_cause(retval, SCTP_ERROR_PROTO_VIOLATION, paylen
858 + sizeof(sctp_paramhdr_t));
858 859
859 phdr.type = htons(chunk->chunk_hdr->type); 860 phdr.type = htons(chunk->chunk_hdr->type);
860 phdr.length = chunk->chunk_hdr->length; 861 phdr.length = chunk->chunk_hdr->length;
861 sctp_addto_chunk(retval, sizeof(sctp_paramhdr_t), &phdr); 862 sctp_addto_chunk(retval, paylen, payload);
863 sctp_addto_param(retval, sizeof(sctp_paramhdr_t), &phdr);
862 864
863end: 865end:
864 return retval; 866 return retval;
@@ -955,7 +957,8 @@ struct sctp_chunk *sctp_make_op_error(const struct sctp_association *asoc,
955 if (!retval) 957 if (!retval)
956 goto nodata; 958 goto nodata;
957 959
958 sctp_init_cause(retval, cause_code, payload, paylen); 960 sctp_init_cause(retval, cause_code, paylen);
961 sctp_addto_chunk(retval, paylen, payload);
959 962
960nodata: 963nodata:
961 return retval; 964 return retval;
@@ -1128,7 +1131,7 @@ void *sctp_addto_chunk(struct sctp_chunk *chunk, int len, const void *data)
1128 void *target; 1131 void *target;
1129 void *padding; 1132 void *padding;
1130 int chunklen = ntohs(chunk->chunk_hdr->length); 1133 int chunklen = ntohs(chunk->chunk_hdr->length);
1131 int padlen = chunklen % 4; 1134 int padlen = WORD_ROUND(chunklen) - chunklen;
1132 1135
1133 padding = skb_put(chunk->skb, padlen); 1136 padding = skb_put(chunk->skb, padlen);
1134 target = skb_put(chunk->skb, len); 1137 target = skb_put(chunk->skb, len);
@@ -1143,6 +1146,25 @@ void *sctp_addto_chunk(struct sctp_chunk *chunk, int len, const void *data)
1143 return target; 1146 return target;
1144} 1147}
1145 1148
1149/* Append bytes to the end of a parameter. Will panic if chunk is not big
1150 * enough.
1151 */
1152void *sctp_addto_param(struct sctp_chunk *chunk, int len, const void *data)
1153{
1154 void *target;
1155 int chunklen = ntohs(chunk->chunk_hdr->length);
1156
1157 target = skb_put(chunk->skb, len);
1158
1159 memcpy(target, data, len);
1160
1161 /* Adjust the chunk length field. */
1162 chunk->chunk_hdr->length = htons(chunklen + len);
1163 chunk->chunk_end = skb_tail_pointer(chunk->skb);
1164
1165 return target;
1166}
1167
1146/* Append bytes from user space to the end of a chunk. Will panic if 1168/* Append bytes from user space to the end of a chunk. Will panic if
1147 * chunk is not big enough. 1169 * chunk is not big enough.
1148 * Returns a kernel err value. 1170 * Returns a kernel err value.
@@ -1174,25 +1196,36 @@ out:
1174 */ 1196 */
1175void sctp_chunk_assign_ssn(struct sctp_chunk *chunk) 1197void sctp_chunk_assign_ssn(struct sctp_chunk *chunk)
1176{ 1198{
1199 struct sctp_datamsg *msg;
1200 struct sctp_chunk *lchunk;
1201 struct sctp_stream *stream;
1177 __u16 ssn; 1202 __u16 ssn;
1178 __u16 sid; 1203 __u16 sid;
1179 1204
1180 if (chunk->has_ssn) 1205 if (chunk->has_ssn)
1181 return; 1206 return;
1182 1207
1183 /* This is the last possible instant to assign a SSN. */ 1208 /* All fragments will be on the same stream */
1184 if (chunk->chunk_hdr->flags & SCTP_DATA_UNORDERED) { 1209 sid = ntohs(chunk->subh.data_hdr->stream);
1185 ssn = 0; 1210 stream = &chunk->asoc->ssnmap->out;
1186 } else { 1211
1187 sid = ntohs(chunk->subh.data_hdr->stream); 1212 /* Now assign the sequence number to the entire message.
1188 if (chunk->chunk_hdr->flags & SCTP_DATA_LAST_FRAG) 1213 * All fragments must have the same stream sequence number.
1189 ssn = sctp_ssn_next(&chunk->asoc->ssnmap->out, sid); 1214 */
1190 else 1215 msg = chunk->msg;
1191 ssn = sctp_ssn_peek(&chunk->asoc->ssnmap->out, sid); 1216 list_for_each_entry(lchunk, &msg->chunks, frag_list) {
1192 } 1217 if (lchunk->chunk_hdr->flags & SCTP_DATA_UNORDERED) {
1218 ssn = 0;
1219 } else {
1220 if (lchunk->chunk_hdr->flags & SCTP_DATA_LAST_FRAG)
1221 ssn = sctp_ssn_next(stream, sid);
1222 else
1223 ssn = sctp_ssn_peek(stream, sid);
1224 }
1193 1225
1194 chunk->subh.data_hdr->ssn = htons(ssn); 1226 lchunk->subh.data_hdr->ssn = htons(ssn);
1195 chunk->has_ssn = 1; 1227 lchunk->has_ssn = 1;
1228 }
1196} 1229}
1197 1230
1198/* Helper function to assign a TSN if needed. This assumes that both 1231/* Helper function to assign a TSN if needed. This assumes that both
@@ -1466,7 +1499,8 @@ no_hmac:
1466 __be32 n = htonl(usecs); 1499 __be32 n = htonl(usecs);
1467 1500
1468 sctp_init_cause(*errp, SCTP_ERROR_STALE_COOKIE, 1501 sctp_init_cause(*errp, SCTP_ERROR_STALE_COOKIE,
1469 &n, sizeof(n)); 1502 sizeof(n));
1503 sctp_addto_chunk(*errp, sizeof(n), &n);
1470 *error = -SCTP_IERROR_STALE_COOKIE; 1504 *error = -SCTP_IERROR_STALE_COOKIE;
1471 } else 1505 } else
1472 *error = -SCTP_IERROR_NOMEM; 1506 *error = -SCTP_IERROR_NOMEM;
@@ -1497,7 +1531,7 @@ no_hmac:
1497 /* Also, add the destination address. */ 1531 /* Also, add the destination address. */
1498 if (list_empty(&retval->base.bind_addr.address_list)) { 1532 if (list_empty(&retval->base.bind_addr.address_list)) {
1499 sctp_add_bind_addr(&retval->base.bind_addr, &chunk->dest, 1, 1533 sctp_add_bind_addr(&retval->base.bind_addr, &chunk->dest, 1,
1500 GFP_ATOMIC); 1534 GFP_ATOMIC);
1501 } 1535 }
1502 1536
1503 retval->next_tsn = retval->c.initial_tsn; 1537 retval->next_tsn = retval->c.initial_tsn;
@@ -1556,7 +1590,8 @@ static int sctp_process_missing_param(const struct sctp_association *asoc,
1556 report.num_missing = htonl(1); 1590 report.num_missing = htonl(1);
1557 report.type = paramtype; 1591 report.type = paramtype;
1558 sctp_init_cause(*errp, SCTP_ERROR_MISS_PARAM, 1592 sctp_init_cause(*errp, SCTP_ERROR_MISS_PARAM,
1559 &report, sizeof(report)); 1593 sizeof(report));
1594 sctp_addto_chunk(*errp, sizeof(report), &report);
1560 } 1595 }
1561 1596
1562 /* Stop processing this chunk. */ 1597 /* Stop processing this chunk. */
@@ -1574,7 +1609,7 @@ static int sctp_process_inv_mandatory(const struct sctp_association *asoc,
1574 *errp = sctp_make_op_error_space(asoc, chunk, 0); 1609 *errp = sctp_make_op_error_space(asoc, chunk, 0);
1575 1610
1576 if (*errp) 1611 if (*errp)
1577 sctp_init_cause(*errp, SCTP_ERROR_INV_PARAM, NULL, 0); 1612 sctp_init_cause(*errp, SCTP_ERROR_INV_PARAM, 0);
1578 1613
1579 /* Stop processing this chunk. */ 1614 /* Stop processing this chunk. */
1580 return 0; 1615 return 0;
@@ -1595,9 +1630,10 @@ static int sctp_process_inv_paramlength(const struct sctp_association *asoc,
1595 *errp = sctp_make_op_error_space(asoc, chunk, payload_len); 1630 *errp = sctp_make_op_error_space(asoc, chunk, payload_len);
1596 1631
1597 if (*errp) { 1632 if (*errp) {
1598 sctp_init_cause(*errp, SCTP_ERROR_PROTO_VIOLATION, error, 1633 sctp_init_cause(*errp, SCTP_ERROR_PROTO_VIOLATION,
1599 sizeof(error)); 1634 sizeof(error) + sizeof(sctp_paramhdr_t));
1600 sctp_addto_chunk(*errp, sizeof(sctp_paramhdr_t), param); 1635 sctp_addto_chunk(*errp, sizeof(error), error);
1636 sctp_addto_param(*errp, sizeof(sctp_paramhdr_t), param);
1601 } 1637 }
1602 1638
1603 return 0; 1639 return 0;
@@ -1618,9 +1654,10 @@ static int sctp_process_hn_param(const struct sctp_association *asoc,
1618 if (!*errp) 1654 if (!*errp)
1619 *errp = sctp_make_op_error_space(asoc, chunk, len); 1655 *errp = sctp_make_op_error_space(asoc, chunk, len);
1620 1656
1621 if (*errp) 1657 if (*errp) {
1622 sctp_init_cause(*errp, SCTP_ERROR_DNS_FAILED, 1658 sctp_init_cause(*errp, SCTP_ERROR_DNS_FAILED, len);
1623 param.v, len); 1659 sctp_addto_chunk(*errp, len, param.v);
1660 }
1624 1661
1625 /* Stop processing this chunk. */ 1662 /* Stop processing this chunk. */
1626 return 0; 1663 return 0;
@@ -1672,10 +1709,13 @@ static int sctp_process_unk_param(const struct sctp_association *asoc,
1672 *errp = sctp_make_op_error_space(asoc, chunk, 1709 *errp = sctp_make_op_error_space(asoc, chunk,
1673 ntohs(chunk->chunk_hdr->length)); 1710 ntohs(chunk->chunk_hdr->length));
1674 1711
1675 if (*errp) 1712 if (*errp) {
1676 sctp_init_cause(*errp, SCTP_ERROR_UNKNOWN_PARAM, 1713 sctp_init_cause(*errp, SCTP_ERROR_UNKNOWN_PARAM,
1677 param.v,
1678 WORD_ROUND(ntohs(param.p->length))); 1714 WORD_ROUND(ntohs(param.p->length)));
1715 sctp_addto_chunk(*errp,
1716 WORD_ROUND(ntohs(param.p->length)),
1717 param.v);
1718 }
1679 1719
1680 break; 1720 break;
1681 case SCTP_PARAM_ACTION_SKIP: 1721 case SCTP_PARAM_ACTION_SKIP:
@@ -1690,8 +1730,10 @@ static int sctp_process_unk_param(const struct sctp_association *asoc,
1690 1730
1691 if (*errp) { 1731 if (*errp) {
1692 sctp_init_cause(*errp, SCTP_ERROR_UNKNOWN_PARAM, 1732 sctp_init_cause(*errp, SCTP_ERROR_UNKNOWN_PARAM,
1693 param.v,
1694 WORD_ROUND(ntohs(param.p->length))); 1733 WORD_ROUND(ntohs(param.p->length)));
1734 sctp_addto_chunk(*errp,
1735 WORD_ROUND(ntohs(param.p->length)),
1736 param.v);
1695 } else { 1737 } else {
1696 /* If there is no memory for generating the ERROR 1738 /* If there is no memory for generating the ERROR
1697 * report as specified, an ABORT will be triggered 1739 * report as specified, an ABORT will be triggered
@@ -1791,7 +1833,7 @@ int sctp_verify_init(const struct sctp_association *asoc,
1791 * VIOLATION error. We build the ERROR chunk here and let the normal 1833 * VIOLATION error. We build the ERROR chunk here and let the normal
1792 * error handling code build and send the packet. 1834 * error handling code build and send the packet.
1793 */ 1835 */
1794 if (param.v < (void*)chunk->chunk_end - sizeof(sctp_paramhdr_t)) { 1836 if (param.v != (void*)chunk->chunk_end) {
1795 sctp_process_inv_paramlength(asoc, param.p, chunk, errp); 1837 sctp_process_inv_paramlength(asoc, param.p, chunk, errp);
1796 return 0; 1838 return 0;
1797 } 1839 }
@@ -2457,6 +2499,52 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc,
2457 return SCTP_ERROR_NO_ERROR; 2499 return SCTP_ERROR_NO_ERROR;
2458} 2500}
2459 2501
2502/* Verify the ASCONF packet before we process it. */
2503int sctp_verify_asconf(const struct sctp_association *asoc,
2504 struct sctp_paramhdr *param_hdr, void *chunk_end,
2505 struct sctp_paramhdr **errp) {
2506 sctp_addip_param_t *asconf_param;
2507 union sctp_params param;
2508 int length, plen;
2509
2510 param.v = (sctp_paramhdr_t *) param_hdr;
2511 while (param.v <= chunk_end - sizeof(sctp_paramhdr_t)) {
2512 length = ntohs(param.p->length);
2513 *errp = param.p;
2514
2515 if (param.v > chunk_end - length ||
2516 length < sizeof(sctp_paramhdr_t))
2517 return 0;
2518
2519 switch (param.p->type) {
2520 case SCTP_PARAM_ADD_IP:
2521 case SCTP_PARAM_DEL_IP:
2522 case SCTP_PARAM_SET_PRIMARY:
2523 asconf_param = (sctp_addip_param_t *)param.v;
2524 plen = ntohs(asconf_param->param_hdr.length);
2525 if (plen < sizeof(sctp_addip_param_t) +
2526 sizeof(sctp_paramhdr_t))
2527 return 0;
2528 break;
2529 case SCTP_PARAM_SUCCESS_REPORT:
2530 case SCTP_PARAM_ADAPTATION_LAYER_IND:
2531 if (length != sizeof(sctp_addip_param_t))
2532 return 0;
2533
2534 break;
2535 default:
2536 break;
2537 }
2538
2539 param.v += WORD_ROUND(length);
2540 }
2541
2542 if (param.v != chunk_end)
2543 return 0;
2544
2545 return 1;
2546}
2547
2460/* Process an incoming ASCONF chunk with the next expected serial no. and 2548/* Process an incoming ASCONF chunk with the next expected serial no. and
2461 * return an ASCONF_ACK chunk to be sent in response. 2549 * return an ASCONF_ACK chunk to be sent in response.
2462 */ 2550 */
@@ -2571,22 +2659,16 @@ static int sctp_asconf_param_success(struct sctp_association *asoc,
2571 2659
2572 switch (asconf_param->param_hdr.type) { 2660 switch (asconf_param->param_hdr.type) {
2573 case SCTP_PARAM_ADD_IP: 2661 case SCTP_PARAM_ADD_IP:
2574 sctp_local_bh_disable(); 2662 /* This is always done in BH context with a socket lock
2575 sctp_write_lock(&asoc->base.addr_lock); 2663 * held, so the list can not change.
2576 list_for_each(pos, &bp->address_list) { 2664 */
2577 saddr = list_entry(pos, struct sctp_sockaddr_entry, list); 2665 list_for_each_entry(saddr, &bp->address_list, list) {
2578 if (sctp_cmp_addr_exact(&saddr->a, &addr)) 2666 if (sctp_cmp_addr_exact(&saddr->a, &addr))
2579 saddr->use_as_src = 1; 2667 saddr->use_as_src = 1;
2580 } 2668 }
2581 sctp_write_unlock(&asoc->base.addr_lock);
2582 sctp_local_bh_enable();
2583 break; 2669 break;
2584 case SCTP_PARAM_DEL_IP: 2670 case SCTP_PARAM_DEL_IP:
2585 sctp_local_bh_disable(); 2671 retval = sctp_del_bind_addr(bp, &addr, call_rcu_bh);
2586 sctp_write_lock(&asoc->base.addr_lock);
2587 retval = sctp_del_bind_addr(bp, &addr);
2588 sctp_write_unlock(&asoc->base.addr_lock);
2589 sctp_local_bh_enable();
2590 list_for_each(pos, &asoc->peer.transport_addr_list) { 2672 list_for_each(pos, &asoc->peer.transport_addr_list) {
2591 transport = list_entry(pos, struct sctp_transport, 2673 transport = list_entry(pos, struct sctp_transport,
2592 transports); 2674 transports);
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index d9fad4f6ff..8d78900834 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -1013,8 +1013,9 @@ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype,
1013 break; 1013 break;
1014 1014
1015 case SCTP_DISPOSITION_VIOLATION: 1015 case SCTP_DISPOSITION_VIOLATION:
1016 printk(KERN_ERR "sctp protocol violation state %d " 1016 if (net_ratelimit())
1017 "chunkid %d\n", state, subtype.chunk); 1017 printk(KERN_ERR "sctp protocol violation state %d "
1018 "chunkid %d\n", state, subtype.chunk);
1018 break; 1019 break;
1019 1020
1020 case SCTP_DISPOSITION_NOT_IMPL: 1021 case SCTP_DISPOSITION_NOT_IMPL:
@@ -1130,6 +1131,9 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
1130 /* Move the Cumulattive TSN Ack ahead. */ 1131 /* Move the Cumulattive TSN Ack ahead. */
1131 sctp_tsnmap_skip(&asoc->peer.tsn_map, cmd->obj.u32); 1132 sctp_tsnmap_skip(&asoc->peer.tsn_map, cmd->obj.u32);
1132 1133
1134 /* purge the fragmentation queue */
1135 sctp_ulpq_reasm_flushtsn(&asoc->ulpq, cmd->obj.u32);
1136
1133 /* Abort any in progress partial delivery. */ 1137 /* Abort any in progress partial delivery. */
1134 sctp_ulpq_abort_pd(&asoc->ulpq, GFP_ATOMIC); 1138 sctp_ulpq_abort_pd(&asoc->ulpq, GFP_ATOMIC);
1135 break; 1139 break;
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 71cad56dd7..a583d67cab 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -90,6 +90,11 @@ static sctp_disposition_t sctp_sf_shut_8_4_5(const struct sctp_endpoint *ep,
90 const sctp_subtype_t type, 90 const sctp_subtype_t type,
91 void *arg, 91 void *arg,
92 sctp_cmd_seq_t *commands); 92 sctp_cmd_seq_t *commands);
93static sctp_disposition_t sctp_sf_tabort_8_4_8(const struct sctp_endpoint *ep,
94 const struct sctp_association *asoc,
95 const sctp_subtype_t type,
96 void *arg,
97 sctp_cmd_seq_t *commands);
93static struct sctp_sackhdr *sctp_sm_pull_sack(struct sctp_chunk *chunk); 98static struct sctp_sackhdr *sctp_sm_pull_sack(struct sctp_chunk *chunk);
94 99
95static sctp_disposition_t sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands, 100static sctp_disposition_t sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands,
@@ -98,6 +103,7 @@ static sctp_disposition_t sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands,
98 struct sctp_transport *transport); 103 struct sctp_transport *transport);
99 104
100static sctp_disposition_t sctp_sf_abort_violation( 105static sctp_disposition_t sctp_sf_abort_violation(
106 const struct sctp_endpoint *ep,
101 const struct sctp_association *asoc, 107 const struct sctp_association *asoc,
102 void *arg, 108 void *arg,
103 sctp_cmd_seq_t *commands, 109 sctp_cmd_seq_t *commands,
@@ -111,6 +117,13 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
111 void *arg, 117 void *arg,
112 sctp_cmd_seq_t *commands); 118 sctp_cmd_seq_t *commands);
113 119
120static sctp_disposition_t sctp_sf_violation_paramlen(
121 const struct sctp_endpoint *ep,
122 const struct sctp_association *asoc,
123 const sctp_subtype_t type,
124 void *arg,
125 sctp_cmd_seq_t *commands);
126
114static sctp_disposition_t sctp_sf_violation_ctsn( 127static sctp_disposition_t sctp_sf_violation_ctsn(
115 const struct sctp_endpoint *ep, 128 const struct sctp_endpoint *ep,
116 const struct sctp_association *asoc, 129 const struct sctp_association *asoc,
@@ -118,6 +131,13 @@ static sctp_disposition_t sctp_sf_violation_ctsn(
118 void *arg, 131 void *arg,
119 sctp_cmd_seq_t *commands); 132 sctp_cmd_seq_t *commands);
120 133
134static sctp_disposition_t sctp_sf_violation_chunk(
135 const struct sctp_endpoint *ep,
136 const struct sctp_association *asoc,
137 const sctp_subtype_t type,
138 void *arg,
139 sctp_cmd_seq_t *commands);
140
121/* Small helper function that checks if the chunk length 141/* Small helper function that checks if the chunk length
122 * is of the appropriate length. The 'required_length' argument 142 * is of the appropriate length. The 'required_length' argument
123 * is set to be the size of a specific chunk we are testing. 143 * is set to be the size of a specific chunk we are testing.
@@ -181,16 +201,21 @@ sctp_disposition_t sctp_sf_do_4_C(const struct sctp_endpoint *ep,
181 struct sctp_chunk *chunk = arg; 201 struct sctp_chunk *chunk = arg;
182 struct sctp_ulpevent *ev; 202 struct sctp_ulpevent *ev;
183 203
204 if (!sctp_vtag_verify_either(chunk, asoc))
205 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
206
184 /* RFC 2960 6.10 Bundling 207 /* RFC 2960 6.10 Bundling
185 * 208 *
186 * An endpoint MUST NOT bundle INIT, INIT ACK or 209 * An endpoint MUST NOT bundle INIT, INIT ACK or
187 * SHUTDOWN COMPLETE with any other chunks. 210 * SHUTDOWN COMPLETE with any other chunks.
188 */ 211 */
189 if (!chunk->singleton) 212 if (!chunk->singleton)
190 return SCTP_DISPOSITION_VIOLATION; 213 return sctp_sf_violation_chunk(ep, asoc, type, arg, commands);
191 214
192 if (!sctp_vtag_verify_either(chunk, asoc)) 215 /* Make sure that the SHUTDOWN_COMPLETE chunk has a valid length. */
193 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 216 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
217 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
218 commands);
194 219
195 /* RFC 2960 10.2 SCTP-to-ULP 220 /* RFC 2960 10.2 SCTP-to-ULP
196 * 221 *
@@ -264,7 +289,6 @@ sctp_disposition_t sctp_sf_do_5_1B_init(const struct sctp_endpoint *ep,
264 struct sctp_chunk *err_chunk; 289 struct sctp_chunk *err_chunk;
265 struct sctp_packet *packet; 290 struct sctp_packet *packet;
266 sctp_unrecognized_param_t *unk_param; 291 sctp_unrecognized_param_t *unk_param;
267 struct sock *sk;
268 int len; 292 int len;
269 293
270 /* 6.10 Bundling 294 /* 6.10 Bundling
@@ -285,16 +309,6 @@ sctp_disposition_t sctp_sf_do_5_1B_init(const struct sctp_endpoint *ep,
285 if (ep == sctp_sk((sctp_get_ctl_sock()))->ep) 309 if (ep == sctp_sk((sctp_get_ctl_sock()))->ep)
286 return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands); 310 return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
287 311
288 sk = ep->base.sk;
289 /* If the endpoint is not listening or if the number of associations
290 * on the TCP-style socket exceed the max backlog, respond with an
291 * ABORT.
292 */
293 if (!sctp_sstate(sk, LISTENING) ||
294 (sctp_style(sk, TCP) &&
295 sk_acceptq_is_full(sk)))
296 return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
297
298 /* 3.1 A packet containing an INIT chunk MUST have a zero Verification 312 /* 3.1 A packet containing an INIT chunk MUST have a zero Verification
299 * Tag. 313 * Tag.
300 */ 314 */
@@ -461,17 +475,17 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep,
461 if (!sctp_vtag_verify(chunk, asoc)) 475 if (!sctp_vtag_verify(chunk, asoc))
462 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 476 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
463 477
464 /* Make sure that the INIT-ACK chunk has a valid length */
465 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_initack_chunk_t)))
466 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
467 commands);
468 /* 6.10 Bundling 478 /* 6.10 Bundling
469 * An endpoint MUST NOT bundle INIT, INIT ACK or 479 * An endpoint MUST NOT bundle INIT, INIT ACK or
470 * SHUTDOWN COMPLETE with any other chunks. 480 * SHUTDOWN COMPLETE with any other chunks.
471 */ 481 */
472 if (!chunk->singleton) 482 if (!chunk->singleton)
473 return SCTP_DISPOSITION_VIOLATION; 483 return sctp_sf_violation_chunk(ep, asoc, type, arg, commands);
474 484
485 /* Make sure that the INIT-ACK chunk has a valid length */
486 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_initack_chunk_t)))
487 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
488 commands);
475 /* Grab the INIT header. */ 489 /* Grab the INIT header. */
476 chunk->subh.init_hdr = (sctp_inithdr_t *) chunk->skb->data; 490 chunk->subh.init_hdr = (sctp_inithdr_t *) chunk->skb->data;
477 491
@@ -590,12 +604,13 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep,
590 struct sctp_ulpevent *ev, *ai_ev = NULL; 604 struct sctp_ulpevent *ev, *ai_ev = NULL;
591 int error = 0; 605 int error = 0;
592 struct sctp_chunk *err_chk_p; 606 struct sctp_chunk *err_chk_p;
607 struct sock *sk;
593 608
594 /* If the packet is an OOTB packet which is temporarily on the 609 /* If the packet is an OOTB packet which is temporarily on the
595 * control endpoint, respond with an ABORT. 610 * control endpoint, respond with an ABORT.
596 */ 611 */
597 if (ep == sctp_sk((sctp_get_ctl_sock()))->ep) 612 if (ep == sctp_sk((sctp_get_ctl_sock()))->ep)
598 return sctp_sf_ootb(ep, asoc, type, arg, commands); 613 return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
599 614
600 /* Make sure that the COOKIE_ECHO chunk has a valid length. 615 /* Make sure that the COOKIE_ECHO chunk has a valid length.
601 * In this case, we check that we have enough for at least a 616 * In this case, we check that we have enough for at least a
@@ -605,6 +620,15 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep,
605 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t))) 620 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
606 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 621 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
607 622
623 /* If the endpoint is not listening or if the number of associations
624 * on the TCP-style socket exceed the max backlog, respond with an
625 * ABORT.
626 */
627 sk = ep->base.sk;
628 if (!sctp_sstate(sk, LISTENING) ||
629 (sctp_style(sk, TCP) && sk_acceptq_is_full(sk)))
630 return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
631
608 /* "Decode" the chunk. We have no optional parameters so we 632 /* "Decode" the chunk. We have no optional parameters so we
609 * are in good shape. 633 * are in good shape.
610 */ 634 */
@@ -1032,19 +1056,21 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep,
1032 /* This should never happen, but lets log it if so. */ 1056 /* This should never happen, but lets log it if so. */
1033 if (unlikely(!link)) { 1057 if (unlikely(!link)) {
1034 if (from_addr.sa.sa_family == AF_INET6) { 1058 if (from_addr.sa.sa_family == AF_INET6) {
1035 printk(KERN_WARNING 1059 if (net_ratelimit())
1036 "%s association %p could not find address " 1060 printk(KERN_WARNING
1037 NIP6_FMT "\n", 1061 "%s association %p could not find address "
1038 __FUNCTION__, 1062 NIP6_FMT "\n",
1039 asoc, 1063 __FUNCTION__,
1040 NIP6(from_addr.v6.sin6_addr)); 1064 asoc,
1065 NIP6(from_addr.v6.sin6_addr));
1041 } else { 1066 } else {
1042 printk(KERN_WARNING 1067 if (net_ratelimit())
1043 "%s association %p could not find address " 1068 printk(KERN_WARNING
1044 NIPQUAD_FMT "\n", 1069 "%s association %p could not find address "
1045 __FUNCTION__, 1070 NIPQUAD_FMT "\n",
1046 asoc, 1071 __FUNCTION__,
1047 NIPQUAD(from_addr.v4.sin_addr.s_addr)); 1072 asoc,
1073 NIPQUAD(from_addr.v4.sin_addr.s_addr));
1048 } 1074 }
1049 return SCTP_DISPOSITION_DISCARD; 1075 return SCTP_DISPOSITION_DISCARD;
1050 } 1076 }
@@ -2495,6 +2521,11 @@ sctp_disposition_t sctp_sf_do_9_2_reshutack(const struct sctp_endpoint *ep,
2495 struct sctp_chunk *chunk = (struct sctp_chunk *) arg; 2521 struct sctp_chunk *chunk = (struct sctp_chunk *) arg;
2496 struct sctp_chunk *reply; 2522 struct sctp_chunk *reply;
2497 2523
2524 /* Make sure that the chunk has a valid length */
2525 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
2526 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
2527 commands);
2528
2498 /* Since we are not going to really process this INIT, there 2529 /* Since we are not going to really process this INIT, there
2499 * is no point in verifying chunk boundries. Just generate 2530 * is no point in verifying chunk boundries. Just generate
2500 * the SHUTDOWN ACK. 2531 * the SHUTDOWN ACK.
@@ -2928,7 +2959,7 @@ sctp_disposition_t sctp_sf_eat_sack_6_2(const struct sctp_endpoint *ep,
2928 * 2959 *
2929 * The return value is the disposition of the chunk. 2960 * The return value is the disposition of the chunk.
2930*/ 2961*/
2931sctp_disposition_t sctp_sf_tabort_8_4_8(const struct sctp_endpoint *ep, 2962static sctp_disposition_t sctp_sf_tabort_8_4_8(const struct sctp_endpoint *ep,
2932 const struct sctp_association *asoc, 2963 const struct sctp_association *asoc,
2933 const sctp_subtype_t type, 2964 const sctp_subtype_t type,
2934 void *arg, 2965 void *arg,
@@ -2964,6 +2995,7 @@ sctp_disposition_t sctp_sf_tabort_8_4_8(const struct sctp_endpoint *ep,
2964 2995
2965 SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS); 2996 SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);
2966 2997
2998 sctp_sf_pdiscard(ep, asoc, type, arg, commands);
2967 return SCTP_DISPOSITION_CONSUME; 2999 return SCTP_DISPOSITION_CONSUME;
2968 } 3000 }
2969 3001
@@ -3124,14 +3156,14 @@ sctp_disposition_t sctp_sf_ootb(const struct sctp_endpoint *ep,
3124 3156
3125 ch = (sctp_chunkhdr_t *) chunk->chunk_hdr; 3157 ch = (sctp_chunkhdr_t *) chunk->chunk_hdr;
3126 do { 3158 do {
3127 /* Break out if chunk length is less then minimal. */ 3159 /* Report violation if the chunk is less then minimal */
3128 if (ntohs(ch->length) < sizeof(sctp_chunkhdr_t)) 3160 if (ntohs(ch->length) < sizeof(sctp_chunkhdr_t))
3129 break; 3161 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
3130 3162 commands);
3131 ch_end = ((__u8 *)ch) + WORD_ROUND(ntohs(ch->length));
3132 if (ch_end > skb_tail_pointer(skb))
3133 break;
3134 3163
3164 /* Now that we know we at least have a chunk header,
3165 * do things that are type appropriate.
3166 */
3135 if (SCTP_CID_SHUTDOWN_ACK == ch->type) 3167 if (SCTP_CID_SHUTDOWN_ACK == ch->type)
3136 ootb_shut_ack = 1; 3168 ootb_shut_ack = 1;
3137 3169
@@ -3143,15 +3175,19 @@ sctp_disposition_t sctp_sf_ootb(const struct sctp_endpoint *ep,
3143 if (SCTP_CID_ABORT == ch->type) 3175 if (SCTP_CID_ABORT == ch->type)
3144 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 3176 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
3145 3177
3178 /* Report violation if chunk len overflows */
3179 ch_end = ((__u8 *)ch) + WORD_ROUND(ntohs(ch->length));
3180 if (ch_end > skb_tail_pointer(skb))
3181 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
3182 commands);
3183
3146 ch = (sctp_chunkhdr_t *) ch_end; 3184 ch = (sctp_chunkhdr_t *) ch_end;
3147 } while (ch_end < skb_tail_pointer(skb)); 3185 } while (ch_end < skb_tail_pointer(skb));
3148 3186
3149 if (ootb_shut_ack) 3187 if (ootb_shut_ack)
3150 sctp_sf_shut_8_4_5(ep, asoc, type, arg, commands); 3188 return sctp_sf_shut_8_4_5(ep, asoc, type, arg, commands);
3151 else 3189 else
3152 sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands); 3190 return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
3153
3154 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
3155} 3191}
3156 3192
3157/* 3193/*
@@ -3217,7 +3253,11 @@ static sctp_disposition_t sctp_sf_shut_8_4_5(const struct sctp_endpoint *ep,
3217 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t))) 3253 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
3218 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 3254 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
3219 3255
3220 return SCTP_DISPOSITION_CONSUME; 3256 /* We need to discard the rest of the packet to prevent
3257 * potential bomming attacks from additional bundled chunks.
3258 * This is documented in SCTP Threats ID.
3259 */
3260 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
3221 } 3261 }
3222 3262
3223 return SCTP_DISPOSITION_NOMEM; 3263 return SCTP_DISPOSITION_NOMEM;
@@ -3240,6 +3280,13 @@ sctp_disposition_t sctp_sf_do_8_5_1_E_sa(const struct sctp_endpoint *ep,
3240 void *arg, 3280 void *arg,
3241 sctp_cmd_seq_t *commands) 3281 sctp_cmd_seq_t *commands)
3242{ 3282{
3283 struct sctp_chunk *chunk = arg;
3284
3285 /* Make sure that the SHUTDOWN_ACK chunk has a valid length. */
3286 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
3287 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
3288 commands);
3289
3243 /* Although we do have an association in this case, it corresponds 3290 /* Although we do have an association in this case, it corresponds
3244 * to a restarted association. So the packet is treated as an OOTB 3291 * to a restarted association. So the packet is treated as an OOTB
3245 * packet and the state function that handles OOTB SHUTDOWN_ACK is 3292 * packet and the state function that handles OOTB SHUTDOWN_ACK is
@@ -3256,8 +3303,11 @@ sctp_disposition_t sctp_sf_do_asconf(const struct sctp_endpoint *ep,
3256{ 3303{
3257 struct sctp_chunk *chunk = arg; 3304 struct sctp_chunk *chunk = arg;
3258 struct sctp_chunk *asconf_ack = NULL; 3305 struct sctp_chunk *asconf_ack = NULL;
3306 struct sctp_paramhdr *err_param = NULL;
3259 sctp_addiphdr_t *hdr; 3307 sctp_addiphdr_t *hdr;
3308 union sctp_addr_param *addr_param;
3260 __u32 serial; 3309 __u32 serial;
3310 int length;
3261 3311
3262 if (!sctp_vtag_verify(chunk, asoc)) { 3312 if (!sctp_vtag_verify(chunk, asoc)) {
3263 sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG, 3313 sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG,
@@ -3273,6 +3323,20 @@ sctp_disposition_t sctp_sf_do_asconf(const struct sctp_endpoint *ep,
3273 hdr = (sctp_addiphdr_t *)chunk->skb->data; 3323 hdr = (sctp_addiphdr_t *)chunk->skb->data;
3274 serial = ntohl(hdr->serial); 3324 serial = ntohl(hdr->serial);
3275 3325
3326 addr_param = (union sctp_addr_param *)hdr->params;
3327 length = ntohs(addr_param->p.length);
3328 if (length < sizeof(sctp_paramhdr_t))
3329 return sctp_sf_violation_paramlen(ep, asoc, type,
3330 (void *)addr_param, commands);
3331
3332 /* Verify the ASCONF chunk before processing it. */
3333 if (!sctp_verify_asconf(asoc,
3334 (sctp_paramhdr_t *)((void *)addr_param + length),
3335 (void *)chunk->chunk_end,
3336 &err_param))
3337 return sctp_sf_violation_paramlen(ep, asoc, type,
3338 (void *)&err_param, commands);
3339
3276 /* ADDIP 4.2 C1) Compare the value of the serial number to the value 3340 /* ADDIP 4.2 C1) Compare the value of the serial number to the value
3277 * the endpoint stored in a new association variable 3341 * the endpoint stored in a new association variable
3278 * 'Peer-Serial-Number'. 3342 * 'Peer-Serial-Number'.
@@ -3327,6 +3391,7 @@ sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
3327 struct sctp_chunk *asconf_ack = arg; 3391 struct sctp_chunk *asconf_ack = arg;
3328 struct sctp_chunk *last_asconf = asoc->addip_last_asconf; 3392 struct sctp_chunk *last_asconf = asoc->addip_last_asconf;
3329 struct sctp_chunk *abort; 3393 struct sctp_chunk *abort;
3394 struct sctp_paramhdr *err_param = NULL;
3330 sctp_addiphdr_t *addip_hdr; 3395 sctp_addiphdr_t *addip_hdr;
3331 __u32 sent_serial, rcvd_serial; 3396 __u32 sent_serial, rcvd_serial;
3332 3397
@@ -3344,6 +3409,14 @@ sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
3344 addip_hdr = (sctp_addiphdr_t *)asconf_ack->skb->data; 3409 addip_hdr = (sctp_addiphdr_t *)asconf_ack->skb->data;
3345 rcvd_serial = ntohl(addip_hdr->serial); 3410 rcvd_serial = ntohl(addip_hdr->serial);
3346 3411
3412 /* Verify the ASCONF-ACK chunk before processing it. */
3413 if (!sctp_verify_asconf(asoc,
3414 (sctp_paramhdr_t *)addip_hdr->params,
3415 (void *)asconf_ack->chunk_end,
3416 &err_param))
3417 return sctp_sf_violation_paramlen(ep, asoc, type,
3418 (void *)&err_param, commands);
3419
3347 if (last_asconf) { 3420 if (last_asconf) {
3348 addip_hdr = (sctp_addiphdr_t *)last_asconf->subh.addip_hdr; 3421 addip_hdr = (sctp_addiphdr_t *)last_asconf->subh.addip_hdr;
3349 sent_serial = ntohl(addip_hdr->serial); 3422 sent_serial = ntohl(addip_hdr->serial);
@@ -3362,7 +3435,7 @@ sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
3362 abort = sctp_make_abort(asoc, asconf_ack, 3435 abort = sctp_make_abort(asoc, asconf_ack,
3363 sizeof(sctp_errhdr_t)); 3436 sizeof(sctp_errhdr_t));
3364 if (abort) { 3437 if (abort) {
3365 sctp_init_cause(abort, SCTP_ERROR_ASCONF_ACK, NULL, 0); 3438 sctp_init_cause(abort, SCTP_ERROR_ASCONF_ACK, 0);
3366 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, 3439 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY,
3367 SCTP_CHUNK(abort)); 3440 SCTP_CHUNK(abort));
3368 } 3441 }
@@ -3392,7 +3465,7 @@ sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
3392 abort = sctp_make_abort(asoc, asconf_ack, 3465 abort = sctp_make_abort(asoc, asconf_ack,
3393 sizeof(sctp_errhdr_t)); 3466 sizeof(sctp_errhdr_t));
3394 if (abort) { 3467 if (abort) {
3395 sctp_init_cause(abort, SCTP_ERROR_RSRC_LOW, NULL, 0); 3468 sctp_init_cause(abort, SCTP_ERROR_RSRC_LOW, 0);
3396 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, 3469 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY,
3397 SCTP_CHUNK(abort)); 3470 SCTP_CHUNK(abort));
3398 } 3471 }
@@ -3654,6 +3727,16 @@ sctp_disposition_t sctp_sf_discard_chunk(const struct sctp_endpoint *ep,
3654 void *arg, 3727 void *arg,
3655 sctp_cmd_seq_t *commands) 3728 sctp_cmd_seq_t *commands)
3656{ 3729{
3730 struct sctp_chunk *chunk = arg;
3731
3732 /* Make sure that the chunk has a valid length.
3733 * Since we don't know the chunk type, we use a general
3734 * chunkhdr structure to make a comparison.
3735 */
3736 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
3737 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
3738 commands);
3739
3657 SCTP_DEBUG_PRINTK("Chunk %d is discarded\n", type.chunk); 3740 SCTP_DEBUG_PRINTK("Chunk %d is discarded\n", type.chunk);
3658 return SCTP_DISPOSITION_DISCARD; 3741 return SCTP_DISPOSITION_DISCARD;
3659} 3742}
@@ -3709,6 +3792,13 @@ sctp_disposition_t sctp_sf_violation(const struct sctp_endpoint *ep,
3709 void *arg, 3792 void *arg,
3710 sctp_cmd_seq_t *commands) 3793 sctp_cmd_seq_t *commands)
3711{ 3794{
3795 struct sctp_chunk *chunk = arg;
3796
3797 /* Make sure that the chunk has a valid length. */
3798 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
3799 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
3800 commands);
3801
3712 return SCTP_DISPOSITION_VIOLATION; 3802 return SCTP_DISPOSITION_VIOLATION;
3713} 3803}
3714 3804
@@ -3716,12 +3806,14 @@ sctp_disposition_t sctp_sf_violation(const struct sctp_endpoint *ep,
3716 * Common function to handle a protocol violation. 3806 * Common function to handle a protocol violation.
3717 */ 3807 */
3718static sctp_disposition_t sctp_sf_abort_violation( 3808static sctp_disposition_t sctp_sf_abort_violation(
3809 const struct sctp_endpoint *ep,
3719 const struct sctp_association *asoc, 3810 const struct sctp_association *asoc,
3720 void *arg, 3811 void *arg,
3721 sctp_cmd_seq_t *commands, 3812 sctp_cmd_seq_t *commands,
3722 const __u8 *payload, 3813 const __u8 *payload,
3723 const size_t paylen) 3814 const size_t paylen)
3724{ 3815{
3816 struct sctp_packet *packet = NULL;
3725 struct sctp_chunk *chunk = arg; 3817 struct sctp_chunk *chunk = arg;
3726 struct sctp_chunk *abort = NULL; 3818 struct sctp_chunk *abort = NULL;
3727 3819
@@ -3730,30 +3822,51 @@ static sctp_disposition_t sctp_sf_abort_violation(
3730 if (!abort) 3822 if (!abort)
3731 goto nomem; 3823 goto nomem;
3732 3824
3733 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort)); 3825 if (asoc) {
3734 SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS); 3826 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
3827 SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);
3735 3828
3736 if (asoc->state <= SCTP_STATE_COOKIE_ECHOED) { 3829 if (asoc->state <= SCTP_STATE_COOKIE_ECHOED) {
3737 sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP, 3830 sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP,
3738 SCTP_TO(SCTP_EVENT_TIMEOUT_T1_INIT)); 3831 SCTP_TO(SCTP_EVENT_TIMEOUT_T1_INIT));
3739 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 3832 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
3740 SCTP_ERROR(ECONNREFUSED)); 3833 SCTP_ERROR(ECONNREFUSED));
3741 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED, 3834 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED,
3742 SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION)); 3835 SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION));
3836 } else {
3837 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
3838 SCTP_ERROR(ECONNABORTED));
3839 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
3840 SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION));
3841 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
3842 }
3743 } else { 3843 } else {
3744 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 3844 packet = sctp_ootb_pkt_new(asoc, chunk);
3745 SCTP_ERROR(ECONNABORTED)); 3845
3746 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 3846 if (!packet)
3747 SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION)); 3847 goto nomem_pkt;
3748 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB); 3848
3849 if (sctp_test_T_bit(abort))
3850 packet->vtag = ntohl(chunk->sctp_hdr->vtag);
3851
3852 abort->skb->sk = ep->base.sk;
3853
3854 sctp_packet_append_chunk(packet, abort);
3855
3856 sctp_add_cmd_sf(commands, SCTP_CMD_SEND_PKT,
3857 SCTP_PACKET(packet));
3858
3859 SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);
3749 } 3860 }
3750 3861
3751 sctp_add_cmd_sf(commands, SCTP_CMD_DISCARD_PACKET, SCTP_NULL()); 3862 sctp_sf_pdiscard(ep, asoc, SCTP_ST_CHUNK(0), arg, commands);
3752 3863
3753 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 3864 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
3754 3865
3755 return SCTP_DISPOSITION_ABORT; 3866 return SCTP_DISPOSITION_ABORT;
3756 3867
3868nomem_pkt:
3869 sctp_chunk_free(abort);
3757nomem: 3870nomem:
3758 return SCTP_DISPOSITION_NOMEM; 3871 return SCTP_DISPOSITION_NOMEM;
3759} 3872}
@@ -3786,7 +3899,24 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
3786{ 3899{
3787 char err_str[]="The following chunk had invalid length:"; 3900 char err_str[]="The following chunk had invalid length:";
3788 3901
3789 return sctp_sf_abort_violation(asoc, arg, commands, err_str, 3902 return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
3903 sizeof(err_str));
3904}
3905
3906/*
3907 * Handle a protocol violation when the parameter length is invalid.
3908 * "Invalid" length is identified as smaller then the minimal length a
3909 * given parameter can be.
3910 */
3911static sctp_disposition_t sctp_sf_violation_paramlen(
3912 const struct sctp_endpoint *ep,
3913 const struct sctp_association *asoc,
3914 const sctp_subtype_t type,
3915 void *arg,
3916 sctp_cmd_seq_t *commands) {
3917 char err_str[] = "The following parameter had invalid length:";
3918
3919 return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
3790 sizeof(err_str)); 3920 sizeof(err_str));
3791} 3921}
3792 3922
@@ -3805,10 +3935,31 @@ static sctp_disposition_t sctp_sf_violation_ctsn(
3805{ 3935{
3806 char err_str[]="The cumulative tsn ack beyond the max tsn currently sent:"; 3936 char err_str[]="The cumulative tsn ack beyond the max tsn currently sent:";
3807 3937
3808 return sctp_sf_abort_violation(asoc, arg, commands, err_str, 3938 return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
3809 sizeof(err_str)); 3939 sizeof(err_str));
3810} 3940}
3811 3941
3942/* Handle protocol violation of an invalid chunk bundling. For example,
3943 * when we have an association and we recieve bundled INIT-ACK, or
3944 * SHUDOWN-COMPLETE, our peer is clearly violationg the "MUST NOT bundle"
3945 * statement from the specs. Additinally, there might be an attacker
3946 * on the path and we may not want to continue this communication.
3947 */
3948static sctp_disposition_t sctp_sf_violation_chunk(
3949 const struct sctp_endpoint *ep,
3950 const struct sctp_association *asoc,
3951 const sctp_subtype_t type,
3952 void *arg,
3953 sctp_cmd_seq_t *commands)
3954{
3955 char err_str[]="The following chunk violates protocol:";
3956
3957 if (!asoc)
3958 return sctp_sf_violation(ep, asoc, type, arg, commands);
3959
3960 return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
3961 sizeof(err_str));
3962}
3812/*************************************************************************** 3963/***************************************************************************
3813 * These are the state functions for handling primitive (Section 10) events. 3964 * These are the state functions for handling primitive (Section 10) events.
3814 ***************************************************************************/ 3965 ***************************************************************************/
@@ -5175,7 +5326,22 @@ static struct sctp_packet *sctp_ootb_pkt_new(const struct sctp_association *asoc
5175 * association exists, otherwise, use the peer's vtag. 5326 * association exists, otherwise, use the peer's vtag.
5176 */ 5327 */
5177 if (asoc) { 5328 if (asoc) {
5178 vtag = asoc->peer.i.init_tag; 5329 /* Special case the INIT-ACK as there is no peer's vtag
5330 * yet.
5331 */
5332 switch(chunk->chunk_hdr->type) {
5333 case SCTP_CID_INIT_ACK:
5334 {
5335 sctp_initack_chunk_t *initack;
5336
5337 initack = (sctp_initack_chunk_t *)chunk->chunk_hdr;
5338 vtag = ntohl(initack->init_hdr.init_tag);
5339 break;
5340 }
5341 default:
5342 vtag = asoc->peer.i.init_tag;
5343 break;
5344 }
5179 } else { 5345 } else {
5180 /* Special case the INIT and stale COOKIE_ECHO as there is no 5346 /* Special case the INIT and stale COOKIE_ECHO as there is no
5181 * vtag yet. 5347 * vtag yet.
diff --git a/net/sctp/sm_statetable.c b/net/sctp/sm_statetable.c
index 70a91ece3c..ddb0ba3974 100644
--- a/net/sctp/sm_statetable.c
+++ b/net/sctp/sm_statetable.c
@@ -110,7 +110,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
110 /* SCTP_STATE_EMPTY */ \ 110 /* SCTP_STATE_EMPTY */ \
111 TYPE_SCTP_FUNC(sctp_sf_ootb), \ 111 TYPE_SCTP_FUNC(sctp_sf_ootb), \
112 /* SCTP_STATE_CLOSED */ \ 112 /* SCTP_STATE_CLOSED */ \
113 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \ 113 TYPE_SCTP_FUNC(sctp_sf_ootb), \
114 /* SCTP_STATE_COOKIE_WAIT */ \ 114 /* SCTP_STATE_COOKIE_WAIT */ \
115 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ 115 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
116 /* SCTP_STATE_COOKIE_ECHOED */ \ 116 /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -173,7 +173,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
173 /* SCTP_STATE_EMPTY */ \ 173 /* SCTP_STATE_EMPTY */ \
174 TYPE_SCTP_FUNC(sctp_sf_ootb), \ 174 TYPE_SCTP_FUNC(sctp_sf_ootb), \
175 /* SCTP_STATE_CLOSED */ \ 175 /* SCTP_STATE_CLOSED */ \
176 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \ 176 TYPE_SCTP_FUNC(sctp_sf_ootb), \
177 /* SCTP_STATE_COOKIE_WAIT */ \ 177 /* SCTP_STATE_COOKIE_WAIT */ \
178 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ 178 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
179 /* SCTP_STATE_COOKIE_ECHOED */ \ 179 /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -194,7 +194,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
194 /* SCTP_STATE_EMPTY */ \ 194 /* SCTP_STATE_EMPTY */ \
195 TYPE_SCTP_FUNC(sctp_sf_ootb), \ 195 TYPE_SCTP_FUNC(sctp_sf_ootb), \
196 /* SCTP_STATE_CLOSED */ \ 196 /* SCTP_STATE_CLOSED */ \
197 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \ 197 TYPE_SCTP_FUNC(sctp_sf_ootb), \
198 /* SCTP_STATE_COOKIE_WAIT */ \ 198 /* SCTP_STATE_COOKIE_WAIT */ \
199 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ 199 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
200 /* SCTP_STATE_COOKIE_ECHOED */ \ 200 /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -216,7 +216,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
216 /* SCTP_STATE_EMPTY */ \ 216 /* SCTP_STATE_EMPTY */ \
217 TYPE_SCTP_FUNC(sctp_sf_ootb), \ 217 TYPE_SCTP_FUNC(sctp_sf_ootb), \
218 /* SCTP_STATE_CLOSED */ \ 218 /* SCTP_STATE_CLOSED */ \
219 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \ 219 TYPE_SCTP_FUNC(sctp_sf_ootb), \
220 /* SCTP_STATE_COOKIE_WAIT */ \ 220 /* SCTP_STATE_COOKIE_WAIT */ \
221 TYPE_SCTP_FUNC(sctp_sf_violation), \ 221 TYPE_SCTP_FUNC(sctp_sf_violation), \
222 /* SCTP_STATE_COOKIE_ECHOED */ \ 222 /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -258,7 +258,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
258 /* SCTP_STATE_EMPTY */ \ 258 /* SCTP_STATE_EMPTY */ \
259 TYPE_SCTP_FUNC(sctp_sf_ootb), \ 259 TYPE_SCTP_FUNC(sctp_sf_ootb), \
260 /* SCTP_STATE_CLOSED */ \ 260 /* SCTP_STATE_CLOSED */ \
261 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \ 261 TYPE_SCTP_FUNC(sctp_sf_ootb), \
262 /* SCTP_STATE_COOKIE_WAIT */ \ 262 /* SCTP_STATE_COOKIE_WAIT */ \
263 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ 263 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
264 /* SCTP_STATE_COOKIE_ECHOED */ \ 264 /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -300,7 +300,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
300 /* SCTP_STATE_EMPTY */ \ 300 /* SCTP_STATE_EMPTY */ \
301 TYPE_SCTP_FUNC(sctp_sf_ootb), \ 301 TYPE_SCTP_FUNC(sctp_sf_ootb), \
302 /* SCTP_STATE_CLOSED */ \ 302 /* SCTP_STATE_CLOSED */ \
303 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \ 303 TYPE_SCTP_FUNC(sctp_sf_ootb), \
304 /* SCTP_STATE_COOKIE_WAIT */ \ 304 /* SCTP_STATE_COOKIE_WAIT */ \
305 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ 305 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
306 /* SCTP_STATE_COOKIE_ECHOED */ \ 306 /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -499,7 +499,7 @@ static const sctp_sm_table_entry_t addip_chunk_event_table[SCTP_NUM_ADDIP_CHUNK_
499 /* SCTP_STATE_EMPTY */ \ 499 /* SCTP_STATE_EMPTY */ \
500 TYPE_SCTP_FUNC(sctp_sf_ootb), \ 500 TYPE_SCTP_FUNC(sctp_sf_ootb), \
501 /* SCTP_STATE_CLOSED */ \ 501 /* SCTP_STATE_CLOSED */ \
502 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \ 502 TYPE_SCTP_FUNC(sctp_sf_ootb), \
503 /* SCTP_STATE_COOKIE_WAIT */ \ 503 /* SCTP_STATE_COOKIE_WAIT */ \
504 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ 504 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
505 /* SCTP_STATE_COOKIE_ECHOED */ \ 505 /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -528,7 +528,7 @@ chunk_event_table_unknown[SCTP_STATE_NUM_STATES] = {
528 /* SCTP_STATE_EMPTY */ 528 /* SCTP_STATE_EMPTY */
529 TYPE_SCTP_FUNC(sctp_sf_ootb), 529 TYPE_SCTP_FUNC(sctp_sf_ootb),
530 /* SCTP_STATE_CLOSED */ 530 /* SCTP_STATE_CLOSED */
531 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), 531 TYPE_SCTP_FUNC(sctp_sf_ootb),
532 /* SCTP_STATE_COOKIE_WAIT */ 532 /* SCTP_STATE_COOKIE_WAIT */
533 TYPE_SCTP_FUNC(sctp_sf_unk_chunk), 533 TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
534 /* SCTP_STATE_COOKIE_ECHOED */ 534 /* SCTP_STATE_COOKIE_ECHOED */
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 01c6364245..772fbfb4bf 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -353,6 +353,7 @@ SCTP_STATIC int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len)
353 * The function sctp_get_port_local() does duplicate address 353 * The function sctp_get_port_local() does duplicate address
354 * detection. 354 * detection.
355 */ 355 */
356 addr->v4.sin_port = htons(snum);
356 if ((ret = sctp_get_port_local(sk, addr))) { 357 if ((ret = sctp_get_port_local(sk, addr))) {
357 if (ret == (long) sk) { 358 if (ret == (long) sk) {
358 /* This endpoint has a conflicting address. */ 359 /* This endpoint has a conflicting address. */
@@ -366,14 +367,10 @@ SCTP_STATIC int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len)
366 if (!bp->port) 367 if (!bp->port)
367 bp->port = inet_sk(sk)->num; 368 bp->port = inet_sk(sk)->num;
368 369
369 /* Add the address to the bind address list. */ 370 /* Add the address to the bind address list.
370 sctp_local_bh_disable(); 371 * Use GFP_ATOMIC since BHs will be disabled.
371 sctp_write_lock(&ep->base.addr_lock); 372 */
372
373 /* Use GFP_ATOMIC since BHs are disabled. */
374 ret = sctp_add_bind_addr(bp, addr, 1, GFP_ATOMIC); 373 ret = sctp_add_bind_addr(bp, addr, 1, GFP_ATOMIC);
375 sctp_write_unlock(&ep->base.addr_lock);
376 sctp_local_bh_enable();
377 374
378 /* Copy back into socket for getsockname() use. */ 375 /* Copy back into socket for getsockname() use. */
379 if (!ret) { 376 if (!ret) {
@@ -543,15 +540,12 @@ static int sctp_send_asconf_add_ip(struct sock *sk,
543 if (i < addrcnt) 540 if (i < addrcnt)
544 continue; 541 continue;
545 542
546 /* Use the first address in bind addr list of association as 543 /* Use the first valid address in bind addr list of
547 * Address Parameter of ASCONF CHUNK. 544 * association as Address Parameter of ASCONF CHUNK.
548 */ 545 */
549 sctp_read_lock(&asoc->base.addr_lock);
550 bp = &asoc->base.bind_addr; 546 bp = &asoc->base.bind_addr;
551 p = bp->address_list.next; 547 p = bp->address_list.next;
552 laddr = list_entry(p, struct sctp_sockaddr_entry, list); 548 laddr = list_entry(p, struct sctp_sockaddr_entry, list);
553 sctp_read_unlock(&asoc->base.addr_lock);
554
555 chunk = sctp_make_asconf_update_ip(asoc, &laddr->a, addrs, 549 chunk = sctp_make_asconf_update_ip(asoc, &laddr->a, addrs,
556 addrcnt, SCTP_PARAM_ADD_IP); 550 addrcnt, SCTP_PARAM_ADD_IP);
557 if (!chunk) { 551 if (!chunk) {
@@ -566,8 +560,6 @@ static int sctp_send_asconf_add_ip(struct sock *sk,
566 /* Add the new addresses to the bind address list with 560 /* Add the new addresses to the bind address list with
567 * use_as_src set to 0. 561 * use_as_src set to 0.
568 */ 562 */
569 sctp_local_bh_disable();
570 sctp_write_lock(&asoc->base.addr_lock);
571 addr_buf = addrs; 563 addr_buf = addrs;
572 for (i = 0; i < addrcnt; i++) { 564 for (i = 0; i < addrcnt; i++) {
573 addr = (union sctp_addr *)addr_buf; 565 addr = (union sctp_addr *)addr_buf;
@@ -577,8 +569,6 @@ static int sctp_send_asconf_add_ip(struct sock *sk,
577 GFP_ATOMIC); 569 GFP_ATOMIC);
578 addr_buf += af->sockaddr_len; 570 addr_buf += af->sockaddr_len;
579 } 571 }
580 sctp_write_unlock(&asoc->base.addr_lock);
581 sctp_local_bh_enable();
582 } 572 }
583 573
584out: 574out:
@@ -650,13 +640,7 @@ static int sctp_bindx_rem(struct sock *sk, struct sockaddr *addrs, int addrcnt)
650 * socket routing and failover schemes. Refer to comments in 640 * socket routing and failover schemes. Refer to comments in
651 * sctp_do_bind(). -daisy 641 * sctp_do_bind(). -daisy
652 */ 642 */
653 sctp_local_bh_disable(); 643 retval = sctp_del_bind_addr(bp, sa_addr, call_rcu);
654 sctp_write_lock(&ep->base.addr_lock);
655
656 retval = sctp_del_bind_addr(bp, sa_addr);
657
658 sctp_write_unlock(&ep->base.addr_lock);
659 sctp_local_bh_enable();
660 644
661 addr_buf += af->sockaddr_len; 645 addr_buf += af->sockaddr_len;
662err_bindx_rem: 646err_bindx_rem:
@@ -747,14 +731,16 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
747 * make sure that we do not delete all the addresses in the 731 * make sure that we do not delete all the addresses in the
748 * association. 732 * association.
749 */ 733 */
750 sctp_read_lock(&asoc->base.addr_lock);
751 bp = &asoc->base.bind_addr; 734 bp = &asoc->base.bind_addr;
752 laddr = sctp_find_unmatch_addr(bp, (union sctp_addr *)addrs, 735 laddr = sctp_find_unmatch_addr(bp, (union sctp_addr *)addrs,
753 addrcnt, sp); 736 addrcnt, sp);
754 sctp_read_unlock(&asoc->base.addr_lock);
755 if (!laddr) 737 if (!laddr)
756 continue; 738 continue;
757 739
740 /* We do not need RCU protection throughout this loop
741 * because this is done under a socket lock from the
742 * setsockopt call.
743 */
758 chunk = sctp_make_asconf_update_ip(asoc, laddr, addrs, addrcnt, 744 chunk = sctp_make_asconf_update_ip(asoc, laddr, addrs, addrcnt,
759 SCTP_PARAM_DEL_IP); 745 SCTP_PARAM_DEL_IP);
760 if (!chunk) { 746 if (!chunk) {
@@ -765,23 +751,16 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
765 /* Reset use_as_src flag for the addresses in the bind address 751 /* Reset use_as_src flag for the addresses in the bind address
766 * list that are to be deleted. 752 * list that are to be deleted.
767 */ 753 */
768 sctp_local_bh_disable();
769 sctp_write_lock(&asoc->base.addr_lock);
770 addr_buf = addrs; 754 addr_buf = addrs;
771 for (i = 0; i < addrcnt; i++) { 755 for (i = 0; i < addrcnt; i++) {
772 laddr = (union sctp_addr *)addr_buf; 756 laddr = (union sctp_addr *)addr_buf;
773 af = sctp_get_af_specific(laddr->v4.sin_family); 757 af = sctp_get_af_specific(laddr->v4.sin_family);
774 list_for_each(pos1, &bp->address_list) { 758 list_for_each_entry(saddr, &bp->address_list, list) {
775 saddr = list_entry(pos1,
776 struct sctp_sockaddr_entry,
777 list);
778 if (sctp_cmp_addr_exact(&saddr->a, laddr)) 759 if (sctp_cmp_addr_exact(&saddr->a, laddr))
779 saddr->use_as_src = 0; 760 saddr->use_as_src = 0;
780 } 761 }
781 addr_buf += af->sockaddr_len; 762 addr_buf += af->sockaddr_len;
782 } 763 }
783 sctp_write_unlock(&asoc->base.addr_lock);
784 sctp_local_bh_enable();
785 764
786 /* Update the route and saddr entries for all the transports 765 /* Update the route and saddr entries for all the transports
787 * as some of the addresses in the bind address list are 766 * as some of the addresses in the bind address list are
@@ -4058,9 +4037,7 @@ static int sctp_getsockopt_local_addrs_num_old(struct sock *sk, int len,
4058 sctp_assoc_t id; 4037 sctp_assoc_t id;
4059 struct sctp_bind_addr *bp; 4038 struct sctp_bind_addr *bp;
4060 struct sctp_association *asoc; 4039 struct sctp_association *asoc;
4061 struct list_head *pos, *temp;
4062 struct sctp_sockaddr_entry *addr; 4040 struct sctp_sockaddr_entry *addr;
4063 rwlock_t *addr_lock;
4064 int cnt = 0; 4041 int cnt = 0;
4065 4042
4066 if (len < sizeof(sctp_assoc_t)) 4043 if (len < sizeof(sctp_assoc_t))
@@ -4077,17 +4054,13 @@ static int sctp_getsockopt_local_addrs_num_old(struct sock *sk, int len,
4077 */ 4054 */
4078 if (0 == id) { 4055 if (0 == id) {
4079 bp = &sctp_sk(sk)->ep->base.bind_addr; 4056 bp = &sctp_sk(sk)->ep->base.bind_addr;
4080 addr_lock = &sctp_sk(sk)->ep->base.addr_lock;
4081 } else { 4057 } else {
4082 asoc = sctp_id2assoc(sk, id); 4058 asoc = sctp_id2assoc(sk, id);
4083 if (!asoc) 4059 if (!asoc)
4084 return -EINVAL; 4060 return -EINVAL;
4085 bp = &asoc->base.bind_addr; 4061 bp = &asoc->base.bind_addr;
4086 addr_lock = &asoc->base.addr_lock;
4087 } 4062 }
4088 4063
4089 sctp_read_lock(addr_lock);
4090
4091 /* If the endpoint is bound to 0.0.0.0 or ::0, count the valid 4064 /* If the endpoint is bound to 0.0.0.0 or ::0, count the valid
4092 * addresses from the global local address list. 4065 * addresses from the global local address list.
4093 */ 4066 */
@@ -4095,27 +4068,33 @@ static int sctp_getsockopt_local_addrs_num_old(struct sock *sk, int len,
4095 addr = list_entry(bp->address_list.next, 4068 addr = list_entry(bp->address_list.next,
4096 struct sctp_sockaddr_entry, list); 4069 struct sctp_sockaddr_entry, list);
4097 if (sctp_is_any(&addr->a)) { 4070 if (sctp_is_any(&addr->a)) {
4098 list_for_each_safe(pos, temp, &sctp_local_addr_list) { 4071 rcu_read_lock();
4099 addr = list_entry(pos, 4072 list_for_each_entry_rcu(addr,
4100 struct sctp_sockaddr_entry, 4073 &sctp_local_addr_list, list) {
4101 list); 4074 if (!addr->valid)
4075 continue;
4076
4102 if ((PF_INET == sk->sk_family) && 4077 if ((PF_INET == sk->sk_family) &&
4103 (AF_INET6 == addr->a.sa.sa_family)) 4078 (AF_INET6 == addr->a.sa.sa_family))
4104 continue; 4079 continue;
4080
4105 cnt++; 4081 cnt++;
4106 } 4082 }
4083 rcu_read_unlock();
4107 } else { 4084 } else {
4108 cnt = 1; 4085 cnt = 1;
4109 } 4086 }
4110 goto done; 4087 goto done;
4111 } 4088 }
4112 4089
4113 list_for_each(pos, &bp->address_list) { 4090 /* Protection on the bound address list is not needed,
4091 * since in the socket option context we hold the socket lock,
4092 * so there is no way that the bound address list can change.
4093 */
4094 list_for_each_entry(addr, &bp->address_list, list) {
4114 cnt ++; 4095 cnt ++;
4115 } 4096 }
4116
4117done: 4097done:
4118 sctp_read_unlock(addr_lock);
4119 return cnt; 4098 return cnt;
4120} 4099}
4121 4100
@@ -4126,14 +4105,16 @@ static int sctp_copy_laddrs_old(struct sock *sk, __u16 port,
4126 int max_addrs, void *to, 4105 int max_addrs, void *to,
4127 int *bytes_copied) 4106 int *bytes_copied)
4128{ 4107{
4129 struct list_head *pos, *next;
4130 struct sctp_sockaddr_entry *addr; 4108 struct sctp_sockaddr_entry *addr;
4131 union sctp_addr temp; 4109 union sctp_addr temp;
4132 int cnt = 0; 4110 int cnt = 0;
4133 int addrlen; 4111 int addrlen;
4134 4112
4135 list_for_each_safe(pos, next, &sctp_local_addr_list) { 4113 rcu_read_lock();
4136 addr = list_entry(pos, struct sctp_sockaddr_entry, list); 4114 list_for_each_entry_rcu(addr, &sctp_local_addr_list, list) {
4115 if (!addr->valid)
4116 continue;
4117
4137 if ((PF_INET == sk->sk_family) && 4118 if ((PF_INET == sk->sk_family) &&
4138 (AF_INET6 == addr->a.sa.sa_family)) 4119 (AF_INET6 == addr->a.sa.sa_family))
4139 continue; 4120 continue;
@@ -4148,6 +4129,7 @@ static int sctp_copy_laddrs_old(struct sock *sk, __u16 port,
4148 cnt ++; 4129 cnt ++;
4149 if (cnt >= max_addrs) break; 4130 if (cnt >= max_addrs) break;
4150 } 4131 }
4132 rcu_read_unlock();
4151 4133
4152 return cnt; 4134 return cnt;
4153} 4135}
@@ -4155,14 +4137,16 @@ static int sctp_copy_laddrs_old(struct sock *sk, __u16 port,
4155static int sctp_copy_laddrs(struct sock *sk, __u16 port, void *to, 4137static int sctp_copy_laddrs(struct sock *sk, __u16 port, void *to,
4156 size_t space_left, int *bytes_copied) 4138 size_t space_left, int *bytes_copied)
4157{ 4139{
4158 struct list_head *pos, *next;
4159 struct sctp_sockaddr_entry *addr; 4140 struct sctp_sockaddr_entry *addr;
4160 union sctp_addr temp; 4141 union sctp_addr temp;
4161 int cnt = 0; 4142 int cnt = 0;
4162 int addrlen; 4143 int addrlen;
4163 4144
4164 list_for_each_safe(pos, next, &sctp_local_addr_list) { 4145 rcu_read_lock();
4165 addr = list_entry(pos, struct sctp_sockaddr_entry, list); 4146 list_for_each_entry_rcu(addr, &sctp_local_addr_list, list) {
4147 if (!addr->valid)
4148 continue;
4149
4166 if ((PF_INET == sk->sk_family) && 4150 if ((PF_INET == sk->sk_family) &&
4167 (AF_INET6 == addr->a.sa.sa_family)) 4151 (AF_INET6 == addr->a.sa.sa_family))
4168 continue; 4152 continue;
@@ -4170,8 +4154,10 @@ static int sctp_copy_laddrs(struct sock *sk, __u16 port, void *to,
4170 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), 4154 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk),
4171 &temp); 4155 &temp);
4172 addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; 4156 addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len;
4173 if (space_left < addrlen) 4157 if (space_left < addrlen) {
4174 return -ENOMEM; 4158 cnt = -ENOMEM;
4159 break;
4160 }
4175 memcpy(to, &temp, addrlen); 4161 memcpy(to, &temp, addrlen);
4176 4162
4177 to += addrlen; 4163 to += addrlen;
@@ -4179,6 +4165,7 @@ static int sctp_copy_laddrs(struct sock *sk, __u16 port, void *to,
4179 space_left -= addrlen; 4165 space_left -= addrlen;
4180 *bytes_copied += addrlen; 4166 *bytes_copied += addrlen;
4181 } 4167 }
4168 rcu_read_unlock();
4182 4169
4183 return cnt; 4170 return cnt;
4184} 4171}
@@ -4191,7 +4178,6 @@ static int sctp_getsockopt_local_addrs_old(struct sock *sk, int len,
4191{ 4178{
4192 struct sctp_bind_addr *bp; 4179 struct sctp_bind_addr *bp;
4193 struct sctp_association *asoc; 4180 struct sctp_association *asoc;
4194 struct list_head *pos;
4195 int cnt = 0; 4181 int cnt = 0;
4196 struct sctp_getaddrs_old getaddrs; 4182 struct sctp_getaddrs_old getaddrs;
4197 struct sctp_sockaddr_entry *addr; 4183 struct sctp_sockaddr_entry *addr;
@@ -4199,7 +4185,6 @@ static int sctp_getsockopt_local_addrs_old(struct sock *sk, int len,
4199 union sctp_addr temp; 4185 union sctp_addr temp;
4200 struct sctp_sock *sp = sctp_sk(sk); 4186 struct sctp_sock *sp = sctp_sk(sk);
4201 int addrlen; 4187 int addrlen;
4202 rwlock_t *addr_lock;
4203 int err = 0; 4188 int err = 0;
4204 void *addrs; 4189 void *addrs;
4205 void *buf; 4190 void *buf;
@@ -4221,13 +4206,11 @@ static int sctp_getsockopt_local_addrs_old(struct sock *sk, int len,
4221 */ 4206 */
4222 if (0 == getaddrs.assoc_id) { 4207 if (0 == getaddrs.assoc_id) {
4223 bp = &sctp_sk(sk)->ep->base.bind_addr; 4208 bp = &sctp_sk(sk)->ep->base.bind_addr;
4224 addr_lock = &sctp_sk(sk)->ep->base.addr_lock;
4225 } else { 4209 } else {
4226 asoc = sctp_id2assoc(sk, getaddrs.assoc_id); 4210 asoc = sctp_id2assoc(sk, getaddrs.assoc_id);
4227 if (!asoc) 4211 if (!asoc)
4228 return -EINVAL; 4212 return -EINVAL;
4229 bp = &asoc->base.bind_addr; 4213 bp = &asoc->base.bind_addr;
4230 addr_lock = &asoc->base.addr_lock;
4231 } 4214 }
4232 4215
4233 to = getaddrs.addrs; 4216 to = getaddrs.addrs;
@@ -4241,8 +4224,6 @@ static int sctp_getsockopt_local_addrs_old(struct sock *sk, int len,
4241 if (!addrs) 4224 if (!addrs)
4242 return -ENOMEM; 4225 return -ENOMEM;
4243 4226
4244 sctp_read_lock(addr_lock);
4245
4246 /* If the endpoint is bound to 0.0.0.0 or ::0, get the valid 4227 /* If the endpoint is bound to 0.0.0.0 or ::0, get the valid
4247 * addresses from the global local address list. 4228 * addresses from the global local address list.
4248 */ 4229 */
@@ -4258,8 +4239,11 @@ static int sctp_getsockopt_local_addrs_old(struct sock *sk, int len,
4258 } 4239 }
4259 4240
4260 buf = addrs; 4241 buf = addrs;
4261 list_for_each(pos, &bp->address_list) { 4242 /* Protection on the bound address list is not needed since
4262 addr = list_entry(pos, struct sctp_sockaddr_entry, list); 4243 * in the socket option context we hold a socket lock and
4244 * thus the bound address list can't change.
4245 */
4246 list_for_each_entry(addr, &bp->address_list, list) {
4263 memcpy(&temp, &addr->a, sizeof(temp)); 4247 memcpy(&temp, &addr->a, sizeof(temp));
4264 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); 4248 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp);
4265 addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; 4249 addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len;
@@ -4271,8 +4255,6 @@ static int sctp_getsockopt_local_addrs_old(struct sock *sk, int len,
4271 } 4255 }
4272 4256
4273copy_getaddrs: 4257copy_getaddrs:
4274 sctp_read_unlock(addr_lock);
4275
4276 /* copy the entire address list into the user provided space */ 4258 /* copy the entire address list into the user provided space */
4277 if (copy_to_user(to, addrs, bytes_copied)) { 4259 if (copy_to_user(to, addrs, bytes_copied)) {
4278 err = -EFAULT; 4260 err = -EFAULT;
@@ -4294,7 +4276,6 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len,
4294{ 4276{
4295 struct sctp_bind_addr *bp; 4277 struct sctp_bind_addr *bp;
4296 struct sctp_association *asoc; 4278 struct sctp_association *asoc;
4297 struct list_head *pos;
4298 int cnt = 0; 4279 int cnt = 0;
4299 struct sctp_getaddrs getaddrs; 4280 struct sctp_getaddrs getaddrs;
4300 struct sctp_sockaddr_entry *addr; 4281 struct sctp_sockaddr_entry *addr;
@@ -4302,7 +4283,6 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len,
4302 union sctp_addr temp; 4283 union sctp_addr temp;
4303 struct sctp_sock *sp = sctp_sk(sk); 4284 struct sctp_sock *sp = sctp_sk(sk);
4304 int addrlen; 4285 int addrlen;
4305 rwlock_t *addr_lock;
4306 int err = 0; 4286 int err = 0;
4307 size_t space_left; 4287 size_t space_left;
4308 int bytes_copied = 0; 4288 int bytes_copied = 0;
@@ -4323,13 +4303,11 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len,
4323 */ 4303 */
4324 if (0 == getaddrs.assoc_id) { 4304 if (0 == getaddrs.assoc_id) {
4325 bp = &sctp_sk(sk)->ep->base.bind_addr; 4305 bp = &sctp_sk(sk)->ep->base.bind_addr;
4326 addr_lock = &sctp_sk(sk)->ep->base.addr_lock;
4327 } else { 4306 } else {
4328 asoc = sctp_id2assoc(sk, getaddrs.assoc_id); 4307 asoc = sctp_id2assoc(sk, getaddrs.assoc_id);
4329 if (!asoc) 4308 if (!asoc)
4330 return -EINVAL; 4309 return -EINVAL;
4331 bp = &asoc->base.bind_addr; 4310 bp = &asoc->base.bind_addr;
4332 addr_lock = &asoc->base.addr_lock;
4333 } 4311 }
4334 4312
4335 to = optval + offsetof(struct sctp_getaddrs,addrs); 4313 to = optval + offsetof(struct sctp_getaddrs,addrs);
@@ -4339,8 +4317,6 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len,
4339 if (!addrs) 4317 if (!addrs)
4340 return -ENOMEM; 4318 return -ENOMEM;
4341 4319
4342 sctp_read_lock(addr_lock);
4343
4344 /* If the endpoint is bound to 0.0.0.0 or ::0, get the valid 4320 /* If the endpoint is bound to 0.0.0.0 or ::0, get the valid
4345 * addresses from the global local address list. 4321 * addresses from the global local address list.
4346 */ 4322 */
@@ -4352,21 +4328,24 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len,
4352 space_left, &bytes_copied); 4328 space_left, &bytes_copied);
4353 if (cnt < 0) { 4329 if (cnt < 0) {
4354 err = cnt; 4330 err = cnt;
4355 goto error_lock; 4331 goto out;
4356 } 4332 }
4357 goto copy_getaddrs; 4333 goto copy_getaddrs;
4358 } 4334 }
4359 } 4335 }
4360 4336
4361 buf = addrs; 4337 buf = addrs;
4362 list_for_each(pos, &bp->address_list) { 4338 /* Protection on the bound address list is not needed since
4363 addr = list_entry(pos, struct sctp_sockaddr_entry, list); 4339 * in the socket option context we hold a socket lock and
4340 * thus the bound address list can't change.
4341 */
4342 list_for_each_entry(addr, &bp->address_list, list) {
4364 memcpy(&temp, &addr->a, sizeof(temp)); 4343 memcpy(&temp, &addr->a, sizeof(temp));
4365 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); 4344 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp);
4366 addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; 4345 addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len;
4367 if (space_left < addrlen) { 4346 if (space_left < addrlen) {
4368 err = -ENOMEM; /*fixme: right error?*/ 4347 err = -ENOMEM; /*fixme: right error?*/
4369 goto error_lock; 4348 goto out;
4370 } 4349 }
4371 memcpy(buf, &temp, addrlen); 4350 memcpy(buf, &temp, addrlen);
4372 buf += addrlen; 4351 buf += addrlen;
@@ -4376,8 +4355,6 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len,
4376 } 4355 }
4377 4356
4378copy_getaddrs: 4357copy_getaddrs:
4379 sctp_read_unlock(addr_lock);
4380
4381 if (copy_to_user(to, addrs, bytes_copied)) { 4358 if (copy_to_user(to, addrs, bytes_copied)) {
4382 err = -EFAULT; 4359 err = -EFAULT;
4383 goto out; 4360 goto out;
@@ -4388,12 +4365,6 @@ copy_getaddrs:
4388 } 4365 }
4389 if (put_user(bytes_copied, optlen)) 4366 if (put_user(bytes_copied, optlen))
4390 err = -EFAULT; 4367 err = -EFAULT;
4391
4392 goto out;
4393
4394error_lock:
4395 sctp_read_unlock(addr_lock);
4396
4397out: 4368out:
4398 kfree(addrs); 4369 kfree(addrs);
4399 return err; 4370 return err;
@@ -5202,6 +5173,7 @@ SCTP_STATIC int sctp_seqpacket_listen(struct sock *sk, int backlog)
5202 5173
5203 sctp_unhash_endpoint(ep); 5174 sctp_unhash_endpoint(ep);
5204 sk->sk_state = SCTP_SS_CLOSED; 5175 sk->sk_state = SCTP_SS_CLOSED;
5176 return 0;
5205 } 5177 }
5206 5178
5207 /* Return if we are already listening. */ 5179 /* Return if we are already listening. */
@@ -5249,6 +5221,7 @@ SCTP_STATIC int sctp_stream_listen(struct sock *sk, int backlog)
5249 5221
5250 sctp_unhash_endpoint(ep); 5222 sctp_unhash_endpoint(ep);
5251 sk->sk_state = SCTP_SS_CLOSED; 5223 sk->sk_state = SCTP_SS_CLOSED;
5224 return 0;
5252 } 5225 }
5253 5226
5254 if (sctp_sstate(sk, LISTENING)) 5227 if (sctp_sstate(sk, LISTENING))
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index 34eb977a20..fa0ba2a556 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -659,6 +659,46 @@ done:
659 return retval; 659 return retval;
660} 660}
661 661
662/*
663 * Flush out stale fragments from the reassembly queue when processing
664 * a Forward TSN.
665 *
666 * RFC 3758, Section 3.6
667 *
668 * After receiving and processing a FORWARD TSN, the data receiver MUST
669 * take cautions in updating its re-assembly queue. The receiver MUST
670 * remove any partially reassembled message, which is still missing one
671 * or more TSNs earlier than or equal to the new cumulative TSN point.
672 * In the event that the receiver has invoked the partial delivery API,
673 * a notification SHOULD also be generated to inform the upper layer API
674 * that the message being partially delivered will NOT be completed.
675 */
676void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *ulpq, __u32 fwd_tsn)
677{
678 struct sk_buff *pos, *tmp;
679 struct sctp_ulpevent *event;
680 __u32 tsn;
681
682 if (skb_queue_empty(&ulpq->reasm))
683 return;
684
685 skb_queue_walk_safe(&ulpq->reasm, pos, tmp) {
686 event = sctp_skb2event(pos);
687 tsn = event->tsn;
688
689 /* Since the entire message must be abandoned by the
690 * sender (item A3 in Section 3.5, RFC 3758), we can
691 * free all fragments on the list that are less then
692 * or equal to ctsn_point
693 */
694 if (TSN_lte(tsn, fwd_tsn)) {
695 __skb_unlink(pos, &ulpq->reasm);
696 sctp_ulpevent_free(event);
697 } else
698 break;
699 }
700}
701
662/* Helper function to gather skbs that have possibly become 702/* Helper function to gather skbs that have possibly become
663 * ordered by an an incoming chunk. 703 * ordered by an an incoming chunk.
664 */ 704 */
@@ -794,7 +834,7 @@ static struct sctp_ulpevent *sctp_ulpq_order(struct sctp_ulpq *ulpq,
794/* Helper function to gather skbs that have possibly become 834/* Helper function to gather skbs that have possibly become
795 * ordered by forward tsn skipping their dependencies. 835 * ordered by forward tsn skipping their dependencies.
796 */ 836 */
797static inline void sctp_ulpq_reap_ordered(struct sctp_ulpq *ulpq) 837static inline void sctp_ulpq_reap_ordered(struct sctp_ulpq *ulpq, __u16 sid)
798{ 838{
799 struct sk_buff *pos, *tmp; 839 struct sk_buff *pos, *tmp;
800 struct sctp_ulpevent *cevent; 840 struct sctp_ulpevent *cevent;
@@ -813,31 +853,40 @@ static inline void sctp_ulpq_reap_ordered(struct sctp_ulpq *ulpq)
813 csid = cevent->stream; 853 csid = cevent->stream;
814 cssn = cevent->ssn; 854 cssn = cevent->ssn;
815 855
816 if (cssn != sctp_ssn_peek(in, csid)) 856 /* Have we gone too far? */
857 if (csid > sid)
817 break; 858 break;
818 859
819 /* Found it, so mark in the ssnmap. */ 860 /* Have we not gone far enough? */
820 sctp_ssn_next(in, csid); 861 if (csid < sid)
862 continue;
863
864 /* see if this ssn has been marked by skipping */
865 if (!SSN_lt(cssn, sctp_ssn_peek(in, csid)))
866 break;
821 867
822 __skb_unlink(pos, &ulpq->lobby); 868 __skb_unlink(pos, &ulpq->lobby);
823 if (!event) { 869 if (!event)
824 /* Create a temporary list to collect chunks on. */ 870 /* Create a temporary list to collect chunks on. */
825 event = sctp_skb2event(pos); 871 event = sctp_skb2event(pos);
826 __skb_queue_tail(&temp, sctp_event2skb(event)); 872
827 } else { 873 /* Attach all gathered skbs to the event. */
828 /* Attach all gathered skbs to the event. */ 874 __skb_queue_tail(&temp, pos);
829 __skb_queue_tail(&temp, pos);
830 }
831 } 875 }
832 876
833 /* Send event to the ULP. 'event' is the sctp_ulpevent for 877 /* Send event to the ULP. 'event' is the sctp_ulpevent for
834 * very first SKB on the 'temp' list. 878 * very first SKB on the 'temp' list.
835 */ 879 */
836 if (event) 880 if (event) {
881 /* see if we have more ordered that we can deliver */
882 sctp_ulpq_retrieve_ordered(ulpq, event);
837 sctp_ulpq_tail_event(ulpq, event); 883 sctp_ulpq_tail_event(ulpq, event);
884 }
838} 885}
839 886
840/* Skip over an SSN. */ 887/* Skip over an SSN. This is used during the processing of
888 * Forwared TSN chunk to skip over the abandoned ordered data
889 */
841void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn) 890void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn)
842{ 891{
843 struct sctp_stream *in; 892 struct sctp_stream *in;
@@ -855,7 +904,7 @@ void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn)
855 /* Go find any other chunks that were waiting for 904 /* Go find any other chunks that were waiting for
856 * ordering and deliver them if needed. 905 * ordering and deliver them if needed.
857 */ 906 */
858 sctp_ulpq_reap_ordered(ulpq); 907 sctp_ulpq_reap_ordered(ulpq, sid);
859 return; 908 return;
860} 909}
861 910
diff --git a/net/socket.c b/net/socket.c
index 7d44453dfa..b09eb9036a 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -777,9 +777,6 @@ static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov,
777 if (pos != 0) 777 if (pos != 0)
778 return -ESPIPE; 778 return -ESPIPE;
779 779
780 if (iocb->ki_left == 0) /* Match SYS5 behaviour */
781 return 0;
782
783 x = alloc_sock_iocb(iocb, &siocb); 780 x = alloc_sock_iocb(iocb, &siocb);
784 if (!x) 781 if (!x)
785 return -ENOMEM; 782 return -ENOMEM;
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 12ff5da816..036ab520df 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1110,7 +1110,8 @@ svc_tcp_accept(struct svc_sock *svsk)
1110 serv->sv_name); 1110 serv->sv_name);
1111 printk(KERN_NOTICE 1111 printk(KERN_NOTICE
1112 "%s: last TCP connect from %s\n", 1112 "%s: last TCP connect from %s\n",
1113 serv->sv_name, buf); 1113 serv->sv_name, __svc_print_addr(sin,
1114 buf, sizeof(buf)));
1114 } 1115 }
1115 /* 1116 /*
1116 * Always select the oldest socket. It's not fair, 1117 * Always select the oldest socket. It's not fair,
@@ -1592,7 +1593,7 @@ svc_age_temp_sockets(unsigned long closure)
1592 1593
1593 if (!test_and_set_bit(SK_OLD, &svsk->sk_flags)) 1594 if (!test_and_set_bit(SK_OLD, &svsk->sk_flags))
1594 continue; 1595 continue;
1595 if (atomic_read(&svsk->sk_inuse) || test_bit(SK_BUSY, &svsk->sk_flags)) 1596 if (atomic_read(&svsk->sk_inuse) > 1 || test_bit(SK_BUSY, &svsk->sk_flags))
1596 continue; 1597 continue;
1597 atomic_inc(&svsk->sk_inuse); 1598 atomic_inc(&svsk->sk_inuse);
1598 list_move(le, &to_be_aged); 1599 list_move(le, &to_be_aged);
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 7eabd55417..9771451eae 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -213,7 +213,7 @@ out_fail_notifier:
213out_fail_sysfs: 213out_fail_sysfs:
214 return err; 214 return err;
215} 215}
216module_init(cfg80211_init); 216subsys_initcall(cfg80211_init);
217 217
218static void cfg80211_exit(void) 218static void cfg80211_exit(void)
219{ 219{
diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c
index 88aaacd9f8..2d5d2255a2 100644
--- a/net/wireless/sysfs.c
+++ b/net/wireless/sysfs.c
@@ -52,12 +52,14 @@ static void wiphy_dev_release(struct device *dev)
52 cfg80211_dev_free(rdev); 52 cfg80211_dev_free(rdev);
53} 53}
54 54
55#ifdef CONFIG_HOTPLUG
55static int wiphy_uevent(struct device *dev, char **envp, 56static int wiphy_uevent(struct device *dev, char **envp,
56 int num_envp, char *buf, int size) 57 int num_envp, char *buf, int size)
57{ 58{
58 /* TODO, we probably need stuff here */ 59 /* TODO, we probably need stuff here */
59 return 0; 60 return 0;
60} 61}
62#endif
61 63
62struct class ieee80211_class = { 64struct class ieee80211_class = {
63 .name = "ieee80211", 65 .name = "ieee80211",
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 8be6a4269e..a38787a881 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -72,7 +72,7 @@ static void check_stdin(void)
72 } 72 }
73} 73}
74 74
75static void conf_askvalue(struct symbol *sym, const char *def) 75static int conf_askvalue(struct symbol *sym, const char *def)
76{ 76{
77 enum symbol_type type = sym_get_type(sym); 77 enum symbol_type type = sym_get_type(sym);
78 tristate val; 78 tristate val;
@@ -87,7 +87,7 @@ static void conf_askvalue(struct symbol *sym, const char *def)
87 printf("%s\n", def); 87 printf("%s\n", def);
88 line[0] = '\n'; 88 line[0] = '\n';
89 line[1] = 0; 89 line[1] = 0;
90 return; 90 return 0;
91 } 91 }
92 92
93 switch (input_mode) { 93 switch (input_mode) {
@@ -97,23 +97,23 @@ static void conf_askvalue(struct symbol *sym, const char *def)
97 case set_random: 97 case set_random:
98 if (sym_has_value(sym)) { 98 if (sym_has_value(sym)) {
99 printf("%s\n", def); 99 printf("%s\n", def);
100 return; 100 return 0;
101 } 101 }
102 break; 102 break;
103 case ask_new: 103 case ask_new:
104 case ask_silent: 104 case ask_silent:
105 if (sym_has_value(sym)) { 105 if (sym_has_value(sym)) {
106 printf("%s\n", def); 106 printf("%s\n", def);
107 return; 107 return 0;
108 } 108 }
109 check_stdin(); 109 check_stdin();
110 case ask_all: 110 case ask_all:
111 fflush(stdout); 111 fflush(stdout);
112 fgets(line, 128, stdin); 112 fgets(line, 128, stdin);
113 return; 113 return 1;
114 case set_default: 114 case set_default:
115 printf("%s\n", def); 115 printf("%s\n", def);
116 return; 116 return 1;
117 default: 117 default:
118 break; 118 break;
119 } 119 }
@@ -123,7 +123,7 @@ static void conf_askvalue(struct symbol *sym, const char *def)
123 case S_HEX: 123 case S_HEX:
124 case S_STRING: 124 case S_STRING:
125 printf("%s\n", def); 125 printf("%s\n", def);
126 return; 126 return 1;
127 default: 127 default:
128 ; 128 ;
129 } 129 }
@@ -174,6 +174,7 @@ static void conf_askvalue(struct symbol *sym, const char *def)
174 break; 174 break;
175 } 175 }
176 printf("%s", line); 176 printf("%s", line);
177 return 1;
177} 178}
178 179
179int conf_string(struct menu *menu) 180int conf_string(struct menu *menu)
@@ -187,7 +188,8 @@ int conf_string(struct menu *menu)
187 def = sym_get_string_value(sym); 188 def = sym_get_string_value(sym);
188 if (sym_get_string_value(sym)) 189 if (sym_get_string_value(sym))
189 printf("[%s] ", def); 190 printf("[%s] ", def);
190 conf_askvalue(sym, def); 191 if (!conf_askvalue(sym, def))
192 return 0;
191 switch (line[0]) { 193 switch (line[0]) {
192 case '\n': 194 case '\n':
193 break; 195 break;
@@ -240,7 +242,8 @@ static int conf_sym(struct menu *menu)
240 if (menu_has_help(menu)) 242 if (menu_has_help(menu))
241 printf("/?"); 243 printf("/?");
242 printf("] "); 244 printf("] ");
243 conf_askvalue(sym, sym_get_string_value(sym)); 245 if (!conf_askvalue(sym, sym_get_string_value(sym)))
246 return 0;
244 strip(line); 247 strip(line);
245 248
246 switch (line[0]) { 249 switch (line[0]) {
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index d8bc417281..0753b20e23 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -316,6 +316,7 @@ static inline int inode_doinit(struct inode *inode)
316} 316}
317 317
318enum { 318enum {
319 Opt_error = -1,
319 Opt_context = 1, 320 Opt_context = 1,
320 Opt_fscontext = 2, 321 Opt_fscontext = 2,
321 Opt_defcontext = 4, 322 Opt_defcontext = 4,
@@ -327,6 +328,7 @@ static match_table_t tokens = {
327 {Opt_fscontext, "fscontext=%s"}, 328 {Opt_fscontext, "fscontext=%s"},
328 {Opt_defcontext, "defcontext=%s"}, 329 {Opt_defcontext, "defcontext=%s"},
329 {Opt_rootcontext, "rootcontext=%s"}, 330 {Opt_rootcontext, "rootcontext=%s"},
331 {Opt_error, NULL},
330}; 332};
331 333
332#define SEL_MOUNT_FAIL_MSG "SELinux: duplicate or incompatible mount options\n" 334#define SEL_MOUNT_FAIL_MSG "SELinux: duplicate or incompatible mount options\n"
@@ -1907,6 +1909,9 @@ static void selinux_bprm_post_apply_creds(struct linux_binprm *bprm)
1907 spin_unlock_irq(&current->sighand->siglock); 1909 spin_unlock_irq(&current->sighand->siglock);
1908 } 1910 }
1909 1911
1912 /* Always clear parent death signal on SID transitions. */
1913 current->pdeath_signal = 0;
1914
1910 /* Check whether the new SID can inherit resource limits 1915 /* Check whether the new SID can inherit resource limits
1911 from the old SID. If not, reset all soft limits to 1916 from the old SID. If not, reset all soft limits to
1912 the lower of the current task's hard limit and the init 1917 the lower of the current task's hard limit and the init
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
index f057430db0..9b5656d8bc 100644
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@ -27,6 +27,7 @@
27#include <linux/pci.h> 27#include <linux/pci.h>
28#include <linux/slab.h> 28#include <linux/slab.h>
29#include <linux/mm.h> 29#include <linux/mm.h>
30#include <linux/seq_file.h>
30#include <asm/uaccess.h> 31#include <asm/uaccess.h>
31#include <linux/dma-mapping.h> 32#include <linux/dma-mapping.h>
32#include <linux/moduleparam.h> 33#include <linux/moduleparam.h>
@@ -481,53 +482,54 @@ static void free_all_reserved_pages(void)
481#define SND_MEM_PROC_FILE "driver/snd-page-alloc" 482#define SND_MEM_PROC_FILE "driver/snd-page-alloc"
482static struct proc_dir_entry *snd_mem_proc; 483static struct proc_dir_entry *snd_mem_proc;
483 484
484static int snd_mem_proc_read(char *page, char **start, off_t off, 485static int snd_mem_proc_read(struct seq_file *seq, void *offset)
485 int count, int *eof, void *data)
486{ 486{
487 int len = 0;
488 long pages = snd_allocated_pages >> (PAGE_SHIFT-12); 487 long pages = snd_allocated_pages >> (PAGE_SHIFT-12);
489 struct snd_mem_list *mem; 488 struct snd_mem_list *mem;
490 int devno; 489 int devno;
491 static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG", "SBUS" }; 490 static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG", "SBUS" };
492 491
493 mutex_lock(&list_mutex); 492 mutex_lock(&list_mutex);
494 len += snprintf(page + len, count - len, 493 seq_printf(seq, "pages : %li bytes (%li pages per %likB)\n",
495 "pages : %li bytes (%li pages per %likB)\n", 494 pages * PAGE_SIZE, pages, PAGE_SIZE / 1024);
496 pages * PAGE_SIZE, pages, PAGE_SIZE / 1024);
497 devno = 0; 495 devno = 0;
498 list_for_each_entry(mem, &mem_list_head, list) { 496 list_for_each_entry(mem, &mem_list_head, list) {
499 devno++; 497 devno++;
500 len += snprintf(page + len, count - len, 498 seq_printf(seq, "buffer %d : ID %08x : type %s\n",
501 "buffer %d : ID %08x : type %s\n", 499 devno, mem->id, types[mem->buffer.dev.type]);
502 devno, mem->id, types[mem->buffer.dev.type]); 500 seq_printf(seq, " addr = 0x%lx, size = %d bytes\n",
503 len += snprintf(page + len, count - len, 501 (unsigned long)mem->buffer.addr,
504 " addr = 0x%lx, size = %d bytes\n", 502 (int)mem->buffer.bytes);
505 (unsigned long)mem->buffer.addr, (int)mem->buffer.bytes);
506 } 503 }
507 mutex_unlock(&list_mutex); 504 mutex_unlock(&list_mutex);
508 return len; 505 return 0;
506}
507
508static int snd_mem_proc_open(struct inode *inode, struct file *file)
509{
510 return single_open(file, snd_mem_proc_read, NULL);
509} 511}
510 512
511/* FIXME: for pci only - other bus? */ 513/* FIXME: for pci only - other bus? */
512#ifdef CONFIG_PCI 514#ifdef CONFIG_PCI
513#define gettoken(bufp) strsep(bufp, " \t\n") 515#define gettoken(bufp) strsep(bufp, " \t\n")
514 516
515static int snd_mem_proc_write(struct file *file, const char __user *buffer, 517static ssize_t snd_mem_proc_write(struct file *file, const char __user * buffer,
516 unsigned long count, void *data) 518 size_t count, loff_t * ppos)
517{ 519{
518 char buf[128]; 520 char buf[128];
519 char *token, *p; 521 char *token, *p;
520 522
521 if (count > ARRAY_SIZE(buf) - 1) 523 if (count > sizeof(buf) - 1)
522 count = ARRAY_SIZE(buf) - 1; 524 return -EINVAL;
523 if (copy_from_user(buf, buffer, count)) 525 if (copy_from_user(buf, buffer, count))
524 return -EFAULT; 526 return -EFAULT;
525 buf[ARRAY_SIZE(buf) - 1] = '\0'; 527 buf[count] = '\0';
526 528
527 p = buf; 529 p = buf;
528 token = gettoken(&p); 530 token = gettoken(&p);
529 if (! token || *token == '#') 531 if (! token || *token == '#')
530 return (int)count; 532 return count;
531 if (strcmp(token, "add") == 0) { 533 if (strcmp(token, "add") == 0) {
532 char *endp; 534 char *endp;
533 int vendor, device, size, buffers; 535 int vendor, device, size, buffers;
@@ -548,7 +550,7 @@ static int snd_mem_proc_write(struct file *file, const char __user *buffer,
548 (buffers = simple_strtol(token, NULL, 0)) <= 0 || 550 (buffers = simple_strtol(token, NULL, 0)) <= 0 ||
549 buffers > 4) { 551 buffers > 4) {
550 printk(KERN_ERR "snd-page-alloc: invalid proc write format\n"); 552 printk(KERN_ERR "snd-page-alloc: invalid proc write format\n");
551 return (int)count; 553 return count;
552 } 554 }
553 vendor &= 0xffff; 555 vendor &= 0xffff;
554 device &= 0xffff; 556 device &= 0xffff;
@@ -560,7 +562,7 @@ static int snd_mem_proc_write(struct file *file, const char __user *buffer,
560 if (pci_set_dma_mask(pci, mask) < 0 || 562 if (pci_set_dma_mask(pci, mask) < 0 ||
561 pci_set_consistent_dma_mask(pci, mask) < 0) { 563 pci_set_consistent_dma_mask(pci, mask) < 0) {
562 printk(KERN_ERR "snd-page-alloc: cannot set DMA mask %lx for pci %04x:%04x\n", mask, vendor, device); 564 printk(KERN_ERR "snd-page-alloc: cannot set DMA mask %lx for pci %04x:%04x\n", mask, vendor, device);
563 return (int)count; 565 return count;
564 } 566 }
565 } 567 }
566 for (i = 0; i < buffers; i++) { 568 for (i = 0; i < buffers; i++) {
@@ -570,7 +572,7 @@ static int snd_mem_proc_write(struct file *file, const char __user *buffer,
570 size, &dmab) < 0) { 572 size, &dmab) < 0) {
571 printk(KERN_ERR "snd-page-alloc: cannot allocate buffer pages (size = %d)\n", size); 573 printk(KERN_ERR "snd-page-alloc: cannot allocate buffer pages (size = %d)\n", size);
572 pci_dev_put(pci); 574 pci_dev_put(pci);
573 return (int)count; 575 return count;
574 } 576 }
575 snd_dma_reserve_buf(&dmab, snd_dma_pci_buf_id(pci)); 577 snd_dma_reserve_buf(&dmab, snd_dma_pci_buf_id(pci));
576 } 578 }
@@ -596,9 +598,21 @@ static int snd_mem_proc_write(struct file *file, const char __user *buffer,
596 free_all_reserved_pages(); 598 free_all_reserved_pages();
597 else 599 else
598 printk(KERN_ERR "snd-page-alloc: invalid proc cmd\n"); 600 printk(KERN_ERR "snd-page-alloc: invalid proc cmd\n");
599 return (int)count; 601 return count;
600} 602}
601#endif /* CONFIG_PCI */ 603#endif /* CONFIG_PCI */
604
605static const struct file_operations snd_mem_proc_fops = {
606 .owner = THIS_MODULE,
607 .open = snd_mem_proc_open,
608 .read = seq_read,
609#ifdef CONFIG_PCI
610 .write = snd_mem_proc_write,
611#endif
612 .llseek = seq_lseek,
613 .release = single_release,
614};
615
602#endif /* CONFIG_PROC_FS */ 616#endif /* CONFIG_PROC_FS */
603 617
604/* 618/*
@@ -609,12 +623,8 @@ static int __init snd_mem_init(void)
609{ 623{
610#ifdef CONFIG_PROC_FS 624#ifdef CONFIG_PROC_FS
611 snd_mem_proc = create_proc_entry(SND_MEM_PROC_FILE, 0644, NULL); 625 snd_mem_proc = create_proc_entry(SND_MEM_PROC_FILE, 0644, NULL);
612 if (snd_mem_proc) { 626 if (snd_mem_proc)
613 snd_mem_proc->read_proc = snd_mem_proc_read; 627 snd_mem_proc->proc_fops = &snd_mem_proc_fops;
614#ifdef CONFIG_PCI
615 snd_mem_proc->write_proc = snd_mem_proc_write;
616#endif
617 }
618#endif 628#endif
619 return 0; 629 return 0;
620} 630}