From 53fbae39dd89a66678216f428cd43d24782474a4 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 4 Feb 2008 23:49:54 -0500 Subject: [PATCH] --- yaml --- r: 82811 b: refs/heads/master c: f35d9d8aae08940b7fdd1bb8110619da2ece6b28 h: refs/heads/master i: 82809: 0c68ad0bbe8a57785fdbc84135e227697e4ed71c 82807: edf9ca49734618cf57caa77d4f3943bf81171efe v: v3 --- [refs] | 2 +- trunk/CREDITS | 7 +- trunk/Documentation/00-INDEX | 4 +- trunk/Documentation/BUG-HUNTING | 22 +- trunk/Documentation/SubmittingPatches | 16 +- trunk/Documentation/arm/Sharp-LH/IOBarrier | 2 +- trunk/Documentation/debugging-modules.txt | 4 - trunk/Documentation/driver-model/platform.txt | 6 +- .../filesystems/configfs/configfs.txt | 2 +- trunk/Documentation/filesystems/porting | 6 +- trunk/Documentation/filesystems/proc.txt | 1 - .../filesystems/ramfs-rootfs-initramfs.txt | 2 +- trunk/Documentation/filesystems/relay.txt | 2 +- .../{ => fujitsu}/frv/README.txt | 0 .../{ => fujitsu}/frv/atomic-ops.txt | 0 .../{ => fujitsu}/frv/booting.txt | 2 +- .../Documentation/{ => fujitsu}/frv/clock.txt | 0 .../{ => fujitsu}/frv/configuring.txt | 0 .../{ => fujitsu}/frv/features.txt | 0 trunk/Documentation/{ => fujitsu}/frv/gdbinit | 0 .../{ => fujitsu}/frv/gdbstub.txt | 0 .../{ => fujitsu}/frv/kernel-ABI.txt | 0 .../{ => fujitsu}/frv/mmu-layout.txt | 0 trunk/Documentation/initrd.txt | 2 +- .../ja_JP/stable_kernel_rules.txt | 79 -- trunk/Documentation/kernel-parameters.txt | 21 +- trunk/Documentation/networking/decnet.txt | 2 +- trunk/Documentation/smp.txt | 22 + trunk/MAINTAINERS | 38 +- trunk/Makefile | 2 +- trunk/arch/Kconfig | 31 - trunk/arch/alpha/Kconfig | 7 +- trunk/arch/arm/Kconfig | 24 +- trunk/arch/arm/Kconfig.instrumentation | 62 ++ trunk/arch/arm/mach-pxa/corgi_ssp.c | 2 +- trunk/arch/arm/mach-sa1100/collie_pm.c | 2 +- trunk/arch/arm/plat-s3c24xx/irq.c | 2 +- trunk/arch/avr32/Kconfig | 7 +- trunk/arch/blackfin/Kconfig | 3 +- trunk/arch/cris/Kconfig | 2 + trunk/arch/frv/Kconfig | 4 +- trunk/arch/frv/kernel/entry.S | 4 +- trunk/arch/frv/lib/atomic-ops.S | 2 +- trunk/arch/h8300/Kconfig | 2 + trunk/arch/h8300/platform/h8s/ints.c | 2 +- trunk/arch/ia64/Kconfig | 8 +- trunk/arch/m32r/Kconfig | 6 +- trunk/arch/m32r/kernel/ptrace.c | 2 +- trunk/arch/m68k/Kconfig | 2 + trunk/arch/m68knommu/Kconfig | 2 + trunk/arch/mips/Kconfig | 7 +- trunk/arch/mips/au1000/mtx-1/board_setup.c | 2 +- trunk/arch/mips/kernel/binfmt_elfn32.c | 2 +- trunk/arch/mips/kernel/binfmt_elfo32.c | 2 +- trunk/arch/mips/kernel/kspd.c | 2 +- trunk/arch/mips/kernel/setup.c | 4 +- trunk/arch/mips/kernel/smtc.c | 6 +- trunk/arch/mips/mm/c-r4k.c | 2 +- trunk/arch/mips/sgi-ip27/ip27-hubio.c | 2 +- trunk/arch/parisc/Kconfig | 8 +- trunk/arch/parisc/kernel/cache.c | 2 +- trunk/arch/parisc/kernel/hardware.c | 2 +- trunk/arch/parisc/kernel/signal.c | 2 +- trunk/arch/powerpc/Kconfig | 4 +- trunk/arch/ppc/Kconfig | 4 +- trunk/arch/s390/Kconfig | 8 +- trunk/arch/sh/Kconfig | 8 +- trunk/arch/sparc/Kconfig | 8 +- trunk/arch/sparc/kernel/ioport.c | 4 +- trunk/arch/sparc64/Kconfig | 9 +- trunk/arch/um/Kconfig | 2 + trunk/arch/um/sys-x86_64/signal.c | 2 +- trunk/arch/v850/Kconfig | 2 + trunk/arch/x86/Kconfig | 11 +- trunk/arch/x86/lib/bitops_32.c | 2 +- trunk/arch/x86/lib/bitops_64.c | 2 +- trunk/arch/xtensa/Kconfig | 2 + trunk/drivers/acpi/scan.c | 2 +- trunk/drivers/acpi/utilities/utresrc.c | 2 +- trunk/drivers/ata/ata_piix.c | 2 +- trunk/drivers/ata/libata-core.c | 2 +- trunk/drivers/ata/pata_at32.c | 2 +- trunk/drivers/ata/pata_efar.c | 2 +- trunk/drivers/ata/pata_it8213.c | 2 +- trunk/drivers/ata/pata_sis.c | 4 +- trunk/drivers/base/core.c | 40 +- trunk/drivers/base/driver.c | 9 +- trunk/drivers/base/power/main.c | 1 - trunk/drivers/base/power/power.h | 1 + trunk/drivers/block/cciss_scsi.c | 4 +- trunk/drivers/bluetooth/btuart_cs.c | 2 +- trunk/drivers/char/drm/drm_vm.c | 2 - trunk/drivers/char/drm/r300_reg.h | 2 +- trunk/drivers/char/drm/via_dma.c | 2 +- trunk/drivers/char/efirtc.c | 2 +- trunk/drivers/char/epca.c | 4 +- trunk/drivers/char/hangcheck-timer.c | 2 +- trunk/drivers/char/hvcs.c | 2 +- trunk/drivers/char/ip2/i2lib.c | 2 +- trunk/drivers/char/ip2/ip2main.c | 2 +- trunk/drivers/char/mspec.c | 2 +- trunk/drivers/char/nozomi.c | 172 ++-- trunk/drivers/char/synclink.c | 2 +- trunk/drivers/char/toshiba.c | 2 +- trunk/drivers/dio/dio-driver.c | 70 +- trunk/drivers/edac/edac_pci.c | 2 +- trunk/drivers/edac/i5000_edac.c | 2 +- trunk/drivers/firmware/edd.c | 2 +- trunk/drivers/ide/ide-timing.h | 2 +- trunk/drivers/input/gameport/gameport.c | 1 + trunk/drivers/input/keyboard/bf54x-keys.c | 1 + trunk/drivers/input/keyboard/jornada720_kbd.c | 1 + trunk/drivers/input/serio/gscps2.c | 2 +- trunk/drivers/isdn/hardware/eicon/debuglib.c | 2 +- trunk/drivers/isdn/hardware/eicon/debuglib.h | 2 +- trunk/drivers/isdn/hardware/eicon/di.c | 2 +- trunk/drivers/isdn/hardware/eicon/message.c | 2 +- trunk/drivers/isdn/hysdn/hycapi.c | 2 +- trunk/drivers/macintosh/adb.c | 1 - trunk/drivers/macintosh/smu.c | 4 +- trunk/drivers/media/common/saa7146_core.c | 2 +- trunk/drivers/media/dvb/dvb-core/dvb_net.c | 2 +- trunk/drivers/media/video/bt8xx/bttv-cards.c | 2 +- trunk/drivers/media/video/indycam.c | 2 +- trunk/drivers/media/video/mt20xx.c | 2 +- trunk/drivers/media/video/pvrusb2/pvrusb2.h | 2 +- trunk/drivers/media/video/pwc/pwc-if.c | 2 +- trunk/drivers/media/video/tea6420.c | 2 +- .../media/video/usbvideo/quickcam_messenger.c | 2 +- .../media/video/usbvision/usbvision-video.c | 2 +- trunk/drivers/media/video/vpx3220.c | 2 +- trunk/drivers/media/video/zoran_card.c | 2 +- trunk/drivers/media/video/zr36050.c | 2 +- trunk/drivers/media/video/zr36060.c | 2 +- .../drivers/message/fusion/lsi/mpi_log_sas.h | 2 +- trunk/drivers/message/fusion/mptctl.c | 8 +- trunk/drivers/message/fusion/mptscsih.c | 2 +- trunk/drivers/message/i2o/iop.c | 2 +- trunk/drivers/mtd/devices/doc2000.c | 2 +- trunk/drivers/mtd/nand/autcpu12.c | 6 +- trunk/drivers/mtd/nand/bf5xx_nand.c | 2 +- trunk/drivers/mtd/nand/cs553x_nand.c | 2 +- trunk/drivers/mtd/nand/edb7312.c | 2 +- trunk/drivers/mtd/nand/nand_base.c | 2 +- trunk/drivers/mtd/nand/nandsim.c | 2 +- trunk/drivers/mtd/nand/s3c2410.c | 2 +- trunk/drivers/mtd/nand/sharpsl.c | 2 +- trunk/drivers/mtd/nftlmount.c | 2 +- trunk/drivers/net/Kconfig | 11 +- trunk/drivers/net/arm/at91_ether.c | 2 +- trunk/drivers/net/ax88796.c | 40 +- trunk/drivers/net/bfin_mac.c | 107 +-- trunk/drivers/net/bfin_mac.h | 31 +- trunk/drivers/net/bonding/bond_main.c | 106 ++- trunk/drivers/net/bonding/bonding.h | 4 +- trunk/drivers/net/cxgb3/mc5.c | 2 +- trunk/drivers/net/cxgb3/sge.c | 2 +- trunk/drivers/net/cxgb3/t3_hw.c | 22 +- trunk/drivers/net/e100.c | 18 +- trunk/drivers/net/e1000/e1000_main.c | 2 +- trunk/drivers/net/e1000e/defines.h | 1 - trunk/drivers/net/e1000e/ethtool.c | 17 +- trunk/drivers/net/e1000e/netdev.c | 12 +- trunk/drivers/net/eexpress.c | 2 +- trunk/drivers/net/ehea/ehea.h | 3 - trunk/drivers/net/ehea/ehea_ethtool.c | 4 +- trunk/drivers/net/ehea/ehea_hw.h | 8 +- trunk/drivers/net/ehea/ehea_main.c | 124 ++- trunk/drivers/net/ehea/ehea_phyp.c | 158 ++-- trunk/drivers/net/ehea/ehea_phyp.h | 22 +- trunk/drivers/net/ehea/ehea_qmr.c | 32 +- trunk/drivers/net/ehea/ehea_qmr.h | 16 +- trunk/drivers/net/forcedeth.c | 61 +- trunk/drivers/net/ibmlana.c | 4 +- trunk/drivers/net/igb/igb_main.c | 1 + trunk/drivers/net/irda/ali-ircc.h | 4 +- trunk/drivers/net/irda/nsc-ircc.h | 4 +- trunk/drivers/net/irda/via-ircc.h | 4 +- trunk/drivers/net/lib8390.c | 2 +- trunk/drivers/net/macb.c | 9 +- trunk/drivers/net/mipsnet.c | 203 ++--- trunk/drivers/net/mipsnet.h | 112 +++ trunk/drivers/net/natsemi.c | 18 +- trunk/drivers/net/pasemi_mac.c | 259 ++---- trunk/drivers/net/pasemi_mac.h | 16 - trunk/drivers/net/pci-skeleton.c | 49 +- trunk/drivers/net/phy/Kconfig | 5 - trunk/drivers/net/phy/Makefile | 1 - trunk/drivers/net/phy/broadcom.c | 20 - trunk/drivers/net/phy/mdio_bus.c | 2 +- trunk/drivers/net/phy/phy.c | 68 +- trunk/drivers/net/phy/phy_device.c | 11 +- trunk/drivers/net/phy/realtek.c | 80 -- trunk/drivers/net/s2io.c | 20 +- trunk/drivers/net/s2io.h | 2 +- trunk/drivers/net/sis190.c | 2 +- trunk/drivers/net/skfp/ess.c | 2 +- trunk/drivers/net/skfp/fplustm.c | 2 +- trunk/drivers/net/skfp/hwmtm.c | 2 +- trunk/drivers/net/sky2.c | 14 +- trunk/drivers/net/sunbmac.c | 2 +- trunk/drivers/net/sunqe.c | 6 +- trunk/drivers/net/sunvnet.c | 2 +- trunk/drivers/net/tokenring/abyss.c | 2 +- trunk/drivers/net/tokenring/abyss.h | 2 +- trunk/drivers/net/tokenring/madgemc.c | 2 +- trunk/drivers/net/tokenring/madgemc.h | 2 +- trunk/drivers/net/tokenring/olympic.c | 2 +- trunk/drivers/net/tokenring/proteon.c | 2 +- trunk/drivers/net/tokenring/skisa.c | 2 +- trunk/drivers/net/tokenring/tms380tr.c | 2 +- trunk/drivers/net/tokenring/tms380tr.h | 2 +- trunk/drivers/net/tokenring/tmspci.c | 2 +- trunk/drivers/net/ucc_geth.c | 37 +- trunk/drivers/net/usb/rtl8150.c | 1 + trunk/drivers/net/via-rhine.c | 2 +- trunk/drivers/net/via-velocity.c | 70 +- trunk/drivers/net/via-velocity.h | 224 ++--- trunk/drivers/net/virtio_net.c | 11 +- trunk/drivers/net/wan/cycx_drv.c | 4 +- trunk/drivers/net/wireless/ath5k/base.c | 6 +- trunk/drivers/net/wireless/iwlwifi/iwl-3945.c | 7 +- trunk/drivers/net/wireless/iwlwifi/iwl-4965.c | 23 +- .../net/wireless/iwlwifi/iwl-helpers.h | 3 + .../net/wireless/iwlwifi/iwl3945-base.c | 10 +- .../net/wireless/iwlwifi/iwl4965-base.c | 10 +- trunk/drivers/net/wireless/libertas/scan.c | 2 +- trunk/drivers/nubus/nubus.c | 2 +- trunk/drivers/parisc/ccio-dma.c | 4 +- trunk/drivers/parisc/hppb.c | 2 +- trunk/drivers/parport/probe.c | 2 +- trunk/drivers/pci/Makefile | 3 - trunk/drivers/pci/hotplug-pci.c | 20 - trunk/drivers/pci/pci-sysfs.c | 5 + trunk/drivers/pci/pci.c | 4 + trunk/drivers/pci/pcie/Kconfig | 20 + trunk/drivers/pci/pcie/Makefile | 3 + trunk/drivers/pci/pcie/aspm.c | 802 ++++++++++++++++++ trunk/drivers/pci/probe.c | 24 +- trunk/drivers/pci/remove.c | 4 + trunk/drivers/pci/setup-bus.c | 4 +- trunk/drivers/pcmcia/m32r_pcc.c | 2 +- trunk/drivers/pcmcia/m8xx_pcmcia.c | 2 +- trunk/drivers/scsi/NCR53C9x.h | 2 +- trunk/drivers/scsi/aha1542.c | 2 +- trunk/drivers/scsi/aic7xxx/Makefile | 9 +- trunk/drivers/scsi/aic7xxx/aic79xx_inline.h | 2 +- trunk/drivers/scsi/aic7xxx/aic79xx_osm.c | 2 +- trunk/drivers/scsi/aic7xxx/aic79xx_pci.c | 4 +- trunk/drivers/scsi/aic7xxx/aic7xxx_inline.h | 2 +- trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 +- trunk/drivers/scsi/ipr.c | 2 +- trunk/drivers/scsi/ips.c | 2 +- trunk/drivers/scsi/lpfc/lpfc.h | 2 +- trunk/drivers/scsi/lpfc/lpfc_init.c | 2 +- trunk/drivers/scsi/lpfc/lpfc_mbox.c | 2 +- trunk/drivers/scsi/megaraid/megaraid_mbox.c | 10 +- trunk/drivers/scsi/qla2xxx/qla_gs.c | 2 +- trunk/drivers/scsi/qla4xxx/ql4_def.h | 2 +- trunk/drivers/scsi/qla4xxx/ql4_init.c | 2 +- trunk/drivers/scsi/scsi_tgt_lib.c | 2 +- trunk/drivers/scsi/scsi_transport_sas.c | 2 +- trunk/drivers/serial/Kconfig | 4 +- trunk/drivers/serial/icom.h | 2 +- trunk/drivers/serial/mux.c | 2 +- trunk/drivers/spi/spi_imx.c | 2 +- trunk/drivers/ssb/b43_pci_bridge.c | 2 +- trunk/drivers/video/aty/radeon_pm.c | 2 +- trunk/drivers/video/cyblafb.c | 2 +- trunk/drivers/video/intelfb/intelfb.h | 2 +- trunk/drivers/video/omap/lcdc.c | 2 +- trunk/drivers/video/sm501fb.c | 2 +- trunk/drivers/watchdog/shwdt.c | 2 +- trunk/fs/befs/btree.c | 2 +- trunk/fs/befs/datastream.c | 2 +- trunk/fs/binfmt_elf.c | 2 +- trunk/fs/freevxfs/vxfs_dir.h | 2 +- trunk/fs/freevxfs/vxfs_immed.c | 2 +- trunk/fs/gfs2/recovery.c | 2 +- trunk/fs/jffs2/readinode.c | 2 +- trunk/fs/jfs/jfs_xtree.c | 2 +- trunk/fs/locks.c | 125 ++- trunk/fs/ncpfs/mmap.c | 4 + trunk/fs/ocfs2/alloc.c | 2 +- trunk/fs/ocfs2/dir.c | 2 +- trunk/fs/ocfs2/ocfs1_fs_compat.h | 2 +- trunk/fs/ocfs2/suballoc.c | 2 +- trunk/fs/reiserfs/bitmap.c | 6 +- trunk/fs/signalfd.c | 2 +- trunk/include/acpi/acpixf.h | 2 +- trunk/include/acpi/processor.h | 2 +- .../include/asm-arm/arch-ixp4xx/ixp4xx-regs.h | 34 +- trunk/include/asm-arm/arch-pxa/pxa-regs.h | 34 +- trunk/include/asm-arm/arch-versatile/irqs.h | 4 +- trunk/include/asm-arm/hardware/it8152.h | 2 +- trunk/include/asm-arm/mach/udc_pxa2xx.h | 2 +- trunk/include/asm-frv/atomic.h | 2 +- trunk/include/asm-frv/bitops.h | 2 +- trunk/include/asm-frv/cacheflush.h | 2 +- trunk/include/asm-frv/highmem.h | 2 +- trunk/include/asm-frv/mem-layout.h | 2 +- trunk/include/asm-frv/pgtable.h | 2 +- trunk/include/asm-ia64/compat.h | 2 +- trunk/include/asm-m68knommu/bitops.h | 2 +- trunk/include/asm-m68knommu/commproc.h | 2 +- trunk/include/asm-m68knommu/delay.h | 2 +- trunk/include/asm-m68knommu/m5249sim.h | 4 +- trunk/include/asm-m68knommu/m5307sim.h | 12 +- trunk/include/asm-m68knommu/m5407sim.h | 12 +- trunk/include/asm-m68knommu/m68360_regs.h | 2 +- trunk/include/asm-m68knommu/mcfuart.h | 2 +- trunk/include/asm-mips/compat.h | 2 +- .../asm-mips/mach-excite/excite_fpga.h | 2 +- .../asm-mips/mach-wrppmc/mach-gt64120.h | 2 +- trunk/include/asm-mips/sgi/ip22.h | 2 +- trunk/include/asm-mips/sn/sn0/hubio.h | 2 +- trunk/include/asm-parisc/compat.h | 2 +- trunk/include/asm-parisc/elf.h | 2 +- trunk/include/asm-parisc/linkage.h | 2 +- trunk/include/asm-parisc/vga.h | 2 +- trunk/include/asm-powerpc/compat.h | 2 +- trunk/include/asm-s390/compat.h | 2 +- trunk/include/asm-sparc64/compat.h | 2 +- trunk/include/asm-x86/compat.h | 2 +- trunk/include/asm-x86/mach-voyager/do_timer.h | 1 + trunk/include/linux/aspm.h | 44 + trunk/include/linux/chio.h | 2 +- trunk/include/linux/cyclades.h | 2 +- trunk/include/linux/cycx_x25.h | 2 +- trunk/include/linux/dccp.h | 2 +- trunk/include/linux/device.h | 6 - trunk/include/linux/dma-mapping.h | 4 +- trunk/include/linux/dmaengine.h | 2 +- trunk/include/linux/ethtool.h | 2 +- trunk/include/linux/fs.h | 3 +- trunk/include/linux/hdreg.h | 2 +- trunk/include/linux/hrtimer.h | 1 + trunk/include/linux/ieee80211.h | 6 - trunk/include/linux/init.h | 3 + trunk/include/linux/llc.h | 4 +- trunk/include/linux/pci.h | 5 + trunk/include/linux/pci_regs.h | 8 + trunk/include/linux/phy.h | 5 +- trunk/include/linux/pm.h | 2 +- trunk/include/linux/pnp.h | 2 +- trunk/include/linux/radix-tree.h | 2 +- trunk/include/linux/reiserfs_fs_sb.h | 2 +- trunk/include/linux/signalfd.h | 2 +- trunk/include/linux/skbuff.h | 1 + trunk/include/linux/sm501-regs.h | 2 +- trunk/include/linux/spinlock_api_up.h | 2 +- trunk/include/linux/wireless.h | 2 +- trunk/include/media/rds.h | 2 +- trunk/include/net/if_inet6.h | 6 +- trunk/include/net/inet6_hashtables.h | 2 +- trunk/include/net/inet_connection_sock.h | 8 +- trunk/include/net/inet_hashtables.h | 51 +- trunk/include/net/inet_timewait_sock.h | 2 +- trunk/include/net/sock.h | 3 - trunk/include/scsi/scsi_transport_fc.h | 2 +- trunk/init/Kconfig | 14 - trunk/kernel/Kconfig.instrumentation | 49 ++ trunk/kernel/Makefile | 3 +- trunk/kernel/exit.c | 2 + trunk/kernel/posix-timers.c | 2 +- trunk/kernel/relay.c | 1 - trunk/lib/Kconfig.debug | 14 +- trunk/lib/crc32.c | 2 +- trunk/lib/kobject.c | 2 +- trunk/lib/zlib_deflate/defutil.h | 2 +- trunk/mm/mmap.c | 2 +- trunk/mm/truncate.c | 2 +- trunk/net/core/net_namespace.c | 4 +- trunk/net/core/skbuff.c | 29 + trunk/net/dccp/dccp.h | 2 + trunk/net/dccp/ipv4.c | 18 +- trunk/net/dccp/ipv6.c | 20 +- trunk/net/dccp/proto.c | 18 +- trunk/net/ipv4/inet_connection_sock.c | 8 +- trunk/net/ipv4/inet_hashtables.c | 58 +- trunk/net/ipv4/tcp.c | 2 +- trunk/net/ipv4/tcp_ipv4.c | 31 +- trunk/net/ipv6/inet6_hashtables.c | 4 +- trunk/net/ipv6/tcp_ipv6.c | 19 +- trunk/net/mac80211/Kconfig | 12 - trunk/net/mac80211/ieee80211.c | 14 +- trunk/net/mac80211/rc80211_pid_algo.c | 2 +- trunk/net/mac80211/rc80211_simple.c | 2 +- trunk/net/mac80211/rx.c | 7 - trunk/net/rfkill/rfkill.c | 2 +- trunk/net/sctp/sm_statefuns.c | 4 +- trunk/scripts/kconfig/mconf.c | 1 - trunk/scripts/kconfig/menu.c | 9 +- trunk/scripts/mod/modpost.c | 17 +- trunk/scripts/setlocalversion | 16 - trunk/sound/oss/via82cxxx_audio.c | 14 +- trunk/sound/usb/usx2y/usX2Yhwdep.c | 2 +- trunk/sound/usb/usx2y/usx2yhwdeppcm.c | 2 +- 398 files changed, 2958 insertions(+), 2083 deletions(-) rename trunk/Documentation/{ => fujitsu}/frv/README.txt (100%) rename trunk/Documentation/{ => fujitsu}/frv/atomic-ops.txt (100%) rename trunk/Documentation/{ => fujitsu}/frv/booting.txt (98%) rename trunk/Documentation/{ => fujitsu}/frv/clock.txt (100%) rename trunk/Documentation/{ => fujitsu}/frv/configuring.txt (100%) rename trunk/Documentation/{ => fujitsu}/frv/features.txt (100%) rename trunk/Documentation/{ => fujitsu}/frv/gdbinit (100%) rename trunk/Documentation/{ => fujitsu}/frv/gdbstub.txt (100%) rename trunk/Documentation/{ => fujitsu}/frv/kernel-ABI.txt (100%) rename trunk/Documentation/{ => fujitsu}/frv/mmu-layout.txt (100%) delete mode 100644 trunk/Documentation/ja_JP/stable_kernel_rules.txt create mode 100644 trunk/Documentation/smp.txt delete mode 100644 trunk/arch/Kconfig create mode 100644 trunk/arch/arm/Kconfig.instrumentation create mode 100644 trunk/drivers/net/mipsnet.h delete mode 100644 trunk/drivers/net/phy/realtek.c delete mode 100644 trunk/drivers/pci/hotplug-pci.c create mode 100644 trunk/drivers/pci/pcie/aspm.c create mode 100644 trunk/include/linux/aspm.h create mode 100644 trunk/kernel/Kconfig.instrumentation mode change 100755 => 100644 trunk/scripts/setlocalversion diff --git a/[refs] b/[refs] index 0a54ea64a72b..4f2e14427aa2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f5bb3a5e9dcdb8435471562b6cada89525cf4df1 +refs/heads/master: f35d9d8aae08940b7fdd1bb8110619da2ece6b28 diff --git a/trunk/CREDITS b/trunk/CREDITS index da0a56e23bee..edff310dbe53 100644 --- a/trunk/CREDITS +++ b/trunk/CREDITS @@ -508,8 +508,12 @@ D: REINER SCT cyberJack pinpad/e-com USB chipcard reader driver S: Germany N: Adrian Bunk +E: bunk@stusta.de P: 1024D/4F12B400 B29C E71E FE19 6755 5C8A 84D4 99FC EA98 4F12 B400 D: misc kernel hacking and testing +S: Grasmeierstrasse 11 +S: 80805 Muenchen +S: Germany N: Ray Burr E: ryb@nightmare.com @@ -1120,9 +1124,6 @@ S: 1150 Ringwood Court S: San Jose, California 95131 S: USA -N: Adam Fritzler -E: mid@zigamorph.net - N: Fernando Fuganti E: fuganti@conectiva.com.br E: fuganti@netbank.com.br diff --git a/trunk/Documentation/00-INDEX b/trunk/Documentation/00-INDEX index 40ac7759c3bb..c3014df066c4 100644 --- a/trunk/Documentation/00-INDEX +++ b/trunk/Documentation/00-INDEX @@ -154,7 +154,7 @@ firmware_class/ - request_firmware() hotplug interface info. floppy.txt - notes and driver options for the floppy disk driver. -frv/ +fujitsu/ - Fujitsu FR-V Linux documentation. gpio.txt - overview of GPIO (General Purpose Input/Output) access conventions. @@ -364,6 +364,8 @@ sharedsubtree.txt - a description of shared subtrees for namespaces. smart-config.txt - description of the Smart Config makefile feature. +smp.txt + - a few notes on symmetric multi-processing. sony-laptop.txt - Sony Notebook Control Driver (SNC) Readme. sonypi.txt diff --git a/trunk/Documentation/BUG-HUNTING b/trunk/Documentation/BUG-HUNTING index 6c816751b868..35f5bd243336 100644 --- a/trunk/Documentation/BUG-HUNTING +++ b/trunk/Documentation/BUG-HUNTING @@ -53,7 +53,7 @@ Finding it the old way [Sat Mar 2 10:32:33 PST 1996 KERNEL_BUG-HOWTO lm@sgi.com (Larry McVoy)] -This is how to track down a bug if you know nothing about kernel hacking. +This is how to track down a bug if you know nothing about kernel hacking. It's a brute force approach but it works pretty well. You need: @@ -66,12 +66,12 @@ You will then do: . Rebuild a revision that you believe works, install, and verify that. . Do a binary search over the kernels to figure out which one - introduced the bug. I.e., suppose 1.3.28 didn't have the bug, but + introduced the bug. I.e., suppose 1.3.28 didn't have the bug, but you know that 1.3.69 does. Pick a kernel in the middle and build that, like 1.3.50. Build & test; if it works, pick the mid point between .50 and .69, else the mid point between .28 and .50. . You'll narrow it down to the kernel that introduced the bug. You - can probably do better than this but it gets tricky. + can probably do better than this but it gets tricky. . Narrow it down to a subdirectory @@ -81,27 +81,27 @@ You will then do: directories: Copy the non-working directory next to the working directory - as "dir.63". + as "dir.63". One directory at time, try moving the working directory to - "dir.62" and mv dir.63 dir"time, try + "dir.62" and mv dir.63 dir"time, try mv dir dir.62 mv dir.63 dir find dir -name '*.[oa]' -print | xargs rm -f And then rebuild and retest. Assuming that all related - changes were contained in the sub directory, this should - isolate the change to a directory. + changes were contained in the sub directory, this should + isolate the change to a directory. Problems: changes in header files may have occurred; I've - found in my case that they were self explanatory - you may + found in my case that they were self explanatory - you may or may not want to give up when that happens. . Narrow it down to a file - You can apply the same technique to each file in the directory, - hoping that the changes in that file are self contained. - + hoping that the changes in that file are self contained. + . Narrow it down to a routine - You can take the old file and the new file and manually create @@ -130,7 +130,7 @@ You will then do: that makes the difference. Finally, you take all the info that you have, kernel revisions, bug -description, the extent to which you have narrowed it down, and pass +description, the extent to which you have narrowed it down, and pass that off to whomever you believe is the maintainer of that section. A post to linux.dev.kernel isn't such a bad idea if you've done some work to narrow it down. diff --git a/trunk/Documentation/SubmittingPatches b/trunk/Documentation/SubmittingPatches index 08a1ed1cb5d8..681e2b36195c 100644 --- a/trunk/Documentation/SubmittingPatches +++ b/trunk/Documentation/SubmittingPatches @@ -220,8 +220,20 @@ decreasing the likelihood of your MIME-attached change being accepted. Exception: If your mailer is mangling patches then someone may ask you to re-send them using MIME. -See Documentation/email-clients.txt for hints about configuring -your e-mail client so that it sends your patches untouched. + +WARNING: Some mailers like Mozilla send your messages with +---- message header ---- +Content-Type: text/plain; charset=us-ascii; format=flowed +---- message header ---- +The problem is that "format=flowed" makes some of the mailers +on receiving side to replace TABs with spaces and do similar +changes. Thus the patches from you can look corrupted. + +To fix this just make your mozilla defaults/pref/mailnews.js file to look like: +pref("mailnews.send_plaintext_flowed", false); // RFC 2646======= +pref("mailnews.display.disable_format_flowed_support", true); + + 8) E-mail size. diff --git a/trunk/Documentation/arm/Sharp-LH/IOBarrier b/trunk/Documentation/arm/Sharp-LH/IOBarrier index 2e953e228f4d..c0d8853672dc 100644 --- a/trunk/Documentation/arm/Sharp-LH/IOBarrier +++ b/trunk/Documentation/arm/Sharp-LH/IOBarrier @@ -32,7 +32,7 @@ BARRIER IO before the access to the SMC chip because the AEN latch only needs occurs after the SMC IO write cycle. The routines that implement this work-around make an additional concession which is to disable interrupts during the IO sequence. Other hardware devices -(the LogicPD CPLD) have registers in the same physical memory +(the LogicPD CPLD) have registers in the same the physical memory region as the SMC chip. An interrupt might allow an access to one of those registers while SMC IO is being performed. diff --git a/trunk/Documentation/debugging-modules.txt b/trunk/Documentation/debugging-modules.txt index 172ad4aec493..24029f65fc94 100644 --- a/trunk/Documentation/debugging-modules.txt +++ b/trunk/Documentation/debugging-modules.txt @@ -16,7 +16,3 @@ echo 'echo "$@" >> /tmp/modprobe.log' >> /tmp/modprobe echo 'exec /sbin/modprobe "$@"' >> /tmp/modprobe chmod a+x /tmp/modprobe echo /tmp/modprobe > /proc/sys/kernel/modprobe - -Note that the above applies only when the *kernel* is requesting -that the module be loaded -- it won't have any effect if that module -is being loaded explicitly using "modprobe" from userspace. diff --git a/trunk/Documentation/driver-model/platform.txt b/trunk/Documentation/driver-model/platform.txt index 83009fdcbbc8..2a97320ee17f 100644 --- a/trunk/Documentation/driver-model/platform.txt +++ b/trunk/Documentation/driver-model/platform.txt @@ -122,15 +122,15 @@ None the less, there are some APIs to support such legacy drivers. Avoid using these calls except with such hotplug-deficient drivers. struct platform_device *platform_device_alloc( - const char *name, int id); + char *name, unsigned id); You can use platform_device_alloc() to dynamically allocate a device, which you will then initialize with resources and platform_device_register(). A better solution is usually: struct platform_device *platform_device_register_simple( - const char *name, int id, - struct resource *res, unsigned int nres); + char *name, unsigned id, + struct resource *res, unsigned nres); You can use platform_device_register_simple() as a one-step call to allocate and register a device. diff --git a/trunk/Documentation/filesystems/configfs/configfs.txt b/trunk/Documentation/filesystems/configfs/configfs.txt index 44c97e6accb2..d1b98257d000 100644 --- a/trunk/Documentation/filesystems/configfs/configfs.txt +++ b/trunk/Documentation/filesystems/configfs/configfs.txt @@ -377,7 +377,7 @@ more explicit to have a method whereby userspace sees this divergence. Rather than have a group where some items behave differently than others, configfs provides a method whereby one or many subgroups are automatically created inside the parent at its creation. Thus, -mkdir("parent") results in "parent", "parent/subgroup1", up through +mkdir("parent) results in "parent", "parent/subgroup1", up through "parent/subgroupN". Items of type 1 can now be created in "parent/subgroup1", and items of type N can be created in "parent/subgroupN". diff --git a/trunk/Documentation/filesystems/porting b/trunk/Documentation/filesystems/porting index 0f33c77bc14b..dac45c92d872 100644 --- a/trunk/Documentation/filesystems/porting +++ b/trunk/Documentation/filesystems/porting @@ -1,6 +1,6 @@ Changes since 2.5.0: ---- +--- [recommended] New helpers: sb_bread(), sb_getblk(), sb_find_get_block(), set_bh(), @@ -10,7 +10,7 @@ Use them. (sb_find_get_block() replaces 2.4's get_hash_table()) ---- +--- [recommended] New methods: ->alloc_inode() and ->destroy_inode(). @@ -28,7 +28,7 @@ Declare Use FOO_I(inode) instead of &inode->u.foo_inode_i; -Add foo_alloc_inode() and foo_destroy_inode() - the former should allocate +Add foo_alloc_inode() and foo_destory_inode() - the former should allocate foo_inode_info and return the address of ->vfs_inode, the latter should free FOO_I(inode) (see in-tree filesystems for examples). diff --git a/trunk/Documentation/filesystems/proc.txt b/trunk/Documentation/filesystems/proc.txt index 0b1b0c008613..194c8f351320 100644 --- a/trunk/Documentation/filesystems/proc.txt +++ b/trunk/Documentation/filesystems/proc.txt @@ -216,7 +216,6 @@ Table 1-3: Contents of the stat files (as of 2.6.22-rc3) priority priority level nice nice level num_threads number of threads - it_real_value (obsolete, always 0) start_time time the process started after system boot vsize virtual memory size rss resident set memory size diff --git a/trunk/Documentation/filesystems/ramfs-rootfs-initramfs.txt b/trunk/Documentation/filesystems/ramfs-rootfs-initramfs.txt index 7be232b44ee4..339c6a4f220e 100644 --- a/trunk/Documentation/filesystems/ramfs-rootfs-initramfs.txt +++ b/trunk/Documentation/filesystems/ramfs-rootfs-initramfs.txt @@ -118,7 +118,7 @@ All this differs from the old initrd in several ways: with the new root (cd /newmount; mount --move . /; chroot .), attach stdin/stdout/stderr to the new /dev/console, and exec the new init. - Since this is a remarkably persnickety process (and involves deleting + Since this is a remarkably persnickity process (and involves deleting commands before you can run them), the klibc package introduced a helper program (utils/run_init.c) to do all this for you. Most other packages (such as busybox) have named this command "switch_root". diff --git a/trunk/Documentation/filesystems/relay.txt b/trunk/Documentation/filesystems/relay.txt index 094f2d2f38b1..18d23f9a18c7 100644 --- a/trunk/Documentation/filesystems/relay.txt +++ b/trunk/Documentation/filesystems/relay.txt @@ -140,7 +140,7 @@ close() decrements the channel buffer's refcount. When the refcount In order for a user application to make use of relay files, the host filesystem must be mounted. For example, - mount -t debugfs debugfs /sys/kernel/debug + mount -t debugfs debugfs /debug NOTE: the host filesystem doesn't need to be mounted for kernel clients to create or use channels - it only needs to be diff --git a/trunk/Documentation/frv/README.txt b/trunk/Documentation/fujitsu/frv/README.txt similarity index 100% rename from trunk/Documentation/frv/README.txt rename to trunk/Documentation/fujitsu/frv/README.txt diff --git a/trunk/Documentation/frv/atomic-ops.txt b/trunk/Documentation/fujitsu/frv/atomic-ops.txt similarity index 100% rename from trunk/Documentation/frv/atomic-ops.txt rename to trunk/Documentation/fujitsu/frv/atomic-ops.txt diff --git a/trunk/Documentation/frv/booting.txt b/trunk/Documentation/fujitsu/frv/booting.txt similarity index 98% rename from trunk/Documentation/frv/booting.txt rename to trunk/Documentation/fujitsu/frv/booting.txt index ace200b7c214..4e229056ef22 100644 --- a/trunk/Documentation/frv/booting.txt +++ b/trunk/Documentation/fujitsu/frv/booting.txt @@ -177,5 +177,5 @@ separated by spaces: (*) vdc=... This option configures the MB93493 companion chip visual display - driver. Please see Documentation/frv/mb93493/vdc.txt for more + driver. Please see Documentation/fujitsu/mb93493/vdc.txt for more information. diff --git a/trunk/Documentation/frv/clock.txt b/trunk/Documentation/fujitsu/frv/clock.txt similarity index 100% rename from trunk/Documentation/frv/clock.txt rename to trunk/Documentation/fujitsu/frv/clock.txt diff --git a/trunk/Documentation/frv/configuring.txt b/trunk/Documentation/fujitsu/frv/configuring.txt similarity index 100% rename from trunk/Documentation/frv/configuring.txt rename to trunk/Documentation/fujitsu/frv/configuring.txt diff --git a/trunk/Documentation/frv/features.txt b/trunk/Documentation/fujitsu/frv/features.txt similarity index 100% rename from trunk/Documentation/frv/features.txt rename to trunk/Documentation/fujitsu/frv/features.txt diff --git a/trunk/Documentation/frv/gdbinit b/trunk/Documentation/fujitsu/frv/gdbinit similarity index 100% rename from trunk/Documentation/frv/gdbinit rename to trunk/Documentation/fujitsu/frv/gdbinit diff --git a/trunk/Documentation/frv/gdbstub.txt b/trunk/Documentation/fujitsu/frv/gdbstub.txt similarity index 100% rename from trunk/Documentation/frv/gdbstub.txt rename to trunk/Documentation/fujitsu/frv/gdbstub.txt diff --git a/trunk/Documentation/frv/kernel-ABI.txt b/trunk/Documentation/fujitsu/frv/kernel-ABI.txt similarity index 100% rename from trunk/Documentation/frv/kernel-ABI.txt rename to trunk/Documentation/fujitsu/frv/kernel-ABI.txt diff --git a/trunk/Documentation/frv/mmu-layout.txt b/trunk/Documentation/fujitsu/frv/mmu-layout.txt similarity index 100% rename from trunk/Documentation/frv/mmu-layout.txt rename to trunk/Documentation/fujitsu/frv/mmu-layout.txt diff --git a/trunk/Documentation/initrd.txt b/trunk/Documentation/initrd.txt index 1ba84f3584e3..74f68b35f7c1 100644 --- a/trunk/Documentation/initrd.txt +++ b/trunk/Documentation/initrd.txt @@ -85,7 +85,7 @@ involve special block devices or loopbacks; you merely create a directory on disk with the desired initrd content, cd to that directory, and run (as an example): -find . | cpio --quiet -H newc -o | gzip -9 -n > /boot/imagefile.img +find . | cpio --quiet -c -o | gzip -9 -n > /boot/imagefile.img Examining the contents of an existing image file is just as simple: diff --git a/trunk/Documentation/ja_JP/stable_kernel_rules.txt b/trunk/Documentation/ja_JP/stable_kernel_rules.txt deleted file mode 100644 index 17d87519e468..000000000000 --- a/trunk/Documentation/ja_JP/stable_kernel_rules.txt +++ /dev/null @@ -1,79 +0,0 @@ -NOTE: -This is Japanese translated version of "Documentation/stable_kernel_rules.txt". -This one is maintained by Tsugikazu Shibata -and JF Project team . -If you find difference with original file or problem in translation, -please contact maintainer of this file or JF project. - -Please also note that purpose of this file is easier to read for non -English natives and do no intended to fork. So, if you have any -comment or update of this file, please try to update Original(English) -file at first. - -================================== -これは、 -linux-2.6.24/Documentation/stable_kernel_rules.txt -の和訳です。 - -翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > -翻訳日: 2007/12/30 -翻訳者: Tsugikazu Shibata -校正者: 武井伸光さん、 - かねこさん (Seiji Kaneko) - 小林 雅典さん (Masanori Kobayasi) - 野口さん (Kenji Noguchi) - 神宮信太郎さん -================================== - -ずっと知りたかった Linux 2.6 -stable リリースの全て - -"-stable" ツリーにどのような種類のパッチが受け入れられるか、どのような -ものが受け入れられないか、についての規則- - - - 明らかに正しく、テストされているものでなければならない。 - - 文脈(変更行の前後)を含めて 100 行より大きくてはいけない。 - - ただ一個のことだけを修正しているべき。 - - 皆を悩ませている本物のバグを修正しなければならない。("これはバグで - あるかもしれないが..." のようなものではない) - - ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー - タ破壊、現実のセキュリティ問題、その他 "ああ、これはダメだね"という - ようなものを修正しなければならない。短く言えば、重大な問題。 - - どのように競合状態が発生するかの説明も一緒に書かれていない限り、 - "理論的には競合状態になる"ようなものは不可。 - - いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー - ンアップなど) - - 対応するサブシステムメンテナが受け入れたものでなければならない。 - - Documentation/SubmittingPatches の規則に従ったものでなければならない。 - --stable ツリーにパッチを送付する手続き- - - - 上記の規則に従っているかを確認した後に、stable@kernel.org にパッチ - を送る。 - - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合 - には NAK を受け取る。この反応は開発者たちのスケジュールによって、数 - 日かかる場合がある。 - - もし受け取られたら、パッチは他の開発者たちのレビューのために - -stable キューに追加される。 - - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ - きではなく、代わりに security@kernel.org のアドレスに送られる。 - -レビューサイクル- - - - -stable メンテナがレビューサイクルを決めるとき、パッチはレビュー委 - 員会とパッチが影響する領域のメンテナ(提供者がその領域のメンテナで無 - い限り)に送られ、linux-kernel メーリングリストにCCされる。 - - レビュー委員会は 48時間の間に ACK か NAK を出す。 - - もしパッチが委員会のメンバから却下れるか、メンテナ達やメンバが気付 - かなかった問題が持ちあがり、linux-kernel メンバがパッチに異議を唱え - た場合には、パッチはキューから削除される。 - - レビューサイクルの最後に、ACK を受けたパッチは最新の -stable リリー - スに追加され、その後に新しい -stable リリースが行われる。 - - セキュリティパッチは、通常のレビューサイクルを通らず、セキュリティ - カーネルチームから直接 -stable ツリーに受け付けられる。 - この手続きの詳細については kernel security チームに問い合わせること。 - -レビュー委員会- - - - この委員会は、このタスクについて活動する多くのボランティアと、少数の - 非ボランティアのカーネル開発者達で構成されている。 - diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index 9ad4e6fc56fd..cf3868956f1e 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -549,7 +549,7 @@ and is between 256 and 4096 characters. It is defined in the file 1 will print _a lot_ more information - normally only useful to kernel developers. - decnet.addr= [HW,NET] + decnet= [HW,NET] Format: [,] See also Documentation/networking/decnet.txt. @@ -1561,17 +1561,14 @@ and is between 256 and 4096 characters. It is defined in the file ramdisk_size= [RAM] Sizes of RAM disks in kilobytes See Documentation/ramdisk.txt. - rcupdate.blimit= [KNL,BOOT] - Set maximum number of finished RCU callbacks to process - in one batch. + rcu.blimit= [KNL,BOOT] Set maximum number of finished + RCU callbacks to process in one batch. - rcupdate.qhimark= [KNL,BOOT] - Set threshold of queued + rcu.qhimark= [KNL,BOOT] Set threshold of queued RCU callbacks over which batch limiting is disabled. - rcupdate.qlowmark= [KNL,BOOT] - Set threshold of queued RCU callbacks below which - batch limiting is re-enabled. + rcu.qlowmark= [KNL,BOOT] Set threshold of queued + RCU callbacks below which batch limiting is re-enabled. rdinit= [KNL] Format: @@ -1891,6 +1888,9 @@ and is between 256 and 4096 characters. It is defined in the file st= [HW,SCSI] SCSI tape parameters (buffers, etc.) See Documentation/scsi/st.txt. + st0x= [HW,SCSI] + See header of drivers/scsi/seagate.c. + sti= [PARISC,HW] Format: Set the STI (builtin display/keyboard on the HP-PARISC @@ -1975,6 +1975,9 @@ and is between 256 and 4096 characters. It is defined in the file tipar.delay= [HW,PPT] Set inter-bit delay in microseconds (default 10). + tmc8xx= [HW,SCSI] + See header of drivers/scsi/seagate.c. + tmscsim= [HW,SCSI] See comment before function dc390_setup() in drivers/scsi/tmscsim.c. diff --git a/trunk/Documentation/networking/decnet.txt b/trunk/Documentation/networking/decnet.txt index d8968958d839..badb7480ea62 100644 --- a/trunk/Documentation/networking/decnet.txt +++ b/trunk/Documentation/networking/decnet.txt @@ -60,7 +60,7 @@ operation of the local communications in any other way though. The kernel command line takes options looking like the following: - decnet.addr=1,2 + decnet=1,2 the two numbers are the node address 1,2 = 1.2 For 2.2.xx kernels and early 2.3.xx kernels, you must use a comma when specifying the diff --git a/trunk/Documentation/smp.txt b/trunk/Documentation/smp.txt new file mode 100644 index 000000000000..82fc50b6305d --- /dev/null +++ b/trunk/Documentation/smp.txt @@ -0,0 +1,22 @@ +To set up SMP + +Configure the kernel and answer Y to CONFIG_SMP. + +If you are using LILO, it is handy to have both SMP and non-SMP +kernel images on hand. Edit /etc/lilo.conf to create an entry +for another kernel image called "linux-smp" or something. + +The next time you compile the kernel, when running a SMP kernel, +edit linux/Makefile and change "MAKE=make" to "MAKE=make -jN" +(where N = number of CPU + 1, or if you have tons of memory/swap + you can just use "-j" without a number). Feel free to experiment +with this one. + +Of course you should time how long each build takes :-) +Example: + make config + time -v sh -c 'make clean install modules modules_install' + +If you are using some Compaq MP compliant machines you will need to set +the operating system in the BIOS settings to "Unixware" - don't ask me +why Compaqs don't work otherwise. diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index da30a72a839c..58b16038baea 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -84,6 +84,13 @@ S: Status, one of the following: it has been replaced by a better system and you should be using that. +3C359 NETWORK DRIVER +P: Mike Phillips +M: mikep@linuxtr.net +L: netdev@vger.kernel.org +W: http://www.linuxtr.net +S: Maintained + 3C505 NETWORK DRIVER P: Philip Blundell M: philb@gnu.org @@ -932,6 +939,8 @@ M: maxk@qualcomm.com S: Maintained BONDING DRIVER +P: Chad Tindel +M: ctindel@users.sourceforge.net P: Jay Vosburgh M: fubar@us.ibm.com L: bonding-devel@lists.sourceforge.net @@ -2855,6 +2864,15 @@ L: ocfs2-devel@oss.oracle.com W: http://oss.oracle.com/projects/ocfs2/ S: Supported +OLYMPIC NETWORK DRIVER +P: Peter De Shrijver +M: p2@ace.ulyssis.student.kuleuven.ac.be +P: Mike Phillips +M: mikep@linuxtr.net +L: netdev@vger.kernel.org +W: http://www.linuxtr.net +S: Maintained + OMNIKEY CARDMAN 4000 DRIVER P: Harald Welte M: laforge@gnumonks.org @@ -3177,7 +3195,7 @@ S: Maintained RAYLINK/WEBGEAR 802.11 WIRELESS LAN DRIVER P: Corey Thomas -M: coreythomas@charter.net +M: corey@world.std.com L: linux-wireless@vger.kernel.org S: Maintained @@ -3770,6 +3788,13 @@ L: tlan-devel@lists.sourceforge.net (subscribers-only) W: http://sourceforge.net/projects/tlan/ S: Maintained +TOKEN-RING NETWORK DRIVER +P: Mike Phillips +M: mikep@linuxtr.net +L: netdev@vger.kernel.org +W: http://www.linuxtr.net +S: Maintained + TOSHIBA ACPI EXTRAS DRIVER P: John Belmonte M: toshiba_acpi@memebeam.org @@ -3790,9 +3815,18 @@ L: linux-kernel@vger.kernel.org S: Maintained TRIVIAL PATCHES -P: Jesper Juhl +P: Adrian Bunk M: trivial@kernel.org L: linux-kernel@vger.kernel.org +W: http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/ +T: git kernel.org:/pub/scm/linux/kernel/git/bunk/trivial.git +S: Maintained + +TMS380 TOKEN-RING NETWORK DRIVER +P: Adam Fritzler +M: mid@auk.cx +L: linux-tr@linuxtr.net +W: http://www.auk.cx/tms380tr/ S: Maintained TULIP NETWORK DRIVER diff --git a/trunk/Makefile b/trunk/Makefile index 89f2d8b5136d..0f84c742ed0e 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -1484,7 +1484,7 @@ kernelversion: # Single targets # --------------------------------------------------------------------------- # Single targets are compatible with: -# - build with mixed source and output +# - build whith mixed source and output # - build with separate output dir 'make O=...' # - external modules # diff --git a/trunk/arch/Kconfig b/trunk/arch/Kconfig deleted file mode 100644 index 3d72dc3fc8f5..000000000000 --- a/trunk/arch/Kconfig +++ /dev/null @@ -1,31 +0,0 @@ -# -# General architecture dependent options -# - -config OPROFILE - tristate "OProfile system profiling (EXPERIMENTAL)" - depends on PROFILING - depends on HAVE_OPROFILE - help - OProfile is a profiling system capable of profiling the - whole system, include the kernel, kernel modules, libraries, - and applications. - - If unsure, say N. - -config HAVE_OPROFILE - def_bool n - -config KPROBES - bool "Kprobes" - depends on KALLSYMS && MODULES - depends on HAVE_KPROBES - help - Kprobes allows you to trap at almost any kernel address and - execute a callback function. register_kprobe() establishes - a probepoint and specifies the callback. Kprobes is useful - for kernel debugging, non-intrusive instrumentation and testing. - If in doubt, say "N". - -config HAVE_KPROBES - def_bool n diff --git a/trunk/arch/alpha/Kconfig b/trunk/arch/alpha/Kconfig index 01b10ab588a6..c613d5fb0daa 100644 --- a/trunk/arch/alpha/Kconfig +++ b/trunk/arch/alpha/Kconfig @@ -5,7 +5,6 @@ config ALPHA bool default y - select HAVE_OPROFILE help The Alpha is a 64-bit general-purpose processor designed and marketed by the Digital Equipment Corporation of blessed memory, @@ -532,8 +531,8 @@ config SMP singleprocessor machines. On a singleprocessor machine, the kernel will run faster if you say N here. - See also the SMP-HOWTO available at - . + See also the , and the SMP-HOWTO + available at . If you don't know what to do here, say N. @@ -650,6 +649,8 @@ source "drivers/Kconfig" source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/alpha/Kconfig.debug" # DUMMY_CONSOLE may be defined in drivers/video/console/Kconfig diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index 471637002e8b..4b1a8e3d292c 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -10,8 +10,6 @@ config ARM default y select RTC_LIB select SYS_SUPPORTS_APM_EMULATION - select HAVE_OPROFILE - select HAVE_KPROBES if (!XIP_KERNEL) help The ARM series is a line of low-power-consumption RISC chip designs licensed by ARM Ltd and targeted at embedded applications and @@ -137,23 +135,6 @@ config FIQ config ARCH_MTD_XIP bool -if OPROFILE - -config OPROFILE_ARMV6 - def_bool y - depends on CPU_V6 && !SMP - select OPROFILE_ARM11_CORE - -config OPROFILE_MPCORE - def_bool y - depends on CPU_V6 && SMP - select OPROFILE_ARM11_CORE - -config OPROFILE_ARM11_CORE - bool - -endif - config VECTORS_BASE hex default 0xffff0000 if MMU || CPU_HIGH_VECTOR @@ -635,7 +616,8 @@ config SMP processor machines. On a single processor machine, the kernel will run faster if you say N here. - See also , + See also the , + , and the SMP-HOWTO available at . @@ -1146,6 +1128,8 @@ endmenu source "fs/Kconfig" +source "arch/arm/Kconfig.instrumentation" + source "arch/arm/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/arm/Kconfig.instrumentation b/trunk/arch/arm/Kconfig.instrumentation new file mode 100644 index 000000000000..453ad8e15d69 --- /dev/null +++ b/trunk/arch/arm/Kconfig.instrumentation @@ -0,0 +1,62 @@ +menuconfig INSTRUMENTATION + bool "Instrumentation Support" + default y + ---help--- + Say Y here to get to see options related to performance measurement, + system-wide debugging, and testing. This option alone does not add any + kernel code. + + If you say N, all options in this submenu will be skipped and + disabled. If you're trying to debug the kernel itself, go see the + Kernel Hacking menu. + +if INSTRUMENTATION + +config PROFILING + bool "Profiling support (EXPERIMENTAL)" + help + Say Y here to enable the extended profiling support mechanisms used + by profilers such as OProfile. + +config OPROFILE + tristate "OProfile system profiling (EXPERIMENTAL)" + depends on PROFILING && !UML + help + OProfile is a profiling system capable of profiling the + whole system, include the kernel, kernel modules, libraries, + and applications. + + If unsure, say N. + +config OPROFILE_ARMV6 + bool + depends on OPROFILE && CPU_V6 && !SMP + default y + select OPROFILE_ARM11_CORE + +config OPROFILE_MPCORE + bool + depends on OPROFILE && CPU_V6 && SMP + default y + select OPROFILE_ARM11_CORE + +config OPROFILE_ARM11_CORE + bool + +config KPROBES + bool "Kprobes" + depends on KALLSYMS && MODULES && !UML && !XIP_KERNEL + help + Kprobes allows you to trap at almost any kernel address and + execute a callback function. register_kprobe() establishes + a probepoint and specifies the callback. Kprobes is useful + for kernel debugging, non-intrusive instrumentation and testing. + If in doubt, say "N". + +config MARKERS + bool "Activate markers" + help + Place an empty function call at each marker site. Can be + dynamically changed for a probe function. + +endif # INSTRUMENTATION diff --git a/trunk/arch/arm/mach-pxa/corgi_ssp.c b/trunk/arch/arm/mach-pxa/corgi_ssp.c index 31706224a04c..efba65edcd51 100644 --- a/trunk/arch/arm/mach-pxa/corgi_ssp.c +++ b/trunk/arch/arm/mach-pxa/corgi_ssp.c @@ -32,7 +32,7 @@ static struct corgissp_machinfo *ssp_machinfo; /* * There are three devices connected to the SSP interface: * 1. A touchscreen controller (TI ADS7846 compatible) - * 2. An LCD controller (with some Backlight functionality) + * 2. An LCD contoller (with some Backlight functionality) * 3. A battery monitoring IC (Maxim MAX1111) * * Each device uses a different speed/mode of communication. diff --git a/trunk/arch/arm/mach-sa1100/collie_pm.c b/trunk/arch/arm/mach-sa1100/collie_pm.c index 94620be7bfac..1e25b1d19fce 100644 --- a/trunk/arch/arm/mach-sa1100/collie_pm.c +++ b/trunk/arch/arm/mach-sa1100/collie_pm.c @@ -165,7 +165,7 @@ int collie_read_temp(void) ucb1x00_adc_enable(ucb); ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_TMP_ON, 0); - /* >1010 = battery removed, 460 = 22C ?, higher = lower temp ? */ + /* >1010 = battery removed, 460 = 22C ?, higer = lower temp ? */ voltage = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD0, UCB_SYNC); ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_TMP_ON); ucb1x00_adc_disable(ucb); diff --git a/trunk/arch/arm/plat-s3c24xx/irq.c b/trunk/arch/arm/plat-s3c24xx/irq.c index ae2c5d7efc9d..d486f5112569 100644 --- a/trunk/arch/arm/plat-s3c24xx/irq.c +++ b/trunk/arch/arm/plat-s3c24xx/irq.c @@ -47,7 +47,7 @@ * Mark IRQ_LCD valid * * 25-Jul-2005 Ben Dooks - * Split the S3C2440 IRQ code to separate file + * Split the S3C2440 IRQ code to seperate file */ #include diff --git a/trunk/arch/avr32/Kconfig b/trunk/arch/avr32/Kconfig index c816f29154c9..e34e2c9c94cb 100644 --- a/trunk/arch/avr32/Kconfig +++ b/trunk/arch/avr32/Kconfig @@ -10,8 +10,6 @@ config AVR32 # With EMBEDDED=n, we get lots of stuff automatically selected # that we usually don't need on AVR32. select EMBEDDED - select HAVE_OPROFILE - select HAVE_KPROBES help AVR32 is a high-performance 32-bit RISC microprocessor core, designed for cost-sensitive embedded applications, with particular @@ -56,6 +54,9 @@ config ARCH_HAS_ILOG2_U32 config ARCH_HAS_ILOG2_U64 def_bool n +config ARCH_SUPPORTS_OPROFILE + def_bool y + config GENERIC_HWEIGHT def_bool y @@ -235,6 +236,8 @@ source "drivers/Kconfig" source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/avr32/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/blackfin/Kconfig b/trunk/arch/blackfin/Kconfig index ba21e33b8b1f..4802eb767dc9 100644 --- a/trunk/arch/blackfin/Kconfig +++ b/trunk/arch/blackfin/Kconfig @@ -24,7 +24,6 @@ config RWSEM_XCHGADD_ALGORITHM config BLACKFIN bool default y - select HAVE_OPROFILE config ZONE_DMA bool @@ -974,6 +973,8 @@ source "drivers/Kconfig" source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/blackfin/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/cris/Kconfig b/trunk/arch/cris/Kconfig index 7f0be4cd5e9a..222da1501f47 100644 --- a/trunk/arch/cris/Kconfig +++ b/trunk/arch/cris/Kconfig @@ -213,6 +213,8 @@ source "drivers/pci/Kconfig" source "drivers/usb/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/cris/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/frv/Kconfig b/trunk/arch/frv/Kconfig index bf0468cbe713..e3f965c91e22 100644 --- a/trunk/arch/frv/Kconfig +++ b/trunk/arch/frv/Kconfig @@ -79,7 +79,7 @@ config FRV_OUTOFLINE_ATOMIC_OPS Setting this option causes the FR-V atomic operations to be mostly implemented out-of-line. - See Documentation/frv/atomic-ops.txt for more information. + See Documentation/fujitsu/frv/atomic-ops.txt for more information. config HIGHMEM bool "High memory support" @@ -375,6 +375,8 @@ source "drivers/Kconfig" source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/frv/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/frv/kernel/entry.S b/trunk/arch/frv/kernel/entry.S index 99046b1f51c8..f926c7094776 100644 --- a/trunk/arch/frv/kernel/entry.S +++ b/trunk/arch/frv/kernel/entry.S @@ -253,7 +253,7 @@ __entry_kernel_external_interrupt_reentry: andi.p gr5,#~PSR_ET,gr5 # set CCCR.CC3 to Undefined to abort atomic-modify completion inside the kernel - # - for an explanation of how it works, see: Documentation/frv/atomic-ops.txt + # - for an explanation of how it works, see: Documentation/fujitsu/frv/atomic-ops.txt andi gr25,#~0xc0,gr25 sti gr20,@(gr28,#REG_TBR) @@ -445,7 +445,7 @@ __entry_kernel_softprog_interrupt_reentry: sti gr22,@(sp,#REG_SP) # set CCCR.CC3 to Undefined to abort atomic-modify completion inside the kernel - # - for an explanation of how it works, see: Documentation/frv/atomic-ops.txt + # - for an explanation of how it works, see: Documentation/fujitsu/frv/atomic-ops.txt movsg cccr,gr20 andi gr20,#~0xc0,gr20 movgs gr20,cccr diff --git a/trunk/arch/frv/lib/atomic-ops.S b/trunk/arch/frv/lib/atomic-ops.S index ee0ac905fb08..545cd325ac57 100644 --- a/trunk/arch/frv/lib/atomic-ops.S +++ b/trunk/arch/frv/lib/atomic-ops.S @@ -1,7 +1,7 @@ /* atomic-ops.S: kernel atomic operations * * For an explanation of how atomic ops work in this arch, see: - * Documentation/frv/atomic-ops.txt + * Documentation/fujitsu/frv/atomic-ops.txt * * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) diff --git a/trunk/arch/h8300/Kconfig b/trunk/arch/h8300/Kconfig index dc61222e1120..ff6a8712bd6d 100644 --- a/trunk/arch/h8300/Kconfig +++ b/trunk/arch/h8300/Kconfig @@ -223,6 +223,8 @@ endmenu source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/h8300/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/h8300/platform/h8s/ints.c b/trunk/arch/h8300/platform/h8s/ints.c index ac10b9783850..551fd5f30d82 100644 --- a/trunk/arch/h8300/platform/h8s/ints.c +++ b/trunk/arch/h8300/platform/h8s/ints.c @@ -121,7 +121,7 @@ void __init init_IRQ(void) printk("virtual vector at 0x%08lx\n",(unsigned long)ramvec); #if defined(CONFIG_GDB_DEBUG) - /* save original break vector */ + /* save orignal break vector */ break_vec = ramvec[TRAP3_VEC]; #else break_vec = VECTOR(trace_break); diff --git a/trunk/arch/ia64/Kconfig b/trunk/arch/ia64/Kconfig index b0de1132dfc0..c9307c99a1dc 100644 --- a/trunk/arch/ia64/Kconfig +++ b/trunk/arch/ia64/Kconfig @@ -15,8 +15,6 @@ config IA64 select ACPI if (!IA64_HP_SIM) select PM if (!IA64_HP_SIM) select ARCH_SUPPORTS_MSI - select HAVE_OPROFILE - select HAVE_KPROBES default y help The Itanium Processor Family is Intel's 64-bit successor to @@ -285,8 +283,8 @@ config SMP single processor systems. On a single processor system, the kernel will run faster if you say N here. - See also the SMP-HOWTO available at - . + See also the and the SMP-HOWTO + available at . If you don't know what to do here, say N. @@ -602,6 +600,8 @@ config IRQ_PER_CPU source "arch/ia64/hp/sim/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/ia64/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/m32r/Kconfig b/trunk/arch/m32r/Kconfig index 795180b8fd8e..49326e9d4413 100644 --- a/trunk/arch/m32r/Kconfig +++ b/trunk/arch/m32r/Kconfig @@ -8,7 +8,6 @@ mainmenu "Linux/M32R Kernel Configuration" config M32R bool default y - select HAVE_OPROFILE config SBUS bool @@ -303,7 +302,8 @@ config SMP Y to "Enhanced Real Time Clock Support", below. The "Advanced Power Management" code will be disabled if you say Y here. - See also the SMP-HOWTO available at + See also the , + and the SMP-HOWTO available at . If you don't know what to do here, say N. @@ -426,6 +426,8 @@ source "drivers/Kconfig" source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/m32r/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/m32r/kernel/ptrace.c b/trunk/arch/m32r/kernel/ptrace.c index 9aa615d3a5b2..ed4d0756c5db 100644 --- a/trunk/arch/m32r/kernel/ptrace.c +++ b/trunk/arch/m32r/kernel/ptrace.c @@ -476,7 +476,7 @@ unregister_debug_trap(struct task_struct *child, unsigned long addr, return 0; } - /* Recover original instruction code. */ + /* Recover orignal instruction code. */ *code = p->insn[i]; /* Shift debug trap entries. */ diff --git a/trunk/arch/m68k/Kconfig b/trunk/arch/m68k/Kconfig index 8236e42ef711..24e6bc09e7a7 100644 --- a/trunk/arch/m68k/Kconfig +++ b/trunk/arch/m68k/Kconfig @@ -678,6 +678,8 @@ endmenu source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/m68k/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/m68knommu/Kconfig b/trunk/arch/m68knommu/Kconfig index 6abbbb8aac5e..bd9213749ac2 100644 --- a/trunk/arch/m68knommu/Kconfig +++ b/trunk/arch/m68knommu/Kconfig @@ -711,6 +711,8 @@ source "drivers/Kconfig" source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/m68knommu/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/mips/Kconfig b/trunk/arch/mips/Kconfig index ec78a5762e9e..36a4018f71d2 100644 --- a/trunk/arch/mips/Kconfig +++ b/trunk/arch/mips/Kconfig @@ -1,7 +1,6 @@ config MIPS bool default y - select HAVE_OPROFILE # Horrible source of confusion. Die, die, die ... select EMBEDDED select RTC_LIB @@ -1755,8 +1754,8 @@ config SMP People using multiprocessor machines who say Y here should also say Y to "Enhanced Real Time Clock Support", below. - See also the SMP-HOWTO available at - . + See also the and the SMP-HOWTO + available at . If you don't know what to do here, say N. @@ -2096,6 +2095,8 @@ source "drivers/Kconfig" source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/mips/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/mips/au1000/mtx-1/board_setup.c b/trunk/arch/mips/au1000/mtx-1/board_setup.c index 310d5dff89fc..abfc4bcddf7a 100644 --- a/trunk/arch/mips/au1000/mtx-1/board_setup.c +++ b/trunk/arch/mips/au1000/mtx-1/board_setup.c @@ -99,7 +99,7 @@ mtx1_pci_idsel(unsigned int devsel, int assert) #endif if (assert && devsel != 0) { - // suppress signal to cardbus + // supress signal to cardbus au_writel( 0x00000002, SYS_OUTPUTCLR ); // set EXT_IO3 OFF } else { diff --git a/trunk/arch/mips/kernel/binfmt_elfn32.c b/trunk/arch/mips/kernel/binfmt_elfn32.c index 77db3473deab..9b34238d41c0 100644 --- a/trunk/arch/mips/kernel/binfmt_elfn32.c +++ b/trunk/arch/mips/kernel/binfmt_elfn32.c @@ -98,7 +98,7 @@ static __inline__ void jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value) { /* - * Convert jiffies to nanoseconds and separate with + * Convert jiffies to nanoseconds and seperate with * one divide. */ u64 nsec = (u64)jiffies * TICK_NSEC; diff --git a/trunk/arch/mips/kernel/binfmt_elfo32.c b/trunk/arch/mips/kernel/binfmt_elfo32.c index 08f4cd781ee3..da41eac195ca 100644 --- a/trunk/arch/mips/kernel/binfmt_elfo32.c +++ b/trunk/arch/mips/kernel/binfmt_elfo32.c @@ -100,7 +100,7 @@ static inline void jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value) { /* - * Convert jiffies to nanoseconds and separate with + * Convert jiffies to nanoseconds and seperate with * one divide. */ u64 nsec = (u64)jiffies * TICK_NSEC; diff --git a/trunk/arch/mips/kernel/kspd.c b/trunk/arch/mips/kernel/kspd.c index 998c4efcce88..f6704ab16306 100644 --- a/trunk/arch/mips/kernel/kspd.c +++ b/trunk/arch/mips/kernel/kspd.c @@ -221,7 +221,7 @@ void sp_work_handle_request(void) } } - /* Run the syscall at the privilege of the user who loaded the + /* Run the syscall at the priviledge of the user who loaded the SP program */ if (vpe_getuid(tclimit)) diff --git a/trunk/arch/mips/kernel/setup.c b/trunk/arch/mips/kernel/setup.c index c032409cba9b..269c252d956f 100644 --- a/trunk/arch/mips/kernel/setup.c +++ b/trunk/arch/mips/kernel/setup.c @@ -424,13 +424,13 @@ static void __init bootmem_init(void) #endif /* CONFIG_SGI_IP27 */ /* - * arch_mem_init - initialize memory management subsystem + * arch_mem_init - initialize memory managment subsystem * * o plat_mem_setup() detects the memory configuration and will record detected * memory areas using add_memory_region. * * At this stage the memory configuration of the system is known to the - * kernel but generic memory management system is still entirely uninitialized. + * kernel but generic memory managment system is still entirely uninitialized. * * o bootmem_init() * o sparse_init() diff --git a/trunk/arch/mips/kernel/smtc.c b/trunk/arch/mips/kernel/smtc.c index b42e71c71119..85f700e58131 100644 --- a/trunk/arch/mips/kernel/smtc.c +++ b/trunk/arch/mips/kernel/smtc.c @@ -65,7 +65,7 @@ asiduse smtc_live_asid[MAX_SMTC_TLBS][MAX_SMTC_ASIDS]; static atomic_t ipi_timer_latch[NR_CPUS]; /* - * Number of InterProcessor Interrupt (IPI) message buffers to allocate + * Number of InterProcessor Interupt (IPI) message buffers to allocate */ #define IPIBUF_PER_CPU 4 @@ -780,7 +780,7 @@ void smtc_send_ipi(int cpu, int type, unsigned int action) if (cpu_data[cpu].vpe_id != cpu_data[smp_processor_id()].vpe_id) { if (type == SMTC_CLOCK_TICK) atomic_inc(&ipi_timer_latch[cpu]); - /* If not on same VPE, enqueue and send cross-VPE interrupt */ + /* If not on same VPE, enqueue and send cross-VPE interupt */ smtc_ipi_nq(&IPIQ[cpu], pipi); LOCK_CORE_PRA(); settc(cpu_data[cpu].tc_id); @@ -1063,7 +1063,7 @@ static void setup_cross_vpe_interrupts(unsigned int nvpe) return; if (!cpu_has_vint) - panic("SMTC Kernel requires Vectored Interrupt support"); + panic("SMTC Kernel requires Vectored Interupt support"); set_vi_handler(MIPS_CPU_IPI_IRQ, ipi_irq_dispatch); diff --git a/trunk/arch/mips/mm/c-r4k.c b/trunk/arch/mips/mm/c-r4k.c index 53ec05267a98..02bd180f0e02 100644 --- a/trunk/arch/mips/mm/c-r4k.c +++ b/trunk/arch/mips/mm/c-r4k.c @@ -1101,7 +1101,7 @@ static void __init setup_scache(void) /* * Do the probing thing on R4000SC and R4400SC processors. Other * processors don't have a S-cache that would be relevant to the - * Linux memory management. + * Linux memory managment. */ switch (c->cputype) { case CPU_R4000SC: diff --git a/trunk/arch/mips/sgi-ip27/ip27-hubio.c b/trunk/arch/mips/sgi-ip27/ip27-hubio.c index a1fa4abb3f6a..524b371f9397 100644 --- a/trunk/arch/mips/sgi-ip27/ip27-hubio.c +++ b/trunk/arch/mips/sgi-ip27/ip27-hubio.c @@ -168,7 +168,7 @@ static void hub_set_piomode(nasid_t nasid) } /* - * hub_pio_init - PIO-related hub initialization + * hub_pio_init - PIO-related hub initalization * * @hub: hubinfo structure for our hub */ diff --git a/trunk/arch/parisc/Kconfig b/trunk/arch/parisc/Kconfig index 028d8a0fdbfd..2b649c46631c 100644 --- a/trunk/arch/parisc/Kconfig +++ b/trunk/arch/parisc/Kconfig @@ -7,7 +7,6 @@ mainmenu "Linux/PA-RISC Kernel Configuration" config PARISC def_bool y - select HAVE_OPROFILE help The PA-RISC microprocessor is designed by Hewlett-Packard and used in many of their workstations & servers (HP9000 700 and 800 series, @@ -206,8 +205,9 @@ config SMP singleprocessor machines. On a singleprocessor machine, the kernel will run faster if you say N here. - See also and the SMP-HOWTO - available at . + See also the , + and the SMP-HOWTO available + at . If you don't know what to do here, say N. @@ -272,6 +272,8 @@ source "drivers/Kconfig" source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/parisc/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/parisc/kernel/cache.c b/trunk/arch/parisc/kernel/cache.c index e10d25d2d9c9..395bbce64993 100644 --- a/trunk/arch/parisc/kernel/cache.c +++ b/trunk/arch/parisc/kernel/cache.c @@ -305,7 +305,7 @@ flush_user_cache_page_non_current(struct vm_area_struct *vma, /* save the current process space and pgd */ unsigned long space = mfsp(3), pgd = mfctl(25); - /* we don't mind taking interrupts since they may not + /* we don't mind taking interrups since they may not * do anything with user space, but we can't * be preempted here */ preempt_disable(); diff --git a/trunk/arch/parisc/kernel/hardware.c b/trunk/arch/parisc/kernel/hardware.c index 84b9611a9228..04848b2b381c 100644 --- a/trunk/arch/parisc/kernel/hardware.c +++ b/trunk/arch/parisc/kernel/hardware.c @@ -1187,7 +1187,7 @@ static struct hp_hardware hp_hardware_list[] __devinitdata = { {HPHW_FIO, 0x005, 0x000A9, 0x00, "AllegroLow Core PCI USB KB"}, {HPHW_FIO, 0x006, 0x000A9, 0x00, "AllegroHigh Core PCI SuperIO RS-232"}, {HPHW_FIO, 0x006, 0x000A9, 0x00, "AllegroHigh Core PCI USB KB"}, - {HPHW_FIO, 0x007, 0x000A9, 0x0, "Miscellaneous PCI Plug-in"}, + {HPHW_FIO, 0x007, 0x000A9, 0x0, "Miscelaneous PCI Plug-in"}, {HPHW_FIO, 0x00A, 0x000A9, 0x0, "Lego 360 Core PCI SuperIO RS-232"}, {HPHW_FIO, 0x00A, 0x000A9, 0x0, "Lego 360 Core PCI USB KB"}, {HPHW_FIO, 0x004, 0x00320, 0x0, "Metheus Frame Buffer"}, diff --git a/trunk/arch/parisc/kernel/signal.c b/trunk/arch/parisc/kernel/signal.c index 58fccc96d003..2ce3806f02e1 100644 --- a/trunk/arch/parisc/kernel/signal.c +++ b/trunk/arch/parisc/kernel/signal.c @@ -333,7 +333,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, flush_user_icache_range((unsigned long) &frame->tramp[0], (unsigned long) &frame->tramp[TRAMP_SIZE]); - /* TRAMP Words 0-4, Length 5 = SIGRESTARTBLOCK_TRAMP + /* TRAMP Words 0-4, Lenght 5 = SIGRESTARTBLOCK_TRAMP * TRAMP Words 5-9, Length 4 = SIGRETURN_TRAMP * So the SIGRETURN_TRAMP is at the end of SIGRESTARTBLOCK_TRAMP */ diff --git a/trunk/arch/powerpc/Kconfig b/trunk/arch/powerpc/Kconfig index b94d4502a477..4a22c9928618 100644 --- a/trunk/arch/powerpc/Kconfig +++ b/trunk/arch/powerpc/Kconfig @@ -87,8 +87,6 @@ config ARCH_NO_VIRT_TO_BUS config PPC bool default y - select HAVE_OPROFILE - select HAVE_KPROBES config EARLY_PRINTK bool @@ -715,6 +713,8 @@ source "arch/powerpc/sysdev/qe_lib/Kconfig" source "lib/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/powerpc/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/ppc/Kconfig b/trunk/arch/ppc/Kconfig index 531156f8919c..db5934cdafb3 100644 --- a/trunk/arch/ppc/Kconfig +++ b/trunk/arch/ppc/Kconfig @@ -42,8 +42,6 @@ config GENERIC_CALIBRATE_DELAY config PPC bool default y - select HAVE_OPROFILE - select HAVE_KPROBES config PPC32 bool @@ -1258,6 +1256,8 @@ endmenu source "lib/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/ppc/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/s390/Kconfig b/trunk/arch/s390/Kconfig index 82cbffd03654..6ef54d27fc00 100644 --- a/trunk/arch/s390/Kconfig +++ b/trunk/arch/s390/Kconfig @@ -51,8 +51,6 @@ mainmenu "Linux Kernel Configuration" config S390 def_bool y - select HAVE_OPROFILE - select HAVE_KPROBES source "init/Kconfig" @@ -83,8 +81,8 @@ config SMP singleprocessor machines. On a singleprocessor machine, the kernel will run faster if you say N here. - See also the SMP-HOWTO available at - . + See also the and the SMP-HOWTO + available at . Even if you don't know what to do here, say Y. @@ -528,6 +526,8 @@ source "drivers/Kconfig" source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/s390/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/sh/Kconfig b/trunk/arch/sh/Kconfig index 1c3a90835c7e..b30c4c376a83 100644 --- a/trunk/arch/sh/Kconfig +++ b/trunk/arch/sh/Kconfig @@ -8,7 +8,6 @@ mainmenu "Linux/SuperH Kernel Configuration" config SUPERH def_bool y select EMBEDDED - select HAVE_OPROFILE help The SuperH is a RISC processor targeted for use in embedded systems and consumer electronics; it was also used in the Sega Dreamcast @@ -673,8 +672,9 @@ config SMP People using multiprocessor machines who say Y here should also say Y to "Enhanced Real Time Clock Support", below. - See also and the SMP-HOWTO - available at . + See also the , + and the SMP-HOWTO available + at . If you don't know what to do here, say N. @@ -896,6 +896,8 @@ source "drivers/Kconfig" source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/sh/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/sparc/Kconfig b/trunk/arch/sparc/Kconfig index 99f8971716d2..527adc808ad6 100644 --- a/trunk/arch/sparc/Kconfig +++ b/trunk/arch/sparc/Kconfig @@ -48,8 +48,9 @@ config SMP Y to "Enhanced Real Time Clock Support", below. The "Advanced Power Management" code will be disabled if you say Y here. - See also and the SMP-HOWTO - available at . + See also the , + and the SMP-HOWTO available at + . If you don't know what to do here, say N. @@ -62,7 +63,6 @@ config NR_CPUS config SPARC bool default y - select HAVE_OPROFILE # Identify this as a Sparc32 build config SPARC32 @@ -320,6 +320,8 @@ endmenu source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/sparc/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/sparc/kernel/ioport.c b/trunk/arch/sparc/kernel/ioport.c index ad0ede24ca1d..97aa50d1e4ae 100644 --- a/trunk/arch/sparc/kernel/ioport.c +++ b/trunk/arch/sparc/kernel/ioport.c @@ -305,7 +305,7 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, long len, u32 *dma_addrp) struct resource *res; int order; - /* XXX why are some lengths signed, others unsigned? */ + /* XXX why are some lenghts signed, others unsigned? */ if (len <= 0) { return NULL; } @@ -393,7 +393,7 @@ void sbus_free_consistent(struct sbus_dev *sdev, long n, void *p, u32 ba) */ dma_addr_t sbus_map_single(struct sbus_dev *sdev, void *va, size_t len, int direction) { - /* XXX why are some lengths signed, others unsigned? */ + /* XXX why are some lenghts signed, others unsigned? */ if (len <= 0) { return 0; } diff --git a/trunk/arch/sparc64/Kconfig b/trunk/arch/sparc64/Kconfig index a8c6366f05a1..158522f51d31 100644 --- a/trunk/arch/sparc64/Kconfig +++ b/trunk/arch/sparc64/Kconfig @@ -8,8 +8,6 @@ mainmenu "Linux/UltraSPARC Kernel Configuration" config SPARC bool default y - select HAVE_OPROFILE - select HAVE_KPROBES config SPARC64 bool @@ -168,8 +166,9 @@ config SMP Y to "Enhanced Real Time Clock Support", below. The "Advanced Power Management" code will be disabled if you say Y here. - See also and the SMP-HOWTO - available at . + See also the , + and the SMP-HOWTO available at + . If you don't know what to do here, say N. @@ -466,6 +465,8 @@ source "drivers/sbus/char/Kconfig" source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/sparc64/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/um/Kconfig b/trunk/arch/um/Kconfig index 55945db1313c..dd1689b814cb 100644 --- a/trunk/arch/um/Kconfig +++ b/trunk/arch/um/Kconfig @@ -289,4 +289,6 @@ config INPUT bool default n +source "kernel/Kconfig.instrumentation" + source "arch/um/Kconfig.debug" diff --git a/trunk/arch/um/sys-x86_64/signal.c b/trunk/arch/um/sys-x86_64/signal.c index 14070181407b..7457436b433a 100644 --- a/trunk/arch/um/sys-x86_64/signal.c +++ b/trunk/arch/um/sys-x86_64/signal.c @@ -112,7 +112,7 @@ static int copy_sc_to_user(struct sigcontext __user *to, err |= PUTREG(regs, RSI, to, si); err |= PUTREG(regs, RBP, to, bp); /* - * Must use original RSP, which is passed in, rather than what's in + * Must use orignal RSP, which is passed in, rather than what's in * the pt_regs, because that's already been updated to point at the * signal frame. */ diff --git a/trunk/arch/v850/Kconfig b/trunk/arch/v850/Kconfig index ace479ab273f..b6a50b8b38de 100644 --- a/trunk/arch/v850/Kconfig +++ b/trunk/arch/v850/Kconfig @@ -331,6 +331,8 @@ source "sound/Kconfig" source "drivers/usb/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/v850/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/x86/Kconfig b/trunk/arch/x86/Kconfig index 99af1272ab1d..7109037bdf7c 100644 --- a/trunk/arch/x86/Kconfig +++ b/trunk/arch/x86/Kconfig @@ -18,8 +18,6 @@ config X86_64 ### Arch settings config X86 def_bool y - select HAVE_OPROFILE - select HAVE_KPROBES config GENERIC_LOCKBREAK def_bool n @@ -108,6 +106,10 @@ config GENERIC_TIME_VSYSCALL config HAVE_SETUP_PER_CPU_AREA def_bool X86_64 +config ARCH_SUPPORTS_OPROFILE + bool + default y + select HAVE_KVM config ARCH_HIBERNATION_POSSIBLE @@ -202,7 +204,8 @@ config SMP Y to "Enhanced Real Time Clock Support", below. The "Advanced Power Management" code will be disabled if you say Y here. - See also , + See also the , + , and the SMP-HOWTO available at . @@ -1594,6 +1597,8 @@ source "drivers/firmware/Kconfig" source "fs/Kconfig" +source "kernel/Kconfig.instrumentation" + source "arch/x86/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/arch/x86/lib/bitops_32.c b/trunk/arch/x86/lib/bitops_32.c index b65440459859..afd0045595d4 100644 --- a/trunk/arch/x86/lib/bitops_32.c +++ b/trunk/arch/x86/lib/bitops_32.c @@ -2,7 +2,7 @@ #include /** - * find_next_bit - find the next set bit in a memory region + * find_next_bit - find the first set bit in a memory region * @addr: The address to base the search on * @offset: The bitnumber to start searching at * @size: The maximum size to search diff --git a/trunk/arch/x86/lib/bitops_64.c b/trunk/arch/x86/lib/bitops_64.c index 0e8f491e6ccc..95b6d9639fba 100644 --- a/trunk/arch/x86/lib/bitops_64.c +++ b/trunk/arch/x86/lib/bitops_64.c @@ -58,7 +58,7 @@ long find_first_zero_bit(const unsigned long * addr, unsigned long size) } /** - * find_next_zero_bit - find the next zero bit in a memory region + * find_next_zero_bit - find the first zero bit in a memory region * @addr: The address to base the search on * @offset: The bitnumber to start searching at * @size: The maximum size to search diff --git a/trunk/arch/xtensa/Kconfig b/trunk/arch/xtensa/Kconfig index 5d5546ce88fe..844721e8e3dd 100644 --- a/trunk/arch/xtensa/Kconfig +++ b/trunk/arch/xtensa/Kconfig @@ -246,6 +246,8 @@ config EMBEDDED_RAMDISK_IMAGE provide one yourself. endmenu +source "kernel/Kconfig.instrumentation" + source "arch/xtensa/Kconfig.debug" source "security/Kconfig" diff --git a/trunk/drivers/acpi/scan.c b/trunk/drivers/acpi/scan.c index d9d531cce27f..cbfe9ae7a9e5 100644 --- a/trunk/drivers/acpi/scan.c +++ b/trunk/drivers/acpi/scan.c @@ -830,7 +830,7 @@ static int acpi_bus_get_flags(struct acpi_device *device) if (ACPI_SUCCESS(status)) device->flags.wake_capable = 1; - /* TBD: Performance management */ + /* TBD: Peformance management */ return 0; } diff --git a/trunk/drivers/acpi/utilities/utresrc.c b/trunk/drivers/acpi/utilities/utresrc.c index b630ee137ee1..cbbd3315a1e2 100644 --- a/trunk/drivers/acpi/utilities/utresrc.c +++ b/trunk/drivers/acpi/utilities/utresrc.c @@ -1,6 +1,6 @@ /******************************************************************************* * - * Module Name: utresrc - Resource management utilities + * Module Name: utresrc - Resource managment utilities * ******************************************************************************/ diff --git a/trunk/drivers/ata/ata_piix.c b/trunk/drivers/ata/ata_piix.c index 4b99ed0c59bb..47892e6f5ded 100644 --- a/trunk/drivers/ata/ata_piix.c +++ b/trunk/drivers/ata/ata_piix.c @@ -837,7 +837,7 @@ static void piix_set_piomode(struct ata_port *ap, struct ata_device *adev) if (is_slave) { /* clear TIME1|IE1|PPE1|DTE1 */ master_data &= 0xff0f; - /* Enable SITRE (separate slave timing register) */ + /* Enable SITRE (seperate slave timing register) */ master_data |= 0x4000; /* enable PPE1, IE1 and TIME1 as needed */ master_data |= (control << 4); diff --git a/trunk/drivers/ata/libata-core.c b/trunk/drivers/ata/libata-core.c index 361cf50cbdea..bdbd55af7022 100644 --- a/trunk/drivers/ata/libata-core.c +++ b/trunk/drivers/ata/libata-core.c @@ -3097,7 +3097,7 @@ static int ata_dev_set_mode(struct ata_device *dev) /** * ata_do_set_mode - Program timings and issue SET FEATURES - XFER * @link: link on which timings will be programmed - * @r_failed_dev: out parameter for failed device + * @r_failed_dev: out paramter for failed device * * Standard implementation of the function used to tune and set * ATA device disk transfer mode (PIO3, UDMA6, etc.). If diff --git a/trunk/drivers/ata/pata_at32.c b/trunk/drivers/ata/pata_at32.c index db057b183d60..67e574de31e8 100644 --- a/trunk/drivers/ata/pata_at32.c +++ b/trunk/drivers/ata/pata_at32.c @@ -324,7 +324,7 @@ static int __init pata_at32_probe(struct platform_device *pdev) if (irq < 0) return irq; - /* Setup struct containing private information */ + /* Setup struct containing private infomation */ info = kzalloc(sizeof(struct at32_ide_info), GFP_KERNEL); if (!info) return -ENOMEM; diff --git a/trunk/drivers/ata/pata_efar.c b/trunk/drivers/ata/pata_efar.c index dc33220fe5b2..043dcd35106c 100644 --- a/trunk/drivers/ata/pata_efar.c +++ b/trunk/drivers/ata/pata_efar.c @@ -135,7 +135,7 @@ static void efar_set_piomode (struct ata_port *ap, struct ata_device *adev) idetm_data &= 0xCC0F; idetm_data |= (control << 4); - /* Slave timing in separate register */ + /* Slave timing in seperate register */ pci_read_config_byte(dev, 0x44, &slave_data); slave_data &= 0x0F << shift; slave_data |= ((timings[pio][0] << 2) | timings[pio][1]) << shift; diff --git a/trunk/drivers/ata/pata_it8213.c b/trunk/drivers/ata/pata_it8213.c index e0c2cc29d0ca..1eda821e5e39 100644 --- a/trunk/drivers/ata/pata_it8213.c +++ b/trunk/drivers/ata/pata_it8213.c @@ -128,7 +128,7 @@ static void it8213_set_piomode (struct ata_port *ap, struct ata_device *adev) idetm_data &= 0xCC0F; idetm_data |= (control << 4); - /* Slave timing in separate register */ + /* Slave timing in seperate register */ pci_read_config_byte(dev, 0x44, &slave_data); slave_data &= 0xF0; slave_data |= ((timings[pio][0] << 2) | timings[pio][1]) << 4; diff --git a/trunk/drivers/ata/pata_sis.c b/trunk/drivers/ata/pata_sis.c index dc7e91562e43..87546d9f1ca0 100644 --- a/trunk/drivers/ata/pata_sis.c +++ b/trunk/drivers/ata/pata_sis.c @@ -345,7 +345,7 @@ static void sis_old_set_dmamode (struct ata_port *ap, struct ata_device *adev) if (adev->dma_mode < XFER_UDMA_0) { /* bits 3-0 hold recovery timing bits 8-10 active timing and - the higher bits are dependant on the device */ + the higer bits are dependant on the device */ timing &= ~0x870F; timing |= mwdma_bits[speed]; } else { @@ -385,7 +385,7 @@ static void sis_66_set_dmamode (struct ata_port *ap, struct ata_device *adev) if (adev->dma_mode < XFER_UDMA_0) { /* bits 3-0 hold recovery timing bits 8-10 active timing and - the higher bits are dependant on the device, bit 15 udma */ + the higer bits are dependant on the device, bit 15 udma */ timing &= ~0x870F; timing |= mwdma_bits[speed]; } else { diff --git a/trunk/drivers/base/core.c b/trunk/drivers/base/core.c index 9c0070b5bd3e..b1727876182c 100644 --- a/trunk/drivers/base/core.c +++ b/trunk/drivers/base/core.c @@ -423,8 +423,10 @@ struct kset *devices_kset; int device_create_file(struct device *dev, struct device_attribute *attr) { int error = 0; - if (dev) + if (get_device(dev)) { error = sysfs_create_file(&dev->kobj, &attr->attr); + put_device(dev); + } return error; } @@ -435,8 +437,10 @@ int device_create_file(struct device *dev, struct device_attribute *attr) */ void device_remove_file(struct device *dev, struct device_attribute *attr) { - if (dev) + if (get_device(dev)) { sysfs_remove_file(&dev->kobj, &attr->attr); + put_device(dev); + } } /** @@ -1140,11 +1144,25 @@ struct device *device_create(struct class *class, struct device *parent, } EXPORT_SYMBOL_GPL(device_create); -static int __match_devt(struct device *dev, void *data) +/** + * find_device - finds a device that was created with device_create() + * @class: pointer to the struct class that this device was registered with + * @devt: the dev_t of the device that was previously registered + */ +static struct device *find_device(struct class *class, dev_t devt) { - dev_t *devt = data; + struct device *dev = NULL; + struct device *dev_tmp; - return dev->devt == *devt; + down(&class->sem); + list_for_each_entry(dev_tmp, &class->devices, node) { + if (dev_tmp->devt == devt) { + dev = dev_tmp; + break; + } + } + up(&class->sem); + return dev; } /** @@ -1159,11 +1177,9 @@ void device_destroy(struct class *class, dev_t devt) { struct device *dev; - dev = class_find_device(class, &devt, __match_devt); - if (dev) { - put_device(dev); + dev = find_device(class, devt); + if (dev) device_unregister(dev); - } } EXPORT_SYMBOL_GPL(device_destroy); @@ -1187,11 +1203,9 @@ void destroy_suspended_device(struct class *class, dev_t devt) { struct device *dev; - dev = class_find_device(class, &devt, __match_devt); - if (dev) { + dev = find_device(class, devt); + if (dev) device_pm_schedule_removal(dev); - put_device(dev); - } } EXPORT_SYMBOL_GPL(destroy_suspended_device); #endif /* CONFIG_PM_SLEEP */ diff --git a/trunk/drivers/base/driver.c b/trunk/drivers/base/driver.c index ba75184c653c..a35f04121a00 100644 --- a/trunk/drivers/base/driver.c +++ b/trunk/drivers/base/driver.c @@ -97,9 +97,10 @@ int driver_create_file(struct device_driver *drv, struct driver_attribute *attr) { int error; - if (drv) + if (get_driver(drv)) { error = sysfs_create_file(&drv->p->kobj, &attr->attr); - else + put_driver(drv); + } else error = -EINVAL; return error; } @@ -113,8 +114,10 @@ EXPORT_SYMBOL_GPL(driver_create_file); void driver_remove_file(struct device_driver *drv, struct driver_attribute *attr) { - if (drv) + if (get_driver(drv)) { sysfs_remove_file(&drv->p->kobj, &attr->attr); + put_driver(drv); + } } EXPORT_SYMBOL_GPL(driver_remove_file); diff --git a/trunk/drivers/base/power/main.c b/trunk/drivers/base/power/main.c index bdc03f7e8424..200ed5fafd50 100644 --- a/trunk/drivers/base/power/main.c +++ b/trunk/drivers/base/power/main.c @@ -129,7 +129,6 @@ void device_pm_schedule_removal(struct device *dev) list_move_tail(&dev->power.entry, &dpm_destroy); mutex_unlock(&dpm_list_mtx); } -EXPORT_SYMBOL_GPL(device_pm_schedule_removal); /** * pm_sleep_lock - mutual exclusion for registration and suspend diff --git a/trunk/drivers/base/power/power.h b/trunk/drivers/base/power/power.h index e32d3bdb92c1..6f0dfca8ebdd 100644 --- a/trunk/drivers/base/power/power.h +++ b/trunk/drivers/base/power/power.h @@ -13,6 +13,7 @@ static inline struct device *to_device(struct list_head *entry) extern void device_pm_add(struct device *); extern void device_pm_remove(struct device *); +extern void device_pm_schedule_removal(struct device *); extern int pm_sleep_lock(void); extern void pm_sleep_unlock(void); diff --git a/trunk/drivers/block/cciss_scsi.c b/trunk/drivers/block/cciss_scsi.c index 55178e9973a0..63ee6c076cb3 100644 --- a/trunk/drivers/block/cciss_scsi.c +++ b/trunk/drivers/block/cciss_scsi.c @@ -1453,7 +1453,7 @@ static int cciss_eh_device_reset_handler(struct scsi_cmnd *scsicmd) rc = sendcmd(CCISS_RESET_MSG, ctlr, NULL, 0, 2, 0, 0, (unsigned char *) &cmd_in_trouble->Header.LUN.LunAddrBytes[0], TYPE_MSG); - /* sendcmd turned off interrupts on the board, turn 'em back on. */ + /* sendcmd turned off interrputs on the board, turn 'em back on. */ (*c)->access.set_intr_mask(*c, CCISS_INTR_ON); if (rc == 0) return SUCCESS; @@ -1483,7 +1483,7 @@ static int cciss_eh_abort_handler(struct scsi_cmnd *scsicmd) 0, 2, 0, 0, (unsigned char *) &cmd_to_abort->Header.LUN.LunAddrBytes[0], TYPE_MSG); - /* sendcmd turned off interrupts on the board, turn 'em back on. */ + /* sendcmd turned off interrputs on the board, turn 'em back on. */ (*c)->access.set_intr_mask(*c, CCISS_INTR_ON); if (rc == 0) return SUCCESS; diff --git a/trunk/drivers/bluetooth/btuart_cs.c b/trunk/drivers/bluetooth/btuart_cs.c index dade1626865b..08f48d577aba 100644 --- a/trunk/drivers/bluetooth/btuart_cs.c +++ b/trunk/drivers/bluetooth/btuart_cs.c @@ -383,7 +383,7 @@ static void btuart_change_speed(btuart_info_t *info, unsigned int speed) outb(lcr, iobase + UART_LCR); /* Set 8N1 */ outb(fcr, iobase + UART_FCR); /* Enable FIFO's */ - /* Turn on interrupts */ + /* Turn on interrups */ outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER); spin_unlock_irqrestore(&(info->lock), flags); diff --git a/trunk/drivers/char/drm/drm_vm.c b/trunk/drivers/char/drm/drm_vm.c index ef5e6b130c48..e8d50af58201 100644 --- a/trunk/drivers/char/drm/drm_vm.c +++ b/trunk/drivers/char/drm/drm_vm.c @@ -506,7 +506,6 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma) vma->vm_ops = &drm_vm_dma_ops; vma->vm_flags |= VM_RESERVED; /* Don't swap */ - vma->vm_flags |= VM_DONTEXPAND; vma->vm_file = filp; /* Needed for drm_vm_open() */ drm_vm_open_locked(vma); @@ -656,7 +655,6 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) return -EINVAL; /* This should never happen. */ } vma->vm_flags |= VM_RESERVED; /* Don't swap */ - vma->vm_flags |= VM_DONTEXPAND; vma->vm_file = filp; /* Needed for drm_vm_open() */ drm_vm_open_locked(vma); diff --git a/trunk/drivers/char/drm/r300_reg.h b/trunk/drivers/char/drm/r300_reg.h index fa194a46c1e4..3ae57ecc7afd 100644 --- a/trunk/drivers/char/drm/r300_reg.h +++ b/trunk/drivers/char/drm/r300_reg.h @@ -584,7 +584,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define R300_RE_FOG_START 0x4298 /* Not sure why there are duplicate of factor and constant values. - * My best guess so far is that there are separate zbiases for test and write. + * My best guess so far is that there are seperate zbiases for test and write. * Ordering might be wrong. * Some of the tests indicate that fgl has a fallback implementation of zbias * via pixel shaders. diff --git a/trunk/drivers/char/drm/via_dma.c b/trunk/drivers/char/drm/via_dma.c index 7009dbddac43..75d6b748c2c0 100644 --- a/trunk/drivers/char/drm/via_dma.c +++ b/trunk/drivers/char/drm/via_dma.c @@ -400,7 +400,7 @@ static inline uint32_t *via_align_buffer(drm_via_private_t * dev_priv, } /* - * This function is used internally by ring buffer management code. + * This function is used internally by ring buffer mangement code. * * Returns virtual pointer to ring buffer. */ diff --git a/trunk/drivers/char/efirtc.c b/trunk/drivers/char/efirtc.c index 49233f589874..004141d535a2 100644 --- a/trunk/drivers/char/efirtc.c +++ b/trunk/drivers/char/efirtc.c @@ -18,7 +18,7 @@ * * NOTES: * - Locking is required for safe execution of EFI calls with regards - * to interrupts and SMP. + * to interrrupts and SMP. * * TODO (December 1999): * - provide the API to set/get the WakeUp Alarm (different from the diff --git a/trunk/drivers/char/epca.c b/trunk/drivers/char/epca.c index ffd747c5dff0..ffcecde9e2a5 100644 --- a/trunk/drivers/char/epca.c +++ b/trunk/drivers/char/epca.c @@ -1797,7 +1797,7 @@ static unsigned termios2digi_c(struct channel *ch, unsigned cflag) res |= cflag & ((CBAUD ^ CBAUDEX) | PARODD | PARENB | CSTOPB | CSIZE); /* * This gets a little confusing. The Digi cards have their own - * representation of c_cflags controlling baud rate. For the most part + * representation of c_cflags controling baud rate. For the most part * this is identical to the Linux implementation. However; Digi * supports one rate (76800) that Linux doesn't. This means that the * c_cflag entry that would normally mean 76800 for Digi actually means @@ -2068,7 +2068,7 @@ static int info_ioctl(struct tty_struct *tty, struct file *file, { /* * This call is made by the apps to complete the - * initialization of the board(s). This routine is + * initilization of the board(s). This routine is * responsible for setting the card to its initial * state and setting the drivers control fields to the * sutianle settings for the card in question. diff --git a/trunk/drivers/char/hangcheck-timer.c b/trunk/drivers/char/hangcheck-timer.c index 712d9f271aa6..0e8ceea5ea78 100644 --- a/trunk/drivers/char/hangcheck-timer.c +++ b/trunk/drivers/char/hangcheck-timer.c @@ -26,7 +26,7 @@ * The hangcheck-timer driver uses the TSC to catch delays that * jiffies does not notice. A timer is set. When the timer fires, it * checks whether it was delayed and if that delay exceeds a given - * margin of error. The hangcheck_tick module parameter takes the timer + * margin of error. The hangcheck_tick module paramter takes the timer * duration in seconds. The hangcheck_margin parameter defines the * margin of error, in seconds. The defaults are 60 seconds for the * timer and 180 seconds for the margin of error. IOW, a timer is set diff --git a/trunk/drivers/char/hvcs.c b/trunk/drivers/char/hvcs.c index 3402def22007..fd7559084b82 100644 --- a/trunk/drivers/char/hvcs.c +++ b/trunk/drivers/char/hvcs.c @@ -838,7 +838,7 @@ static int __devexit hvcs_remove(struct vio_dev *dev) if (!hvcsd) return -ENODEV; - /* By this time the vty-server won't be getting any more interrupts */ + /* By this time the vty-server won't be getting any more interrups */ spin_lock_irqsave(&hvcsd->lock, flags); diff --git a/trunk/drivers/char/ip2/i2lib.c b/trunk/drivers/char/ip2/i2lib.c index d6567b32fb5c..e46120d05b68 100644 --- a/trunk/drivers/char/ip2/i2lib.c +++ b/trunk/drivers/char/ip2/i2lib.c @@ -661,7 +661,7 @@ i2QueueCommands(int type, i2ChanStrPtr pCh, int timeout, int nCommands, if (!in_interrupt()) { schedule_timeout_interruptible(1); // short nap } else { - // we cannot sched/sleep in interrupt silly + // we cannot sched/sleep in interrrupt silly return 0; } if (signal_pending(current)) { diff --git a/trunk/drivers/char/ip2/ip2main.c b/trunk/drivers/char/ip2/ip2main.c index 0f49ccf02a7f..e04e66cf2c68 100644 --- a/trunk/drivers/char/ip2/ip2main.c +++ b/trunk/drivers/char/ip2/ip2main.c @@ -1251,7 +1251,7 @@ ip2_poll(unsigned long arg) // Just polled boards, IRQ = 0 will hit all non-interrupt boards. // It will NOT poll boards handled by hard interrupts. - // The issue of queued BH interrupts is handled in ip2_interrupt(). + // The issue of queued BH interrups is handled in ip2_interrupt(). ip2_polled_interrupt(); PollTimer.expires = POLL_TIMEOUT; diff --git a/trunk/drivers/char/mspec.c b/trunk/drivers/char/mspec.c index ff146c2b08fd..82f2e27dca7d 100644 --- a/trunk/drivers/char/mspec.c +++ b/trunk/drivers/char/mspec.c @@ -283,7 +283,7 @@ mspec_mmap(struct file *file, struct vm_area_struct *vma, vdata->refcnt = ATOMIC_INIT(1); vma->vm_private_data = vdata; - vma->vm_flags |= (VM_IO | VM_RESERVED | VM_PFNMAP | VM_DONTEXPAND); + vma->vm_flags |= (VM_IO | VM_RESERVED | VM_PFNMAP); if (vdata->type == MSPEC_FETCHOP || vdata->type == MSPEC_UNCACHED) vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); vma->vm_ops = &mspec_vm_ops; diff --git a/trunk/drivers/char/nozomi.c b/trunk/drivers/char/nozomi.c index dfaab2322de3..6076e662886a 100644 --- a/trunk/drivers/char/nozomi.c +++ b/trunk/drivers/char/nozomi.c @@ -2,7 +2,7 @@ * nozomi.c -- HSDPA driver Broadband Wireless Data Card - Globe Trotter * * Written by: Ulf Jakobsson, - * Jan Åkerfeldt, + * Jan �erfeldt, * Stefan Thomasson, * * Maintained by: Paul Hardwick (p.hardwick@option.com) @@ -38,6 +38,60 @@ * -------------------------------------------------------------------------- */ +/* + * CHANGELOG + * Version 2.1d + * 11-November-2007 Jiri Slaby, Frank Seidel + * - Big rework of multicard support by Jiri + * - Major cleanups (semaphore to mutex, endianess, no major reservation) + * - Optimizations + * + * Version 2.1c + * 30-October-2007 Frank Seidel + * - Completed multicard support + * - Minor cleanups + * + * Version 2.1b + * 07-August-2007 Frank Seidel + * - Minor cleanups + * - theoretical multicard support + * + * Version 2.1 + * 03-July-2006 Paul Hardwick + * + * - Stability Improvements. Incorporated spinlock wraps patch. + * - Updated for newer 2.6.14+ kernels (tty_buffer_request_room) + * - using __devexit macro for tty + * + * + * Version 2.0 + * 08-feb-2006 15:34:10:Ulf + * + * -Fixed issue when not waking up line disipine layer, could probably result + * in better uplink performance for 2.4. + * + * -Fixed issue with big endian during initalization, now proper toggle flags + * are handled between preloader and maincode. + * + * -Fixed flow control issue. + * + * -Added support for setting DTR. + * + * -For 2.4 kernels, removing temporary buffer that's not needed. + * + * -Reading CTS only for modem port (only port that supports it). + * + * -Return 0 in write_room instead of netative value, it's not handled in + * upper layer. + * + * -------------------------------------------------------------------------- + * Version 1.0 + * + * First version of driver, only tested with card of type F32_2. + * Works fine with 2.4 and 2.6 kernels. + * Driver also support big endian architecture. + */ + /* Enable this to have a lot of debug printouts */ #define DEBUG @@ -89,9 +143,8 @@ do { \ /* Do we need this settable at runtime? */ static int debug = NOZOMI_DEBUG_LEVEL; -#define D(lvl, args...) do \ - {if (lvl & debug) NFO(KERN_DEBUG, ##args); } \ - while (0) +#define D(lvl, args...) do {if (lvl & debug) NFO(KERN_DEBUG, ##args); } \ + while (0) #define D_(lvl, args...) D(lvl, ##args) /* These printouts are always printed */ @@ -220,13 +273,13 @@ enum port_type { /* Big endian */ struct toggles { - unsigned int enabled:5; /* + unsigned enabled:5; /* * Toggle fields are valid if enabled is 0, * else A-channels must always be used. */ - unsigned int diag_dl:1; - unsigned int mdm_dl:1; - unsigned int mdm_ul:1; + unsigned diag_dl:1; + unsigned mdm_dl:1; + unsigned mdm_ul:1; } __attribute__ ((packed)); /* Configuration table to read at startup of card */ @@ -267,19 +320,19 @@ struct config_table { /* This stores all control downlink flags */ struct ctrl_dl { u8 port; - unsigned int reserved:4; - unsigned int CTS:1; - unsigned int RI:1; - unsigned int DCD:1; - unsigned int DSR:1; + unsigned reserved:4; + unsigned CTS:1; + unsigned RI:1; + unsigned DCD:1; + unsigned DSR:1; } __attribute__ ((packed)); /* This stores all control uplink flags */ struct ctrl_ul { u8 port; - unsigned int reserved:6; - unsigned int RTS:1; - unsigned int DTR:1; + unsigned reserved:6; + unsigned RTS:1; + unsigned DTR:1; } __attribute__ ((packed)); #else @@ -287,10 +340,10 @@ struct ctrl_ul { /* This represents the toggle information */ struct toggles { - unsigned int mdm_ul:1; - unsigned int mdm_dl:1; - unsigned int diag_dl:1; - unsigned int enabled:5; /* + unsigned mdm_ul:1; + unsigned mdm_dl:1; + unsigned diag_dl:1; + unsigned enabled:5; /* * Toggle fields are valid if enabled is 0, * else A-channels must always be used. */ @@ -326,19 +379,19 @@ struct config_table { /* This stores all control downlink flags */ struct ctrl_dl { - unsigned int DSR:1; - unsigned int DCD:1; - unsigned int RI:1; - unsigned int CTS:1; - unsigned int reserverd:4; + unsigned DSR:1; + unsigned DCD:1; + unsigned RI:1; + unsigned CTS:1; + unsigned reserverd:4; u8 port; } __attribute__ ((packed)); /* This stores all control uplink flags */ struct ctrl_ul { - unsigned int DTR:1; - unsigned int RTS:1; - unsigned int reserved:6; + unsigned DTR:1; + unsigned RTS:1; + unsigned reserved:6; u8 port; } __attribute__ ((packed)); #endif @@ -395,7 +448,7 @@ struct buffer { } __attribute__ ((packed)); /* Global variables */ -static const struct pci_device_id nozomi_pci_tbl[] __devinitconst = { +static struct pci_device_id nozomi_pci_tbl[] = { {PCI_DEVICE(VENDOR1, DEVICE1)}, {}, }; @@ -471,12 +524,12 @@ static void read_mem32(u32 *buf, const void __iomem *mem_addr_start, * -Optimize * -Rewrite cleaner */ -static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf, +static u32 write_mem32(void __iomem *mem_addr_start, u32 *buf, u32 size_bytes) { u32 i = 0; u32 *ptr = (__force u32 *) mem_addr_start; - const u16 *buf16; + u16 *buf16; if (unlikely(!ptr || !buf)) return 0; @@ -484,7 +537,7 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf, /* shortcut for extremely often used cases */ switch (size_bytes) { case 2: /* 2 bytes */ - buf16 = (const u16 *)buf; + buf16 = (u16 *) buf; writew(__cpu_to_le16(*buf16), (void __iomem *)ptr); return 2; break; @@ -501,7 +554,7 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf, while (i < size_bytes) { if (size_bytes - i == 2) { /* 2 bytes */ - buf16 = (const u16 *)buf; + buf16 = (u16 *) buf; writew(__cpu_to_le16(*buf16), (void __iomem *)ptr); i += 2; } else { @@ -641,7 +694,7 @@ static void dump_table(const struct nozomi *dc) dc->config_table.ul_ctrl_len); } #else -static inline void dump_table(const struct nozomi *dc) { } +static __inline__ void dump_table(const struct nozomi *dc) { } #endif /* @@ -723,7 +776,8 @@ static int nozomi_read_config_table(struct nozomi *dc) /* Enable uplink interrupts */ static void enable_transmit_ul(enum port_type port, struct nozomi *dc) { - static const u16 mask[] = {MDM_UL, DIAG_UL, APP1_UL, APP2_UL, CTRL_UL}; + u16 mask[NOZOMI_MAX_PORTS] = \ + {MDM_UL, DIAG_UL, APP1_UL, APP2_UL, CTRL_UL}; if (port < NOZOMI_MAX_PORTS) { dc->last_ier |= mask[port]; @@ -736,8 +790,8 @@ static void enable_transmit_ul(enum port_type port, struct nozomi *dc) /* Disable uplink interrupts */ static void disable_transmit_ul(enum port_type port, struct nozomi *dc) { - static const u16 mask[] = - {~MDM_UL, ~DIAG_UL, ~APP1_UL, ~APP2_UL, ~CTRL_UL}; + u16 mask[NOZOMI_MAX_PORTS] = \ + {~MDM_UL, ~DIAG_UL, ~APP1_UL, ~APP2_UL, ~CTRL_UL}; if (port < NOZOMI_MAX_PORTS) { dc->last_ier &= mask[port]; @@ -750,7 +804,8 @@ static void disable_transmit_ul(enum port_type port, struct nozomi *dc) /* Enable downlink interrupts */ static void enable_transmit_dl(enum port_type port, struct nozomi *dc) { - static const u16 mask[] = {MDM_DL, DIAG_DL, APP1_DL, APP2_DL, CTRL_DL}; + u16 mask[NOZOMI_MAX_PORTS] = \ + {MDM_DL, DIAG_DL, APP1_DL, APP2_DL, CTRL_DL}; if (port < NOZOMI_MAX_PORTS) { dc->last_ier |= mask[port]; @@ -763,8 +818,8 @@ static void enable_transmit_dl(enum port_type port, struct nozomi *dc) /* Disable downlink interrupts */ static void disable_transmit_dl(enum port_type port, struct nozomi *dc) { - static const u16 mask[] = - {~MDM_DL, ~DIAG_DL, ~APP1_DL, ~APP2_DL, ~CTRL_DL}; + u16 mask[NOZOMI_MAX_PORTS] = \ + {~MDM_DL, ~DIAG_DL, ~APP1_DL, ~APP2_DL, ~CTRL_DL}; if (port < NOZOMI_MAX_PORTS) { dc->last_ier &= mask[port]; @@ -778,13 +833,13 @@ static void disable_transmit_dl(enum port_type port, struct nozomi *dc) * Return 1 - send buffer to card and ack. * Return 0 - don't ack, don't send buffer to card. */ -static int send_data(enum port_type index, const struct nozomi *dc) +static int send_data(enum port_type index, struct nozomi *dc) { u32 size = 0; - const struct port *port = &dc->port[index]; - const u8 toggle = port->toggle_ul; + struct port *port = &dc->port[index]; + u8 toggle = port->toggle_ul; void __iomem *addr = port->ul_addr[toggle]; - const u32 ul_size = port->ul_size[toggle]; + u32 ul_size = port->ul_size[toggle]; struct tty_struct *tty = port->tty; /* Get data from tty and place in buf for now */ @@ -1047,7 +1102,7 @@ static int send_flow_control(struct nozomi *dc) } /* - * Handle downlink data, ports that are handled are modem and diagnostics + * Handle donlink data, ports that are handled are modem and diagnostics * Return 1 - ok * Return 0 - toggle fields are out of sync */ @@ -1304,20 +1359,20 @@ static void nozomi_setup_private_data(struct nozomi *dc) static ssize_t card_type_show(struct device *dev, struct device_attribute *attr, char *buf) { - const struct nozomi *dc = pci_get_drvdata(to_pci_dev(dev)); + struct nozomi *dc = pci_get_drvdata(to_pci_dev(dev)); return sprintf(buf, "%d\n", dc->card_type); } -static DEVICE_ATTR(card_type, S_IRUGO, card_type_show, NULL); +static DEVICE_ATTR(card_type, 0444, card_type_show, NULL); static ssize_t open_ttys_show(struct device *dev, struct device_attribute *attr, char *buf) { - const struct nozomi *dc = pci_get_drvdata(to_pci_dev(dev)); + struct nozomi *dc = pci_get_drvdata(to_pci_dev(dev)); return sprintf(buf, "%u\n", dc->open_ttys); } -static DEVICE_ATTR(open_ttys, S_IRUGO, open_ttys_show, NULL); +static DEVICE_ATTR(open_ttys, 0444, open_ttys_show, NULL); static void make_sysfs_files(struct nozomi *dc) { @@ -1680,7 +1735,7 @@ static int ntty_write_room(struct tty_struct *tty) { struct port *port = tty->driver_data; int room = 0; - const struct nozomi *dc = get_dc_by_tty(tty); + struct nozomi *dc = get_dc_by_tty(tty); if (!dc || !port) return 0; @@ -1700,9 +1755,9 @@ static int ntty_write_room(struct tty_struct *tty) /* Gets io control parameters */ static int ntty_tiocmget(struct tty_struct *tty, struct file *file) { - const struct port *port = tty->driver_data; - const struct ctrl_dl *ctrl_dl = &port->ctrl_dl; - const struct ctrl_ul *ctrl_ul = &port->ctrl_ul; + struct port *port = tty->driver_data; + struct ctrl_dl *ctrl_dl = &port->ctrl_dl; + struct ctrl_ul *ctrl_ul = &port->ctrl_ul; return (ctrl_ul->RTS ? TIOCM_RTS : 0) | (ctrl_ul->DTR ? TIOCM_DTR : 0) | @@ -1732,7 +1787,7 @@ static int ntty_tiocmset(struct tty_struct *tty, struct file *file, static int ntty_cflags_changed(struct port *port, unsigned long flags, struct async_icount *cprev) { - const struct async_icount cnow = port->tty_icount; + struct async_icount cnow = port->tty_icount; int ret; ret = ((flags & TIOCM_RNG) && (cnow.rng != cprev->rng)) || @@ -1747,7 +1802,7 @@ static int ntty_cflags_changed(struct port *port, unsigned long flags, static int ntty_ioctl_tiocgicount(struct port *port, void __user *argp) { - const struct async_icount cnow = port->tty_icount; + struct async_icount cnow = port->tty_icount; struct serial_icounter_struct icount; icount.cts = cnow.cts; @@ -1827,10 +1882,7 @@ static void ntty_throttle(struct tty_struct *tty) /* just to discard single character writes */ static void ntty_put_char(struct tty_struct *tty, unsigned char c) { - /* - * card does not react correct when we write single chars - * to the card, so we discard them - */ + /* FIXME !!! */ DBG2("PUT CHAR Function: %c", c); } @@ -1858,7 +1910,7 @@ static s32 ntty_chars_in_buffer(struct tty_struct *tty) return rval; } -static const struct tty_operations tty_ops = { +static struct tty_operations tty_ops = { .ioctl = ntty_ioctl, .open = ntty_open, .close = ntty_close, diff --git a/trunk/drivers/char/synclink.c b/trunk/drivers/char/synclink.c index d010ed95ed3b..905d1f51a7bf 100644 --- a/trunk/drivers/char/synclink.c +++ b/trunk/drivers/char/synclink.c @@ -1544,7 +1544,7 @@ static void mgsl_isr_receive_data( struct mgsl_struct *info ) /* mgsl_isr_misc() * - * Service a miscellaneous interrupt source. + * Service a miscellaneos interrupt source. * * Arguments: info pointer to device extension (instance data) * Return Value: None diff --git a/trunk/drivers/char/toshiba.c b/trunk/drivers/char/toshiba.c index ce5ebe3b168f..5422f999636f 100644 --- a/trunk/drivers/char/toshiba.c +++ b/trunk/drivers/char/toshiba.c @@ -505,7 +505,7 @@ static int __init toshiba_init(void) if (tosh_probe()) return -ENODEV; - printk(KERN_INFO "Toshiba System Management Mode driver v" TOSH_VERSION "\n"); + printk(KERN_INFO "Toshiba System Managment Mode driver v" TOSH_VERSION "\n"); /* set the port to use for Fn status if not specified as a parameter */ if (tosh_fn==0x00) diff --git a/trunk/drivers/dio/dio-driver.c b/trunk/drivers/dio/dio-driver.c index 8cd8507b1a8a..e4c48e329367 100644 --- a/trunk/drivers/dio/dio-driver.c +++ b/trunk/drivers/dio/dio-driver.c @@ -15,15 +15,16 @@ #include -/** - * dio_match_device - Tell if a DIO device structure has a matching DIO device id structure - * @ids: array of DIO device id structures to search in - * @d: the DIO device structure to match against - * - * Used by a driver to check whether a DIO device present in the - * system is in its list of supported devices. Returns the matching - * dio_device_id structure or %NULL if there is no match. - */ + /** + * dio_match_device - Tell if a DIO device structure has a matching + * DIO device id structure + * @ids: array of DIO device id structures to search in + * @dev: the DIO device structure to match against + * + * Used by a driver to check whether a DIO device present in the + * system is in its list of supported devices. Returns the matching + * dio_device_id structure or %NULL if there is no match. + */ const struct dio_device_id * dio_match_device(const struct dio_device_id *ids, @@ -65,13 +66,13 @@ static int dio_device_probe(struct device *dev) } -/** - * dio_register_driver - register a new DIO driver - * @drv: the driver structure to register - * - * Adds the driver structure to the list of registered drivers - * Returns zero or a negative error value. - */ + /** + * dio_register_driver - register a new DIO driver + * @drv: the driver structure to register + * + * Adds the driver structure to the list of registered drivers + * Returns zero or a negative error value. + */ int dio_register_driver(struct dio_driver *drv) { @@ -84,15 +85,15 @@ int dio_register_driver(struct dio_driver *drv) } -/** - * dio_unregister_driver - unregister a DIO driver - * @drv: the driver structure to unregister - * - * Deletes the driver structure from the list of registered DIO drivers, - * gives it a chance to clean up by calling its remove() function for - * each device it was responsible for, and marks those devices as - * driverless. - */ + /** + * dio_unregister_driver - unregister a DIO driver + * @drv: the driver structure to unregister + * + * Deletes the driver structure from the list of registered DIO drivers, + * gives it a chance to clean up by calling its remove() function for + * each device it was responsible for, and marks those devices as + * driverless. + */ void dio_unregister_driver(struct dio_driver *drv) { @@ -100,15 +101,16 @@ void dio_unregister_driver(struct dio_driver *drv) } -/** - * dio_bus_match - Tell if a DIO device structure has a matching DIO device id structure - * @dev: the DIO device structure to match against - * @drv: the &device_driver that points to the array of DIO device id structures to search - * - * Used by a driver to check whether a DIO device present in the - * system is in its list of supported devices. Returns the matching - * dio_device_id structure or %NULL if there is no match. - */ + /** + * dio_bus_match - Tell if a DIO device structure has a matching DIO + * device id structure + * @ids: array of DIO device id structures to search in + * @dev: the DIO device structure to match against + * + * Used by a driver to check whether a DIO device present in the + * system is in its list of supported devices. Returns the matching + * dio_device_id structure or %NULL if there is no match. + */ static int dio_bus_match(struct device *dev, struct device_driver *drv) { diff --git a/trunk/drivers/edac/edac_pci.c b/trunk/drivers/edac/edac_pci.c index e0b47b74ec45..5dee9f50414b 100644 --- a/trunk/drivers/edac/edac_pci.c +++ b/trunk/drivers/edac/edac_pci.c @@ -73,7 +73,7 @@ EXPORT_SYMBOL_GPL(edac_pci_alloc_ctl_info); * * Last action on the pci control structure. * - * call the remove sysfs information, which will unregister + * call the remove sysfs informaton, which will unregister * this control struct's kobj. When that kobj's ref count * goes to zero, its release function will be call and then * kfree() the memory. diff --git a/trunk/drivers/edac/i5000_edac.c b/trunk/drivers/edac/i5000_edac.c index 5a852017c17a..a1f24c42d5ff 100644 --- a/trunk/drivers/edac/i5000_edac.c +++ b/trunk/drivers/edac/i5000_edac.c @@ -351,7 +351,7 @@ struct i5000_pvt { u16 b1_ambpresent0; /* Branch 1, Channel 8 */ u16 b1_ambpresent1; /* Branch 1, Channel 1 */ - /* DIMM information matrix, allocating architecture maximums */ + /* DIMM infomation matrix, allocating architecture maximums */ struct i5000_dimm_info dimm_info[MAX_CSROWS][MAX_CHANNELS]; /* Actual values for this controller */ diff --git a/trunk/drivers/firmware/edd.c b/trunk/drivers/firmware/edd.c index 744011989044..d168223db159 100644 --- a/trunk/drivers/firmware/edd.c +++ b/trunk/drivers/firmware/edd.c @@ -11,7 +11,7 @@ * * This code takes information provided by BIOS EDD calls * fn41 - Check Extensions Present and - * fn48 - Get Device Parameters with EDD extensions + * fn48 - Get Device Parametes with EDD extensions * made in setup.S, copied to safe structures in setup.c, * and presents it in sysfs. * diff --git a/trunk/drivers/ide/ide-timing.h b/trunk/drivers/ide/ide-timing.h index 3b12ffe77071..adeda7626529 100644 --- a/trunk/drivers/ide/ide-timing.h +++ b/trunk/drivers/ide/ide-timing.h @@ -199,7 +199,7 @@ static int ide_timing_compute(ide_drive_t *drive, short speed, struct ide_timing } /* - * Lengthen active & recovery time so that cycle time is correct. + * Lenghten active & recovery time so that cycle time is correct. */ if (t->act8b + t->rec8b < t->cyc8b) { diff --git a/trunk/drivers/input/gameport/gameport.c b/trunk/drivers/input/gameport/gameport.c index c5600ac5feb3..1dc2ac9f3d1c 100644 --- a/trunk/drivers/input/gameport/gameport.c +++ b/trunk/drivers/input/gameport/gameport.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/input/keyboard/bf54x-keys.c b/trunk/drivers/input/keyboard/bf54x-keys.c index 05e3494cf8b8..e5f4da928340 100644 --- a/trunk/drivers/input/keyboard/bf54x-keys.c +++ b/trunk/drivers/input/keyboard/bf54x-keys.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/input/keyboard/jornada720_kbd.c b/trunk/drivers/input/keyboard/jornada720_kbd.c index 986f93cfc6b8..e6696b3c9416 100644 --- a/trunk/drivers/input/keyboard/jornada720_kbd.c +++ b/trunk/drivers/input/keyboard/jornada720_kbd.c @@ -17,6 +17,7 @@ */ #include #include +#include #include #include #include diff --git a/trunk/drivers/input/serio/gscps2.c b/trunk/drivers/input/serio/gscps2.c index adc3bd6e7f7b..3e99df6be084 100644 --- a/trunk/drivers/input/serio/gscps2.c +++ b/trunk/drivers/input/serio/gscps2.c @@ -141,7 +141,7 @@ static void gscps2_flush(struct gscps2port *ps2port) /* * gscps2_writeb_output() - write a byte to the port * - * returns 1 on success, 0 on error + * returns 1 on sucess, 0 on error */ static inline int gscps2_writeb_output(struct gscps2port *ps2port, u8 data) diff --git a/trunk/drivers/isdn/hardware/eicon/debuglib.c b/trunk/drivers/isdn/hardware/eicon/debuglib.c index e39c5c1f623e..a19b7ffe9ace 100644 --- a/trunk/drivers/isdn/hardware/eicon/debuglib.c +++ b/trunk/drivers/isdn/hardware/eicon/debuglib.c @@ -106,7 +106,7 @@ DbgRegister (char *drvName, char *drvTag, unsigned long dbgMask) return (1) ; } /* - * Check if we registered with an old maint driver (see debuglib.h) + * Check if we registered whith an old maint driver (see debuglib.h) */ if ( myDriverDebugHandle.dbg_end != NULL /* location of 'dbg_prt' in _OldDbgHandle_ struct */ diff --git a/trunk/drivers/isdn/hardware/eicon/debuglib.h b/trunk/drivers/isdn/hardware/eicon/debuglib.h index 016410cf2273..11b3b9edd1d6 100644 --- a/trunk/drivers/isdn/hardware/eicon/debuglib.h +++ b/trunk/drivers/isdn/hardware/eicon/debuglib.h @@ -177,7 +177,7 @@ DBG_DECL(PRV3) } } #endif /* - * For event level debug use a separate define, the parameter are + * For event level debug use a separate define, the paramete are * different and cause compiler errors on some systems. */ #define DBG_EVL_ID(args) \ diff --git a/trunk/drivers/isdn/hardware/eicon/di.c b/trunk/drivers/isdn/hardware/eicon/di.c index 10760b3c5eb5..ce8df3878908 100644 --- a/trunk/drivers/isdn/hardware/eicon/di.c +++ b/trunk/drivers/isdn/hardware/eicon/di.c @@ -285,7 +285,7 @@ byte pr_dpc(ADAPTER * a) a->ram_in(a, &RcIn->RcId), a->ram_in(a, &RcIn->RcCh), a->ram_inw(a, &RcIn->Reference), - tmp[0], /* type of extended information */ + tmp[0], /* type of extended informtion */ tmp[1]); /* extended information */ a->ram_out(a, &RcIn->Rc, 0); } diff --git a/trunk/drivers/isdn/hardware/eicon/message.c b/trunk/drivers/isdn/hardware/eicon/message.c index b9177ca4369a..ccd35d047ec8 100644 --- a/trunk/drivers/isdn/hardware/eicon/message.c +++ b/trunk/drivers/isdn/hardware/eicon/message.c @@ -4941,7 +4941,7 @@ void sig_ind(PLCI * plci) /* b = IE1 */ /* S = IE1 length + cont. */ /* b = IE2 */ - /* S = IE2 length + cont. */ + /* S = IE2 lenght + cont. */ sendf(plci->appl, _MANUFACTURER_I, Id, diff --git a/trunk/drivers/isdn/hysdn/hycapi.c b/trunk/drivers/isdn/hysdn/hycapi.c index d3999a8e9f88..f85450146bdc 100644 --- a/trunk/drivers/isdn/hysdn/hycapi.c +++ b/trunk/drivers/isdn/hysdn/hycapi.c @@ -541,7 +541,7 @@ hycapi_rx_capipkt(hysdn_card * card, unsigned char *buf, unsigned short len) } ctrl = &cinfo->capi_ctrl; if(len < CAPI_MSG_BASELEN) { - printk(KERN_ERR "HYSDN Card%d: invalid CAPI-message, length %d!\n", + printk(KERN_ERR "HYSDN Card%d: invalid CAPI-message, lenght %d!\n", card->myid, len); return; } diff --git a/trunk/drivers/macintosh/adb.c b/trunk/drivers/macintosh/adb.c index 28958101061f..7ce0ea64465c 100644 --- a/trunk/drivers/macintosh/adb.c +++ b/trunk/drivers/macintosh/adb.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/macintosh/smu.c b/trunk/drivers/macintosh/smu.c index 8ba49385c3ff..d409f6759482 100644 --- a/trunk/drivers/macintosh/smu.c +++ b/trunk/drivers/macintosh/smu.c @@ -12,7 +12,7 @@ * - maybe add timeout to commands ? * - blocking version of time functions * - polling version of i2c commands (including timer that works with - * interrupts off) + * interrutps off) * - maybe avoid some data copies with i2c by directly using the smu cmd * buffer and a lower level internal interface * - understand SMU -> CPU events and implement reception of them via @@ -179,7 +179,7 @@ static irqreturn_t smu_db_intr(int irq, void *arg) /* CPU might have brought back the cache line, so we need * to flush again before peeking at the SMU response. We * flush the entire buffer for now as we haven't read the - * reply length (it's only 2 cache lines anyway) + * reply lenght (it's only 2 cache lines anyway) */ faddr = (unsigned long)smu->cmd_buf; flush_inval_dcache_range(faddr, faddr + 256); diff --git a/trunk/drivers/media/common/saa7146_core.c b/trunk/drivers/media/common/saa7146_core.c index 168a8d3a5e55..7d04a6fd1acb 100644 --- a/trunk/drivers/media/common/saa7146_core.c +++ b/trunk/drivers/media/common/saa7146_core.c @@ -388,7 +388,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent } dev->revision &= 0xf; - /* remap the memory from virtual to physical address */ + /* remap the memory from virtual to physical adress */ err = pci_request_region(pci, 0, "saa7146"); if (err < 0) diff --git a/trunk/drivers/media/dvb/dvb-core/dvb_net.c b/trunk/drivers/media/dvb/dvb-core/dvb_net.c index ed3f8268ed11..a33eb5988c42 100644 --- a/trunk/drivers/media/dvb/dvb-core/dvb_net.c +++ b/trunk/drivers/media/dvb/dvb-core/dvb_net.c @@ -681,7 +681,7 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) drop = 1; /* else: destination address matches the MAC address of our receiver device */ } - /* else: promiscuous mode; pass everything up the stack */ + /* else: promiscious mode; pass everything up the stack */ if (drop) { #ifdef ULE_DEBUG diff --git a/trunk/drivers/media/video/bt8xx/bttv-cards.c b/trunk/drivers/media/video/bt8xx/bttv-cards.c index 7374c02dd183..63a47cd4c161 100644 --- a/trunk/drivers/media/video/bt8xx/bttv-cards.c +++ b/trunk/drivers/media/video/bt8xx/bttv-cards.c @@ -4344,7 +4344,7 @@ static void rv605_muxsel(struct bttv *btv, unsigned int input) gpio_bits(0x200,0x000); mdelay(1); - /* create a new connection */ + /* create a new conection */ gpio_bits(0x480,0x080); gpio_bits(0x480,0x480); mdelay(1); diff --git a/trunk/drivers/media/video/indycam.c b/trunk/drivers/media/video/indycam.c index 84b9e4f2b3b3..5c2c4029ff86 100644 --- a/trunk/drivers/media/video/indycam.c +++ b/trunk/drivers/media/video/indycam.c @@ -326,7 +326,7 @@ static int indycam_attach(struct i2c_adapter *adap, int addr, int kind) // initialize err = indycam_write_block(client, 0, sizeof(initseq), (u8 *)&initseq); if (err) { - printk(KERN_ERR "IndyCam initialization failed\n"); + printk(KERN_ERR "IndyCam initalization failed\n"); err = -EIO; goto out_detach_client; } diff --git a/trunk/drivers/media/video/mt20xx.c b/trunk/drivers/media/video/mt20xx.c index 58bab653330f..b630c26cfe85 100644 --- a/trunk/drivers/media/video/mt20xx.c +++ b/trunk/drivers/media/video/mt20xx.c @@ -369,7 +369,7 @@ static struct dvb_tuner_ops mt2032_tuner_ops = { .get_frequency = microtune_get_frequency, }; -// Initialization as described in "MT203x Programming Procedures", Rev 1.2, Feb.2001 +// Initalization as described in "MT203x Programming Procedures", Rev 1.2, Feb.2001 static int mt2032_init(struct dvb_frontend *fe) { struct microtune_priv *priv = fe->tuner_priv; diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2.h b/trunk/drivers/media/video/pvrusb2/pvrusb2.h index 1a9a4baf12b8..074533e9c21e 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2.h +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2.h @@ -27,7 +27,7 @@ might want to increase this - however the driver operation will not be impaired if it is too small. Instead additional units just won't have an ID assigned and it might not be possible to specify - module parameters for those extra units. */ + module paramters for those extra units. */ #define PVR_NUM 20 #endif /* __PVRUSB2_H */ diff --git a/trunk/drivers/media/video/pwc/pwc-if.c b/trunk/drivers/media/video/pwc/pwc-if.c index f991d72fe108..7300ace8f44e 100644 --- a/trunk/drivers/media/video/pwc/pwc-if.c +++ b/trunk/drivers/media/video/pwc/pwc-if.c @@ -542,7 +542,7 @@ int pwc_handle_frame(struct pwc_device *pdev) } if (pdev->read_frame != NULL) { - /* Decompression is a lengthy process, so it's outside of the lock. + /* Decompression is a lenghty process, so it's outside of the lock. This gives the isoc_handler the opportunity to fill more frames in the mean time. */ diff --git a/trunk/drivers/media/video/tea6420.c b/trunk/drivers/media/video/tea6420.c index ca05cd655087..e0ff811fab6f 100644 --- a/trunk/drivers/media/video/tea6420.c +++ b/trunk/drivers/media/video/tea6420.c @@ -57,7 +57,7 @@ static int tea6420_switch(struct i2c_client *client, int i, int o, int g) dprintk("adr:0x%02x, i:%d, o:%d, g:%d\n", client->addr, i, o, g); - /* check if the parameters are valid */ + /* check if the paramters are valid */ if (i < 1 || i > 6 || o < 1 || o > 4 || g < 0 || g > 6 || g % 2 != 0) return -1; diff --git a/trunk/drivers/media/video/usbvideo/quickcam_messenger.c b/trunk/drivers/media/video/usbvideo/quickcam_messenger.c index 5e7b79501370..d847273eeba0 100644 --- a/trunk/drivers/media/video/usbvideo/quickcam_messenger.c +++ b/trunk/drivers/media/video/usbvideo/quickcam_messenger.c @@ -258,7 +258,7 @@ static void qcm_hsv2rgb(u16 hue, u16 sat, u16 val, u16 *r, u16 *g, u16 *b) unsigned int p; /* - the registers controlling gain are 8 bit of which + the registers controling gain are 8 bit of which we affect only the last 4 bits with our gain. we know that if saturation is 0, (unsaturated) then we're grayscale (center axis of the colour cone) so diff --git a/trunk/drivers/media/video/usbvision/usbvision-video.c b/trunk/drivers/media/video/usbvision/usbvision-video.c index df52f8a60215..b52b826a30be 100644 --- a/trunk/drivers/media/video/usbvision/usbvision-video.c +++ b/trunk/drivers/media/video/usbvision/usbvision-video.c @@ -131,7 +131,7 @@ static struct usbvision_v4l2_format_st usbvision_v4l2_format[] = { /* Function prototypes */ static void usbvision_release(struct usb_usbvision *usbvision); -/* Default initialization of device driver parameters */ +/* Default initalization of device driver parameters */ /* Set the default format for ISOC endpoint */ static int isocMode = ISOC_MODE_COMPRESS; /* Set the default Debug Mode of the device driver */ diff --git a/trunk/drivers/media/video/vpx3220.c b/trunk/drivers/media/video/vpx3220.c index a9133858e913..8ef31ed7d3f1 100644 --- a/trunk/drivers/media/video/vpx3220.c +++ b/trunk/drivers/media/video/vpx3220.c @@ -566,7 +566,7 @@ vpx3220_init_client (struct i2c_client *client) } /* ----------------------------------------------------------------------- - * Client management code + * Client managment code */ /* diff --git a/trunk/drivers/media/video/zoran_card.c b/trunk/drivers/media/video/zoran_card.c index 690281bb59ee..6e0ac4c5c379 100644 --- a/trunk/drivers/media/video/zoran_card.c +++ b/trunk/drivers/media/video/zoran_card.c @@ -1270,7 +1270,7 @@ zoran_setup_videocodec (struct zoran *zr, } /* - * Scan for a Buz card (actually for the PCI controller ZR36057), + * Scan for a Buz card (actually for the PCI contoler ZR36057), * request the irq and map the io memory */ static int __devinit diff --git a/trunk/drivers/media/video/zr36050.c b/trunk/drivers/media/video/zr36050.c index faae4ec3ea0b..9f622e00c479 100644 --- a/trunk/drivers/media/video/zr36050.c +++ b/trunk/drivers/media/video/zr36050.c @@ -161,7 +161,7 @@ zr36050_wait_end (struct zr36050 *ptr) udelay(1); if (i++ > 200000) { // 200ms, there is for sure something wrong!!! dprintk(1, - "%s: timeout at wait_end (last status: 0x%02x)\n", + "%s: timout at wait_end (last status: 0x%02x)\n", ptr->name, ptr->status1); break; } diff --git a/trunk/drivers/media/video/zr36060.c b/trunk/drivers/media/video/zr36060.c index 7849b65969d0..1ef14fef08e6 100644 --- a/trunk/drivers/media/video/zr36060.c +++ b/trunk/drivers/media/video/zr36060.c @@ -163,7 +163,7 @@ zr36060_wait_end (struct zr36060 *ptr) udelay(1); if (i++ > 200000) { // 200ms, there is for sure something wrong!!! dprintk(1, - "%s: timeout at wait_end (last status: 0x%02x)\n", + "%s: timout at wait_end (last status: 0x%02x)\n", ptr->name, ptr->status); break; } diff --git a/trunk/drivers/message/fusion/lsi/mpi_log_sas.h b/trunk/drivers/message/fusion/lsi/mpi_log_sas.h index af9da03e95e5..6be1f6b65777 100644 --- a/trunk/drivers/message/fusion/lsi/mpi_log_sas.h +++ b/trunk/drivers/message/fusion/lsi/mpi_log_sas.h @@ -162,7 +162,7 @@ #define PL_LOGINFO_SUB_CODE_FRAME_XFER_ERROR (0x00000400) /* Bits 0-3 encode Transport Status Register (offset 0x08) */ /* Bit 0 is Status Bit 0: FrameXferErr */ /* Bit 1 & 2 are Status Bits 16 and 17: FrameXmitErrStatus */ - /* Bit 3 is Status Bit 18 WriteDataLengthGTDataLengthErr */ + /* Bit 3 is Status Bit 18 WriteDataLenghtGTDataLengthErr */ #define PL_LOGINFO_SUB_CODE_TX_FM_CONNECTED_LOW (0x00000500) #define PL_LOGINFO_SUB_CODE_SATA_NON_NCQ_RW_ERR_BIT_SET (0x00000600) diff --git a/trunk/drivers/message/fusion/mptctl.c b/trunk/drivers/message/fusion/mptctl.c index e630b50966ec..6029509702d3 100644 --- a/trunk/drivers/message/fusion/mptctl.c +++ b/trunk/drivers/message/fusion/mptctl.c @@ -1708,7 +1708,7 @@ mptctl_replace_fw (unsigned long arg) * * Outputs: None. * Return: 0 if successful - * -EBUSY if previous command timeout and IOC reset is not complete. + * -EBUSY if previous command timout and IOC reset is not complete. * -EFAULT if data unavailable * -ENODEV if no such device/adapter * -ETIME if timer expires @@ -1748,7 +1748,7 @@ mptctl_mpt_command (unsigned long arg) * * Outputs: None. * Return: 0 if successful - * -EBUSY if previous command timeout and IOC reset is not complete. + * -EBUSY if previous command timout and IOC reset is not complete. * -EFAULT if data unavailable * -ENODEV if no such device/adapter * -ETIME if timer expires @@ -2316,7 +2316,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr) * Outputs: None. * Return: 0 if successful * -EFAULT if data unavailable - * -EBUSY if previous command timeout and IOC reset is not complete. + * -EBUSY if previous command timout and IOC reset is not complete. * -ENODEV if no such device/adapter * -ETIME if timer expires * -ENOMEM if memory allocation error @@ -2553,7 +2553,7 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size) * Outputs: None. * Return: 0 if successful * -EFAULT if data unavailable - * -EBUSY if previous command timeout and IOC reset is not complete. + * -EBUSY if previous command timout and IOC reset is not complete. * -ENODEV if no such device/adapter * -ETIME if timer expires * -ENOMEM if memory allocation error diff --git a/trunk/drivers/message/fusion/mptscsih.c b/trunk/drivers/message/fusion/mptscsih.c index af1de0ccee2f..5c614ec38cc4 100644 --- a/trunk/drivers/message/fusion/mptscsih.c +++ b/trunk/drivers/message/fusion/mptscsih.c @@ -1736,7 +1736,7 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, i fail_out: /* - * Free task management mf, and corresponding tm flags + * Free task managment mf, and corresponding tm flags */ mpt_free_msg_frame(ioc, mf); hd->tmPending = 0; diff --git a/trunk/drivers/message/i2o/iop.c b/trunk/drivers/message/i2o/iop.c index da715e11c1b2..7814a06ae970 100644 --- a/trunk/drivers/message/i2o/iop.c +++ b/trunk/drivers/message/i2o/iop.c @@ -916,7 +916,7 @@ static int i2o_parse_hrt(struct i2o_controller *c) * status block. The status block could then be accessed through * c->status_block. * - * Returns 0 on success or negative error code on failure. + * Returns 0 on sucess or negative error code on failure. */ int i2o_status_get(struct i2o_controller *c) { diff --git a/trunk/drivers/mtd/devices/doc2000.c b/trunk/drivers/mtd/devices/doc2000.c index 90acf57c19bd..c73e96bfafc6 100644 --- a/trunk/drivers/mtd/devices/doc2000.c +++ b/trunk/drivers/mtd/devices/doc2000.c @@ -376,7 +376,7 @@ static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip) * hardware restriction. */ if (doc->mfr) { if (doc->mfr == mfr && doc->id == id) - return 1; /* This is the same as the first */ + return 1; /* This is another the same the first */ else printk(KERN_WARNING "Flash chip at floor %d, chip %d is different:\n", diff --git a/trunk/drivers/mtd/nand/autcpu12.c b/trunk/drivers/mtd/nand/autcpu12.c index dd38011ee0b7..e3744eb8eccb 100644 --- a/trunk/drivers/mtd/nand/autcpu12.c +++ b/trunk/drivers/mtd/nand/autcpu12.c @@ -20,7 +20,7 @@ * * 02-12-2002 TG Cleanup of module params * - * 02-20-2002 TG adjusted for different rd/wr address support + * 02-20-2002 TG adjusted for different rd/wr adress support * added support for read device ready/busy line * added page_cache * @@ -144,7 +144,7 @@ static int __init autcpu12_init(void) goto out; } - /* map physical address */ + /* map physical adress */ autcpu12_fio_base = ioremap(AUTCPU12_PHYS_SMC, SZ_1K); if (!autcpu12_fio_base) { printk("Ioremap autcpu12 SmartMedia Card failed\n"); @@ -227,7 +227,7 @@ static void __exit autcpu12_cleanup(void) /* Release resources, unregister device */ nand_release(autcpu12_mtd); - /* unmap physical address */ + /* unmap physical adress */ iounmap(autcpu12_fio_base); /* Free the MTD device structure */ diff --git a/trunk/drivers/mtd/nand/bf5xx_nand.c b/trunk/drivers/mtd/nand/bf5xx_nand.c index a52f3a737c39..1657ecd74881 100644 --- a/trunk/drivers/mtd/nand/bf5xx_nand.c +++ b/trunk/drivers/mtd/nand/bf5xx_nand.c @@ -4,7 +4,7 @@ * http://blackfin.uclinux.org/ * Bryan Wu * - * Blackfin BF5xx on-chip NAND flash controller driver + * Blackfin BF5xx on-chip NAND flash controler driver * * Derived from drivers/mtd/nand/s3c2410.c * Copyright (c) 2007 Ben Dooks diff --git a/trunk/drivers/mtd/nand/cs553x_nand.c b/trunk/drivers/mtd/nand/cs553x_nand.c index 19e1594421a4..89deff007116 100644 --- a/trunk/drivers/mtd/nand/cs553x_nand.c +++ b/trunk/drivers/mtd/nand/cs553x_nand.c @@ -337,7 +337,7 @@ static void __exit cs553x_cleanup(void) nand_release(cs553x_mtd[i]); cs553x_mtd[i] = NULL; - /* unmap physical address */ + /* unmap physical adress */ iounmap(mmio_base); /* Free the MTD device structure */ diff --git a/trunk/drivers/mtd/nand/edb7312.c b/trunk/drivers/mtd/nand/edb7312.c index ba67bbec20d3..0146cdc48039 100644 --- a/trunk/drivers/mtd/nand/edb7312.c +++ b/trunk/drivers/mtd/nand/edb7312.c @@ -125,7 +125,7 @@ static int __init ep7312_init(void) return -ENOMEM; } - /* map physical address */ + /* map physical adress */ ep7312_fio_base = ioremap(ep7312_fio_pbase, SZ_1K); if (!ep7312_fio_base) { printk("ioremap EDB7312 NAND flash failed\n"); diff --git a/trunk/drivers/mtd/nand/nand_base.c b/trunk/drivers/mtd/nand/nand_base.c index ddd4fc019042..e29c1da7f56e 100644 --- a/trunk/drivers/mtd/nand/nand_base.c +++ b/trunk/drivers/mtd/nand/nand_base.c @@ -89,7 +89,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops); /* - * For devices which display every fart in the system on a separate LED. Is + * For devices which display every fart in the system on a seperate LED. Is * compiled away when LED support is disabled. */ DEFINE_LED_TRIGGER(nand_led_trigger); diff --git a/trunk/drivers/mtd/nand/nandsim.c b/trunk/drivers/mtd/nand/nandsim.c index bb885d1fcab5..10490b48d9f7 100644 --- a/trunk/drivers/mtd/nand/nandsim.c +++ b/trunk/drivers/mtd/nand/nandsim.c @@ -210,7 +210,7 @@ MODULE_PARM_DESC(overridesize, "Specifies the NAND Flash size overriding the I #define STATE_CMD_RESET 0x0000000C /* reset */ #define STATE_CMD_MASK 0x0000000F /* command states mask */ -/* After an address is input, the simulator goes to one of these states */ +/* After an addres is input, the simulator goes to one of these states */ #define STATE_ADDR_PAGE 0x00000010 /* full (row, column) address is accepted */ #define STATE_ADDR_SEC 0x00000020 /* sector address was accepted */ #define STATE_ADDR_ZERO 0x00000030 /* one byte zero address was accepted */ diff --git a/trunk/drivers/mtd/nand/s3c2410.c b/trunk/drivers/mtd/nand/s3c2410.c index 2bd0737572c6..66f76e9618dd 100644 --- a/trunk/drivers/mtd/nand/s3c2410.c +++ b/trunk/drivers/mtd/nand/s3c2410.c @@ -8,7 +8,7 @@ * * Changelog: * 21-Sep-2004 BJD Initial version - * 23-Sep-2004 BJD Multiple device support + * 23-Sep-2004 BJD Mulitple device support * 28-Sep-2004 BJD Fixed ECC placement for Hardware mode * 12-Oct-2004 BJD Fixed errors in use of platform data * 18-Feb-2005 BJD Fix sparse errors diff --git a/trunk/drivers/mtd/nand/sharpsl.c b/trunk/drivers/mtd/nand/sharpsl.c index 033f8800b1e6..51c7288ab49a 100644 --- a/trunk/drivers/mtd/nand/sharpsl.c +++ b/trunk/drivers/mtd/nand/sharpsl.c @@ -165,7 +165,7 @@ static int __init sharpsl_nand_init(void) return -ENOMEM; } - /* map physical address */ + /* map physical adress */ sharpsl_io_base = ioremap(sharpsl_phys_base, 0x1000); if (!sharpsl_io_base) { printk("ioremap to access Sharp SL NAND chip failed\n"); diff --git a/trunk/drivers/mtd/nftlmount.c b/trunk/drivers/mtd/nftlmount.c index 0513cbc8834d..067262ee8df0 100644 --- a/trunk/drivers/mtd/nftlmount.c +++ b/trunk/drivers/mtd/nftlmount.c @@ -429,7 +429,7 @@ static void check_sectors_in_chain(struct NFTLrecord *nftl, unsigned int first_b } } -/* calc_chain_length: Walk through a Virtual Unit Chain and estimate chain length */ +/* calc_chain_lenght: Walk through a Virtual Unit Chain and estimate chain length */ static int calc_chain_length(struct NFTLrecord *nftl, unsigned int first_block) { unsigned int length = 0, block = first_block; diff --git a/trunk/drivers/net/Kconfig b/trunk/drivers/net/Kconfig index 55d224c8a0b9..389980f0e59e 100644 --- a/trunk/drivers/net/Kconfig +++ b/trunk/drivers/net/Kconfig @@ -814,8 +814,8 @@ config ULTRA32 will be called smc-ultra32. config BFIN_MAC - tristate "Blackfin 527/536/537 on-chip mac support" - depends on NET_ETHERNET && (BF527 || BF537 || BF536) && (!BF537_PORT_H) + tristate "Blackfin 536/537 on-chip mac support" + depends on NET_ETHERNET && (BF537 || BF536) && (!BF537_PORT_H) select CRC32 select MII select PHYLIB @@ -828,7 +828,7 @@ config BFIN_MAC config BFIN_MAC_USE_L1 bool "Use L1 memory for rx/tx packets" - depends on BFIN_MAC && (BF527 || BF537) + depends on BFIN_MAC && BF537 default y help To get maximum network performance, you should use L1 memory as rx/tx buffers. @@ -855,8 +855,7 @@ config BFIN_RX_DESC_NUM config BFIN_MAC_RMII bool "RMII PHY Interface (EXPERIMENTAL)" depends on BFIN_MAC && EXPERIMENTAL - default y if BFIN527_EZKIT - default n if BFIN537_STAMP + default n help Use Reduced PHY MII Interface @@ -1200,7 +1199,7 @@ config NE2_MCA config IBMLANA tristate "IBM LAN Adapter/A support" - depends on MCA + depends on MCA && MCA_LEGACY ---help--- This is a Micro Channel Ethernet adapter. You need to set CONFIG_MCA to use this driver. It is both available as an in-kernel diff --git a/trunk/drivers/net/arm/at91_ether.c b/trunk/drivers/net/arm/at91_ether.c index 0ae0d83e5d22..25b114a4e2b1 100644 --- a/trunk/drivers/net/arm/at91_ether.c +++ b/trunk/drivers/net/arm/at91_ether.c @@ -384,7 +384,7 @@ static void reset_phy(struct net_device *dev) /* Wait until PHY reset is complete */ do { read_phy(lp->phy_address, MII_BMCR, &bmcr); - } while (!(bmcr & BMCR_RESET)); + } while (!(bmcr && BMCR_RESET)); disable_mdi(); spin_unlock_irq(&lp->lock); diff --git a/trunk/drivers/net/ax88796.c b/trunk/drivers/net/ax88796.c index 194949afacd0..7495a9ee8f4b 100644 --- a/trunk/drivers/net/ax88796.c +++ b/trunk/drivers/net/ax88796.c @@ -137,12 +137,11 @@ static int ax_initial_check(struct net_device *dev) static void ax_reset_8390(struct net_device *dev) { struct ei_device *ei_local = netdev_priv(dev); - struct ax_device *ax = to_ax_dev(dev); unsigned long reset_start_time = jiffies; void __iomem *addr = (void __iomem *)dev->base_addr; if (ei_debug > 1) - dev_dbg(&ax->dev->dev, "resetting the 8390 t=%ld\n", jiffies); + printk(KERN_DEBUG "resetting the 8390 t=%ld...", jiffies); ei_outb(ei_inb(addr + NE_RESET), addr + NE_RESET); @@ -152,7 +151,7 @@ static void ax_reset_8390(struct net_device *dev) /* This check _should_not_ be necessary, omit eventually. */ while ((ei_inb(addr + EN0_ISR) & ENISR_RESET) == 0) { if (jiffies - reset_start_time > 2*HZ/100) { - dev_warn(&ax->dev->dev, "%s: %s did not complete.\n", + printk(KERN_WARNING "%s: %s did not complete.\n", __FUNCTION__, dev->name); break; } @@ -166,15 +165,13 @@ static void ax_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page) { struct ei_device *ei_local = netdev_priv(dev); - struct ax_device *ax = to_ax_dev(dev); void __iomem *nic_base = ei_local->mem; /* This *shouldn't* happen. If it does, it's the last thing you'll see */ if (ei_status.dmaing) { - dev_err(&ax->dev->dev, "%s: DMAing conflict in %s " - "[DMAstat:%d][irqlock:%d].\n", + printk(KERN_EMERG "%s: DMAing conflict in %s [DMAstat:%d][irqlock:%d].\n", dev->name, __FUNCTION__, - ei_status.dmaing, ei_status.irqlock); + ei_status.dmaing, ei_status.irqlock); return; } @@ -207,16 +204,13 @@ static void ax_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset) { struct ei_device *ei_local = netdev_priv(dev); - struct ax_device *ax = to_ax_dev(dev); void __iomem *nic_base = ei_local->mem; char *buf = skb->data; if (ei_status.dmaing) { - dev_err(&ax->dev->dev, - "%s: DMAing conflict in %s " + printk(KERN_EMERG "%s: DMAing conflict in ax_block_input " "[DMAstat:%d][irqlock:%d].\n", - dev->name, __FUNCTION__, - ei_status.dmaing, ei_status.irqlock); + dev->name, ei_status.dmaing, ei_status.irqlock); return; } @@ -245,7 +239,6 @@ static void ax_block_output(struct net_device *dev, int count, const unsigned char *buf, const int start_page) { struct ei_device *ei_local = netdev_priv(dev); - struct ax_device *ax = to_ax_dev(dev); void __iomem *nic_base = ei_local->mem; unsigned long dma_start; @@ -258,7 +251,7 @@ static void ax_block_output(struct net_device *dev, int count, /* This *shouldn't* happen. If it does, it's the last thing you'll see */ if (ei_status.dmaing) { - dev_err(&ax->dev->dev, "%s: DMAing conflict in %s." + printk(KERN_EMERG "%s: DMAing conflict in %s." "[DMAstat:%d][irqlock:%d]\n", dev->name, __FUNCTION__, ei_status.dmaing, ei_status.irqlock); @@ -288,8 +281,7 @@ static void ax_block_output(struct net_device *dev, int count, while ((ei_inb(nic_base + EN0_ISR) & ENISR_RDC) == 0) { if (jiffies - dma_start > 2*HZ/100) { /* 20ms */ - dev_warn(&ax->dev->dev, - "%s: timeout waiting for Tx RDC.\n", dev->name); + printk(KERN_WARNING "%s: timeout waiting for Tx RDC.\n", dev->name); ax_reset_8390(dev); ax_NS8390_init(dev,1); break; @@ -432,11 +424,10 @@ static void ax_phy_write(struct net_device *dev, int phy_addr, int reg, int value) { struct ei_device *ei = (struct ei_device *) netdev_priv(dev); - struct ax_device *ax = to_ax_dev(dev); unsigned long flags; - dev_dbg(&ax->dev->dev, "%s: %p, %04x, %04x %04x\n", - __FUNCTION__, dev, phy_addr, reg, value); + printk(KERN_DEBUG "%s: %p, %04x, %04x %04x\n", + __FUNCTION__, dev, phy_addr, reg, value); spin_lock_irqsave(&ei->page_lock, flags); @@ -759,11 +750,14 @@ static int ax_init_dev(struct net_device *dev, int first_init) ax_NS8390_init(dev, 0); if (first_init) { - DECLARE_MAC_BUF(mac); + printk("AX88796: %dbit, irq %d, %lx, MAC: ", + ei_status.word16 ? 16:8, dev->irq, dev->base_addr); + + for (i = 0; i < ETHER_ADDR_LEN; i++) + printk("%2.2x%c", dev->dev_addr[i], + (i < (ETHER_ADDR_LEN-1) ? ':' : ' ')); - dev_info(&ax->dev->dev, "%dbit, irq %d, %lx, MAC: %s\n", - ei_status.word16 ? 16:8, dev->irq, dev->base_addr, - print_mac(mac, dev->dev_addr)); + printk("\n"); } ret = register_netdev(dev); diff --git a/trunk/drivers/net/bfin_mac.c b/trunk/drivers/net/bfin_mac.c index c993a32b3f50..eb971755a3ff 100644 --- a/trunk/drivers/net/bfin_mac.c +++ b/trunk/drivers/net/bfin_mac.c @@ -1,11 +1,34 @@ /* - * Blackfin On-Chip MAC Driver + * File: drivers/net/bfin_mac.c + * Based on: + * Maintainer: + * Bryan Wu * - * Copyright 2004-2007 Analog Devices Inc. + * Original author: + * Luke Yang * - * Enter bugs at http://blackfin.uclinux.org/ + * Created: + * Description: * - * Licensed under the GPL-2 or later. + * Modified: + * Copyright 2004-2006 Analog Devices Inc. + * + * Bugs: Enter bugs at http://blackfin.uclinux.org/ + * + * This program is free software ; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation ; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY ; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program ; see the file COPYING. + * If not, write to the Free Software Foundation, + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include @@ -42,7 +65,7 @@ #define DRV_NAME "bfin_mac" #define DRV_VERSION "1.1" #define DRV_AUTHOR "Bryan Wu, Luke Yang" -#define DRV_DESC "Blackfin BF53[67] BF527 on-chip Ethernet MAC driver" +#define DRV_DESC "Blackfin BF53[67] on-chip Ethernet MAC driver" MODULE_AUTHOR(DRV_AUTHOR); MODULE_LICENSE("GPL"); @@ -273,7 +296,7 @@ static void mdio_poll(void) /* poll the STABUSY bit */ while ((bfin_read_EMAC_STAADD()) & STABUSY) { - udelay(1); + mdelay(10); if (timeout_cnt-- < 0) { printk(KERN_ERR DRV_NAME ": wait MDC/MDIO transaction to complete timeout\n"); @@ -389,26 +412,20 @@ static void bf537_adjust_link(struct net_device *dev) spin_unlock_irqrestore(&lp->lock, flags); } -/* MDC = 2.5 MHz */ -#define MDC_CLK 2500000 - static int mii_probe(struct net_device *dev) { struct bf537mac_local *lp = netdev_priv(dev); struct phy_device *phydev = NULL; unsigned short sysctl; int i; - u32 sclk, mdc_div; /* Enable PHY output early */ if (!(bfin_read_VR_CTL() & PHYCLKOE)) bfin_write_VR_CTL(bfin_read_VR_CTL() | PHYCLKOE); - sclk = get_sclk(); - mdc_div = ((sclk / MDC_CLK) / 2) - 1; - + /* MDC = 2.5 MHz */ sysctl = bfin_read_EMAC_SYSCTL(); - sysctl = (sysctl & ~MDCDIV) | SET_MDCDIV(mdc_div); + sysctl |= SET_MDCDIV(24); bfin_write_EMAC_SYSCTL(sysctl); /* search for connect PHY device */ @@ -460,10 +477,8 @@ static int mii_probe(struct net_device *dev) lp->phydev = phydev; printk(KERN_INFO "%s: attached PHY driver [%s] " - "(mii_bus:phy_addr=%s, irq=%d, mdc_clk=%dHz(mdc_div=%d)" - "@sclk=%dMHz)\n", - DRV_NAME, phydev->drv->name, phydev->dev.bus_id, phydev->irq, - MDC_CLK, mdc_div, sclk/1000000); + "(mii_bus:phy_addr=%s, irq=%d)\n", + DRV_NAME, phydev->drv->name, phydev->dev.bus_id, phydev->irq); return 0; } @@ -536,7 +551,7 @@ static void adjust_tx_list(void) */ if (current_tx_ptr->next->next == tx_list_head) { while (tx_list_head->status.status_word == 0) { - mdelay(1); + mdelay(10); if (tx_list_head->status.status_word != 0 || !(bfin_read_DMA2_IRQ_STATUS() & 0x08)) { goto adjust_head; @@ -651,12 +666,6 @@ static void bf537mac_rx(struct net_device *dev) current_rx_ptr->skb = new_skb; current_rx_ptr->desc_a.start_addr = (unsigned long)new_skb->data - 2; - /* Invidate the data cache of skb->data range when it is write back - * cache. It will prevent overwritting the new data from DMA - */ - blackfin_dcache_invalidate_range((unsigned long)new_skb->head, - (unsigned long)new_skb->end); - len = (unsigned short)((current_rx_ptr->status.status_word) & RX_FRLEN); skb_put(skb, len); blackfin_dcache_invalidate_range((unsigned long)skb->head, @@ -758,7 +767,7 @@ static void bf537mac_enable(void) #if defined(CONFIG_BFIN_MAC_RMII) opmode |= RMII; /* For Now only 100MBit are supported */ -#if (defined(CONFIG_BF537) || defined(CONFIG_BF536)) && CONFIG_BF_REV_0_2 +#ifdef CONFIG_BF_REV_0_2 opmode |= TE; #endif #endif @@ -783,39 +792,6 @@ static void bf537mac_timeout(struct net_device *dev) netif_wake_queue(dev); } -static void bf537mac_multicast_hash(struct net_device *dev) -{ - u32 emac_hashhi, emac_hashlo; - struct dev_mc_list *dmi = dev->mc_list; - char *addrs; - int i; - u32 crc; - - emac_hashhi = emac_hashlo = 0; - - for (i = 0; i < dev->mc_count; i++) { - addrs = dmi->dmi_addr; - dmi = dmi->next; - - /* skip non-multicast addresses */ - if (!(*addrs & 1)) - continue; - - crc = ether_crc(ETH_ALEN, addrs); - crc >>= 26; - - if (crc & 0x20) - emac_hashhi |= 1 << (crc & 0x1f); - else - emac_hashlo |= 1 << (crc & 0x1f); - } - - bfin_write_EMAC_HASHHI(emac_hashhi); - bfin_write_EMAC_HASHLO(emac_hashlo); - - return; -} - /* * This routine will, depending on the values passed to it, * either make it accept multicast packets, go into @@ -831,17 +807,11 @@ static void bf537mac_set_multicast_list(struct net_device *dev) sysctl = bfin_read_EMAC_OPMODE(); sysctl |= RAF; bfin_write_EMAC_OPMODE(sysctl); - } else if (dev->flags & IFF_ALLMULTI) { + } else if (dev->flags & IFF_ALLMULTI || dev->mc_count) { /* accept all multicast */ sysctl = bfin_read_EMAC_OPMODE(); sysctl |= PAM; bfin_write_EMAC_OPMODE(sysctl); - } else if (dev->mc_count) { - /* set up multicast hash table */ - sysctl = bfin_read_EMAC_OPMODE(); - sysctl |= HM; - bfin_write_EMAC_OPMODE(sysctl); - bf537mac_multicast_hash(dev); } else { /* clear promisc or multicast mode */ sysctl = bfin_read_EMAC_OPMODE(); @@ -890,10 +860,10 @@ static int bf537mac_open(struct net_device *dev) return retval; phy_start(lp->phydev); - phy_write(lp->phydev, MII_BMCR, BMCR_RESET); setup_system_regs(dev); bf537mac_disable(); bf537mac_enable(); + pr_debug("hardware init finished\n"); netif_start_queue(dev); netif_carrier_on(dev); @@ -916,7 +886,6 @@ static int bf537mac_close(struct net_device *dev) netif_carrier_off(dev); phy_stop(lp->phydev); - phy_write(lp->phydev, MII_BMCR, BMCR_PDOWN); /* clear everything */ bf537mac_shutdown(dev); @@ -1001,7 +970,7 @@ static int __init bf537mac_probe(struct net_device *dev) /* register irq handler */ if (request_irq (IRQ_MAC_RX, bf537mac_interrupt, IRQF_DISABLED | IRQF_SHARED, - "EMAC_RX", dev)) { + "BFIN537_MAC_RX", dev)) { printk(KERN_WARNING DRV_NAME ": Unable to attach BlackFin MAC RX interrupt\n"); return -EBUSY; diff --git a/trunk/drivers/net/bfin_mac.h b/trunk/drivers/net/bfin_mac.h index f774d5a36942..5970ea7142cd 100644 --- a/trunk/drivers/net/bfin_mac.h +++ b/trunk/drivers/net/bfin_mac.h @@ -1,11 +1,34 @@ /* - * Blackfin On-Chip MAC Driver + * File: drivers/net/bfin_mac.c + * Based on: + * Maintainer: + * Bryan Wu * - * Copyright 2004-2007 Analog Devices Inc. + * Original author: + * Luke Yang * - * Enter bugs at http://blackfin.uclinux.org/ + * Created: + * Description: * - * Licensed under the GPL-2 or later. + * Modified: + * Copyright 2004-2006 Analog Devices Inc. + * + * Bugs: Enter bugs at http://blackfin.uclinux.org/ + * + * This program is free software ; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation ; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY ; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program ; see the file COPYING. + * If not, write to the Free Software Foundation, + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define BFIN_MAC_CSUM_OFFLOAD diff --git a/trunk/drivers/net/bonding/bond_main.c b/trunk/drivers/net/bonding/bond_main.c index 0942d82f7cbf..2039f7838f2d 100644 --- a/trunk/drivers/net/bonding/bond_main.c +++ b/trunk/drivers/net/bonding/bond_main.c @@ -1464,12 +1464,10 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) dev_set_allmulti(slave_dev, 1); } - netif_tx_lock_bh(bond_dev); /* upload master's mc_list to new slave */ for (dmi = bond_dev->mc_list; dmi; dmi = dmi->next) { dev_mc_add (slave_dev, dmi->dmi_addr, dmi->dmi_addrlen, 0); } - netif_tx_unlock_bh(bond_dev); } if (bond->params.mode == BOND_MODE_8023AD) { @@ -1823,9 +1821,7 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) } /* flush master's mc_list from slave */ - netif_tx_lock_bh(bond_dev); bond_mc_list_flush(bond_dev, slave_dev); - netif_tx_unlock_bh(bond_dev); } netdev_set_master(slave_dev, NULL); @@ -1946,9 +1942,7 @@ static int bond_release_all(struct net_device *bond_dev) } /* flush master's mc_list from slave */ - netif_tx_lock_bh(bond_dev); bond_mc_list_flush(bond_dev, slave_dev); - netif_tx_unlock_bh(bond_dev); } netdev_set_master(slave_dev, NULL); @@ -2801,11 +2795,14 @@ void bond_loadbalance_arp_mon(struct work_struct *work) } if (do_failover) { + rtnl_lock(); write_lock_bh(&bond->curr_slave_lock); bond_select_active_slave(bond); write_unlock_bh(&bond->curr_slave_lock); + rtnl_unlock(); + } re_arm: @@ -2862,6 +2859,8 @@ void bond_activebackup_arp_mon(struct work_struct *work) slave->link = BOND_LINK_UP; + rtnl_lock(); + write_lock_bh(&bond->curr_slave_lock); if ((!bond->curr_active_slave) && @@ -2897,6 +2896,7 @@ void bond_activebackup_arp_mon(struct work_struct *work) } write_unlock_bh(&bond->curr_slave_lock); + rtnl_unlock(); } } else { read_lock(&bond->curr_slave_lock); @@ -2966,6 +2966,7 @@ void bond_activebackup_arp_mon(struct work_struct *work) bond->dev->name, slave->dev->name); + rtnl_lock(); write_lock_bh(&bond->curr_slave_lock); bond_select_active_slave(bond); @@ -2973,6 +2974,8 @@ void bond_activebackup_arp_mon(struct work_struct *work) write_unlock_bh(&bond->curr_slave_lock); + rtnl_unlock(); + bond->current_arp_slave = slave; if (slave) { @@ -2990,10 +2993,13 @@ void bond_activebackup_arp_mon(struct work_struct *work) bond->primary_slave->dev->name); /* primary is up so switch to it */ + rtnl_lock(); write_lock_bh(&bond->curr_slave_lock); bond_change_active_slave(bond, bond->primary_slave); write_unlock_bh(&bond->curr_slave_lock); + rtnl_unlock(); + slave = bond->primary_slave; slave->jiffies = jiffies; } else { @@ -3763,45 +3769,42 @@ static struct net_device_stats *bond_get_stats(struct net_device *bond_dev) { struct bonding *bond = bond_dev->priv; struct net_device_stats *stats = &(bond->stats), *sstats; - struct net_device_stats local_stats; struct slave *slave; int i; - memset(&local_stats, 0, sizeof(struct net_device_stats)); + memset(stats, 0, sizeof(struct net_device_stats)); read_lock_bh(&bond->lock); bond_for_each_slave(bond, slave, i) { sstats = slave->dev->get_stats(slave->dev); - local_stats.rx_packets += sstats->rx_packets; - local_stats.rx_bytes += sstats->rx_bytes; - local_stats.rx_errors += sstats->rx_errors; - local_stats.rx_dropped += sstats->rx_dropped; + stats->rx_packets += sstats->rx_packets; + stats->rx_bytes += sstats->rx_bytes; + stats->rx_errors += sstats->rx_errors; + stats->rx_dropped += sstats->rx_dropped; - local_stats.tx_packets += sstats->tx_packets; - local_stats.tx_bytes += sstats->tx_bytes; - local_stats.tx_errors += sstats->tx_errors; - local_stats.tx_dropped += sstats->tx_dropped; + stats->tx_packets += sstats->tx_packets; + stats->tx_bytes += sstats->tx_bytes; + stats->tx_errors += sstats->tx_errors; + stats->tx_dropped += sstats->tx_dropped; - local_stats.multicast += sstats->multicast; - local_stats.collisions += sstats->collisions; + stats->multicast += sstats->multicast; + stats->collisions += sstats->collisions; - local_stats.rx_length_errors += sstats->rx_length_errors; - local_stats.rx_over_errors += sstats->rx_over_errors; - local_stats.rx_crc_errors += sstats->rx_crc_errors; - local_stats.rx_frame_errors += sstats->rx_frame_errors; - local_stats.rx_fifo_errors += sstats->rx_fifo_errors; - local_stats.rx_missed_errors += sstats->rx_missed_errors; + stats->rx_length_errors += sstats->rx_length_errors; + stats->rx_over_errors += sstats->rx_over_errors; + stats->rx_crc_errors += sstats->rx_crc_errors; + stats->rx_frame_errors += sstats->rx_frame_errors; + stats->rx_fifo_errors += sstats->rx_fifo_errors; + stats->rx_missed_errors += sstats->rx_missed_errors; - local_stats.tx_aborted_errors += sstats->tx_aborted_errors; - local_stats.tx_carrier_errors += sstats->tx_carrier_errors; - local_stats.tx_fifo_errors += sstats->tx_fifo_errors; - local_stats.tx_heartbeat_errors += sstats->tx_heartbeat_errors; - local_stats.tx_window_errors += sstats->tx_window_errors; + stats->tx_aborted_errors += sstats->tx_aborted_errors; + stats->tx_carrier_errors += sstats->tx_carrier_errors; + stats->tx_fifo_errors += sstats->tx_fifo_errors; + stats->tx_heartbeat_errors += sstats->tx_heartbeat_errors; + stats->tx_window_errors += sstats->tx_window_errors; } - memcpy(stats, &local_stats, sizeof(struct net_device_stats)); - read_unlock_bh(&bond->lock); return stats; @@ -3934,6 +3937,8 @@ static void bond_set_multicast_list(struct net_device *bond_dev) struct bonding *bond = bond_dev->priv; struct dev_mc_list *dmi; + write_lock_bh(&bond->lock); + /* * Do promisc before checking multicast_mode */ @@ -3954,8 +3959,6 @@ static void bond_set_multicast_list(struct net_device *bond_dev) bond_set_allmulti(bond, -1); } - read_lock(&bond->lock); - bond->flags = bond_dev->flags; /* looking for addresses to add to slaves' mc list */ @@ -3976,7 +3979,7 @@ static void bond_set_multicast_list(struct net_device *bond_dev) bond_mc_list_destroy(bond); bond_mc_list_copy(bond_dev->mc_list, bond, GFP_ATOMIC); - read_unlock(&bond->lock); + write_unlock_bh(&bond->lock); } /* @@ -4523,9 +4526,7 @@ static void bond_free_all(void) struct net_device *bond_dev = bond->dev; bond_work_cancel_all(bond); - netif_tx_lock_bh(bond_dev); bond_mc_list_destroy(bond); - netif_tx_unlock_bh(bond_dev); /* Release the bonded slaves */ bond_release_all(bond_dev); bond_deinit(bond_dev); @@ -4548,19 +4549,14 @@ static void bond_free_all(void) int bond_parse_parm(const char *buf, struct bond_parm_tbl *tbl) { int mode = -1, i, rv; - char *p, modestr[BOND_MAX_MODENAME_LEN + 1] = { 0, }; + char modestr[BOND_MAX_MODENAME_LEN + 1] = { 0, }; - for (p = (char *)buf; *p; p++) - if (!(isdigit(*p) || isspace(*p))) - break; - - if (*p) + rv = sscanf(buf, "%d", &mode); + if (!rv) { rv = sscanf(buf, "%20s", modestr); - else - rv = sscanf(buf, "%d", &mode); - - if (!rv) - return -1; + if (!rv) + return -1; + } for (i = 0; tbl[i].modename; i++) { if (mode == tbl[i].mode) @@ -4887,16 +4883,14 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond down_write(&bonding_rwsem); /* Check to see if the bond already exists. */ - if (name) { - list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list) - if (strnicmp(bond->dev->name, name, IFNAMSIZ) == 0) { - printk(KERN_ERR DRV_NAME + list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list) + if (strnicmp(bond->dev->name, name, IFNAMSIZ) == 0) { + printk(KERN_ERR DRV_NAME ": cannot add bond %s; it already exists\n", - name); - res = -EPERM; - goto out_rtnl; - } - } + name); + res = -EPERM; + goto out_rtnl; + } bond_dev = alloc_netdev(sizeof(struct bonding), name ? name : "", ether_setup); diff --git a/trunk/drivers/net/bonding/bonding.h b/trunk/drivers/net/bonding/bonding.h index 67ccad69d445..6d83be49899a 100644 --- a/trunk/drivers/net/bonding/bonding.h +++ b/trunk/drivers/net/bonding/bonding.h @@ -22,8 +22,8 @@ #include "bond_3ad.h" #include "bond_alb.h" -#define DRV_VERSION "3.2.4" -#define DRV_RELDATE "January 28, 2008" +#define DRV_VERSION "3.2.3" +#define DRV_RELDATE "December 6, 2007" #define DRV_NAME "bonding" #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" diff --git a/trunk/drivers/net/cxgb3/mc5.c b/trunk/drivers/net/cxgb3/mc5.c index 4c4d6e877ea6..84c1ffa8e2d3 100644 --- a/trunk/drivers/net/cxgb3/mc5.c +++ b/trunk/drivers/net/cxgb3/mc5.c @@ -452,7 +452,7 @@ void t3_mc5_intr_handler(struct mc5 *mc5) t3_write_reg(adap, A_MC5_DB_INT_CAUSE, cause); } -void t3_mc5_prep(struct adapter *adapter, struct mc5 *mc5, int mode) +void __devinit t3_mc5_prep(struct adapter *adapter, struct mc5 *mc5, int mode) { #define K * 1024 diff --git a/trunk/drivers/net/cxgb3/sge.c b/trunk/drivers/net/cxgb3/sge.c index 9ca8c66abd16..cb684d30831f 100644 --- a/trunk/drivers/net/cxgb3/sge.c +++ b/trunk/drivers/net/cxgb3/sge.c @@ -2836,7 +2836,7 @@ void t3_sge_init(struct adapter *adap, struct sge_params *p) * defaults for the assorted SGE parameters, which admins can change until * they are used to initialize the SGE. */ -void t3_sge_prep(struct adapter *adap, struct sge_params *p) +void __devinit t3_sge_prep(struct adapter *adap, struct sge_params *p) { int i; diff --git a/trunk/drivers/net/cxgb3/t3_hw.c b/trunk/drivers/net/cxgb3/t3_hw.c index a99496a431c4..7469935877bd 100644 --- a/trunk/drivers/net/cxgb3/t3_hw.c +++ b/trunk/drivers/net/cxgb3/t3_hw.c @@ -2675,7 +2675,7 @@ void t3_tp_set_max_rxsize(struct adapter *adap, unsigned int size) V_PMMAXXFERLEN0(size) | V_PMMAXXFERLEN1(size)); } -static void init_mtus(unsigned short mtus[]) +static void __devinit init_mtus(unsigned short mtus[]) { /* * See draft-mathis-plpmtud-00.txt for the values. The min is 88 so @@ -2703,7 +2703,7 @@ static void init_mtus(unsigned short mtus[]) /* * Initial congestion control parameters. */ -static void init_cong_ctrl(unsigned short *a, unsigned short *b) +static void __devinit init_cong_ctrl(unsigned short *a, unsigned short *b) { a[0] = a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = a[8] = 1; a[9] = 2; @@ -3354,7 +3354,8 @@ int t3_init_hw(struct adapter *adapter, u32 fw_params) * Determines a card's PCI mode and associated parameters, such as speed * and width. */ -static void get_pci_mode(struct adapter *adapter, struct pci_params *p) +static void __devinit get_pci_mode(struct adapter *adapter, + struct pci_params *p) { static unsigned short speed_map[] = { 33, 66, 100, 133 }; u32 pci_mode, pcie_cap; @@ -3394,7 +3395,8 @@ static void get_pci_mode(struct adapter *adapter, struct pci_params *p) * capabilities and default speed/duplex/flow-control/autonegotiation * settings. */ -static void init_link_config(struct link_config *lc, unsigned int caps) +static void __devinit init_link_config(struct link_config *lc, + unsigned int caps) { lc->supported = caps; lc->requested_speed = lc->speed = SPEED_INVALID; @@ -3417,7 +3419,7 @@ static void init_link_config(struct link_config *lc, unsigned int caps) * Calculates the size of an MC7 memory in bytes from the value of its * configuration register. */ -static unsigned int mc7_calc_size(u32 cfg) +static unsigned int __devinit mc7_calc_size(u32 cfg) { unsigned int width = G_WIDTH(cfg); unsigned int banks = !!(cfg & F_BKS) + 1; @@ -3428,8 +3430,8 @@ static unsigned int mc7_calc_size(u32 cfg) return MBs << 20; } -static void mc7_prep(struct adapter *adapter, struct mc7 *mc7, - unsigned int base_addr, const char *name) +static void __devinit mc7_prep(struct adapter *adapter, struct mc7 *mc7, + unsigned int base_addr, const char *name) { u32 cfg; @@ -3515,7 +3517,7 @@ static int t3_reset_adapter(struct adapter *adapter) return 0; } -static int init_parity(struct adapter *adap) +static int __devinit init_parity(struct adapter *adap) { int i, err, addr; @@ -3550,8 +3552,8 @@ static int init_parity(struct adapter *adap) * for some adapter tunables, take PHYs out of reset, and initialize the MDIO * interface. */ -int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai, - int reset) +int __devinit t3_prep_adapter(struct adapter *adapter, + const struct adapter_info *ai, int reset) { int ret; unsigned int i, j = 0; diff --git a/trunk/drivers/net/e100.c b/trunk/drivers/net/e100.c index 36ba6dc96acc..51cf577035be 100644 --- a/trunk/drivers/net/e100.c +++ b/trunk/drivers/net/e100.c @@ -94,7 +94,7 @@ * enabled. 82557 pads with 7Eh, while the later controllers pad * with 00h. * - * IV. Receive + * IV. Recieve * * The Receive Frame Area (RFA) comprises a ring of Receive Frame * Descriptors (RFD) + data buffer, thus forming the simplified mode @@ -120,7 +120,7 @@ * and Rx indication and re-allocation happen in the same context, * therefore no locking is required. A software-generated interrupt * is generated from the watchdog to recover from a failed allocation - * scenario where all Rx resources have been indicated and none re- + * senario where all Rx resources have been indicated and none re- * placed. * * V. Miscellaneous @@ -954,7 +954,7 @@ static void e100_get_defaults(struct nic *nic) /* Quadwords to DMA into FIFO before starting frame transmit */ nic->tx_threshold = 0xE0; - /* no interrupt for every tx completion, delay = 256us if not 557 */ + /* no interrupt for every tx completion, delay = 256us if not 557*/ nic->tx_command = cpu_to_le16(cb_tx | cb_tx_sf | ((nic->mac >= mac_82558_D101_A4) ? cb_cid : cb_i)); @@ -1497,7 +1497,7 @@ static void e100_update_stats(struct nic *nic) &s->complete; /* Device's stats reporting may take several microseconds to - * complete, so we're always waiting for results of the + * complete, so where always waiting for results of the * previous command. */ if(*complete == cpu_to_le32(cuc_dump_reset_complete)) { @@ -1958,7 +1958,7 @@ static void e100_rx_clean(struct nic *nic, unsigned int *work_done, if(restart_required) { // ack the rnr? - iowrite8(stat_ack_rnr, &nic->csr->scb.stat_ack); + writeb(stat_ack_rnr, &nic->csr->scb.stat_ack); e100_start_receiver(nic, nic->rx_to_clean); if(work_done) (*work_done)++; @@ -2774,7 +2774,7 @@ static void __devexit e100_remove(struct pci_dev *pdev) struct nic *nic = netdev_priv(netdev); unregister_netdev(netdev); e100_free(nic); - pci_iounmap(pdev, nic->csr); + iounmap(nic->csr); free_netdev(netdev); pci_release_regions(pdev); pci_disable_device(pdev); @@ -2858,17 +2858,17 @@ static void e100_shutdown(struct pci_dev *pdev) /** * e100_io_error_detected - called when PCI error is detected. * @pdev: Pointer to PCI device - * @state: The current pci connection state + * @state: The current pci conneection state */ static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state) { struct net_device *netdev = pci_get_drvdata(pdev); struct nic *nic = netdev_priv(netdev); - /* Similar to calling e100_down(), but avoids adapter I/O. */ + /* Similar to calling e100_down(), but avoids adpater I/O. */ netdev->stop(netdev); - /* Detach; put netif into a state similar to hotplug unplug. */ + /* Detach; put netif into state similar to hotplug unplug. */ napi_enable(&nic->napi); netif_device_detach(netdev); pci_disable_device(pdev); diff --git a/trunk/drivers/net/e1000/e1000_main.c b/trunk/drivers/net/e1000/e1000_main.c index 7c5b05a82f0e..8c87940a9ce8 100644 --- a/trunk/drivers/net/e1000/e1000_main.c +++ b/trunk/drivers/net/e1000/e1000_main.c @@ -853,7 +853,7 @@ e1000_reset(struct e1000_adapter *adapter) /** * Dump the eeprom for users having checksum issues **/ -static void e1000_dump_eeprom(struct e1000_adapter *adapter) +void e1000_dump_eeprom(struct e1000_adapter *adapter) { struct net_device *netdev = adapter->netdev; struct ethtool_eeprom eeprom; diff --git a/trunk/drivers/net/e1000e/defines.h b/trunk/drivers/net/e1000e/defines.h index 6232c3e96689..f2175ea46b83 100644 --- a/trunk/drivers/net/e1000e/defines.h +++ b/trunk/drivers/net/e1000e/defines.h @@ -63,7 +63,6 @@ #define E1000_WUFC_EX 0x00000004 /* Directed Exact Wakeup Enable */ #define E1000_WUFC_MC 0x00000008 /* Directed Multicast Wakeup Enable */ #define E1000_WUFC_BC 0x00000010 /* Broadcast Wakeup Enable */ -#define E1000_WUFC_ARP 0x00000020 /* ARP Request Packet Wakeup Enable */ /* Extended Device Control */ #define E1000_CTRL_EXT_SDP7_DATA 0x00000080 /* Value of SW Defineable Pin 7 */ diff --git a/trunk/drivers/net/e1000e/ethtool.c b/trunk/drivers/net/e1000e/ethtool.c index f77a7427d3a0..6d9c27fd0b53 100644 --- a/trunk/drivers/net/e1000e/ethtool.c +++ b/trunk/drivers/net/e1000e/ethtool.c @@ -690,8 +690,8 @@ static int e1000_set_ringparam(struct net_device *netdev, return err; } -static bool reg_pattern_test_array(struct e1000_adapter *adapter, u64 *data, - int reg, int offset, u32 mask, u32 write) +bool reg_pattern_test_array(struct e1000_adapter *adapter, u64 *data, + int reg, int offset, u32 mask, u32 write) { int i; u32 read; @@ -1632,8 +1632,7 @@ static void e1000_get_wol(struct net_device *netdev, return; wol->supported = WAKE_UCAST | WAKE_MCAST | - WAKE_BCAST | WAKE_MAGIC | - WAKE_PHY | WAKE_ARP; + WAKE_BCAST | WAKE_MAGIC; /* apply any specific unsupported masks here */ if (adapter->flags & FLAG_NO_WAKE_UCAST) { @@ -1652,10 +1651,6 @@ static void e1000_get_wol(struct net_device *netdev, wol->wolopts |= WAKE_BCAST; if (adapter->wol & E1000_WUFC_MAG) wol->wolopts |= WAKE_MAGIC; - if (adapter->wol & E1000_WUFC_LNKC) - wol->wolopts |= WAKE_PHY; - if (adapter->wol & E1000_WUFC_ARP) - wol->wolopts |= WAKE_ARP; } static int e1000_set_wol(struct net_device *netdev, @@ -1663,7 +1658,7 @@ static int e1000_set_wol(struct net_device *netdev, { struct e1000_adapter *adapter = netdev_priv(netdev); - if (wol->wolopts & WAKE_MAGICSECURE) + if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE)) return -EOPNOTSUPP; if (!(adapter->flags & FLAG_HAS_WOL)) @@ -1680,10 +1675,6 @@ static int e1000_set_wol(struct net_device *netdev, adapter->wol |= E1000_WUFC_BC; if (wol->wolopts & WAKE_MAGIC) adapter->wol |= E1000_WUFC_MAG; - if (wol->wolopts & WAKE_PHY) - adapter->wol |= E1000_WUFC_LNKC; - if (wol->wolopts & WAKE_ARP) - adapter->wol |= E1000_WUFC_ARP; return 0; } diff --git a/trunk/drivers/net/e1000e/netdev.c b/trunk/drivers/net/e1000e/netdev.c index f58f017ee47a..0a2cb7960c9e 100644 --- a/trunk/drivers/net/e1000e/netdev.c +++ b/trunk/drivers/net/e1000e/netdev.c @@ -945,7 +945,11 @@ static int e1000_request_irq(struct e1000_adapter *adapter) int irq_flags = IRQF_SHARED; int err; - if (!pci_enable_msi(adapter->pdev)) { + err = pci_enable_msi(adapter->pdev); + if (err) { + ndev_warn(netdev, + "Unable to allocate MSI interrupt Error: %d\n", err); + } else { adapter->flags |= FLAG_MSI_ENABLED; handler = e1000_intr_msi; irq_flags = 0; @@ -954,12 +958,10 @@ static int e1000_request_irq(struct e1000_adapter *adapter) err = request_irq(adapter->pdev->irq, handler, irq_flags, netdev->name, netdev); if (err) { - ndev_err(netdev, - "Unable to allocate %s interrupt (return: %d)\n", - adapter->flags & FLAG_MSI_ENABLED ? "MSI":"INTx", - err); if (adapter->flags & FLAG_MSI_ENABLED) pci_disable_msi(adapter->pdev); + ndev_err(netdev, + "Unable to allocate interrupt Error: %d\n", err); } return err; diff --git a/trunk/drivers/net/eexpress.c b/trunk/drivers/net/eexpress.c index 2eb82aba4a8b..d5459a8056b1 100644 --- a/trunk/drivers/net/eexpress.c +++ b/trunk/drivers/net/eexpress.c @@ -9,7 +9,7 @@ * Many modifications, and currently maintained, by * Philip Blundell * Added the Compaq LTE Alan Cox - * Added MCA support Adam Fritzler + * Added MCA support Adam Fritzler * * Note - this driver is experimental still - it has problems on faster * machines. Someone needs to sit down and go through it line by line with diff --git a/trunk/drivers/net/ehea/ehea.h b/trunk/drivers/net/ehea/ehea.h index 88fb53eba715..5f82a4647eee 100644 --- a/trunk/drivers/net/ehea/ehea.h +++ b/trunk/drivers/net/ehea/ehea.h @@ -458,7 +458,4 @@ void ehea_set_ethtool_ops(struct net_device *netdev); int ehea_sense_port_attr(struct ehea_port *port); int ehea_set_portspeed(struct ehea_port *port, u32 port_speed); -extern u64 ehea_driver_flags; -extern struct work_struct ehea_rereg_mr_task; - #endif /* __EHEA_H__ */ diff --git a/trunk/drivers/net/ehea/ehea_ethtool.c b/trunk/drivers/net/ehea/ehea_ethtool.c index d76885223366..679f40ee9572 100644 --- a/trunk/drivers/net/ehea/ehea_ethtool.c +++ b/trunk/drivers/net/ehea/ehea_ethtool.c @@ -40,7 +40,7 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) return ret; if (netif_carrier_ok(dev)) { - switch (port->port_speed) { + switch(port->port_speed) { case EHEA_SPEED_10M: cmd->speed = SPEED_10; break; case EHEA_SPEED_100M: cmd->speed = SPEED_100; break; case EHEA_SPEED_1G: cmd->speed = SPEED_1000; break; @@ -78,7 +78,7 @@ static int ehea_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) goto doit; } - switch (cmd->speed) { + switch(cmd->speed) { case SPEED_10: if (cmd->duplex == DUPLEX_FULL) sp = H_SPEED_10M_F; diff --git a/trunk/drivers/net/ehea/ehea_hw.h b/trunk/drivers/net/ehea/ehea_hw.h index 567981b4b2cc..1af7ca499ec5 100644 --- a/trunk/drivers/net/ehea/ehea_hw.h +++ b/trunk/drivers/net/ehea/ehea_hw.h @@ -29,10 +29,10 @@ #ifndef __EHEA_HW_H__ #define __EHEA_HW_H__ -#define QPX_SQA_VALUE EHEA_BMASK_IBM(48, 63) -#define QPX_RQ1A_VALUE EHEA_BMASK_IBM(48, 63) -#define QPX_RQ2A_VALUE EHEA_BMASK_IBM(48, 63) -#define QPX_RQ3A_VALUE EHEA_BMASK_IBM(48, 63) +#define QPX_SQA_VALUE EHEA_BMASK_IBM(48,63) +#define QPX_RQ1A_VALUE EHEA_BMASK_IBM(48,63) +#define QPX_RQ2A_VALUE EHEA_BMASK_IBM(48,63) +#define QPX_RQ3A_VALUE EHEA_BMASK_IBM(48,63) #define QPTEMM_OFFSET(x) offsetof(struct ehea_qptemm, x) diff --git a/trunk/drivers/net/ehea/ehea_main.c b/trunk/drivers/net/ehea/ehea_main.c index c051c7e09b9a..869e1604b16e 100644 --- a/trunk/drivers/net/ehea/ehea_main.c +++ b/trunk/drivers/net/ehea/ehea_main.c @@ -6,9 +6,9 @@ * (C) Copyright IBM Corp. 2006 * * Authors: - * Christoph Raisch - * Jan-Bernd Themann - * Thomas Klein + * Christoph Raisch + * Jan-Bernd Themann + * Thomas Klein * * * This program is free software; you can redistribute it and/or modify @@ -54,11 +54,11 @@ static int rq1_entries = EHEA_DEF_ENTRIES_RQ1; static int rq2_entries = EHEA_DEF_ENTRIES_RQ2; static int rq3_entries = EHEA_DEF_ENTRIES_RQ3; static int sq_entries = EHEA_DEF_ENTRIES_SQ; -static int use_mcs; -static int use_lro; +static int use_mcs = 0; +static int use_lro = 0; static int lro_max_aggr = EHEA_LRO_MAX_AGGR; static int num_tx_qps = EHEA_NUM_TX_QP; -static int prop_carrier_state; +static int prop_carrier_state = 0; module_param(msg_level, int, 0); module_param(rq1_entries, int, 0); @@ -94,9 +94,9 @@ MODULE_PARM_DESC(lro_max_aggr, " LRO: Max packets to be aggregated. Default = " MODULE_PARM_DESC(use_lro, " Large Receive Offload, 1: enable, 0: disable, " "Default = 0"); -static int port_name_cnt; +static int port_name_cnt = 0; static LIST_HEAD(adapter_list); -u64 ehea_driver_flags; +u64 ehea_driver_flags = 0; struct work_struct ehea_rereg_mr_task; struct semaphore dlpar_mem_lock; @@ -121,13 +121,12 @@ static struct of_platform_driver ehea_driver = { .remove = ehea_remove, }; -void ehea_dump(void *adr, int len, char *msg) -{ +void ehea_dump(void *adr, int len, char *msg) { int x; unsigned char *deb = adr; for (x = 0; x < len; x += 16) { printk(DRV_NAME " %s adr=%p ofs=%04x %016lx %016lx\n", msg, - deb, x, *((u64 *)&deb[0]), *((u64 *)&deb[8])); + deb, x, *((u64*)&deb[0]), *((u64*)&deb[8])); deb += 16; } } @@ -519,8 +518,7 @@ static int ehea_proc_rwqes(struct net_device *dev, last_wqe_index = wqe_index; rmb(); if (!ehea_check_cqe(cqe, &rq)) { - if (rq == 1) { - /* LL RQ1 */ + if (rq == 1) { /* LL RQ1 */ skb = get_skb_by_index_ll(skb_arr_rq1, skb_arr_rq1_len, wqe_index); @@ -533,11 +531,10 @@ static int ehea_proc_rwqes(struct net_device *dev, if (!skb) break; } - skb_copy_to_linear_data(skb, ((char *)cqe) + 64, + skb_copy_to_linear_data(skb, ((char*)cqe) + 64, cqe->num_bytes_transfered - 4); ehea_fill_skb(dev, skb, cqe); - } else if (rq == 2) { - /* RQ2 */ + } else if (rq == 2) { /* RQ2 */ skb = get_skb_by_index(skb_arr_rq2, skb_arr_rq2_len, cqe); if (unlikely(!skb)) { @@ -547,8 +544,7 @@ static int ehea_proc_rwqes(struct net_device *dev, } ehea_fill_skb(dev, skb, cqe); processed_rq2++; - } else { - /* RQ3 */ + } else { /* RQ3 */ skb = get_skb_by_index(skb_arr_rq3, skb_arr_rq3_len, cqe); if (unlikely(!skb)) { @@ -596,7 +592,7 @@ static struct ehea_cqe *ehea_proc_cqes(struct ehea_port_res *pr, int my_quota) unsigned long flags; cqe = ehea_poll_cq(send_cq); - while (cqe && (quota > 0)) { + while(cqe && (quota > 0)) { ehea_inc_cq(send_cq); cqe_counter++; @@ -647,8 +643,7 @@ static struct ehea_cqe *ehea_proc_cqes(struct ehea_port_res *pr, int my_quota) static int ehea_poll(struct napi_struct *napi, int budget) { - struct ehea_port_res *pr = container_of(napi, struct ehea_port_res, - napi); + struct ehea_port_res *pr = container_of(napi, struct ehea_port_res, napi); struct net_device *dev = pr->port->netdev; struct ehea_cqe *cqe; struct ehea_cqe *cqe_skb = NULL; @@ -748,9 +743,8 @@ int ehea_sense_port_attr(struct ehea_port *port) u64 hret; struct hcp_ehea_port_cb0 *cb0; - /* may be called via ehea_neq_tasklet() */ - cb0 = kzalloc(PAGE_SIZE, GFP_ATOMIC); - if (!cb0) { + cb0 = kzalloc(PAGE_SIZE, GFP_ATOMIC); /* May be called via */ + if (!cb0) { /* ehea_neq_tasklet() */ ehea_error("no mem for cb0"); ret = -ENOMEM; goto out; @@ -768,7 +762,7 @@ int ehea_sense_port_attr(struct ehea_port *port) /* MAC address */ port->mac_addr = cb0->port_mac_addr << 16; - if (!is_valid_ether_addr((u8 *)&port->mac_addr)) { + if (!is_valid_ether_addr((u8*)&port->mac_addr)) { ret = -EADDRNOTAVAIL; goto out_free; } @@ -1000,7 +994,7 @@ static void ehea_parse_eqe(struct ehea_adapter *adapter, u64 eqe) static void ehea_neq_tasklet(unsigned long data) { - struct ehea_adapter *adapter = (struct ehea_adapter *)data; + struct ehea_adapter *adapter = (struct ehea_adapter*)data; struct ehea_eqe *eqe; u64 event_mask; @@ -1210,7 +1204,7 @@ int ehea_rem_smrs(struct ehea_port_res *pr) static int ehea_init_q_skba(struct ehea_q_skb_arr *q_skba, int max_q_entries) { - int arr_size = sizeof(void *) * max_q_entries; + int arr_size = sizeof(void*) * max_q_entries; q_skba->arr = vmalloc(arr_size); if (!q_skba->arr) @@ -1495,7 +1489,7 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev, nfrags = skb_shinfo(skb)->nr_frags; sg1entry = &swqe->u.immdata_desc.sg_entry; - sg_list = (struct ehea_vsgentry *)&swqe->u.immdata_desc.sg_list; + sg_list = (struct ehea_vsgentry*)&swqe->u.immdata_desc.sg_list; swqe->descriptors = 0; sg1entry_contains_frag_data = 0; @@ -1548,7 +1542,7 @@ static int ehea_broadcast_reg_helper(struct ehea_port *port, u32 hcallid) reg_type, port->mac_addr, 0, hcallid); if (hret != H_SUCCESS) { ehea_error("%sregistering bc address failed (tagged)", - hcallid == H_REG_BCMC ? "" : "de"); + hcallid == H_REG_BCMC ? "" : "de"); ret = -EIO; goto out_herr; } @@ -1738,7 +1732,7 @@ static void ehea_allmulti(struct net_device *dev, int enable) } } -static void ehea_add_multicast_entry(struct ehea_port *port, u8 *mc_mac_addr) +static void ehea_add_multicast_entry(struct ehea_port* port, u8* mc_mac_addr) { struct ehea_mc_list *ehea_mcl_entry; u64 hret; @@ -1797,10 +1791,11 @@ static void ehea_set_multicast_list(struct net_device *dev) goto out; } - for (i = 0, k_mcl_entry = dev->mc_list; i < dev->mc_count; i++, - k_mcl_entry = k_mcl_entry->next) + for (i = 0, k_mcl_entry = dev->mc_list; + i < dev->mc_count; + i++, k_mcl_entry = k_mcl_entry->next) { ehea_add_multicast_entry(port, k_mcl_entry->dmi_addr); - + } } out: return; @@ -1930,12 +1925,12 @@ static inline int ehea_hash_skb(struct sk_buff *skb, int num_qps) if ((skb->protocol == htons(ETH_P_IP)) && (ip_hdr(skb)->protocol == IPPROTO_TCP)) { - tcp = (struct tcphdr *)(skb_network_header(skb) + - (ip_hdr(skb)->ihl * 4)); + tcp = (struct tcphdr*)(skb_network_header(skb) + (ip_hdr(skb)->ihl * 4)); tmp = (tcp->source + (tcp->dest << 16)) % 31; tmp += ip_hdr(skb)->daddr % 31; return tmp % num_qps; - } else + } + else return 0; } @@ -2127,7 +2122,7 @@ int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp) u64 hret; u16 dummy16 = 0; u64 dummy64 = 0; - struct hcp_modify_qp_cb0 *cb0; + struct hcp_modify_qp_cb0* cb0; cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL); if (!cb0) { @@ -2253,7 +2248,7 @@ static int ehea_clean_all_portres(struct ehea_port *port) int ret = 0; int i; - for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) + for(i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) ret |= ehea_clean_portres(port, &port->port_res[i]); ret |= ehea_destroy_eq(port->qp_eq); @@ -2305,7 +2300,7 @@ static int ehea_up(struct net_device *dev) goto out_clean_pr; } - for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) { + for(i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) { ret = ehea_activate_qp(port->adapter, port->port_res[i].qp); if (ret) { ehea_error("activate_qp failed"); @@ -2313,7 +2308,7 @@ static int ehea_up(struct net_device *dev) } } - for (i = 0; i < port->num_def_qps; i++) { + for(i = 0; i < port->num_def_qps; i++) { ret = ehea_fill_port_res(&port->port_res[i]); if (ret) { ehea_error("out_free_irqs"); @@ -2430,7 +2425,7 @@ int ehea_stop_qps(struct net_device *dev) { struct ehea_port *port = netdev_priv(dev); struct ehea_adapter *adapter = port->adapter; - struct hcp_modify_qp_cb0 *cb0; + struct hcp_modify_qp_cb0* cb0; int ret = -EIO; int dret; int i; @@ -2495,7 +2490,7 @@ int ehea_stop_qps(struct net_device *dev) return ret; } -void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res *pr) +void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res * pr) { struct ehea_qp qp = *orig_qp; struct ehea_qp_init_attr *init_attr = &qp.init_attr; @@ -2535,7 +2530,7 @@ int ehea_restart_qps(struct net_device *dev) int ret = 0; int i; - struct hcp_modify_qp_cb0 *cb0; + struct hcp_modify_qp_cb0* cb0; u64 hret; u64 dummy64 = 0; u16 dummy16 = 0; @@ -2809,6 +2804,34 @@ static void __devinit logical_port_release(struct device *dev) of_node_put(port->ofdev.node); } +static int ehea_driver_sysfs_add(struct device *dev, + struct device_driver *driver) +{ + int ret; + + ret = sysfs_create_link(&driver->kobj, &dev->kobj, + kobject_name(&dev->kobj)); + if (ret == 0) { + ret = sysfs_create_link(&dev->kobj, &driver->kobj, + "driver"); + if (ret) + sysfs_remove_link(&driver->kobj, + kobject_name(&dev->kobj)); + } + return ret; +} + +static void ehea_driver_sysfs_remove(struct device *dev, + struct device_driver *driver) +{ + struct device_driver *drv = driver; + + if (drv) { + sysfs_remove_link(&drv->kobj, kobject_name(&dev->kobj)); + sysfs_remove_link(&dev->kobj, "driver"); + } +} + static struct device *ehea_register_port(struct ehea_port *port, struct device_node *dn) { @@ -2833,8 +2856,16 @@ static struct device *ehea_register_port(struct ehea_port *port, goto out_unreg_of_dev; } + ret = ehea_driver_sysfs_add(&port->ofdev.dev, &ehea_driver.driver); + if (ret) { + ehea_error("failed to register sysfs driver link"); + goto out_rem_dev_file; + } + return &port->ofdev.dev; +out_rem_dev_file: + device_remove_file(&port->ofdev.dev, &dev_attr_log_port_id); out_unreg_of_dev: of_device_unregister(&port->ofdev); out: @@ -2843,6 +2874,7 @@ static struct device *ehea_register_port(struct ehea_port *port, static void ehea_unregister_port(struct ehea_port *port) { + ehea_driver_sysfs_remove(&port->ofdev.dev, &ehea_driver.driver); device_remove_file(&port->ofdev.dev, &dev_attr_log_port_id); of_device_unregister(&port->ofdev); } @@ -3077,7 +3109,7 @@ static ssize_t ehea_probe_port(struct device *dev, of_node_put(eth_dn); if (port) { - for (i = 0; i < EHEA_MAX_PORTS; i++) + for (i=0; i < EHEA_MAX_PORTS; i++) if (!adapter->port[i]) { adapter->port[i] = port; break; @@ -3112,7 +3144,7 @@ static ssize_t ehea_remove_port(struct device *dev, ehea_shutdown_single_port(port); - for (i = 0; i < EHEA_MAX_PORTS; i++) + for (i=0; i < EHEA_MAX_PORTS; i++) if (adapter->port[i] == port) { adapter->port[i] = NULL; break; @@ -3281,7 +3313,7 @@ static int ehea_reboot_notifier(struct notifier_block *nb, } static struct notifier_block ehea_reboot_nb = { - .notifier_call = ehea_reboot_notifier, + .notifier_call = ehea_reboot_notifier, }; static int check_module_parm(void) diff --git a/trunk/drivers/net/ehea/ehea_phyp.c b/trunk/drivers/net/ehea/ehea_phyp.c index 156eb6320b4e..95c4a7f9cc88 100644 --- a/trunk/drivers/net/ehea/ehea_phyp.c +++ b/trunk/drivers/net/ehea/ehea_phyp.c @@ -6,9 +6,9 @@ * (C) Copyright IBM Corp. 2006 * * Authors: - * Christoph Raisch - * Jan-Bernd Themann - * Thomas Klein + * Christoph Raisch + * Jan-Bernd Themann + * Thomas Klein * * * This program is free software; you can redistribute it and/or modify @@ -38,11 +38,11 @@ static inline u16 get_order_of_qentries(u16 queue_entries) } /* Defines for H_CALL H_ALLOC_RESOURCE */ -#define H_ALL_RES_TYPE_QP 1 -#define H_ALL_RES_TYPE_CQ 2 -#define H_ALL_RES_TYPE_EQ 3 -#define H_ALL_RES_TYPE_MR 5 -#define H_ALL_RES_TYPE_MW 6 +#define H_ALL_RES_TYPE_QP 1 +#define H_ALL_RES_TYPE_CQ 2 +#define H_ALL_RES_TYPE_EQ 3 +#define H_ALL_RES_TYPE_MR 5 +#define H_ALL_RES_TYPE_MW 6 static long ehea_plpar_hcall_norets(unsigned long opcode, unsigned long arg1, @@ -137,77 +137,77 @@ u64 ehea_h_query_ehea_qp(const u64 adapter_handle, const u8 qp_category, const u64 qp_handle, const u64 sel_mask, void *cb_addr) { return ehea_plpar_hcall_norets(H_QUERY_HEA_QP, - adapter_handle, /* R4 */ - qp_category, /* R5 */ - qp_handle, /* R6 */ - sel_mask, /* R7 */ + adapter_handle, /* R4 */ + qp_category, /* R5 */ + qp_handle, /* R6 */ + sel_mask, /* R7 */ virt_to_abs(cb_addr), /* R8 */ 0, 0); } /* input param R5 */ -#define H_ALL_RES_QP_EQPO EHEA_BMASK_IBM(9, 11) -#define H_ALL_RES_QP_QPP EHEA_BMASK_IBM(12, 12) -#define H_ALL_RES_QP_RQR EHEA_BMASK_IBM(13, 15) -#define H_ALL_RES_QP_EQEG EHEA_BMASK_IBM(16, 16) -#define H_ALL_RES_QP_LL_QP EHEA_BMASK_IBM(17, 17) -#define H_ALL_RES_QP_DMA128 EHEA_BMASK_IBM(19, 19) -#define H_ALL_RES_QP_HSM EHEA_BMASK_IBM(20, 21) -#define H_ALL_RES_QP_SIGT EHEA_BMASK_IBM(22, 23) -#define H_ALL_RES_QP_TENURE EHEA_BMASK_IBM(48, 55) -#define H_ALL_RES_QP_RES_TYP EHEA_BMASK_IBM(56, 63) +#define H_ALL_RES_QP_EQPO EHEA_BMASK_IBM(9, 11) +#define H_ALL_RES_QP_QPP EHEA_BMASK_IBM(12, 12) +#define H_ALL_RES_QP_RQR EHEA_BMASK_IBM(13, 15) +#define H_ALL_RES_QP_EQEG EHEA_BMASK_IBM(16, 16) +#define H_ALL_RES_QP_LL_QP EHEA_BMASK_IBM(17, 17) +#define H_ALL_RES_QP_DMA128 EHEA_BMASK_IBM(19, 19) +#define H_ALL_RES_QP_HSM EHEA_BMASK_IBM(20, 21) +#define H_ALL_RES_QP_SIGT EHEA_BMASK_IBM(22, 23) +#define H_ALL_RES_QP_TENURE EHEA_BMASK_IBM(48, 55) +#define H_ALL_RES_QP_RES_TYP EHEA_BMASK_IBM(56, 63) /* input param R9 */ -#define H_ALL_RES_QP_TOKEN EHEA_BMASK_IBM(0, 31) -#define H_ALL_RES_QP_PD EHEA_BMASK_IBM(32, 63) +#define H_ALL_RES_QP_TOKEN EHEA_BMASK_IBM(0, 31) +#define H_ALL_RES_QP_PD EHEA_BMASK_IBM(32,63) /* input param R10 */ -#define H_ALL_RES_QP_MAX_SWQE EHEA_BMASK_IBM(4, 7) -#define H_ALL_RES_QP_MAX_R1WQE EHEA_BMASK_IBM(12, 15) -#define H_ALL_RES_QP_MAX_R2WQE EHEA_BMASK_IBM(20, 23) -#define H_ALL_RES_QP_MAX_R3WQE EHEA_BMASK_IBM(28, 31) +#define H_ALL_RES_QP_MAX_SWQE EHEA_BMASK_IBM(4, 7) +#define H_ALL_RES_QP_MAX_R1WQE EHEA_BMASK_IBM(12, 15) +#define H_ALL_RES_QP_MAX_R2WQE EHEA_BMASK_IBM(20, 23) +#define H_ALL_RES_QP_MAX_R3WQE EHEA_BMASK_IBM(28, 31) /* Max Send Scatter Gather Elements */ -#define H_ALL_RES_QP_MAX_SSGE EHEA_BMASK_IBM(37, 39) -#define H_ALL_RES_QP_MAX_R1SGE EHEA_BMASK_IBM(45, 47) +#define H_ALL_RES_QP_MAX_SSGE EHEA_BMASK_IBM(37, 39) +#define H_ALL_RES_QP_MAX_R1SGE EHEA_BMASK_IBM(45, 47) /* Max Receive SG Elements RQ1 */ -#define H_ALL_RES_QP_MAX_R2SGE EHEA_BMASK_IBM(53, 55) -#define H_ALL_RES_QP_MAX_R3SGE EHEA_BMASK_IBM(61, 63) +#define H_ALL_RES_QP_MAX_R2SGE EHEA_BMASK_IBM(53, 55) +#define H_ALL_RES_QP_MAX_R3SGE EHEA_BMASK_IBM(61, 63) /* input param R11 */ -#define H_ALL_RES_QP_SWQE_IDL EHEA_BMASK_IBM(0, 7) +#define H_ALL_RES_QP_SWQE_IDL EHEA_BMASK_IBM(0, 7) /* max swqe immediate data length */ -#define H_ALL_RES_QP_PORT_NUM EHEA_BMASK_IBM(48, 63) +#define H_ALL_RES_QP_PORT_NUM EHEA_BMASK_IBM(48, 63) /* input param R12 */ -#define H_ALL_RES_QP_TH_RQ2 EHEA_BMASK_IBM(0, 15) +#define H_ALL_RES_QP_TH_RQ2 EHEA_BMASK_IBM(0, 15) /* Threshold RQ2 */ -#define H_ALL_RES_QP_TH_RQ3 EHEA_BMASK_IBM(16, 31) +#define H_ALL_RES_QP_TH_RQ3 EHEA_BMASK_IBM(16, 31) /* Threshold RQ3 */ /* output param R6 */ -#define H_ALL_RES_QP_ACT_SWQE EHEA_BMASK_IBM(0, 15) -#define H_ALL_RES_QP_ACT_R1WQE EHEA_BMASK_IBM(16, 31) -#define H_ALL_RES_QP_ACT_R2WQE EHEA_BMASK_IBM(32, 47) -#define H_ALL_RES_QP_ACT_R3WQE EHEA_BMASK_IBM(48, 63) +#define H_ALL_RES_QP_ACT_SWQE EHEA_BMASK_IBM(0, 15) +#define H_ALL_RES_QP_ACT_R1WQE EHEA_BMASK_IBM(16, 31) +#define H_ALL_RES_QP_ACT_R2WQE EHEA_BMASK_IBM(32, 47) +#define H_ALL_RES_QP_ACT_R3WQE EHEA_BMASK_IBM(48, 63) /* output param, R7 */ -#define H_ALL_RES_QP_ACT_SSGE EHEA_BMASK_IBM(0, 7) -#define H_ALL_RES_QP_ACT_R1SGE EHEA_BMASK_IBM(8, 15) -#define H_ALL_RES_QP_ACT_R2SGE EHEA_BMASK_IBM(16, 23) -#define H_ALL_RES_QP_ACT_R3SGE EHEA_BMASK_IBM(24, 31) +#define H_ALL_RES_QP_ACT_SSGE EHEA_BMASK_IBM(0, 7) +#define H_ALL_RES_QP_ACT_R1SGE EHEA_BMASK_IBM(8, 15) +#define H_ALL_RES_QP_ACT_R2SGE EHEA_BMASK_IBM(16, 23) +#define H_ALL_RES_QP_ACT_R3SGE EHEA_BMASK_IBM(24, 31) #define H_ALL_RES_QP_ACT_SWQE_IDL EHEA_BMASK_IBM(32, 39) /* output param R8,R9 */ -#define H_ALL_RES_QP_SIZE_SQ EHEA_BMASK_IBM(0, 31) -#define H_ALL_RES_QP_SIZE_RQ1 EHEA_BMASK_IBM(32, 63) -#define H_ALL_RES_QP_SIZE_RQ2 EHEA_BMASK_IBM(0, 31) -#define H_ALL_RES_QP_SIZE_RQ3 EHEA_BMASK_IBM(32, 63) +#define H_ALL_RES_QP_SIZE_SQ EHEA_BMASK_IBM(0, 31) +#define H_ALL_RES_QP_SIZE_RQ1 EHEA_BMASK_IBM(32, 63) +#define H_ALL_RES_QP_SIZE_RQ2 EHEA_BMASK_IBM(0, 31) +#define H_ALL_RES_QP_SIZE_RQ3 EHEA_BMASK_IBM(32, 63) /* output param R11,R12 */ -#define H_ALL_RES_QP_LIOBN_SQ EHEA_BMASK_IBM(0, 31) -#define H_ALL_RES_QP_LIOBN_RQ1 EHEA_BMASK_IBM(32, 63) -#define H_ALL_RES_QP_LIOBN_RQ2 EHEA_BMASK_IBM(0, 31) -#define H_ALL_RES_QP_LIOBN_RQ3 EHEA_BMASK_IBM(32, 63) +#define H_ALL_RES_QP_LIOBN_SQ EHEA_BMASK_IBM(0, 31) +#define H_ALL_RES_QP_LIOBN_RQ1 EHEA_BMASK_IBM(32, 63) +#define H_ALL_RES_QP_LIOBN_RQ2 EHEA_BMASK_IBM(0, 31) +#define H_ALL_RES_QP_LIOBN_RQ3 EHEA_BMASK_IBM(32, 63) u64 ehea_h_alloc_resource_qp(const u64 adapter_handle, struct ehea_qp_init_attr *init_attr, const u32 pd, @@ -334,28 +334,28 @@ u64 ehea_h_alloc_resource_cq(const u64 adapter_handle, } /* Defines for H_CALL H_ALLOC_RESOURCE */ -#define H_ALL_RES_TYPE_QP 1 -#define H_ALL_RES_TYPE_CQ 2 -#define H_ALL_RES_TYPE_EQ 3 -#define H_ALL_RES_TYPE_MR 5 -#define H_ALL_RES_TYPE_MW 6 +#define H_ALL_RES_TYPE_QP 1 +#define H_ALL_RES_TYPE_CQ 2 +#define H_ALL_RES_TYPE_EQ 3 +#define H_ALL_RES_TYPE_MR 5 +#define H_ALL_RES_TYPE_MW 6 /* input param R5 */ -#define H_ALL_RES_EQ_NEQ EHEA_BMASK_IBM(0, 0) +#define H_ALL_RES_EQ_NEQ EHEA_BMASK_IBM(0, 0) #define H_ALL_RES_EQ_NON_NEQ_ISN EHEA_BMASK_IBM(6, 7) #define H_ALL_RES_EQ_INH_EQE_GEN EHEA_BMASK_IBM(16, 16) -#define H_ALL_RES_EQ_RES_TYPE EHEA_BMASK_IBM(56, 63) +#define H_ALL_RES_EQ_RES_TYPE EHEA_BMASK_IBM(56, 63) /* input param R6 */ -#define H_ALL_RES_EQ_MAX_EQE EHEA_BMASK_IBM(32, 63) +#define H_ALL_RES_EQ_MAX_EQE EHEA_BMASK_IBM(32, 63) /* output param R6 */ -#define H_ALL_RES_EQ_LIOBN EHEA_BMASK_IBM(32, 63) +#define H_ALL_RES_EQ_LIOBN EHEA_BMASK_IBM(32, 63) /* output param R7 */ -#define H_ALL_RES_EQ_ACT_EQE EHEA_BMASK_IBM(32, 63) +#define H_ALL_RES_EQ_ACT_EQE EHEA_BMASK_IBM(32, 63) /* output param R8 */ -#define H_ALL_RES_EQ_ACT_PS EHEA_BMASK_IBM(32, 63) +#define H_ALL_RES_EQ_ACT_PS EHEA_BMASK_IBM(32, 63) /* output param R9 */ #define H_ALL_RES_EQ_ACT_EQ_IST_C EHEA_BMASK_IBM(30, 31) @@ -453,12 +453,12 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle, hret = ehea_plpar_hcall9(H_REGISTER_SMR, outs, - adapter_handle , /* R4 */ - orig_mr_handle, /* R5 */ - vaddr_in, /* R6 */ - (((u64)access_ctrl) << 32ULL), /* R7 */ - pd, /* R8 */ - 0, 0, 0, 0); /* R9-R12 */ + adapter_handle , /* R4 */ + orig_mr_handle, /* R5 */ + vaddr_in, /* R6 */ + (((u64)access_ctrl) << 32ULL), /* R7 */ + pd, /* R8 */ + 0, 0, 0, 0); /* R9-R12 */ mr->handle = outs[0]; mr->lkey = (u32)outs[2]; @@ -471,11 +471,11 @@ u64 ehea_h_disable_and_get_hea(const u64 adapter_handle, const u64 qp_handle) u64 outs[PLPAR_HCALL9_BUFSIZE]; return ehea_plpar_hcall9(H_DISABLE_AND_GET_HEA, - outs, + outs, adapter_handle, /* R4 */ H_DISABLE_GET_EHEA_WQE_P, /* R5 */ qp_handle, /* R6 */ - 0, 0, 0, 0, 0, 0); /* R7-R12 */ + 0, 0, 0, 0, 0, 0); /* R7-R12 */ } u64 ehea_h_free_resource(const u64 adapter_handle, const u64 res_handle, @@ -483,9 +483,9 @@ u64 ehea_h_free_resource(const u64 adapter_handle, const u64 res_handle, { return ehea_plpar_hcall_norets(H_FREE_RESOURCE, adapter_handle, /* R4 */ - res_handle, /* R5 */ + res_handle, /* R5 */ force_bit, - 0, 0, 0, 0); /* R7-R10 */ + 0, 0, 0, 0); /* R7-R10 */ } u64 ehea_h_alloc_resource_mr(const u64 adapter_handle, const u64 vaddr, @@ -493,13 +493,13 @@ u64 ehea_h_alloc_resource_mr(const u64 adapter_handle, const u64 vaddr, const u32 pd, u64 *mr_handle, u32 *lkey) { u64 hret; - u64 outs[PLPAR_HCALL9_BUFSIZE]; + u64 outs[PLPAR_HCALL9_BUFSIZE]; hret = ehea_plpar_hcall9(H_ALLOC_HEA_RESOURCE, outs, adapter_handle, /* R4 */ 5, /* R5 */ - vaddr, /* R6 */ + vaddr, /* R6 */ length, /* R7 */ (((u64) access_ctrl) << 32ULL), /* R8 */ pd, /* R9 */ @@ -619,8 +619,8 @@ u64 ehea_h_error_data(const u64 adapter_handle, const u64 ressource_handle, void *rblock) { return ehea_plpar_hcall_norets(H_ERROR_DATA, - adapter_handle, /* R4 */ - ressource_handle, /* R5 */ - virt_to_abs(rblock), /* R6 */ - 0, 0, 0, 0); /* R7-R12 */ + adapter_handle, /* R4 */ + ressource_handle, /* R5 */ + virt_to_abs(rblock), /* R6 */ + 0, 0, 0, 0); /* R7-R12 */ } diff --git a/trunk/drivers/net/ehea/ehea_phyp.h b/trunk/drivers/net/ehea/ehea_phyp.h index f3628c803567..faa191d23b86 100644 --- a/trunk/drivers/net/ehea/ehea_phyp.h +++ b/trunk/drivers/net/ehea/ehea_phyp.h @@ -93,7 +93,7 @@ static inline void hcp_epas_ctor(struct h_epas *epas, u64 paddr_kernel, static inline void hcp_epas_dtor(struct h_epas *epas) { if (epas->kernel.addr) - iounmap((void __iomem *)((u64)epas->kernel.addr & PAGE_MASK)); + iounmap((void __iomem*)((u64)epas->kernel.addr & PAGE_MASK)); epas->user.addr = 0; epas->kernel.addr = 0; @@ -388,23 +388,23 @@ u64 ehea_h_modify_ehea_qp(const u64 adapter_handle, const u64 qp_handle, const u64 sel_mask, void *cb_addr, - u64 *inv_attr_id, - u64 *proc_mask, u16 *out_swr, u16 *out_rwr); + u64 * inv_attr_id, + u64 * proc_mask, u16 * out_swr, u16 * out_rwr); u64 ehea_h_alloc_resource_eq(const u64 adapter_handle, - struct ehea_eq_attr *eq_attr, u64 *eq_handle); + struct ehea_eq_attr *eq_attr, u64 * eq_handle); u64 ehea_h_alloc_resource_cq(const u64 adapter_handle, struct ehea_cq_attr *cq_attr, - u64 *cq_handle, struct h_epas *epas); + u64 * cq_handle, struct h_epas *epas); u64 ehea_h_alloc_resource_qp(const u64 adapter_handle, struct ehea_qp_init_attr *init_attr, const u32 pd, - u64 *qp_handle, struct h_epas *h_epas); + u64 * qp_handle, struct h_epas *h_epas); -#define H_REG_RPAGE_PAGE_SIZE EHEA_BMASK_IBM(48, 55) -#define H_REG_RPAGE_QT EHEA_BMASK_IBM(62, 63) +#define H_REG_RPAGE_PAGE_SIZE EHEA_BMASK_IBM(48,55) +#define H_REG_RPAGE_QT EHEA_BMASK_IBM(62,63) u64 ehea_h_register_rpage(const u64 adapter_handle, const u8 pagesize, @@ -426,7 +426,7 @@ u64 ehea_h_free_resource(const u64 adapter_handle, const u64 res_handle, u64 ehea_h_alloc_resource_mr(const u64 adapter_handle, const u64 vaddr, const u64 length, const u32 access_ctrl, - const u32 pd, u64 *mr_handle, u32 *lkey); + const u32 pd, u64 * mr_handle, u32 * lkey); u64 ehea_h_register_rpage_mr(const u64 adapter_handle, const u64 mr_handle, const u8 pagesize, const u8 queue_type, @@ -439,8 +439,8 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle, u64 ehea_h_query_ehea(const u64 adapter_handle, void *cb_addr); /* output param R5 */ -#define H_MEHEAPORT_CAT EHEA_BMASK_IBM(40, 47) -#define H_MEHEAPORT_PN EHEA_BMASK_IBM(48, 63) +#define H_MEHEAPORT_CAT EHEA_BMASK_IBM(40,47) +#define H_MEHEAPORT_PN EHEA_BMASK_IBM(48,63) u64 ehea_h_query_ehea_port(const u64 adapter_handle, const u16 port_num, const u8 cb_cat, const u64 select_mask, diff --git a/trunk/drivers/net/ehea/ehea_qmr.c b/trunk/drivers/net/ehea/ehea_qmr.c index d522e905f460..83b76432b41a 100644 --- a/trunk/drivers/net/ehea/ehea_qmr.c +++ b/trunk/drivers/net/ehea/ehea_qmr.c @@ -33,6 +33,8 @@ struct ehea_busmap ehea_bmap = { 0, 0, NULL }; +extern u64 ehea_driver_flags; +extern struct work_struct ehea_rereg_mr_task; static void *hw_qpageit_get_inc(struct hw_queue *queue) @@ -63,7 +65,7 @@ static int hw_queue_ctor(struct hw_queue *queue, const u32 nr_of_pages, } queue->queue_length = nr_of_pages * pagesize; - queue->queue_pages = kmalloc(nr_of_pages * sizeof(void *), GFP_KERNEL); + queue->queue_pages = kmalloc(nr_of_pages * sizeof(void*), GFP_KERNEL); if (!queue->queue_pages) { ehea_error("no mem for queue_pages"); return -ENOMEM; @@ -76,11 +78,11 @@ static int hw_queue_ctor(struct hw_queue *queue, const u32 nr_of_pages, */ i = 0; while (i < nr_of_pages) { - u8 *kpage = (u8 *)get_zeroed_page(GFP_KERNEL); + u8 *kpage = (u8*)get_zeroed_page(GFP_KERNEL); if (!kpage) goto out_nomem; for (k = 0; k < pages_per_kpage && i < nr_of_pages; k++) { - (queue->queue_pages)[i] = (struct ehea_page *)kpage; + (queue->queue_pages)[i] = (struct ehea_page*)kpage; kpage += pagesize; i++; } @@ -233,8 +235,8 @@ int ehea_destroy_cq(struct ehea_cq *cq) return 0; hcp_epas_dtor(&cq->epas); - hret = ehea_destroy_cq_res(cq, NORMAL_FREE); - if (hret == H_R_STATE) { + + if ((hret = ehea_destroy_cq_res(cq, NORMAL_FREE)) == H_R_STATE) { ehea_error_data(cq->adapter, cq->fw_handle); hret = ehea_destroy_cq_res(cq, FORCE_FREE); } @@ -299,13 +301,13 @@ struct ehea_eq *ehea_create_eq(struct ehea_adapter *adapter, if (i == (eq->attr.nr_pages - 1)) { /* last page */ vpage = hw_qpageit_get_inc(&eq->hw_queue); - if ((hret != H_SUCCESS) || (vpage)) + if ((hret != H_SUCCESS) || (vpage)) { goto out_kill_hwq; - + } } else { - if ((hret != H_PAGE_REGISTERED) || (!vpage)) + if ((hret != H_PAGE_REGISTERED) || (!vpage)) { goto out_kill_hwq; - + } } } @@ -329,7 +331,7 @@ struct ehea_eqe *ehea_poll_eq(struct ehea_eq *eq) unsigned long flags; spin_lock_irqsave(&eq->spinlock, flags); - eqe = (struct ehea_eqe *)hw_eqit_eq_get_inc_valid(&eq->hw_queue); + eqe = (struct ehea_eqe*)hw_eqit_eq_get_inc_valid(&eq->hw_queue); spin_unlock_irqrestore(&eq->spinlock, flags); return eqe; @@ -362,8 +364,7 @@ int ehea_destroy_eq(struct ehea_eq *eq) hcp_epas_dtor(&eq->epas); - hret = ehea_destroy_eq_res(eq, NORMAL_FREE); - if (hret == H_R_STATE) { + if ((hret = ehea_destroy_eq_res(eq, NORMAL_FREE)) == H_R_STATE) { ehea_error_data(eq->adapter, eq->fw_handle); hret = ehea_destroy_eq_res(eq, FORCE_FREE); } @@ -545,8 +546,7 @@ int ehea_destroy_qp(struct ehea_qp *qp) hcp_epas_dtor(&qp->epas); - hret = ehea_destroy_qp_res(qp, NORMAL_FREE); - if (hret == H_R_STATE) { + if ((hret = ehea_destroy_qp_res(qp, NORMAL_FREE)) == H_R_STATE) { ehea_error_data(qp->adapter, qp->fw_handle); hret = ehea_destroy_qp_res(qp, FORCE_FREE); } @@ -559,7 +559,7 @@ int ehea_destroy_qp(struct ehea_qp *qp) return 0; } -int ehea_create_busmap(void) +int ehea_create_busmap( void ) { u64 vaddr = EHEA_BUSMAP_START; unsigned long high_section_index = 0; @@ -595,7 +595,7 @@ int ehea_create_busmap(void) return 0; } -void ehea_destroy_busmap(void) +void ehea_destroy_busmap( void ) { vfree(ehea_bmap.vaddr); } diff --git a/trunk/drivers/net/ehea/ehea_qmr.h b/trunk/drivers/net/ehea/ehea_qmr.h index 0bb6f92fa2f8..bc62d389c166 100644 --- a/trunk/drivers/net/ehea/ehea_qmr.h +++ b/trunk/drivers/net/ehea/ehea_qmr.h @@ -41,8 +41,8 @@ #define EHEA_SECTSIZE (1UL << 24) #define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT) -#if ((1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE) -#error eHEA module cannot work if kernel sectionsize < ehea sectionsize +#if (1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE +#error eHEA module can't work if kernel sectionsize < ehea sectionsize #endif /* Some abbreviations used here: @@ -188,8 +188,8 @@ struct ehea_eqe { u64 entry; }; -#define ERROR_DATA_LENGTH EHEA_BMASK_IBM(52, 63) -#define ERROR_DATA_TYPE EHEA_BMASK_IBM(0, 7) +#define ERROR_DATA_LENGTH EHEA_BMASK_IBM(52,63) +#define ERROR_DATA_TYPE EHEA_BMASK_IBM(0,7) static inline void *hw_qeit_calc(struct hw_queue *queue, u64 q_offset) { @@ -279,7 +279,7 @@ static inline void *hw_qeit_eq_get_inc(struct hw_queue *queue) static inline void *hw_eqit_eq_get_inc_valid(struct hw_queue *queue) { void *retvalue = hw_qeit_get(queue); - u32 qe = *(u8 *)retvalue; + u32 qe = *(u8*)retvalue; if ((qe >> 7) == (queue->toggle_state & 1)) hw_qeit_eq_get_inc(queue); else @@ -364,7 +364,7 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter, int cqe, int ehea_destroy_cq(struct ehea_cq *cq); -struct ehea_qp *ehea_create_qp(struct ehea_adapter *adapter, u32 pd, +struct ehea_qp *ehea_create_qp(struct ehea_adapter * adapter, u32 pd, struct ehea_qp_init_attr *init_attr); int ehea_destroy_qp(struct ehea_qp *qp); @@ -378,8 +378,8 @@ int ehea_rem_mr(struct ehea_mr *mr); void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle); -int ehea_create_busmap(void); -void ehea_destroy_busmap(void); +int ehea_create_busmap( void ); +void ehea_destroy_busmap( void ); u64 ehea_map_vaddr(void *caddr); #endif /* __EHEA_QMR_H__ */ diff --git a/trunk/drivers/net/forcedeth.c b/trunk/drivers/net/forcedeth.c index 36342230a6de..7667a62ac31f 100644 --- a/trunk/drivers/net/forcedeth.c +++ b/trunk/drivers/net/forcedeth.c @@ -13,7 +13,7 @@ * Copyright (C) 2004 Andrew de Quincey (wol support) * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane * IRQ rate fixes, bigendian fixes, cleanups, verification) - * Copyright (c) 2004,2005,2006,2007,2008 NVIDIA Corporation + * Copyright (c) 2004,5,6 NVIDIA Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -226,7 +226,7 @@ enum { #define NVREG_MISC1_HD 0x02 #define NVREG_MISC1_FORCE 0x3b0f3c - NvRegMacReset = 0x34, + NvRegMacReset = 0x3c, #define NVREG_MAC_RESET_ASSERT 0x0F3 NvRegTransmitterControl = 0x084, #define NVREG_XMITCTL_START 0x01 @@ -277,9 +277,7 @@ enum { #define NVREG_MCASTADDRA_FORCE 0x01 NvRegMulticastAddrB = 0xB4, NvRegMulticastMaskA = 0xB8, -#define NVREG_MCASTMASKA_NONE 0xffffffff NvRegMulticastMaskB = 0xBC, -#define NVREG_MCASTMASKB_NONE 0xffff NvRegPhyInterface = 0xC0, #define PHY_RGMII 0x10000000 @@ -318,8 +316,8 @@ enum { NvRegTxRingPhysAddrHigh = 0x148, NvRegRxRingPhysAddrHigh = 0x14C, NvRegTxPauseFrame = 0x170, -#define NVREG_TX_PAUSEFRAME_DISABLE 0x01ff0080 -#define NVREG_TX_PAUSEFRAME_ENABLE 0x01800010 +#define NVREG_TX_PAUSEFRAME_DISABLE 0x1ff0080 +#define NVREG_TX_PAUSEFRAME_ENABLE 0x0c00030 NvRegMIIStatus = 0x180, #define NVREG_MIISTAT_ERROR 0x0001 #define NVREG_MIISTAT_LINKCHANGE 0x0008 @@ -473,9 +471,9 @@ union ring_type { #define NV_RX_AVAIL (1<<31) #define NV_RX2_CHECKSUMMASK (0x1C000000) -#define NV_RX2_CHECKSUM_IP (0x10000000) -#define NV_RX2_CHECKSUM_IP_TCP (0x14000000) -#define NV_RX2_CHECKSUM_IP_UDP (0x18000000) +#define NV_RX2_CHECKSUMOK1 (0x10000000) +#define NV_RX2_CHECKSUMOK2 (0x14000000) +#define NV_RX2_CHECKSUMOK3 (0x18000000) #define NV_RX2_DESCRIPTORVALID (1<<29) #define NV_RX2_SUBSTRACT1 (1<<25) #define NV_RX2_ERROR1 (1<<18) @@ -2377,9 +2375,14 @@ static int nv_rx_process(struct net_device *dev, int limit) goto next_pkt; } } - if (((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUM_IP_TCP) || /*ip and tcp */ - ((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUM_IP_UDP)) /*ip and udp */ + if ((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUMOK2)/*ip and tcp */ { skb->ip_summed = CHECKSUM_UNNECESSARY; + } else { + if ((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUMOK1 || + (flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUMOK3) { + skb->ip_summed = CHECKSUM_UNNECESSARY; + } + } } else { dev_kfree_skb(skb); goto next_pkt; @@ -2471,9 +2474,14 @@ static int nv_rx_process_optimized(struct net_device *dev, int limit) } } - if (((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUM_IP_TCP) || /*ip and tcp */ - ((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUM_IP_UDP)) /*ip and udp */ + if ((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUMOK2)/*ip and tcp */ { skb->ip_summed = CHECKSUM_UNNECESSARY; + } else { + if ((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUMOK1 || + (flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUMOK3) { + skb->ip_summed = CHECKSUM_UNNECESSARY; + } + } /* got a valid packet - forward it to the network core */ skb_put(skb, len); @@ -2695,9 +2703,6 @@ static void nv_set_multicast(struct net_device *dev) addr[1] = alwaysOn[1]; mask[0] = alwaysOn[0] | alwaysOff[0]; mask[1] = alwaysOn[1] | alwaysOff[1]; - } else { - mask[0] = NVREG_MCASTMASKA_NONE; - mask[1] = NVREG_MCASTMASKB_NONE; } } addr[0] |= NVREG_MCASTADDRA_FORCE; @@ -4808,8 +4813,8 @@ static int nv_open(struct net_device *dev) nv_mac_reset(dev); writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA); writel(0, base + NvRegMulticastAddrB); - writel(NVREG_MCASTMASKA_NONE, base + NvRegMulticastMaskA); - writel(NVREG_MCASTMASKB_NONE, base + NvRegMulticastMaskB); + writel(0, base + NvRegMulticastMaskA); + writel(0, base + NvRegMulticastMaskB); writel(0, base + NvRegPacketFilterFlags); writel(0, base + NvRegTransmitterControl); @@ -4903,8 +4908,8 @@ static int nv_open(struct net_device *dev) spin_lock_irq(&np->lock); writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA); writel(0, base + NvRegMulticastAddrB); - writel(NVREG_MCASTMASKA_NONE, base + NvRegMulticastMaskA); - writel(NVREG_MCASTMASKB_NONE, base + NvRegMulticastMaskB); + writel(0, base + NvRegMulticastMaskA); + writel(0, base + NvRegMulticastMaskB); writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); /* One manual link speed update: Interrupts are enabled, future link * speed changes cause interrupts and are handled by nv_link_irq(). @@ -5598,35 +5603,35 @@ static struct pci_device_id pci_tbl[] = { }, { /* MCP77 Ethernet Controller */ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_32), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR, + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, }, { /* MCP77 Ethernet Controller */ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_33), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR, + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, }, { /* MCP77 Ethernet Controller */ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_34), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR, + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, }, { /* MCP77 Ethernet Controller */ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_35), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR, + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, }, { /* MCP79 Ethernet Controller */ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_36), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR, + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, }, { /* MCP79 Ethernet Controller */ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_37), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR, + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, }, { /* MCP79 Ethernet Controller */ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_38), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR, + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, }, { /* MCP79 Ethernet Controller */ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_39), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR, + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, }, {0,}, }; diff --git a/trunk/drivers/net/ibmlana.c b/trunk/drivers/net/ibmlana.c index 95e3464068db..46e2c52c7862 100644 --- a/trunk/drivers/net/ibmlana.c +++ b/trunk/drivers/net/ibmlana.c @@ -901,12 +901,12 @@ static short ibmlana_adapter_ids[] __initdata = { 0x0000 }; -static char *ibmlana_adapter_names[] __devinitdata = { +static char *ibmlana_adapter_names[] __initdata = { "IBM LAN Adapter/A", NULL }; -static int __devinit ibmlana_init_one(struct device *kdev) +static int ibmlana_init_one(struct device *kdev) { struct mca_device *mdev = to_mca_device(kdev); struct net_device *dev; diff --git a/trunk/drivers/net/igb/igb_main.c b/trunk/drivers/net/igb/igb_main.c index d4eb8e2d8720..f3c144d5d72f 100644 --- a/trunk/drivers/net/igb/igb_main.c +++ b/trunk/drivers/net/igb/igb_main.c @@ -438,6 +438,7 @@ static int igb_request_irq(struct igb_adapter *adapter) if (adapter->msix_entries) { err = igb_request_msix(adapter); if (!err) { + struct e1000_hw *hw = &adapter->hw; /* enable IAM, auto-mask, * DO NOT USE EIAME or IAME in legacy mode */ wr32(E1000_IAM, IMS_ENABLE_MASK); diff --git a/trunk/drivers/net/irda/ali-ircc.h b/trunk/drivers/net/irda/ali-ircc.h index 07876578887f..e489c6661ee8 100644 --- a/trunk/drivers/net/irda/ali-ircc.h +++ b/trunk/drivers/net/irda/ali-ircc.h @@ -173,13 +173,13 @@ struct st_fifo { struct frame_cb { void *start; /* Start of frame in DMA mem */ - int len; /* Length of frame in DMA mem */ + int len; /* Lenght of frame in DMA mem */ }; struct tx_fifo { struct frame_cb queue[MAX_TX_WINDOW]; /* Info about frames in queue */ int ptr; /* Currently being sent */ - int len; /* Length of queue */ + int len; /* Lenght of queue */ int free; /* Next free slot */ void *tail; /* Next free start in DMA mem */ }; diff --git a/trunk/drivers/net/irda/nsc-ircc.h b/trunk/drivers/net/irda/nsc-ircc.h index 29398a4f73fd..bbdc97ff83ca 100644 --- a/trunk/drivers/net/irda/nsc-ircc.h +++ b/trunk/drivers/net/irda/nsc-ircc.h @@ -231,13 +231,13 @@ struct st_fifo { struct frame_cb { void *start; /* Start of frame in DMA mem */ - int len; /* Length of frame in DMA mem */ + int len; /* Lenght of frame in DMA mem */ }; struct tx_fifo { struct frame_cb queue[MAX_TX_WINDOW]; /* Info about frames in queue */ int ptr; /* Currently being sent */ - int len; /* Length of queue */ + int len; /* Lenght of queue */ int free; /* Next free slot */ void *tail; /* Next free start in DMA mem */ }; diff --git a/trunk/drivers/net/irda/via-ircc.h b/trunk/drivers/net/irda/via-ircc.h index 9d012f0dbd30..204b1b34ffc7 100644 --- a/trunk/drivers/net/irda/via-ircc.h +++ b/trunk/drivers/net/irda/via-ircc.h @@ -54,13 +54,13 @@ struct st_fifo { struct frame_cb { void *start; /* Start of frame in DMA mem */ - int len; /* Length of frame in DMA mem */ + int len; /* Lenght of frame in DMA mem */ }; struct tx_fifo { struct frame_cb queue[MAX_TX_WINDOW + 2]; /* Info about frames in queue */ int ptr; /* Currently being sent */ - int len; /* Length of queue */ + int len; /* Lenght of queue */ int free; /* Next free slot */ void *tail; /* Next free start in DMA mem */ }; diff --git a/trunk/drivers/net/lib8390.c b/trunk/drivers/net/lib8390.c index 0c5447dac03b..c429a5002dd6 100644 --- a/trunk/drivers/net/lib8390.c +++ b/trunk/drivers/net/lib8390.c @@ -148,7 +148,7 @@ static void __NS8390_init(struct net_device *dev, int startp); * * "The author (me) didn't use spin_lock_irqsave because the slowness of the * card means that approach caused horrible problems like losing serial data - * at 38400 baud on some chips. Remember many 8390 nics on PCI were ISA + * at 38400 baud on some chips. Rememeber many 8390 nics on PCI were ISA * chips with FPGA front ends. * * Ok the logic behind the 8390 is very simple: diff --git a/trunk/drivers/net/macb.c b/trunk/drivers/net/macb.c index 81bf005ff280..e10528ed9081 100644 --- a/trunk/drivers/net/macb.c +++ b/trunk/drivers/net/macb.c @@ -1084,7 +1084,7 @@ static int macb_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) return phy_mii_ioctl(phydev, if_mii(rq), cmd); } -static int __init macb_probe(struct platform_device *pdev) +static int __devinit macb_probe(struct platform_device *pdev) { struct eth_platform_data *pdata; struct resource *regs; @@ -1248,7 +1248,7 @@ static int __init macb_probe(struct platform_device *pdev) return err; } -static int __exit macb_remove(struct platform_device *pdev) +static int __devexit macb_remove(struct platform_device *pdev) { struct net_device *dev; struct macb *bp; @@ -1276,7 +1276,8 @@ static int __exit macb_remove(struct platform_device *pdev) } static struct platform_driver macb_driver = { - .remove = __exit_p(macb_remove), + .probe = macb_probe, + .remove = __devexit_p(macb_remove), .driver = { .name = "macb", }, @@ -1284,7 +1285,7 @@ static struct platform_driver macb_driver = { static int __init macb_init(void) { - return platform_driver_probe(&macb_driver, macb_probe); + return platform_driver_register(&macb_driver); } static void __exit macb_exit(void) diff --git a/trunk/drivers/net/mipsnet.c b/trunk/drivers/net/mipsnet.c index 6d343efb2717..aafc3ce59cbb 100644 --- a/trunk/drivers/net/mipsnet.c +++ b/trunk/drivers/net/mipsnet.c @@ -4,6 +4,8 @@ * for more details. */ +#define DEBUG + #include #include #include @@ -13,93 +15,11 @@ #include #include -#define MIPSNET_VERSION "2007-11-17" - -/* - * Net status/control block as seen by sw in the core. - */ -struct mipsnet_regs { - /* - * Device info for probing, reads as MIPSNET%d where %d is some - * form of version. - */ - u64 devId; /*0x00 */ +#include "mipsnet.h" /* actual device IO mapping */ - /* - * read only busy flag. - * Set and cleared by the Net Device to indicate that an rx or a tx - * is in progress. - */ - u32 busy; /*0x08 */ +#define MIPSNET_VERSION "2005-06-20" - /* - * Set by the Net Device. - * The device will set it once data has been received. - * The value is the number of bytes that should be read from - * rxDataBuffer. The value will decrease till 0 until all the data - * from rxDataBuffer has been read. - */ - u32 rxDataCount; /*0x0c */ -#define MIPSNET_MAX_RXTX_DATACOUNT (1 << 16) - - /* - * Settable from the MIPS core, cleared by the Net Device. - * The core should set the number of bytes it wants to send, - * then it should write those bytes of data to txDataBuffer. - * The device will clear txDataCount has been processed (not - * necessarily sent). - */ - u32 txDataCount; /*0x10 */ - - /* - * Interrupt control - * - * Used to clear the interrupted generated by this dev. - * Write a 1 to clear the interrupt. (except bit31). - * - * Bit0 is set if it was a tx-done interrupt. - * Bit1 is set when new rx-data is available. - * Until this bit is cleared there will be no other RXs. - * - * Bit31 is used for testing, it clears after a read. - * Writing 1 to this bit will cause an interrupt to be generated. - * To clear the test interrupt, write 0 to this register. - */ - u32 interruptControl; /*0x14 */ -#define MIPSNET_INTCTL_TXDONE (1u << 0) -#define MIPSNET_INTCTL_RXDONE (1u << 1) -#define MIPSNET_INTCTL_TESTBIT (1u << 31) - - /* - * Readonly core-specific interrupt info for the device to signal - * the core. The meaning of the contents of this field might change. - */ - /* XXX: the whole memIntf interrupt scheme is messy: the device - * should have no control what so ever of what VPE/register set is - * being used. - * The MemIntf should only expose interrupt lines, and something in - * the config should be responsible for the line<->core/vpe bindings. - */ - u32 interruptInfo; /*0x18 */ - - /* - * This is where the received data is read out. - * There is more data to read until rxDataReady is 0. - * Only 1 byte at this regs offset is used. - */ - u32 rxDataBuffer; /*0x1c */ - - /* - * This is where the data to transmit is written. - * Data should be written for the amount specified in the - * txDataCount register. - * Only 1 byte at this regs offset is used. - */ - u32 txDataBuffer; /*0x20 */ -}; - -#define regaddr(dev, field) \ - (dev->base_addr + offsetof(struct mipsnet_regs, field)) +#define mipsnet_reg_address(dev, field) (dev->base_addr + field_offset(field)) static char mipsnet_string[] = "mipsnet"; @@ -109,27 +29,32 @@ static char mipsnet_string[] = "mipsnet"; static int ioiocpy_frommipsnet(struct net_device *dev, unsigned char *kdata, int len) { + uint32_t available_len = inl(mipsnet_reg_address(dev, rxDataCount)); + + if (available_len < len) + return -EFAULT; + for (; len > 0; len--, kdata++) - *kdata = inb(regaddr(dev, rxDataBuffer)); + *kdata = inb(mipsnet_reg_address(dev, rxDataBuffer)); - return inl(regaddr(dev, rxDataCount)); + return inl(mipsnet_reg_address(dev, rxDataCount)); } -static inline void mipsnet_put_todevice(struct net_device *dev, +static inline ssize_t mipsnet_put_todevice(struct net_device *dev, struct sk_buff *skb) { int count_to_go = skb->len; char *buf_ptr = skb->data; - outl(skb->len, regaddr(dev, txDataCount)); + outl(skb->len, mipsnet_reg_address(dev, txDataCount)); for (; count_to_go; buf_ptr++, count_to_go--) - outb(*buf_ptr, regaddr(dev, txDataBuffer)); + outb(*buf_ptr, mipsnet_reg_address(dev, txDataBuffer)); dev->stats.tx_packets++; dev->stats.tx_bytes += skb->len; - dev_kfree_skb(skb); + return skb->len; } static int mipsnet_xmit(struct sk_buff *skb, struct net_device *dev) @@ -144,20 +69,18 @@ static int mipsnet_xmit(struct sk_buff *skb, struct net_device *dev) return 0; } -static inline ssize_t mipsnet_get_fromdev(struct net_device *dev, size_t len) +static inline ssize_t mipsnet_get_fromdev(struct net_device *dev, size_t count) { struct sk_buff *skb; + size_t len = count; - if (!len) - return len; - - skb = dev_alloc_skb(len + NET_IP_ALIGN); + skb = alloc_skb(len + 2, GFP_KERNEL); if (!skb) { dev->stats.rx_dropped++; return -ENOMEM; } - skb_reserve(skb, NET_IP_ALIGN); + skb_reserve(skb, 2); if (ioiocpy_frommipsnet(dev, skb_put(skb, len), len)) return -EFAULT; @@ -169,42 +92,50 @@ static inline ssize_t mipsnet_get_fromdev(struct net_device *dev, size_t len) dev->stats.rx_packets++; dev->stats.rx_bytes += len; - return len; + return count; } static irqreturn_t mipsnet_interrupt(int irq, void *dev_id) { struct net_device *dev = dev_id; - u32 int_flags; - irqreturn_t ret = IRQ_NONE; - - if (irq != dev->irq) - goto out_badirq; - - /* TESTBIT is cleared on read. */ - int_flags = inl(regaddr(dev, interruptControl)); - if (int_flags & MIPSNET_INTCTL_TESTBIT) { - /* TESTBIT takes effect after a write with 0. */ - outl(0, regaddr(dev, interruptControl)); - ret = IRQ_HANDLED; - } else if (int_flags & MIPSNET_INTCTL_TXDONE) { - /* Only one packet at a time, we are done. */ - dev->stats.tx_packets++; - netif_wake_queue(dev); - outl(MIPSNET_INTCTL_TXDONE, - regaddr(dev, interruptControl)); - ret = IRQ_HANDLED; - } else if (int_flags & MIPSNET_INTCTL_RXDONE) { - mipsnet_get_fromdev(dev, inl(regaddr(dev, rxDataCount))); - outl(MIPSNET_INTCTL_RXDONE, regaddr(dev, interruptControl)); - ret = IRQ_HANDLED; - } - return ret; -out_badirq: - printk(KERN_INFO "%s: %s(): irq %d for unknown device\n", - dev->name, __FUNCTION__, irq); - return ret; + irqreturn_t retval = IRQ_NONE; + uint64_t interruptFlags; + + if (irq == dev->irq) { + retval = IRQ_HANDLED; + + interruptFlags = + inl(mipsnet_reg_address(dev, interruptControl)); + + if (interruptFlags & MIPSNET_INTCTL_TXDONE) { + outl(MIPSNET_INTCTL_TXDONE, + mipsnet_reg_address(dev, interruptControl)); + /* only one packet at a time, we are done. */ + netif_wake_queue(dev); + } else if (interruptFlags & MIPSNET_INTCTL_RXDONE) { + mipsnet_get_fromdev(dev, + inl(mipsnet_reg_address(dev, rxDataCount))); + outl(MIPSNET_INTCTL_RXDONE, + mipsnet_reg_address(dev, interruptControl)); + + } else if (interruptFlags & MIPSNET_INTCTL_TESTBIT) { + /* + * TESTBIT is cleared on read. + * And takes effect after a write with 0 + */ + outl(0, mipsnet_reg_address(dev, interruptControl)); + } else { + /* Maybe shared IRQ, just ignore, no clearing. */ + retval = IRQ_NONE; + } + + } else { + printk(KERN_INFO "%s: %s(): irq %d for unknown device\n", + dev->name, __FUNCTION__, irq); + retval = IRQ_NONE; + } + return retval; } static int mipsnet_open(struct net_device *dev) @@ -213,15 +144,18 @@ static int mipsnet_open(struct net_device *dev) err = request_irq(dev->irq, &mipsnet_interrupt, IRQF_SHARED, dev->name, (void *) dev); + if (err) { - release_region(dev->base_addr, sizeof(struct mipsnet_regs)); + release_region(dev->base_addr, MIPSNET_IO_EXTENT); return err; } netif_start_queue(dev); /* test interrupt handler */ - outl(MIPSNET_INTCTL_TESTBIT, regaddr(dev, interruptControl)); + outl(MIPSNET_INTCTL_TESTBIT, + mipsnet_reg_address(dev, interruptControl)); + return 0; } @@ -229,7 +163,7 @@ static int mipsnet_open(struct net_device *dev) static int mipsnet_close(struct net_device *dev) { netif_stop_queue(dev); - free_irq(dev->irq, dev); + return 0; } @@ -260,11 +194,10 @@ static int __init mipsnet_probe(struct device *dev) */ netdev->base_addr = 0x4200; netdev->irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_MB0 + - inl(regaddr(netdev, interruptInfo)); + inl(mipsnet_reg_address(netdev, interruptInfo)); /* Get the io region now, get irq on open() */ - if (!request_region(netdev->base_addr, sizeof(struct mipsnet_regs), - "mipsnet")) { + if (!request_region(netdev->base_addr, MIPSNET_IO_EXTENT, "mipsnet")) { err = -EBUSY; goto out_free_netdev; } @@ -284,7 +217,7 @@ static int __init mipsnet_probe(struct device *dev) return 0; out_free_region: - release_region(netdev->base_addr, sizeof(struct mipsnet_regs)); + release_region(netdev->base_addr, MIPSNET_IO_EXTENT); out_free_netdev: free_netdev(netdev); @@ -298,7 +231,7 @@ static int __devexit mipsnet_device_remove(struct device *device) struct net_device *dev = dev_get_drvdata(device); unregister_netdev(dev); - release_region(dev->base_addr, sizeof(struct mipsnet_regs)); + release_region(dev->base_addr, MIPSNET_IO_EXTENT); free_netdev(dev); dev_set_drvdata(device, NULL); diff --git a/trunk/drivers/net/mipsnet.h b/trunk/drivers/net/mipsnet.h new file mode 100644 index 000000000000..0132c6714a40 --- /dev/null +++ b/trunk/drivers/net/mipsnet.h @@ -0,0 +1,112 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ +#ifndef __MIPSNET_H +#define __MIPSNET_H + +/* + * Id of this Net device, as seen by the core. + */ +#define MIPS_NET_DEV_ID ((uint64_t) \ + ((uint64_t) 'M' << 0)| \ + ((uint64_t) 'I' << 8)| \ + ((uint64_t) 'P' << 16)| \ + ((uint64_t) 'S' << 24)| \ + ((uint64_t) 'N' << 32)| \ + ((uint64_t) 'E' << 40)| \ + ((uint64_t) 'T' << 48)| \ + ((uint64_t) '0' << 56)) + +/* + * Net status/control block as seen by sw in the core. + * (Why not use bit fields? can't be bothered with cross-platform struct + * packing.) + */ +struct net_control_block { + /* + * dev info for probing + * reads as MIPSNET%d where %d is some form of version + */ + uint64_t devId; /* 0x00 */ + + /* + * read only busy flag. + * Set and cleared by the Net Device to indicate that an rx or a tx + * is in progress. + */ + uint32_t busy; /* 0x08 */ + + /* + * Set by the Net Device. + * The device will set it once data has been received. + * The value is the number of bytes that should be read from + * rxDataBuffer. The value will decrease till 0 until all the data + * from rxDataBuffer has been read. + */ + uint32_t rxDataCount; /* 0x0c */ +#define MIPSNET_MAX_RXTX_DATACOUNT (1<<16) + + /* + * Settable from the MIPS core, cleared by the Net Device. The core + * should set the number of bytes it wants to send, then it should + * write those bytes of data to txDataBuffer. The device will clear + * txDataCount has been processed (not necessarily sent). + */ + uint32_t txDataCount; /* 0x10 */ + + /* + * Interrupt control + * + * Used to clear the interrupted generated by this dev. + * Write a 1 to clear the interrupt. (except bit31). + * + * Bit0 is set if it was a tx-done interrupt. + * Bit1 is set when new rx-data is available. + * Until this bit is cleared there will be no other RXs. + * + * Bit31 is used for testing, it clears after a read. + * Writing 1 to this bit will cause an interrupt to be generated. + * To clear the test interrupt, write 0 to this register. + */ + uint32_t interruptControl; /*0x14 */ +#define MIPSNET_INTCTL_TXDONE ((uint32_t)(1 << 0)) +#define MIPSNET_INTCTL_RXDONE ((uint32_t)(1 << 1)) +#define MIPSNET_INTCTL_TESTBIT ((uint32_t)(1 << 31)) +#define MIPSNET_INTCTL_ALLSOURCES (MIPSNET_INTCTL_TXDONE | \ + MIPSNET_INTCTL_RXDONE | \ + MIPSNET_INTCTL_TESTBIT) + + /* + * Readonly core-specific interrupt info for the device to signal the + * core. The meaning of the contents of this field might change. + * + * TODO: the whole memIntf interrupt scheme is messy: the device should + * have no control what so ever of what VPE/register set is being + * used. The MemIntf should only expose interrupt lines, and + * something in the config should be responsible for the + * line<->core/vpe bindings. + */ + uint32_t interruptInfo; /* 0x18 */ + + /* + * This is where the received data is read out. + * There is more data to read until rxDataReady is 0. + * Only 1 byte at this regs offset is used. + */ + uint32_t rxDataBuffer; /* 0x1c */ + + /* + * This is where the data to transmit is written. Data should be + * written for the amount specified in the txDataCount register. Only + * 1 byte at this regs offset is used. + */ + uint32_t txDataBuffer; /* 0x20 */ +}; + +#define MIPSNET_IO_EXTENT 0x40 /* being generous */ + +#define field_offset(field) (offsetof(struct net_control_block, field)) + +#endif /* __MIPSNET_H */ diff --git a/trunk/drivers/net/natsemi.c b/trunk/drivers/net/natsemi.c index 0a3e60418e53..c329a4f5840c 100644 --- a/trunk/drivers/net/natsemi.c +++ b/trunk/drivers/net/natsemi.c @@ -203,8 +203,22 @@ skbuff at an offset of "+2", 16-byte aligning the IP header. IIId. Synchronization Most operations are synchronized on the np->lock irq spinlock, except the -recieve and transmit paths which are synchronised using a combination of -hardware descriptor ownership, disabling interrupts and NAPI poll scheduling. +performance critical codepaths: + +The rx process only runs in the interrupt handler. Access from outside +the interrupt handler is only permitted after disable_irq(). + +The rx process usually runs under the netif_tx_lock. If np->intr_tx_reap +is set, then access is permitted under spin_lock_irq(&np->lock). + +Thus configuration functions that want to access everything must call + disable_irq(dev->irq); + netif_tx_lock_bh(dev); + spin_lock_irq(&np->lock); + +IV. Notes + +NatSemi PCI network controllers are very uncommon. IVb. References diff --git a/trunk/drivers/net/pasemi_mac.c b/trunk/drivers/net/pasemi_mac.c index 2e39e0285d8f..bb88a41b7591 100644 --- a/trunk/drivers/net/pasemi_mac.c +++ b/trunk/drivers/net/pasemi_mac.c @@ -62,10 +62,6 @@ #define LRO_MAX_AGGR 64 -#define PE_MIN_MTU 64 -#define PE_MAX_MTU 1500 -#define PE_DEF_MTU ETH_DATA_LEN - #define DEFAULT_MSG_ENABLE \ (NETIF_MSG_DRV | \ NETIF_MSG_PROBE | \ @@ -86,6 +82,8 @@ & ((ring)->size - 1)) #define RING_AVAIL(ring) ((ring->size) - RING_USED(ring)) +#define BUF_SIZE 1646 /* 1500 MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */ + MODULE_LICENSE("GPL"); MODULE_AUTHOR ("Olof Johansson "); MODULE_DESCRIPTION("PA Semi PWRficient Ethernet driver"); @@ -177,24 +175,6 @@ static int mac_to_intf(struct pasemi_mac *mac) return -1; } -static void pasemi_mac_intf_disable(struct pasemi_mac *mac) -{ - unsigned int flags; - - flags = read_mac_reg(mac, PAS_MAC_CFG_PCFG); - flags &= ~PAS_MAC_CFG_PCFG_PE; - write_mac_reg(mac, PAS_MAC_CFG_PCFG, flags); -} - -static void pasemi_mac_intf_enable(struct pasemi_mac *mac) -{ - unsigned int flags; - - flags = read_mac_reg(mac, PAS_MAC_CFG_PCFG); - flags |= PAS_MAC_CFG_PCFG_PE; - write_mac_reg(mac, PAS_MAC_CFG_PCFG, flags); -} - static int pasemi_get_mac_addr(struct pasemi_mac *mac) { struct pci_dev *pdev = mac->pdev; @@ -241,33 +221,6 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac) return 0; } -static int pasemi_mac_set_mac_addr(struct net_device *dev, void *p) -{ - struct pasemi_mac *mac = netdev_priv(dev); - struct sockaddr *addr = p; - unsigned int adr0, adr1; - - if (!is_valid_ether_addr(addr->sa_data)) - return -EINVAL; - - memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); - - adr0 = dev->dev_addr[2] << 24 | - dev->dev_addr[3] << 16 | - dev->dev_addr[4] << 8 | - dev->dev_addr[5]; - adr1 = read_mac_reg(mac, PAS_MAC_CFG_ADR1); - adr1 &= ~0xffff; - adr1 |= dev->dev_addr[0] << 8 | dev->dev_addr[1]; - - pasemi_mac_intf_disable(mac); - write_mac_reg(mac, PAS_MAC_CFG_ADR0, adr0); - write_mac_reg(mac, PAS_MAC_CFG_ADR1, adr1); - pasemi_mac_intf_enable(mac); - - return 0; -} - static int get_skb_hdr(struct sk_buff *skb, void **iphdr, void **tcph, u64 *hdr_flags, void *data) { @@ -500,7 +453,7 @@ static void pasemi_mac_free_tx_resources(struct pasemi_mac *mac) } -static void pasemi_mac_free_rx_buffers(struct pasemi_mac *mac) +static void pasemi_mac_free_rx_resources(struct pasemi_mac *mac) { struct pasemi_mac_rxring *rx = rx_ring(mac); unsigned int i; @@ -520,12 +473,7 @@ static void pasemi_mac_free_rx_buffers(struct pasemi_mac *mac) } for (i = 0; i < RX_RING_SIZE; i++) - RX_BUFF(rx, i) = 0; -} - -static void pasemi_mac_free_rx_resources(struct pasemi_mac *mac) -{ - pasemi_mac_free_rx_buffers(mac); + RX_DESC(rx, i) = 0; dma_free_coherent(&mac->dma_pdev->dev, RX_RING_SIZE * sizeof(u64), rx_ring(mac)->buffers, rx_ring(mac)->buf_dma); @@ -555,14 +503,14 @@ static void pasemi_mac_replenish_rx_ring(const struct net_device *dev, /* Entry in use? */ WARN_ON(*buff); - skb = dev_alloc_skb(mac->bufsz); + skb = dev_alloc_skb(BUF_SIZE); skb_reserve(skb, LOCAL_SKB_ALIGN); if (unlikely(!skb)) break; dma = pci_map_single(mac->dma_pdev, skb->data, - mac->bufsz - LOCAL_SKB_ALIGN, + BUF_SIZE - LOCAL_SKB_ALIGN, PCI_DMA_FROMDEVICE); if (unlikely(dma_mapping_error(dma))) { @@ -572,7 +520,7 @@ static void pasemi_mac_replenish_rx_ring(const struct net_device *dev, info->skb = skb; info->dma = dma; - *buff = XCT_RXB_LEN(mac->bufsz) | XCT_RXB_ADDR(dma); + *buff = XCT_RXB_LEN(BUF_SIZE) | XCT_RXB_ADDR(dma); fill++; } @@ -702,7 +650,7 @@ static int pasemi_mac_clean_rx(struct pasemi_mac_rxring *rx, len = (macrx & XCT_MACRX_LLEN_M) >> XCT_MACRX_LLEN_S; - pci_unmap_single(pdev, dma, mac->bufsz - LOCAL_SKB_ALIGN, + pci_unmap_single(pdev, dma, BUF_SIZE-LOCAL_SKB_ALIGN, PCI_DMA_FROMDEVICE); if (macrx & XCT_MACRX_CRC) { @@ -926,6 +874,24 @@ static irqreturn_t pasemi_mac_tx_intr(int irq, void *data) return IRQ_HANDLED; } +static void pasemi_mac_intf_disable(struct pasemi_mac *mac) +{ + unsigned int flags; + + flags = read_mac_reg(mac, PAS_MAC_CFG_PCFG); + flags &= ~PAS_MAC_CFG_PCFG_PE; + write_mac_reg(mac, PAS_MAC_CFG_PCFG, flags); +} + +static void pasemi_mac_intf_enable(struct pasemi_mac *mac) +{ + unsigned int flags; + + flags = read_mac_reg(mac, PAS_MAC_CFG_PCFG); + flags |= PAS_MAC_CFG_PCFG_PE; + write_mac_reg(mac, PAS_MAC_CFG_PCFG, flags); +} + static void pasemi_adjust_link(struct net_device *dev) { struct pasemi_mac *mac = netdev_priv(dev); @@ -1182,71 +1148,11 @@ static int pasemi_mac_open(struct net_device *dev) #define MAX_RETRIES 5000 -static void pasemi_mac_pause_txchan(struct pasemi_mac *mac) -{ - unsigned int sta, retries; - int txch = tx_ring(mac)->chan.chno; - - write_dma_reg(PAS_DMA_TXCHAN_TCMDSTA(txch), - PAS_DMA_TXCHAN_TCMDSTA_ST); - - for (retries = 0; retries < MAX_RETRIES; retries++) { - sta = read_dma_reg(PAS_DMA_TXCHAN_TCMDSTA(txch)); - if (!(sta & PAS_DMA_TXCHAN_TCMDSTA_ACT)) - break; - cond_resched(); - } - - if (sta & PAS_DMA_TXCHAN_TCMDSTA_ACT) - dev_err(&mac->dma_pdev->dev, - "Failed to stop tx channel, tcmdsta %08x\n", sta); - - write_dma_reg(PAS_DMA_TXCHAN_TCMDSTA(txch), 0); -} - -static void pasemi_mac_pause_rxchan(struct pasemi_mac *mac) -{ - unsigned int sta, retries; - int rxch = rx_ring(mac)->chan.chno; - - write_dma_reg(PAS_DMA_RXCHAN_CCMDSTA(rxch), - PAS_DMA_RXCHAN_CCMDSTA_ST); - for (retries = 0; retries < MAX_RETRIES; retries++) { - sta = read_dma_reg(PAS_DMA_RXCHAN_CCMDSTA(rxch)); - if (!(sta & PAS_DMA_RXCHAN_CCMDSTA_ACT)) - break; - cond_resched(); - } - - if (sta & PAS_DMA_RXCHAN_CCMDSTA_ACT) - dev_err(&mac->dma_pdev->dev, - "Failed to stop rx channel, ccmdsta 08%x\n", sta); - write_dma_reg(PAS_DMA_RXCHAN_CCMDSTA(rxch), 0); -} - -static void pasemi_mac_pause_rxint(struct pasemi_mac *mac) -{ - unsigned int sta, retries; - - write_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if), - PAS_DMA_RXINT_RCMDSTA_ST); - for (retries = 0; retries < MAX_RETRIES; retries++) { - sta = read_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if)); - if (!(sta & PAS_DMA_RXINT_RCMDSTA_ACT)) - break; - cond_resched(); - } - - if (sta & PAS_DMA_RXINT_RCMDSTA_ACT) - dev_err(&mac->dma_pdev->dev, - "Failed to stop rx interface, rcmdsta %08x\n", sta); - write_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if), 0); -} - static int pasemi_mac_close(struct net_device *dev) { struct pasemi_mac *mac = netdev_priv(dev); unsigned int sta; + int retries; int rxch, txch; rxch = rx_ring(mac)->chan.chno; @@ -1284,10 +1190,51 @@ static int pasemi_mac_close(struct net_device *dev) pasemi_mac_clean_tx(tx_ring(mac)); pasemi_mac_clean_rx(rx_ring(mac), RX_RING_SIZE); - pasemi_mac_pause_txchan(mac); - pasemi_mac_pause_rxint(mac); - pasemi_mac_pause_rxchan(mac); - pasemi_mac_intf_disable(mac); + /* Disable interface */ + write_dma_reg(PAS_DMA_TXCHAN_TCMDSTA(txch), + PAS_DMA_TXCHAN_TCMDSTA_ST); + write_dma_reg( PAS_DMA_RXINT_RCMDSTA(mac->dma_if), + PAS_DMA_RXINT_RCMDSTA_ST); + write_dma_reg(PAS_DMA_RXCHAN_CCMDSTA(rxch), + PAS_DMA_RXCHAN_CCMDSTA_ST); + + for (retries = 0; retries < MAX_RETRIES; retries++) { + sta = read_dma_reg(PAS_DMA_TXCHAN_TCMDSTA(rxch)); + if (!(sta & PAS_DMA_TXCHAN_TCMDSTA_ACT)) + break; + cond_resched(); + } + + if (sta & PAS_DMA_TXCHAN_TCMDSTA_ACT) + dev_err(&mac->dma_pdev->dev, "Failed to stop tx channel\n"); + + for (retries = 0; retries < MAX_RETRIES; retries++) { + sta = read_dma_reg(PAS_DMA_RXCHAN_CCMDSTA(rxch)); + if (!(sta & PAS_DMA_RXCHAN_CCMDSTA_ACT)) + break; + cond_resched(); + } + + if (sta & PAS_DMA_RXCHAN_CCMDSTA_ACT) + dev_err(&mac->dma_pdev->dev, "Failed to stop rx channel\n"); + + for (retries = 0; retries < MAX_RETRIES; retries++) { + sta = read_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if)); + if (!(sta & PAS_DMA_RXINT_RCMDSTA_ACT)) + break; + cond_resched(); + } + + if (sta & PAS_DMA_RXINT_RCMDSTA_ACT) + dev_err(&mac->dma_pdev->dev, "Failed to stop rx interface\n"); + + /* Then, disable the channel. This must be done separately from + * stopping, since you can't disable when active. + */ + + write_dma_reg(PAS_DMA_TXCHAN_TCMDSTA(txch), 0); + write_dma_reg(PAS_DMA_RXCHAN_CCMDSTA(rxch), 0); + write_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if), 0); free_irq(mac->tx->chan.irq, mac->tx); free_irq(mac->rx->chan.irq, mac->rx); @@ -1441,62 +1388,6 @@ static int pasemi_mac_poll(struct napi_struct *napi, int budget) return pkts; } -static int pasemi_mac_change_mtu(struct net_device *dev, int new_mtu) -{ - struct pasemi_mac *mac = netdev_priv(dev); - unsigned int reg; - unsigned int rcmdsta; - int running; - - if (new_mtu < PE_MIN_MTU || new_mtu > PE_MAX_MTU) - return -EINVAL; - - running = netif_running(dev); - - if (running) { - /* Need to stop the interface, clean out all already - * received buffers, free all unused buffers on the RX - * interface ring, then finally re-fill the rx ring with - * the new-size buffers and restart. - */ - - napi_disable(&mac->napi); - netif_tx_disable(dev); - pasemi_mac_intf_disable(mac); - - rcmdsta = read_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if)); - pasemi_mac_pause_rxint(mac); - pasemi_mac_clean_rx(rx_ring(mac), RX_RING_SIZE); - pasemi_mac_free_rx_buffers(mac); - } - - /* Change maxf, i.e. what size frames are accepted. - * Need room for ethernet header and CRC word - */ - reg = read_mac_reg(mac, PAS_MAC_CFG_MACCFG); - reg &= ~PAS_MAC_CFG_MACCFG_MAXF_M; - reg |= PAS_MAC_CFG_MACCFG_MAXF(new_mtu + ETH_HLEN + 4); - write_mac_reg(mac, PAS_MAC_CFG_MACCFG, reg); - - dev->mtu = new_mtu; - /* MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */ - mac->bufsz = new_mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128; - - if (running) { - write_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if), - rcmdsta | PAS_DMA_RXINT_RCMDSTA_EN); - - rx_ring(mac)->next_to_fill = 0; - pasemi_mac_replenish_rx_ring(dev, RX_RING_SIZE-1); - - napi_enable(&mac->napi); - netif_start_queue(dev); - pasemi_mac_intf_enable(mac); - } - - return 0; -} - static int __devinit pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -1584,12 +1475,6 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) dev->stop = pasemi_mac_close; dev->hard_start_xmit = pasemi_mac_start_tx; dev->set_multicast_list = pasemi_mac_set_rx_mode; - dev->set_mac_address = pasemi_mac_set_mac_addr; - dev->mtu = PE_DEF_MTU; - /* 1500 MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */ - mac->bufsz = dev->mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128; - - dev->change_mtu = pasemi_mac_change_mtu; if (err) goto out; diff --git a/trunk/drivers/net/pasemi_mac.h b/trunk/drivers/net/pasemi_mac.h index 99e7b9329a6f..8bee2a664c83 100644 --- a/trunk/drivers/net/pasemi_mac.h +++ b/trunk/drivers/net/pasemi_mac.h @@ -59,7 +59,6 @@ struct pasemi_mac { struct phy_device *phydev; struct napi_struct napi; - int bufsz; /* RX ring buffer size */ u8 type; #define MAC_TYPE_GMAC 1 #define MAC_TYPE_XAUI 2 @@ -97,9 +96,6 @@ struct pasemi_mac_buffer { /* MAC CFG register offsets */ enum { PAS_MAC_CFG_PCFG = 0x80, - PAS_MAC_CFG_MACCFG = 0x84, - PAS_MAC_CFG_ADR0 = 0x8c, - PAS_MAC_CFG_ADR1 = 0x90, PAS_MAC_CFG_TXP = 0x98, PAS_MAC_IPC_CHNL = 0x208, }; @@ -134,18 +130,6 @@ enum { #define PAS_MAC_CFG_PCFG_SPD_100M 0x00000001 #define PAS_MAC_CFG_PCFG_SPD_1G 0x00000002 #define PAS_MAC_CFG_PCFG_SPD_10G 0x00000003 - -#define PAS_MAC_CFG_MACCFG_TXT_M 0x70000000 -#define PAS_MAC_CFG_MACCFG_TXT_S 28 -#define PAS_MAC_CFG_MACCFG_PRES_M 0x0f000000 -#define PAS_MAC_CFG_MACCFG_PRES_S 24 -#define PAS_MAC_CFG_MACCFG_MAXF_M 0x00ffff00 -#define PAS_MAC_CFG_MACCFG_MAXF_S 8 -#define PAS_MAC_CFG_MACCFG_MAXF(x) (((x) << PAS_MAC_CFG_MACCFG_MAXF_S) & \ - PAS_MAC_CFG_MACCFG_MAXF_M) -#define PAS_MAC_CFG_MACCFG_MINF_M 0x000000ff -#define PAS_MAC_CFG_MACCFG_MINF_S 0 - #define PAS_MAC_CFG_TXP_FCF 0x01000000 #define PAS_MAC_CFG_TXP_FCE 0x00800000 #define PAS_MAC_CFG_TXP_FC 0x00400000 diff --git a/trunk/drivers/net/pci-skeleton.c b/trunk/drivers/net/pci-skeleton.c index fffc49befe04..ed402e00e730 100644 --- a/trunk/drivers/net/pci-skeleton.c +++ b/trunk/drivers/net/pci-skeleton.c @@ -541,7 +541,7 @@ static void netdrv_hw_start (struct net_device *dev); #define NETDRV_W32_F(reg, val32) do { writel ((val32), ioaddr + (reg)); readl (ioaddr + (reg)); } while (0) -#ifdef MMIO_FLUSH_AUDIT_COMPLETE +#if MMIO_FLUSH_AUDIT_COMPLETE /* write MMIO register */ #define NETDRV_W8(reg, val8) writeb ((val8), ioaddr + (reg)) @@ -603,7 +603,7 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev, return -ENOMEM; } SET_NETDEV_DEV(dev, &pdev->dev); - tp = netdev_priv(dev); + tp = dev->priv; /* enable device (incl. PCI PM wakeup), and bus-mastering */ rc = pci_enable_device (pdev); @@ -759,7 +759,7 @@ static int __devinit netdrv_init_one (struct pci_dev *pdev, return i; } - tp = netdev_priv(dev); + tp = dev->priv; assert (ioaddr != NULL); assert (dev != NULL); @@ -783,7 +783,7 @@ static int __devinit netdrv_init_one (struct pci_dev *pdev, dev->base_addr = (unsigned long) ioaddr; /* dev->priv/tp zeroed and aligned in alloc_etherdev */ - tp = netdev_priv(dev); + tp = dev->priv; /* note: tp->chipset set in netdrv_init_board */ tp->drv_flags = PCI_COMMAND_IO | PCI_COMMAND_MEMORY | @@ -841,7 +841,7 @@ static void __devexit netdrv_remove_one (struct pci_dev *pdev) assert (dev != NULL); - np = netdev_priv(dev); + np = dev->priv; assert (np != NULL); unregister_netdev (dev); @@ -974,7 +974,7 @@ static void mdio_sync (void *mdio_addr) static int mdio_read (struct net_device *dev, int phy_id, int location) { - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; void *mdio_addr = tp->mmio_addr + Config4; int mii_cmd = (0xf6 << 10) | (phy_id << 5) | location; int retval = 0; @@ -1017,7 +1017,7 @@ static int mdio_read (struct net_device *dev, int phy_id, int location) static void mdio_write (struct net_device *dev, int phy_id, int location, int value) { - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; void *mdio_addr = tp->mmio_addr + Config4; int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location << 18) | value; @@ -1060,7 +1060,7 @@ static void mdio_write (struct net_device *dev, int phy_id, int location, static int netdrv_open (struct net_device *dev) { - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; int retval; #ifdef NETDRV_DEBUG void *ioaddr = tp->mmio_addr; @@ -1121,7 +1121,7 @@ static int netdrv_open (struct net_device *dev) /* Start the hardware at open or resume. */ static void netdrv_hw_start (struct net_device *dev) { - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; void *ioaddr = tp->mmio_addr; u32 i; @@ -1191,7 +1191,7 @@ static void netdrv_hw_start (struct net_device *dev) /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ static void netdrv_init_ring (struct net_device *dev) { - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; int i; DPRINTK ("ENTER\n"); @@ -1213,7 +1213,7 @@ static void netdrv_init_ring (struct net_device *dev) static void netdrv_timer (unsigned long data) { struct net_device *dev = (struct net_device *) data; - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; void *ioaddr = tp->mmio_addr; int next_tick = 60 * HZ; int mii_lpa; @@ -1252,10 +1252,9 @@ static void netdrv_timer (unsigned long data) } -static void netdrv_tx_clear (struct net_device *dev) +static void netdrv_tx_clear (struct netdrv_private *tp) { int i; - struct netdrv_private *tp = netdev_priv(dev); atomic_set (&tp->cur_tx, 0); atomic_set (&tp->dirty_tx, 0); @@ -1279,7 +1278,7 @@ static void netdrv_tx_clear (struct net_device *dev) static void netdrv_tx_timeout (struct net_device *dev) { - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; void *ioaddr = tp->mmio_addr; int i; u8 tmp8; @@ -1312,7 +1311,7 @@ static void netdrv_tx_timeout (struct net_device *dev) /* Stop a shared interrupt from scavenging while we are. */ spin_lock_irqsave (&tp->lock, flags); - netdrv_tx_clear (dev); + netdrv_tx_clear (tp); spin_unlock_irqrestore (&tp->lock, flags); @@ -1326,7 +1325,7 @@ static void netdrv_tx_timeout (struct net_device *dev) static int netdrv_start_xmit (struct sk_buff *skb, struct net_device *dev) { - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; void *ioaddr = tp->mmio_addr; int entry; @@ -1526,7 +1525,7 @@ static void netdrv_rx_interrupt (struct net_device *dev, DPRINTK ("%s: netdrv_rx() status %4.4x, size %4.4x," " cur %4.4x.\n", dev->name, rx_status, rx_size, cur_rx); -#if defined(NETDRV_DEBUG) && (NETDRV_DEBUG > 2) +#if NETDRV_DEBUG > 2 { int i; DPRINTK ("%s: Frame contents ", dev->name); @@ -1649,7 +1648,7 @@ static void netdrv_weird_interrupt (struct net_device *dev, static irqreturn_t netdrv_interrupt (int irq, void *dev_instance) { struct net_device *dev = (struct net_device *) dev_instance; - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; int boguscnt = max_interrupt_work; void *ioaddr = tp->mmio_addr; int status = 0, link_changed = 0; /* avoid bogus "uninit" warning */ @@ -1712,7 +1711,7 @@ static irqreturn_t netdrv_interrupt (int irq, void *dev_instance) static int netdrv_close (struct net_device *dev) { - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; void *ioaddr = tp->mmio_addr; unsigned long flags; @@ -1739,10 +1738,10 @@ static int netdrv_close (struct net_device *dev) spin_unlock_irqrestore (&tp->lock, flags); - synchronize_irq (dev->irq); + synchronize_irq (); free_irq (dev->irq, dev); - netdrv_tx_clear (dev); + netdrv_tx_clear (tp); pci_free_consistent(tp->pci_dev, RX_BUF_TOT_LEN, tp->rx_ring, tp->rx_ring_dma); @@ -1763,7 +1762,7 @@ static int netdrv_close (struct net_device *dev) static int netdrv_ioctl (struct net_device *dev, struct ifreq *rq, int cmd) { - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; struct mii_ioctl_data *data = if_mii(rq); unsigned long flags; int rc = 0; @@ -1806,7 +1805,7 @@ static int netdrv_ioctl (struct net_device *dev, struct ifreq *rq, int cmd) static void netdrv_set_rx_mode (struct net_device *dev) { - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; void *ioaddr = tp->mmio_addr; u32 mc_filter[2]; /* Multicast hash filter */ int i, rx_mode; @@ -1863,7 +1862,7 @@ static void netdrv_set_rx_mode (struct net_device *dev) static int netdrv_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata (pdev); - struct netdrv_private *tp = netdev_priv(dev); + struct netdrv_private *tp = dev->priv; void *ioaddr = tp->mmio_addr; unsigned long flags; @@ -1893,7 +1892,7 @@ static int netdrv_suspend (struct pci_dev *pdev, pm_message_t state) static int netdrv_resume (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata (pdev); - /*struct netdrv_private *tp = netdev_priv(dev);*/ + struct netdrv_private *tp = dev->priv; if (!netif_running(dev)) return 0; diff --git a/trunk/drivers/net/phy/Kconfig b/trunk/drivers/net/phy/Kconfig index f4ca0591231d..7fe03ce774b1 100644 --- a/trunk/drivers/net/phy/Kconfig +++ b/trunk/drivers/net/phy/Kconfig @@ -60,11 +60,6 @@ config ICPLUS_PHY ---help--- Currently supports the IP175C PHY. -config REALTEK_PHY - tristate "Drivers for Realtek PHYs" - ---help--- - Supports the Realtek 821x PHY. - config FIXED_PHY bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" ---help--- diff --git a/trunk/drivers/net/phy/Makefile b/trunk/drivers/net/phy/Makefile index 5997d6ef702b..3d6cc7b67a80 100644 --- a/trunk/drivers/net/phy/Makefile +++ b/trunk/drivers/net/phy/Makefile @@ -12,6 +12,5 @@ obj-$(CONFIG_SMSC_PHY) += smsc.o obj-$(CONFIG_VITESSE_PHY) += vitesse.o obj-$(CONFIG_BROADCOM_PHY) += broadcom.o obj-$(CONFIG_ICPLUS_PHY) += icplus.o -obj-$(CONFIG_REALTEK_PHY) += realtek.o obj-$(CONFIG_FIXED_PHY) += fixed.o obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o diff --git a/trunk/drivers/net/phy/broadcom.c b/trunk/drivers/net/phy/broadcom.c index 5b80358af658..29666c85ed55 100644 --- a/trunk/drivers/net/phy/broadcom.c +++ b/trunk/drivers/net/phy/broadcom.c @@ -141,20 +141,6 @@ static struct phy_driver bcm5461_driver = { .driver = { .owner = THIS_MODULE }, }; -static struct phy_driver bcm5482_driver = { - .phy_id = 0x0143bcb0, - .phy_id_mask = 0xfffffff0, - .name = "Broadcom BCM5482", - .features = PHY_GBIT_FEATURES, - .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, - .config_init = bcm54xx_config_init, - .config_aneg = genphy_config_aneg, - .read_status = genphy_read_status, - .ack_interrupt = bcm54xx_ack_interrupt, - .config_intr = bcm54xx_config_intr, - .driver = { .owner = THIS_MODULE }, -}; - static int __init broadcom_init(void) { int ret; @@ -168,13 +154,8 @@ static int __init broadcom_init(void) ret = phy_driver_register(&bcm5461_driver); if (ret) goto out_5461; - ret = phy_driver_register(&bcm5482_driver); - if (ret) - goto out_5482; return ret; -out_5482: - phy_driver_unregister(&bcm5461_driver); out_5461: phy_driver_unregister(&bcm5421_driver); out_5421: @@ -185,7 +166,6 @@ static int __init broadcom_init(void) static void __exit broadcom_exit(void) { - phy_driver_unregister(&bcm5482_driver); phy_driver_unregister(&bcm5461_driver); phy_driver_unregister(&bcm5421_driver); phy_driver_unregister(&bcm5411_driver); diff --git a/trunk/drivers/net/phy/mdio_bus.c b/trunk/drivers/net/phy/mdio_bus.c index 6e9f619c491f..c30196d0ad16 100644 --- a/trunk/drivers/net/phy/mdio_bus.c +++ b/trunk/drivers/net/phy/mdio_bus.c @@ -49,7 +49,7 @@ int mdiobus_register(struct mii_bus *bus) int i; int err = 0; - mutex_init(&bus->mdio_lock); + spin_lock_init(&bus->mdio_lock); if (NULL == bus || NULL == bus->name || NULL == bus->read || diff --git a/trunk/drivers/net/phy/phy.c b/trunk/drivers/net/phy/phy.c index 12fccb1c76dc..7c9e6e349503 100644 --- a/trunk/drivers/net/phy/phy.c +++ b/trunk/drivers/net/phy/phy.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -71,11 +72,9 @@ int phy_read(struct phy_device *phydev, u16 regnum) int retval; struct mii_bus *bus = phydev->bus; - BUG_ON(in_interrupt()); - - mutex_lock(&bus->mdio_lock); + spin_lock_bh(&bus->mdio_lock); retval = bus->read(bus, phydev->addr, regnum); - mutex_unlock(&bus->mdio_lock); + spin_unlock_bh(&bus->mdio_lock); return retval; } @@ -96,11 +95,9 @@ int phy_write(struct phy_device *phydev, u16 regnum, u16 val) int err; struct mii_bus *bus = phydev->bus; - BUG_ON(in_interrupt()); - - mutex_lock(&bus->mdio_lock); + spin_lock_bh(&bus->mdio_lock); err = bus->write(bus, phydev->addr, regnum, val); - mutex_unlock(&bus->mdio_lock); + spin_unlock_bh(&bus->mdio_lock); return err; } @@ -431,7 +428,7 @@ int phy_start_aneg(struct phy_device *phydev) { int err; - mutex_lock(&phydev->lock); + spin_lock_bh(&phydev->lock); if (AUTONEG_DISABLE == phydev->autoneg) phy_sanitize_settings(phydev); @@ -452,14 +449,13 @@ int phy_start_aneg(struct phy_device *phydev) } out_unlock: - mutex_unlock(&phydev->lock); + spin_unlock_bh(&phydev->lock); return err; } EXPORT_SYMBOL(phy_start_aneg); static void phy_change(struct work_struct *work); -static void phy_state_machine(struct work_struct *work); static void phy_timer(unsigned long data); /** @@ -480,7 +476,6 @@ void phy_start_machine(struct phy_device *phydev, { phydev->adjust_state = handler; - INIT_WORK(&phydev->state_queue, phy_state_machine); init_timer(&phydev->phy_timer); phydev->phy_timer.function = &phy_timer; phydev->phy_timer.data = (unsigned long) phydev; @@ -498,12 +493,11 @@ void phy_start_machine(struct phy_device *phydev, void phy_stop_machine(struct phy_device *phydev) { del_timer_sync(&phydev->phy_timer); - cancel_work_sync(&phydev->state_queue); - mutex_lock(&phydev->lock); + spin_lock_bh(&phydev->lock); if (phydev->state > PHY_UP) phydev->state = PHY_UP; - mutex_unlock(&phydev->lock); + spin_unlock_bh(&phydev->lock); phydev->adjust_state = NULL; } @@ -547,9 +541,9 @@ static void phy_force_reduction(struct phy_device *phydev) */ void phy_error(struct phy_device *phydev) { - mutex_lock(&phydev->lock); + spin_lock_bh(&phydev->lock); phydev->state = PHY_HALTED; - mutex_unlock(&phydev->lock); + spin_unlock_bh(&phydev->lock); } /** @@ -711,10 +705,10 @@ static void phy_change(struct work_struct *work) if (err) goto phy_err; - mutex_lock(&phydev->lock); + spin_lock_bh(&phydev->lock); if ((PHY_RUNNING == phydev->state) || (PHY_NOLINK == phydev->state)) phydev->state = PHY_CHANGELINK; - mutex_unlock(&phydev->lock); + spin_unlock_bh(&phydev->lock); atomic_dec(&phydev->irq_disable); enable_irq(phydev->irq); @@ -741,7 +735,7 @@ static void phy_change(struct work_struct *work) */ void phy_stop(struct phy_device *phydev) { - mutex_lock(&phydev->lock); + spin_lock_bh(&phydev->lock); if (PHY_HALTED == phydev->state) goto out_unlock; @@ -757,7 +751,7 @@ void phy_stop(struct phy_device *phydev) phydev->state = PHY_HALTED; out_unlock: - mutex_unlock(&phydev->lock); + spin_unlock_bh(&phydev->lock); /* * Cannot call flush_scheduled_work() here as desired because @@ -779,7 +773,7 @@ void phy_stop(struct phy_device *phydev) */ void phy_start(struct phy_device *phydev) { - mutex_lock(&phydev->lock); + spin_lock_bh(&phydev->lock); switch (phydev->state) { case PHY_STARTING: @@ -793,26 +787,19 @@ void phy_start(struct phy_device *phydev) default: break; } - mutex_unlock(&phydev->lock); + spin_unlock_bh(&phydev->lock); } EXPORT_SYMBOL(phy_stop); EXPORT_SYMBOL(phy_start); -/** - * phy_state_machine - Handle the state machine - * @work: work_struct that describes the work to be done - * - * Description: Scheduled by the state_queue workqueue each time - * phy_timer is triggered. - */ -static void phy_state_machine(struct work_struct *work) +/* PHY timer which handles the state machine */ +static void phy_timer(unsigned long data) { - struct phy_device *phydev = - container_of(work, struct phy_device, state_queue); + struct phy_device *phydev = (struct phy_device *)data; int needs_aneg = 0; int err = 0; - mutex_lock(&phydev->lock); + spin_lock_bh(&phydev->lock); if (phydev->adjust_state) phydev->adjust_state(phydev->attached_dev); @@ -978,7 +965,7 @@ static void phy_state_machine(struct work_struct *work) break; } - mutex_unlock(&phydev->lock); + spin_unlock_bh(&phydev->lock); if (needs_aneg) err = phy_start_aneg(phydev); @@ -989,14 +976,3 @@ static void phy_state_machine(struct work_struct *work) mod_timer(&phydev->phy_timer, jiffies + PHY_STATE_TIME * HZ); } -/* PHY timer which schedules the state machine work */ -static void phy_timer(unsigned long data) -{ - struct phy_device *phydev = (struct phy_device *)data; - - /* - * PHY I/O operations can potentially sleep so we ensure that - * it's done from a process context - */ - schedule_work(&phydev->state_queue); -} diff --git a/trunk/drivers/net/phy/phy_device.c b/trunk/drivers/net/phy/phy_device.c index f4c4fd85425f..5b9e1751e1b4 100644 --- a/trunk/drivers/net/phy/phy_device.c +++ b/trunk/drivers/net/phy/phy_device.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -79,7 +80,7 @@ struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id) dev->state = PHY_DOWN; - mutex_init(&dev->lock); + spin_lock_init(&dev->lock); return dev; } @@ -655,7 +656,7 @@ static int phy_probe(struct device *dev) if (!(phydrv->flags & PHY_HAS_INTERRUPT)) phydev->irq = PHY_POLL; - mutex_lock(&phydev->lock); + spin_lock_bh(&phydev->lock); /* Start out supporting everything. Eventually, * a controller will attach, and may modify one @@ -669,7 +670,7 @@ static int phy_probe(struct device *dev) if (phydev->drv->probe) err = phydev->drv->probe(phydev); - mutex_unlock(&phydev->lock); + spin_unlock_bh(&phydev->lock); return err; @@ -681,9 +682,9 @@ static int phy_remove(struct device *dev) phydev = to_phy_device(dev); - mutex_lock(&phydev->lock); + spin_lock_bh(&phydev->lock); phydev->state = PHY_DOWN; - mutex_unlock(&phydev->lock); + spin_unlock_bh(&phydev->lock); if (phydev->drv->remove) phydev->drv->remove(phydev); diff --git a/trunk/drivers/net/phy/realtek.c b/trunk/drivers/net/phy/realtek.c deleted file mode 100644 index a052a6744a51..000000000000 --- a/trunk/drivers/net/phy/realtek.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * drivers/net/phy/realtek.c - * - * Driver for Realtek PHYs - * - * Author: Johnson Leung - * - * Copyright (c) 2004 Freescale Semiconductor, Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - */ -#include - -#define RTL821x_PHYSR 0x11 -#define RTL821x_PHYSR_DUPLEX 0x2000 -#define RTL821x_PHYSR_SPEED 0xc000 -#define RTL821x_INER 0x12 -#define RTL821x_INER_INIT 0x6400 -#define RTL821x_INSR 0x13 - -MODULE_DESCRIPTION("Realtek PHY driver"); -MODULE_AUTHOR("Johnson Leung"); -MODULE_LICENSE("GPL"); - -static int rtl821x_ack_interrupt(struct phy_device *phydev) -{ - int err; - - err = phy_read(phydev, RTL821x_INSR); - - return (err < 0) ? err : 0; -} - -static int rtl821x_config_intr(struct phy_device *phydev) -{ - int err; - - if (phydev->interrupts == PHY_INTERRUPT_ENABLED) - err = phy_write(phydev, RTL821x_INER, - RTL821x_INER_INIT); - else - err = phy_write(phydev, RTL821x_INER, 0); - - return err; -} - -/* RTL8211B */ -static struct phy_driver rtl821x_driver = { - .phy_id = 0x001cc912, - .name = "RTL821x Gigabit Ethernet", - .phy_id_mask = 0x001fffff, - .features = PHY_GBIT_FEATURES, - .flags = PHY_HAS_INTERRUPT, - .config_aneg = &genphy_config_aneg, - .read_status = &genphy_read_status, - .ack_interrupt = &rtl821x_ack_interrupt, - .config_intr = &rtl821x_config_intr, - .driver = { .owner = THIS_MODULE,}, -}; - -static int __init realtek_init(void) -{ - int ret; - - ret = phy_driver_register(&rtl821x_driver); - - return ret; -} - -static void __exit realtek_exit(void) -{ - phy_driver_unregister(&rtl821x_driver); -} - -module_init(realtek_init); -module_exit(realtek_exit); diff --git a/trunk/drivers/net/s2io.c b/trunk/drivers/net/s2io.c index 6179a0a2032c..5fab7d7b5d74 100644 --- a/trunk/drivers/net/s2io.c +++ b/trunk/drivers/net/s2io.c @@ -8118,7 +8118,7 @@ static void initiate_new_session(struct lro *lro, u8 *l2h, lro->iph = ip; lro->tcph = tcp; lro->tcp_next_seq = tcp_pyld_len + ntohl(tcp->seq); - lro->tcp_ack = tcp->ack_seq; + lro->tcp_ack = ntohl(tcp->ack_seq); lro->sg_num = 1; lro->total_len = ntohs(ip->tot_len); lro->frags_len = 0; @@ -8127,10 +8127,10 @@ static void initiate_new_session(struct lro *lro, u8 *l2h, * already been done. */ if (tcp->doff == 8) { - __be32 *ptr; - ptr = (__be32 *)(tcp+1); + u32 *ptr; + ptr = (u32 *)(tcp+1); lro->saw_ts = 1; - lro->cur_tsval = ntohl(*(ptr+1)); + lro->cur_tsval = *(ptr+1); lro->cur_tsecr = *(ptr+2); } lro->in_use = 1; @@ -8156,7 +8156,7 @@ static void update_L3L4_header(struct s2io_nic *sp, struct lro *lro) /* Update tsecr field if this session has timestamps enabled */ if (lro->saw_ts) { - __be32 *ptr = (__be32 *)(tcp + 1); + u32 *ptr = (u32 *)(tcp + 1); *(ptr+2) = lro->cur_tsecr; } @@ -8181,10 +8181,10 @@ static void aggregate_new_rx(struct lro *lro, struct iphdr *ip, lro->window = tcp->window; if (lro->saw_ts) { - __be32 *ptr; + u32 *ptr; /* Update tsecr and tsval from this packet */ - ptr = (__be32 *)(tcp+1); - lro->cur_tsval = ntohl(*(ptr+1)); + ptr = (u32 *) (tcp + 1); + lro->cur_tsval = *(ptr + 1); lro->cur_tsecr = *(ptr + 2); } } @@ -8235,11 +8235,11 @@ static int verify_l3_l4_lro_capable(struct lro *l_lro, struct iphdr *ip, /* Ensure timestamp value increases monotonically */ if (l_lro) - if (l_lro->cur_tsval > ntohl(*((__be32 *)(ptr+2)))) + if (l_lro->cur_tsval > *((u32 *)(ptr+2))) return -1; /* timestamp echo reply should be non-zero */ - if (*((__be32 *)(ptr+6)) == 0) + if (*((u32 *)(ptr+6)) == 0) return -1; } diff --git a/trunk/drivers/net/s2io.h b/trunk/drivers/net/s2io.h index 64b88eb48287..9f6016c6f135 100644 --- a/trunk/drivers/net/s2io.h +++ b/trunk/drivers/net/s2io.h @@ -809,7 +809,7 @@ struct lro { int in_use; __be16 window; u32 cur_tsval; - __be32 cur_tsecr; + u32 cur_tsecr; u8 saw_ts; }; diff --git a/trunk/drivers/net/sis190.c b/trunk/drivers/net/sis190.c index 2e9e88be7b33..b570402f7fed 100644 --- a/trunk/drivers/net/sis190.c +++ b/trunk/drivers/net/sis190.c @@ -326,7 +326,7 @@ static const struct { { "SiS 191 PCI Gigabit Ethernet adapter" }, }; -static struct pci_device_id sis190_pci_tbl[] = { +static struct pci_device_id sis190_pci_tbl[] __devinitdata = { { PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0190), 0, 0, 0 }, { PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0191), 0, 0, 1 }, { 0, }, diff --git a/trunk/drivers/net/skfp/ess.c b/trunk/drivers/net/skfp/ess.c index 889f98724610..62b01328c496 100644 --- a/trunk/drivers/net/skfp/ess.c +++ b/trunk/drivers/net/skfp/ess.c @@ -598,7 +598,7 @@ static void ess_send_alc_req(struct s_smc *smc) req->cmd.sba_cmd = REQUEST_ALLOCATION ; /* - * set the parameter type and parameter length of all used + * set the parameter type and parameter lenght of all used * parameters */ diff --git a/trunk/drivers/net/skfp/fplustm.c b/trunk/drivers/net/skfp/fplustm.c index 76dc8adc9441..a45205da8033 100644 --- a/trunk/drivers/net/skfp/fplustm.c +++ b/trunk/drivers/net/skfp/fplustm.c @@ -398,7 +398,7 @@ static void copy_tx_mac(struct s_smc *smc, u_long td, struct fddi_mac *mac, /* u_long td; transmit descriptor */ /* struct fddi_mac *mac; mac frame pointer */ /* unsigned off; start address within buffer memory */ -/* int len ; length of the frame including the FC */ +/* int len ; lenght of the frame including the FC */ { int i ; u_int *p ; diff --git a/trunk/drivers/net/skfp/hwmtm.c b/trunk/drivers/net/skfp/hwmtm.c index 46e339315656..8a430a366547 100644 --- a/trunk/drivers/net/skfp/hwmtm.c +++ b/trunk/drivers/net/skfp/hwmtm.c @@ -1185,7 +1185,7 @@ void process_receive(struct s_smc *smc) DB_RX("frame length = %d",len,0,4) ; /* - * check the frame_length and all error flags + * check the frame_lenght and all error flags */ if (rfsw & (RX_MSRABT|RX_FS_E|RX_FS_CRC|RX_FS_IMPL)){ if (rfsw & RD_S_MSRABT) { diff --git a/trunk/drivers/net/sky2.c b/trunk/drivers/net/sky2.c index dc062367a1c8..626190eb91e7 100644 --- a/trunk/drivers/net/sky2.c +++ b/trunk/drivers/net/sky2.c @@ -623,7 +623,6 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff) static const u32 phy_power[] = { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD }; static const u32 coma_mode[] = { PCI_Y2_PHY1_COMA, PCI_Y2_PHY2_COMA }; - sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); /* Turn on/off phy power saving */ if (onoff) @@ -635,8 +634,7 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff) reg1 |= coma_mode[port]; sky2_pci_write32(hw, PCI_DEV_REG1, reg1); - sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); - sky2_pci_read32(hw, PCI_DEV_REG1); + reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); udelay(100); } @@ -1424,7 +1422,6 @@ static int sky2_up(struct net_device *dev) imask |= portirq_msk[port]; sky2_write32(hw, B0_IMSK, imask); - sky2_set_multicast(dev); return 0; err_out: @@ -2439,7 +2436,6 @@ static void sky2_hw_intr(struct sky2_hw *hw) if (status & (Y2_IS_MST_ERR | Y2_IS_IRQ_STAT)) { u16 pci_err; - sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); pci_err = sky2_pci_read16(hw, PCI_STATUS); if (net_ratelimit()) dev_err(&pdev->dev, "PCI hardware error (0x%x)\n", @@ -2447,14 +2443,12 @@ static void sky2_hw_intr(struct sky2_hw *hw) sky2_pci_write16(hw, PCI_STATUS, pci_err | PCI_STATUS_ERROR_BITS); - sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); } if (status & Y2_IS_PCI_EXP) { /* PCI-Express uncorrectable Error occurred */ u32 err; - sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, 0xfffffffful); @@ -2462,7 +2456,6 @@ static void sky2_hw_intr(struct sky2_hw *hw) dev_err(&pdev->dev, "PCI Express error (0x%x)\n", err); sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); - sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); } if (status & Y2_HWE_L1_MASK) @@ -2838,7 +2831,6 @@ static void sky2_reset(struct sky2_hw *hw) } sky2_power_on(hw); - sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); for (i = 0; i < hw->ports; i++) { sky2_write8(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_SET); @@ -3562,6 +3554,8 @@ static int sky2_set_ringparam(struct net_device *dev, err = sky2_up(dev); if (err) dev_close(dev); + else + sky2_set_multicast(dev); } return err; @@ -4395,6 +4389,8 @@ static int sky2_resume(struct pci_dev *pdev) dev_close(dev); goto out; } + + sky2_set_multicast(dev); } } diff --git a/trunk/drivers/net/sunbmac.c b/trunk/drivers/net/sunbmac.c index 0e4a88d16327..fe3ac6f9ae89 100644 --- a/trunk/drivers/net/sunbmac.c +++ b/trunk/drivers/net/sunbmac.c @@ -1075,7 +1075,7 @@ static const struct ethtool_ops bigmac_ethtool_ops = { .get_link = bigmac_get_link, }; -static int __devinit bigmac_ether_init(struct sbus_dev *qec_sdev) +static int __init bigmac_ether_init(struct sbus_dev *qec_sdev) { struct net_device *dev; static int version_printed; diff --git a/trunk/drivers/net/sunqe.c b/trunk/drivers/net/sunqe.c index e811331d4608..ff23c6489efd 100644 --- a/trunk/drivers/net/sunqe.c +++ b/trunk/drivers/net/sunqe.c @@ -747,7 +747,7 @@ static inline void qec_init_once(struct sunqec *qecp, struct sbus_dev *qsdev) qecp->gregs + GLOB_RSIZE); } -static u8 __devinit qec_get_burst(struct device_node *dp) +static u8 __init qec_get_burst(struct device_node *dp) { u8 bsizes, bsizes_more; @@ -767,7 +767,7 @@ static u8 __devinit qec_get_burst(struct device_node *dp) return bsizes; } -static struct sunqec * __devinit get_qec(struct sbus_dev *child_sdev) +static struct sunqec * __init get_qec(struct sbus_dev *child_sdev) { struct sbus_dev *qec_sdev = child_sdev->parent; struct sunqec *qecp; @@ -823,7 +823,7 @@ static struct sunqec * __devinit get_qec(struct sbus_dev *child_sdev) return NULL; } -static int __devinit qec_ether_init(struct sbus_dev *sdev) +static int __init qec_ether_init(struct sbus_dev *sdev) { static unsigned version_printed; struct net_device *dev; diff --git a/trunk/drivers/net/sunvnet.c b/trunk/drivers/net/sunvnet.c index 6415ce15c2ef..4a0035f7a842 100644 --- a/trunk/drivers/net/sunvnet.c +++ b/trunk/drivers/net/sunvnet.c @@ -1130,7 +1130,7 @@ static struct vio_driver_ops vnet_vio_ops = { .handshake_complete = vnet_handshake_complete, }; -static void __devinit print_version(void) +static void print_version(void) { static int version_printed; diff --git a/trunk/drivers/net/tokenring/abyss.c b/trunk/drivers/net/tokenring/abyss.c index 7a7de0469eae..124cfd4fbcf4 100644 --- a/trunk/drivers/net/tokenring/abyss.c +++ b/trunk/drivers/net/tokenring/abyss.c @@ -10,7 +10,7 @@ * - Madge Smart 16/4 PCI Mk2 * * Maintainer(s): - * AF Adam Fritzler + * AF Adam Fritzler mid@auk.cx * * Modification History: * 30-Dec-99 AF Split off from the tms380tr driver. diff --git a/trunk/drivers/net/tokenring/abyss.h b/trunk/drivers/net/tokenring/abyss.h index b0a473b89133..0ee6e4f085b1 100644 --- a/trunk/drivers/net/tokenring/abyss.h +++ b/trunk/drivers/net/tokenring/abyss.h @@ -2,7 +2,7 @@ * abyss.h: Header for the abyss tms380tr module * * Authors: - * - Adam Fritzler + * - Adam Fritzler */ #ifndef __LINUX_MADGETR_H diff --git a/trunk/drivers/net/tokenring/madgemc.c b/trunk/drivers/net/tokenring/madgemc.c index c9c5a2b1ed9e..5a4151362fc0 100644 --- a/trunk/drivers/net/tokenring/madgemc.c +++ b/trunk/drivers/net/tokenring/madgemc.c @@ -11,7 +11,7 @@ * - Madge Smart 16/4 Ringnode MC32 (??) * * Maintainer(s): - * AF Adam Fritzler + * AF Adam Fritzler mid@auk.cx * * Modification History: * 16-Jan-00 AF Created diff --git a/trunk/drivers/net/tokenring/madgemc.h b/trunk/drivers/net/tokenring/madgemc.h index fe88e272c531..2dd822203809 100644 --- a/trunk/drivers/net/tokenring/madgemc.h +++ b/trunk/drivers/net/tokenring/madgemc.h @@ -2,7 +2,7 @@ * madgemc.h: Header for the madgemc tms380tr module * * Authors: - * - Adam Fritzler + * - Adam Fritzler */ #ifndef __LINUX_MADGEMC_H diff --git a/trunk/drivers/net/tokenring/olympic.c b/trunk/drivers/net/tokenring/olympic.c index 433c994ea9d8..e7b4adc5c4e7 100644 --- a/trunk/drivers/net/tokenring/olympic.c +++ b/trunk/drivers/net/tokenring/olympic.c @@ -434,7 +434,7 @@ static int __devinit olympic_init(struct net_device *dev) } -static int __devinit olympic_open(struct net_device *dev) +static int olympic_open(struct net_device *dev) { struct olympic_private *olympic_priv=netdev_priv(dev); u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio,*init_srb; diff --git a/trunk/drivers/net/tokenring/proteon.c b/trunk/drivers/net/tokenring/proteon.c index 00ea94513460..ca6b65919b3d 100644 --- a/trunk/drivers/net/tokenring/proteon.c +++ b/trunk/drivers/net/tokenring/proteon.c @@ -12,7 +12,7 @@ * - Proteon 1392, 1392+ * * Maintainer(s): - * AF Adam Fritzler + * AF Adam Fritzler mid@auk.cx * JF Jochen Friedrich jochen@scram.de * * Modification History: diff --git a/trunk/drivers/net/tokenring/skisa.c b/trunk/drivers/net/tokenring/skisa.c index 41b6999a0f33..32e8d5a9f958 100644 --- a/trunk/drivers/net/tokenring/skisa.c +++ b/trunk/drivers/net/tokenring/skisa.c @@ -13,7 +13,7 @@ * - SysKonnect TR4/16(+) ISA (SK-4190) * * Maintainer(s): - * AF Adam Fritzler + * AF Adam Fritzler mid@auk.cx * JF Jochen Friedrich jochen@scram.de * * Modification History: diff --git a/trunk/drivers/net/tokenring/tms380tr.c b/trunk/drivers/net/tokenring/tms380tr.c index d07c4523c847..d5fa36d36515 100644 --- a/trunk/drivers/net/tokenring/tms380tr.c +++ b/trunk/drivers/net/tokenring/tms380tr.c @@ -30,7 +30,7 @@ * Maintainer(s): * JS Jay Schulist jschlst@samba.org * CG Christoph Goos cgoos@syskonnect.de - * AF Adam Fritzler + * AF Adam Fritzler mid@auk.cx * MLP Mike Phillips phillim@amtrak.com * JF Jochen Friedrich jochen@scram.de * diff --git a/trunk/drivers/net/tokenring/tms380tr.h b/trunk/drivers/net/tokenring/tms380tr.h index 7af76d708849..7daf74e31ccd 100644 --- a/trunk/drivers/net/tokenring/tms380tr.h +++ b/trunk/drivers/net/tokenring/tms380tr.h @@ -3,7 +3,7 @@ * * Authors: * - Christoph Goos - * - Adam Fritzler + * - Adam Fritzler */ #ifndef __LINUX_TMS380TR_H diff --git a/trunk/drivers/net/tokenring/tmspci.c b/trunk/drivers/net/tokenring/tmspci.c index 5f0ee880cfff..1c18f782f522 100644 --- a/trunk/drivers/net/tokenring/tmspci.c +++ b/trunk/drivers/net/tokenring/tmspci.c @@ -14,7 +14,7 @@ * - 3Com 3C339 Token Link Velocity * * Maintainer(s): - * AF Adam Fritzler + * AF Adam Fritzler mid@auk.cx * * Modification History: * 30-Dec-99 AF Split off from the tms380tr driver. diff --git a/trunk/drivers/net/ucc_geth.c b/trunk/drivers/net/ucc_geth.c index fba0811d2608..4ffd8739f8b7 100644 --- a/trunk/drivers/net/ucc_geth.c +++ b/trunk/drivers/net/ucc_geth.c @@ -2084,10 +2084,8 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth) if (!ugeth) return; - if (ugeth->uccf) { + if (ugeth->uccf) ucc_fast_free(ugeth->uccf); - ugeth->uccf = NULL; - } if (ugeth->p_thread_data_tx) { qe_muram_free(ugeth->thread_dat_tx_offset); @@ -2307,6 +2305,10 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) ug_info = ugeth->ug_info; uf_info = &ug_info->uf_info; + /* Create CQs for hash tables */ + INIT_LIST_HEAD(&ugeth->group_hash_q); + INIT_LIST_HEAD(&ugeth->ind_hash_q); + if (!((uf_info->bd_mem_part == MEM_PART_SYSTEM) || (uf_info->bd_mem_part == MEM_PART_MURAM))) { if (netif_msg_probe(ugeth)) @@ -3666,23 +3668,6 @@ static irqreturn_t ucc_geth_irq_handler(int irq, void *info) return IRQ_HANDLED; } -#ifdef CONFIG_NET_POLL_CONTROLLER -/* - * Polling 'interrupt' - used by things like netconsole to send skbs - * without having to re-enable interrupts. It's not called while - * the interrupt routine is executing. - */ -static void ucc_netpoll(struct net_device *dev) -{ - struct ucc_geth_private *ugeth = netdev_priv(dev); - int irq = ugeth->ug_info->uf_info.irq; - - disable_irq(irq); - ucc_geth_irq_handler(irq, dev); - enable_irq(irq); -} -#endif /* CONFIG_NET_POLL_CONTROLLER */ - /* Called when something needs to use the ethernet device */ /* Returns 0 for success. */ static int ucc_geth_open(struct net_device *dev) @@ -4005,10 +3990,6 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ugeth = netdev_priv(dev); spin_lock_init(&ugeth->lock); - /* Create CQs for hash tables */ - INIT_LIST_HEAD(&ugeth->group_hash_q); - INIT_LIST_HEAD(&ugeth->ind_hash_q); - dev_set_drvdata(device, dev); /* Set the dev->base_addr to the gfar reg region */ @@ -4025,9 +4006,6 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma #ifdef CONFIG_UGETH_NAPI netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, UCC_GETH_DEV_WEIGHT); #endif /* CONFIG_UGETH_NAPI */ -#ifdef CONFIG_NET_POLL_CONTROLLER - dev->poll_controller = ucc_netpoll; -#endif dev->stop = ucc_geth_close; // dev->change_mtu = ucc_geth_change_mtu; dev->mtu = 1500; @@ -4062,10 +4040,9 @@ static int ucc_geth_remove(struct of_device* ofdev) struct net_device *dev = dev_get_drvdata(device); struct ucc_geth_private *ugeth = netdev_priv(dev); - unregister_netdev(dev); - free_netdev(dev); - ucc_geth_memclean(ugeth); dev_set_drvdata(device, NULL); + ucc_geth_memclean(ugeth); + free_netdev(dev); return 0; } diff --git a/trunk/drivers/net/usb/rtl8150.c b/trunk/drivers/net/usb/rtl8150.c index 7e1f00131f91..33cbc306226c 100644 --- a/trunk/drivers/net/usb/rtl8150.c +++ b/trunk/drivers/net/usb/rtl8150.c @@ -926,6 +926,7 @@ static int rtl8150_probe(struct usb_interface *intf, netdev->set_multicast_list = rtl8150_set_multicast; netdev->set_mac_address = rtl8150_set_mac_address; netdev->get_stats = rtl8150_netdev_stats; + netdev->mtu = RTL8150_MTU; SET_ETHTOOL_OPS(netdev, &ops); dev->intr_interval = 100; /* 100ms */ diff --git a/trunk/drivers/net/via-rhine.c b/trunk/drivers/net/via-rhine.c index 7c851b1e6daa..87c180b563d3 100644 --- a/trunk/drivers/net/via-rhine.c +++ b/trunk/drivers/net/via-rhine.c @@ -606,7 +606,7 @@ static int rhine_napipoll(struct napi_struct *napi, int budget) } #endif -static void __devinit rhine_hw_init(struct net_device *dev, long pioaddr) +static void rhine_hw_init(struct net_device *dev, long pioaddr) { struct rhine_private *rp = netdev_priv(dev); diff --git a/trunk/drivers/net/via-velocity.c b/trunk/drivers/net/via-velocity.c index 8c9fb824cbd4..35cd65d6b9ed 100644 --- a/trunk/drivers/net/via-velocity.c +++ b/trunk/drivers/net/via-velocity.c @@ -8,6 +8,7 @@ * for 64bit hardware platforms. * * TODO + * Big-endian support * rx_copybreak/alignment * Scatter gather * More testing @@ -680,7 +681,7 @@ static void velocity_rx_reset(struct velocity_info *vptr) * Init state, all RD entries belong to the NIC */ for (i = 0; i < vptr->options.numrx; ++i) - vptr->rd_ring[i].rdesc0.len |= OWNED_BY_NIC; + vptr->rd_ring[i].rdesc0.owner = OWNED_BY_NIC; writew(vptr->options.numrx, ®s->RBRDU); writel(vptr->rd_pool_dma, ®s->RDBaseLo); @@ -776,7 +777,7 @@ static void velocity_init_registers(struct velocity_info *vptr, vptr->int_mask = INT_MASK_DEF; - writel(vptr->rd_pool_dma, ®s->RDBaseLo); + writel(cpu_to_le32(vptr->rd_pool_dma), ®s->RDBaseLo); writew(vptr->options.numrx - 1, ®s->RDCSize); mac_rx_queue_run(regs); mac_rx_queue_wake(regs); @@ -784,7 +785,7 @@ static void velocity_init_registers(struct velocity_info *vptr, writew(vptr->options.numtx - 1, ®s->TDCSize); for (i = 0; i < vptr->num_txq; i++) { - writel(vptr->td_pool_dma[i], ®s->TDBaseLo[i]); + writel(cpu_to_le32(vptr->td_pool_dma[i]), &(regs->TDBaseLo[i])); mac_tx_queue_run(regs, i); } @@ -1194,7 +1195,7 @@ static inline void velocity_give_many_rx_descs(struct velocity_info *vptr) dirty = vptr->rd_dirty - unusable; for (avail = vptr->rd_filled & 0xfffc; avail; avail--) { dirty = (dirty > 0) ? dirty - 1 : vptr->options.numrx - 1; - vptr->rd_ring[dirty].rdesc0.len |= OWNED_BY_NIC; + vptr->rd_ring[dirty].rdesc0.owner = OWNED_BY_NIC; } writew(vptr->rd_filled & 0xfffc, ®s->RBRDU); @@ -1209,7 +1210,7 @@ static int velocity_rx_refill(struct velocity_info *vptr) struct rx_desc *rd = vptr->rd_ring + dirty; /* Fine for an all zero Rx desc at init time as well */ - if (rd->rdesc0.len & OWNED_BY_NIC) + if (rd->rdesc0.owner == OWNED_BY_NIC) break; if (!vptr->rd_info[dirty].skb) { @@ -1412,7 +1413,7 @@ static int velocity_rx_srv(struct velocity_info *vptr, int status) if (!vptr->rd_info[rd_curr].skb) break; - if (rd->rdesc0.len & OWNED_BY_NIC) + if (rd->rdesc0.owner == OWNED_BY_NIC) break; rmb(); @@ -1420,7 +1421,7 @@ static int velocity_rx_srv(struct velocity_info *vptr, int status) /* * Don't drop CE or RL error frame although RXOK is off */ - if (rd->rdesc0.RSR & (RSR_RXOK | RSR_CE | RSR_RL)) { + if ((rd->rdesc0.RSR & RSR_RXOK) || (!(rd->rdesc0.RSR & RSR_RXOK) && (rd->rdesc0.RSR & (RSR_CE | RSR_RL)))) { if (velocity_receive_frame(vptr, rd_curr) < 0) stats->rx_dropped++; } else { @@ -1432,7 +1433,7 @@ static int velocity_rx_srv(struct velocity_info *vptr, int status) stats->rx_dropped++; } - rd->size |= RX_INTEN; + rd->inten = 1; vptr->dev->last_rx = jiffies; @@ -1553,7 +1554,7 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx) struct net_device_stats *stats = &vptr->stats; struct velocity_rd_info *rd_info = &(vptr->rd_info[idx]); struct rx_desc *rd = &(vptr->rd_ring[idx]); - int pkt_len = le16_to_cpu(rd->rdesc0.len) & 0x3fff; + int pkt_len = rd->rdesc0.len; struct sk_buff *skb; if (rd->rdesc0.RSR & (RSR_STP | RSR_EDP)) { @@ -1636,7 +1637,8 @@ static int velocity_alloc_rx_buf(struct velocity_info *vptr, int idx) */ *((u32 *) & (rd->rdesc0)) = 0; - rd->size = cpu_to_le16(vptr->rx_buf_sz) | RX_INTEN; + rd->len = cpu_to_le32(vptr->rx_buf_sz); + rd->inten = 1; rd->pa_low = cpu_to_le32(rd_info->skb_dma); rd->pa_high = 0; return 0; @@ -1672,7 +1674,7 @@ static int velocity_tx_srv(struct velocity_info *vptr, u32 status) td = &(vptr->td_rings[qnum][idx]); tdinfo = &(vptr->td_infos[qnum][idx]); - if (td->tdesc0.len & OWNED_BY_NIC) + if (td->tdesc0.owner == OWNED_BY_NIC) break; if ((works++ > 15)) @@ -1872,7 +1874,7 @@ static void velocity_free_tx_buf(struct velocity_info *vptr, struct velocity_td_ for (i = 0; i < tdinfo->nskb_dma; i++) { #ifdef VELOCITY_ZERO_COPY_SUPPORT - pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i], le16_to_cpu(td->tdesc1.len), PCI_DMA_TODEVICE); + pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i], td->tdesc1.len, PCI_DMA_TODEVICE); #else pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i], skb->len, PCI_DMA_TODEVICE); #endif @@ -2065,8 +2067,8 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) struct velocity_td_info *tdinfo; unsigned long flags; int index; + int pktlen = skb->len; - __le16 len = cpu_to_le16(pktlen); #ifdef VELOCITY_ZERO_COPY_SUPPORT if (skb_shinfo(skb)->nr_frags > 6 && __skb_linearize(skb)) { @@ -2081,8 +2083,9 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) td_ptr = &(vptr->td_rings[qnum][index]); tdinfo = &(vptr->td_infos[qnum][index]); + td_ptr->tdesc1.TCPLS = TCPLS_NORMAL; td_ptr->tdesc1.TCR = TCR0_TIC; - td_ptr->td_buf[0].size &= ~TD_QUEUE; + td_ptr->td_buf[0].queue = 0; /* * Pad short frames. @@ -2090,16 +2093,16 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) if (pktlen < ETH_ZLEN) { /* Cannot occur until ZC support */ pktlen = ETH_ZLEN; - len = cpu_to_le16(ETH_ZLEN); skb_copy_from_linear_data(skb, tdinfo->buf, skb->len); memset(tdinfo->buf + skb->len, 0, ETH_ZLEN - skb->len); tdinfo->skb = skb; tdinfo->skb_dma[0] = tdinfo->buf_dma; - td_ptr->tdesc0.len = len; + td_ptr->tdesc0.pktsize = pktlen; td_ptr->td_buf[0].pa_low = cpu_to_le32(tdinfo->skb_dma[0]); td_ptr->td_buf[0].pa_high = 0; - td_ptr->td_buf[0].size = len; /* queue is 0 anyway */ + td_ptr->td_buf[0].bufsize = td_ptr->tdesc0.pktsize; tdinfo->nskb_dma = 1; + td_ptr->tdesc1.CMDZ = 2; } else #ifdef VELOCITY_ZERO_COPY_SUPPORT if (skb_shinfo(skb)->nr_frags > 0) { @@ -2108,35 +2111,36 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) if (nfrags > 6) { skb_copy_from_linear_data(skb, tdinfo->buf, skb->len); tdinfo->skb_dma[0] = tdinfo->buf_dma; - td_ptr->tdesc0.len = len; + td_ptr->tdesc0.pktsize = td_ptr->td_buf[0].pa_low = cpu_to_le32(tdinfo->skb_dma[0]); td_ptr->td_buf[0].pa_high = 0; - td_ptr->td_buf[0].size = len; /* queue is 0 anyway */ + td_ptr->td_buf[0].bufsize = td_ptr->tdesc0.pktsize; tdinfo->nskb_dma = 1; + td_ptr->tdesc1.CMDZ = 2; } else { int i = 0; tdinfo->nskb_dma = 0; - tdinfo->skb_dma[i] = pci_map_single(vptr->pdev, skb->data, - skb_headlen(skb), PCI_DMA_TODEVICE); + tdinfo->skb_dma[i] = pci_map_single(vptr->pdev, skb->data, skb->len - skb->data_len, PCI_DMA_TODEVICE); - td_ptr->tdesc0.len = len; + td_ptr->tdesc0.pktsize = pktlen; /* FIXME: support 48bit DMA later */ td_ptr->td_buf[i].pa_low = cpu_to_le32(tdinfo->skb_dma); td_ptr->td_buf[i].pa_high = 0; - td_ptr->td_buf[i].size = cpu_to_le16(skb_headlen(skb)); + td_ptr->td_buf[i].bufsize = skb->len->skb->data_len; for (i = 0; i < nfrags; i++) { skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; - void *addr = (void *)page_address(frag->page) + frag->page_offset; + void *addr = ((void *) page_address(frag->page + frag->page_offset)); tdinfo->skb_dma[i + 1] = pci_map_single(vptr->pdev, addr, frag->size, PCI_DMA_TODEVICE); td_ptr->td_buf[i + 1].pa_low = cpu_to_le32(tdinfo->skb_dma[i + 1]); td_ptr->td_buf[i + 1].pa_high = 0; - td_ptr->td_buf[i + 1].size = cpu_to_le16(frag->size); + td_ptr->td_buf[i + 1].bufsize = frag->size; } tdinfo->nskb_dma = i - 1; + td_ptr->tdesc1.CMDZ = i; } } else @@ -2148,16 +2152,18 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) */ tdinfo->skb = skb; tdinfo->skb_dma[0] = pci_map_single(vptr->pdev, skb->data, pktlen, PCI_DMA_TODEVICE); - td_ptr->tdesc0.len = len; + td_ptr->tdesc0.pktsize = pktlen; td_ptr->td_buf[0].pa_low = cpu_to_le32(tdinfo->skb_dma[0]); td_ptr->td_buf[0].pa_high = 0; - td_ptr->td_buf[0].size = len; + td_ptr->td_buf[0].bufsize = td_ptr->tdesc0.pktsize; tdinfo->nskb_dma = 1; + td_ptr->tdesc1.CMDZ = 2; } - td_ptr->tdesc1.cmd = TCPLS_NORMAL + (tdinfo->nskb_dma + 1) * 16; if (vptr->vlgrp && vlan_tx_tag_present(skb)) { - td_ptr->tdesc1.vlan = cpu_to_le16(vlan_tx_tag_get(skb)); + td_ptr->tdesc1.pqinf.VID = vlan_tx_tag_get(skb); + td_ptr->tdesc1.pqinf.priority = 0; + td_ptr->tdesc1.pqinf.CFI = 0; td_ptr->tdesc1.TCR |= TCR0_VETAG; } @@ -2179,7 +2185,7 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) if (prev < 0) prev = vptr->options.numtx - 1; - td_ptr->tdesc0.len |= OWNED_BY_NIC; + td_ptr->tdesc0.owner = OWNED_BY_NIC; vptr->td_used[qnum]++; vptr->td_curr[qnum] = (index + 1) % vptr->options.numtx; @@ -2187,7 +2193,7 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) netif_stop_queue(dev); td_ptr = &(vptr->td_rings[qnum][prev]); - td_ptr->td_buf[0].size |= TD_QUEUE; + td_ptr->td_buf[0].queue = 1; mac_tx_queue_wake(vptr->mac_regs, qnum); } dev->trans_start = jiffies; @@ -3404,7 +3410,7 @@ static int velocity_suspend(struct pci_dev *pdev, pm_message_t state) velocity_save_context(vptr, &vptr->context); velocity_shutdown(vptr); velocity_set_wol(vptr); - pci_enable_wake(pdev, PCI_D3hot, 1); + pci_enable_wake(pdev, 3, 1); pci_set_power_state(pdev, PCI_D3hot); } else { velocity_save_context(vptr, &vptr->context); diff --git a/trunk/drivers/net/via-velocity.h b/trunk/drivers/net/via-velocity.h index 7387be4f428d..aa9179623d90 100644 --- a/trunk/drivers/net/via-velocity.h +++ b/trunk/drivers/net/via-velocity.h @@ -70,27 +70,40 @@ * Bits in the RSR0 register */ -#define RSR_DETAG cpu_to_le16(0x0080) -#define RSR_SNTAG cpu_to_le16(0x0040) -#define RSR_RXER cpu_to_le16(0x0020) -#define RSR_RL cpu_to_le16(0x0010) -#define RSR_CE cpu_to_le16(0x0008) -#define RSR_FAE cpu_to_le16(0x0004) -#define RSR_CRC cpu_to_le16(0x0002) -#define RSR_VIDM cpu_to_le16(0x0001) +#define RSR_DETAG 0x0080 +#define RSR_SNTAG 0x0040 +#define RSR_RXER 0x0020 +#define RSR_RL 0x0010 +#define RSR_CE 0x0008 +#define RSR_FAE 0x0004 +#define RSR_CRC 0x0002 +#define RSR_VIDM 0x0001 /* * Bits in the RSR1 register */ -#define RSR_RXOK cpu_to_le16(0x8000) // rx OK -#define RSR_PFT cpu_to_le16(0x4000) // Perfect filtering address match -#define RSR_MAR cpu_to_le16(0x2000) // MAC accept multicast address packet -#define RSR_BAR cpu_to_le16(0x1000) // MAC accept broadcast address packet -#define RSR_PHY cpu_to_le16(0x0800) // MAC accept physical address packet -#define RSR_VTAG cpu_to_le16(0x0400) // 802.1p/1q tagging packet indicator -#define RSR_STP cpu_to_le16(0x0200) // start of packet -#define RSR_EDP cpu_to_le16(0x0100) // end of packet +#define RSR_RXOK 0x8000 // rx OK +#define RSR_PFT 0x4000 // Perfect filtering address match +#define RSR_MAR 0x2000 // MAC accept multicast address packet +#define RSR_BAR 0x1000 // MAC accept broadcast address packet +#define RSR_PHY 0x0800 // MAC accept physical address packet +#define RSR_VTAG 0x0400 // 802.1p/1q tagging packet indicator +#define RSR_STP 0x0200 // start of packet +#define RSR_EDP 0x0100 // end of packet + +/* + * Bits in the RSR1 register + */ + +#define RSR1_RXOK 0x80 // rx OK +#define RSR1_PFT 0x40 // Perfect filtering address match +#define RSR1_MAR 0x20 // MAC accept multicast address packet +#define RSR1_BAR 0x10 // MAC accept broadcast address packet +#define RSR1_PHY 0x08 // MAC accept physical address packet +#define RSR1_VTAG 0x04 // 802.1p/1q tagging packet indicator +#define RSR1_STP 0x02 // start of packet +#define RSR1_EDP 0x01 // end of packet /* * Bits in the CSM register @@ -107,21 +120,33 @@ * Bits in the TSR0 register */ -#define TSR0_ABT cpu_to_le16(0x0080) // Tx abort because of excessive collision -#define TSR0_OWT cpu_to_le16(0x0040) // Jumbo frame Tx abort -#define TSR0_OWC cpu_to_le16(0x0020) // Out of window collision -#define TSR0_COLS cpu_to_le16(0x0010) // experience collision in this transmit event -#define TSR0_NCR3 cpu_to_le16(0x0008) // collision retry counter[3] -#define TSR0_NCR2 cpu_to_le16(0x0004) // collision retry counter[2] -#define TSR0_NCR1 cpu_to_le16(0x0002) // collision retry counter[1] -#define TSR0_NCR0 cpu_to_le16(0x0001) // collision retry counter[0] -#define TSR0_TERR cpu_to_le16(0x8000) // -#define TSR0_FDX cpu_to_le16(0x4000) // current transaction is serviced by full duplex mode -#define TSR0_GMII cpu_to_le16(0x2000) // current transaction is serviced by GMII mode -#define TSR0_LNKFL cpu_to_le16(0x1000) // packet serviced during link down -#define TSR0_SHDN cpu_to_le16(0x0400) // shutdown case -#define TSR0_CRS cpu_to_le16(0x0200) // carrier sense lost -#define TSR0_CDH cpu_to_le16(0x0100) // AQE test fail (CD heartbeat) +#define TSR0_ABT 0x0080 // Tx abort because of excessive collision +#define TSR0_OWT 0x0040 // Jumbo frame Tx abort +#define TSR0_OWC 0x0020 // Out of window collision +#define TSR0_COLS 0x0010 // experience collision in this transmit event +#define TSR0_NCR3 0x0008 // collision retry counter[3] +#define TSR0_NCR2 0x0004 // collision retry counter[2] +#define TSR0_NCR1 0x0002 // collision retry counter[1] +#define TSR0_NCR0 0x0001 // collision retry counter[0] +#define TSR0_TERR 0x8000 // +#define TSR0_FDX 0x4000 // current transaction is serviced by full duplex mode +#define TSR0_GMII 0x2000 // current transaction is serviced by GMII mode +#define TSR0_LNKFL 0x1000 // packet serviced during link down +#define TSR0_SHDN 0x0400 // shutdown case +#define TSR0_CRS 0x0200 // carrier sense lost +#define TSR0_CDH 0x0100 // AQE test fail (CD heartbeat) + +/* + * Bits in the TSR1 register + */ + +#define TSR1_TERR 0x80 // +#define TSR1_FDX 0x40 // current transaction is serviced by full duplex mode +#define TSR1_GMII 0x20 // current transaction is serviced by GMII mode +#define TSR1_LNKFL 0x10 // packet serviced during link down +#define TSR1_SHDN 0x04 // shutdown case +#define TSR1_CRS 0x02 // carrier sense lost +#define TSR1_CDH 0x01 // AQE test fail (CD heartbeat) // // Bits in the TCR0 register @@ -172,26 +197,25 @@ */ struct rdesc0 { - __le16 RSR; /* Receive status */ - __le16 len; /* bits 0--13; bit 15 - owner */ + u16 RSR; /* Receive status */ + u16 len:14; /* Received packet length */ + u16 reserved:1; + u16 owner:1; /* Who owns this buffer ? */ }; struct rdesc1 { - __le16 PQTAG; + u16 PQTAG; u8 CSM; u8 IPKT; }; -enum { - RX_INTEN = __constant_cpu_to_le16(0x8000) -}; - struct rx_desc { struct rdesc0 rdesc0; struct rdesc1 rdesc1; - __le32 pa_low; /* Low 32 bit PCI address */ - __le16 pa_high; /* Next 16 bit PCI address (48 total) */ - __le16 size; /* bits 0--14 - frame size, bit 15 - enable int. */ + u32 pa_low; /* Low 32 bit PCI address */ + u16 pa_high; /* Next 16 bit PCI address (48 total) */ + u16 len:15; /* Frame size */ + u16 inten:1; /* Enable interrupt */ } __attribute__ ((__packed__)); /* @@ -199,24 +223,32 @@ struct rx_desc { */ struct tdesc0 { - __le16 TSR; /* Transmit status register */ - __le16 len; /* bits 0--13 - size of frame, bit 15 - owner */ + u16 TSR; /* Transmit status register */ + u16 pktsize:14; /* Size of frame */ + u16 reserved:1; + u16 owner:1; /* Who owns the buffer */ }; +struct pqinf { /* Priority queue info */ + u16 VID:12; + u16 CFI:1; + u16 priority:3; +} __attribute__ ((__packed__)); + struct tdesc1 { - __le16 vlan; + struct pqinf pqinf; u8 TCR; - u8 cmd; /* bits 0--1 - TCPLS, bits 4--7 - CMDZ */ + u8 TCPLS:2; + u8 reserved:2; + u8 CMDZ:4; } __attribute__ ((__packed__)); -enum { - TD_QUEUE = __constant_cpu_to_le16(0x8000) -}; - struct td_buf { - __le32 pa_low; - __le16 pa_high; - __le16 size; /* bits 0--13 - size, bit 15 - queue */ + u32 pa_low; + u16 pa_high; + u16 bufsize:14; + u16 reserved:1; + u16 queue:1; } __attribute__ ((__packed__)); struct tx_desc { @@ -244,7 +276,7 @@ struct velocity_td_info { enum velocity_owner { OWNED_BY_HOST = 0, - OWNED_BY_NIC = __constant_cpu_to_le16(0x8000) + OWNED_BY_NIC = 1 }; @@ -980,45 +1012,45 @@ struct mac_regs { volatile u8 RCR; volatile u8 TCR; - volatile __le32 CR0Set; /* 0x08 */ - volatile __le32 CR0Clr; /* 0x0C */ + volatile u32 CR0Set; /* 0x08 */ + volatile u32 CR0Clr; /* 0x0C */ volatile u8 MARCAM[8]; /* 0x10 */ - volatile __le32 DecBaseHi; /* 0x18 */ - volatile __le16 DbfBaseHi; /* 0x1C */ - volatile __le16 reserved_1E; + volatile u32 DecBaseHi; /* 0x18 */ + volatile u16 DbfBaseHi; /* 0x1C */ + volatile u16 reserved_1E; - volatile __le16 ISRCTL; /* 0x20 */ + volatile u16 ISRCTL; /* 0x20 */ volatile u8 TXESR; volatile u8 RXESR; - volatile __le32 ISR; /* 0x24 */ - volatile __le32 IMR; + volatile u32 ISR; /* 0x24 */ + volatile u32 IMR; - volatile __le32 TDStatusPort; /* 0x2C */ + volatile u32 TDStatusPort; /* 0x2C */ - volatile __le16 TDCSRSet; /* 0x30 */ + volatile u16 TDCSRSet; /* 0x30 */ volatile u8 RDCSRSet; volatile u8 reserved_33; - volatile __le16 TDCSRClr; + volatile u16 TDCSRClr; volatile u8 RDCSRClr; volatile u8 reserved_37; - volatile __le32 RDBaseLo; /* 0x38 */ - volatile __le16 RDIdx; /* 0x3C */ - volatile __le16 reserved_3E; + volatile u32 RDBaseLo; /* 0x38 */ + volatile u16 RDIdx; /* 0x3C */ + volatile u16 reserved_3E; - volatile __le32 TDBaseLo[4]; /* 0x40 */ + volatile u32 TDBaseLo[4]; /* 0x40 */ - volatile __le16 RDCSize; /* 0x50 */ - volatile __le16 TDCSize; /* 0x52 */ - volatile __le16 TDIdx[4]; /* 0x54 */ - volatile __le16 tx_pause_timer; /* 0x5C */ - volatile __le16 RBRDU; /* 0x5E */ + volatile u16 RDCSize; /* 0x50 */ + volatile u16 TDCSize; /* 0x52 */ + volatile u16 TDIdx[4]; /* 0x54 */ + volatile u16 tx_pause_timer; /* 0x5C */ + volatile u16 RBRDU; /* 0x5E */ - volatile __le32 FIFOTest0; /* 0x60 */ - volatile __le32 FIFOTest1; /* 0x64 */ + volatile u32 FIFOTest0; /* 0x60 */ + volatile u32 FIFOTest1; /* 0x64 */ volatile u8 CAMADDR; /* 0x68 */ volatile u8 CAMCR; /* 0x69 */ @@ -1031,18 +1063,18 @@ struct mac_regs { volatile u8 PHYSR1; volatile u8 MIICR; volatile u8 MIIADR; - volatile __le16 MIIDATA; + volatile u16 MIIDATA; - volatile __le16 SoftTimer0; /* 0x74 */ - volatile __le16 SoftTimer1; + volatile u16 SoftTimer0; /* 0x74 */ + volatile u16 SoftTimer1; volatile u8 CFGA; /* 0x78 */ volatile u8 CFGB; volatile u8 CFGC; volatile u8 CFGD; - volatile __le16 DCFG; /* 0x7C */ - volatile __le16 MCFG; + volatile u16 DCFG; /* 0x7C */ + volatile u16 MCFG; volatile u8 TBIST; /* 0x80 */ volatile u8 RBIST; @@ -1054,9 +1086,9 @@ struct mac_regs { volatile u8 rev_id; volatile u8 PORSTS; - volatile __le32 MIBData; /* 0x88 */ + volatile u32 MIBData; /* 0x88 */ - volatile __le16 EEWrData; + volatile u16 EEWrData; volatile u8 reserved_8E; volatile u8 BPMDWr; @@ -1066,7 +1098,7 @@ struct mac_regs { volatile u8 EECHKSUM; /* 0x92 */ volatile u8 EECSR; - volatile __le16 EERdData; /* 0x94 */ + volatile u16 EERdData; /* 0x94 */ volatile u8 EADDR; volatile u8 EMBCMD; @@ -1080,22 +1112,22 @@ struct mac_regs { volatile u8 DEBUG; volatile u8 CHIPGCR; - volatile __le16 WOLCRSet; /* 0xA0 */ + volatile u16 WOLCRSet; /* 0xA0 */ volatile u8 PWCFGSet; volatile u8 WOLCFGSet; - volatile __le16 WOLCRClr; /* 0xA4 */ + volatile u16 WOLCRClr; /* 0xA4 */ volatile u8 PWCFGCLR; volatile u8 WOLCFGClr; - volatile __le16 WOLSRSet; /* 0xA8 */ - volatile __le16 reserved_AA; + volatile u16 WOLSRSet; /* 0xA8 */ + volatile u16 reserved_AA; - volatile __le16 WOLSRClr; /* 0xAC */ - volatile __le16 reserved_AE; + volatile u16 WOLSRClr; /* 0xAC */ + volatile u16 reserved_AE; - volatile __le16 PatternCRC[8]; /* 0xB0 */ - volatile __le32 ByteMask[4][4]; /* 0xC0 */ + volatile u16 PatternCRC[8]; /* 0xB0 */ + volatile u32 ByteMask[4][4]; /* 0xC0 */ } __attribute__ ((__packed__)); @@ -1206,12 +1238,12 @@ typedef u8 MCAM_ADDR[ETH_ALEN]; struct arp_packet { u8 dest_mac[ETH_ALEN]; u8 src_mac[ETH_ALEN]; - __be16 type; - __be16 ar_hrd; - __be16 ar_pro; + u16 type; + u16 ar_hrd; + u16 ar_pro; u8 ar_hln; u8 ar_pln; - __be16 ar_op; + u16 ar_op; u8 ar_sha[ETH_ALEN]; u8 ar_sip[4]; u8 ar_tha[ETH_ALEN]; @@ -1221,7 +1253,7 @@ struct arp_packet { struct _magic_packet { u8 dest_mac[6]; u8 src_mac[6]; - __be16 type; + u16 type; u8 MAC[16][6]; u8 password[6]; } __attribute__ ((__packed__)); diff --git a/trunk/drivers/net/virtio_net.c b/trunk/drivers/net/virtio_net.c index 5413dbf3d4ac..a60505c8f82a 100644 --- a/trunk/drivers/net/virtio_net.c +++ b/trunk/drivers/net/virtio_net.c @@ -83,17 +83,8 @@ static void receive_skb(struct net_device *dev, struct sk_buff *skb, if (hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) { pr_debug("Needs csum!\n"); - skb->ip_summed = CHECKSUM_PARTIAL; - skb->csum_start = hdr->csum_start; - skb->csum_offset = hdr->csum_offset; - if (skb->csum_start > skb->len - 2 - || skb->csum_offset > skb->len - 2) { - if (net_ratelimit()) - printk(KERN_WARNING "%s: csum=%u/%u len=%u\n", - dev->name, skb->csum_start, - skb->csum_offset, skb->len); + if (!skb_partial_csum_set(skb,hdr->csum_start,hdr->csum_offset)) goto frame_err; - } } if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { diff --git a/trunk/drivers/net/wan/cycx_drv.c b/trunk/drivers/net/wan/cycx_drv.c index d14e6678deed..d347d59db656 100644 --- a/trunk/drivers/net/wan/cycx_drv.c +++ b/trunk/drivers/net/wan/cycx_drv.c @@ -322,7 +322,7 @@ static int cycx_data_boot(void __iomem *addr, u8 *code, u32 len) void __iomem *pt_boot_cmd = addr + CMD_OFFSET; u32 i; - /* boot buffer length */ + /* boot buffer lenght */ writew(CFM_LOAD_BUFSZ, pt_boot_cmd + sizeof(u16)); writew(GEN_DEFPAR, pt_boot_cmd); @@ -353,7 +353,7 @@ static int cycx_code_boot(void __iomem *addr, u8 *code, u32 len) void __iomem *pt_boot_cmd = addr + CMD_OFFSET; u32 i; - /* boot buffer length */ + /* boot buffer lenght */ writew(CFM_LOAD_BUFSZ, pt_boot_cmd + sizeof(u16)); writew(GEN_DEFPAR, pt_boot_cmd); diff --git a/trunk/drivers/net/wireless/ath5k/base.c b/trunk/drivers/net/wireless/ath5k/base.c index ddc87149fe31..d6599d219193 100644 --- a/trunk/drivers/net/wireless/ath5k/base.c +++ b/trunk/drivers/net/wireless/ath5k/base.c @@ -153,7 +153,7 @@ static int ath5k_pci_resume(struct pci_dev *pdev); #define ath5k_pci_resume NULL #endif /* CONFIG_PM */ -static struct pci_driver ath5k_pci_driver = { +static struct pci_driver ath5k_pci_drv_id = { .name = "ath5k_pci", .id_table = ath5k_pci_id_table, .probe = ath5k_pci_probe, @@ -329,7 +329,7 @@ init_ath5k_pci(void) ath5k_debug_init(); - ret = pci_register_driver(&ath5k_pci_driver); + ret = pci_register_driver(&ath5k_pci_drv_id); if (ret) { printk(KERN_ERR "ath5k_pci: can't register pci driver\n"); return ret; @@ -341,7 +341,7 @@ init_ath5k_pci(void) static void __exit exit_ath5k_pci(void) { - pci_unregister_driver(&ath5k_pci_driver); + pci_unregister_driver(&ath5k_pci_drv_id); ath5k_debug_finish(); } diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-3945.c b/trunk/drivers/net/wireless/iwlwifi/iwl-3945.c index 8d4d91d35fd2..4fdeb5323248 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-3945.c @@ -238,10 +238,9 @@ void iwl3945_hw_rx_statistics(struct iwl3945_priv *priv, struct iwl3945_rx_mem_b priv->last_statistics_time = jiffies; } -static void iwl3945_add_radiotap(struct iwl3945_priv *priv, - struct sk_buff *skb, - struct iwl3945_rx_frame_hdr *rx_hdr, - struct ieee80211_rx_status *stats) +void iwl3945_add_radiotap(struct iwl3945_priv *priv, struct sk_buff *skb, + struct iwl3945_rx_frame_hdr *rx_hdr, + struct ieee80211_rx_status *stats) { /* First cache any information we need before we overwrite * the information provided in the skb from the hardware */ diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-4965.c b/trunk/drivers/net/wireless/iwlwifi/iwl-4965.c index d727de8b96fe..569347ff377b 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-4965.c @@ -4658,30 +4658,17 @@ void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index, struct ieee80211_ht_info *sta_ht_inf) { __le32 sta_flags; - u8 mimo_ps_mode; if (!sta_ht_inf || !sta_ht_inf->ht_supported) goto done; - mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_MIMO_PS) >> 2; - sta_flags = priv->stations[index].sta.station_flags; - sta_flags &= ~(STA_FLG_RTS_MIMO_PROT_MSK | STA_FLG_MIMO_DIS_MSK); - - switch (mimo_ps_mode) { - case WLAN_HT_CAP_MIMO_PS_STATIC: - sta_flags |= STA_FLG_MIMO_DIS_MSK; - break; - case WLAN_HT_CAP_MIMO_PS_DYNAMIC: + if (((sta_ht_inf->cap & IEEE80211_HT_CAP_MIMO_PS >> 2)) + == IWL_MIMO_PS_DYNAMIC) sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK; - break; - case WLAN_HT_CAP_MIMO_PS_DISABLED: - break; - default: - IWL_WARNING("Invalid MIMO PS mode %d", mimo_ps_mode); - break; - } + else + sta_flags &= ~STA_FLG_RTS_MIMO_PROT_MSK; sta_flags |= cpu_to_le32( (u32)sta_ht_inf->ampdu_factor << STA_FLG_MAX_AGG_SIZE_POS); @@ -4692,7 +4679,7 @@ void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index, if (iwl4965_is_fat_tx_allowed(priv, sta_ht_inf)) sta_flags |= STA_FLG_FAT_EN_MSK; else - sta_flags &= ~STA_FLG_FAT_EN_MSK; + sta_flags &= (~STA_FLG_FAT_EN_MSK); priv->stations[index].sta.station_flags = sta_flags; done: diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-helpers.h b/trunk/drivers/net/wireless/iwlwifi/iwl-helpers.h index 8993cca81b40..cb009f4c401f 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-helpers.h +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-helpers.h @@ -147,6 +147,9 @@ static inline struct ieee80211_conf *ieee80211_get_hw_conf( #define QOS_CONTROL_LEN 2 +#define IEEE80211_STYPE_BACK_REQ 0x0080 +#define IEEE80211_STYPE_BACK 0x0090 + static inline int ieee80211_is_management(u16 fc) { diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c b/trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c index f55c75712b55..33239f197984 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -6330,11 +6330,6 @@ static int __iwl3945_up(struct iwl3945_priv *priv) return -ENODEV; } - if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) { - IWL_ERROR("ucode not available for device bringup\n"); - return -EIO; - } - /* If platform's RF_KILL switch is NOT set to KILL */ if (iwl3945_read32(priv, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) @@ -6347,6 +6342,11 @@ static int __iwl3945_up(struct iwl3945_priv *priv) } } + if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) { + IWL_ERROR("ucode not available for device bringup\n"); + return -EIO; + } + iwl3945_write32(priv, CSR_INT, 0xFFFFFFFF); rc = iwl3945_hw_nic_init(priv); diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c b/trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c index f423241b9567..bf3a60c037aa 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c @@ -6755,11 +6755,6 @@ static int __iwl4965_up(struct iwl4965_priv *priv) return -ENODEV; } - if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) { - IWL_ERROR("ucode not available for device bringup\n"); - return -EIO; - } - /* If platform's RF_KILL switch is NOT set to KILL */ if (iwl4965_read32(priv, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) @@ -6772,6 +6767,11 @@ static int __iwl4965_up(struct iwl4965_priv *priv) } } + if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) { + IWL_ERROR("ucode not available for device bringup\n"); + return -EIO; + } + iwl4965_write32(priv, CSR_INT, 0xFFFFFFFF); rc = iwl4965_hw_nic_init(priv); diff --git a/trunk/drivers/net/wireless/libertas/scan.c b/trunk/drivers/net/wireless/libertas/scan.c index 69f94c92b32d..9a61188b62e9 100644 --- a/trunk/drivers/net/wireless/libertas/scan.c +++ b/trunk/drivers/net/wireless/libertas/scan.c @@ -1473,7 +1473,7 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info, * Called via lbs_prepare_and_send_command(priv, CMD_802_11_SCAN, ...) * from cmd.c * - * Sends a fixed length data part (specifying the BSS type and BSSID filters) + * Sends a fixed lenght data part (specifying the BSS type and BSSID filters) * as well as a variable number/length of TLVs to the firmware. * * @param priv A pointer to struct lbs_private structure diff --git a/trunk/drivers/nubus/nubus.c b/trunk/drivers/nubus/nubus.c index f4076aeb2098..e503c9c98032 100644 --- a/trunk/drivers/nubus/nubus.c +++ b/trunk/drivers/nubus/nubus.c @@ -352,7 +352,7 @@ nubus_find_rsrc(struct nubus_dir* dir, unsigned char rsrc_type, resource blocks. */ /* FIXME: A lot of this stuff will eventually be useful after - initialization, for intelligently probing Ethernet and video chips, + initializaton, for intelligently probing Ethernet and video chips, among other things. The rest of it should go in the /proc code. For now, we just use it to give verbose boot logs. */ diff --git a/trunk/drivers/parisc/ccio-dma.c b/trunk/drivers/parisc/ccio-dma.c index ca52307b8f40..7c60cbd85dc8 100644 --- a/trunk/drivers/parisc/ccio-dma.c +++ b/trunk/drivers/parisc/ccio-dma.c @@ -363,7 +363,7 @@ ccio_alloc_range(struct ioc *ioc, size_t size) if (pages_needed <= 8) { /* * LAN traffic will not thrash the TLB IFF the same NIC - * uses 8 adjacent pages to map separate payload data. + * uses 8 adjacent pages to map seperate payload data. * ie the same byte in the resource bit map. */ #if 0 @@ -1589,7 +1589,7 @@ static int __init ccio_probe(struct parisc_device *dev) } /** - * ccio_init - ccio initialization procedure. + * ccio_init - ccio initalization procedure. * * Register this driver. */ diff --git a/trunk/drivers/parisc/hppb.c b/trunk/drivers/parisc/hppb.c index 65eee67aa2ae..a728a7cd2fc8 100644 --- a/trunk/drivers/parisc/hppb.c +++ b/trunk/drivers/parisc/hppb.c @@ -95,7 +95,7 @@ static struct parisc_driver hppb_driver = { }; /** - * hppb_init - HP-PB bus initialization procedure. + * hppb_init - HP-PB bus initalization procedure. * * Register this driver. */ diff --git a/trunk/drivers/parport/probe.c b/trunk/drivers/parport/probe.c index cd565bb4e1a9..853a15f44f88 100644 --- a/trunk/drivers/parport/probe.c +++ b/trunk/drivers/parport/probe.c @@ -163,7 +163,7 @@ static ssize_t parport_read_device_id (struct parport *port, char *buffer, idlens[1] = idlens[0]+2; if (belen != lelen) { int off = 2; - /* Don't try lengths of 0x100 and 0x200 as 1 and 2 */ + /* Don't try lenghts of 0x100 and 0x200 as 1 and 2 */ if (idlens[0] <= 2) off = 0; idlens[off] = max(belen, lelen); diff --git a/trunk/drivers/pci/Makefile b/trunk/drivers/pci/Makefile index 9f04d17576d6..f697f3d728eb 100644 --- a/trunk/drivers/pci/Makefile +++ b/trunk/drivers/pci/Makefile @@ -13,9 +13,6 @@ obj-$(CONFIG_HOTPLUG) += hotplug.o # Build the PCI Hotplug drivers if we were asked to obj-$(CONFIG_HOTPLUG_PCI) += hotplug/ -ifdef CONFIG_HOTPLUG_PCI -obj-y += hotplug-pci.o -endif # Build the PCI MSI interrupt support obj-$(CONFIG_PCI_MSI) += msi.o diff --git a/trunk/drivers/pci/hotplug-pci.c b/trunk/drivers/pci/hotplug-pci.c deleted file mode 100644 index a590ef682153..000000000000 --- a/trunk/drivers/pci/hotplug-pci.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Core PCI functionality used only by PCI hotplug */ - -#include -#include "pci.h" - - -unsigned int pci_do_scan_bus(struct pci_bus *bus) -{ - unsigned int max; - - max = pci_scan_child_bus(bus); - - /* - * Make the discovered devices available. - */ - pci_bus_add_devices(bus); - - return max; -} -EXPORT_SYMBOL(pci_do_scan_bus); diff --git a/trunk/drivers/pci/pci-sysfs.c b/trunk/drivers/pci/pci-sysfs.c index 8dcf1458aa2f..abf4203304e4 100644 --- a/trunk/drivers/pci/pci-sysfs.c +++ b/trunk/drivers/pci/pci-sysfs.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "pci.h" static int sysfs_initialized; /* = 0 */ @@ -650,6 +651,8 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) if (pcibios_add_platform_entries(pdev)) goto err_rom_file; + pcie_aspm_create_sysfs_dev_files(pdev); + return 0; err_rom_file: @@ -679,6 +682,8 @@ void pci_remove_sysfs_dev_files(struct pci_dev *pdev) if (!sysfs_initialized) return; + pcie_aspm_remove_sysfs_dev_files(pdev); + if (pdev->cfg_size < 4096) sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); else diff --git a/trunk/drivers/pci/pci.c b/trunk/drivers/pci/pci.c index 04aac7782468..b3e9294e4a0e 100644 --- a/trunk/drivers/pci/pci.c +++ b/trunk/drivers/pci/pci.c @@ -18,6 +18,7 @@ #include #include #include +#include #include /* isa_dma_bridge_buggy */ #include "pci.h" @@ -519,6 +520,9 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state) if (need_restore) pci_restore_bars(dev); + if (dev->bus->self) + pcie_aspm_pm_state_change(dev->bus->self); + return 0; } diff --git a/trunk/drivers/pci/pcie/Kconfig b/trunk/drivers/pci/pcie/Kconfig index 287a9311716c..60104cf98796 100644 --- a/trunk/drivers/pci/pcie/Kconfig +++ b/trunk/drivers/pci/pcie/Kconfig @@ -26,3 +26,23 @@ config HOTPLUG_PCI_PCIE When in doubt, say N. source "drivers/pci/pcie/aer/Kconfig" + +# +# PCI Express ASPM +# +config PCIEASPM + bool "PCI Express ASPM support(Experimental)" + depends on PCI && EXPERIMENTAL + default y + help + This enables PCI Express ASPM (Active State Power Management) and + Clock Power Management. ASPM supports state L0/L0s/L1. + + When in doubt, say N. +config PCIEASPM_DEBUG + bool "Debug PCI Express ASPM" + depends on PCIEASPM + default n + help + This enables PCI Express ASPM debug support. It will add per-device + interface to control ASPM. diff --git a/trunk/drivers/pci/pcie/Makefile b/trunk/drivers/pci/pcie/Makefile index e00fb99acf44..11f6bb1eae24 100644 --- a/trunk/drivers/pci/pcie/Makefile +++ b/trunk/drivers/pci/pcie/Makefile @@ -2,6 +2,9 @@ # Makefile for PCI-Express PORT Driver # +# Build PCI Express ASPM if needed +obj-$(CONFIG_PCIEASPM) += aspm.o + pcieportdrv-y := portdrv_core.o portdrv_pci.o portdrv_bus.o obj-$(CONFIG_PCIEPORTBUS) += pcieportdrv.o diff --git a/trunk/drivers/pci/pcie/aspm.c b/trunk/drivers/pci/pcie/aspm.c new file mode 100644 index 000000000000..1a5adeb10c95 --- /dev/null +++ b/trunk/drivers/pci/pcie/aspm.c @@ -0,0 +1,802 @@ +/* + * File: drivers/pci/pcie/aspm.c + * Enabling PCIE link L0s/L1 state and Clock Power Management + * + * Copyright (C) 2007 Intel + * Copyright (C) Zhang Yanmin (yanmin.zhang@intel.com) + * Copyright (C) Shaohua Li (shaohua.li@intel.com) + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../pci.h" + +#ifdef MODULE_PARAM_PREFIX +#undef MODULE_PARAM_PREFIX +#endif +#define MODULE_PARAM_PREFIX "pcie_aspm." + +struct endpoint_state { + unsigned int l0s_acceptable_latency; + unsigned int l1_acceptable_latency; +}; + +struct pcie_link_state { + struct list_head sibiling; + struct pci_dev *pdev; + + /* ASPM state */ + unsigned int support_state; + unsigned int enabled_state; + unsigned int bios_aspm_state; + /* upstream component */ + unsigned int l0s_upper_latency; + unsigned int l1_upper_latency; + /* downstream component */ + unsigned int l0s_down_latency; + unsigned int l1_down_latency; + /* Clock PM state*/ + unsigned int clk_pm_capable; + unsigned int clk_pm_enabled; + unsigned int bios_clk_state; + + /* + * A pcie downstream port only has one slot under it, so at most there + * are 8 functions + */ + struct endpoint_state endpoints[8]; +}; + +static int aspm_disabled; +static DEFINE_MUTEX(aspm_lock); +static LIST_HEAD(link_list); + +#define POLICY_DEFAULT 0 /* BIOS default setting */ +#define POLICY_PERFORMANCE 1 /* high performance */ +#define POLICY_POWERSAVE 2 /* high power saving */ +static int aspm_policy; +static const char *policy_str[] = { + [POLICY_DEFAULT] = "default", + [POLICY_PERFORMANCE] = "performance", + [POLICY_POWERSAVE] = "powersave" +}; + +static int policy_to_aspm_state(struct pci_dev *pdev) +{ + struct pcie_link_state *link_state = pdev->link_state; + + switch (aspm_policy) { + case POLICY_PERFORMANCE: + /* Disable ASPM and Clock PM */ + return 0; + case POLICY_POWERSAVE: + /* Enable ASPM L0s/L1 */ + return PCIE_LINK_STATE_L0S|PCIE_LINK_STATE_L1; + case POLICY_DEFAULT: + return link_state->bios_aspm_state; + } + return 0; +} + +static int policy_to_clkpm_state(struct pci_dev *pdev) +{ + struct pcie_link_state *link_state = pdev->link_state; + + switch (aspm_policy) { + case POLICY_PERFORMANCE: + /* Disable ASPM and Clock PM */ + return 0; + case POLICY_POWERSAVE: + /* Disable Clock PM */ + return 1; + case POLICY_DEFAULT: + return link_state->bios_clk_state; + } + return 0; +} + +static void pcie_set_clock_pm(struct pci_dev *pdev, int enable) +{ + struct pci_dev *child_dev; + int pos; + u16 reg16; + struct pcie_link_state *link_state = pdev->link_state; + + list_for_each_entry(child_dev, &pdev->subordinate->devices, bus_list) { + pos = pci_find_capability(child_dev, PCI_CAP_ID_EXP); + if (!pos) + return; + pci_read_config_word(child_dev, pos + PCI_EXP_LNKCTL, ®16); + if (enable) + reg16 |= PCI_EXP_LNKCTL_CLKREQ_EN; + else + reg16 &= ~PCI_EXP_LNKCTL_CLKREQ_EN; + pci_write_config_word(child_dev, pos + PCI_EXP_LNKCTL, reg16); + } + link_state->clk_pm_enabled = !!enable; +} + +static void pcie_check_clock_pm(struct pci_dev *pdev) +{ + int pos; + u32 reg32; + u16 reg16; + int capable = 1, enabled = 1; + struct pci_dev *child_dev; + struct pcie_link_state *link_state = pdev->link_state; + + /* All functions should have the same cap and state, take the worst */ + list_for_each_entry(child_dev, &pdev->subordinate->devices, bus_list) { + pos = pci_find_capability(child_dev, PCI_CAP_ID_EXP); + if (!pos) + return; + pci_read_config_dword(child_dev, pos + PCI_EXP_LNKCAP, ®32); + if (!(reg32 & PCI_EXP_LNKCAP_CLKPM)) { + capable = 0; + enabled = 0; + break; + } + pci_read_config_word(child_dev, pos + PCI_EXP_LNKCTL, ®16); + if (!(reg16 & PCI_EXP_LNKCTL_CLKREQ_EN)) + enabled = 0; + } + link_state->clk_pm_capable = capable; + link_state->clk_pm_enabled = enabled; + link_state->bios_clk_state = enabled; + pcie_set_clock_pm(pdev, policy_to_clkpm_state(pdev)); +} + +/* + * pcie_aspm_configure_common_clock: check if the 2 ends of a link + * could use common clock. If they are, configure them to use the + * common clock. That will reduce the ASPM state exit latency. + */ +static void pcie_aspm_configure_common_clock(struct pci_dev *pdev) +{ + int pos, child_pos; + u16 reg16 = 0; + struct pci_dev *child_dev; + int same_clock = 1; + + /* + * all functions of a slot should have the same Slot Clock + * Configuration, so just check one function + * */ + child_dev = list_entry(pdev->subordinate->devices.next, struct pci_dev, + bus_list); + BUG_ON(!child_dev->is_pcie); + + /* Check downstream component if bit Slot Clock Configuration is 1 */ + child_pos = pci_find_capability(child_dev, PCI_CAP_ID_EXP); + pci_read_config_word(child_dev, child_pos + PCI_EXP_LNKSTA, ®16); + if (!(reg16 & PCI_EXP_LNKSTA_SLC)) + same_clock = 0; + + /* Check upstream component if bit Slot Clock Configuration is 1 */ + pos = pci_find_capability(pdev, PCI_CAP_ID_EXP); + pci_read_config_word(pdev, pos + PCI_EXP_LNKSTA, ®16); + if (!(reg16 & PCI_EXP_LNKSTA_SLC)) + same_clock = 0; + + /* Configure downstream component, all functions */ + list_for_each_entry(child_dev, &pdev->subordinate->devices, bus_list) { + child_pos = pci_find_capability(child_dev, PCI_CAP_ID_EXP); + pci_read_config_word(child_dev, child_pos + PCI_EXP_LNKCTL, + ®16); + if (same_clock) + reg16 |= PCI_EXP_LNKCTL_CCC; + else + reg16 &= ~PCI_EXP_LNKCTL_CCC; + pci_write_config_word(child_dev, child_pos + PCI_EXP_LNKCTL, + reg16); + } + + /* Configure upstream component */ + pci_read_config_word(pdev, pos + PCI_EXP_LNKCTL, ®16); + if (same_clock) + reg16 |= PCI_EXP_LNKCTL_CCC; + else + reg16 &= ~PCI_EXP_LNKCTL_CCC; + pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16); + + /* retrain link */ + reg16 |= PCI_EXP_LNKCTL_RL; + pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16); + + /* Wait for link training end */ + while (1) { + pci_read_config_word(pdev, pos + PCI_EXP_LNKSTA, ®16); + if (!(reg16 & PCI_EXP_LNKSTA_LT)) + break; + cpu_relax(); + } +} + +/* + * calc_L0S_latency: Convert L0s latency encoding to ns + */ +static unsigned int calc_L0S_latency(unsigned int latency_encoding, int ac) +{ + unsigned int ns = 64; + + if (latency_encoding == 0x7) { + if (ac) + ns = -1U; + else + ns = 5*1000; /* > 4us */ + } else + ns *= (1 << latency_encoding); + return ns; +} + +/* + * calc_L1_latency: Convert L1 latency encoding to ns + */ +static unsigned int calc_L1_latency(unsigned int latency_encoding, int ac) +{ + unsigned int ns = 1000; + + if (latency_encoding == 0x7) { + if (ac) + ns = -1U; + else + ns = 65*1000; /* > 64us */ + } else + ns *= (1 << latency_encoding); + return ns; +} + +static void pcie_aspm_get_cap_device(struct pci_dev *pdev, u32 *state, + unsigned int *l0s, unsigned int *l1, unsigned int *enabled) +{ + int pos; + u16 reg16; + u32 reg32; + unsigned int latency; + + pos = pci_find_capability(pdev, PCI_CAP_ID_EXP); + pci_read_config_dword(pdev, pos + PCI_EXP_LNKCAP, ®32); + *state = (reg32 & PCI_EXP_LNKCAP_ASPMS) >> 10; + if (*state != PCIE_LINK_STATE_L0S && + *state != (PCIE_LINK_STATE_L1|PCIE_LINK_STATE_L0S)) + * state = 0; + if (*state == 0) + return; + + latency = (reg32 & PCI_EXP_LNKCAP_L0SEL) >> 12; + *l0s = calc_L0S_latency(latency, 0); + if (*state & PCIE_LINK_STATE_L1) { + latency = (reg32 & PCI_EXP_LNKCAP_L1EL) >> 15; + *l1 = calc_L1_latency(latency, 0); + } + pci_read_config_word(pdev, pos + PCI_EXP_LNKCTL, ®16); + *enabled = reg16 & (PCIE_LINK_STATE_L0S|PCIE_LINK_STATE_L1); +} + +static void pcie_aspm_cap_init(struct pci_dev *pdev) +{ + struct pci_dev *child_dev; + u32 state, tmp; + struct pcie_link_state *link_state = pdev->link_state; + + /* upstream component states */ + pcie_aspm_get_cap_device(pdev, &link_state->support_state, + &link_state->l0s_upper_latency, + &link_state->l1_upper_latency, + &link_state->enabled_state); + /* downstream component states, all functions have the same setting */ + child_dev = list_entry(pdev->subordinate->devices.next, struct pci_dev, + bus_list); + pcie_aspm_get_cap_device(child_dev, &state, + &link_state->l0s_down_latency, + &link_state->l1_down_latency, + &tmp); + link_state->support_state &= state; + if (!link_state->support_state) + return; + link_state->enabled_state &= link_state->support_state; + link_state->bios_aspm_state = link_state->enabled_state; + + /* ENDPOINT states*/ + list_for_each_entry(child_dev, &pdev->subordinate->devices, bus_list) { + int pos; + u32 reg32; + unsigned int latency; + struct endpoint_state *ep_state = + &link_state->endpoints[PCI_FUNC(child_dev->devfn)]; + + if (child_dev->pcie_type != PCI_EXP_TYPE_ENDPOINT && + child_dev->pcie_type != PCI_EXP_TYPE_LEG_END) + continue; + + pos = pci_find_capability(child_dev, PCI_CAP_ID_EXP); + pci_read_config_dword(child_dev, pos + PCI_EXP_DEVCAP, ®32); + latency = (reg32 & PCI_EXP_DEVCAP_L0S) >> 6; + latency = calc_L0S_latency(latency, 1); + ep_state->l0s_acceptable_latency = latency; + if (link_state->support_state & PCIE_LINK_STATE_L1) { + latency = (reg32 & PCI_EXP_DEVCAP_L1) >> 9; + latency = calc_L1_latency(latency, 1); + ep_state->l1_acceptable_latency = latency; + } + } +} + +static unsigned int __pcie_aspm_check_state_one(struct pci_dev *pdev, + unsigned int state) +{ + struct pci_dev *parent_dev, *tmp_dev; + unsigned int latency, l1_latency = 0; + struct pcie_link_state *link_state; + struct endpoint_state *ep_state; + + parent_dev = pdev->bus->self; + link_state = parent_dev->link_state; + state &= link_state->support_state; + if (state == 0) + return 0; + ep_state = &link_state->endpoints[PCI_FUNC(pdev->devfn)]; + + /* + * Check latency for endpoint device. + * TBD: The latency from the endpoint to root complex vary per + * switch's upstream link state above the device. Here we just do a + * simple check which assumes all links above the device can be in L1 + * state, that is we just consider the worst case. If switch's upstream + * link can't be put into L0S/L1, then our check is too strictly. + */ + tmp_dev = pdev; + while (state & (PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1)) { + parent_dev = tmp_dev->bus->self; + link_state = parent_dev->link_state; + if (state & PCIE_LINK_STATE_L0S) { + latency = max_t(unsigned int, + link_state->l0s_upper_latency, + link_state->l0s_down_latency); + if (latency > ep_state->l0s_acceptable_latency) + state &= ~PCIE_LINK_STATE_L0S; + } + if (state & PCIE_LINK_STATE_L1) { + latency = max_t(unsigned int, + link_state->l1_upper_latency, + link_state->l1_down_latency); + if (latency + l1_latency > + ep_state->l1_acceptable_latency) + state &= ~PCIE_LINK_STATE_L1; + } + if (!parent_dev->bus->self) /* parent_dev is a root port */ + break; + else { + /* + * parent_dev is the downstream port of a switch, make + * tmp_dev the upstream port of the switch + */ + tmp_dev = parent_dev->bus->self; + /* + * every switch on the path to root complex need 1 more + * microsecond for L1. Spec doesn't mention L0S. + */ + if (state & PCIE_LINK_STATE_L1) + l1_latency += 1000; + } + } + return state; +} + +static unsigned int pcie_aspm_check_state(struct pci_dev *pdev, + unsigned int state) +{ + struct pci_dev *child_dev; + + /* If no child, disable the link */ + if (list_empty(&pdev->subordinate->devices)) + return 0; + list_for_each_entry(child_dev, &pdev->subordinate->devices, bus_list) { + if (child_dev->pcie_type == PCI_EXP_TYPE_PCI_BRIDGE) { + /* + * If downstream component of a link is pci bridge, we + * disable ASPM for now for the link + * */ + state = 0; + break; + } + if ((child_dev->pcie_type != PCI_EXP_TYPE_ENDPOINT && + child_dev->pcie_type != PCI_EXP_TYPE_LEG_END)) + continue; + /* Device not in D0 doesn't need check latency */ + if (child_dev->current_state == PCI_D1 || + child_dev->current_state == PCI_D2 || + child_dev->current_state == PCI_D3hot || + child_dev->current_state == PCI_D3cold) + continue; + state = __pcie_aspm_check_state_one(child_dev, state); + } + return state; +} + +static void __pcie_aspm_config_one_dev(struct pci_dev *pdev, unsigned int state) +{ + u16 reg16; + int pos = pci_find_capability(pdev, PCI_CAP_ID_EXP); + + pci_read_config_word(pdev, pos + PCI_EXP_LNKCTL, ®16); + reg16 &= ~0x3; + reg16 |= state; + pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16); +} + +static void __pcie_aspm_config_link(struct pci_dev *pdev, unsigned int state) +{ + struct pci_dev *child_dev; + int valid = 1; + struct pcie_link_state *link_state = pdev->link_state; + + /* + * if the downstream component has pci bridge function, don't do ASPM + * now + */ + list_for_each_entry(child_dev, &pdev->subordinate->devices, bus_list) { + if (child_dev->pcie_type == PCI_EXP_TYPE_PCI_BRIDGE) { + valid = 0; + break; + } + } + if (!valid) + return; + + /* + * spec 2.0 suggests all functions should be configured the same + * setting for ASPM. Enabling ASPM L1 should be done in upstream + * component first and then downstream, and vice versa for disabling + * ASPM L1. Spec doesn't mention L0S. + */ + if (state & PCIE_LINK_STATE_L1) + __pcie_aspm_config_one_dev(pdev, state); + + list_for_each_entry(child_dev, &pdev->subordinate->devices, bus_list) + __pcie_aspm_config_one_dev(child_dev, state); + + if (!(state & PCIE_LINK_STATE_L1)) + __pcie_aspm_config_one_dev(pdev, state); + + link_state->enabled_state = state; +} + +static void __pcie_aspm_configure_link_state(struct pci_dev *pdev, + unsigned int state) +{ + struct pcie_link_state *link_state = pdev->link_state; + + if (link_state->support_state == 0) + return; + state &= PCIE_LINK_STATE_L0S|PCIE_LINK_STATE_L1; + + /* state 0 means disabling aspm */ + state = pcie_aspm_check_state(pdev, state); + if (link_state->enabled_state == state) + return; + __pcie_aspm_config_link(pdev, state); +} + +/* + * pcie_aspm_configure_link_state: enable/disable PCI express link state + * @pdev: the root port or switch downstream port + */ +static void pcie_aspm_configure_link_state(struct pci_dev *pdev, + unsigned int state) +{ + down_read(&pci_bus_sem); + mutex_lock(&aspm_lock); + __pcie_aspm_configure_link_state(pdev, state); + mutex_unlock(&aspm_lock); + up_read(&pci_bus_sem); +} + +static void free_link_state(struct pci_dev *pdev) +{ + kfree(pdev->link_state); + pdev->link_state = NULL; +} + +/* + * pcie_aspm_init_link_state: Initiate PCI express link state. + * It is called after the pcie and its children devices are scaned. + * @pdev: the root port or switch downstream port + */ +void pcie_aspm_init_link_state(struct pci_dev *pdev) +{ + unsigned int state; + struct pcie_link_state *link_state; + int error = 0; + + if (aspm_disabled || !pdev->is_pcie || pdev->link_state) + return; + if (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && + pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) + return; + down_read(&pci_bus_sem); + if (list_empty(&pdev->subordinate->devices)) + goto out; + + mutex_lock(&aspm_lock); + + link_state = kzalloc(sizeof(*link_state), GFP_KERNEL); + if (!link_state) + goto unlock_out; + pdev->link_state = link_state; + + pcie_aspm_configure_common_clock(pdev); + + pcie_aspm_cap_init(pdev); + + /* config link state to avoid BIOS error */ + state = pcie_aspm_check_state(pdev, policy_to_aspm_state(pdev)); + __pcie_aspm_config_link(pdev, state); + + pcie_check_clock_pm(pdev); + + link_state->pdev = pdev; + list_add(&link_state->sibiling, &link_list); + +unlock_out: + if (error) + free_link_state(pdev); + mutex_unlock(&aspm_lock); +out: + up_read(&pci_bus_sem); +} + +/* @pdev: the endpoint device */ +void pcie_aspm_exit_link_state(struct pci_dev *pdev) +{ + struct pci_dev *parent = pdev->bus->self; + struct pcie_link_state *link_state = parent->link_state; + + if (aspm_disabled || !pdev->is_pcie || !parent || !link_state) + return; + if (parent->pcie_type != PCI_EXP_TYPE_ROOT_PORT && + parent->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) + return; + down_read(&pci_bus_sem); + mutex_lock(&aspm_lock); + + /* + * All PCIe functions are in one slot, remove one function will remove + * the the whole slot, so just wait + */ + if (!list_empty(&parent->subordinate->devices)) + goto out; + + /* All functions are removed, so just disable ASPM for the link */ + __pcie_aspm_config_one_dev(parent, 0); + list_del(&link_state->sibiling); + /* Clock PM is for endpoint device */ + + free_link_state(parent); +out: + mutex_unlock(&aspm_lock); + up_read(&pci_bus_sem); +} + +/* @pdev: the root port or switch downstream port */ +void pcie_aspm_pm_state_change(struct pci_dev *pdev) +{ + struct pcie_link_state *link_state = pdev->link_state; + + if (aspm_disabled || !pdev->is_pcie || !pdev->link_state) + return; + if (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && + pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) + return; + /* + * devices changed PM state, we should recheck if latency meets all + * functions' requirement + */ + pcie_aspm_configure_link_state(pdev, link_state->enabled_state); +} + +/* + * pci_disable_link_state - disable pci device's link state, so the link will + * never enter specific states + */ +void pci_disable_link_state(struct pci_dev *pdev, int state) +{ + struct pci_dev *parent = pdev->bus->self; + struct pcie_link_state *link_state; + + if (aspm_disabled || !pdev->is_pcie) + return; + if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT || + pdev->pcie_type == PCI_EXP_TYPE_DOWNSTREAM) + parent = pdev; + if (!parent) + return; + + down_read(&pci_bus_sem); + mutex_lock(&aspm_lock); + link_state = parent->link_state; + link_state->support_state &= + ~(state & (PCIE_LINK_STATE_L0S|PCIE_LINK_STATE_L1)); + if (state & PCIE_LINK_STATE_CLKPM) + link_state->clk_pm_capable = 0; + + __pcie_aspm_configure_link_state(parent, link_state->enabled_state); + if (!link_state->clk_pm_capable && link_state->clk_pm_enabled) + pcie_set_clock_pm(parent, 0); + mutex_unlock(&aspm_lock); + up_read(&pci_bus_sem); +} +EXPORT_SYMBOL(pci_disable_link_state); + +static int pcie_aspm_set_policy(const char *val, struct kernel_param *kp) +{ + int i; + struct pci_dev *pdev; + struct pcie_link_state *link_state; + + for (i = 0; i < ARRAY_SIZE(policy_str); i++) + if (!strncmp(val, policy_str[i], strlen(policy_str[i]))) + break; + if (i >= ARRAY_SIZE(policy_str)) + return -EINVAL; + if (i == aspm_policy) + return 0; + + down_read(&pci_bus_sem); + mutex_lock(&aspm_lock); + aspm_policy = i; + list_for_each_entry(link_state, &link_list, sibiling) { + pdev = link_state->pdev; + __pcie_aspm_configure_link_state(pdev, + policy_to_aspm_state(pdev)); + if (link_state->clk_pm_capable && + link_state->clk_pm_enabled != policy_to_clkpm_state(pdev)) + pcie_set_clock_pm(pdev, policy_to_clkpm_state(pdev)); + + } + mutex_unlock(&aspm_lock); + up_read(&pci_bus_sem); + return 0; +} + +static int pcie_aspm_get_policy(char *buffer, struct kernel_param *kp) +{ + int i, cnt = 0; + for (i = 0; i < ARRAY_SIZE(policy_str); i++) + if (i == aspm_policy) + cnt += sprintf(buffer + cnt, "[%s] ", policy_str[i]); + else + cnt += sprintf(buffer + cnt, "%s ", policy_str[i]); + return cnt; +} + +module_param_call(policy, pcie_aspm_set_policy, pcie_aspm_get_policy, + NULL, 0644); + +#ifdef CONFIG_PCIEASPM_DEBUG +static ssize_t link_state_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct pci_dev *pci_device = to_pci_dev(dev); + struct pcie_link_state *link_state = pci_device->link_state; + + return sprintf(buf, "%d\n", link_state->enabled_state); +} + +static ssize_t link_state_store(struct device *dev, + struct device_attribute *attr, + const char *buf, + size_t n) +{ + struct pci_dev *pci_device = to_pci_dev(dev); + int state; + + if (n < 1) + return -EINVAL; + state = buf[0]-'0'; + if (state >= 0 && state <= 3) { + /* setup link aspm state */ + pcie_aspm_configure_link_state(pci_device, state); + return n; + } + + return -EINVAL; +} + +static ssize_t clk_ctl_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct pci_dev *pci_device = to_pci_dev(dev); + struct pcie_link_state *link_state = pci_device->link_state; + + return sprintf(buf, "%d\n", link_state->clk_pm_enabled); +} + +static ssize_t clk_ctl_store(struct device *dev, + struct device_attribute *attr, + const char *buf, + size_t n) +{ + struct pci_dev *pci_device = to_pci_dev(dev); + int state; + + if (n < 1) + return -EINVAL; + state = buf[0]-'0'; + + down_read(&pci_bus_sem); + mutex_lock(&aspm_lock); + pcie_set_clock_pm(pci_device, !!state); + mutex_unlock(&aspm_lock); + up_read(&pci_bus_sem); + + return n; +} + +static DEVICE_ATTR(link_state, 0644, link_state_show, link_state_store); +static DEVICE_ATTR(clk_ctl, 0644, clk_ctl_show, clk_ctl_store); + +static char power_group[] = "power"; +void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev) +{ + struct pcie_link_state *link_state = pdev->link_state; + + if (!pdev->is_pcie || (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && + pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)) + return; + + if (link_state->support_state) + sysfs_add_file_to_group(&pdev->dev.kobj, + &dev_attr_link_state.attr, power_group); + if (link_state->clk_pm_capable) + sysfs_add_file_to_group(&pdev->dev.kobj, + &dev_attr_clk_ctl.attr, power_group); +} + +void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev) +{ + struct pcie_link_state *link_state = pdev->link_state; + + if (!pdev->is_pcie || (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && + pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)) + return; + + if (link_state->support_state) + sysfs_remove_file_from_group(&pdev->dev.kobj, + &dev_attr_link_state.attr, power_group); + if (link_state->clk_pm_capable) + sysfs_remove_file_from_group(&pdev->dev.kobj, + &dev_attr_clk_ctl.attr, power_group); +} +#endif + +static int __init pcie_aspm_disable(char *str) +{ + aspm_disabled = 1; + return 1; +} + +__setup("pcie_noaspm", pcie_aspm_disable); + +static int __init pcie_aspm_init(void) +{ + if (aspm_disabled) + return 0; + pci_osc_support_set(OSC_ACTIVE_STATE_PWR_SUPPORT| + OSC_CLOCK_PWR_CAPABILITY_SUPPORT); + return 0; +} + +fs_initcall(pcie_aspm_init); diff --git a/trunk/drivers/pci/probe.c b/trunk/drivers/pci/probe.c index 7f5dab34d315..8b505bd925aa 100644 --- a/trunk/drivers/pci/probe.c +++ b/trunk/drivers/pci/probe.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "pci.h" #define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */ @@ -433,7 +434,7 @@ pci_alloc_child_bus(struct pci_bus *parent, struct pci_dev *bridge, int busnr) return child; } -struct pci_bus *__ref pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) +struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) { struct pci_bus *child; @@ -948,7 +949,7 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus) up_write(&pci_bus_sem); } -struct pci_dev *__ref pci_scan_single_device(struct pci_bus *bus, int devfn) +struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn) { struct pci_dev *dev; @@ -1001,6 +1002,10 @@ int pci_scan_slot(struct pci_bus *bus, int devfn) break; } } + + if (bus->self) + pcie_aspm_init_link_state(bus->self); + return nr; } @@ -1040,6 +1045,20 @@ unsigned int pci_scan_child_bus(struct pci_bus *bus) return max; } +unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus) +{ + unsigned int max; + + max = pci_scan_child_bus(bus); + + /* + * Make the discovered devices available. + */ + pci_bus_add_devices(bus); + + return max; +} + struct pci_bus * pci_create_bus(struct device *parent, int bus, struct pci_ops *ops, void *sysdata) { @@ -1126,6 +1145,7 @@ EXPORT_SYMBOL(pci_scan_bus_parented); #ifdef CONFIG_HOTPLUG EXPORT_SYMBOL(pci_add_new_bus); +EXPORT_SYMBOL(pci_do_scan_bus); EXPORT_SYMBOL(pci_scan_slot); EXPORT_SYMBOL(pci_scan_bridge); EXPORT_SYMBOL_GPL(pci_scan_child_bus); diff --git a/trunk/drivers/pci/remove.c b/trunk/drivers/pci/remove.c index 9684e1bde277..ec4a82ba29a8 100644 --- a/trunk/drivers/pci/remove.c +++ b/trunk/drivers/pci/remove.c @@ -1,5 +1,6 @@ #include #include +#include #include "pci.h" static void pci_free_resources(struct pci_dev *dev) @@ -30,6 +31,9 @@ static void pci_stop_dev(struct pci_dev *dev) dev->global_list.next = dev->global_list.prev = NULL; up_write(&pci_bus_sem); } + + if (dev->bus->self) + pcie_aspm_exit_link_state(dev); } static void pci_destroy_dev(struct pci_dev *dev) diff --git a/trunk/drivers/pci/setup-bus.c b/trunk/drivers/pci/setup-bus.c index 262b0439abe9..8a7232feb553 100644 --- a/trunk/drivers/pci/setup-bus.c +++ b/trunk/drivers/pci/setup-bus.c @@ -456,7 +456,7 @@ pci_bus_size_cardbus(struct pci_bus *bus) } } -void __ref pci_bus_size_bridges(struct pci_bus *bus) +void pci_bus_size_bridges(struct pci_bus *bus) { struct pci_dev *dev; unsigned long mask, prefmask; @@ -511,7 +511,7 @@ void __ref pci_bus_size_bridges(struct pci_bus *bus) } EXPORT_SYMBOL(pci_bus_size_bridges); -void __ref pci_bus_assign_resources(struct pci_bus *bus) +void pci_bus_assign_resources(struct pci_bus *bus) { struct pci_bus *b; struct pci_dev *dev; diff --git a/trunk/drivers/pcmcia/m32r_pcc.c b/trunk/drivers/pcmcia/m32r_pcc.c index ec4c1253ebbb..c5e0d89c3ece 100644 --- a/trunk/drivers/pcmcia/m32r_pcc.c +++ b/trunk/drivers/pcmcia/m32r_pcc.c @@ -368,7 +368,7 @@ static irqreturn_t pcc_interrupt(int irq, void *dev) handled = 1; irc = pcc_get(i, PCIRC); irc >>=16; - debug(2, "m32r-pcc:interrupt: socket %d pcirc 0x%02x ", i, irc); + debug(2, "m32r-pcc:interrput: socket %d pcirc 0x%02x ", i, irc); if (!irc) continue; diff --git a/trunk/drivers/pcmcia/m8xx_pcmcia.c b/trunk/drivers/pcmcia/m8xx_pcmcia.c index 4ea426a25909..d182760f035b 100644 --- a/trunk/drivers/pcmcia/m8xx_pcmcia.c +++ b/trunk/drivers/pcmcia/m8xx_pcmcia.c @@ -851,7 +851,7 @@ static int m8xx_set_socket(struct pcmcia_socket *sock, socket_state_t * state) I tried to control the CxOE signal with SS_OUTPUT_ENA, but the reset signal seems connected via the 541. If the CxOE is left high are some signals tristated and - no pullups are present -> the cards act weird. + no pullups are present -> the cards act wierd. So right now the buffers are enabled if the power is on. */ if (state->Vcc || state->Vpp) diff --git a/trunk/drivers/scsi/NCR53C9x.h b/trunk/drivers/scsi/NCR53C9x.h index 00a0ba040dba..d85cb73a9f69 100644 --- a/trunk/drivers/scsi/NCR53C9x.h +++ b/trunk/drivers/scsi/NCR53C9x.h @@ -1,6 +1,6 @@ /* NCR53C9x.c: Defines and structures for the NCR53C9x generic driver. * - * Originally esp.h: Defines and structures for the Sparc ESP + * Originaly esp.h: Defines and structures for the Sparc ESP * (Enhanced SCSI Processor) driver under Linux. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) diff --git a/trunk/drivers/scsi/aha1542.c b/trunk/drivers/scsi/aha1542.c index 5a1471c370fa..190568ebea3c 100644 --- a/trunk/drivers/scsi/aha1542.c +++ b/trunk/drivers/scsi/aha1542.c @@ -21,7 +21,7 @@ * Modified by Chris Faulhaber * Added module command-line options * 19-Jul-99 - * Modified by Adam Fritzler + * Modified by Adam Fritzler * Added proper detection of the AHA-1640 (MCA version of AHA-1540) */ diff --git a/trunk/drivers/scsi/aic7xxx/Makefile b/trunk/drivers/scsi/aic7xxx/Makefile index 4c549540a35d..e4f70c563bc2 100644 --- a/trunk/drivers/scsi/aic7xxx/Makefile +++ b/trunk/drivers/scsi/aic7xxx/Makefile @@ -44,8 +44,13 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c # Dependencies for generated files need to be listed explicitly -$(addprefix $(src)/,$(aic7xxx-y:.o=.c)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h -$(addprefix $(src)/,$(aic79xx-y:.o=.c)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h +$(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h +$(obj)/aic7xxx_core.o: $(obj)/aic7xxx_reg.h +$(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h +$(obj)/aic79xx_core.o: $(obj)/aic79xx_reg.h + +$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h +$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_inline.h b/trunk/drivers/scsi/aic7xxx/aic79xx_inline.h index 45e55575a0fa..2ceb67f4af2a 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_inline.h +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_inline.h @@ -417,7 +417,7 @@ ahd_targetcmd_offset(struct ahd_softc *ahd, u_int index) - (uint8_t *)ahd->qoutfifo); } -/*********************** Miscellaneous Support Functions ***********************/ +/*********************** Miscelaneous Support Functions ***********************/ static __inline struct ahd_initiator_tinfo * ahd_fetch_transinfo(struct ahd_softc *ahd, char channel, u_int our_id, diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_osm.c b/trunk/drivers/scsi/aic7xxx/aic79xx_osm.c index 72fccd9f40df..014654792901 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -325,7 +325,7 @@ MODULE_PARM_DESC(aic79xx, " verbose Enable verbose/diagnostic logging\n" " allow_memio Allow device registers to be memory mapped\n" " debug Bitmask of debug values to enable\n" -" no_reset Suppress initial bus resets\n" +" no_reset Supress initial bus resets\n" " extended Enable extended geometry on all controllers\n" " periodic_otag Send an ordered tagged transaction\n" " periodically to prevent tag starvation.\n" diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_pci.c b/trunk/drivers/scsi/aic7xxx/aic79xx_pci.c index c9f79fdf9131..df853676e66a 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_pci.c +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_pci.c @@ -979,7 +979,7 @@ ahd_aic790X_setup(struct ahd_softc *ahd) | AHD_FAINT_LED_BUG; /* - * IO Cell parameter setup. + * IO Cell paramter setup. */ AHD_SET_PRECOMP(ahd, AHD_PRECOMP_CUTBACK_29); @@ -1006,7 +1006,7 @@ ahd_aic790X_setup(struct ahd_softc *ahd) ahd->bugs |= AHD_INTCOLLISION_BUG|AHD_ABORT_LQI_BUG; /* - * IO Cell parameter setup. + * IO Cell paramter setup. */ AHD_SET_PRECOMP(ahd, AHD_PRECOMP_CUTBACK_29); AHD_SET_SLEWRATE(ahd, AHD_SLEWRATE_DEF_REVB); diff --git a/trunk/drivers/scsi/aic7xxx/aic7xxx_inline.h b/trunk/drivers/scsi/aic7xxx/aic7xxx_inline.h index cba2f23bbe79..8e1954cdd84f 100644 --- a/trunk/drivers/scsi/aic7xxx/aic7xxx_inline.h +++ b/trunk/drivers/scsi/aic7xxx/aic7xxx_inline.h @@ -229,7 +229,7 @@ ahc_name(struct ahc_softc *ahc) return (ahc->name); } -/*********************** Miscellaneous Support Functions ***********************/ +/*********************** Miscelaneous Support Functions ***********************/ static __inline void ahc_update_residual(struct ahc_softc *ahc, struct scb *scb); diff --git a/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c b/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c index 282aff6f852e..99a3b33a3233 100644 --- a/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -347,7 +347,7 @@ MODULE_PARM_DESC(aic7xxx, " debug Bitmask of debug values to enable\n" " no_probe Toggle EISA/VLB controller probing\n" " probe_eisa_vl Toggle EISA/VLB controller probing\n" -" no_reset Suppress initial bus resets\n" +" no_reset Supress initial bus resets\n" " extended Enable extended geometry on all controllers\n" " periodic_otag Send an ordered tagged transaction\n" " periodically to prevent tag starvation.\n" diff --git a/trunk/drivers/scsi/ipr.c b/trunk/drivers/scsi/ipr.c index 2074701f7e76..73270ff892d9 100644 --- a/trunk/drivers/scsi/ipr.c +++ b/trunk/drivers/scsi/ipr.c @@ -7053,7 +7053,7 @@ static pci_ers_result_t ipr_pci_error_detected(struct pci_dev *pdev, * where it can accept new commands. * Return value: - * 0 on success / -EIO on failure + * 0 on sucess / -EIO on failure **/ static int __devinit ipr_probe_ioa_part2(struct ipr_ioa_cfg *ioa_cfg) { diff --git a/trunk/drivers/scsi/ips.c b/trunk/drivers/scsi/ips.c index bb152fb9fec7..7505cca8e68e 100644 --- a/trunk/drivers/scsi/ips.c +++ b/trunk/drivers/scsi/ips.c @@ -1309,7 +1309,7 @@ ips_intr_copperhead(ips_ha_t * ha) cstatus.value = (*ha->func.statupd) (ha); if (cstatus.fields.command_id > (IPS_MAX_CMDS - 1)) { - /* Spurious Interrupt ? */ + /* Spurious Interupt ? */ continue; } diff --git a/trunk/drivers/scsi/lpfc/lpfc.h b/trunk/drivers/scsi/lpfc/lpfc.h index 83567b9755b4..f26b9538affe 100644 --- a/trunk/drivers/scsi/lpfc/lpfc.h +++ b/trunk/drivers/scsi/lpfc/lpfc.h @@ -325,7 +325,7 @@ struct lpfc_vport { #define WORKER_MBOX_TMO 0x100 /* hba: MBOX timeout */ #define WORKER_HB_TMO 0x200 /* hba: Heart beat timeout */ -#define WORKER_FABRIC_BLOCK_TMO 0x400 /* hba: fabric block timeout */ +#define WORKER_FABRIC_BLOCK_TMO 0x400 /* hba: fabric block timout */ #define WORKER_RAMP_DOWN_QUEUE 0x800 /* hba: Decrease Q depth */ #define WORKER_RAMP_UP_QUEUE 0x1000 /* hba: Increase Q depth */ diff --git a/trunk/drivers/scsi/lpfc/lpfc_init.c b/trunk/drivers/scsi/lpfc/lpfc_init.c index 6cfeba7454d4..29b4cf9e059b 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_init.c +++ b/trunk/drivers/scsi/lpfc/lpfc_init.c @@ -1894,7 +1894,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) uint16_t iotag; int bars = pci_select_bars(pdev, IORESOURCE_MEM); - if (pci_enable_device_mem(pdev)) + if (pci_enable_device_bars(pdev, bars)) goto out; if (pci_request_selected_regions(pdev, bars, LPFC_DRIVER_NAME)) goto out_disable_device; diff --git a/trunk/drivers/scsi/lpfc/lpfc_mbox.c b/trunk/drivers/scsi/lpfc/lpfc_mbox.c index 7a9be4c5b7cb..dfc63f6ccd7b 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_mbox.c +++ b/trunk/drivers/scsi/lpfc/lpfc_mbox.c @@ -880,7 +880,7 @@ lpfc_mbox_get(struct lpfc_hba * phba) void lpfc_mbox_cmpl_put(struct lpfc_hba * phba, LPFC_MBOXQ_t * mbq) { - /* This function expects to be called from interrupt context */ + /* This function expects to be called from interupt context */ spin_lock(&phba->hbalock); list_add_tail(&mbq->list, &phba->sli.mboxq_cmpl); spin_unlock(&phba->hbalock); diff --git a/trunk/drivers/scsi/megaraid/megaraid_mbox.c b/trunk/drivers/scsi/megaraid/megaraid_mbox.c index 9f041929aca5..6db77c00e3ee 100644 --- a/trunk/drivers/scsi/megaraid/megaraid_mbox.c +++ b/trunk/drivers/scsi/megaraid/megaraid_mbox.c @@ -3464,12 +3464,12 @@ megaraid_mbox_setup_device_map(adapter_t *adapter) /* * START: Interface for the common management module * - * This is the module, which interfaces with the common management module to + * This is the module, which interfaces with the common mangement module to * provide support for ioctl and sysfs */ /** - * megaraid_cmm_register - register with the management module + * megaraid_cmm_register - register with the mangement module * @adapter : HBA soft state * * Register with the management module, which allows applications to issue @@ -3557,7 +3557,7 @@ megaraid_cmm_register(adapter_t *adapter) /** - * megaraid_cmm_unregister - un-register with the management module + * megaraid_cmm_unregister - un-register with the mangement module * @adapter : HBA soft state * * Un-register with the management module. @@ -3579,7 +3579,7 @@ megaraid_cmm_unregister(adapter_t *adapter) * @kioc : CMM interface packet * @action : command action * - * This routine is invoked whenever the Common Management Module (CMM) has a + * This routine is invoked whenever the Common Mangement Module (CMM) has a * command for us. The 'action' parameter specifies if this is a new command * or otherwise. */ @@ -3944,7 +3944,7 @@ megaraid_sysfs_get_ldmap_timeout(unsigned long data) * * This routine will be called whenever user reads the logical drive * attributes, go get the current logical drive mapping table from the - * firmware. We use the management API's to issue commands to the controller. + * firmware. We use the managment API's to issue commands to the controller. * * NOTE: The commands issuance functionality is not generalized and * implemented in context of "get ld map" command only. If required, the diff --git a/trunk/drivers/scsi/qla2xxx/qla_gs.c b/trunk/drivers/scsi/qla2xxx/qla_gs.c index 6226d88479f5..eb0784c9ff83 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_gs.c +++ b/trunk/drivers/scsi/qla2xxx/qla_gs.c @@ -1094,7 +1094,7 @@ qla2x00_sns_rnn_id(scsi_qla_host_t *ha) } /** - * qla2x00_mgmt_svr_login() - Login to fabric Management Service. + * qla2x00_mgmt_svr_login() - Login to fabric Managment Service. * @ha: HA context * * Returns 0 on success. diff --git a/trunk/drivers/scsi/qla4xxx/ql4_def.h b/trunk/drivers/scsi/qla4xxx/ql4_def.h index d6be0762eb91..accaf690eaf0 100644 --- a/trunk/drivers/scsi/qla4xxx/ql4_def.h +++ b/trunk/drivers/scsi/qla4xxx/ql4_def.h @@ -121,7 +121,7 @@ #define MAX_REQS_SERVICED_PER_INTR 16 #define ISCSI_IPADDR_SIZE 4 /* IP address size */ -#define ISCSI_ALIAS_SIZE 32 /* ISCSI Alias name size */ +#define ISCSI_ALIAS_SIZE 32 /* ISCSI Alais name size */ #define ISCSI_NAME_SIZE 0xE0 /* ISCSI Name size */ #define LSDW(x) ((u32)((u64)(x))) diff --git a/trunk/drivers/scsi/qla4xxx/ql4_init.c b/trunk/drivers/scsi/qla4xxx/ql4_init.c index 49925f92555e..cbe0a17ced5f 100644 --- a/trunk/drivers/scsi/qla4xxx/ql4_init.c +++ b/trunk/drivers/scsi/qla4xxx/ql4_init.c @@ -1098,7 +1098,7 @@ static int qla4xxx_start_firmware(struct scsi_qla_host *ha) } config_chip = 1; - /* Reset clears the semaphore, so acquire again */ + /* Reset clears the semaphore, so aquire again */ if (ql4xxx_lock_drvr_wait(ha) != QLA_SUCCESS) return QLA_ERROR; } diff --git a/trunk/drivers/scsi/scsi_tgt_lib.c b/trunk/drivers/scsi/scsi_tgt_lib.c index 3677fbb30b72..91630baea532 100644 --- a/trunk/drivers/scsi/scsi_tgt_lib.c +++ b/trunk/drivers/scsi/scsi_tgt_lib.c @@ -320,7 +320,7 @@ int scsi_tgt_queue_command(struct scsi_cmnd *cmd, u64 itn_id, EXPORT_SYMBOL_GPL(scsi_tgt_queue_command); /* - * This is run from a interrupt handler normally and the unmap + * This is run from a interrpt handler normally and the unmap * needs process context so we must queue */ static void scsi_tgt_cmd_done(struct scsi_cmnd *cmd) diff --git a/trunk/drivers/scsi/scsi_transport_sas.c b/trunk/drivers/scsi/scsi_transport_sas.c index 43a964d635b4..f2149d0bb999 100644 --- a/trunk/drivers/scsi/scsi_transport_sas.c +++ b/trunk/drivers/scsi/scsi_transport_sas.c @@ -6,7 +6,7 @@ * * The SAS transport class contains common code to deal with SAS HBAs, * an aproximated representation of SAS topologies in the driver model, - * and various sysfs attributes to expose these topologies and management + * and various sysfs attributes to expose these topologies and managment * interfaces to userspace. * * In addition to the basic SCSI core objects this transport class diff --git a/trunk/drivers/serial/Kconfig b/trunk/drivers/serial/Kconfig index 4fa7927997ad..8a053ea21e1d 100644 --- a/trunk/drivers/serial/Kconfig +++ b/trunk/drivers/serial/Kconfig @@ -1295,8 +1295,8 @@ config SERIAL_NETX_CONSOLE depends on SERIAL_NETX select SERIAL_CORE_CONSOLE help - If you have enabled the serial port on the Hilscher NetX SoC - you can make it the console by answering Y to this option. + If you have enabled the serial port on the Motorola IMX + CPU you can make it the console by answering Y to this option. config SERIAL_OF_PLATFORM tristate "Serial port on Open Firmware platform bus" diff --git a/trunk/drivers/serial/icom.h b/trunk/drivers/serial/icom.h index c8029e0025c9..027455496745 100644 --- a/trunk/drivers/serial/icom.h +++ b/trunk/drivers/serial/icom.h @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include #define BAUD_TABLE_LIMIT ((sizeof(icom_acfg_baud)/sizeof(int)) - 1) static int icom_acfg_baud[] = { diff --git a/trunk/drivers/serial/mux.c b/trunk/drivers/serial/mux.c index e94031731a47..83211013deb8 100644 --- a/trunk/drivers/serial/mux.c +++ b/trunk/drivers/serial/mux.c @@ -582,7 +582,7 @@ static struct parisc_driver serial_mux_driver = { }; /** - * mux_init - Serial MUX initialization procedure. + * mux_init - Serial MUX initalization procedure. * * Register the Serial MUX driver. */ diff --git a/trunk/drivers/spi/spi_imx.c b/trunk/drivers/spi/spi_imx.c index 639963eb1ac1..2cd8573fb09c 100644 --- a/trunk/drivers/spi/spi_imx.c +++ b/trunk/drivers/spi/spi_imx.c @@ -157,7 +157,7 @@ #define SPI_FIFO_BYTE_WIDTH (2) #define SPI_FIFO_OVERFLOW_MARGIN (2) -/* DMA burst length for half full/empty request trigger */ +/* DMA burst lenght for half full/empty request trigger */ #define SPI_DMA_BLR (SPI_FIFO_DEPTH * SPI_FIFO_BYTE_WIDTH / 2) /* Dummy char output to achieve reads. diff --git a/trunk/drivers/ssb/b43_pci_bridge.c b/trunk/drivers/ssb/b43_pci_bridge.c index 2d27d6d6d08e..1a31f7a72848 100644 --- a/trunk/drivers/ssb/b43_pci_bridge.c +++ b/trunk/drivers/ssb/b43_pci_bridge.c @@ -1,7 +1,7 @@ /* * Broadcom 43xx PCI-SSB bridge module * - * This technically is a separate PCI driver module, but + * This technically is a seperate PCI driver module, but * because of its small size we include it in the SSB core * instead of creating a standalone module. * diff --git a/trunk/drivers/video/aty/radeon_pm.c b/trunk/drivers/video/aty/radeon_pm.c index 675abdafc2d8..83ee3e75386c 100644 --- a/trunk/drivers/video/aty/radeon_pm.c +++ b/trunk/drivers/video/aty/radeon_pm.c @@ -2561,7 +2561,7 @@ static void radeon_set_suspend(struct radeonfb_info *rinfo, int suspend) pci_read_config_dword(rinfo->pdev, i * 4, &rinfo->cfg_save[i]); - /* Switch PCI power management to D2. */ + /* Switch PCI power managment to D2. */ pci_disable_device(rinfo->pdev); for (;;) { pci_read_config_word( diff --git a/trunk/drivers/video/cyblafb.c b/trunk/drivers/video/cyblafb.c index 9704b73135f5..e23324d10be2 100644 --- a/trunk/drivers/video/cyblafb.c +++ b/trunk/drivers/video/cyblafb.c @@ -1156,7 +1156,7 @@ static struct fb_ops cyblafb_ops __devinitdata = { // need altered timings to display correctly. So I decided that it is much // better to provide a limited optimized set of modes plus the option of // using the mode in effect at startup time (might be selected using the -// vga=??? parameter). After that the user might use fbset to select any +// vga=??? paramter). After that the user might use fbset to select any // mode he likes, check_var will not try to alter geometry parameters as // it would be necessary otherwise. // diff --git a/trunk/drivers/video/intelfb/intelfb.h b/trunk/drivers/video/intelfb/intelfb.h index 836796177942..2fe3f7def530 100644 --- a/trunk/drivers/video/intelfb/intelfb.h +++ b/trunk/drivers/video/intelfb/intelfb.h @@ -111,7 +111,7 @@ #define FIXED_MODE(d) ((d)->fixed_mode) -/*** Driver parameters ***/ +/*** Driver paramters ***/ #define RINGBUFFER_SIZE KB(64) #define HW_CURSOR_SIZE KB(4) diff --git a/trunk/drivers/video/omap/lcdc.c b/trunk/drivers/video/omap/lcdc.c index fb19ed4992db..9085188d815e 100644 --- a/trunk/drivers/video/omap/lcdc.c +++ b/trunk/drivers/video/omap/lcdc.c @@ -312,7 +312,7 @@ static irqreturn_t lcdc_irq_handler(int irq, void *dev_id) /* * Change to a new video mode. We defer this to a later time to avoid any * flicker and not to mess up the current LCD DMA context. For this we disable - * the LCD controller, which will generate a DONE irq after the last frame has + * the LCD controler, which will generate a DONE irq after the last frame has * been transferred. Then it'll be safe to reconfigure both the LCD controller * as well as the LCD DMA. */ diff --git a/trunk/drivers/video/sm501fb.c b/trunk/drivers/video/sm501fb.c index 58f200c69be3..1be95a68d696 100644 --- a/trunk/drivers/video/sm501fb.c +++ b/trunk/drivers/video/sm501fb.c @@ -48,7 +48,7 @@ enum sm501_controller { HEAD_PANEL = 1, }; -/* SM501 memory address */ +/* SM501 memory adress */ struct sm501_mem { unsigned long size; unsigned long sm_addr; diff --git a/trunk/drivers/watchdog/shwdt.c b/trunk/drivers/watchdog/shwdt.c index 61dde863bd40..cecbedd473a4 100644 --- a/trunk/drivers/watchdog/shwdt.c +++ b/trunk/drivers/watchdog/shwdt.c @@ -52,7 +52,7 @@ * overflow periods respectively. * * Also, since we can't really expect userspace to be responsive enough - * before the overflow happens, we maintain two separate timers .. One in + * before the overflow happens, we maintain two seperate timers .. One in * the kernel for clearing out WOVF every 2ms or so (again, this depends on * HZ == 1000), and another for monitoring userspace writes to the WDT device. * diff --git a/trunk/fs/befs/btree.c b/trunk/fs/befs/btree.c index 4202db7496cb..af5bb93276f8 100644 --- a/trunk/fs/befs/btree.c +++ b/trunk/fs/befs/btree.c @@ -232,7 +232,7 @@ befs_bt_read_node(struct super_block *sb, befs_data_stream * ds, * @key: Key string to lookup in btree * @value: Value stored with @key * - * On success, returns BEFS_OK and sets *@value to the value stored + * On sucess, returns BEFS_OK and sets *@value to the value stored * with @key (usually the disk block number of an inode). * * On failure, returns BEFS_ERR or BEFS_BT_NOT_FOUND. diff --git a/trunk/fs/befs/datastream.c b/trunk/fs/befs/datastream.c index e3287d0d1a58..aacb4da6298a 100644 --- a/trunk/fs/befs/datastream.c +++ b/trunk/fs/befs/datastream.c @@ -236,7 +236,7 @@ befs_count_blocks(struct super_block * sb, befs_data_stream * ds) as in the indirect region code). When/if blockno is found, if blockno is inside of a block - run as stored on disk, we offset the start and length members + run as stored on disk, we offset the start and lenght members of the block run, so that blockno is the start and len is still valid (the run ends in the same place). diff --git a/trunk/fs/binfmt_elf.c b/trunk/fs/binfmt_elf.c index 4628c42ca892..18ed6dd906c1 100644 --- a/trunk/fs/binfmt_elf.c +++ b/trunk/fs/binfmt_elf.c @@ -117,7 +117,7 @@ static int padzero(unsigned long elf_bss) return 0; } -/* Let's use some macros to make this stack manipulation a little clearer */ +/* Let's use some macros to make this stack manipulation a litle clearer */ #ifdef CONFIG_STACK_GROWSUP #define STACK_ADD(sp, items) ((elf_addr_t __user *)(sp) + (items)) #define STACK_ROUND(sp, items) \ diff --git a/trunk/fs/freevxfs/vxfs_dir.h b/trunk/fs/freevxfs/vxfs_dir.h index aaf1fb098639..3c96d6e63978 100644 --- a/trunk/fs/freevxfs/vxfs_dir.h +++ b/trunk/fs/freevxfs/vxfs_dir.h @@ -41,7 +41,7 @@ * VxFS directory block header. * * This entry is the head of every filesystem block in a directory. - * It is used for free space management and additionally includes + * It is used for free space managment and additionally includes * a hash for speeding up directory search (lookup). * * The hash may be empty and in fact we do not use it all in the diff --git a/trunk/fs/freevxfs/vxfs_immed.c b/trunk/fs/freevxfs/vxfs_immed.c index 8a5959a61ba9..24b5a775ff96 100644 --- a/trunk/fs/freevxfs/vxfs_immed.c +++ b/trunk/fs/freevxfs/vxfs_immed.c @@ -54,7 +54,7 @@ const struct inode_operations vxfs_immed_symlink_iops = { }; /* - * Address space operations for immed files and directories. + * Adress space operations for immed files and directories. */ const struct address_space_operations vxfs_immed_aops = { .readpage = vxfs_immed_readpage, diff --git a/trunk/fs/gfs2/recovery.c b/trunk/fs/gfs2/recovery.c index 6fb07d67ca8a..b249e294a95b 100644 --- a/trunk/fs/gfs2/recovery.c +++ b/trunk/fs/gfs2/recovery.c @@ -450,7 +450,7 @@ int gfs2_recover_journal(struct gfs2_jdesc *jd) fs_info(sdp, "jid=%u: Trying to acquire journal lock...\n", jd->jd_jid); - /* Acquire the journal lock so we can do recovery */ + /* Aquire the journal lock so we can do recovery */ error = gfs2_glock_nq_num(sdp, jd->jd_jid, &gfs2_journal_glops, LM_ST_EXCLUSIVE, diff --git a/trunk/fs/jffs2/readinode.c b/trunk/fs/jffs2/readinode.c index 6c1ba3566f58..2eae5d2dbebe 100644 --- a/trunk/fs/jffs2/readinode.c +++ b/trunk/fs/jffs2/readinode.c @@ -741,7 +741,7 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref * are not obsolete. * * Of course, this optimization only makes sense in case - * of NAND flashes (or other flashes with + * of NAND flashes (or other flashes whith * !jffs2_can_mark_obsolete()), since on NOR flashes * nodes are marked obsolete physically. * diff --git a/trunk/fs/jfs/jfs_xtree.c b/trunk/fs/jfs/jfs_xtree.c index a000aaa75136..1543906a2e0d 100644 --- a/trunk/fs/jfs/jfs_xtree.c +++ b/trunk/fs/jfs/jfs_xtree.c @@ -3965,7 +3965,7 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag) * xtTruncate_pmap() * * function: - * Perform truncate to zero length for deleted file, leaving the + * Perform truncate to zero lenghth for deleted file, leaving the * the xtree and working map untouched. This allows the file to * be accessed via open file handles, while the delete of the file * is committed to disk. diff --git a/trunk/fs/locks.c b/trunk/fs/locks.c index 49354b9c7dc1..8b8388eca05e 100644 --- a/trunk/fs/locks.c +++ b/trunk/fs/locks.c @@ -125,7 +125,6 @@ #include #include #include -#include #include #include @@ -186,7 +185,6 @@ void locks_init_lock(struct file_lock *fl) fl->fl_fasync = NULL; fl->fl_owner = NULL; fl->fl_pid = 0; - fl->fl_nspid = NULL; fl->fl_file = NULL; fl->fl_flags = 0; fl->fl_type = 0; @@ -555,8 +553,6 @@ static void locks_insert_lock(struct file_lock **pos, struct file_lock *fl) { list_add(&fl->fl_link, &file_lock_list); - fl->fl_nspid = get_pid(task_tgid(current)); - /* insert into file's list */ fl->fl_next = *pos; *pos = fl; @@ -588,11 +584,6 @@ static void locks_delete_lock(struct file_lock **thisfl_p) if (fl->fl_ops && fl->fl_ops->fl_remove) fl->fl_ops->fl_remove(fl); - if (fl->fl_nspid) { - put_pid(fl->fl_nspid); - fl->fl_nspid = NULL; - } - locks_wake_up_blocks(fl); locks_free_lock(fl); } @@ -643,6 +634,33 @@ static int flock_locks_conflict(struct file_lock *caller_fl, struct file_lock *s return (locks_conflict(caller_fl, sys_fl)); } +static int interruptible_sleep_on_locked(wait_queue_head_t *fl_wait, int timeout) +{ + int result = 0; + DECLARE_WAITQUEUE(wait, current); + + __set_current_state(TASK_INTERRUPTIBLE); + add_wait_queue(fl_wait, &wait); + if (timeout == 0) + schedule(); + else + result = schedule_timeout(timeout); + if (signal_pending(current)) + result = -ERESTARTSYS; + remove_wait_queue(fl_wait, &wait); + __set_current_state(TASK_RUNNING); + return result; +} + +static int locks_block_on_timeout(struct file_lock *blocker, struct file_lock *waiter, int time) +{ + int result; + locks_insert_block(blocker, waiter); + result = interruptible_sleep_on_locked(&waiter->fl_wait, time); + __locks_delete_block(waiter); + return result; +} + void posix_test_lock(struct file *filp, struct file_lock *fl) { @@ -655,67 +673,55 @@ posix_test_lock(struct file *filp, struct file_lock *fl) if (posix_locks_conflict(fl, cfl)) break; } - if (cfl) { + if (cfl) __locks_copy_lock(fl, cfl); - if (cfl->fl_nspid) - fl->fl_pid = pid_nr_ns(cfl->fl_nspid, - task_active_pid_ns(current)); - } else + else fl->fl_type = F_UNLCK; unlock_kernel(); return; } + EXPORT_SYMBOL(posix_test_lock); -/* - * Deadlock detection: - * - * We attempt to detect deadlocks that are due purely to posix file - * locks. +/* This function tests for deadlock condition before putting a process to + * sleep. The detection scheme is no longer recursive. Recursive was neat, + * but dangerous - we risked stack corruption if the lock data was bad, or + * if the recursion was too deep for any other reason. * - * We assume that a task can be waiting for at most one lock at a time. - * So for any acquired lock, the process holding that lock may be - * waiting on at most one other lock. That lock in turns may be held by - * someone waiting for at most one other lock. Given a requested lock - * caller_fl which is about to wait for a conflicting lock block_fl, we - * follow this chain of waiters to ensure we are not about to create a - * cycle. + * We rely on the fact that a task can only be on one lock's wait queue + * at a time. When we find blocked_task on a wait queue we can re-search + * with blocked_task equal to that queue's owner, until either blocked_task + * isn't found, or blocked_task is found on a queue owned by my_task. * - * Since we do this before we ever put a process to sleep on a lock, we - * are ensured that there is never a cycle; that is what guarantees that - * the while() loop in posix_locks_deadlock() eventually completes. + * Note: the above assumption may not be true when handling lock requests + * from a broken NFS client. But broken NFS clients have a lot more to + * worry about than proper deadlock detection anyway... --okir * - * Note: the above assumption may not be true when handling lock - * requests from a broken NFS client. It may also fail in the presence - * of tasks (such as posix threads) sharing the same open file table. - * - * To handle those cases, we just bail out after a few iterations. + * However, the failure of this assumption (also possible in the case of + * multiple tasks sharing the same open file table) also means there's no + * guarantee that the loop below will terminate. As a hack, we give up + * after a few iterations. */ #define MAX_DEADLK_ITERATIONS 10 -/* Find a lock that the owner of the given block_fl is blocking on. */ -static struct file_lock *what_owner_is_waiting_for(struct file_lock *block_fl) -{ - struct file_lock *fl; - - list_for_each_entry(fl, &blocked_list, fl_link) { - if (posix_same_owner(fl, block_fl)) - return fl->fl_next; - } - return NULL; -} - static int posix_locks_deadlock(struct file_lock *caller_fl, struct file_lock *block_fl) { + struct file_lock *fl; int i = 0; - while ((block_fl = what_owner_is_waiting_for(block_fl))) { - if (i++ > MAX_DEADLK_ITERATIONS) - return 0; - if (posix_same_owner(caller_fl, block_fl)) - return 1; +next_task: + if (posix_same_owner(caller_fl, block_fl)) + return 1; + list_for_each_entry(fl, &blocked_list, fl_link) { + if (posix_same_owner(fl, block_fl)) { + if (i++ > MAX_DEADLK_ITERATIONS) + return 0; + fl = fl->fl_next; + block_fl = fl; + goto next_task; + } } return 0; } @@ -1250,10 +1256,7 @@ int __break_lease(struct inode *inode, unsigned int mode) if (break_time == 0) break_time++; } - locks_insert_block(flock, new_fl); - error = wait_event_interruptible_timeout(new_fl->fl_wait, - !new_fl->fl_next, break_time); - __locks_delete_block(new_fl); + error = locks_block_on_timeout(flock, new_fl, break_time); if (error >= 0) { if (error == 0) time_out_leases(inode); @@ -2081,12 +2084,6 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl, int id, char *pfx) { struct inode *inode = NULL; - unsigned int fl_pid; - - if (fl->fl_nspid) - fl_pid = pid_nr_ns(fl->fl_nspid, task_active_pid_ns(current)); - else - fl_pid = fl->fl_pid; if (fl->fl_file != NULL) inode = fl->fl_file->f_path.dentry->d_inode; @@ -2127,16 +2124,16 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl, } if (inode) { #ifdef WE_CAN_BREAK_LSLK_NOW - seq_printf(f, "%d %s:%ld ", fl_pid, + seq_printf(f, "%d %s:%ld ", fl->fl_pid, inode->i_sb->s_id, inode->i_ino); #else /* userspace relies on this representation of dev_t ;-( */ - seq_printf(f, "%d %02x:%02x:%ld ", fl_pid, + seq_printf(f, "%d %02x:%02x:%ld ", fl->fl_pid, MAJOR(inode->i_sb->s_dev), MINOR(inode->i_sb->s_dev), inode->i_ino); #endif } else { - seq_printf(f, "%d :0 ", fl_pid); + seq_printf(f, "%d :0 ", fl->fl_pid); } if (IS_POSIX(fl)) { if (fl->fl_end == OFFSET_MAX) diff --git a/trunk/fs/ncpfs/mmap.c b/trunk/fs/ncpfs/mmap.c index 5d8dcb9ee326..a94473d3072c 100644 --- a/trunk/fs/ncpfs/mmap.c +++ b/trunk/fs/ncpfs/mmap.c @@ -50,6 +50,10 @@ static int ncp_file_mmap_fault(struct vm_area_struct *area, pos = vmf->pgoff << PAGE_SHIFT; count = PAGE_SIZE; + if ((unsigned long)vmf->virtual_address + PAGE_SIZE > area->vm_end) { + WARN_ON(1); /* shouldn't happen? */ + count = area->vm_end - (unsigned long)vmf->virtual_address; + } /* what we can read in one go */ bufsize = NCP_SERVER(inode)->buffer_size; diff --git a/trunk/fs/ocfs2/alloc.c b/trunk/fs/ocfs2/alloc.c index 64713e149e46..e6df06ac6405 100644 --- a/trunk/fs/ocfs2/alloc.c +++ b/trunk/fs/ocfs2/alloc.c @@ -3338,7 +3338,7 @@ static int ocfs2_insert_path(struct inode *inode, if (insert->ins_split != SPLIT_NONE) { /* * We could call ocfs2_insert_at_leaf() for some types - * of splits, but it's easier to just let one separate + * of splits, but it's easier to just let one seperate * function sort it all out. */ ocfs2_split_record(inode, left_path, right_path, diff --git a/trunk/fs/ocfs2/dir.c b/trunk/fs/ocfs2/dir.c index e280833ceb9a..6b0107f21344 100644 --- a/trunk/fs/ocfs2/dir.c +++ b/trunk/fs/ocfs2/dir.c @@ -1215,7 +1215,7 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh, down_write(&oi->ip_alloc_sem); /* - * Prepare for worst case allocation scenario of two separate + * Prepare for worst case allocation scenario of two seperate * extents. */ if (alloc == 2) diff --git a/trunk/fs/ocfs2/ocfs1_fs_compat.h b/trunk/fs/ocfs2/ocfs1_fs_compat.h index dfb313bda5dd..0b499bccec5a 100644 --- a/trunk/fs/ocfs2/ocfs1_fs_compat.h +++ b/trunk/fs/ocfs2/ocfs1_fs_compat.h @@ -77,7 +77,7 @@ struct ocfs1_disk_lock { /*00*/ __u32 curr_master; __u8 file_lock; - __u8 compat_pad[3]; /* Not in original definition. Used to + __u8 compat_pad[3]; /* Not in orignal definition. Used to make the already existing alignment explicit */ __u64 last_write_time; diff --git a/trunk/fs/ocfs2/suballoc.c b/trunk/fs/ocfs2/suballoc.c index 72c198a004df..7e397e2c25dd 100644 --- a/trunk/fs/ocfs2/suballoc.c +++ b/trunk/fs/ocfs2/suballoc.c @@ -646,7 +646,7 @@ int ocfs2_reserve_clusters(struct ocfs2_super *osb, * sync-data inodes." * * Note: OCFS2 already does this differently for metadata vs data - * allocations, as those bitmaps are separate and undo access is never + * allocations, as those bitmaps are seperate and undo access is never * called on a metadata group descriptor. */ static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh, diff --git a/trunk/fs/reiserfs/bitmap.c b/trunk/fs/reiserfs/bitmap.c index f491ceb5af02..16b331dd9913 100644 --- a/trunk/fs/reiserfs/bitmap.c +++ b/trunk/fs/reiserfs/bitmap.c @@ -272,7 +272,7 @@ static inline int block_group_used(struct super_block *s, u32 id) /* If we don't have cached information on this bitmap block, we're * going to have to load it later anyway. Loading it here allows us - * to make a better decision. This favors long-term performance gain + * to make a better decision. This favors long-term performace gain * with a better on-disk layout vs. a short term gain of skipping the * read and potentially having a bad placement. */ if (info->free_count == UINT_MAX) { @@ -663,7 +663,7 @@ static inline void new_hashed_relocation(reiserfs_blocknr_hint_t * hint) /* * Relocation based on dirid, hashing them into a given bitmap block - * files. Formatted nodes are unaffected, a separate policy covers them + * files. Formatted nodes are unaffected, a seperate policy covers them */ static void dirid_groups(reiserfs_blocknr_hint_t * hint) { @@ -688,7 +688,7 @@ static void dirid_groups(reiserfs_blocknr_hint_t * hint) /* * Relocation based on oid, hashing them into a given bitmap block - * files. Formatted nodes are unaffected, a separate policy covers them + * files. Formatted nodes are unaffected, a seperate policy covers them */ static void oid_groups(reiserfs_blocknr_hint_t * hint) { diff --git a/trunk/fs/signalfd.c b/trunk/fs/signalfd.c index 2d3e107da2d3..fb7f7e8034df 100644 --- a/trunk/fs/signalfd.c +++ b/trunk/fs/signalfd.c @@ -66,7 +66,7 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo, BUILD_BUG_ON(sizeof(struct signalfd_siginfo) != 128); /* - * Unused members should be zero ... + * Unused memebers should be zero ... */ err = __clear_user(uinfo, sizeof(*uinfo)); diff --git a/trunk/include/acpi/acpixf.h b/trunk/include/acpi/acpixf.h index d970f7f99549..b729e64d0d4c 100644 --- a/trunk/include/acpi/acpixf.h +++ b/trunk/include/acpi/acpixf.h @@ -85,7 +85,7 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function); #endif /* - * ACPI Memory management + * ACPI Memory managment */ void *acpi_allocate(u32 size); diff --git a/trunk/include/acpi/processor.h b/trunk/include/acpi/processor.h index 6e253b5b0f3b..76411b1fc4fd 100644 --- a/trunk/include/acpi/processor.h +++ b/trunk/include/acpi/processor.h @@ -182,7 +182,7 @@ struct acpi_processor_throttling { /* Limit Interface */ struct acpi_processor_lx { - int px; /* performance state */ + int px; /* performace state */ int tx; /* throttle level */ }; diff --git a/trunk/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h b/trunk/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h index 1205c28a2078..5d949d763a91 100644 --- a/trunk/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h +++ b/trunk/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h @@ -587,23 +587,23 @@ #define UICR1_IM14 (1 << 6) /* Interrupt mask ep 14 */ #define UICR1_IM15 (1 << 7) /* Interrupt mask ep 15 */ -#define USIR0_IR0 (1 << 0) /* Interrupt request ep 0 */ -#define USIR0_IR1 (1 << 1) /* Interrupt request ep 1 */ -#define USIR0_IR2 (1 << 2) /* Interrupt request ep 2 */ -#define USIR0_IR3 (1 << 3) /* Interrupt request ep 3 */ -#define USIR0_IR4 (1 << 4) /* Interrupt request ep 4 */ -#define USIR0_IR5 (1 << 5) /* Interrupt request ep 5 */ -#define USIR0_IR6 (1 << 6) /* Interrupt request ep 6 */ -#define USIR0_IR7 (1 << 7) /* Interrupt request ep 7 */ - -#define USIR1_IR8 (1 << 0) /* Interrupt request ep 8 */ -#define USIR1_IR9 (1 << 1) /* Interrupt request ep 9 */ -#define USIR1_IR10 (1 << 2) /* Interrupt request ep 10 */ -#define USIR1_IR11 (1 << 3) /* Interrupt request ep 11 */ -#define USIR1_IR12 (1 << 4) /* Interrupt request ep 12 */ -#define USIR1_IR13 (1 << 5) /* Interrupt request ep 13 */ -#define USIR1_IR14 (1 << 6) /* Interrupt request ep 14 */ -#define USIR1_IR15 (1 << 7) /* Interrupt request ep 15 */ +#define USIR0_IR0 (1 << 0) /* Interrup request ep 0 */ +#define USIR0_IR1 (1 << 1) /* Interrup request ep 1 */ +#define USIR0_IR2 (1 << 2) /* Interrup request ep 2 */ +#define USIR0_IR3 (1 << 3) /* Interrup request ep 3 */ +#define USIR0_IR4 (1 << 4) /* Interrup request ep 4 */ +#define USIR0_IR5 (1 << 5) /* Interrup request ep 5 */ +#define USIR0_IR6 (1 << 6) /* Interrup request ep 6 */ +#define USIR0_IR7 (1 << 7) /* Interrup request ep 7 */ + +#define USIR1_IR8 (1 << 0) /* Interrup request ep 8 */ +#define USIR1_IR9 (1 << 1) /* Interrup request ep 9 */ +#define USIR1_IR10 (1 << 2) /* Interrup request ep 10 */ +#define USIR1_IR11 (1 << 3) /* Interrup request ep 11 */ +#define USIR1_IR12 (1 << 4) /* Interrup request ep 12 */ +#define USIR1_IR13 (1 << 5) /* Interrup request ep 13 */ +#define USIR1_IR14 (1 << 6) /* Interrup request ep 14 */ +#define USIR1_IR15 (1 << 7) /* Interrup request ep 15 */ #define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */ diff --git a/trunk/include/asm-arm/arch-pxa/pxa-regs.h b/trunk/include/asm-arm/arch-pxa/pxa-regs.h index 16ed24dbda4e..442494d71f12 100644 --- a/trunk/include/asm-arm/arch-pxa/pxa-regs.h +++ b/trunk/include/asm-arm/arch-pxa/pxa-regs.h @@ -737,25 +737,25 @@ #define USIR0 __REG(0x40600058) /* UDC Status Interrupt Register 0 */ -#define USIR0_IR0 (1 << 0) /* Interrupt request ep 0 */ -#define USIR0_IR1 (1 << 1) /* Interrupt request ep 1 */ -#define USIR0_IR2 (1 << 2) /* Interrupt request ep 2 */ -#define USIR0_IR3 (1 << 3) /* Interrupt request ep 3 */ -#define USIR0_IR4 (1 << 4) /* Interrupt request ep 4 */ -#define USIR0_IR5 (1 << 5) /* Interrupt request ep 5 */ -#define USIR0_IR6 (1 << 6) /* Interrupt request ep 6 */ -#define USIR0_IR7 (1 << 7) /* Interrupt request ep 7 */ +#define USIR0_IR0 (1 << 0) /* Interrup request ep 0 */ +#define USIR0_IR1 (1 << 1) /* Interrup request ep 1 */ +#define USIR0_IR2 (1 << 2) /* Interrup request ep 2 */ +#define USIR0_IR3 (1 << 3) /* Interrup request ep 3 */ +#define USIR0_IR4 (1 << 4) /* Interrup request ep 4 */ +#define USIR0_IR5 (1 << 5) /* Interrup request ep 5 */ +#define USIR0_IR6 (1 << 6) /* Interrup request ep 6 */ +#define USIR0_IR7 (1 << 7) /* Interrup request ep 7 */ #define USIR1 __REG(0x4060005C) /* UDC Status Interrupt Register 1 */ -#define USIR1_IR8 (1 << 0) /* Interrupt request ep 8 */ -#define USIR1_IR9 (1 << 1) /* Interrupt request ep 9 */ -#define USIR1_IR10 (1 << 2) /* Interrupt request ep 10 */ -#define USIR1_IR11 (1 << 3) /* Interrupt request ep 11 */ -#define USIR1_IR12 (1 << 4) /* Interrupt request ep 12 */ -#define USIR1_IR13 (1 << 5) /* Interrupt request ep 13 */ -#define USIR1_IR14 (1 << 6) /* Interrupt request ep 14 */ -#define USIR1_IR15 (1 << 7) /* Interrupt request ep 15 */ +#define USIR1_IR8 (1 << 0) /* Interrup request ep 8 */ +#define USIR1_IR9 (1 << 1) /* Interrup request ep 9 */ +#define USIR1_IR10 (1 << 2) /* Interrup request ep 10 */ +#define USIR1_IR11 (1 << 3) /* Interrup request ep 11 */ +#define USIR1_IR12 (1 << 4) /* Interrup request ep 12 */ +#define USIR1_IR13 (1 << 5) /* Interrup request ep 13 */ +#define USIR1_IR14 (1 << 6) /* Interrup request ep 14 */ +#define USIR1_IR15 (1 << 7) /* Interrup request ep 15 */ #elif defined(CONFIG_PXA27x) @@ -1020,7 +1020,7 @@ #define ICSR0 __REG(0x40800014) /* ICP Status Register 0 */ #define ICSR1 __REG(0x40800018) /* ICP Status Register 1 */ -#define ICCR0_AME (1 << 7) /* Address match enable */ +#define ICCR0_AME (1 << 7) /* Adress match enable */ #define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */ #define ICCR0_RIE (1 << 5) /* Recieve FIFO interrupt enable */ #define ICCR0_RXE (1 << 4) /* Receive enable */ diff --git a/trunk/include/asm-arm/arch-versatile/irqs.h b/trunk/include/asm-arm/arch-versatile/irqs.h index f7263b99403b..745aa841b31a 100644 --- a/trunk/include/asm-arm/arch-versatile/irqs.h +++ b/trunk/include/asm-arm/arch-versatile/irqs.h @@ -22,7 +22,7 @@ #include /* - * IRQ interrupts definitions are the same as the INT definitions + * IRQ interrupts definitions are the same the INT definitions * held within platform.h */ #define IRQ_VIC_START 0 @@ -94,7 +94,7 @@ #define IRQMASK_VICSOURCE31 INTMASK_VICSOURCE31 /* - * FIQ interrupts definitions are the same as the INT definitions. + * FIQ interrupts definitions are the same the INT definitions. */ #define FIQ_WDOGINT INT_WDOGINT #define FIQ_SOFTINT INT_SOFTINT diff --git a/trunk/include/asm-arm/hardware/it8152.h b/trunk/include/asm-arm/hardware/it8152.h index 74b5fff7f575..aaebb61aca48 100644 --- a/trunk/include/asm-arm/hardware/it8152.h +++ b/trunk/include/asm-arm/hardware/it8152.h @@ -42,7 +42,7 @@ extern unsigned long it8152_base_address; #define IT8152_GPIO_GPDR __REG_IT8152(0x3f00500) /* - Interrupt controller per register summary: + Interrup contoler per register summary: --------------------------------------- LCDNIRR: IT8152_LD_IRQ(8) PCICLK stop diff --git a/trunk/include/asm-arm/mach/udc_pxa2xx.h b/trunk/include/asm-arm/mach/udc_pxa2xx.h index f9f3606986c2..f191e147ea90 100644 --- a/trunk/include/asm-arm/mach/udc_pxa2xx.h +++ b/trunk/include/asm-arm/mach/udc_pxa2xx.h @@ -16,7 +16,7 @@ struct pxa2xx_udc_mach_info { #define PXA2XX_UDC_CMD_DISCONNECT 1 /* so host won't see us */ /* Boards following the design guidelines in the developer's manual, - * with on-chip GPIOs not Lubbock's weird hardware, can have a sane + * with on-chip GPIOs not Lubbock's wierd hardware, can have a sane * VBUS IRQ and omit the methods above. Store the GPIO number * here; for GPIO 0, also mask in one of the pxa_gpio_mode() bits. * Note that sometimes the signals go through inverters... diff --git a/trunk/include/asm-frv/atomic.h b/trunk/include/asm-frv/atomic.h index 6ec494a5bc5a..d425d8d0ad77 100644 --- a/trunk/include/asm-frv/atomic.h +++ b/trunk/include/asm-frv/atomic.h @@ -1,7 +1,7 @@ /* atomic.h: atomic operation emulation for FR-V * * For an explanation of how atomic ops work in this arch, see: - * Documentation/frv/atomic-ops.txt + * Documentation/fujitsu/frv/atomic-ops.txt * * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) diff --git a/trunk/include/asm-frv/bitops.h b/trunk/include/asm-frv/bitops.h index 5f86b876b298..e29de7131b79 100644 --- a/trunk/include/asm-frv/bitops.h +++ b/trunk/include/asm-frv/bitops.h @@ -1,7 +1,7 @@ /* bitops.h: bit operations for the Fujitsu FR-V CPUs * * For an explanation of how atomic ops work in this arch, see: - * Documentation/frv/atomic-ops.txt + * Documentation/fujitsu/frv/atomic-ops.txt * * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) diff --git a/trunk/include/asm-frv/cacheflush.h b/trunk/include/asm-frv/cacheflush.h index 432a69e7f3d4..02500405a6fb 100644 --- a/trunk/include/asm-frv/cacheflush.h +++ b/trunk/include/asm-frv/cacheflush.h @@ -29,7 +29,7 @@ #define flush_dcache_mmap_unlock(mapping) do {} while(0) /* - * physically-indexed cache management + * physically-indexed cache managment * - see arch/frv/lib/cache.S */ extern void frv_dcache_writeback(unsigned long start, unsigned long size); diff --git a/trunk/include/asm-frv/highmem.h b/trunk/include/asm-frv/highmem.h index 26cefcde5cee..ff4d6cdeb152 100644 --- a/trunk/include/asm-frv/highmem.h +++ b/trunk/include/asm-frv/highmem.h @@ -4,7 +4,7 @@ * Written by David Howells (dhowells@redhat.com) * - Derived from include/asm-i386/highmem.h * - * See Documentation/frv/mmu-layout.txt for more information. + * See Documentation/fujitsu/frv/mmu-layout.txt for more information. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/trunk/include/asm-frv/mem-layout.h b/trunk/include/asm-frv/mem-layout.h index 83532252b8be..aaf2a773d9d3 100644 --- a/trunk/include/asm-frv/mem-layout.h +++ b/trunk/include/asm-frv/mem-layout.h @@ -39,7 +39,7 @@ #ifdef CONFIG_MMU -/* see Documentation/frv/mmu-layout.txt */ +/* see Documentation/fujitsu/frv/mmu-layout.txt */ #define KERNEL_LOWMEM_START __UL(0xc0000000) #define KERNEL_LOWMEM_END __UL(0xd0000000) #define VMALLOC_START __UL(0xd0000000) diff --git a/trunk/include/asm-frv/pgtable.h b/trunk/include/asm-frv/pgtable.h index 3c402afb9e74..147e995bec24 100644 --- a/trunk/include/asm-frv/pgtable.h +++ b/trunk/include/asm-frv/pgtable.h @@ -93,7 +93,7 @@ extern unsigned long empty_zero_page; /* * we use 2-level page tables, folding the PMD (mid-level table) into the PGE (top-level entry) - * [see Documentation/frv/mmu-layout.txt] + * [see Documentation/fujitsu/frv/mmu-layout.txt] * * Page Directory: * - Size: 16KB diff --git a/trunk/include/asm-ia64/compat.h b/trunk/include/asm-ia64/compat.h index dfcf75b8426d..0f6e5264ab8f 100644 --- a/trunk/include/asm-ia64/compat.h +++ b/trunk/include/asm-ia64/compat.h @@ -181,7 +181,7 @@ struct compat_shmid64_ds { /* * A pointer passed in from user mode. This should not be used for syscall parameters, * just declare them as pointers because the syscall entry code will have appropriately - * converted them already. + * comverted them already. */ typedef u32 compat_uptr_t; diff --git a/trunk/include/asm-m68knommu/bitops.h b/trunk/include/asm-m68knommu/bitops.h index c142fbf2f376..f43afe1fc3b3 100644 --- a/trunk/include/asm-m68knommu/bitops.h +++ b/trunk/include/asm-m68knommu/bitops.h @@ -262,7 +262,7 @@ static __inline__ unsigned long ext2_find_next_zero_bit(void *addr, unsigned lon * tmp = __swab32(*(p++)); * tmp |= ~0UL >> (32-offset); * - * but this would decrease performance, so we change the + * but this would decrease preformance, so we change the * shift: */ tmp = *(p++); diff --git a/trunk/include/asm-m68knommu/commproc.h b/trunk/include/asm-m68knommu/commproc.h index 36e870b468ef..0161ebb5d883 100644 --- a/trunk/include/asm-m68knommu/commproc.h +++ b/trunk/include/asm-m68knommu/commproc.h @@ -715,7 +715,7 @@ extern void cpm_install_handler(int vec, void (*handler)(void *), void *dev_id); #define CICR_SCC_SCC3 ((uint)0x00200000) /* SCC3 @ SCCc */ #define CICR_SCB_SCC2 ((uint)0x00040000) /* SCC2 @ SCCb */ #define CICR_SCA_SCC1 ((uint)0x00000000) /* SCC1 @ SCCa */ -#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrupt */ +#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrrupt */ #define CICR_HP_MASK ((uint)0x00001f00) /* Hi-pri int. */ #define CICR_IEN ((uint)0x00000080) /* Int. enable */ #define CICR_SPS ((uint)0x00000001) /* SCC Spread */ diff --git a/trunk/include/asm-m68knommu/delay.h b/trunk/include/asm-m68knommu/delay.h index 55cbd6294ab6..04a20fd051cf 100644 --- a/trunk/include/asm-m68knommu/delay.h +++ b/trunk/include/asm-m68knommu/delay.h @@ -68,7 +68,7 @@ static inline void _udelay(unsigned long usecs) /* * Moved the udelay() function into library code, no longer inlined. * I had to change the algorithm because we are overflowing now on - * the faster ColdFire parts. The code is a little bigger, so it makes + * the faster ColdFire parts. The code is a little biger, so it makes * sense to library it. */ extern void udelay(unsigned long usecs); diff --git a/trunk/include/asm-m68knommu/m5249sim.h b/trunk/include/asm-m68knommu/m5249sim.h index 366eb8602d2f..399814f0b219 100644 --- a/trunk/include/asm-m68knommu/m5249sim.h +++ b/trunk/include/asm-m68knommu/m5249sim.h @@ -43,10 +43,10 @@ #define MCFSIM_CSAR1 0x8c /* CS 1 Address reg (r/w) */ #define MCFSIM_CSMR1 0x90 /* CS 1 Mask reg (r/w) */ #define MCFSIM_CSCR1 0x96 /* CS 1 Control reg (r/w) */ -#define MCFSIM_CSAR2 0x98 /* CS 2 Address reg (r/w) */ +#define MCFSIM_CSAR2 0x98 /* CS 2 Adress reg (r/w) */ #define MCFSIM_CSMR2 0x9c /* CS 2 Mask reg (r/w) */ #define MCFSIM_CSCR2 0xa2 /* CS 2 Control reg (r/w) */ -#define MCFSIM_CSAR3 0xa4 /* CS 3 Address reg (r/w) */ +#define MCFSIM_CSAR3 0xa4 /* CS 3 Adress reg (r/w) */ #define MCFSIM_CSMR3 0xa8 /* CS 3 Mask reg (r/w) */ #define MCFSIM_CSCR3 0xae /* CS 3 Control reg (r/w) */ diff --git a/trunk/include/asm-m68knommu/m5307sim.h b/trunk/include/asm-m68knommu/m5307sim.h index 5886728409c0..d3ce550f6ef4 100644 --- a/trunk/include/asm-m68knommu/m5307sim.h +++ b/trunk/include/asm-m68knommu/m5307sim.h @@ -64,22 +64,22 @@ #define MCFSIM_CSMR7 0xda /* CS 7 Mask reg (r/w) */ #define MCFSIM_CSCR7 0xde /* CS 7 Control reg (r/w) */ #else -#define MCFSIM_CSAR2 0x98 /* CS 2 Address reg (r/w) */ +#define MCFSIM_CSAR2 0x98 /* CS 2 Adress reg (r/w) */ #define MCFSIM_CSMR2 0x9c /* CS 2 Mask reg (r/w) */ #define MCFSIM_CSCR2 0xa2 /* CS 2 Control reg (r/w) */ -#define MCFSIM_CSAR3 0xa4 /* CS 3 Address reg (r/w) */ +#define MCFSIM_CSAR3 0xa4 /* CS 3 Adress reg (r/w) */ #define MCFSIM_CSMR3 0xa8 /* CS 3 Mask reg (r/w) */ #define MCFSIM_CSCR3 0xae /* CS 3 Control reg (r/w) */ -#define MCFSIM_CSAR4 0xb0 /* CS 4 Address reg (r/w) */ +#define MCFSIM_CSAR4 0xb0 /* CS 4 Adress reg (r/w) */ #define MCFSIM_CSMR4 0xb4 /* CS 4 Mask reg (r/w) */ #define MCFSIM_CSCR4 0xba /* CS 4 Control reg (r/w) */ -#define MCFSIM_CSAR5 0xbc /* CS 5 Address reg (r/w) */ +#define MCFSIM_CSAR5 0xbc /* CS 5 Adress reg (r/w) */ #define MCFSIM_CSMR5 0xc0 /* CS 5 Mask reg (r/w) */ #define MCFSIM_CSCR5 0xc6 /* CS 5 Control reg (r/w) */ -#define MCFSIM_CSAR6 0xc8 /* CS 6 Address reg (r/w) */ +#define MCFSIM_CSAR6 0xc8 /* CS 6 Adress reg (r/w) */ #define MCFSIM_CSMR6 0xcc /* CS 6 Mask reg (r/w) */ #define MCFSIM_CSCR6 0xd2 /* CS 6 Control reg (r/w) */ -#define MCFSIM_CSAR7 0xd4 /* CS 7 Address reg (r/w) */ +#define MCFSIM_CSAR7 0xd4 /* CS 7 Adress reg (r/w) */ #define MCFSIM_CSMR7 0xd8 /* CS 7 Mask reg (r/w) */ #define MCFSIM_CSCR7 0xde /* CS 7 Control reg (r/w) */ #endif /* CONFIG_OLDMASK */ diff --git a/trunk/include/asm-m68knommu/m5407sim.h b/trunk/include/asm-m68knommu/m5407sim.h index cc22c4a53005..75dcdacdb298 100644 --- a/trunk/include/asm-m68knommu/m5407sim.h +++ b/trunk/include/asm-m68knommu/m5407sim.h @@ -48,22 +48,22 @@ #define MCFSIM_CSMR1 0x90 /* CS 1 Mask reg (r/w) */ #define MCFSIM_CSCR1 0x96 /* CS 1 Control reg (r/w) */ -#define MCFSIM_CSAR2 0x98 /* CS 2 Address reg (r/w) */ +#define MCFSIM_CSAR2 0x98 /* CS 2 Adress reg (r/w) */ #define MCFSIM_CSMR2 0x9c /* CS 2 Mask reg (r/w) */ #define MCFSIM_CSCR2 0xa2 /* CS 2 Control reg (r/w) */ -#define MCFSIM_CSAR3 0xa4 /* CS 3 Address reg (r/w) */ +#define MCFSIM_CSAR3 0xa4 /* CS 3 Adress reg (r/w) */ #define MCFSIM_CSMR3 0xa8 /* CS 3 Mask reg (r/w) */ #define MCFSIM_CSCR3 0xae /* CS 3 Control reg (r/w) */ -#define MCFSIM_CSAR4 0xb0 /* CS 4 Address reg (r/w) */ +#define MCFSIM_CSAR4 0xb0 /* CS 4 Adress reg (r/w) */ #define MCFSIM_CSMR4 0xb4 /* CS 4 Mask reg (r/w) */ #define MCFSIM_CSCR4 0xba /* CS 4 Control reg (r/w) */ -#define MCFSIM_CSAR5 0xbc /* CS 5 Address reg (r/w) */ +#define MCFSIM_CSAR5 0xbc /* CS 5 Adress reg (r/w) */ #define MCFSIM_CSMR5 0xc0 /* CS 5 Mask reg (r/w) */ #define MCFSIM_CSCR5 0xc6 /* CS 5 Control reg (r/w) */ -#define MCFSIM_CSAR6 0xc8 /* CS 6 Address reg (r/w) */ +#define MCFSIM_CSAR6 0xc8 /* CS 6 Adress reg (r/w) */ #define MCFSIM_CSMR6 0xcc /* CS 6 Mask reg (r/w) */ #define MCFSIM_CSCR6 0xd2 /* CS 6 Control reg (r/w) */ -#define MCFSIM_CSAR7 0xd4 /* CS 7 Address reg (r/w) */ +#define MCFSIM_CSAR7 0xd4 /* CS 7 Adress reg (r/w) */ #define MCFSIM_CSMR7 0xd8 /* CS 7 Mask reg (r/w) */ #define MCFSIM_CSCR7 0xde /* CS 7 Control reg (r/w) */ diff --git a/trunk/include/asm-m68knommu/m68360_regs.h b/trunk/include/asm-m68knommu/m68360_regs.h index d57217ca4f27..a3f8cc8a4a84 100644 --- a/trunk/include/asm-m68knommu/m68360_regs.h +++ b/trunk/include/asm-m68knommu/m68360_regs.h @@ -138,7 +138,7 @@ #define CICR_SCC_SCC3 ((uint)0x00200000) /* SCC3 @ SCCc */ #define CICR_SCD_SCC4 ((uint)0x00c00000) /* SCC4 @ SCCd */ -#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrupt */ +#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrrupt */ #define CICR_HP_MASK ((uint)0x00001f00) /* Hi-pri int. */ #define CICR_VBA_MASK ((uint)0x000000e0) /* Vector Base Address */ #define CICR_SPS ((uint)0x00000001) /* SCC Spread */ diff --git a/trunk/include/asm-m68knommu/mcfuart.h b/trunk/include/asm-m68knommu/mcfuart.h index 8a7a67703ac3..1319a81814b1 100644 --- a/trunk/include/asm-m68knommu/mcfuart.h +++ b/trunk/include/asm-m68knommu/mcfuart.h @@ -71,7 +71,7 @@ struct mcf_platform_uart { #define MCFUART_UTB 0x0c /* Transmit Buffer (w) */ #define MCFUART_UIPCR 0x10 /* Input Port Change (r) */ #define MCFUART_UACR 0x10 /* Auxiliary Control (w) */ -#define MCFUART_UISR 0x14 /* Interrupt Status (r) */ +#define MCFUART_UISR 0x14 /* Interrup Status (r) */ #define MCFUART_UIMR 0x14 /* Interrupt Mask (w) */ #define MCFUART_UBG1 0x18 /* Baud Rate MSB (r/w) */ #define MCFUART_UBG2 0x1c /* Baud Rate LSB (r/w) */ diff --git a/trunk/include/asm-mips/compat.h b/trunk/include/asm-mips/compat.h index ac5d541368e9..568c76cdd900 100644 --- a/trunk/include/asm-mips/compat.h +++ b/trunk/include/asm-mips/compat.h @@ -128,7 +128,7 @@ typedef u32 compat_sigset_word; * A pointer passed in from user mode. This should not * be used for syscall parameters, just declare them * as pointers because the syscall entry code will have - * appropriately converted them already. + * appropriately comverted them already. */ typedef u32 compat_uptr_t; diff --git a/trunk/include/asm-mips/mach-excite/excite_fpga.h b/trunk/include/asm-mips/mach-excite/excite_fpga.h index 0a1ef69bece7..38fcda703a0b 100644 --- a/trunk/include/asm-mips/mach-excite/excite_fpga.h +++ b/trunk/include/asm-mips/mach-excite/excite_fpga.h @@ -3,7 +3,7 @@ /** - * Address alignment of the individual FPGA bytes. + * Adress alignment of the individual FPGA bytes. * The address arrangement of the individual bytes of the FPGA is two * byte aligned at the embedded MK2 platform. */ diff --git a/trunk/include/asm-mips/mach-wrppmc/mach-gt64120.h b/trunk/include/asm-mips/mach-wrppmc/mach-gt64120.h index 83746b84a5ec..00d8bf6164a9 100644 --- a/trunk/include/asm-mips/mach-wrppmc/mach-gt64120.h +++ b/trunk/include/asm-mips/mach-wrppmc/mach-gt64120.h @@ -45,7 +45,7 @@ #define GT_PCI_IO_SIZE 0x02000000UL /* - * PCI interrupts will come in on either the INTA or INTD interrupt lines, + * PCI interrupts will come in on either the INTA or INTD interrups lines, * which are mapped to the #2 and #5 interrupt pins of the MIPS. On our * boards, they all either come in on IntD or they all come in on IntA, they * aren't mixed. There can be numerous PCI interrupts, so we keep a list of the diff --git a/trunk/include/asm-mips/sgi/ip22.h b/trunk/include/asm-mips/sgi/ip22.h index c0501f91719b..f4981c4f16bb 100644 --- a/trunk/include/asm-mips/sgi/ip22.h +++ b/trunk/include/asm-mips/sgi/ip22.h @@ -15,7 +15,7 @@ /* * These are the virtual IRQ numbers, we divide all IRQ's into * 'spaces', the 'space' determines where and how to enable/disable - * that particular IRQ on an SGI machine. HPC DMA and MC DMA interrupts + * that particular IRQ on an SGI machine. HPC DMA and MC DMA interrups * are not supported this way. Driver is supposed to allocate HPC/MC * interrupt as shareable and then look to proper status bit (see * HAL2 driver). This will prevent many complications, trust me ;-) diff --git a/trunk/include/asm-mips/sn/sn0/hubio.h b/trunk/include/asm-mips/sn/sn0/hubio.h index 0187895e556c..ef91b3363554 100644 --- a/trunk/include/asm-mips/sn/sn0/hubio.h +++ b/trunk/include/asm-mips/sn/sn0/hubio.h @@ -338,7 +338,7 @@ typedef union io_perf_cnt { #define IIO_IFDR 0x400398 /* IOQ FIFO Depth */ #define IIO_IIAP 0x4003a0 /* IIQ Arbitration Parameters */ #define IIO_IMMR IIO_IIAP -#define IIO_ICMR 0x4003a8 /* CRB Management Register */ +#define IIO_ICMR 0x4003a8 /* CRB Managment Register */ #define IIO_ICCR 0x4003b0 /* CRB Control Register */ #define IIO_ICTO 0x4003b8 /* CRB Time Out Register */ #define IIO_ICTP 0x4003c0 /* CRB Time Out Prescalar */ diff --git a/trunk/include/asm-parisc/compat.h b/trunk/include/asm-parisc/compat.h index 7f32611a7a5e..5a85d1b025c8 100644 --- a/trunk/include/asm-parisc/compat.h +++ b/trunk/include/asm-parisc/compat.h @@ -132,7 +132,7 @@ typedef u32 compat_sigset_word; * A pointer passed in from user mode. This should not * be used for syscall parameters, just declare them * as pointers because the syscall entry code will have - * appropriately converted them already. + * appropriately comverted them already. */ typedef u32 compat_uptr_t; diff --git a/trunk/include/asm-parisc/elf.h b/trunk/include/asm-parisc/elf.h index 8e7946a141de..f628ac7de83d 100644 --- a/trunk/include/asm-parisc/elf.h +++ b/trunk/include/asm-parisc/elf.h @@ -28,7 +28,7 @@ #define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */ #define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */ -/* Additional section indices. */ +/* Additional section indeces. */ #define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared symbols in ANSI C. */ diff --git a/trunk/include/asm-parisc/linkage.h b/trunk/include/asm-parisc/linkage.h index 0b19a7242d0c..ad8cd0d069ea 100644 --- a/trunk/include/asm-parisc/linkage.h +++ b/trunk/include/asm-parisc/linkage.h @@ -8,7 +8,7 @@ /* * In parisc assembly a semicolon marks a comment while a - * exclamation mark is used to separate independent lines. + * exclamation mark is used to seperate independent lines. */ #ifdef __ASSEMBLY__ diff --git a/trunk/include/asm-parisc/vga.h b/trunk/include/asm-parisc/vga.h index 171399a88ca6..154a84c843a7 100644 --- a/trunk/include/asm-parisc/vga.h +++ b/trunk/include/asm-parisc/vga.h @@ -3,4 +3,4 @@ /* nothing */ -#endif /* __ASM_PARISC_VGA_H__ */ +#endif __ASM_PARISC_VGA_H__ diff --git a/trunk/include/asm-powerpc/compat.h b/trunk/include/asm-powerpc/compat.h index d811a8cd7b58..64ab1ddbdf85 100644 --- a/trunk/include/asm-powerpc/compat.h +++ b/trunk/include/asm-powerpc/compat.h @@ -119,7 +119,7 @@ typedef u32 compat_sigset_word; * A pointer passed in from user mode. This should not * be used for syscall parameters, just declare them * as pointers because the syscall entry code will have - * appropriately converted them already. + * appropriately comverted them already. */ typedef u32 compat_uptr_t; diff --git a/trunk/include/asm-s390/compat.h b/trunk/include/asm-s390/compat.h index de065b32381a..7f4ad623f7d5 100644 --- a/trunk/include/asm-s390/compat.h +++ b/trunk/include/asm-s390/compat.h @@ -149,7 +149,7 @@ typedef u32 compat_sigset_word; * A pointer passed in from user mode. This should not * be used for syscall parameters, just declare them * as pointers because the syscall entry code will have - * appropriately converted them already. + * appropriately comverted them already. */ typedef u32 compat_uptr_t; diff --git a/trunk/include/asm-sparc64/compat.h b/trunk/include/asm-sparc64/compat.h index f260b58f5ce9..01fe6682b405 100644 --- a/trunk/include/asm-sparc64/compat.h +++ b/trunk/include/asm-sparc64/compat.h @@ -152,7 +152,7 @@ typedef u32 compat_sigset_word; * A pointer passed in from user mode. This should not * be used for syscall parameters, just declare them * as pointers because the syscall entry code will have - * appropriately converted them already. + * appropriately comverted them already. */ typedef u32 compat_uptr_t; diff --git a/trunk/include/asm-x86/compat.h b/trunk/include/asm-x86/compat.h index d3e8f3e87ee8..b270ee04959e 100644 --- a/trunk/include/asm-x86/compat.h +++ b/trunk/include/asm-x86/compat.h @@ -190,7 +190,7 @@ typedef struct user_regs_struct32 compat_elf_gregset_t; * A pointer passed in from user mode. This should not * be used for syscall parameters, just declare them * as pointers because the syscall entry code will have - * appropriately converted them already. + * appropriately comverted them already. */ typedef u32 compat_uptr_t; diff --git a/trunk/include/asm-x86/mach-voyager/do_timer.h b/trunk/include/asm-x86/mach-voyager/do_timer.h index 9e5a459fd15b..bc2b58926308 100644 --- a/trunk/include/asm-x86/mach-voyager/do_timer.h +++ b/trunk/include/asm-x86/mach-voyager/do_timer.h @@ -6,6 +6,7 @@ /** * do_timer_interrupt_hook - hook into timer tick + * @regs: standard registers from interrupt * * Call the pit clock event handler. see asm/i8253.h **/ diff --git a/trunk/include/linux/aspm.h b/trunk/include/linux/aspm.h new file mode 100644 index 000000000000..f41a69895485 --- /dev/null +++ b/trunk/include/linux/aspm.h @@ -0,0 +1,44 @@ +/* + * aspm.h + * + * PCI Express ASPM defines and function prototypes + * + * Copyright (C) 2007 Intel Corp. + * Zhang Yanmin (yanmin.zhang@intel.com) + * Shaohua Li (shaohua.li@intel.com) + * + * For more information, please consult the following manuals (look at + * http://www.pcisig.com/ for how to get them): + * + * PCI Express Specification + */ + +#ifndef LINUX_ASPM_H +#define LINUX_ASPM_H + +#include + +#define PCIE_LINK_STATE_L0S 1 +#define PCIE_LINK_STATE_L1 2 +#define PCIE_LINK_STATE_CLKPM 4 + +#ifdef CONFIG_PCIEASPM +extern void pcie_aspm_init_link_state(struct pci_dev *pdev); +extern void pcie_aspm_exit_link_state(struct pci_dev *pdev); +extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); +extern void pci_disable_link_state(struct pci_dev *pdev, int state); +#else +#define pcie_aspm_init_link_state(pdev) do {} while (0) +#define pcie_aspm_exit_link_state(pdev) do {} while (0) +#define pcie_aspm_pm_state_change(pdev) do {} while (0) +#define pci_disable_link_state(pdev, state) do {} while (0) +#endif + +#ifdef CONFIG_PCIEASPM_DEBUG /* this depends on CONFIG_PCIEASPM */ +extern void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev); +extern void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev); +#else +#define pcie_aspm_create_sysfs_dev_files(pdev) do {} while (0) +#define pcie_aspm_remove_sysfs_dev_files(pdev) do {} while (0) +#endif +#endif /* LINUX_ASPM_H */ diff --git a/trunk/include/linux/chio.h b/trunk/include/linux/chio.h index 519248d8b2b6..a404c111c937 100644 --- a/trunk/include/linux/chio.h +++ b/trunk/include/linux/chio.h @@ -108,7 +108,7 @@ struct changer_element_status { /* * CHIOGELEM - * get more detailed status information for a single element + * get more detailed status informtion for a single element */ struct changer_get_element { int cge_type; /* type/unit */ diff --git a/trunk/include/linux/cyclades.h b/trunk/include/linux/cyclades.h index 504cb2c3fa9a..8f3dcd30828f 100644 --- a/trunk/include/linux/cyclades.h +++ b/trunk/include/linux/cyclades.h @@ -177,7 +177,7 @@ struct CUSTOM_REG { __u32 fpga_version; /* FPGA Version Number Register */ __u32 cpu_start; /* CPU start Register (write) */ __u32 cpu_stop; /* CPU stop Register (write) */ - __u32 misc_reg; /* Miscellaneous Register */ + __u32 misc_reg; /* Miscelaneous Register */ __u32 idt_mode; /* IDT mode Register */ __u32 uart_irq_status; /* UART IRQ status Register */ __u32 clear_timer0_irq; /* Clear timer interrupt Register */ diff --git a/trunk/include/linux/cycx_x25.h b/trunk/include/linux/cycx_x25.h index 362bf19d6cf1..f7a906583463 100644 --- a/trunk/include/linux/cycx_x25.h +++ b/trunk/include/linux/cycx_x25.h @@ -81,7 +81,7 @@ struct cycx_x25_cmd { * @n2win - level 2 window (values: 1 thru 7) * @n3win - level 3 window (values: 1 thru 7) * @nvc - # of logical channels (values: 1 thru 64) - * @pktlen - level 3 packet length - log base 2 of size + * @pktlen - level 3 packet lenght - log base 2 of size * @locaddr - my address * @remaddr - remote address * @t1 - time, in seconds diff --git a/trunk/include/linux/dccp.h b/trunk/include/linux/dccp.h index aa0737019e37..484e45c7c89a 100644 --- a/trunk/include/linux/dccp.h +++ b/trunk/include/linux/dccp.h @@ -525,7 +525,6 @@ struct dccp_sock { __u64 dccps_gsr; __u64 dccps_gar; __be32 dccps_service; - __u32 dccps_mss_cache; struct dccp_service_list *dccps_service_list; __u32 dccps_timestamp_echo; __u32 dccps_timestamp_time; @@ -534,6 +533,7 @@ struct dccp_sock { __u16 dccps_pcslen; __u16 dccps_pcrlen; unsigned long dccps_ndp_count; + __u32 dccps_mss_cache; unsigned long dccps_rate_last; struct dccp_minisock dccps_minisock; struct dccp_ackvec *dccps_hc_rx_ackvec; diff --git a/trunk/include/linux/device.h b/trunk/include/linux/device.h index 479c0b31593c..db375be333c7 100644 --- a/trunk/include/linux/device.h +++ b/trunk/include/linux/device.h @@ -534,17 +534,11 @@ extern struct device *device_create(struct class *cls, struct device *parent, extern void device_destroy(struct class *cls, dev_t devt); #ifdef CONFIG_PM_SLEEP extern void destroy_suspended_device(struct class *cls, dev_t devt); -extern void device_pm_schedule_removal(struct device *); #else /* !CONFIG_PM_SLEEP */ static inline void destroy_suspended_device(struct class *cls, dev_t devt) { device_destroy(cls, devt); } - -static inline void device_pm_schedule_removal(struct device *dev) -{ - device_unregister(dev); -} #endif /* !CONFIG_PM_SLEEP */ /* diff --git a/trunk/include/linux/dma-mapping.h b/trunk/include/linux/dma-mapping.h index 4470950892be..101a2d4636be 100644 --- a/trunk/include/linux/dma-mapping.h +++ b/trunk/include/linux/dma-mapping.h @@ -1,5 +1,5 @@ -#ifndef _LINUX_DMA_MAPPING_H -#define _LINUX_DMA_MAPPING_H +#ifndef _ASM_LINUX_DMA_MAPPING_H +#define _ASM_LINUX_DMA_MAPPING_H #include #include diff --git a/trunk/include/linux/dmaengine.h b/trunk/include/linux/dmaengine.h index 5c84bf897593..55c9a6952f44 100644 --- a/trunk/include/linux/dmaengine.h +++ b/trunk/include/linux/dmaengine.h @@ -29,7 +29,7 @@ #include /** - * enum dma_state - resource PNP/power management state + * enum dma_state - resource PNP/power managment state * @DMA_RESOURCE_SUSPEND: DMA device going into low power state * @DMA_RESOURCE_RESUME: DMA device returning to full power * @DMA_RESOURCE_AVAILABLE: DMA device available to the system diff --git a/trunk/include/linux/ethtool.h b/trunk/include/linux/ethtool.h index fcbe8b640ffb..71d4ada6f315 100644 --- a/trunk/include/linux/ethtool.h +++ b/trunk/include/linux/ethtool.h @@ -309,7 +309,7 @@ int ethtool_op_set_flags(struct net_device *dev, u32 data); * get_ringparam: Report ring sizes * set_ringparam: Set ring sizes * get_pauseparam: Report pause parameters - * set_pauseparam: Set pause parameters + * set_pauseparam: Set pause paramters * get_rx_csum: Report whether receive checksums are turned on or off * set_rx_csum: Turn receive checksum on or off * get_tx_csum: Report whether transmit checksums are turned on or off diff --git a/trunk/include/linux/fs.h b/trunk/include/linux/fs.h index 56bd421c1208..a516b6716870 100644 --- a/trunk/include/linux/fs.h +++ b/trunk/include/linux/fs.h @@ -872,7 +872,6 @@ struct file_lock { struct list_head fl_block; /* circular list of blocked processes */ fl_owner_t fl_owner; unsigned int fl_pid; - struct pid *fl_nspid; wait_queue_head_t fl_wait; struct file *fl_file; unsigned char fl_flags; @@ -1308,7 +1307,7 @@ struct super_operations { * being set. find_inode() uses this to prevent returning * nearly-dead inodes. * I_SYNC Similar to I_LOCK, but limited in scope to writeback - * of inode dirty data. Having a separate lock for this + * of inode dirty data. Having a seperate lock for this * purpose reduces latency and prevents some filesystem- * specific deadlocks. * diff --git a/trunk/include/linux/hdreg.h b/trunk/include/linux/hdreg.h index e38e75967e74..3882013d29ea 100644 --- a/trunk/include/linux/hdreg.h +++ b/trunk/include/linux/hdreg.h @@ -364,7 +364,7 @@ typedef struct hd_drive_hob_hdr { #define SETFEATURES_EN_RLA 0xAA /* Enable read look-ahead feature */ #define SETFEATURES_PREFETCH 0xAB /* Sets drive prefetch value */ #define SETFEATURES_EN_REST 0xAC /* ATA-1 */ -#define SETFEATURES_4B_RW_LONG 0xBB /* Set Length of 4 bytes */ +#define SETFEATURES_4B_RW_LONG 0xBB /* Set Lenght of 4 bytes */ #define SETFEATURES_DIS_AAM 0xC2 /* Disable Automatic Acoustic Management */ #define SETFEATURES_EN_RPOD 0xCC /* Enable reverting to power on defaults */ #define SETFEATURES_DIS_RI 0xDD /* Disable release interrupt ATAPI */ diff --git a/trunk/include/linux/hrtimer.h b/trunk/include/linux/hrtimer.h index f79dcba4b2c1..49067f14fac1 100644 --- a/trunk/include/linux/hrtimer.h +++ b/trunk/include/linux/hrtimer.h @@ -147,6 +147,7 @@ struct hrtimer_sleeper { * @get_time: function to retrieve the current time of the clock * @get_softirq_time: function to retrieve the current time from the softirq * @softirq_time: the time when running the hrtimer queue in the softirq + * @cb_pending: list of timers where the callback is pending * @offset: offset of this clock to the monotonic base * @reprogram: function to reprogram the timer event */ diff --git a/trunk/include/linux/ieee80211.h b/trunk/include/linux/ieee80211.h index f577c8f1c66d..5de6d911cdf7 100644 --- a/trunk/include/linux/ieee80211.h +++ b/trunk/include/linux/ieee80211.h @@ -287,12 +287,6 @@ struct ieee80211_ht_addt_info { #define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004 #define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010 -/* MIMO Power Save Modes */ -#define WLAN_HT_CAP_MIMO_PS_STATIC 0 -#define WLAN_HT_CAP_MIMO_PS_DYNAMIC 1 -#define WLAN_HT_CAP_MIMO_PS_INVALID 2 -#define WLAN_HT_CAP_MIMO_PS_DISABLED 3 - /* Authentication algorithms */ #define WLAN_AUTH_OPEN 0 #define WLAN_AUTH_SHARED_KEY 1 diff --git a/trunk/include/linux/init.h b/trunk/include/linux/init.h index 90cdbbbbe077..2efbda016741 100644 --- a/trunk/include/linux/init.h +++ b/trunk/include/linux/init.h @@ -124,6 +124,9 @@ #define __REF .section ".ref.text", "ax" #define __REFDATA .section ".ref.data", "aw" #define __REFCONST .section ".ref.rodata", "aw" +/* backward compatibility */ +#define __INIT_REFOK .section __REF +#define __INITDATA_REFOK .section __REFDATA #ifndef __ASSEMBLY__ /* diff --git a/trunk/include/linux/llc.h b/trunk/include/linux/llc.h index 7733585603f1..09f2e6d0e9eb 100644 --- a/trunk/include/linux/llc.h +++ b/trunk/include/linux/llc.h @@ -49,9 +49,9 @@ enum llc_sockopts { /* LLC SAP types. */ #define LLC_SAP_NULL 0x00 /* NULL SAP. */ -#define LLC_SAP_LLC 0x02 /* LLC Sublayer Management. */ +#define LLC_SAP_LLC 0x02 /* LLC Sublayer Managment. */ #define LLC_SAP_SNA 0x04 /* SNA Path Control. */ -#define LLC_SAP_PNM 0x0E /* Proway Network Management. */ +#define LLC_SAP_PNM 0x0E /* Proway Network Managment. */ #define LLC_SAP_IP 0x06 /* TCP/IP. */ #define LLC_SAP_BSPAN 0x42 /* Bridge Spanning Tree Proto */ #define LLC_SAP_MMS 0x4E /* Manufacturing Message Srv. */ diff --git a/trunk/include/linux/pci.h b/trunk/include/linux/pci.h index cee75c0ff6e7..4f96f1d94ac4 100644 --- a/trunk/include/linux/pci.h +++ b/trunk/include/linux/pci.h @@ -128,6 +128,7 @@ struct pci_cap_saved_state { u32 data[0]; }; +struct pcie_link_state; /* * The pci_dev structure is used to describe PCI devices. */ @@ -163,6 +164,10 @@ struct pci_dev { this is D0-D3, D0 being fully functional, and D3 being off. */ +#ifdef CONFIG_PCIEASPM + struct pcie_link_state *link_state; /* ASPM link state. */ +#endif + pci_channel_state_t error_state; /* current connectivity state */ struct device dev; /* Generic device interface */ diff --git a/trunk/include/linux/pci_regs.h b/trunk/include/linux/pci_regs.h index c1914a8b94a9..c0c1223c9194 100644 --- a/trunk/include/linux/pci_regs.h +++ b/trunk/include/linux/pci_regs.h @@ -395,9 +395,17 @@ #define PCI_EXP_DEVSTA_AUXPD 0x10 /* AUX Power Detected */ #define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ #define PCI_EXP_LNKCAP 12 /* Link Capabilities */ +#define PCI_EXP_LNKCAP_ASPMS 0xc00 /* ASPM Support */ +#define PCI_EXP_LNKCAP_L0SEL 0x7000 /* L0s Exit Latency */ +#define PCI_EXP_LNKCAP_L1EL 0x38000 /* L1 Exit Latency */ +#define PCI_EXP_LNKCAP_CLKPM 0x40000 /* L1 Clock Power Management */ #define PCI_EXP_LNKCTL 16 /* Link Control */ +#define PCI_EXP_LNKCTL_RL 0x20 /* Retrain Link */ +#define PCI_EXP_LNKCTL_CCC 0x40 /* Common Clock COnfiguration */ #define PCI_EXP_LNKCTL_CLKREQ_EN 0x100 /* Enable clkreq */ #define PCI_EXP_LNKSTA 18 /* Link Status */ +#define PCI_EXP_LNKSTA_LT 0x800 /* Link Training */ +#define PCI_EXP_LNKSTA_SLC 0x1000 /* Slot Clock Configuration */ #define PCI_EXP_SLTCAP 20 /* Slot Capabilities */ #define PCI_EXP_SLTCTL 24 /* Slot Control */ #define PCI_EXP_SLTSTA 26 /* Slot Status */ diff --git a/trunk/include/linux/phy.h b/trunk/include/linux/phy.h index 5e43ae751412..554836edd915 100644 --- a/trunk/include/linux/phy.h +++ b/trunk/include/linux/phy.h @@ -88,7 +88,7 @@ struct mii_bus { /* A lock to ensure that only one thing can read/write * the MDIO bus at a time */ - struct mutex mdio_lock; + spinlock_t mdio_lock; struct device *dev; @@ -284,11 +284,10 @@ struct phy_device { /* Interrupt and Polling infrastructure */ struct work_struct phy_queue; - struct work_struct state_queue; struct timer_list phy_timer; atomic_t irq_disable; - struct mutex lock; + spinlock_t lock; struct net_device *attached_dev; diff --git a/trunk/include/linux/pm.h b/trunk/include/linux/pm.h index eccf59ea2a77..b78e0295adf4 100644 --- a/trunk/include/linux/pm.h +++ b/trunk/include/linux/pm.h @@ -95,7 +95,7 @@ struct pm_dev }; /* Functions above this comment are list-based old-style power - * management. Please avoid using them. */ + * managment. Please avoid using them. */ /* * Callbacks for platform drivers to implement. diff --git a/trunk/include/linux/pnp.h b/trunk/include/linux/pnp.h index b9339d8b95bc..2a6d62c7d2d1 100644 --- a/trunk/include/linux/pnp.h +++ b/trunk/include/linux/pnp.h @@ -126,7 +126,7 @@ struct pnp_resource_table { }; /* - * Device Management + * Device Managemnt */ struct pnp_card { diff --git a/trunk/include/linux/radix-tree.h b/trunk/include/linux/radix-tree.h index b8ce2b444bb5..b6116b4445c7 100644 --- a/trunk/include/linux/radix-tree.h +++ b/trunk/include/linux/radix-tree.h @@ -91,7 +91,7 @@ do { \ * * For API usage, in general, * - any function _modifying_ the tree or tags (inserting or deleting - * items, setting or clearing tags) must exclude other modifications, and + * items, setting or clearing tags must exclude other modifications, and * exclude any functions reading the tree. * - any function _reading_ the tree or tags (looking up items or tags, * gang lookups) must exclude modifications to the tree, but may occur diff --git a/trunk/include/linux/reiserfs_fs_sb.h b/trunk/include/linux/reiserfs_fs_sb.h index db5ef9b83c3f..10fa0c832018 100644 --- a/trunk/include/linux/reiserfs_fs_sb.h +++ b/trunk/include/linux/reiserfs_fs_sb.h @@ -185,7 +185,7 @@ struct reiserfs_journal { unsigned long j_trans_id; unsigned long j_mount_id; unsigned long j_start; /* start of current waiting commit (index into j_ap_blocks) */ - unsigned long j_len; /* length of current waiting commit */ + unsigned long j_len; /* lenght of current waiting commit */ unsigned long j_len_alloc; /* number of buffers requested by journal_begin() */ atomic_t j_wcount; /* count of writers for current commit */ unsigned long j_bcount; /* batch count. allows turning X transactions into 1 */ diff --git a/trunk/include/linux/signalfd.h b/trunk/include/linux/signalfd.h index ea037f28df91..86f9b1ef0e09 100644 --- a/trunk/include/linux/signalfd.h +++ b/trunk/include/linux/signalfd.h @@ -29,7 +29,7 @@ struct signalfd_siginfo { /* * Pad strcture to 128 bytes. Remember to update the - * pad size when you add new members. We use a fixed + * pad size when you add new memebers. We use a fixed * size structure to avoid compatibility problems with * future versions, and we leave extra space for additional * members. We use fixed size members because this strcture diff --git a/trunk/include/linux/skbuff.h b/trunk/include/linux/skbuff.h index dfe975a9967e..412672a79e8a 100644 --- a/trunk/include/linux/skbuff.h +++ b/trunk/include/linux/skbuff.h @@ -1810,5 +1810,6 @@ static inline void skb_forward_csum(struct sk_buff *skb) skb->ip_summed = CHECKSUM_NONE; } +bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off); #endif /* __KERNEL__ */ #endif /* _LINUX_SKBUFF_H */ diff --git a/trunk/include/linux/sm501-regs.h b/trunk/include/linux/sm501-regs.h index 64236b73c724..df7620dd8f31 100644 --- a/trunk/include/linux/sm501-regs.h +++ b/trunk/include/linux/sm501-regs.h @@ -171,7 +171,7 @@ /* USB slave/gadget data port base */ #define SM501_USB_GADGET_DATA (0x070000) -/* Display controller/video engine base */ +/* Display contoller/video engine base */ #define SM501_DC (0x080000) /* common defines for the SM501 address registers */ diff --git a/trunk/include/linux/spinlock_api_up.h b/trunk/include/linux/spinlock_api_up.h index 04e1d3164576..67faa044c5f5 100644 --- a/trunk/include/linux/spinlock_api_up.h +++ b/trunk/include/linux/spinlock_api_up.h @@ -21,7 +21,7 @@ /* * In the UP-nondebug case there's no real locking going on, so the * only thing we have to do is to keep the preempt counts and irq - * flags straight, to suppress compiler warnings of unused lock + * flags straight, to supress compiler warnings of unused lock * variables, and to add the proper checker annotations: */ #define __LOCK(lock) \ diff --git a/trunk/include/linux/wireless.h b/trunk/include/linux/wireless.h index 3160dfed73ca..74e84caa1e20 100644 --- a/trunk/include/linux/wireless.h +++ b/trunk/include/linux/wireless.h @@ -1079,7 +1079,7 @@ struct iw_priv_args */ struct iw_event { - __u16 len; /* Real length of this stuff */ + __u16 len; /* Real lenght of this stuff */ __u16 cmd; /* Wireless IOCTL */ union iwreq_data u; /* IOCTL fixed payload */ }; diff --git a/trunk/include/media/rds.h b/trunk/include/media/rds.h index a89426667618..951c1ae0be74 100644 --- a/trunk/include/media/rds.h +++ b/trunk/include/media/rds.h @@ -4,7 +4,7 @@ saa6588.c and every driver (e.g. bttv-driver.c) that wants to use the saa6588 module. - Instead of having a separate rds.h, I'd prefer to include + Instead of having a seperate rds.h, I'd prefer to include this stuff in one of the already existing files like tuner.h (c) 2005 by Hans J. Koch diff --git a/trunk/include/net/if_inet6.h b/trunk/include/net/if_inet6.h index b2cfc4927257..b24508abb850 100644 --- a/trunk/include/net/if_inet6.h +++ b/trunk/include/net/if_inet6.h @@ -112,13 +112,13 @@ struct ifmcaddr6 struct ip6_sf_list *mca_sources; struct ip6_sf_list *mca_tomb; unsigned int mca_sfmode; - unsigned char mca_crcount; unsigned long mca_sfcount[2]; struct timer_list mca_timer; unsigned mca_flags; int mca_users; atomic_t mca_refcnt; spinlock_t mca_lock; + unsigned char mca_crcount; unsigned long mca_cstamp; unsigned long mca_tstamp; }; @@ -166,11 +166,11 @@ struct inet6_dev struct ifmcaddr6 *mc_list; struct ifmcaddr6 *mc_tomb; rwlock_t mc_lock; + unsigned long mc_v1_seen; + unsigned long mc_maxdelay; unsigned char mc_qrv; unsigned char mc_gq_running; unsigned char mc_ifc_count; - unsigned long mc_v1_seen; - unsigned long mc_maxdelay; struct timer_list mc_gq_timer; /* general query timer */ struct timer_list mc_ifc_timer; /* interface change timer */ diff --git a/trunk/include/net/inet6_hashtables.h b/trunk/include/net/inet6_hashtables.h index 62a5b691858e..fdff630708ce 100644 --- a/trunk/include/net/inet6_hashtables.h +++ b/trunk/include/net/inet6_hashtables.h @@ -49,7 +49,7 @@ static inline int inet6_sk_ehashfn(const struct sock *sk) return inet6_ehashfn(laddr, lport, faddr, fport); } -extern void __inet6_hash(struct sock *sk); +extern void __inet6_hash(struct inet_hashinfo *hashinfo, struct sock *sk); /* * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so diff --git a/trunk/include/net/inet_connection_sock.h b/trunk/include/net/inet_connection_sock.h index f00f0573627b..133cf30d2d79 100644 --- a/trunk/include/net/inet_connection_sock.h +++ b/trunk/include/net/inet_connection_sock.h @@ -29,6 +29,7 @@ #undef INET_CSK_CLEAR_TIMERS struct inet_bind_bucket; +struct inet_hashinfo; struct tcp_congestion_ops; /* @@ -58,8 +59,6 @@ struct inet_connection_sock_af_ops { int level, int optname, char __user *optval, int __user *optlen); void (*addr2sockaddr)(struct sock *sk, struct sockaddr *); - int (*bind_conflict)(const struct sock *sk, - const struct inet_bind_bucket *tb); }; /** inet_connection_sock - INET connection oriented sock @@ -245,7 +244,10 @@ extern struct request_sock *inet_csk_search_req(const struct sock *sk, const __be32 laddr); extern int inet_csk_bind_conflict(const struct sock *sk, const struct inet_bind_bucket *tb); -extern int inet_csk_get_port(struct sock *sk, unsigned short snum); +extern int inet_csk_get_port(struct inet_hashinfo *hashinfo, + struct sock *sk, unsigned short snum, + int (*bind_conflict)(const struct sock *sk, + const struct inet_bind_bucket *tb)); extern struct dst_entry* inet_csk_route_req(struct sock *sk, const struct request_sock *req); diff --git a/trunk/include/net/inet_hashtables.h b/trunk/include/net/inet_hashtables.h index 48ac620cb846..c23c4ed30724 100644 --- a/trunk/include/net/inet_hashtables.h +++ b/trunk/include/net/inet_hashtables.h @@ -221,9 +221,9 @@ static inline int inet_sk_listen_hashfn(const struct sock *sk) } /* Caller must disable local BH processing. */ -static inline void __inet_inherit_port(struct sock *sk, struct sock *child) +static inline void __inet_inherit_port(struct inet_hashinfo *table, + struct sock *sk, struct sock *child) { - struct inet_hashinfo *table = sk->sk_prot->hashinfo; const int bhash = inet_bhashfn(inet_sk(child)->num, table->bhash_size); struct inet_bind_hashbucket *head = &table->bhash[bhash]; struct inet_bind_bucket *tb; @@ -235,14 +235,15 @@ static inline void __inet_inherit_port(struct sock *sk, struct sock *child) spin_unlock(&head->lock); } -static inline void inet_inherit_port(struct sock *sk, struct sock *child) +static inline void inet_inherit_port(struct inet_hashinfo *table, + struct sock *sk, struct sock *child) { local_bh_disable(); - __inet_inherit_port(sk, child); + __inet_inherit_port(table, sk, child); local_bh_enable(); } -extern void inet_put_port(struct sock *sk); +extern void inet_put_port(struct inet_hashinfo *table, struct sock *sk); extern void inet_listen_wlock(struct inet_hashinfo *hashinfo); @@ -265,9 +266,41 @@ static inline void inet_listen_unlock(struct inet_hashinfo *hashinfo) wake_up(&hashinfo->lhash_wait); } -extern void __inet_hash_nolisten(struct sock *sk); -extern void inet_hash(struct sock *sk); -extern void inet_unhash(struct sock *sk); +extern void __inet_hash(struct inet_hashinfo *hashinfo, struct sock *sk); +extern void __inet_hash_nolisten(struct inet_hashinfo *hinfo, struct sock *sk); + +static inline void inet_hash(struct inet_hashinfo *hashinfo, struct sock *sk) +{ + if (sk->sk_state != TCP_CLOSE) { + local_bh_disable(); + __inet_hash(hashinfo, sk); + local_bh_enable(); + } +} + +static inline void inet_unhash(struct inet_hashinfo *hashinfo, struct sock *sk) +{ + rwlock_t *lock; + + if (sk_unhashed(sk)) + goto out; + + if (sk->sk_state == TCP_LISTEN) { + local_bh_disable(); + inet_listen_wlock(hashinfo); + lock = &hashinfo->lhash_lock; + } else { + lock = inet_ehash_lockp(hashinfo, sk->sk_hash); + write_lock_bh(lock); + } + + if (__sk_del_node_init(sk)) + sock_prot_inuse_add(sk->sk_prot, -1); + write_unlock_bh(lock); +out: + if (sk->sk_state == TCP_LISTEN) + wake_up(&hashinfo->lhash_wait); +} extern struct sock *__inet_lookup_listener(struct net *net, struct inet_hashinfo *hashinfo, @@ -392,7 +425,7 @@ extern int __inet_hash_connect(struct inet_timewait_death_row *death_row, struct sock *sk, int (*check_established)(struct inet_timewait_death_row *, struct sock *, __u16, struct inet_timewait_sock **), - void (*hash)(struct sock *sk)); + void (*hash)(struct inet_hashinfo *, struct sock *)); extern int inet_hash_connect(struct inet_timewait_death_row *death_row, struct sock *sk); #endif /* _INET_HASHTABLES_H */ diff --git a/trunk/include/net/inet_timewait_sock.h b/trunk/include/net/inet_timewait_sock.h index 296547bfb0b7..67e925065aae 100644 --- a/trunk/include/net/inet_timewait_sock.h +++ b/trunk/include/net/inet_timewait_sock.h @@ -116,7 +116,6 @@ struct inet_timewait_sock { #define tw_hash __tw_common.skc_hash #define tw_prot __tw_common.skc_prot #define tw_net __tw_common.skc_net - int tw_timeout; volatile unsigned char tw_substate; /* 3 bits hole, try to pack */ unsigned char tw_rcv_wscale; @@ -131,6 +130,7 @@ struct inet_timewait_sock { __u8 tw_ipv6only:1; /* 15 bits hole, try to pack */ __u16 tw_ipv6_offset; + int tw_timeout; unsigned long tw_ttd; struct inet_bind_bucket *tw_tb; struct hlist_node tw_death_node; diff --git a/trunk/include/net/sock.h b/trunk/include/net/sock.h index 8a7889b35810..e3fb4c047f4c 100644 --- a/trunk/include/net/sock.h +++ b/trunk/include/net/sock.h @@ -496,7 +496,6 @@ extern int sk_wait_data(struct sock *sk, long *timeo); struct request_sock_ops; struct timewait_sock_ops; -struct inet_hashinfo; /* Networking protocol blocks we attach to sockets. * socket layer -> transport layer interface @@ -579,8 +578,6 @@ struct proto { struct request_sock_ops *rsk_prot; struct timewait_sock_ops *twsk_prot; - struct inet_hashinfo *hashinfo; - struct module *owner; char name[32]; diff --git a/trunk/include/scsi/scsi_transport_fc.h b/trunk/include/scsi/scsi_transport_fc.h index 4769efd4db24..e466d886e192 100644 --- a/trunk/include/scsi/scsi_transport_fc.h +++ b/trunk/include/scsi/scsi_transport_fc.h @@ -176,7 +176,7 @@ struct class_device_attribute class_device_attr_vport_##_name = \ * ports has a unique presense on the SAN, and may be instantiated via * NPIV, Virtual Fabrics, or via additional ALPAs. As the vport is a * unique presense, each vport has it's own view of the fabric, - * authentication privilege, and priorities. + * authentication priviledge, and priorities. * * A virtual port may support 1 or more FC4 roles. Typically it is a * FCP Initiator. It could be a FCP Target, or exist sole for an IP over FC diff --git a/trunk/init/Kconfig b/trunk/init/Kconfig index b2acdeb2d312..dcc96a8c8c69 100644 --- a/trunk/init/Kconfig +++ b/trunk/init/Kconfig @@ -665,20 +665,6 @@ config SLOB endchoice -config PROFILING - bool "Profiling support (EXPERIMENTAL)" - help - Say Y here to enable the extended profiling support mechanisms used - by profilers such as OProfile. - -config MARKERS - bool "Activate markers" - help - Place an empty function call at each marker site. Can be - dynamically changed for a probe function. - -source "arch/Kconfig" - endmenu # General setup config SLABINFO diff --git a/trunk/kernel/Kconfig.instrumentation b/trunk/kernel/Kconfig.instrumentation new file mode 100644 index 000000000000..468f47ad7503 --- /dev/null +++ b/trunk/kernel/Kconfig.instrumentation @@ -0,0 +1,49 @@ +menuconfig INSTRUMENTATION + bool "Instrumentation Support" + default y + ---help--- + Say Y here to get to see options related to performance measurement, + system-wide debugging, and testing. This option alone does not add any + kernel code. + + If you say N, all options in this submenu will be skipped and + disabled. If you're trying to debug the kernel itself, go see the + Kernel Hacking menu. + +if INSTRUMENTATION + +config PROFILING + bool "Profiling support (EXPERIMENTAL)" + help + Say Y here to enable the extended profiling support mechanisms used + by profilers such as OProfile. + +config OPROFILE + tristate "OProfile system profiling (EXPERIMENTAL)" + depends on PROFILING && !UML + depends on ARCH_SUPPORTS_OPROFILE || ALPHA || ARM || BLACKFIN || IA64 || M32R || PARISC || PPC || S390 || SUPERH || SPARC + help + OProfile is a profiling system capable of profiling the + whole system, include the kernel, kernel modules, libraries, + and applications. + + If unsure, say N. + +config KPROBES + bool "Kprobes" + depends on KALLSYMS && MODULES && !UML + depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32 + help + Kprobes allows you to trap at almost any kernel address and + execute a callback function. register_kprobe() establishes + a probepoint and specifies the callback. Kprobes is useful + for kernel debugging, non-intrusive instrumentation and testing. + If in doubt, say "N". + +config MARKERS + bool "Activate markers" + help + Place an empty function call at each marker site. Can be + dynamically changed for a probe function. + +endif # INSTRUMENTATION diff --git a/trunk/kernel/Makefile b/trunk/kernel/Makefile index db9af707ff5b..8885627ea021 100644 --- a/trunk/kernel/Makefile +++ b/trunk/kernel/Makefile @@ -9,7 +9,7 @@ obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \ rcupdate.o extable.o params.o posix-timers.o \ kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \ hrtimer.o rwsem.o latency.o nsproxy.o srcu.o \ - utsname.o notifier.o ksysfs.o + utsname.o notifier.o obj-$(CONFIG_SYSCTL) += sysctl_check.o obj-$(CONFIG_STACKTRACE) += stacktrace.o @@ -49,6 +49,7 @@ obj-$(CONFIG_AUDIT) += audit.o auditfilter.o obj-$(CONFIG_AUDITSYSCALL) += auditsc.o obj-$(CONFIG_AUDIT_TREE) += audit_tree.o obj-$(CONFIG_KPROBES) += kprobes.o +obj-$(CONFIG_SYSFS) += ksysfs.o obj-$(CONFIG_DETECT_SOFTLOCKUP) += softlockup.o obj-$(CONFIG_GENERIC_HARDIRQS) += irq/ obj-$(CONFIG_SECCOMP) += seccomp.o diff --git a/trunk/kernel/exit.c b/trunk/kernel/exit.c index 9e459fefda77..bfb1c0e940e8 100644 --- a/trunk/kernel/exit.c +++ b/trunk/kernel/exit.c @@ -50,6 +50,8 @@ #include #include +extern void sem_exit (void); + static void exit_mm(struct task_struct * tsk); static void __unhash_process(struct task_struct *p) diff --git a/trunk/kernel/posix-timers.c b/trunk/kernel/posix-timers.c index 36d563fd9e3b..35b4bbfc78ff 100644 --- a/trunk/kernel/posix-timers.c +++ b/trunk/kernel/posix-timers.c @@ -493,7 +493,7 @@ sys_timer_create(const clockid_t which_clock, goto retry; else if (error) { /* - * Weird looking, but we return EAGAIN if the IDR is + * Wierd looking, but we return EAGAIN if the IDR is * full (proper POSIX return value for this) */ error = -EAGAIN; diff --git a/trunk/kernel/relay.c b/trunk/kernel/relay.c index 7c0373322f18..61134eb7a0c8 100644 --- a/trunk/kernel/relay.c +++ b/trunk/kernel/relay.c @@ -92,7 +92,6 @@ static int relay_mmap_buf(struct rchan_buf *buf, struct vm_area_struct *vma) return -EINVAL; vma->vm_ops = &relay_file_mmap_ops; - vma->vm_flags |= VM_DONTEXPAND; vma->vm_private_data = buf; buf->chan->cb->buf_mapped(buf, filp); diff --git a/trunk/lib/Kconfig.debug b/trunk/lib/Kconfig.debug index 0d385be682db..0d8a5a4a789d 100644 --- a/trunk/lib/Kconfig.debug +++ b/trunk/lib/Kconfig.debug @@ -81,7 +81,7 @@ config HEADERS_CHECK config DEBUG_SECTION_MISMATCH bool "Enable full Section mismatch analysis" - depends on UNDEFINED + default n help The section mismatch analysis checks if there are illegal references from one section to another section. @@ -90,19 +90,19 @@ config DEBUG_SECTION_MISMATCH most likely result in an oops. In the code functions and variables are annotated with __init, __devinit etc. (see full list in include/linux/init.h) - which results in the code/data being placed in specific sections. - The section mismatch analysis is always done after a full - kernel build but enabling this option will in addition + which result in the code/data being placed in specific sections. + The section mismatch anaylsis are always done after a full + kernel build but enabling this options will in addition do the following: - Add the option -fno-inline-functions-called-once to gcc When inlining a function annotated __init in a non-init - function we would lose the section information and thus + function we would loose the section information and thus the analysis would not catch the illegal reference. - This option tells gcc to inline less but will also + This options tell gcc to inline less but will also result in a larger kernel. - Run the section mismatch analysis for each module/built-in.o When we run the section mismatch analysis on vmlinux.o we - lose valueble information about where the mismatch was + looses valueable information about where the mismatch was introduced. Running the analysis for each module/built-in.o file will tell where the mismatch happens much closer to the diff --git a/trunk/lib/crc32.c b/trunk/lib/crc32.c index 49d1c9e3ce38..d2c2f257bedd 100644 --- a/trunk/lib/crc32.c +++ b/trunk/lib/crc32.c @@ -348,7 +348,7 @@ EXPORT_SYMBOL(crc32_be); * but again the multiple of the polynomial to subtract depends only on * the high bits, the high 8 bits in this case. * - * The multiple we need in that case is the low 32 bits of a 40-bit + * The multile we need in that case is the low 32 bits of a 40-bit * value whose high 8 bits are given, and which is a multiple of the * generator polynomial. This is simply the CRC-32 of the given * one-byte message. diff --git a/trunk/lib/kobject.c b/trunk/lib/kobject.c index d784daeb8571..1d63ead1815e 100644 --- a/trunk/lib/kobject.c +++ b/trunk/lib/kobject.c @@ -637,7 +637,7 @@ struct kobject *kobject_create(void) * @name: the name for the kset * @parent: the parent kobject of this kobject, if any. * - * This function creates a kobject structure dynamically and registers it + * This function creates a kset structure dynamically and registers it * with sysfs. When you are finished with this structure, call * kobject_put() and the structure will be dynamically freed when * it is no longer being used. diff --git a/trunk/lib/zlib_deflate/defutil.h b/trunk/lib/zlib_deflate/defutil.h index 6b15a909ca3f..d9feaf638608 100644 --- a/trunk/lib/zlib_deflate/defutil.h +++ b/trunk/lib/zlib_deflate/defutil.h @@ -164,7 +164,7 @@ typedef struct deflate_state { int nice_match; /* Stop searching when current match exceeds this */ /* used by trees.c: */ - /* Didn't use ct_data typedef below to suppress compiler warning */ + /* Didn't use ct_data typedef below to supress compiler warning */ struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ diff --git a/trunk/mm/mmap.c b/trunk/mm/mmap.c index 8295577a83b2..d2b6d44962b7 100644 --- a/trunk/mm/mmap.c +++ b/trunk/mm/mmap.c @@ -2216,7 +2216,7 @@ int install_special_mapping(struct mm_struct *mm, vma->vm_start = addr; vma->vm_end = addr + len; - vma->vm_flags = vm_flags | mm->def_flags | VM_DONTEXPAND; + vma->vm_flags = vm_flags | mm->def_flags; vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); vma->vm_ops = &special_mapping_vmops; diff --git a/trunk/mm/truncate.c b/trunk/mm/truncate.c index c3123b08ff6d..cadc15653dde 100644 --- a/trunk/mm/truncate.c +++ b/trunk/mm/truncate.c @@ -21,7 +21,7 @@ /** - * do_invalidatepage - invalidate part or all of a page + * do_invalidatepage - invalidate part of all of a page * @page: the page which is affected * @offset: the index of the truncation point * diff --git a/trunk/net/core/net_namespace.c b/trunk/net/core/net_namespace.c index 7b660834a4c2..26e941d912e8 100644 --- a/trunk/net/core/net_namespace.c +++ b/trunk/net/core/net_namespace.c @@ -287,7 +287,7 @@ EXPORT_SYMBOL_GPL(register_pernet_subsys); * @ops: pernet operations structure to manipulate * * Remove the pernet operations structure from the list to be - * used when network namespaces are created or destroyed. In + * used when network namespaces are created or destoryed. In * addition run the exit method for all existing network * namespaces. */ @@ -335,7 +335,7 @@ EXPORT_SYMBOL_GPL(register_pernet_device); * @ops: pernet operations structure to manipulate * * Remove the pernet operations structure from the list to be - * used when network namespaces are created or destroyed. In + * used when network namespaces are created or destoryed. In * addition run the exit method for all existing network * namespaces. */ diff --git a/trunk/net/core/skbuff.c b/trunk/net/core/skbuff.c index 98420f9c4b6d..4e354221ec23 100644 --- a/trunk/net/core/skbuff.c +++ b/trunk/net/core/skbuff.c @@ -2461,6 +2461,34 @@ int skb_cow_data(struct sk_buff *skb, int tailbits, struct sk_buff **trailer) return elt; } +/** + * skb_partial_csum_set - set up and verify partial csum values for packet + * @skb: the skb to set + * @start: the number of bytes after skb->data to start checksumming. + * @off: the offset from start to place the checksum. + * + * For untrusted partially-checksummed packets, we need to make sure the values + * for skb->csum_start and skb->csum_offset are valid so we don't oops. + * + * This function checks and sets those values and skb->ip_summed: if this + * returns false you should drop the packet. + */ +bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off) +{ + if (unlikely(start > skb->len - 2) || + unlikely((int)start + off > skb->len - 2)) { + if (net_ratelimit()) + printk(KERN_WARNING + "bad partial csum: csum=%u/%u len=%u\n", + start, off, skb->len); + return false; + } + skb->ip_summed = CHECKSUM_PARTIAL; + skb->csum_start = skb_headroom(skb) + start; + skb->csum_offset = off; + return true; +} + EXPORT_SYMBOL(___pskb_trim); EXPORT_SYMBOL(__kfree_skb); EXPORT_SYMBOL(kfree_skb); @@ -2497,3 +2525,4 @@ EXPORT_SYMBOL(skb_append_datato_frags); EXPORT_SYMBOL_GPL(skb_to_sgvec); EXPORT_SYMBOL_GPL(skb_cow_data); +EXPORT_SYMBOL_GPL(skb_partial_csum_set); diff --git a/trunk/net/dccp/dccp.h b/trunk/net/dccp/dccp.h index 287a62bc2e0f..ebe59d98721a 100644 --- a/trunk/net/dccp/dccp.h +++ b/trunk/net/dccp/dccp.h @@ -271,6 +271,8 @@ extern struct sk_buff *dccp_make_response(struct sock *sk, extern int dccp_connect(struct sock *sk); extern int dccp_disconnect(struct sock *sk, int flags); +extern void dccp_hash(struct sock *sk); +extern void dccp_unhash(struct sock *sk); extern int dccp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen); extern int dccp_setsockopt(struct sock *sk, int level, int optname, diff --git a/trunk/net/dccp/ipv4.c b/trunk/net/dccp/ipv4.c index 474075adbde4..c982ad88223d 100644 --- a/trunk/net/dccp/ipv4.c +++ b/trunk/net/dccp/ipv4.c @@ -38,6 +38,12 @@ */ static struct socket *dccp_v4_ctl_socket; +static int dccp_v4_get_port(struct sock *sk, const unsigned short snum) +{ + return inet_csk_get_port(&dccp_hashinfo, sk, snum, + inet_csk_bind_conflict); +} + int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) { struct inet_sock *inet = inet_sk(sk); @@ -402,8 +408,8 @@ struct sock *dccp_v4_request_recv_sock(struct sock *sk, struct sk_buff *skb, dccp_sync_mss(newsk, dst_mtu(dst)); - __inet_hash_nolisten(newsk); - __inet_inherit_port(sk, newsk); + __inet_hash_nolisten(&dccp_hashinfo, newsk); + __inet_inherit_port(&dccp_hashinfo, sk, newsk); return newsk; @@ -892,7 +898,6 @@ static struct inet_connection_sock_af_ops dccp_ipv4_af_ops = { .getsockopt = ip_getsockopt, .addr2sockaddr = inet_csk_addr2sockaddr, .sockaddr_len = sizeof(struct sockaddr_in), - .bind_conflict = inet_csk_bind_conflict, #ifdef CONFIG_COMPAT .compat_setsockopt = compat_ip_setsockopt, .compat_getsockopt = compat_ip_getsockopt, @@ -932,10 +937,10 @@ static struct proto dccp_v4_prot = { .sendmsg = dccp_sendmsg, .recvmsg = dccp_recvmsg, .backlog_rcv = dccp_v4_do_rcv, - .hash = inet_hash, - .unhash = inet_unhash, + .hash = dccp_hash, + .unhash = dccp_unhash, .accept = inet_csk_accept, - .get_port = inet_csk_get_port, + .get_port = dccp_v4_get_port, .shutdown = dccp_shutdown, .destroy = dccp_destroy_sock, .orphan_count = &dccp_orphan_count, @@ -943,7 +948,6 @@ static struct proto dccp_v4_prot = { .obj_size = sizeof(struct dccp_sock), .rsk_prot = &dccp_request_sock_ops, .twsk_prot = &dccp_timewait_sock_ops, - .hashinfo = &dccp_hashinfo, #ifdef CONFIG_COMPAT .compat_setsockopt = compat_dccp_setsockopt, .compat_getsockopt = compat_dccp_getsockopt, diff --git a/trunk/net/dccp/ipv6.c b/trunk/net/dccp/ipv6.c index 490333d47c7b..ed0a0053a797 100644 --- a/trunk/net/dccp/ipv6.c +++ b/trunk/net/dccp/ipv6.c @@ -39,15 +39,21 @@ static struct socket *dccp_v6_ctl_socket; static struct inet_connection_sock_af_ops dccp_ipv6_mapped; static struct inet_connection_sock_af_ops dccp_ipv6_af_ops; +static int dccp_v6_get_port(struct sock *sk, unsigned short snum) +{ + return inet_csk_get_port(&dccp_hashinfo, sk, snum, + inet6_csk_bind_conflict); +} + static void dccp_v6_hash(struct sock *sk) { if (sk->sk_state != DCCP_CLOSED) { if (inet_csk(sk)->icsk_af_ops == &dccp_ipv6_mapped) { - inet_hash(sk); + dccp_hash(sk); return; } local_bh_disable(); - __inet6_hash(sk); + __inet6_hash(&dccp_hashinfo, sk); local_bh_enable(); } } @@ -624,8 +630,8 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk, newinet->daddr = newinet->saddr = newinet->rcv_saddr = LOOPBACK4_IPV6; - __inet6_hash(newsk); - inet_inherit_port(sk, newsk); + __inet6_hash(&dccp_hashinfo, newsk); + inet_inherit_port(&dccp_hashinfo, sk, newsk); return newsk; @@ -1048,7 +1054,6 @@ static struct inet_connection_sock_af_ops dccp_ipv6_af_ops = { .getsockopt = ipv6_getsockopt, .addr2sockaddr = inet6_csk_addr2sockaddr, .sockaddr_len = sizeof(struct sockaddr_in6), - .bind_conflict = inet6_csk_bind_conflict, #ifdef CONFIG_COMPAT .compat_setsockopt = compat_ipv6_setsockopt, .compat_getsockopt = compat_ipv6_getsockopt, @@ -1118,9 +1123,9 @@ static struct proto dccp_v6_prot = { .recvmsg = dccp_recvmsg, .backlog_rcv = dccp_v6_do_rcv, .hash = dccp_v6_hash, - .unhash = inet_unhash, + .unhash = dccp_unhash, .accept = inet_csk_accept, - .get_port = inet_csk_get_port, + .get_port = dccp_v6_get_port, .shutdown = dccp_shutdown, .destroy = dccp_v6_destroy_sock, .orphan_count = &dccp_orphan_count, @@ -1128,7 +1133,6 @@ static struct proto dccp_v6_prot = { .obj_size = sizeof(struct dccp6_sock), .rsk_prot = &dccp6_request_sock_ops, .twsk_prot = &dccp6_timewait_sock_ops, - .hashinfo = &dccp_hashinfo, #ifdef CONFIG_COMPAT .compat_setsockopt = compat_dccp_setsockopt, .compat_getsockopt = compat_dccp_getsockopt, diff --git a/trunk/net/dccp/proto.c b/trunk/net/dccp/proto.c index e3f5d37b84be..0bed4a6095b7 100644 --- a/trunk/net/dccp/proto.c +++ b/trunk/net/dccp/proto.c @@ -78,7 +78,7 @@ void dccp_set_state(struct sock *sk, const int state) sk->sk_prot->unhash(sk); if (inet_csk(sk)->icsk_bind_hash != NULL && !(sk->sk_userlocks & SOCK_BINDPORT_LOCK)) - inet_put_port(sk); + inet_put_port(&dccp_hashinfo, sk); /* fall through */ default: if (oldstate == DCCP_OPEN) @@ -173,6 +173,20 @@ const char *dccp_state_name(const int state) EXPORT_SYMBOL_GPL(dccp_state_name); +void dccp_hash(struct sock *sk) +{ + inet_hash(&dccp_hashinfo, sk); +} + +EXPORT_SYMBOL_GPL(dccp_hash); + +void dccp_unhash(struct sock *sk) +{ + inet_unhash(&dccp_hashinfo, sk); +} + +EXPORT_SYMBOL_GPL(dccp_unhash); + int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) { struct dccp_sock *dp = dccp_sk(sk); @@ -254,7 +268,7 @@ int dccp_destroy_sock(struct sock *sk) /* Clean up a referenced DCCP bind bucket. */ if (inet_csk(sk)->icsk_bind_hash != NULL) - inet_put_port(sk); + inet_put_port(&dccp_hashinfo, sk); kfree(dp->dccps_service_list); dp->dccps_service_list = NULL; diff --git a/trunk/net/ipv4/inet_connection_sock.c b/trunk/net/ipv4/inet_connection_sock.c index b189278c7bc1..de5a41de191a 100644 --- a/trunk/net/ipv4/inet_connection_sock.c +++ b/trunk/net/ipv4/inet_connection_sock.c @@ -78,9 +78,11 @@ EXPORT_SYMBOL_GPL(inet_csk_bind_conflict); /* Obtain a reference to a local port for the given sock, * if snum is zero it means select any available local port. */ -int inet_csk_get_port(struct sock *sk, unsigned short snum) +int inet_csk_get_port(struct inet_hashinfo *hashinfo, + struct sock *sk, unsigned short snum, + int (*bind_conflict)(const struct sock *sk, + const struct inet_bind_bucket *tb)) { - struct inet_hashinfo *hashinfo = sk->sk_prot->hashinfo; struct inet_bind_hashbucket *head; struct hlist_node *node; struct inet_bind_bucket *tb; @@ -140,7 +142,7 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum) goto success; } else { ret = 1; - if (inet_csk(sk)->icsk_af_ops->bind_conflict(sk, tb)) + if (bind_conflict(sk, tb)) goto fail_unlock; } } diff --git a/trunk/net/ipv4/inet_hashtables.c b/trunk/net/ipv4/inet_hashtables.c index 90f422c9447b..48d45008f749 100644 --- a/trunk/net/ipv4/inet_hashtables.c +++ b/trunk/net/ipv4/inet_hashtables.c @@ -66,9 +66,8 @@ void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, /* * Get rid of any references to a local port held by the given sock. */ -static void __inet_put_port(struct sock *sk) +static void __inet_put_port(struct inet_hashinfo *hashinfo, struct sock *sk) { - struct inet_hashinfo *hashinfo = sk->sk_prot->hashinfo; const int bhash = inet_bhashfn(inet_sk(sk)->num, hashinfo->bhash_size); struct inet_bind_hashbucket *head = &hashinfo->bhash[bhash]; struct inet_bind_bucket *tb; @@ -82,10 +81,10 @@ static void __inet_put_port(struct sock *sk) spin_unlock(&head->lock); } -void inet_put_port(struct sock *sk) +void inet_put_port(struct inet_hashinfo *hashinfo, struct sock *sk) { local_bh_disable(); - __inet_put_port(sk); + __inet_put_port(hashinfo, sk); local_bh_enable(); } @@ -318,9 +317,8 @@ static inline u32 inet_sk_port_offset(const struct sock *sk) inet->dport); } -void __inet_hash_nolisten(struct sock *sk) +void __inet_hash_nolisten(struct inet_hashinfo *hashinfo, struct sock *sk) { - struct inet_hashinfo *hashinfo = sk->sk_prot->hashinfo; struct hlist_head *list; rwlock_t *lock; struct inet_ehash_bucket *head; @@ -339,14 +337,13 @@ void __inet_hash_nolisten(struct sock *sk) } EXPORT_SYMBOL_GPL(__inet_hash_nolisten); -static void __inet_hash(struct sock *sk) +void __inet_hash(struct inet_hashinfo *hashinfo, struct sock *sk) { - struct inet_hashinfo *hashinfo = sk->sk_prot->hashinfo; struct hlist_head *list; rwlock_t *lock; if (sk->sk_state != TCP_LISTEN) { - __inet_hash_nolisten(sk); + __inet_hash_nolisten(hashinfo, sk); return; } @@ -360,48 +357,13 @@ static void __inet_hash(struct sock *sk) write_unlock(lock); wake_up(&hashinfo->lhash_wait); } - -void inet_hash(struct sock *sk) -{ - if (sk->sk_state != TCP_CLOSE) { - local_bh_disable(); - __inet_hash(sk); - local_bh_enable(); - } -} -EXPORT_SYMBOL_GPL(inet_hash); - -void inet_unhash(struct sock *sk) -{ - rwlock_t *lock; - struct inet_hashinfo *hashinfo = sk->sk_prot->hashinfo; - - if (sk_unhashed(sk)) - goto out; - - if (sk->sk_state == TCP_LISTEN) { - local_bh_disable(); - inet_listen_wlock(hashinfo); - lock = &hashinfo->lhash_lock; - } else { - lock = inet_ehash_lockp(hashinfo, sk->sk_hash); - write_lock_bh(lock); - } - - if (__sk_del_node_init(sk)) - sock_prot_inuse_add(sk->sk_prot, -1); - write_unlock_bh(lock); -out: - if (sk->sk_state == TCP_LISTEN) - wake_up(&hashinfo->lhash_wait); -} -EXPORT_SYMBOL_GPL(inet_unhash); +EXPORT_SYMBOL_GPL(__inet_hash); int __inet_hash_connect(struct inet_timewait_death_row *death_row, struct sock *sk, int (*check_established)(struct inet_timewait_death_row *, struct sock *, __u16, struct inet_timewait_sock **), - void (*hash)(struct sock *sk)) + void (*hash)(struct inet_hashinfo *, struct sock *)) { struct inet_hashinfo *hinfo = death_row->hashinfo; const unsigned short snum = inet_sk(sk)->num; @@ -465,7 +427,7 @@ int __inet_hash_connect(struct inet_timewait_death_row *death_row, inet_bind_hash(sk, tb, port); if (sk_unhashed(sk)) { inet_sk(sk)->sport = htons(port); - hash(sk); + hash(hinfo, sk); } spin_unlock(&head->lock); @@ -482,7 +444,7 @@ int __inet_hash_connect(struct inet_timewait_death_row *death_row, tb = inet_csk(sk)->icsk_bind_hash; spin_lock_bh(&head->lock); if (sk_head(&tb->owners) == sk && !sk->sk_bind_node.next) { - hash(sk); + hash(hinfo, sk); spin_unlock_bh(&head->lock); return 0; } else { diff --git a/trunk/net/ipv4/tcp.c b/trunk/net/ipv4/tcp.c index 071e83a894ad..a0d373bd9065 100644 --- a/trunk/net/ipv4/tcp.c +++ b/trunk/net/ipv4/tcp.c @@ -1669,7 +1669,7 @@ void tcp_set_state(struct sock *sk, int state) sk->sk_prot->unhash(sk); if (inet_csk(sk)->icsk_bind_hash && !(sk->sk_userlocks & SOCK_BINDPORT_LOCK)) - inet_put_port(sk); + inet_put_port(&tcp_hashinfo, sk); /* fall through */ default: if (oldstate==TCP_ESTABLISHED) diff --git a/trunk/net/ipv4/tcp_ipv4.c b/trunk/net/ipv4/tcp_ipv4.c index 63414ea427c5..77c1939a2b0d 100644 --- a/trunk/net/ipv4/tcp_ipv4.c +++ b/trunk/net/ipv4/tcp_ipv4.c @@ -108,6 +108,22 @@ struct inet_hashinfo __cacheline_aligned tcp_hashinfo = { .lhash_wait = __WAIT_QUEUE_HEAD_INITIALIZER(tcp_hashinfo.lhash_wait), }; +static int tcp_v4_get_port(struct sock *sk, unsigned short snum) +{ + return inet_csk_get_port(&tcp_hashinfo, sk, snum, + inet_csk_bind_conflict); +} + +static void tcp_v4_hash(struct sock *sk) +{ + inet_hash(&tcp_hashinfo, sk); +} + +void tcp_unhash(struct sock *sk) +{ + inet_unhash(&tcp_hashinfo, sk); +} + static inline __u32 tcp_v4_init_sequence(struct sk_buff *skb) { return secure_tcp_sequence_number(ip_hdr(skb)->daddr, @@ -1462,8 +1478,8 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb, } #endif - __inet_hash_nolisten(newsk); - __inet_inherit_port(sk, newsk); + __inet_hash_nolisten(&tcp_hashinfo, newsk); + __inet_inherit_port(&tcp_hashinfo, sk, newsk); return newsk; @@ -1811,7 +1827,6 @@ struct inet_connection_sock_af_ops ipv4_specific = { .getsockopt = ip_getsockopt, .addr2sockaddr = inet_csk_addr2sockaddr, .sockaddr_len = sizeof(struct sockaddr_in), - .bind_conflict = inet_csk_bind_conflict, #ifdef CONFIG_COMPAT .compat_setsockopt = compat_ip_setsockopt, .compat_getsockopt = compat_ip_getsockopt, @@ -1911,7 +1926,7 @@ int tcp_v4_destroy_sock(struct sock *sk) /* Clean up a referenced TCP bind bucket. */ if (inet_csk(sk)->icsk_bind_hash) - inet_put_port(sk); + inet_put_port(&tcp_hashinfo, sk); /* * If sendmsg cached page exists, toss it. @@ -2420,9 +2435,9 @@ struct proto tcp_prot = { .getsockopt = tcp_getsockopt, .recvmsg = tcp_recvmsg, .backlog_rcv = tcp_v4_do_rcv, - .hash = inet_hash, - .unhash = inet_unhash, - .get_port = inet_csk_get_port, + .hash = tcp_v4_hash, + .unhash = tcp_unhash, + .get_port = tcp_v4_get_port, .enter_memory_pressure = tcp_enter_memory_pressure, .sockets_allocated = &tcp_sockets_allocated, .orphan_count = &tcp_orphan_count, @@ -2435,7 +2450,6 @@ struct proto tcp_prot = { .obj_size = sizeof(struct tcp_sock), .twsk_prot = &tcp_timewait_sock_ops, .rsk_prot = &tcp_request_sock_ops, - .hashinfo = &tcp_hashinfo, #ifdef CONFIG_COMPAT .compat_setsockopt = compat_tcp_setsockopt, .compat_getsockopt = compat_tcp_getsockopt, @@ -2453,6 +2467,7 @@ void __init tcp_v4_init(struct net_proto_family *ops) EXPORT_SYMBOL(ipv4_specific); EXPORT_SYMBOL(tcp_hashinfo); EXPORT_SYMBOL(tcp_prot); +EXPORT_SYMBOL(tcp_unhash); EXPORT_SYMBOL(tcp_v4_conn_request); EXPORT_SYMBOL(tcp_v4_connect); EXPORT_SYMBOL(tcp_v4_do_rcv); diff --git a/trunk/net/ipv6/inet6_hashtables.c b/trunk/net/ipv6/inet6_hashtables.c index 43f3993e1f30..d325a9958909 100644 --- a/trunk/net/ipv6/inet6_hashtables.c +++ b/trunk/net/ipv6/inet6_hashtables.c @@ -22,9 +22,9 @@ #include #include -void __inet6_hash(struct sock *sk) +void __inet6_hash(struct inet_hashinfo *hashinfo, + struct sock *sk) { - struct inet_hashinfo *hashinfo = sk->sk_prot->hashinfo; struct hlist_head *list; rwlock_t *lock; diff --git a/trunk/net/ipv6/tcp_ipv6.c b/trunk/net/ipv6/tcp_ipv6.c index 12750f2b05ab..59d0029e93a7 100644 --- a/trunk/net/ipv6/tcp_ipv6.c +++ b/trunk/net/ipv6/tcp_ipv6.c @@ -86,6 +86,12 @@ static struct tcp_sock_af_ops tcp_sock_ipv6_specific; static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific; #endif +static int tcp_v6_get_port(struct sock *sk, unsigned short snum) +{ + return inet_csk_get_port(&tcp_hashinfo, sk, snum, + inet6_csk_bind_conflict); +} + static void tcp_v6_hash(struct sock *sk) { if (sk->sk_state != TCP_CLOSE) { @@ -94,7 +100,7 @@ static void tcp_v6_hash(struct sock *sk) return; } local_bh_disable(); - __inet6_hash(sk); + __inet6_hash(&tcp_hashinfo, sk); local_bh_enable(); } } @@ -1498,8 +1504,8 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, } #endif - __inet6_hash(newsk); - inet_inherit_port(sk, newsk); + __inet6_hash(&tcp_hashinfo, newsk); + inet_inherit_port(&tcp_hashinfo, sk, newsk); return newsk; @@ -1827,7 +1833,6 @@ static struct inet_connection_sock_af_ops ipv6_specific = { .getsockopt = ipv6_getsockopt, .addr2sockaddr = inet6_csk_addr2sockaddr, .sockaddr_len = sizeof(struct sockaddr_in6), - .bind_conflict = inet6_csk_bind_conflict, #ifdef CONFIG_COMPAT .compat_setsockopt = compat_ipv6_setsockopt, .compat_getsockopt = compat_ipv6_getsockopt, @@ -1859,7 +1864,6 @@ static struct inet_connection_sock_af_ops ipv6_mapped = { .getsockopt = ipv6_getsockopt, .addr2sockaddr = inet6_csk_addr2sockaddr, .sockaddr_len = sizeof(struct sockaddr_in6), - .bind_conflict = inet6_csk_bind_conflict, #ifdef CONFIG_COMPAT .compat_setsockopt = compat_ipv6_setsockopt, .compat_getsockopt = compat_ipv6_getsockopt, @@ -2123,8 +2127,8 @@ struct proto tcpv6_prot = { .recvmsg = tcp_recvmsg, .backlog_rcv = tcp_v6_do_rcv, .hash = tcp_v6_hash, - .unhash = inet_unhash, - .get_port = inet_csk_get_port, + .unhash = tcp_unhash, + .get_port = tcp_v6_get_port, .enter_memory_pressure = tcp_enter_memory_pressure, .sockets_allocated = &tcp_sockets_allocated, .memory_allocated = &tcp_memory_allocated, @@ -2137,7 +2141,6 @@ struct proto tcpv6_prot = { .obj_size = sizeof(struct tcp6_sock), .twsk_prot = &tcp6_timewait_sock_ops, .rsk_prot = &tcp6_request_sock_ops, - .hashinfo = &tcp_hashinfo, #ifdef CONFIG_COMPAT .compat_setsockopt = compat_tcp_setsockopt, .compat_getsockopt = compat_tcp_getsockopt, diff --git a/trunk/net/mac80211/Kconfig b/trunk/net/mac80211/Kconfig index e77592d050ce..09c255002e56 100644 --- a/trunk/net/mac80211/Kconfig +++ b/trunk/net/mac80211/Kconfig @@ -98,18 +98,6 @@ config MAC80211_DEBUGFS Say N unless you know you need this. -config MAC80211_DEBUG_PACKET_ALIGNMENT - bool "Enable packet alignment debugging" - depends on MAC80211 - help - This option is recommended for driver authors and strongly - discouraged for everybody else, it will trigger a warning - when a driver hands mac80211 a buffer that is aligned in - a way that will cause problems with the IP stack on some - architectures. - - Say N unless you're writing a mac80211 based driver. - config MAC80211_DEBUG bool "Enable debugging output" depends on MAC80211 diff --git a/trunk/net/mac80211/ieee80211.c b/trunk/net/mac80211/ieee80211.c index 67b7c75c430d..5dcc2d61551f 100644 --- a/trunk/net/mac80211/ieee80211.c +++ b/trunk/net/mac80211/ieee80211.c @@ -1344,17 +1344,17 @@ static int __init ieee80211_init(void) ret = rc80211_simple_init(); if (ret) - goto out; + goto fail; ret = rc80211_pid_init(); if (ret) - goto out_cleanup_simple; + goto fail_simple; ret = ieee80211_wme_register(); if (ret) { printk(KERN_DEBUG "ieee80211_init: failed to " "initialize WME (err=%d)\n", ret); - goto out_cleanup_pid; + goto fail_pid; } ieee80211_debugfs_netdev_init(); @@ -1362,11 +1362,11 @@ static int __init ieee80211_init(void) return 0; - out_cleanup_pid: - rc80211_pid_exit(); - out_cleanup_simple: + fail_pid: rc80211_simple_exit(); - out: + fail_simple: + rc80211_pid_exit(); + fail: return ret; } diff --git a/trunk/net/mac80211/rc80211_pid_algo.c b/trunk/net/mac80211/rc80211_pid_algo.c index c339571632b2..554c4baed6fb 100644 --- a/trunk/net/mac80211/rc80211_pid_algo.c +++ b/trunk/net/mac80211/rc80211_pid_algo.c @@ -538,7 +538,7 @@ int __init rc80211_pid_init(void) return ieee80211_rate_control_register(&mac80211_rcpid); } -void rc80211_pid_exit(void) +void __exit rc80211_pid_exit(void) { ieee80211_rate_control_unregister(&mac80211_rcpid); } diff --git a/trunk/net/mac80211/rc80211_simple.c b/trunk/net/mac80211/rc80211_simple.c index 9a78b116acff..934676d687d6 100644 --- a/trunk/net/mac80211/rc80211_simple.c +++ b/trunk/net/mac80211/rc80211_simple.c @@ -389,7 +389,7 @@ int __init rc80211_simple_init(void) return ieee80211_rate_control_register(&mac80211_rcsimple); } -void rc80211_simple_exit(void) +void __exit rc80211_simple_exit(void) { ieee80211_rate_control_unregister(&mac80211_rcsimple); } diff --git a/trunk/net/mac80211/rx.c b/trunk/net/mac80211/rx.c index 535407d07fa4..d44c87269bcb 100644 --- a/trunk/net/mac80211/rx.c +++ b/trunk/net/mac80211/rx.c @@ -340,15 +340,11 @@ static u32 ieee80211_rx_load_stats(struct ieee80211_local *local, return load; } -#ifdef CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT static ieee80211_txrx_result ieee80211_rx_h_verify_ip_alignment(struct ieee80211_txrx_data *rx) { int hdrlen; - if (!WLAN_FC_DATA_PRESENT(rx->fc)) - return TXRX_CONTINUE; - /* * Drivers are required to align the payload data in a way that * guarantees that the contained IP header is aligned to a four- @@ -375,14 +371,11 @@ ieee80211_rx_h_verify_ip_alignment(struct ieee80211_txrx_data *rx) return TXRX_CONTINUE; } -#endif ieee80211_rx_handler ieee80211_rx_pre_handlers[] = { ieee80211_rx_h_parse_qos, -#ifdef CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT ieee80211_rx_h_verify_ip_alignment, -#endif NULL }; diff --git a/trunk/net/rfkill/rfkill.c b/trunk/net/rfkill/rfkill.c index 1a47f5d1be17..6562f868e82f 100644 --- a/trunk/net/rfkill/rfkill.c +++ b/trunk/net/rfkill/rfkill.c @@ -340,7 +340,7 @@ EXPORT_SYMBOL(rfkill_allocate); * rfkill_free - Mark rfkill structure for deletion * @rfkill: rfkill structure to be destroyed * - * Decrements reference count of rfkill structure so it is destroyed. + * Decrements reference count of rfkill structure so it is destoryed. * Note that rfkill_free() should _not_ be called after rfkill_unregister(). */ void rfkill_free(struct rfkill *rfkill) diff --git a/trunk/net/sctp/sm_statefuns.c b/trunk/net/sctp/sm_statefuns.c index 5df0c4bd415b..61cbd5a8dd0c 100644 --- a/trunk/net/sctp/sm_statefuns.c +++ b/trunk/net/sctp/sm_statefuns.c @@ -537,7 +537,7 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep, * * This means that if we only want to abort associations * in an authenticated way (i.e AUTH+ABORT), then we - * can't destroy this association just becuase the packet + * can't destory this association just becuase the packet * was malformed. */ if (sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)) @@ -4130,7 +4130,7 @@ static sctp_disposition_t sctp_sf_abort_violation( * * This means that if we only want to abort associations * in an authenticated way (i.e AUTH+ABORT), then we - * can't destroy this association just becuase the packet + * can't destory this association just becuase the packet * was malformed. */ if (sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)) diff --git a/trunk/scripts/kconfig/mconf.c b/trunk/scripts/kconfig/mconf.c index 734cf4f3131e..50e61c411bc0 100644 --- a/trunk/scripts/kconfig/mconf.c +++ b/trunk/scripts/kconfig/mconf.c @@ -821,7 +821,6 @@ static void conf_load(void) return; if (!conf_read(dialog_input_result)) { set_config_filename(dialog_input_result); - sym_set_change_count(1); return; } show_textbox(NULL, _("File does not exist!"), 5, 38); diff --git a/trunk/scripts/kconfig/menu.c b/trunk/scripts/kconfig/menu.c index 606ceb9e746e..fdad17367f61 100644 --- a/trunk/scripts/kconfig/menu.c +++ b/trunk/scripts/kconfig/menu.c @@ -203,9 +203,12 @@ void sym_check_prop(struct symbol *sym) prop_warn(prop, "config symbol '%s' uses select, but is " "not boolean or tristate", sym->name); - else if (sym2->type != S_UNKNOWN && - sym2->type != S_BOOLEAN && - sym2->type != S_TRISTATE) + else if (sym2->type == S_UNKNOWN) + prop_warn(prop, + "'select' used by config symbol '%s' " + "refers to undefined symbol '%s'", + sym->name, sym2->name); + else if (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE) prop_warn(prop, "'%s' has wrong type. 'select' only " "accept arguments of boolean and " diff --git a/trunk/scripts/mod/modpost.c b/trunk/scripts/mod/modpost.c index 5d546466e6b1..f8efc93eb700 100644 --- a/trunk/scripts/mod/modpost.c +++ b/trunk/scripts/mod/modpost.c @@ -870,7 +870,7 @@ const struct sectioncheck sectioncheck[] = { /* Do not export init/exit functions or data */ { .fromsec = { "__ksymtab*", NULL }, - .tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL }, + .tosec = { ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS, NULL }, .mismatch = EXPORT_TO_INIT_EXIT } }; @@ -1125,15 +1125,15 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch, to = to_is_func ? "function" : "variable"; to_p = to_is_func ? "()" : ""; - sec_mismatch_count++; - if (!sec_mismatch_verbose) - return; - fprintf(stderr, "WARNING: %s(%s+0x%llx): Section mismatch in" " reference from the %s %s%s to the %s %s:%s%s\n", modname, fromsec, fromaddr, from, fromsym, from_p, to, tosec, tosym, to_p); + sec_mismatch_count++; + if (!sec_mismatch_verbose) + return; + switch (mismatch) { case TEXT_TO_INIT: fprintf(stderr, @@ -1939,9 +1939,10 @@ int main(int argc, char **argv) write_dump(dump_write); if (sec_mismatch_count && !sec_mismatch_verbose) fprintf(stderr, "modpost: Found %d section mismatch(es).\n" - "To see full details build your kernel with:\n" - "'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n", - sec_mismatch_count); + "To see additional details select \"Enable full " + "Section mismatch analysis\"\n" + "in the Kernel Hacking menu " + "(CONFIG_SECTION_MISMATCH).\n", sec_mismatch_count); return err; } diff --git a/trunk/scripts/setlocalversion b/trunk/scripts/setlocalversion old mode 100755 new mode 100644 index 1c1bdaf7348a..52f032e409a3 --- a/trunk/scripts/setlocalversion +++ b/trunk/scripts/setlocalversion @@ -45,19 +45,3 @@ if hgid=`hg id 2>/dev/null`; then # All done with mercurial exit fi - -# Check for svn and a svn repo. -if rev=`svn info 2>/dev/null | grep '^Revision'`; then - rev=`echo $rev | awk '{print $NF}'` - changes=`svn status 2>/dev/null | grep '^[AMD]' | wc -l` - - # Are there uncommitted changes? - if [ $changes != 0 ]; then - printf -- '-svn%s%s%s' "$rev" -dirty "$changes" - else - printf -- '-svn%s' "$rev" - fi - - # All done with svn - exit -fi diff --git a/trunk/sound/oss/via82cxxx_audio.c b/trunk/sound/oss/via82cxxx_audio.c index f95aa0946758..5d3c0372df32 100644 --- a/trunk/sound/oss/via82cxxx_audio.c +++ b/trunk/sound/oss/via82cxxx_audio.c @@ -2104,7 +2104,6 @@ static struct page * via_mm_nopage (struct vm_area_struct * vma, { struct via_info *card = vma->vm_private_data; struct via_channel *chan = &card->ch_out; - unsigned long max_bufs; struct page *dmapage; unsigned long pgoff; int rd, wr; @@ -2128,11 +2127,14 @@ static struct page * via_mm_nopage (struct vm_area_struct * vma, rd = card->ch_in.is_mapped; wr = card->ch_out.is_mapped; - max_bufs = chan->frag_number; - if (rd && wr) - max_bufs *= 2; - if (pgoff >= max_bufs) - return NOPAGE_SIGBUS; +#ifndef VIA_NDEBUG + { + unsigned long max_bufs = chan->frag_number; + if (rd && wr) max_bufs *= 2; + /* via_dsp_mmap() should ensure this */ + assert (pgoff < max_bufs); + } +#endif /* if full-duplex (read+write) and we have two sets of bufs, * then the playback buffers come first, sez soundcard.c */ diff --git a/trunk/sound/usb/usx2y/usX2Yhwdep.c b/trunk/sound/usb/usx2y/usX2Yhwdep.c index 1558a5c4094f..6495534e5bf6 100644 --- a/trunk/sound/usb/usx2y/usX2Yhwdep.c +++ b/trunk/sound/usb/usx2y/usX2Yhwdep.c @@ -84,7 +84,7 @@ static int snd_us428ctls_mmap(struct snd_hwdep * hw, struct file *filp, struct v us428->us428ctls_sharedmem->CtlSnapShotLast = -2; } area->vm_ops = &us428ctls_vm_ops; - area->vm_flags |= VM_RESERVED | VM_DONTEXPAND; + area->vm_flags |= VM_RESERVED; area->vm_private_data = hw->private_data; return 0; } diff --git a/trunk/sound/usb/usx2y/usx2yhwdeppcm.c b/trunk/sound/usb/usx2y/usx2yhwdeppcm.c index 117946f2debb..800b5cecfc80 100644 --- a/trunk/sound/usb/usx2y/usx2yhwdeppcm.c +++ b/trunk/sound/usb/usx2y/usx2yhwdeppcm.c @@ -722,7 +722,7 @@ static int snd_usX2Y_hwdep_pcm_mmap(struct snd_hwdep * hw, struct file *filp, st return -ENODEV; } area->vm_ops = &snd_usX2Y_hwdep_pcm_vm_ops; - area->vm_flags |= VM_RESERVED | VM_DONTEXPAND; + area->vm_flags |= VM_RESERVED; area->vm_private_data = hw->private_data; return 0; }